[Parley-svn] r700 - / trunk/root/static/yui trunk/root/static/yui/animation trunk/root/static/yui/assets/skins trunk/root/static/yui/assets/skins/sam trunk/root/static/yui/autocomplete trunk/root/static/yui/autocomplete/assets trunk/root/static/yui/autocomplete/assets/skins/sam trunk/root/static/yui/base trunk/root/static/yui/button trunk/root/static/yui/button/assets trunk/root/static/yui/button/assets/skins/sam trunk/root/static/yui/calendar trunk/root/static/yui/calendar/assets trunk/root/static/yui/calendar/assets/skins/sam trunk/root/static/yui/charts trunk/root/static/yui/charts/assets trunk/root/static/yui/colorpicker trunk/root/static/yui/colorpicker/assets trunk/root/static/yui/colorpicker/assets/skins/sam trunk/root/static/yui/connection trunk/root/static/yui/container trunk/root/static/yui/container/assets trunk/root/static/yui/container/assets/skins/sam trunk/root/static/yui/datasource trunk/root/static/yui/datatable trunk/root/static/yui/datatable/assets trunk/root/! static/yui/datatable/assets/skins/sam trunk/root/static/yui/dom trunk/root/static/yui/dragdrop trunk/root/static/yui/editor trunk/root/static/yui/editor/assets trunk/root/static/yui/editor/assets/skins/sam trunk/root/static/yui/element trunk/root/static/yui/event trunk/root/static/yui/fonts trunk/root/static/yui/get trunk/root/static/yui/grids trunk/root/static/yui/history trunk/root/static/yui/imageloader trunk/root/static/yui/json trunk/root/static/yui/logger trunk/root/static/yui/logger/assets trunk/root/static/yui/logger/assets/skins/sam trunk/root/static/yui/menu trunk/root/static/yui/menu/assets trunk/root/static/yui/menu/assets/skins/sam trunk/root/static/yui/profiler trunk/root/static/yui/reset trunk/root/static/yui/reset-fonts trunk/root/static/yui/reset-fonts-grids trunk/root/static/yui/selector trunk/root/static/yui/slider trunk/root/static/yui/tabview trunk/root/static/yui/tabview/assets trunk/root/static/yui/tabview/assets/skins/sam trunk/root/static/yui/treevi! ew trunk/root/static/yui/treeview/assets trunk/root/static/yui! /treevie

chiselwright at BerliOS chiselwright at mail.berlios.de
Thu Dec 20 11:17:13 CET 2007


Author: chiselwright
Date: 2007-12-20 11:16:27 +0100 (Thu, 20 Dec 2007)
New Revision: 700

Added:
   trunk/root/static/yui/assets/skins/sam/menubaritem_submenuindicator.png
   trunk/root/static/yui/assets/skins/sam/menubaritem_submenuindicator_disabled.png
   trunk/root/static/yui/assets/skins/sam/menuitem_checkbox.png
   trunk/root/static/yui/assets/skins/sam/menuitem_checkbox_disabled.png
   trunk/root/static/yui/assets/skins/sam/menuitem_submenuindicator.png
   trunk/root/static/yui/assets/skins/sam/menuitem_submenuindicator_disabled.png
   trunk/root/static/yui/assets/skins/sam/simpleeditor.css
   trunk/root/static/yui/button/button-debug.js
   trunk/root/static/yui/button/button-min.js
   trunk/root/static/yui/button/button.js
   trunk/root/static/yui/calendar/assets/calgrad.png
   trunk/root/static/yui/charts/
   trunk/root/static/yui/charts/README
   trunk/root/static/yui/charts/assets/
   trunk/root/static/yui/charts/assets/charts.swf
   trunk/root/static/yui/charts/charts-experimental-debug.js
   trunk/root/static/yui/charts/charts-experimental-min.js
   trunk/root/static/yui/charts/charts-experimental.js
   trunk/root/static/yui/editor/assets/simpleeditor-core.css
   trunk/root/static/yui/editor/assets/skins/sam/simpleeditor-skin.css
   trunk/root/static/yui/editor/assets/skins/sam/simpleeditor.css
   trunk/root/static/yui/editor/simpleeditor-beta-debug.js
   trunk/root/static/yui/editor/simpleeditor-beta-min.js
   trunk/root/static/yui/editor/simpleeditor-beta.js
   trunk/root/static/yui/get/
   trunk/root/static/yui/get/README
   trunk/root/static/yui/get/get-beta-debug.js
   trunk/root/static/yui/get/get-beta-min.js
   trunk/root/static/yui/get/get-beta.js
   trunk/root/static/yui/history/history-debug.js
   trunk/root/static/yui/history/history-min.js
   trunk/root/static/yui/history/history.js
   trunk/root/static/yui/imageloader/imageloader-beta-debug.js
   trunk/root/static/yui/imageloader/imageloader-beta-min.js
   trunk/root/static/yui/imageloader/imageloader-beta.js
   trunk/root/static/yui/json/
   trunk/root/static/yui/json/README
   trunk/root/static/yui/json/json-beta-debug.js
   trunk/root/static/yui/json/json-beta-min.js
   trunk/root/static/yui/json/json-beta.js
   trunk/root/static/yui/menu/assets/menu_down_arrow.png
   trunk/root/static/yui/menu/assets/menu_down_arrow_disabled.png
   trunk/root/static/yui/menu/assets/menu_down_arrow_selected.png
   trunk/root/static/yui/menu/assets/menu_up_arrow.png
   trunk/root/static/yui/menu/assets/menu_up_arrow_disabled.png
   trunk/root/static/yui/menu/assets/menubaritem_submenuindicator.png
   trunk/root/static/yui/menu/assets/menubaritem_submenuindicator_disabled.png
   trunk/root/static/yui/menu/assets/menubaritem_submenuindicator_selected.png
   trunk/root/static/yui/menu/assets/menuitem_checked.png
   trunk/root/static/yui/menu/assets/menuitem_checked_disabled.png
   trunk/root/static/yui/menu/assets/menuitem_checked_selected.png
   trunk/root/static/yui/menu/assets/menuitem_submenuindicator.png
   trunk/root/static/yui/menu/assets/menuitem_submenuindicator_disabled.png
   trunk/root/static/yui/menu/assets/menuitem_submenuindicator_selected.png
   trunk/root/static/yui/menu/assets/skins/sam/menubaritem_submenuindicator.png
   trunk/root/static/yui/menu/assets/skins/sam/menubaritem_submenuindicator_disabled.png
   trunk/root/static/yui/menu/assets/skins/sam/menuitem_checkbox.png
   trunk/root/static/yui/menu/assets/skins/sam/menuitem_checkbox_disabled.png
   trunk/root/static/yui/menu/assets/skins/sam/menuitem_submenuindicator.png
   trunk/root/static/yui/menu/assets/skins/sam/menuitem_submenuindicator_disabled.png
   trunk/root/static/yui/profiler/
   trunk/root/static/yui/profiler/README
   trunk/root/static/yui/profiler/profiler-beta-debug.js
   trunk/root/static/yui/profiler/profiler-beta-min.js
   trunk/root/static/yui/profiler/profiler-beta.js
   trunk/root/static/yui/reset-fonts/
   trunk/root/static/yui/reset-fonts/README
   trunk/root/static/yui/reset-fonts/reset-fonts.css
   trunk/root/static/yui/selector/
   trunk/root/static/yui/selector/README
   trunk/root/static/yui/selector/selector-beta-debug.js
   trunk/root/static/yui/selector/selector-beta-min.js
   trunk/root/static/yui/selector/selector-beta.js
Removed:
   trunk/root/static/yui/assets/skins/orig/
   trunk/root/static/yui/button/button-beta-debug.js
   trunk/root/static/yui/button/button-beta-min.js
   trunk/root/static/yui/button/button-beta.js
   trunk/root/static/yui/calendar/css/
   trunk/root/static/yui/calendar/img/
   trunk/root/static/yui/container/css/
   trunk/root/static/yui/container/img/
   trunk/root/static/yui/history/history-beta-debug.js
   trunk/root/static/yui/history/history-beta-min.js
   trunk/root/static/yui/history/history-beta.js
   trunk/root/static/yui/imageloader/imageloader-experimental-debug.js
   trunk/root/static/yui/imageloader/imageloader-experimental-min.js
   trunk/root/static/yui/imageloader/imageloader-experimental.js
   trunk/root/static/yui/menu/assets/map.gif
   trunk/root/static/yui/treeview/css/
   trunk/root/static/yui/treeview/img/
Modified:
   /
   trunk/root/static/yui/animation/README
   trunk/root/static/yui/animation/animation-debug.js
   trunk/root/static/yui/animation/animation-min.js
   trunk/root/static/yui/animation/animation.js
   trunk/root/static/yui/assets/skins/sam/autocomplete.css
   trunk/root/static/yui/assets/skins/sam/button.css
   trunk/root/static/yui/assets/skins/sam/calendar.css
   trunk/root/static/yui/assets/skins/sam/colorpicker.css
   trunk/root/static/yui/assets/skins/sam/container.css
   trunk/root/static/yui/assets/skins/sam/datatable.css
   trunk/root/static/yui/assets/skins/sam/editor.css
   trunk/root/static/yui/assets/skins/sam/logger.css
   trunk/root/static/yui/assets/skins/sam/menu.css
   trunk/root/static/yui/assets/skins/sam/skin.css
   trunk/root/static/yui/assets/skins/sam/tabview.css
   trunk/root/static/yui/assets/skins/sam/treeview.css
   trunk/root/static/yui/assets/skins/sam/yuitest.css
   trunk/root/static/yui/autocomplete/README
   trunk/root/static/yui/autocomplete/assets/autocomplete-core.css
   trunk/root/static/yui/autocomplete/assets/skins/sam/autocomplete-skin.css
   trunk/root/static/yui/autocomplete/assets/skins/sam/autocomplete.css
   trunk/root/static/yui/autocomplete/autocomplete-debug.js
   trunk/root/static/yui/autocomplete/autocomplete-min.js
   trunk/root/static/yui/autocomplete/autocomplete.js
   trunk/root/static/yui/base/README
   trunk/root/static/yui/base/base-min.css
   trunk/root/static/yui/base/base.css
   trunk/root/static/yui/button/README
   trunk/root/static/yui/button/assets/button-core.css
   trunk/root/static/yui/button/assets/skins/sam/button-skin.css
   trunk/root/static/yui/button/assets/skins/sam/button.css
   trunk/root/static/yui/calendar/README
   trunk/root/static/yui/calendar/assets/calendar-core.css
   trunk/root/static/yui/calendar/assets/calendar.css
   trunk/root/static/yui/calendar/assets/skins/sam/calendar-skin.css
   trunk/root/static/yui/calendar/assets/skins/sam/calendar.css
   trunk/root/static/yui/calendar/calendar-debug.js
   trunk/root/static/yui/calendar/calendar-min.js
   trunk/root/static/yui/calendar/calendar.js
   trunk/root/static/yui/colorpicker/README
   trunk/root/static/yui/colorpicker/assets/colorpicker_core.css
   trunk/root/static/yui/colorpicker/assets/skins/sam/colorpicker-skin.css
   trunk/root/static/yui/colorpicker/assets/skins/sam/colorpicker.css
   trunk/root/static/yui/colorpicker/colorpicker-beta-debug.js
   trunk/root/static/yui/colorpicker/colorpicker-beta-min.js
   trunk/root/static/yui/colorpicker/colorpicker-beta.js
   trunk/root/static/yui/connection/README
   trunk/root/static/yui/connection/connection-debug.js
   trunk/root/static/yui/connection/connection-min.js
   trunk/root/static/yui/connection/connection.js
   trunk/root/static/yui/container/README
   trunk/root/static/yui/container/assets/container-core.css
   trunk/root/static/yui/container/assets/container.css
   trunk/root/static/yui/container/assets/skins/sam/container-skin.css
   trunk/root/static/yui/container/assets/skins/sam/container.css
   trunk/root/static/yui/container/container-debug.js
   trunk/root/static/yui/container/container-min.js
   trunk/root/static/yui/container/container.js
   trunk/root/static/yui/container/container_core-debug.js
   trunk/root/static/yui/container/container_core-min.js
   trunk/root/static/yui/container/container_core.js
   trunk/root/static/yui/datasource/README
   trunk/root/static/yui/datasource/datasource-beta-debug.js
   trunk/root/static/yui/datasource/datasource-beta-min.js
   trunk/root/static/yui/datasource/datasource-beta.js
   trunk/root/static/yui/datatable/README
   trunk/root/static/yui/datatable/assets/datatable-core.css
   trunk/root/static/yui/datatable/assets/datatable.css
   trunk/root/static/yui/datatable/assets/skins/sam/datatable-skin.css
   trunk/root/static/yui/datatable/assets/skins/sam/datatable.css
   trunk/root/static/yui/datatable/datatable-beta-debug.js
   trunk/root/static/yui/datatable/datatable-beta-min.js
   trunk/root/static/yui/datatable/datatable-beta.js
   trunk/root/static/yui/dom/README
   trunk/root/static/yui/dom/dom-debug.js
   trunk/root/static/yui/dom/dom-min.js
   trunk/root/static/yui/dom/dom.js
   trunk/root/static/yui/dragdrop/README
   trunk/root/static/yui/dragdrop/dragdrop-debug.js
   trunk/root/static/yui/dragdrop/dragdrop-min.js
   trunk/root/static/yui/dragdrop/dragdrop.js
   trunk/root/static/yui/editor/README
   trunk/root/static/yui/editor/assets/editor-core.css
   trunk/root/static/yui/editor/assets/skins/sam/editor-skin.css
   trunk/root/static/yui/editor/assets/skins/sam/editor.css
   trunk/root/static/yui/editor/editor-beta-debug.js
   trunk/root/static/yui/editor/editor-beta-min.js
   trunk/root/static/yui/editor/editor-beta.js
   trunk/root/static/yui/element/README
   trunk/root/static/yui/element/element-beta-debug.js
   trunk/root/static/yui/element/element-beta-min.js
   trunk/root/static/yui/element/element-beta.js
   trunk/root/static/yui/event/README
   trunk/root/static/yui/event/event-debug.js
   trunk/root/static/yui/event/event-min.js
   trunk/root/static/yui/event/event.js
   trunk/root/static/yui/fonts/README
   trunk/root/static/yui/fonts/fonts-min.css
   trunk/root/static/yui/fonts/fonts.css
   trunk/root/static/yui/grids/README
   trunk/root/static/yui/grids/grids-min.css
   trunk/root/static/yui/grids/grids.css
   trunk/root/static/yui/history/README
   trunk/root/static/yui/imageloader/README
   trunk/root/static/yui/logger/README
   trunk/root/static/yui/logger/assets/logger-core.css
   trunk/root/static/yui/logger/assets/logger.css
   trunk/root/static/yui/logger/assets/skins/sam/logger-skin.css
   trunk/root/static/yui/logger/assets/skins/sam/logger.css
   trunk/root/static/yui/logger/logger-debug.js
   trunk/root/static/yui/logger/logger-min.js
   trunk/root/static/yui/logger/logger.js
   trunk/root/static/yui/menu/README
   trunk/root/static/yui/menu/assets/menu-core.css
   trunk/root/static/yui/menu/assets/menu.css
   trunk/root/static/yui/menu/assets/skins/sam/menu-skin.css
   trunk/root/static/yui/menu/assets/skins/sam/menu.css
   trunk/root/static/yui/menu/menu-debug.js
   trunk/root/static/yui/menu/menu-min.js
   trunk/root/static/yui/menu/menu.js
   trunk/root/static/yui/reset-fonts-grids/reset-fonts-grids.css
   trunk/root/static/yui/reset/README
   trunk/root/static/yui/reset/reset-min.css
   trunk/root/static/yui/reset/reset.css
   trunk/root/static/yui/slider/README
   trunk/root/static/yui/slider/slider-debug.js
   trunk/root/static/yui/slider/slider-min.js
   trunk/root/static/yui/slider/slider.js
   trunk/root/static/yui/tabview/README
   trunk/root/static/yui/tabview/assets/border_tabs.css
   trunk/root/static/yui/tabview/assets/skin-sam.css
   trunk/root/static/yui/tabview/assets/skins/sam/tabview-skin.css
   trunk/root/static/yui/tabview/assets/skins/sam/tabview.css
   trunk/root/static/yui/tabview/assets/tabview-core.css
   trunk/root/static/yui/tabview/assets/tabview.css
   trunk/root/static/yui/tabview/tabview-debug.js
   trunk/root/static/yui/tabview/tabview-min.js
   trunk/root/static/yui/tabview/tabview.js
   trunk/root/static/yui/treeview/README
   trunk/root/static/yui/treeview/assets/skins/sam/treeview-skin.css
   trunk/root/static/yui/treeview/assets/skins/sam/treeview.css
   trunk/root/static/yui/treeview/assets/treeview-core.css
   trunk/root/static/yui/treeview/assets/treeview-menu.css
   trunk/root/static/yui/treeview/assets/treeview.css
   trunk/root/static/yui/treeview/treeview-debug.js
   trunk/root/static/yui/treeview/treeview-min.js
   trunk/root/static/yui/treeview/treeview.js
   trunk/root/static/yui/utilities/utilities.js
   trunk/root/static/yui/yahoo-dom-event/yahoo-dom-event.js
   trunk/root/static/yui/yahoo/README
   trunk/root/static/yui/yahoo/yahoo-debug.js
   trunk/root/static/yui/yahoo/yahoo-min.js
   trunk/root/static/yui/yahoo/yahoo.js
   trunk/root/static/yui/yuiloader/README
   trunk/root/static/yui/yuiloader/yuiloader-beta-debug.js
   trunk/root/static/yui/yuiloader/yuiloader-beta-min.js
   trunk/root/static/yui/yuiloader/yuiloader-beta.js
   trunk/root/static/yui/yuitest/README
   trunk/root/static/yui/yuitest/assets/skins/sam/yuitest-skin.css
   trunk/root/static/yui/yuitest/assets/skins/sam/yuitest.css
   trunk/root/static/yui/yuitest/assets/testlogger.css
   trunk/root/static/yui/yuitest/assets/yuitest-core.css
   trunk/root/static/yui/yuitest/yuitest-beta-debug.js
   trunk/root/static/yui/yuitest/yuitest-beta-min.js
   trunk/root/static/yui/yuitest/yuitest-beta.js
Log:
 r4339 at wiggin:  chisel | 2007-12-20 09:30:58 +0000
 / upgraded to YUI 2.4.1



Property changes on: 
___________________________________________________________________
Name: svk:merge
   - 6a361f96-f029-0410-94f8-848cdd0f6ccf:/local/parley:4338
6fba2e3f-c318-0410-85fa-910d1bc53201:/local/parley:5151
c0683b51-46fc-0310-adae-a083e7ee0929:/local/berlios/parley:15762
f1659af6-751b-0410-a472-c93ec2bf8afc:/local/parley:1222
   + 6a361f96-f029-0410-94f8-848cdd0f6ccf:/local/parley:4339
6fba2e3f-c318-0410-85fa-910d1bc53201:/local/parley:5151
c0683b51-46fc-0310-adae-a083e7ee0929:/local/berlios/parley:15762
f1659af6-751b-0410-a472-c93ec2bf8afc:/local/parley:1222

Modified: trunk/root/static/yui/animation/README
===================================================================
--- trunk/root/static/yui/animation/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/animation/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,11 @@
 Animation Release Notes
 
+*** version 2.4.1 ***
+* No change
+
+*** version 2.4.0 ***
+* calling stop() on an non-animated Anim no longer fires onComplete
+
 *** version 2.3.1 ***
 * no change
 

Modified: trunk/root/static/yui/animation/animation-debug.js
===================================================================
--- trunk/root/static/yui/animation/animation-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/animation/animation-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /*
 Copyright (c) 2006, Yahoo! Inc. All rights reserved.
@@ -326,8 +326,8 @@
             
             this.totalFrames = ( this.useSeconds ) ? Math.ceil(YAHOO.util.AnimMgr.fps * this.duration) : this.duration;
     
-            if (this.duration === 0 && this.useSeconds) {
-                this.totalFrames = 1; // jump to last frame if no duration
+            if (this.duration === 0 && this.useSeconds) { // jump to last frame if zero second duration 
+                this.totalFrames = 1; 
             }
             YAHOO.util.AnimMgr.registerElement(this);
             return true;
@@ -339,6 +339,10 @@
          * @param {Boolean} finish (optional) If true, animation will jump to final frame.
          */ 
         this.stop = function(finish) {
+            if (!this.isAnimated()) { // nothing to stop
+                return false;
+            }
+
             if (finish) {
                  this.currentFrame = this.totalFrames;
                  this._onTween.fire();
@@ -524,12 +528,12 @@
      * @private
      */
     this.unRegister = function(tween, index) {
-        tween._onComplete.fire();
         index = index || getIndex(tween);
-        if (index == -1) {
+        if (!tween.isAnimated() || index == -1) {
             return false;
         }
         
+        tween._onComplete.fire();
         queue.splice(index, 1);
 
         tweenCount -= 1;
@@ -562,9 +566,7 @@
             clearInterval(thread);
             
             for (var i = 0, len = queue.length; i < len; ++i) {
-                if ( queue[0].isAnimated() ) {
-                    this.unRegister(queue[0], 0);  
-                }
+                this.unRegister(queue[0], 0);  
             }
 
             queue = [];
@@ -1376,4 +1378,4 @@
         }
     };
 })();
-YAHOO.register("animation", YAHOO.util.Anim, {version: "2.3.1", build: "541"});
+YAHOO.register("animation", YAHOO.util.Anim, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/animation/animation-min.js
===================================================================
--- trunk/root/static/yui/animation/animation-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/animation/animation-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,8 +2,8 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-YAHOO.util.Anim=function(B,A,C,D){if(!B){}this.init(B,A,C,D);};YAHOO.util.Anim.prototype={toString:function(){var A=this.getEl();var B=A.id||A.tagName||A;return("Anim "+B);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(A,C,B){return this.method(this.currentFrame,C,B-C,this.totalFrames);},setAttribute:function(A,C,B){if(this.patterns.noNegatives.test(A)){C=(C>0)?C:0;}YAHOO.util.Dom.setStyle(this.getEl(),A,C+B);},getAttribute:function(A){var C=this.getEl();var E=YAHOO.util.Dom.getStyle(C,A);if(E!=="auto"&&!this.patterns.offsetUnit.test(E)){return parseFloat(E);}var B=this.patterns.offsetAttribute.exec(A)||[];var F=!!(B[3]);var D=!!(B[2]);if(D||(YAHOO.util.Dom.getStyle(C,"position")=="absolute"&&F)){E=C["offset"+B[0].charAt(0).toUpperCase()+B[0].substr(1)];}else{E=0;}return E;},getDefaultUnit:function(A)!
 {if(this.patterns.defaultUnit.test(A)){return"px";}return"";},setRuntimeAttribute:function(B){var G;var C;var D=this.attributes;this.runtimeAttributes[B]={};var F=function(H){return(typeof H!=="undefined");};if(!F(D[B]["to"])&&!F(D[B]["by"])){return false;}G=(F(D[B]["from"]))?D[B]["from"]:this.getAttribute(B);if(F(D[B]["to"])){C=D[B]["to"];}else{if(F(D[B]["by"])){if(G.constructor==Array){C=[];for(var E=0,A=G.length;E<A;++E){C[E]=G[E]+D[B]["by"][E]*1;}}else{C=G+D[B]["by"]*1;}}}this.runtimeAttributes[B].start=G;this.runtimeAttributes[B].end=C;this.runtimeAttributes[B].unit=(F(D[B].unit))?D[B]["unit"]:this.getDefaultUnit(B);return true;},init:function(C,H,G,A){var B=false;var D=null;var F=0;C=YAHOO.util.Dom.get(C);this.attributes=H||{};this.duration=!YAHOO.lang.isUndefined(G)?G:1;this.method=A||YAHOO.util.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=YAHOO.util.AnimMgr.fps;this.setEl=function(K){C=YAHOO.util.Dom.get(K);};this.getEl=function(){return!
  C;};this.isAnimated=function(){return B;};this.getStartTime=f!
 unction(
){return D;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(YAHOO.util.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}YAHOO.util.AnimMgr.registerElement(this);return true;};this.stop=function(K){if(K){this.currentFrame=this.totalFrames;this._onTween.fire();}YAHOO.util.AnimMgr.stop(this);};var J=function(){this.onStart.fire();this.runtimeAttributes={};for(var K in this.attributes){this.setRuntimeAttribute(K);}B=true;F=0;D=new Date();};var I=function(){var M={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};M.toString=function(){return("duration: "+M.duration+", currentFrame: "+M.currentFrame);};this.onTween.fire(M);var L=this.runtimeAttributes;for(var K in L){this.setAttribute(K,this.doMethod(K,L[K].start,L[K].end),L[K].unit);}F+=1;};var E=function(){var K=(new Date()-D)/1000;var L={duration:K,frame!
 s:F,fps:F/K};L.toString=function(){return("duration: "+L.duration+", frames: "+L.frames+", fps: "+L.fps);};B=false;F=0;this.onComplete.fire(L);};this._onStart=new YAHOO.util.CustomEvent("_start",this,true);this.onStart=new YAHOO.util.CustomEvent("start",this);this.onTween=new YAHOO.util.CustomEvent("tween",this);this._onTween=new YAHOO.util.CustomEvent("_tween",this,true);this.onComplete=new YAHOO.util.CustomEvent("complete",this);this._onComplete=new YAHOO.util.CustomEvent("_complete",this,true);this._onStart.subscribe(J);this._onTween.subscribe(I);this._onComplete.subscribe(E);}};YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start();};this.unRegister=function(G,F){G._onComplete.fire();F=F||E(G);if(F==-1){return false;}B.splice(F,1);A-=1;if(A<=0){this.stop();}return true;};this.start=function(){if(C===null){C=setInterval(this.run,this.delay);}};this.stop=fu!
 nction(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;+!
 +G){if(B
[0].isAnimated()){this.unRegister(B[0],0);}}B=[];C=null;A=0;}else{this.unRegister(H);}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue;}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G);}G._onTween.fire();}else{YAHOO.util.AnimMgr.stop(G,H);}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G;}}return -1;};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame);}else{K=J-(I+1);}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]];}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(!
 B+1,10)][1];}}return[C[0][0],C[0][1]];};};(function(){YAHOO.util.ColorAnim=function(E,D,F,G){YAHOO.util.ColorAnim.superclass.constructor.call(this,E,D,F,G);};YAHOO.extend(YAHOO.util.ColorAnim,YAHOO.util.Anim);var B=YAHOO.util;var C=B.ColorAnim.superclass;var A=B.ColorAnim.prototype;A.toString=function(){var D=this.getEl();var E=D.id||D.tagName;return("ColorAnim "+E);};A.patterns.color=/color$/i;A.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;A.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;A.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;A.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;A.parseColor=function(D){if(D.length==3){return D;}var E=this.patterns.hex.exec(D);if(E&&E.length==4){return[parseInt(E[1],16),parseInt(E[2],16),parseInt(E[3],16)];}E=this.patterns.rgb.exec(D);if(E&&E.length==4){return[parseInt(E[1],10),parseInt(E[2],10),parseInt(E[3],10)];
+YAHOO.util.Anim=function(B,A,C,D){if(!B){}this.init(B,A,C,D);};YAHOO.util.Anim.prototype={toString:function(){var A=this.getEl();var B=A.id||A.tagName||A;return("Anim "+B);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(A,C,B){return this.method(this.currentFrame,C,B-C,this.totalFrames);},setAttribute:function(A,C,B){if(this.patterns.noNegatives.test(A)){C=(C>0)?C:0;}YAHOO.util.Dom.setStyle(this.getEl(),A,C+B);},getAttribute:function(A){var C=this.getEl();var E=YAHOO.util.Dom.getStyle(C,A);if(E!=="auto"&&!this.patterns.offsetUnit.test(E)){return parseFloat(E);}var B=this.patterns.offsetAttribute.exec(A)||[];var F=!!(B[3]);var D=!!(B[2]);if(D||(YAHOO.util.Dom.getStyle(C,"position")=="absolute"&&F)){E=C["offset"+B[0].charAt(0).toUpperCase()+B[0].substr(1)];}else{E=0;}return E;},getDefaultUnit:function(A)!
 {if(this.patterns.defaultUnit.test(A)){return"px";}return"";},setRuntimeAttribute:function(B){var G;var C;var D=this.attributes;this.runtimeAttributes[B]={};var F=function(H){return(typeof H!=="undefined");};if(!F(D[B]["to"])&&!F(D[B]["by"])){return false;}G=(F(D[B]["from"]))?D[B]["from"]:this.getAttribute(B);if(F(D[B]["to"])){C=D[B]["to"];}else{if(F(D[B]["by"])){if(G.constructor==Array){C=[];for(var E=0,A=G.length;E<A;++E){C[E]=G[E]+D[B]["by"][E]*1;}}else{C=G+D[B]["by"]*1;}}}this.runtimeAttributes[B].start=G;this.runtimeAttributes[B].end=C;this.runtimeAttributes[B].unit=(F(D[B].unit))?D[B]["unit"]:this.getDefaultUnit(B);return true;},init:function(C,H,G,A){var B=false;var D=null;var F=0;C=YAHOO.util.Dom.get(C);this.attributes=H||{};this.duration=!YAHOO.lang.isUndefined(G)?G:1;this.method=A||YAHOO.util.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=YAHOO.util.AnimMgr.fps;this.setEl=function(K){C=YAHOO.util.Dom.get(K);};this.getEl=function(){return!
  C;};this.isAnimated=function(){return B;};this.getStartTime=f!
 unction(
){return D;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(YAHOO.util.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}YAHOO.util.AnimMgr.registerElement(this);return true;};this.stop=function(K){if(!this.isAnimated()){return false;}if(K){this.currentFrame=this.totalFrames;this._onTween.fire();}YAHOO.util.AnimMgr.stop(this);};var J=function(){this.onStart.fire();this.runtimeAttributes={};for(var K in this.attributes){this.setRuntimeAttribute(K);}B=true;F=0;D=new Date();};var I=function(){var M={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};M.toString=function(){return("duration: "+M.duration+", currentFrame: "+M.currentFrame);};this.onTween.fire(M);var L=this.runtimeAttributes;for(var K in L){this.setAttribute(K,this.doMethod(K,L[K].start,L[K].end),L[K].unit);}F+=1;};var E=function(){var K=(new D!
 ate()-D)/1000;var L={duration:K,frames:F,fps:F/K};L.toString=function(){return("duration: "+L.duration+", frames: "+L.frames+", fps: "+L.fps);};B=false;F=0;this.onComplete.fire(L);};this._onStart=new YAHOO.util.CustomEvent("_start",this,true);this.onStart=new YAHOO.util.CustomEvent("start",this);this.onTween=new YAHOO.util.CustomEvent("tween",this);this._onTween=new YAHOO.util.CustomEvent("_tween",this,true);this.onComplete=new YAHOO.util.CustomEvent("complete",this);this._onComplete=new YAHOO.util.CustomEvent("_complete",this,true);this._onStart.subscribe(J);this._onTween.subscribe(I);this._onComplete.subscribe(E);}};YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start();};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F==-1){return false;}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop();}return true;};this.start=function(){if(C===nu!
 ll){C=setInterval(this.run,this.delay);}};this.stop=function(H!
 ){if(!H)
{clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0);}B=[];C=null;A=0;}else{this.unRegister(H);}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue;}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G);}G._onTween.fire();}else{YAHOO.util.AnimMgr.stop(G,H);}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G;}}return -1;};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame);}else{K=J-(I+1);}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]];}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B]!
 [1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1];}}return[C[0][0],C[0][1]];};};(function(){YAHOO.util.ColorAnim=function(E,D,F,G){YAHOO.util.ColorAnim.superclass.constructor.call(this,E,D,F,G);};YAHOO.extend(YAHOO.util.ColorAnim,YAHOO.util.Anim);var B=YAHOO.util;var C=B.ColorAnim.superclass;var A=B.ColorAnim.prototype;A.toString=function(){var D=this.getEl();var E=D.id||D.tagName;return("ColorAnim "+E);};A.patterns.color=/color$/i;A.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;A.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;A.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;A.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;A.parseColor=function(D){if(D.length==3){return D;}var E=this.patterns.hex.exec(D);if(E&&E.length==4){return[parseInt(E[1],16),parseInt(E[2],16),parseInt(E[3],16)];}E=this.patterns.rgb.exec(D);if(E&&E.length==4){return[parseInt(E[1],10),parseInt(E[2],10),parseInt(E[3],10)];
 }E=this.patterns.hex3.exec(D);if(E&&E.length==4){return[parseInt(E[1]+E[1],16),parseInt(E[2]+E[2],16),parseInt(E[3]+E[3],16)];}return null;};A.getAttribute=function(D){var F=this.getEl();if(this.patterns.color.test(D)){var G=YAHOO.util.Dom.getStyle(F,D);if(this.patterns.transparent.test(G)){var E=F.parentNode;G=B.Dom.getStyle(E,D);while(E&&this.patterns.transparent.test(G)){E=E.parentNode;G=B.Dom.getStyle(E,D);if(E.tagName.toUpperCase()=="HTML"){G="#fff";}}}}else{G=C.getAttribute.call(this,D);}return G;};A.doMethod=function(E,I,F){var H;if(this.patterns.color.test(E)){H=[];for(var G=0,D=I.length;G<D;++G){H[G]=C.doMethod.call(this,E,I[G],F[G]);}H="rgb("+Math.floor(H[0])+","+Math.floor(H[1])+","+Math.floor(H[2])+")";}else{H=C.doMethod.call(this,E,I,F);}return H;};A.setRuntimeAttribute=function(E){C.setRuntimeAttribute.call(this,E);if(this.patterns.color.test(E)){var G=this.attributes;var I=this.parseColor(this.runtimeAttributes[E].start);var F=this.parseColor(this.runtimeAttr!
 ibutes[E].end);if(typeof G[E]["to"]==="undefined"&&typeof G[E]["by"]!=="undefined"){F=this.parseColor(G[E].by);for(var H=0,D=I.length;H<D;++H){F[H]=I[H]+F[H];}}this.runtimeAttributes[E].start=I;this.runtimeAttributes[E].end=F;}};})();YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A;},easeIn:function(B,A,D,C){return D*(B/=C)*B+A;},easeOut:function(B,A,D,C){return -D*(B/=C)*(B-2)+A;},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A;}return -D/2*((--B)*(B-2)-1)+A;},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A;},easeOutStrong:function(B,A,D,C){return -D*((B=B/C-1)*B*B*B-1)+A;},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A;}return -D/2*((B-=2)*B*B*B-2)+A;},elasticIn:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return -(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;},elasticOut:function(C,A,G,F,B,E)!
 {if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}!
 if(!B||B
<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A;},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F/2)==2){return A+G;}if(!E){E=F*(0.3*1.5);}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}if(C<1){return -0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A;},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*(B/=D)*B*((C+1)*B-C)+A;},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A;},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A;}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A;},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A;},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.!
 5625*B*B)+A;}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A;}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A;}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A;},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A;}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A;}};(function(){YAHOO.util.Motion=function(G,F,H,I){if(G){YAHOO.util.Motion.superclass.constructor.call(this,G,F,H,I);}};YAHOO.extend(YAHOO.util.Motion,YAHOO.util.ColorAnim);var D=YAHOO.util;var E=D.Motion.superclass;var B=D.Motion.prototype;B.toString=function(){var F=this.getEl();var G=F.id||F.tagName;return("Motion "+G);};B.patterns.points=/^points$/i;B.setAttribute=function(F,H,G){if(this.patterns.points.test(F)){G=G||"px";E.setAttribute.call(this,"left",H[0],G);E.setAttribute.call(this,"top",H[1],G);}else{E.setAttribute.call(this,F,H,G);}};B.getAttribute=function(F){if(this.patterns.points.test(F)){var G=[E.getAttribute.call(t!
 his,"left"),E.getAttribute.call(this,"top")];}else{G=E.getAttr!
 ibute.ca
ll(this,F);}return G;};B.doMethod=function(F,J,G){var I=null;if(this.patterns.points.test(F)){var H=this.method(this.currentFrame,0,100,this.totalFrames)/100;I=D.Bezier.getPosition(this.runtimeAttributes[F],H);}else{I=E.doMethod.call(this,F,J,G);}return I;};B.setRuntimeAttribute=function(O){if(this.patterns.points.test(O)){var G=this.getEl();var I=this.attributes;var F;var K=I["points"]["control"]||[];var H;var L,N;if(K.length>0&&!(K[0] instanceof Array)){K=[K];}else{var J=[];for(L=0,N=K.length;L<N;++L){J[L]=K[L];}K=J;}if(D.Dom.getStyle(G,"position")=="static"){D.Dom.setStyle(G,"position","relative");}if(C(I["points"]["from"])){D.Dom.setXY(G,I["points"]["from"]);}else{D.Dom.setXY(G,D.Dom.getXY(G));}F=this.getAttribute("points");if(C(I["points"]["to"])){H=A.call(this,I["points"]["to"],F);var M=D.Dom.getXY(this.getEl());for(L=0,N=K.length;L<N;++L){K[L]=A.call(this,K[L],F);}}else{if(C(I["points"]["by"])){H=[F[0]+I["points"]["by"][0],F[1]+I["points"]["by"][1]];for(L=0,N=K.length!
 ;L<N;++L){K[L]=[F[0]+K[L][0],F[1]+K[L][1]];}}}this.runtimeAttributes[O]=[F];if(K.length>0){this.runtimeAttributes[O]=this.runtimeAttributes[O].concat(K);}this.runtimeAttributes[O][this.runtimeAttributes[O].length]=H;}else{E.setRuntimeAttribute.call(this,O);}};var A=function(F,H){var G=D.Dom.getXY(this.getEl());F=[F[0]-G[0]+H[0],F[1]-G[1]+H[1]];return F;};var C=function(F){return(typeof F!=="undefined");};})();(function(){YAHOO.util.Scroll=function(E,D,F,G){if(E){YAHOO.util.Scroll.superclass.constructor.call(this,E,D,F,G);}};YAHOO.extend(YAHOO.util.Scroll,YAHOO.util.ColorAnim);var B=YAHOO.util;var C=B.Scroll.superclass;var A=B.Scroll.prototype;A.toString=function(){var D=this.getEl();var E=D.id||D.tagName;return("Scroll "+E);};A.doMethod=function(D,G,E){var F=null;if(D=="scroll"){F=[this.method(this.currentFrame,G[0],E[0]-G[0],this.totalFrames),this.method(this.currentFrame,G[1],E[1]-G[1],this.totalFrames)];
-}else{F=C.doMethod.call(this,D,G,E);}return F;};A.getAttribute=function(D){var F=null;var E=this.getEl();if(D=="scroll"){F=[E.scrollLeft,E.scrollTop];}else{F=C.getAttribute.call(this,D);}return F;};A.setAttribute=function(D,G,F){var E=this.getEl();if(D=="scroll"){E.scrollLeft=G[0];E.scrollTop=G[1];}else{C.setAttribute.call(this,D,G,F);}};})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.3.1",build:"541"});
\ No newline at end of file
+}else{F=C.doMethod.call(this,D,G,E);}return F;};A.getAttribute=function(D){var F=null;var E=this.getEl();if(D=="scroll"){F=[E.scrollLeft,E.scrollTop];}else{F=C.getAttribute.call(this,D);}return F;};A.setAttribute=function(D,G,F){var E=this.getEl();if(D=="scroll"){E.scrollLeft=G[0];E.scrollTop=G[1];}else{C.setAttribute.call(this,D,G,F);}};})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/animation/animation.js
===================================================================
--- trunk/root/static/yui/animation/animation.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/animation/animation.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /*
 Copyright (c) 2006, Yahoo! Inc. All rights reserved.
@@ -322,8 +322,8 @@
             
             this.totalFrames = ( this.useSeconds ) ? Math.ceil(YAHOO.util.AnimMgr.fps * this.duration) : this.duration;
     
-            if (this.duration === 0 && this.useSeconds) {
-                this.totalFrames = 1; // jump to last frame if no duration
+            if (this.duration === 0 && this.useSeconds) { // jump to last frame if zero second duration 
+                this.totalFrames = 1; 
             }
             YAHOO.util.AnimMgr.registerElement(this);
             return true;
@@ -335,6 +335,10 @@
          * @param {Boolean} finish (optional) If true, animation will jump to final frame.
          */ 
         this.stop = function(finish) {
+            if (!this.isAnimated()) { // nothing to stop
+                return false;
+            }
+
             if (finish) {
                  this.currentFrame = this.totalFrames;
                  this._onTween.fire();
@@ -520,12 +524,12 @@
      * @private
      */
     this.unRegister = function(tween, index) {
-        tween._onComplete.fire();
         index = index || getIndex(tween);
-        if (index == -1) {
+        if (!tween.isAnimated() || index == -1) {
             return false;
         }
         
+        tween._onComplete.fire();
         queue.splice(index, 1);
 
         tweenCount -= 1;
@@ -558,9 +562,7 @@
             clearInterval(thread);
             
             for (var i = 0, len = queue.length; i < len; ++i) {
-                if ( queue[0].isAnimated() ) {
-                    this.unRegister(queue[0], 0);  
-                }
+                this.unRegister(queue[0], 0);  
             }
 
             queue = [];
@@ -1372,4 +1374,4 @@
         }
     };
 })();
-YAHOO.register("animation", YAHOO.util.Anim, {version: "2.3.1", build: "541"});
+YAHOO.register("animation", YAHOO.util.Anim, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/assets/skins/sam/autocomplete.css
===================================================================
--- trunk/root/static/yui/assets/skins/sam/autocomplete.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/assets/skins/sam/autocomplete.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 .yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%;}.yui-skin-sam .yui-ac-input{position:absolute;width:100%;}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%;}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050;}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:0.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%;}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#B3D4FF;}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426FD9;color:#FFF;}

Modified: trunk/root/static/yui/assets/skins/sam/button.css
===================================================================
--- trunk/root/static/yui/assets/skins/sam/button.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/assets/skins/sam/button.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-.yui-skin-sam .yui-button{display:-moz-inline-box;display:inline-block;}.yui-skin-sam .yui-button .first-child{display:block;*display:inline-block;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a{display:block;*display:inline-block;border:none;}.yui-skin-sam .yui-button button{background-color:transparent;*overflow:visible;cursor:pointer;}.yui-skin-sam .yui-button a{text-decoration:none;}.yui-skin-sam .yui-button{border-width:1px 0;border-style:solid;border-color:#808080;background:url(sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;*position:relative;*left:-1px;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a{padding:0 10px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20px;background-position:right center;bac!
 kground-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-focus button,.yui-skin-sam .yui-button-focus a{color:#000;}.yui-skin-sam .yui-split-button-focus button{background-image:url(split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-hover button,.yui-skin-sam .yui-button-hover a{color:#000;}.yui-skin-sam .yui-split-button-hover button{background-image:url(split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam .yui-button-active .first-chi!
 ld{border-color:#7D98B8;}.yui-skin-sam .yui-button-active butt!
 on,.yui-
skin-sam .yui-button-active a{color:#000;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sam .yui-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-menu-button-disab!
 led button{background-image:url(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);}
+.yui-button{display:-moz-inline-box;display:inline-block;vertical-align:text-bottom;}.yui-button .first-child{display:block;*display:inline-block;}.yui-button button,.yui-button a{display:block;*display:inline-block;border:none;margin:0;}.yui-button button{background-color:transparent;*overflow:visible;cursor:pointer;}.yui-button a{text-decoration:none;}.yui-skin-sam .yui-button{border-width:1px 0;border-style:solid;border-color:#808080;background:url(sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;*position:relative;*left:-1px;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a{padding:0 10px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-button a{*line-height:2;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20px;background-position:right center;backgro!
 und-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-focus button,.yui-skin-sam .yui-button-focus a{color:#000;}.yui-skin-sam .yui-split-button-focus button{background-image:url(split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-hover button,.yui-skin-sam .yui-button-hover a{color:#000;}.yui-skin-sam .yui-split-button-hover button{background-image:url(split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam .yui-button-active .first-child{b!
 order-color:#7D98B8;}.yui-skin-sam .yui-button-active button,.!
 yui-skin
-sam .yui-button-active a{color:#000;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sam .yui-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-menu-button-disabled !
 button{background-image:url(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);}

Modified: trunk/root/static/yui/assets/skins/sam/calendar.css
===================================================================
--- trunk/root/static/yui/assets/skins/sam/calendar.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/assets/skins/sam/calendar.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-.yui-calcontainer{position:relative;float:left;_overflow:hidden;}.yui-calcontainer iframe{position:absolute;border:none;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0px;top:0px;}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px;}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative;}.yui-calcontainer .title{position:relative;z-index:1;}.yui-calcontainer .close-icon{position:absolute;z-index:1;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;}.yui-calendar .calnavright{position:absolute;z-index:1;}.yui-calendar .calheader{position:relative;width:100%;text-align:center;}.yui-calendar .calbody a:hover{background:inherit;}p#clear{clear:left;padding-top:10px;}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px;}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px;}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transpar!
 ent;border:none;padding:10px 5px 10px 5px;margin:0;}.yui-skin-sam .yui-calcontainer .title{background:url(sprite.png) repeat-x 0 0;border-bottom:1px solid #cccccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left;}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px;}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0;}.yui-skin-sam .yui-calcontainer .calclose{background:url(sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:none;vertical-align:middle;}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center;}.yui-skin-sam .yui-calendar .calheader img{border:none;}.yui-skin-sam .yui-calendar .calnavleft{backgr!
 ound:url(sprite.png) no-repeat 0 -450px;width:25px;height:15px!
 ;top:0;b
ottom:0;left:-10px;margin-left:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calnavright{background:url(sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em;}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em;}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2;}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding-right:2px;}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding-left:2px;}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #cccccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap;}.yui-skin-sam .yui-calendar td.calcell a{color:#0066cc;display:block;height:100%;text-deco!
 ration:none;}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000;}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff;}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#cccccc;color:#a6a6a6;cursor:default;}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer;}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff;}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0;}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through;}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#ccff99;}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#99ccff;}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#ffcccc;}.yui!
 -skin-sam .yui-calendar td.calcell.highlight4{background-color!
 :#ccff99
;}
+.yui-calcontainer{position:relative;float:left;_overflow:hidden;}.yui-calcontainer iframe{position:absolute;border:none;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0px;top:0px;}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px;}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative;}.yui-calcontainer .title{position:relative;z-index:1;}.yui-calcontainer .close-icon{position:absolute;z-index:1;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;}.yui-calendar .calnavright{position:absolute;z-index:1;}.yui-calendar .calheader{position:relative;width:100%;text-align:center;}.yui-calcontainer .yui-cal-nav-mask{position:absolute;z-index:2;margin:0;padding:0;width:100%;height:100%;_width:0;_height:0;left:0;top:0;display:none;}.yui-calcontainer .yui-cal-nav{position:absolute;z-index:3;top:0;display:none;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{display:-moz-inline-box;display:inlin!
 e-block;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{display:block;*display:inline-block;*overflow:visible;border:none;background-color:transparent;cursor:pointer;}.yui-calendar .calbody a:hover{background:inherit;}p#clear{clear:left;padding-top:10px;}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px;}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px;}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:none;padding:10px 5px 10px 5px;margin:0;}.yui-skin-sam .yui-calcontainer .title{background:url(sprite.png) repeat-x 0 0;border-bottom:1px solid #cccccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left;}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px;}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0;}.yui-skin-sam .yui-calcontainer .calclose{background:url(sprite.png) no-repeat 0!
  -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:poin!
 ter;}.yu
i-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:none;vertical-align:middle;}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center;}.yui-skin-sam .yui-calendar .calheader img{border:none;}.yui-skin-sam .yui-calendar .calnavleft{background:url(sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calnavright{background:url(sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em;}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em;}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2;}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .y!
 ui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding-right:2px;}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding-left:2px;}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #cccccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap;}.yui-skin-sam .yui-calendar td.calcell a{color:#0066cc;display:block;height:100%;text-decoration:none;}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000;}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff;}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#cccccc;color:#a6a6a6;cursor:default;}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;co!
 lor:#fff;cursor:pointer;}.yui-skin-sam .yui-calendar td.calcel!
 l.calcel
lhover a{background-color:#426fd9;color:#fff;}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0;}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through;}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#ccff99;}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#99ccff;}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#ffcccc;}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#ccff99;}.yui-skin-sam .yui-calendar a.calnav{border:1px solid #f2f2f2;padding:0 4px;text-decoration:none;color:#000;zoom:1;}.yui-skin-sam .yui-calendar a.calnav:hover{background:url(sprite.png) repeat-x 0 0;border-color:#A0A0A0;cursor:pointer;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask{background-color:#000;opacity:0.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-calcontainer .yui-cal-nav{font-family:arial,helvetica,clean,sans-serif;font-size:93%;border:1px solid #808080;left:50%;margin-lef!
 t:-7em;width:14em;padding:0;top:2.5em;background-color:#f2f2f2;}.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav{top:4.5em;}.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav{width:16em;margin-left:-8em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{padding:5px 10px 5px 10px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{text-align:center;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-e{margin-top:5px;padding:5px;background-color:#EDF5FF;border-top:1px solid black;display:none;}.yui-skin-sam .yui-calcontainer .yui-cal-nav label{display:block;font-weight:bold;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mc{width:100%;_width:auto;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid{background-color:#FFEE69;border:1px solid #000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc{width:4em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{border:1px soli!
 d #808080;background:url(sprite.png) repeat-x 0 0;background-c!
 olor:#cc
c;margin:auto .15em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{padding:0 8px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default{border:1px solid #304369;background-color:#426fd9;background:url(sprite.png) repeat-x 0 -1400px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button{color:#fff;}

Modified: trunk/root/static/yui/assets/skins/sam/colorpicker.css
===================================================================
--- trunk/root/static/yui/assets/skins/sam/colorpicker.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/assets/skins/sam/colorpicker.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-.yui-picker-panel{background:#e3e3e3;border-color:#888;}.yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000;}.yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px;}.yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px;}.yui-picker{position:relative;}.yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute;}.yui-picker-hue-bg{-moz-outline:none;outline:0px none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px;}.yui-picker-bg{-moz-outline:none;outline:0px none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png);}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../build/colorpicker/assets/picker_mask.png',sizingMethod='scale');}.yu!
 i-picker-mask{position:absolute;z-index:1;top:0px;left:0px;}.yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px;}.yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888;}.yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888;}.yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace;}.yui-picker-controls .hd{background:transparent;border-width:0px !important;}.yui-picker-controls .bd{height:100px;border-width:0px !important;}.yui-picker-controls ul{float:left;list-style:none;padding:0 2px 0 0;margin:0}.yui-picker-controls li{padding:2px;margin:0}.yui-picker-controls input{font-size:0.85em;width:2.4em;}.yui-picker-hex-controls{clear:both;padding:2px;}.yui-picker-hex-controls input{width:4.6em;}.yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color!
 :#000;}
+.yui-picker-panel{background:#e3e3e3;border-color:#888;}.yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000;}.yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px;}.yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px;}.yui-picker{position:relative;}.yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute;}.yui-picker-hue-bg{-moz-outline:none;outline:0px none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px;}.yui-picker-bg{-moz-outline:none;outline:0px none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png);}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../build/colorpicker/assets/picker_mask.png',sizingMethod='scale');}.yu!
 i-picker-mask{position:absolute;z-index:1;top:0px;left:0px;}.yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px;}.yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888;}.yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888;}.yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace;}.yui-picker-controls .hd{background:transparent;border-width:0px !important;}.yui-picker-controls .bd{height:100px;border-width:0px !important;}.yui-picker-controls ul{float:left;padding:0 2px 0 0;margin:0}.yui-picker-controls li{padding:2px;list-style:none;margin:0}.yui-picker-controls input{font-size:0.85em;width:2.4em;}.yui-picker-hex-controls{clear:both;padding:2px;}.yui-picker-hex-controls input{width:4.6em;}.yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color!
 :#000;}

Modified: trunk/root/static/yui/assets/skins/sam/container.css
===================================================================
--- trunk/root/static/yui/assets/skins/sam/container.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/assets/skins/sam/container.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2;}.yui-panel-container form{margin:0;}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;}.yui-panel-container select{_visibility:inherit;}.masked select,.drag select,.hide-select select{_visibility:hidden;}.hide-scrollbars,.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.show-scrollbars{overflow:auto;}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible;}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto;}.yui-tt-shadow{position:absolute;}.yui-skin-sam .mask{background-color:#000;opacity:.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px 3px;}.yui-skin-sam .yui-panel{position:relative;*zoom:1;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;}.yui-skin-sam .yui-panel .hd,.yui-skin-sam !
 .yui-panel .bd,.yui-skin-sam .yui-panel .ft{*zoom:1;*position:relative;border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc;}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#F2F2F2;}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(sprite.png) repeat-x 0 -200px;}.yui-skin-sam .yui-panel .bd{padding:10px;}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%;}.yui-skin-sam .yui-panel-container.focused .yui-panel .hd{}.yui-skin-sam .container-close{position:absolute;top:5px;right:6px;width:25px;height:15px;background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px;}.yui-skin-sam .yui-panel-container.matte{padding:9px 10px;background-color:#fff;}.yui-skin-sam .yui-panel-container.shadow{_pa!
 dding:2px 5px 0 3px;}.yui-skin-sam .yui-panel-container.shadow!
  .underl
ay{position:absolute;top:2px;right:-3px;bottom:-3px;left:-3px;*top:3px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_right:0;_bottom:0;_left:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yui-dialog .ft{border-top:none;padding:0 10px 10px 10px;font-size:100%;}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right;}.yui-skin-sam .yui-dialog .ft .default{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-dialog .ft .default .first-child{border-color:#304369;}.yui-skin-sam .yui-dialog .ft .default button{color:#fff;}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left;}.yui-skin-sam .yui-simple-dialog .bd span.blckicon{background-position:0 -1100px;}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px;}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-p!
 osition:0 -1150px;}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px;}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px;}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px;}.yui-skin-sam .yui-tt .bd{position:relative;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#D4C237 #A6982B #A6982B #A6982B;border-width:1px;border-style:solid;background-color:#FFEE69;}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto;}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;*filter:alpha(opacity=12);}
+.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2;}.yui-panel-container form{margin:0;}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;}.masked select,.drag select,.hide-select select{_visibility:hidden;}.yui-panel-container select{_visibility:inherit;}.hide-scrollbars,.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.show-scrollbars{overflow:auto;}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible;}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto;}.yui-panel-container.shadow .underlay.yui-force-redraw{padding-bottom:1px;}.yui-effect-fade .underlay{display:none;}.yui-tt-shadow{position:absolute;}.yui-skin-sam .mask{background-color:#000;opacity:.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px 3px;}.yui-skin-sam .yui-panel{position:relative;*zoom:1;left:0;top!
 :0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{*zoom:1;*position:relative;border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc;}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#F2F2F2;}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(sprite.png) repeat-x 0 -200px;}.yui-skin-sam .yui-panel .bd{padding:10px;}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%;}.yui-skin-sam .yui-panel-container.focused .yui-panel .hd{}.yui-skin-sam .container-close{position:absolute;top:5px;right:6px;width:25px;height:15px;background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px;}.yui-skin-!
 sam .yui-panel-container.matte{padding:9px 10px;background-col!
 or:#fff;
}.yui-skin-sam .yui-panel-container.shadow{_padding:2px 5px 0 3px;}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;right:-3px;bottom:-3px;left:-3px;*top:3px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_right:0;_bottom:0;_left:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yui-dialog .ft{border-top:none;padding:0 10px 10px 10px;font-size:100%;}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right;}.yui-skin-sam .yui-dialog .ft button.default{font-weight:bold;}.yui-skin-sam .yui-dialog .ft span.default{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-dialog .ft span.default .first-child{border-color:#304369;}.yui-skin-sam .yui-dialog .ft span.default button{color:#fff;}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left;}.yui-skin-sam .yui-simple-dialog .b!
 d span.blckicon{background-position:0 -1100px;}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px;}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-position:0 -1150px;}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px;}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px;}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px;}.yui-skin-sam .yui-tt .bd{position:relative;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#D4C237 #A6982B #A6982B #A6982B;border-width:1px;border-style:solid;background-color:#FFEE69;}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto;}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;*filter:alpha(opacity=12);}

Modified: trunk/root/static/yui/assets/skins/sam/datatable.css
===================================================================
--- trunk/root/static/yui/assets/skins/sam/datatable.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/assets/skins/sam/datatable.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 table.yui-dt-table{table-layout:fixed;}th .yui-dt-header{position:relative;}th .yui-dt-label{position:relative;}th .yui-dt-resizer{position:absolute;margin-right:-6px;right:0;bottom:0;width:6px;height:100%;cursor:w-resize;cursor:col-resize;}.yui-dt-scrollable{*overflow-y:auto;}.yui-dt-scrollable thead{display:block;}.yui-dt-scrollable thead tr{position:relative;}.yui-dt-scrollbody{display:block;overflow:auto;}.yui-dt-editor{position:absolute;z-index:9000;}.yui-skin-sam .yui-dt-table{margin:0;padding:0;font-family:arial;font-size:inherit;border-collapse:collapse;border:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-table caption{padding-bottom:1em;text-align:left;}.yui-skin-sam .yui-dt-table th{background:url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yui-dt-table th,.yui-skin-sam .yui-dt-table th a{font-weight:normal;text-decoration:none;color:#000;vertical-align:bottom;}.yui-skin-sam .yui-dt-table th,.yui-skin-sam .yui-dt-table td{padding:4px 10px 4px 10px;border-right:1px solid #!
 CBCBCB;}.yui-skin-sam .yui-dt-table td{text-align:left;}.yui-skin-sam .yui-dt-table th.yui-dt-last,.yui-skin-sam .yui-dt-table td.yui-dt-last{border-right:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-list td{border-right:none;}.yui-skin-sam .yui-dt-table thead{border:1px solid #989898;}.yui-skin-sam .yui-dt-table tbody{border-left:1px solid #7F7F7F;border-right:1px solid #7F7F7F;border-bottom:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-loading{background-color:#FFF;}.yui-skin-sam .yui-dt-loading{background-color:#FFF;}.yui-skin-sam .yui-dt-sortable{cursor:pointer;}.yui-skin-sam th.yui-dt-sortable{padding-right:5px;}.yui-skin-sam th.yui-dt-sortable .yui-dt-label{margin-right:15px;}.yui-skin-sam th.yui-dt-asc,.yui-skin-sam th.yui-dt-desc{background:url(sprite.png) repeat-x 0 -100px;}.yui-skin-sam th.yui-dt-asc .yui-dt-header{background:url(dt-arrow-up.png) no-repeat right;}.yui-skin-sam th.yui-dt-desc .yui-dt-header{background:url(dt-arrow-dn.png) no-repeat right;}.yui-dt-editable{c!
 ursor:pointer;}.yui-dt-editor{text-align:left;background-color!
 :#F2F2F2
;border:1px solid #808080;padding:6px;}.yui-dt-editor label{padding-left:4px;padding-right:6px;}.yui-dt-editor .yui-dt-button{padding-top:6px;text-align:right;}.yui-dt-editor .yui-dt-button button{background:url(sprite.png) repeat-x 0 0;border:1px solid #999;width:4em;height:1.8em;margin-left:6px;}.yui-dt-editor .yui-dt-button button.yui-dt-default{background:url(sprite.png) repeat-x 0 -1400px;background-color:#5584E0;border:1px solid #304369;color:#FFF}.yui-dt-editor .yui-dt-button button:hover{background:url(sprite.png) repeat-x 0 -1300px;color:#000;}.yui-dt-editor .yui-dt-button button:active{background:url(sprite.png) repeat-x 0 -1700px;color:#000;}.yui-skin-sam tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam tr.yui-dt-odd{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam tr.yui-dt-odd td.yui-dt-desc{background-color:#DBEAFF!
 ;}.yui-skin-sam .yui-dt-list tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-highlighted!
 {cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam tr.yui!
 -dt-sele
cted td,.yui-skin-sam tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-selected td,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-paginator{display:block;margin:6px 0;white-space:nowrap;}.yui-skin-sam .yui-dt-paginator .yui-dt-first,.yui-skin-sam .yui-dt-paginator .yui-dt-last,.yui-skin-sam .yui-dt-paginator .yui-dt-selected{padding:2px 6px;}.yui-skin-sam .yui-dt-paginator a.yui-dt-first,.yui-skin-sam .yui-dt-paginator a.yui-dt-last{text-decoration:none;}.!
 yui-skin-sam .yui-dt-paginator .yui-dt-previous,.yui-skin-sam .yui-dt-paginator .yui-dt-next{display:none;}.yui-skin-sam a.yui-dt-page{border:1px solid #CBCBCB;padding:2px 6px;text-decoration:none;}

Modified: trunk/root/static/yui/assets/skins/sam/editor.css
===================================================================
--- trunk/root/static/yui/assets/skins/sam/editor.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/assets/skins/sam/editor.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-.yui-busy{cursor:wait !important;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear!
 :both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;height:18px;margin:.2em 0 .2em .1em;display:block;clear:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:35px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .!
 yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-too!
 lbar-con
tainer .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container !
 .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;c!
 lear:both;visibility:hidden;content:'.';height:0;}.yui-editor-!
 panel .f
t{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group-padding{}.yui-editor-panel .yui-toolbar-group-border{}.yui-editor-panel .yui-toolbar-group-textflow{}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width h3{}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:auto;}.yui-editor-panel .height-width span.info{font-size:70%;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-panel .yui-toolbar-container span!
 .yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;*top:-5px;width:24px;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{top:2px;*top:-5px;border-bot!
 tom:3px solid black;}.yui-editor-panel .yui-toolbar-bordersize!
  span a 
span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px !important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0px 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersi!
 ze-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margi!
 n:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colo!
 rs a:hov
er{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font-size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-contai!
 ner .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:.25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-top:1px solid #808080;color:#999!
 ;text-align:left;padding:0.25em;}.yui-skin-sam .yui-toolbar-co!
 ntainer 
.collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;margin:0;border-color:#808080;border-style:solid;border-width:1px 0;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:93%;line-height:2;display:block;color:#000000;overflow:hidden;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-!
 button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-fontnam!
 e{width:135px;}.yui-skin-sam .yui-toolbar-container .yui-toolb!
 ar-headi
ng{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(ed!
 itor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor!
  span.yui-toolbar-icon{background-position:0 -216px;left:5px;}!
 .yui-ski
n-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-too!
 lbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-!
 toolbar-insertunorderedlist span.yui-toolbar-icon{background-p!
 osition:
0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam!
  .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url( editor-sprite.gif ) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0px;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid!
  #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-s!
 kin-sam 
.yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yuimenu{}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:0.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel #createlink_target,.yui-skin-sam .yui-editor-panel #insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{colo!
 r:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd span.close{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:2!
 6px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-c!
 olor:#ED
F5FF;border-top:1px solid #808080;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url( editor-sprite.gif ) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url( editor-knob.gif ) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#ffffff;}.yui-editor-blankimage{background-image:url( blankimage.png );}
+.yui-busy{cursor:wait !important;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear!
 :both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;height:18px;margin:.2em 0 .2em .1em;display:block;clear:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:35px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .!
 yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-too!
 lbar-con
tainer .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container !
 .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd div.yui-editor!
 -body-cont:after{display:block;clear:both;visibility:hidden;co!
 ntent:'.
';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group-padding{}.yui-editor-panel .yui-toolbar-group-border{}.yui-editor-panel .yui-toolbar-group-textflow{}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width h3{}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:auto;}.yui-editor-panel .height-width span.info{font-size:70%;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-p!
 anel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;*top:-5px;width:24px;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersiz!
 e-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-edit!
 or-panel
 .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px !important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0px 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-borders!
 ize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflo!
 w:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px !
 solid #F
6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font-size:100%;text-align:left;}.!
 yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:.25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-!
 top:1px solid #808080;color:#999;text-align:left;padding:0.25e!
 m;}.yui-
skin-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;margin:0;border-color:#808080;border-style:solid;border-width:1px 0;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:93%;line-height:2;display:block;color:#000000;overflow:hidden;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .y!
 ui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0px;}.yui-skin-sam .yui-toolba!
 r-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .!
 yui-tool
bar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-tool!
 bar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-!
 container .yui-toolbar-forecolor span.yui-toolbar-icon{backgro!
 und-posi
tion:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;!
 left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-!
 sam .yui-toolbar-container .yui-toolbar-insertunorderedlist sp!
 an.yui-t
oolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-p!
 osition:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url( editor-sprite.gif ) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0px;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;!
 }.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;!
 border-l
eft:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yuimenu{}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:0.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel #createlink_target,.yui-skin-sam .yui-editor-panel #insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-edi!
 tor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;b!
 order:1px solid #808080;border-top:none;padding:0;margin:0 0 2!
 px 0;}.y
ui-skin-sam .yui-editor-panel .hd span.close{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url( editor-sprite.gif ) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url( editor-knob.gif ) no-repeat 0 0;}.yu!
 i-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#ffffff;}.yui-editor-blankimage{background-image:url( blankimage.png );}

Modified: trunk/root/static/yui/assets/skins/sam/logger.css
===================================================================
--- trunk/root/static/yui/assets/skins/sam/logger.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/assets/skins/sam/logger.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 .yui-skin-sam .yui-log{padding:1em;width:31em;background-color:#AAA;color:#000;border:1px solid black;font-family:monospace;font-size:77%;text-align:left;z-index:9000;}.yui-skin-sam .yui-log-container{position:absolute;top:1em;right:1em;}.yui-skin-sam .yui-log input{margin:0;padding:0;font-family:arial;font-size:100%;font-weight:normal;}.yui-skin-sam .yui-log .yui-log-btns{position:relative;float:right;bottom:.25em;}.yui-skin-sam .yui-log .yui-log-hd{margin-top:1em;padding:.5em;background-color:#575757;}.yui-skin-sam .yui-log .yui-log-hd h4{margin:0;padding:0;font-size:108%;font-weight:bold;color:#FFF;}.yui-skin-sam .yui-log .yui-log-bd{width:100%;height:20em;background-color:#FFF;border:1px solid gray;overflow:auto;}.yui-skin-sam .yui-log p{margin:1px;padding:.1em;}.yui-skin-sam .yui-log pre{margin:0;padding:0;}.yui-skin-sam .yui-log pre.yui-log-verbose{white-space:pre-wrap;white-space:-moz-pre-wrap !important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-w!
 ord;}.yui-skin-sam .yui-log .yui-log-ft{margin-top:.5em;}.yui-skin-sam .yui-log .yui-log-ft .yui-log-categoryfilters{}.yui-skin-sam .yui-log .yui-log-ft .yui-log-sourcefilters{width:100%;border-top:1px solid #575757;margin-top:.75em;padding-top:.75em;}.yui-skin-sam .yui-log .yui-log-filtergrp{margin-right:.5em;}.yui-skin-sam .yui-log .info{background-color:#A7CC25;}.yui-skin-sam .yui-log .warn{background-color:#F58516;}.yui-skin-sam .yui-log .error{background-color:#E32F0B;}.yui-skin-sam .yui-log .time{background-color:#A6C9D7;}.yui-skin-sam .yui-log .window{background-color:#F2E886;}

Modified: trunk/root/static/yui/assets/skins/sam/menu.css
===================================================================
--- trunk/root/static/yui/assets/skins/sam/menu.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/assets/skins/sam/menu.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-.yuimenu .yuimenu,.yuimenubar .yuimenu{position:absolute;visibility:hidden;}.yuimenubar li,.yuimenu li{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{white-space:nowrap;}.yui-menu-shadow{position:absolute;z-index:-1;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars{overflow:visible;}.yuimenu.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-skin-sam .yuimenubar{border:solid 1px #808080;background:url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubar .bd,.yui-skin-sam .yuimenubar ul{*zoom:1;}.yui-skin-sam .yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yui-skin-sam .yuimenubaritem{float:left;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}.yui-skin-sam .yuimenubaritem!
 label{display:block;*display:inline-block;font-size:93%;line-height:2;*line-height:1.9;padding:0 10px;color:#000;text-decoration:none;outline:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;}.yui-skin-sam .yuimenubaritemlabel .submenuindicator{width:1px;height:1px;top:0;left:0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel .submenuindicator{top:50%;right:8px;left:auto;margin-top:-3px;height:4px;width:7px;text-indent:8px;background-position:-16px -856px;}.yui-skin-sam .yuimenubaritem a.selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenubaritem a.selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubar a.selected .submenuindicator{background:transparent;}.yui-skin-sam .yuimenubarnav a.selected .submenuindicator{background:url(sprite.png) repeat-x -16p!
 x -856px;}.yui-skin-sam .yuimenubaritem a.disabled{cursor:defa!
 ult;colo
r:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritem a.disabled .submenuindicator{background-position:-16px -881px;}.yui-skin-sam .yuimenu .bd{border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-size:93%;font-weight:bold;line-height:1.5;*line-height:1.45;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .yui-menu-body-scrolled{border-color:#ccc #808080;overflow:hidden;}.yui-skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{height:16px;border:solid 1px #808080;background:#fff url(sprite.png) no-repeat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{border-bottom-width:0;background-position:center -950px;}.yui-skin-sa!
 m .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{border-top-width:0;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitemlabel{font-size:93%;line-height:1.5;*line-height:1.45;padding:0 20px;display:block;color:#000;text-decoration:none;outline:none;position:relative;*position:static;cursor:default;}.yui-skin-sam .yuimenuitemlabel .helptext{font-style:normal;display:block;margin:-1.5em 0 0 10em;*margin-top:-1.45em;}.yui-skin-sam .yuimenuitemlabel .submenuindicator,.yui-skin-sam .yuimenuitemlabel .checkedindicator,.yui-skin-sam .yuimenubaritemlabel .submenuindicator{position:absolute;overflow:hidden;background:url(sprite.png) no-repeat;}.yui-skin-sam .yuimenuitemlabel .submenuindicator,.yui-skin-sam .yuimenuitemlabel .checkedindicator{*position:static;*display:inline-block;}.yui-skin-sam .yuimenuitemlabel .submenuindicator{top!
 :50%;right:8px;margin-top:-3px;height:7px;width:4px;text-inden!
 t:5px;ba
ckground-position:0 -906px;}.yui-skin-sam .yuimenuitemlabel .checkedindicator{top:50%;left:8px;margin-top:-3px;height:7px;width:7px;text-indent:8px;background-position:0 -1006px;}.yui-skin-sam .visible .yuimenuitemlabel .submenuindicator{*float:right;*margin:-1em 8px 0 8px;}.yui-skin-sam .visible .yuimenuitem .hassubmenu{*padding-right:0;}.yui-skin-sam .visible .yuimenuitemlabel .checkedindicator{*float:left;*margin:-1em 0 0 -12px;}.yui-skin-sam .yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;opacity:.12;*filter:alpha(opacity=12);visibility:visible;}.yui-skin-sam .visible .bd,.yui-skin-sam .visible .yuimenuitem{_zoom:1;}.yui-skin-sam .visible .yuimenuitemlabel{*zoom:1;}.yui-skin-sam .yuimenuitem a.selected{background:#B3D4FF;}.yui-skin-sam .yuimenubar .yuimenuitem a.selected .submenuindicator{background:url(sprite.png) no-repeat 0 -906px;}.yui-skin-sam .yuimenubarnav .yuimenuitem a.selected{border-width:0;margin:0;*left:0;}.yui-skin-sa!
 m .yuimenuitem a.disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem a.disabled .submenuindicator{background-position:0 -931px;}.yui-skin-sam .yuimenuitem a.disabled .checkedindicator{background-position:0 -1031px;}
+.yuimenubar{visibility:visible;position:static;}.yuimenu .yuimenu,.yuimenubar .yuimenu{visibility:hidden;position:absolute;top:-10000px;left:-10000px;}.yuimenubar li,.yuimenu li{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{text-align:left;white-space:nowrap;}.yuimenubar ul{*zoom:1;}.yuimenubar .yuimenu ul{*zoom:normal;}.yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yuimenubaritem{float:left;}.yuimenubaritemlabel,.yuimenuitemlabel{display:block;}.yuimenuitemlabel .helptext{font-style:normal;display:block;margin:-1em 0 0 10em;}.yui-menu-shadow{position:absolute;visibility:hidden;z-index:-1;}.yui-skin-sam .yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;visibility:visible;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars,.yuimenubar.show-s!
 crollbars{overflow:visible;}.yuimenu.hide-scrollbars .yui-menu-shadow,.yuimenubar.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow,.yuimenubar.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-skin-sam .yuimenubar{font-size:93%;line-height:2;*line-height:1.9;border:solid 1px #808080;background:url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}.yui-skin-sam .yuimenubaritemlabel{padding:0 10px;color:#000;text-decoration:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;*position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;*display:inline-block;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu{background:url(menubaritem_submenuindicator.png) right center no-repeat;}.yui-skin-sam .yuimenubaritem-selected{background:url(sprite.png) repeat-x 0 -1700px;}.yui-skin-sam .yuimenubaritemlabel-select!
 ed{border-color:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenu!
 bariteml
abel-selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubaritemlabel-disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu-disabled{background-image:url(menubaritem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenu{font-size:93%;line-height:1.5;*line-height:1.45;}.yui-skin-sam .yuimenubar .yuimenu,.yui-skin-sam .yuimenu .yuimenu{font-size:100%;}.yui-skin-sam .yuimenu .bd{border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-weight:bold;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .yui-menu-body-scrolled{border-color:#ccc #808080;overflow:hidden;}.yui-!
 skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{height:16px;border:solid 1px #808080;background:#fff url(sprite.png) no-repeat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{border-bottom-width:0;background-position:center -950px;}.yui-skin-sam .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{border-top-width:0;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitem{_border-bottom:solid 1px #fff;}.yui-skin-sam .yuimenuitemlabel{padding:0 20px;color:#000;text-decoration:none;cursor:default;}.yui-skin-sam .yuimenuitemlabel .helptext{margin-top:-1.5em;*margin-top:-1.45em;}.yui-skin-sam .yuimenuitem-hassubmenu{background-image:url(menuitem_submenuindicator.png);background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yuimenuitem-checked{background-image:url(menuitem_checkbox.png);background-pos!
 ition:left center;background-repeat:no-repeat;}.yui-skin-sam .!
 yui-menu
-shadow-visible{background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yuimenuitem-selected{background-color:#B3D4FF;}.yui-skin-sam .yuimenuitemlabel-disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem-hassubmenu-disabled{background-image:url(menuitem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenuitem-checked-disabled{background-image:url(menuitem_checkbox_disabled.png);}

Added: trunk/root/static/yui/assets/skins/sam/menubaritem_submenuindicator.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/assets/skins/sam/menubaritem_submenuindicator.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/assets/skins/sam/menubaritem_submenuindicator_disabled.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/assets/skins/sam/menubaritem_submenuindicator_disabled.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/assets/skins/sam/menuitem_checkbox.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/assets/skins/sam/menuitem_checkbox.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/assets/skins/sam/menuitem_checkbox_disabled.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/assets/skins/sam/menuitem_checkbox_disabled.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/assets/skins/sam/menuitem_submenuindicator.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/assets/skins/sam/menuitem_submenuindicator.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/assets/skins/sam/menuitem_submenuindicator_disabled.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/assets/skins/sam/menuitem_submenuindicator_disabled.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/assets/skins/sam/simpleeditor.css
===================================================================
--- trunk/root/static/yui/assets/skins/sam/simpleeditor.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/assets/skins/sam/simpleeditor.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+.yui-busy{cursor:wait !important;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear!
 :both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;height:18px;margin:.2em 0 .2em .1em;display:block;clear:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:35px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .!
 yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-too!
 lbar-con
tainer .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container !
 .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd div.yui-editor!
 -body-cont:after{display:block;clear:both;visibility:hidden;co!
 ntent:'.
';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group-padding{}.yui-editor-panel .yui-toolbar-group-border{}.yui-editor-panel .yui-toolbar-group-textflow{}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width h3{}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:auto;}.yui-editor-panel .height-width span.info{font-size:70%;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-p!
 anel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;*top:-5px;width:24px;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersiz!
 e-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-edit!
 or-panel
 .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px !important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0px 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-borders!
 ize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflo!
 w:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px !
 solid #F
6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font-size:100%;text-align:left;}.!
 yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:.25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-!
 top:1px solid #808080;color:#999;text-align:left;padding:0.25e!
 m;}.yui-
skin-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;margin:0;border-color:#808080;border-style:solid;border-width:1px 0;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:93%;line-height:2;display:block;color:#000000;overflow:hidden;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .y!
 ui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0px;}.yui-skin-sam .yui-toolba!
 r-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .!
 yui-tool
bar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-tool!
 bar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-!
 container .yui-toolbar-forecolor span.yui-toolbar-icon{backgro!
 und-posi
tion:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;!
 left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-!
 sam .yui-toolbar-container .yui-toolbar-insertunorderedlist sp!
 an.yui-t
oolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-p!
 osition:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url( editor-sprite.gif ) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0px;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;!
 }.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;!
 border-l
eft:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yuimenu{}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:0.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel #createlink_target,.yui-skin-sam .yui-editor-panel #insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-edi!
 tor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;b!
 order:1px solid #808080;border-top:none;padding:0;margin:0 0 2!
 px 0;}.y
ui-skin-sam .yui-editor-panel .hd span.close{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url( editor-sprite.gif ) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url( editor-knob.gif ) no-repeat 0 0;}.yu!
 i-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#ffffff;}.yui-editor-blankimage{background-image:url( blankimage.png );}

Modified: trunk/root/static/yui/assets/skins/sam/skin.css
===================================================================
--- trunk/root/static/yui/assets/skins/sam/skin.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/assets/skins/sam/skin.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,17 +2,18 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 .yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%;}.yui-skin-sam .yui-ac-input{position:absolute;width:100%;}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%;}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050;}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:0.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%;}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#B3D4FF;}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426FD9;color:#FFF;}
-.yui-skin-sam .yui-button{display:-moz-inline-box;display:inline-block;}.yui-skin-sam .yui-button .first-child{display:block;*display:inline-block;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a{display:block;*display:inline-block;border:none;}.yui-skin-sam .yui-button button{background-color:transparent;*overflow:visible;cursor:pointer;}.yui-skin-sam .yui-button a{text-decoration:none;}.yui-skin-sam .yui-button{border-width:1px 0;border-style:solid;border-color:#808080;background:url(sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;*position:relative;*left:-1px;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a{padding:0 10px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20px;background-position:right center;bac!
 kground-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-focus button,.yui-skin-sam .yui-button-focus a{color:#000;}.yui-skin-sam .yui-split-button-focus button{background-image:url(split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-hover button,.yui-skin-sam .yui-button-hover a{color:#000;}.yui-skin-sam .yui-split-button-hover button{background-image:url(split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam .yui-button-active .first-chi!
 ld{border-color:#7D98B8;}.yui-skin-sam .yui-button-active butt!
 on,.yui-
skin-sam .yui-button-active a{color:#000;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sam .yui-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-menu-button-disab!
 led button{background-image:url(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);}
-.yui-calcontainer{position:relative;float:left;_overflow:hidden;}.yui-calcontainer iframe{position:absolute;border:none;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0px;top:0px;}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px;}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative;}.yui-calcontainer .title{position:relative;z-index:1;}.yui-calcontainer .close-icon{position:absolute;z-index:1;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;}.yui-calendar .calnavright{position:absolute;z-index:1;}.yui-calendar .calheader{position:relative;width:100%;text-align:center;}.yui-calendar .calbody a:hover{background:inherit;}p#clear{clear:left;padding-top:10px;}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px;}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px;}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transpar!
 ent;border:none;padding:10px 5px 10px 5px;margin:0;}.yui-skin-sam .yui-calcontainer .title{background:url(sprite.png) repeat-x 0 0;border-bottom:1px solid #cccccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left;}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px;}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0;}.yui-skin-sam .yui-calcontainer .calclose{background:url(sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:none;vertical-align:middle;}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center;}.yui-skin-sam .yui-calendar .calheader img{border:none;}.yui-skin-sam .yui-calendar .calnavleft{backgr!
 ound:url(sprite.png) no-repeat 0 -450px;width:25px;height:15px!
 ;top:0;b
ottom:0;left:-10px;margin-left:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calnavright{background:url(sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em;}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em;}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2;}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding-right:2px;}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding-left:2px;}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #cccccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap;}.yui-skin-sam .yui-calendar td.calcell a{color:#0066cc;display:block;height:100%;text-deco!
 ration:none;}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000;}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff;}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#cccccc;color:#a6a6a6;cursor:default;}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer;}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff;}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0;}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through;}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#ccff99;}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#99ccff;}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#ffcccc;}.yui!
 -skin-sam .yui-calendar td.calcell.highlight4{background-color!
 :#ccff99
;}
-.yui-picker-panel{background:#e3e3e3;border-color:#888;}.yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000;}.yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px;}.yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px;}.yui-picker{position:relative;}.yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute;}.yui-picker-hue-bg{-moz-outline:none;outline:0px none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px;}.yui-picker-bg{-moz-outline:none;outline:0px none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png);}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../build/colorpicker/assets/picker_mask.png',sizingMethod='scale');}.yu!
 i-picker-mask{position:absolute;z-index:1;top:0px;left:0px;}.yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px;}.yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888;}.yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888;}.yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace;}.yui-picker-controls .hd{background:transparent;border-width:0px !important;}.yui-picker-controls .bd{height:100px;border-width:0px !important;}.yui-picker-controls ul{float:left;list-style:none;padding:0 2px 0 0;margin:0}.yui-picker-controls li{padding:2px;margin:0}.yui-picker-controls input{font-size:0.85em;width:2.4em;}.yui-picker-hex-controls{clear:both;padding:2px;}.yui-picker-hex-controls input{width:4.6em;}.yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color!
 :#000;}
-.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2;}.yui-panel-container form{margin:0;}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;}.yui-panel-container select{_visibility:inherit;}.masked select,.drag select,.hide-select select{_visibility:hidden;}.hide-scrollbars,.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.show-scrollbars{overflow:auto;}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible;}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto;}.yui-tt-shadow{position:absolute;}.yui-skin-sam .mask{background-color:#000;opacity:.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px 3px;}.yui-skin-sam .yui-panel{position:relative;*zoom:1;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;}.yui-skin-sam .yui-panel .hd,.yui-skin-sam !
 .yui-panel .bd,.yui-skin-sam .yui-panel .ft{*zoom:1;*position:relative;border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc;}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#F2F2F2;}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(sprite.png) repeat-x 0 -200px;}.yui-skin-sam .yui-panel .bd{padding:10px;}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%;}.yui-skin-sam .yui-panel-container.focused .yui-panel .hd{}.yui-skin-sam .container-close{position:absolute;top:5px;right:6px;width:25px;height:15px;background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px;}.yui-skin-sam .yui-panel-container.matte{padding:9px 10px;background-color:#fff;}.yui-skin-sam .yui-panel-container.shadow{_pa!
 dding:2px 5px 0 3px;}.yui-skin-sam .yui-panel-container.shadow!
  .underl
ay{position:absolute;top:2px;right:-3px;bottom:-3px;left:-3px;*top:3px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_right:0;_bottom:0;_left:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yui-dialog .ft{border-top:none;padding:0 10px 10px 10px;font-size:100%;}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right;}.yui-skin-sam .yui-dialog .ft .default{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-dialog .ft .default .first-child{border-color:#304369;}.yui-skin-sam .yui-dialog .ft .default button{color:#fff;}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left;}.yui-skin-sam .yui-simple-dialog .bd span.blckicon{background-position:0 -1100px;}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px;}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-p!
 osition:0 -1150px;}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px;}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px;}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px;}.yui-skin-sam .yui-tt .bd{position:relative;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#D4C237 #A6982B #A6982B #A6982B;border-width:1px;border-style:solid;background-color:#FFEE69;}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto;}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;*filter:alpha(opacity=12);}
+.yui-button{display:-moz-inline-box;display:inline-block;vertical-align:text-bottom;}.yui-button .first-child{display:block;*display:inline-block;}.yui-button button,.yui-button a{display:block;*display:inline-block;border:none;margin:0;}.yui-button button{background-color:transparent;*overflow:visible;cursor:pointer;}.yui-button a{text-decoration:none;}.yui-skin-sam .yui-button{border-width:1px 0;border-style:solid;border-color:#808080;background:url(sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;*position:relative;*left:-1px;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a{padding:0 10px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-button a{*line-height:2;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20px;background-position:right center;backgro!
 und-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-focus button,.yui-skin-sam .yui-button-focus a{color:#000;}.yui-skin-sam .yui-split-button-focus button{background-image:url(split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-hover button,.yui-skin-sam .yui-button-hover a{color:#000;}.yui-skin-sam .yui-split-button-hover button{background-image:url(split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam .yui-button-active .first-child{b!
 order-color:#7D98B8;}.yui-skin-sam .yui-button-active button,.!
 yui-skin
-sam .yui-button-active a{color:#000;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sam .yui-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-menu-button-disabled !
 button{background-image:url(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);}
+.yui-calcontainer{position:relative;float:left;_overflow:hidden;}.yui-calcontainer iframe{position:absolute;border:none;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0px;top:0px;}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px;}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative;}.yui-calcontainer .title{position:relative;z-index:1;}.yui-calcontainer .close-icon{position:absolute;z-index:1;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;}.yui-calendar .calnavright{position:absolute;z-index:1;}.yui-calendar .calheader{position:relative;width:100%;text-align:center;}.yui-calcontainer .yui-cal-nav-mask{position:absolute;z-index:2;margin:0;padding:0;width:100%;height:100%;_width:0;_height:0;left:0;top:0;display:none;}.yui-calcontainer .yui-cal-nav{position:absolute;z-index:3;top:0;display:none;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{display:-moz-inline-box;display:inlin!
 e-block;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{display:block;*display:inline-block;*overflow:visible;border:none;background-color:transparent;cursor:pointer;}.yui-calendar .calbody a:hover{background:inherit;}p#clear{clear:left;padding-top:10px;}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px;}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px;}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:none;padding:10px 5px 10px 5px;margin:0;}.yui-skin-sam .yui-calcontainer .title{background:url(sprite.png) repeat-x 0 0;border-bottom:1px solid #cccccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left;}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px;}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0;}.yui-skin-sam .yui-calcontainer .calclose{background:url(sprite.png) no-repeat 0!
  -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:poin!
 ter;}.yu
i-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:none;vertical-align:middle;}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center;}.yui-skin-sam .yui-calendar .calheader img{border:none;}.yui-skin-sam .yui-calendar .calnavleft{background:url(sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calnavright{background:url(sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em;}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em;}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2;}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .y!
 ui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding-right:2px;}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding-left:2px;}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #cccccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap;}.yui-skin-sam .yui-calendar td.calcell a{color:#0066cc;display:block;height:100%;text-decoration:none;}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000;}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff;}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#cccccc;color:#a6a6a6;cursor:default;}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;co!
 lor:#fff;cursor:pointer;}.yui-skin-sam .yui-calendar td.calcel!
 l.calcel
lhover a{background-color:#426fd9;color:#fff;}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0;}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through;}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#ccff99;}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#99ccff;}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#ffcccc;}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#ccff99;}.yui-skin-sam .yui-calendar a.calnav{border:1px solid #f2f2f2;padding:0 4px;text-decoration:none;color:#000;zoom:1;}.yui-skin-sam .yui-calendar a.calnav:hover{background:url(sprite.png) repeat-x 0 0;border-color:#A0A0A0;cursor:pointer;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask{background-color:#000;opacity:0.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-calcontainer .yui-cal-nav{font-family:arial,helvetica,clean,sans-serif;font-size:93%;border:1px solid #808080;left:50%;margin-lef!
 t:-7em;width:14em;padding:0;top:2.5em;background-color:#f2f2f2;}.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav{top:4.5em;}.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav{width:16em;margin-left:-8em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{padding:5px 10px 5px 10px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{text-align:center;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-e{margin-top:5px;padding:5px;background-color:#EDF5FF;border-top:1px solid black;display:none;}.yui-skin-sam .yui-calcontainer .yui-cal-nav label{display:block;font-weight:bold;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mc{width:100%;_width:auto;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid{background-color:#FFEE69;border:1px solid #000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc{width:4em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{border:1px soli!
 d #808080;background:url(sprite.png) repeat-x 0 0;background-c!
 olor:#cc
c;margin:auto .15em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{padding:0 8px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default{border:1px solid #304369;background-color:#426fd9;background:url(sprite.png) repeat-x 0 -1400px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button{color:#fff;}
+.yui-picker-panel{background:#e3e3e3;border-color:#888;}.yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000;}.yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px;}.yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px;}.yui-picker{position:relative;}.yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute;}.yui-picker-hue-bg{-moz-outline:none;outline:0px none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px;}.yui-picker-bg{-moz-outline:none;outline:0px none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png);}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../build/colorpicker/assets/picker_mask.png',sizingMethod='scale');}.yu!
 i-picker-mask{position:absolute;z-index:1;top:0px;left:0px;}.yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px;}.yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888;}.yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888;}.yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace;}.yui-picker-controls .hd{background:transparent;border-width:0px !important;}.yui-picker-controls .bd{height:100px;border-width:0px !important;}.yui-picker-controls ul{float:left;padding:0 2px 0 0;margin:0}.yui-picker-controls li{padding:2px;list-style:none;margin:0}.yui-picker-controls input{font-size:0.85em;width:2.4em;}.yui-picker-hex-controls{clear:both;padding:2px;}.yui-picker-hex-controls input{width:4.6em;}.yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color!
 :#000;}
+.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2;}.yui-panel-container form{margin:0;}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;}.masked select,.drag select,.hide-select select{_visibility:hidden;}.yui-panel-container select{_visibility:inherit;}.hide-scrollbars,.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.show-scrollbars{overflow:auto;}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible;}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto;}.yui-panel-container.shadow .underlay.yui-force-redraw{padding-bottom:1px;}.yui-effect-fade .underlay{display:none;}.yui-tt-shadow{position:absolute;}.yui-skin-sam .mask{background-color:#000;opacity:.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px 3px;}.yui-skin-sam .yui-panel{position:relative;*zoom:1;left:0;top!
 :0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{*zoom:1;*position:relative;border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc;}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#F2F2F2;}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(sprite.png) repeat-x 0 -200px;}.yui-skin-sam .yui-panel .bd{padding:10px;}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%;}.yui-skin-sam .yui-panel-container.focused .yui-panel .hd{}.yui-skin-sam .container-close{position:absolute;top:5px;right:6px;width:25px;height:15px;background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px;}.yui-skin-!
 sam .yui-panel-container.matte{padding:9px 10px;background-col!
 or:#fff;
}.yui-skin-sam .yui-panel-container.shadow{_padding:2px 5px 0 3px;}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;right:-3px;bottom:-3px;left:-3px;*top:3px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_right:0;_bottom:0;_left:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yui-dialog .ft{border-top:none;padding:0 10px 10px 10px;font-size:100%;}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right;}.yui-skin-sam .yui-dialog .ft button.default{font-weight:bold;}.yui-skin-sam .yui-dialog .ft span.default{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-dialog .ft span.default .first-child{border-color:#304369;}.yui-skin-sam .yui-dialog .ft span.default button{color:#fff;}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left;}.yui-skin-sam .yui-simple-dialog .b!
 d span.blckicon{background-position:0 -1100px;}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px;}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-position:0 -1150px;}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px;}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px;}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px;}.yui-skin-sam .yui-tt .bd{position:relative;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#D4C237 #A6982B #A6982B #A6982B;border-width:1px;border-style:solid;background-color:#FFEE69;}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto;}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;*filter:alpha(opacity=12);}
 table.yui-dt-table{table-layout:fixed;}th .yui-dt-header{position:relative;}th .yui-dt-label{position:relative;}th .yui-dt-resizer{position:absolute;margin-right:-6px;right:0;bottom:0;width:6px;height:100%;cursor:w-resize;cursor:col-resize;}.yui-dt-scrollable{*overflow-y:auto;}.yui-dt-scrollable thead{display:block;}.yui-dt-scrollable thead tr{position:relative;}.yui-dt-scrollbody{display:block;overflow:auto;}.yui-dt-editor{position:absolute;z-index:9000;}.yui-skin-sam .yui-dt-table{margin:0;padding:0;font-family:arial;font-size:inherit;border-collapse:collapse;border:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-table caption{padding-bottom:1em;text-align:left;}.yui-skin-sam .yui-dt-table th{background:url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yui-dt-table th,.yui-skin-sam .yui-dt-table th a{font-weight:normal;text-decoration:none;color:#000;vertical-align:bottom;}.yui-skin-sam .yui-dt-table th,.yui-skin-sam .yui-dt-table td{padding:4px 10px 4px 10px;border-right:1px solid #!
 CBCBCB;}.yui-skin-sam .yui-dt-table td{text-align:left;}.yui-skin-sam .yui-dt-table th.yui-dt-last,.yui-skin-sam .yui-dt-table td.yui-dt-last{border-right:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-list td{border-right:none;}.yui-skin-sam .yui-dt-table thead{border:1px solid #989898;}.yui-skin-sam .yui-dt-table tbody{border-left:1px solid #7F7F7F;border-right:1px solid #7F7F7F;border-bottom:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-loading{background-color:#FFF;}.yui-skin-sam .yui-dt-loading{background-color:#FFF;}.yui-skin-sam .yui-dt-sortable{cursor:pointer;}.yui-skin-sam th.yui-dt-sortable{padding-right:5px;}.yui-skin-sam th.yui-dt-sortable .yui-dt-label{margin-right:15px;}.yui-skin-sam th.yui-dt-asc,.yui-skin-sam th.yui-dt-desc{background:url(sprite.png) repeat-x 0 -100px;}.yui-skin-sam th.yui-dt-asc .yui-dt-header{background:url(dt-arrow-up.png) no-repeat right;}.yui-skin-sam th.yui-dt-desc .yui-dt-header{background:url(dt-arrow-dn.png) no-repeat right;}.yui-dt-editable{c!
 ursor:pointer;}.yui-dt-editor{text-align:left;background-color!
 :#F2F2F2
;border:1px solid #808080;padding:6px;}.yui-dt-editor label{padding-left:4px;padding-right:6px;}.yui-dt-editor .yui-dt-button{padding-top:6px;text-align:right;}.yui-dt-editor .yui-dt-button button{background:url(sprite.png) repeat-x 0 0;border:1px solid #999;width:4em;height:1.8em;margin-left:6px;}.yui-dt-editor .yui-dt-button button.yui-dt-default{background:url(sprite.png) repeat-x 0 -1400px;background-color:#5584E0;border:1px solid #304369;color:#FFF}.yui-dt-editor .yui-dt-button button:hover{background:url(sprite.png) repeat-x 0 -1300px;color:#000;}.yui-dt-editor .yui-dt-button button:active{background:url(sprite.png) repeat-x 0 -1700px;color:#000;}.yui-skin-sam tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam tr.yui-dt-odd{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam tr.yui-dt-odd td.yui-dt-desc{background-color:#DBEAFF!
 ;}.yui-skin-sam .yui-dt-list tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-highlighted!
 {cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam tr.yui!
 -dt-sele
cted td,.yui-skin-sam tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-selected td,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-paginator{display:block;margin:6px 0;white-space:nowrap;}.yui-skin-sam .yui-dt-paginator .yui-dt-first,.yui-skin-sam .yui-dt-paginator .yui-dt-last,.yui-skin-sam .yui-dt-paginator .yui-dt-selected{padding:2px 6px;}.yui-skin-sam .yui-dt-paginator a.yui-dt-first,.yui-skin-sam .yui-dt-paginator a.yui-dt-last{text-decoration:none;}.!
 yui-skin-sam .yui-dt-paginator .yui-dt-previous,.yui-skin-sam .yui-dt-paginator .yui-dt-next{display:none;}.yui-skin-sam a.yui-dt-page{border:1px solid #CBCBCB;padding:2px 6px;text-decoration:none;}
-.yui-busy{cursor:wait !important;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear!
 :both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;height:18px;margin:.2em 0 .2em .1em;display:block;clear:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:35px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .!
 yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-too!
 lbar-con
tainer .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container !
 .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;c!
 lear:both;visibility:hidden;content:'.';height:0;}.yui-editor-!
 panel .f
t{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group-padding{}.yui-editor-panel .yui-toolbar-group-border{}.yui-editor-panel .yui-toolbar-group-textflow{}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width h3{}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:auto;}.yui-editor-panel .height-width span.info{font-size:70%;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-panel .yui-toolbar-container span!
 .yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;*top:-5px;width:24px;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{top:2px;*top:-5px;border-bot!
 tom:3px solid black;}.yui-editor-panel .yui-toolbar-bordersize!
  span a 
span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px !important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0px 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersi!
 ze-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margi!
 n:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colo!
 rs a:hov
er{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font-size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-contai!
 ner .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:.25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-top:1px solid #808080;color:#999!
 ;text-align:left;padding:0.25em;}.yui-skin-sam .yui-toolbar-co!
 ntainer 
.collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;margin:0;border-color:#808080;border-style:solid;border-width:1px 0;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:93%;line-height:2;display:block;color:#000000;overflow:hidden;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-!
 button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-fontnam!
 e{width:135px;}.yui-skin-sam .yui-toolbar-container .yui-toolb!
 ar-headi
ng{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(ed!
 itor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor!
  span.yui-toolbar-icon{background-position:0 -216px;left:5px;}!
 .yui-ski
n-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-too!
 lbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-!
 toolbar-insertunorderedlist span.yui-toolbar-icon{background-p!
 osition:
0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam!
  .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url( editor-sprite.gif ) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0px;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid!
  #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-s!
 kin-sam 
.yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yuimenu{}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:0.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel #createlink_target,.yui-skin-sam .yui-editor-panel #insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{colo!
 r:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd span.close{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:2!
 6px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-c!
 olor:#ED
F5FF;border-top:1px solid #808080;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url( editor-sprite.gif ) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url( editor-knob.gif ) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#ffffff;}.yui-editor-blankimage{background-image:url( blankimage.png );}
+.yui-busy{cursor:wait !important;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear!
 :both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;height:18px;margin:.2em 0 .2em .1em;display:block;clear:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:35px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .!
 yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-too!
 lbar-con
tainer .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container !
 .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd div.yui-editor!
 -body-cont:after{display:block;clear:both;visibility:hidden;co!
 ntent:'.
';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group-padding{}.yui-editor-panel .yui-toolbar-group-border{}.yui-editor-panel .yui-toolbar-group-textflow{}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width h3{}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:auto;}.yui-editor-panel .height-width span.info{font-size:70%;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-p!
 anel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;*top:-5px;width:24px;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersiz!
 e-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-edit!
 or-panel
 .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px !important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0px 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-borders!
 ize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflo!
 w:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px !
 solid #F
6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font-size:100%;text-align:left;}.!
 yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:.25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-!
 top:1px solid #808080;color:#999;text-align:left;padding:0.25e!
 m;}.yui-
skin-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;margin:0;border-color:#808080;border-style:solid;border-width:1px 0;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:93%;line-height:2;display:block;color:#000000;overflow:hidden;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .y!
 ui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0px;}.yui-skin-sam .yui-toolba!
 r-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .!
 yui-tool
bar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-tool!
 bar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-!
 container .yui-toolbar-forecolor span.yui-toolbar-icon{backgro!
 und-posi
tion:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;!
 left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-!
 sam .yui-toolbar-container .yui-toolbar-insertunorderedlist sp!
 an.yui-t
oolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-p!
 osition:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url( editor-sprite.gif ) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0px;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;!
 }.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;!
 border-l
eft:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yuimenu{}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:0.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel #createlink_target,.yui-skin-sam .yui-editor-panel #insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-edi!
 tor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;b!
 order:1px solid #808080;border-top:none;padding:0;margin:0 0 2!
 px 0;}.y
ui-skin-sam .yui-editor-panel .hd span.close{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url( editor-sprite.gif ) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url( editor-knob.gif ) no-repeat 0 0;}.yu!
 i-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#ffffff;}.yui-editor-blankimage{background-image:url( blankimage.png );}
 .yui-skin-sam .yui-log{padding:1em;width:31em;background-color:#AAA;color:#000;border:1px solid black;font-family:monospace;font-size:77%;text-align:left;z-index:9000;}.yui-skin-sam .yui-log-container{position:absolute;top:1em;right:1em;}.yui-skin-sam .yui-log input{margin:0;padding:0;font-family:arial;font-size:100%;font-weight:normal;}.yui-skin-sam .yui-log .yui-log-btns{position:relative;float:right;bottom:.25em;}.yui-skin-sam .yui-log .yui-log-hd{margin-top:1em;padding:.5em;background-color:#575757;}.yui-skin-sam .yui-log .yui-log-hd h4{margin:0;padding:0;font-size:108%;font-weight:bold;color:#FFF;}.yui-skin-sam .yui-log .yui-log-bd{width:100%;height:20em;background-color:#FFF;border:1px solid gray;overflow:auto;}.yui-skin-sam .yui-log p{margin:1px;padding:.1em;}.yui-skin-sam .yui-log pre{margin:0;padding:0;}.yui-skin-sam .yui-log pre.yui-log-verbose{white-space:pre-wrap;white-space:-moz-pre-wrap !important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-w!
 ord;}.yui-skin-sam .yui-log .yui-log-ft{margin-top:.5em;}.yui-skin-sam .yui-log .yui-log-ft .yui-log-categoryfilters{}.yui-skin-sam .yui-log .yui-log-ft .yui-log-sourcefilters{width:100%;border-top:1px solid #575757;margin-top:.75em;padding-top:.75em;}.yui-skin-sam .yui-log .yui-log-filtergrp{margin-right:.5em;}.yui-skin-sam .yui-log .info{background-color:#A7CC25;}.yui-skin-sam .yui-log .warn{background-color:#F58516;}.yui-skin-sam .yui-log .error{background-color:#E32F0B;}.yui-skin-sam .yui-log .time{background-color:#A6C9D7;}.yui-skin-sam .yui-log .window{background-color:#F2E886;}
-.yuimenu .yuimenu,.yuimenubar .yuimenu{position:absolute;visibility:hidden;}.yuimenubar li,.yuimenu li{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{white-space:nowrap;}.yui-menu-shadow{position:absolute;z-index:-1;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars{overflow:visible;}.yuimenu.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-skin-sam .yuimenubar{border:solid 1px #808080;background:url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubar .bd,.yui-skin-sam .yuimenubar ul{*zoom:1;}.yui-skin-sam .yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yui-skin-sam .yuimenubaritem{float:left;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}.yui-skin-sam .yuimenubaritem!
 label{display:block;*display:inline-block;font-size:93%;line-height:2;*line-height:1.9;padding:0 10px;color:#000;text-decoration:none;outline:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;}.yui-skin-sam .yuimenubaritemlabel .submenuindicator{width:1px;height:1px;top:0;left:0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel .submenuindicator{top:50%;right:8px;left:auto;margin-top:-3px;height:4px;width:7px;text-indent:8px;background-position:-16px -856px;}.yui-skin-sam .yuimenubaritem a.selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenubaritem a.selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubar a.selected .submenuindicator{background:transparent;}.yui-skin-sam .yuimenubarnav a.selected .submenuindicator{background:url(sprite.png) repeat-x -16p!
 x -856px;}.yui-skin-sam .yuimenubaritem a.disabled{cursor:defa!
 ult;colo
r:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritem a.disabled .submenuindicator{background-position:-16px -881px;}.yui-skin-sam .yuimenu .bd{border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-size:93%;font-weight:bold;line-height:1.5;*line-height:1.45;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .yui-menu-body-scrolled{border-color:#ccc #808080;overflow:hidden;}.yui-skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{height:16px;border:solid 1px #808080;background:#fff url(sprite.png) no-repeat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{border-bottom-width:0;background-position:center -950px;}.yui-skin-sa!
 m .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{border-top-width:0;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitemlabel{font-size:93%;line-height:1.5;*line-height:1.45;padding:0 20px;display:block;color:#000;text-decoration:none;outline:none;position:relative;*position:static;cursor:default;}.yui-skin-sam .yuimenuitemlabel .helptext{font-style:normal;display:block;margin:-1.5em 0 0 10em;*margin-top:-1.45em;}.yui-skin-sam .yuimenuitemlabel .submenuindicator,.yui-skin-sam .yuimenuitemlabel .checkedindicator,.yui-skin-sam .yuimenubaritemlabel .submenuindicator{position:absolute;overflow:hidden;background:url(sprite.png) no-repeat;}.yui-skin-sam .yuimenuitemlabel .submenuindicator,.yui-skin-sam .yuimenuitemlabel .checkedindicator{*position:static;*display:inline-block;}.yui-skin-sam .yuimenuitemlabel .submenuindicator{top!
 :50%;right:8px;margin-top:-3px;height:7px;width:4px;text-inden!
 t:5px;ba
ckground-position:0 -906px;}.yui-skin-sam .yuimenuitemlabel .checkedindicator{top:50%;left:8px;margin-top:-3px;height:7px;width:7px;text-indent:8px;background-position:0 -1006px;}.yui-skin-sam .visible .yuimenuitemlabel .submenuindicator{*float:right;*margin:-1em 8px 0 8px;}.yui-skin-sam .visible .yuimenuitem .hassubmenu{*padding-right:0;}.yui-skin-sam .visible .yuimenuitemlabel .checkedindicator{*float:left;*margin:-1em 0 0 -12px;}.yui-skin-sam .yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;opacity:.12;*filter:alpha(opacity=12);visibility:visible;}.yui-skin-sam .visible .bd,.yui-skin-sam .visible .yuimenuitem{_zoom:1;}.yui-skin-sam .visible .yuimenuitemlabel{*zoom:1;}.yui-skin-sam .yuimenuitem a.selected{background:#B3D4FF;}.yui-skin-sam .yuimenubar .yuimenuitem a.selected .submenuindicator{background:url(sprite.png) no-repeat 0 -906px;}.yui-skin-sam .yuimenubarnav .yuimenuitem a.selected{border-width:0;margin:0;*left:0;}.yui-skin-sa!
 m .yuimenuitem a.disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem a.disabled .submenuindicator{background-position:0 -931px;}.yui-skin-sam .yuimenuitem a.disabled .checkedindicator{background-position:0 -1031px;}
+.yuimenubar{visibility:visible;position:static;}.yuimenu .yuimenu,.yuimenubar .yuimenu{visibility:hidden;position:absolute;top:-10000px;left:-10000px;}.yuimenubar li,.yuimenu li{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{text-align:left;white-space:nowrap;}.yuimenubar ul{*zoom:1;}.yuimenubar .yuimenu ul{*zoom:normal;}.yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yuimenubaritem{float:left;}.yuimenubaritemlabel,.yuimenuitemlabel{display:block;}.yuimenuitemlabel .helptext{font-style:normal;display:block;margin:-1em 0 0 10em;}.yui-menu-shadow{position:absolute;visibility:hidden;z-index:-1;}.yui-skin-sam .yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;visibility:visible;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars,.yuimenubar.show-s!
 crollbars{overflow:visible;}.yuimenu.hide-scrollbars .yui-menu-shadow,.yuimenubar.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow,.yuimenubar.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-skin-sam .yuimenubar{font-size:93%;line-height:2;*line-height:1.9;border:solid 1px #808080;background:url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}.yui-skin-sam .yuimenubaritemlabel{padding:0 10px;color:#000;text-decoration:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;*position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;*display:inline-block;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu{background:url(menubaritem_submenuindicator.png) right center no-repeat;}.yui-skin-sam .yuimenubaritem-selected{background:url(sprite.png) repeat-x 0 -1700px;}.yui-skin-sam .yuimenubaritemlabel-select!
 ed{border-color:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenu!
 bariteml
abel-selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubaritemlabel-disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu-disabled{background-image:url(menubaritem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenu{font-size:93%;line-height:1.5;*line-height:1.45;}.yui-skin-sam .yuimenubar .yuimenu,.yui-skin-sam .yuimenu .yuimenu{font-size:100%;}.yui-skin-sam .yuimenu .bd{border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-weight:bold;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .yui-menu-body-scrolled{border-color:#ccc #808080;overflow:hidden;}.yui-!
 skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{height:16px;border:solid 1px #808080;background:#fff url(sprite.png) no-repeat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{border-bottom-width:0;background-position:center -950px;}.yui-skin-sam .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{border-top-width:0;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitem{_border-bottom:solid 1px #fff;}.yui-skin-sam .yuimenuitemlabel{padding:0 20px;color:#000;text-decoration:none;cursor:default;}.yui-skin-sam .yuimenuitemlabel .helptext{margin-top:-1.5em;*margin-top:-1.45em;}.yui-skin-sam .yuimenuitem-hassubmenu{background-image:url(menuitem_submenuindicator.png);background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yuimenuitem-checked{background-image:url(menuitem_checkbox.png);background-pos!
 ition:left center;background-repeat:no-repeat;}.yui-skin-sam .!
 yui-menu
-shadow-visible{background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yuimenuitem-selected{background-color:#B3D4FF;}.yui-skin-sam .yuimenuitemlabel-disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem-hassubmenu-disabled{background-image:url(menuitem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenuitem-checked-disabled{background-image:url(menuitem_checkbox_disabled.png);}
+.yui-busy{cursor:wait !important;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear!
 :both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;height:18px;margin:.2em 0 .2em .1em;display:block;clear:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:35px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .!
 yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-too!
 lbar-con
tainer .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container !
 .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd div.yui-editor!
 -body-cont:after{display:block;clear:both;visibility:hidden;co!
 ntent:'.
';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group-padding{}.yui-editor-panel .yui-toolbar-group-border{}.yui-editor-panel .yui-toolbar-group-textflow{}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width h3{}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:auto;}.yui-editor-panel .height-width span.info{font-size:70%;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-p!
 anel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;*top:-5px;width:24px;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersiz!
 e-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-edit!
 or-panel
 .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px !important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0px 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-borders!
 ize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflo!
 w:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px !
 solid #F
6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font-size:100%;text-align:left;}.!
 yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:.25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-!
 top:1px solid #808080;color:#999;text-align:left;padding:0.25e!
 m;}.yui-
skin-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;margin:0;border-color:#808080;border-style:solid;border-width:1px 0;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:93%;line-height:2;display:block;color:#000000;overflow:hidden;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .y!
 ui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0px;}.yui-skin-sam .yui-toolba!
 r-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .!
 yui-tool
bar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-tool!
 bar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-!
 container .yui-toolbar-forecolor span.yui-toolbar-icon{backgro!
 und-posi
tion:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;!
 left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-!
 sam .yui-toolbar-container .yui-toolbar-insertunorderedlist sp!
 an.yui-t
oolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-p!
 osition:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url( editor-sprite.gif ) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0px;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;!
 }.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;!
 border-l
eft:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yuimenu{}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:0.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel #createlink_target,.yui-skin-sam .yui-editor-panel #insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-edi!
 tor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;b!
 order:1px solid #808080;border-top:none;padding:0;margin:0 0 2!
 px 0;}.y
ui-skin-sam .yui-editor-panel .hd span.close{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url( editor-sprite.gif ) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url( editor-knob.gif ) no-repeat 0 0;}.yu!
 i-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#ffffff;}.yui-editor-blankimage{background-image:url( blankimage.png );}
 .yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{margin:0 0.5em 0 0;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{margin:0 0 0.5em;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{width:6em;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{width:auto;}.yui-navset .yui-navset-left,.yui-navset-left{padding:0 0 0 6em;}.yui-navset-right{padding:0 6em 0 0;}.yui-navset-top,.yui-navset-bottom{padding:auto;}.yui-nav,.yui-nav li{margin:0;padding:0;list-style:none;}.yui-navset li em{font-style:normal;}.yui-navset{position:relative;zoom:1;}.yui-navset .yui-content{zoom:1;}.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{display:inline-block;display:-moz-inline-stack;*display:inline;vertical-align:bottom;cursor:pointer;zoom:1;}.yui-navset-left .yui-nav li,.yui-navset-right !
 .yui-nav li{display:block;}.yui-navset .yui-nav a{position:relative;}.yui-navset .yui-nav li a,.yui-navset-top .yui-nav li a,.yui-navset-bottom .yui-nav li a{display:block;display:inline-block;vertical-align:bottom;zoom:1;}.yui-navset-left .yui-nav li a,.yui-navset-right .yui-nav li a{display:block;}.yui-navset-bottom .yui-nav li a{vertical-align:text-top;}.yui-navset .yui-nav li a em,.yui-navset-top .yui-nav li a em,.yui-navset-bottom .yui-nav li a em{display:block;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{position:absolute;z-index:1;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{position:static;}.yui-navset .yui-navset-left .yui-nav,.yui-navset-left .yui-nav{left:0;right:auto;}.yui-navset .yui-navset-right .yui-nav,.yui-navset-right .yui-nav{right:0;left:auto;}.yui-skin-sam .yui-navset .yui-nav,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav{border:solid #2647a0;border-width!
 :0 0 5px;Xposition:relative;zoom:1;}.yui-skin-sam .yui-navset !
 .yui-nav
 li,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav li{margin:0 0.16em 0 0;padding:1px 0 0;zoom:1;}.yui-skin-sam .yui-navset .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav .selected{margin:0 0.16em -1px 0;}.yui-skin-sam .yui-navset .yui-nav a,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a{background:#d8d8d8 url(sprite.png) repeat-x;border:solid #a3a3a3;border-width:0 1px;color:#000;position:relative;text-decoration:none;}.yui-skin-sam .yui-navset .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a em{border:solid #a3a3a3;border-width:1px 0 0;cursor:hand;padding:0.25em .75em;left:0;right:0;bottom:0;top:-1px;position:relative;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a:focus,.yui-skin-sam .yui-navset .yui-nav .selected a:hover{background:#2647a0 url(sprite.png) repeat-x left -1400px;color:#fff;}.yui-skin-sam .yui-navset .yui-nav a:hover,.yui-skin-sam .yui-navset .yui-nav a:focus{b!
 ackground:#bfdaff url(sprite.png) repeat-x left -1300px;outline:0;}.yui-skin-sam .yui-navset .yui-nav .selected a em{padding:0.35em 0.75em;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a em{border-color:#243356;}.yui-skin-sam .yui-navset .yui-content{background:#edf5ff;}.yui-skin-sam .yui-navset .yui-content,.yui-skin-sam .yui-navset .yui-navset-top .yui-content{border:1px solid #808080;border-top-color:#243356;padding:0.25em 0.5em;}.yui-skin-sam .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 5px 0 0;Xposition:absolute;top:0;bottom:0;}.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 0 0 5px;}.yui-skin-sam .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset-right .yui-nav li{!
 margin:0 0 0.16em;padding:0 0 0 1px;}.yui-skin-sam .yui-navset!
 -right .
yui-nav li{padding:0 1px 0 0;}.yui-skin-sam .yui-navset-left .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav .selected{margin:0 -1px 0.16em 0;}.yui-skin-sam .yui-navset-right .yui-nav .selected{margin:0 0 0.16em -1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav a{border-width:1px 0;}.yui-skin-sam .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 0 0 1px;padding:0.2em .75em;top:auto;left:-1px;}.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 1px 0 0;left:auto;right:-1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-left .yui-nav .selected a,.yui-skin-sam .yui-navset-left .yui-nav a:hover,.yui-skin-sam .yui-navset-right .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav .selected a,.yui-skin-sam .yui-navset-right .yui-nav a:hover,.yui-skin-sam .yui-navset-bottom .yui-nav a,.yui-skin-!
 sam .yui-navset-bottom .yui-nav .selected a,.yui-skin-sam .yui-navset-bottom .yui-nav a:hover{background-image:none;}.yui-skin-sam .yui-navset-left .yui-content{border:1px solid #808080;border-left-color:#243356;}.yui-skin-sam .yui-navset-bottom .yui-nav,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav{border-width:5px 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav .selected,.yui-skin-sam .yui-navset-bottom .yui-nav .selected{margin:-1px 0.16em 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li,.yui-skin-sam .yui-navset-bottom .yui-nav li{padding:0 0 1px 0;vertical-align:top;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li a,.yui-skin-sam .yui-navset-bottom .yui-nav li a{}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav a em,.yui-skin-sam .yui-navset-bottom .yui-nav a em{border-width:0 0 1px;top:auto;bottom:-1px;}.yui-skin-sam .yui-navset-bottom .yui-content,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-content{border:1px solid !
 #808080;border-bottom-color:#243356;}
-.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat;}.ygtvtmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat;}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat;}.ygtvtph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat;}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0px no-repeat;}.ygtvlmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat;}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -2400px no-repeat;}.ygtvlph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px !
 no-repeat;}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat;}.ygtvdepthcell{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8000px no-repeat;}.ygtvblankdepthcell{width:18px;height:22px;}.ygtvitem{}.ygtvchildren{*zoom:1;}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;}.ygtvspacer{height:22px;width:18px;}
+.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat;}.ygtvtmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat;}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat;}.ygtvtph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat;}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0px no-repeat;}.ygtvlmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat;}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -2400px no-repeat;}.ygtvlph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px !
 no-repeat;}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat;}.ygtvdepthcell{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8000px no-repeat;}.ygtvblankdepthcell{width:18px;height:22px;}.ygtvitem{}.ygtvchildren{*zoom:1;}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;}.ygtvspacer{height:22px;width:12px;}
 

Modified: trunk/root/static/yui/assets/skins/sam/tabview.css
===================================================================
--- trunk/root/static/yui/assets/skins/sam/tabview.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/assets/skins/sam/tabview.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 .yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{margin:0 0.5em 0 0;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{margin:0 0 0.5em;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{width:6em;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{width:auto;}.yui-navset .yui-navset-left,.yui-navset-left{padding:0 0 0 6em;}.yui-navset-right{padding:0 6em 0 0;}.yui-navset-top,.yui-navset-bottom{padding:auto;}.yui-nav,.yui-nav li{margin:0;padding:0;list-style:none;}.yui-navset li em{font-style:normal;}.yui-navset{position:relative;zoom:1;}.yui-navset .yui-content{zoom:1;}.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{display:inline-block;display:-moz-inline-stack;*display:inline;vertical-align:bottom;cursor:pointer;zoom:1;}.yui-navset-left .yui-nav li,.yui-navset-right !
 .yui-nav li{display:block;}.yui-navset .yui-nav a{position:relative;}.yui-navset .yui-nav li a,.yui-navset-top .yui-nav li a,.yui-navset-bottom .yui-nav li a{display:block;display:inline-block;vertical-align:bottom;zoom:1;}.yui-navset-left .yui-nav li a,.yui-navset-right .yui-nav li a{display:block;}.yui-navset-bottom .yui-nav li a{vertical-align:text-top;}.yui-navset .yui-nav li a em,.yui-navset-top .yui-nav li a em,.yui-navset-bottom .yui-nav li a em{display:block;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{position:absolute;z-index:1;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{position:static;}.yui-navset .yui-navset-left .yui-nav,.yui-navset-left .yui-nav{left:0;right:auto;}.yui-navset .yui-navset-right .yui-nav,.yui-navset-right .yui-nav{right:0;left:auto;}.yui-skin-sam .yui-navset .yui-nav,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav{border:solid #2647a0;border-width!
 :0 0 5px;Xposition:relative;zoom:1;}.yui-skin-sam .yui-navset !
 .yui-nav
 li,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav li{margin:0 0.16em 0 0;padding:1px 0 0;zoom:1;}.yui-skin-sam .yui-navset .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav .selected{margin:0 0.16em -1px 0;}.yui-skin-sam .yui-navset .yui-nav a,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a{background:#d8d8d8 url(sprite.png) repeat-x;border:solid #a3a3a3;border-width:0 1px;color:#000;position:relative;text-decoration:none;}.yui-skin-sam .yui-navset .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a em{border:solid #a3a3a3;border-width:1px 0 0;cursor:hand;padding:0.25em .75em;left:0;right:0;bottom:0;top:-1px;position:relative;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a:focus,.yui-skin-sam .yui-navset .yui-nav .selected a:hover{background:#2647a0 url(sprite.png) repeat-x left -1400px;color:#fff;}.yui-skin-sam .yui-navset .yui-nav a:hover,.yui-skin-sam .yui-navset .yui-nav a:focus{b!
 ackground:#bfdaff url(sprite.png) repeat-x left -1300px;outline:0;}.yui-skin-sam .yui-navset .yui-nav .selected a em{padding:0.35em 0.75em;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a em{border-color:#243356;}.yui-skin-sam .yui-navset .yui-content{background:#edf5ff;}.yui-skin-sam .yui-navset .yui-content,.yui-skin-sam .yui-navset .yui-navset-top .yui-content{border:1px solid #808080;border-top-color:#243356;padding:0.25em 0.5em;}.yui-skin-sam .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 5px 0 0;Xposition:absolute;top:0;bottom:0;}.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 0 0 5px;}.yui-skin-sam .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset-right .yui-nav li{!
 margin:0 0 0.16em;padding:0 0 0 1px;}.yui-skin-sam .yui-navset!
 -right .
yui-nav li{padding:0 1px 0 0;}.yui-skin-sam .yui-navset-left .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav .selected{margin:0 -1px 0.16em 0;}.yui-skin-sam .yui-navset-right .yui-nav .selected{margin:0 0 0.16em -1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav a{border-width:1px 0;}.yui-skin-sam .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 0 0 1px;padding:0.2em .75em;top:auto;left:-1px;}.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 1px 0 0;left:auto;right:-1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-left .yui-nav .selected a,.yui-skin-sam .yui-navset-left .yui-nav a:hover,.yui-skin-sam .yui-navset-right .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav .selected a,.yui-skin-sam .yui-navset-right .yui-nav a:hover,.yui-skin-sam .yui-navset-bottom .yui-nav a,.yui-skin-!
 sam .yui-navset-bottom .yui-nav .selected a,.yui-skin-sam .yui-navset-bottom .yui-nav a:hover{background-image:none;}.yui-skin-sam .yui-navset-left .yui-content{border:1px solid #808080;border-left-color:#243356;}.yui-skin-sam .yui-navset-bottom .yui-nav,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav{border-width:5px 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav .selected,.yui-skin-sam .yui-navset-bottom .yui-nav .selected{margin:-1px 0.16em 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li,.yui-skin-sam .yui-navset-bottom .yui-nav li{padding:0 0 1px 0;vertical-align:top;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li a,.yui-skin-sam .yui-navset-bottom .yui-nav li a{}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav a em,.yui-skin-sam .yui-navset-bottom .yui-nav a em{border-width:0 0 1px;top:auto;bottom:-1px;}.yui-skin-sam .yui-navset-bottom .yui-content,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-content{border:1px solid !
 #808080;border-bottom-color:#243356;}

Modified: trunk/root/static/yui/assets/skins/sam/treeview.css
===================================================================
--- trunk/root/static/yui/assets/skins/sam/treeview.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/assets/skins/sam/treeview.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat;}.ygtvtmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat;}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat;}.ygtvtph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat;}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0px no-repeat;}.ygtvlmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat;}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -2400px no-repeat;}.ygtvlph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px !
 no-repeat;}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat;}.ygtvdepthcell{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8000px no-repeat;}.ygtvblankdepthcell{width:18px;height:22px;}.ygtvitem{}.ygtvchildren{*zoom:1;}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;}.ygtvspacer{height:22px;width:18px;}
+.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat;}.ygtvtmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat;}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat;}.ygtvtph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat;}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0px no-repeat;}.ygtvlmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat;}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -2400px no-repeat;}.ygtvlph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px !
 no-repeat;}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat;}.ygtvdepthcell{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8000px no-repeat;}.ygtvblankdepthcell{width:18px;height:22px;}.ygtvitem{}.ygtvchildren{*zoom:1;}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;}.ygtvspacer{height:22px;width:12px;}

Modified: trunk/root/static/yui/assets/skins/sam/yuitest.css
===================================================================
--- trunk/root/static/yui/assets/skins/sam/yuitest.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/assets/skins/sam/yuitest.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 

Modified: trunk/root/static/yui/autocomplete/README
===================================================================
--- trunk/root/static/yui/autocomplete/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/autocomplete/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,24 @@
 AutoComplete Release Notes
 
+*** version 2.4.1 ***
+
+* No change
+
+*** version 2.4.0 ***
+
+* Support for YUI JSON Utility.
+
+* The allowBrowserAutocomplete property now supports cases when the user navigates
+away from page via mean other than a form submission.
+
+* Added support for integration with the Get Utility, for proxyless data
+retrieval from dynamically loaded script nodes.
+
+* Typing 'Enter' to select item no longer causes automatic form submission on
+Mac browsers.
+
+
+
 *** version 2.3.1 ***
 
 * AutoComplete no longer throw a JavaScript error due to an invalid or

Modified: trunk/root/static/yui/autocomplete/assets/autocomplete-core.css
===================================================================
--- trunk/root/static/yui/autocomplete/assets/autocomplete-core.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/autocomplete/assets/autocomplete-core.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* This file intentionally left blank */

Modified: trunk/root/static/yui/autocomplete/assets/skins/sam/autocomplete-skin.css
===================================================================
--- trunk/root/static/yui/autocomplete/assets/skins/sam/autocomplete-skin.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/autocomplete/assets/skins/sam/autocomplete-skin.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* styles for entire widget */
 .yui-skin-sam .yui-ac {

Modified: trunk/root/static/yui/autocomplete/assets/skins/sam/autocomplete.css
===================================================================
--- trunk/root/static/yui/autocomplete/assets/skins/sam/autocomplete.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/autocomplete/assets/skins/sam/autocomplete.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 .yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%;}.yui-skin-sam .yui-ac-input{position:absolute;width:100%;}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%;}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050;}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:0.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%;}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#B3D4FF;}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426FD9;color:#FFF;}

Modified: trunk/root/static/yui/autocomplete/autocomplete-debug.js
===================================================================
--- trunk/root/static/yui/autocomplete/autocomplete-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/autocomplete/autocomplete-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
  /**
  * The AutoComplete control provides the front-end logic for text-entry suggestion and
@@ -126,10 +126,8 @@
         YAHOO.util.Event.addListener(oContent,"mouseout",oSelf._onContainerMouseout,oSelf);
         YAHOO.util.Event.addListener(oContent,"scroll",oSelf._onContainerScroll,oSelf);
         YAHOO.util.Event.addListener(oContent,"resize",oSelf._onContainerResize,oSelf);
-        if(oTextbox.form) {
-            YAHOO.util.Event.addListener(oTextbox.form,"submit",oSelf._onFormSubmit,oSelf);
-        }
         YAHOO.util.Event.addListener(oTextbox,"keypress",oSelf._onTextboxKeyPress,oSelf);
+        YAHOO.util.Event.addListener(window,"unload",oSelf._onWindowUnload,oSelf);
 
         // Custom events
         this.textboxFocusEvent = new YAHOO.util.CustomEvent("textboxFocus", this);
@@ -1929,17 +1927,20 @@
             }
             break;
         case 13: // enter
-            if(oSelf._oCurItem) {
-                if(oSelf._nKeyCode != nKeyCode) {
-                    if(oSelf._bContainerOpen) {
-                        YAHOO.util.Event.stopEvent(v);
+            var isMac = (navigator.userAgent.toLowerCase().indexOf("mac") != -1);
+            if(!isMac) {
+                if(oSelf._oCurItem) {
+                    if(oSelf._nKeyCode != nKeyCode) {
+                        if(oSelf._bContainerOpen) {
+                            YAHOO.util.Event.stopEvent(v);
+                        }
                     }
+                    oSelf._selectItem(oSelf._oCurItem);
                 }
-                oSelf._selectItem(oSelf._oCurItem);
+                else {
+                    oSelf._toggleContainer(false);
+                }
             }
-            else {
-                oSelf._toggleContainer(false);
-            }
             break;
         case 27: // esc
             oSelf._toggleContainer(false);
@@ -1988,7 +1989,11 @@
                             YAHOO.util.Event.stopEvent(v);
                         }
                     }
+                    oSelf._selectItem(oSelf._oCurItem);
                 }
+                else {
+                    oSelf._toggleContainer(false);
+                }
                 break;
             case 38: // up
             case 40: // down
@@ -2115,20 +2120,17 @@
 };
 
 /**
- * Handles form submission event.
+ * Handles window unload event.
  *
- * @method _onFormSubmit
- * @param v {HTMLEvent} The submit event.
+ * @method _onWindowUnload
+ * @param v {HTMLEvent} The unload event.
  * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
  * @private
  */
-YAHOO.widget.AutoComplete.prototype._onFormSubmit = function(v,oSelf) {
-    if(oSelf.allowBrowserAutocomplete) {
+YAHOO.widget.AutoComplete.prototype._onWindowUnload = function(v,oSelf) {
+    if(oSelf && oSelf._oTextbox && oSelf.allowBrowserAutocomplete) {
         oSelf._oTextbox.setAttribute("autocomplete","on");
     }
-    else {
-        oSelf._oTextbox.setAttribute("autocomplete","off");
-    }
 };
 
 /****************************************************************************/
@@ -2876,6 +2878,25 @@
                    }
                 }
             }
+            // Check for YUI JSON lib but divert KHTML clients
+            else if(YAHOO.lang.JSON && isNotMac) {
+                // Use the JSON utility if available
+                jsonObjParsed = YAHOO.lang.JSON.parse(oResponse);
+                if(!jsonObjParsed) {
+                    bError = true;
+                    break;
+                }
+                else {
+                    try {
+                        // eval is necessary here since aSchema[0] is of unknown depth
+                        jsonList = eval("jsonObjParsed." + aSchema[0]);
+                    }
+                    catch(e) {
+                        bError = true;
+                        break;
+                   }
+                }
+            }
             else if(window.JSON && isNotMac) {
                 // Use older JSON lib if available
                 jsonObjParsed = JSON.parse(oResponse);
@@ -2939,7 +2960,7 @@
             if(!YAHOO.lang.isArray(jsonList)) {
                 jsonList = [jsonList];
             }
-            
+
             // Loop through the array of all responses...
             for(var i = jsonList.length-1; i >= 0 ; i--) {
                 var aResultItem = [];
@@ -3051,6 +3072,293 @@
 /****************************************************************************/
 
 /**
+ * Implementation of YAHOO.widget.DataSource using the Get Utility to generate
+ * dynamic SCRIPT nodes for data retrieval.
+ *
+ * @class DS_ScriptNode
+ * @constructor
+ * @extends YAHOO.widget.DataSource
+ * @param sUri {String} URI to the script location that will return data.
+ * @param aSchema {String[]} Data schema definition of results.
+ * @param oConfigs {Object} (optional) Object literal of config params.
+ */
+YAHOO.widget.DS_ScriptNode = function(sUri, aSchema, oConfigs) {
+    // Set any config params passed in to override defaults
+    if(oConfigs && (oConfigs.constructor == Object)) {
+        for(var sConfig in oConfigs) {
+            this[sConfig] = oConfigs[sConfig];
+        }
+    }
+
+    // Initialization sequence
+    if(!YAHOO.lang.isArray(aSchema) || !YAHOO.lang.isString(sUri)) {
+        YAHOO.log("Could not instantiate Script Node DataSource due to invalid arguments", "error", this.toString());
+        return;
+    }
+
+    this.schema = aSchema;
+    this.scriptURI = sUri;
+
+    this._init();
+    YAHOO.log("Script Node DataSource initialized","info",this.toString());
+};
+
+YAHOO.widget.DS_ScriptNode.prototype = new YAHOO.widget.DataSource();
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Public member variables
+//
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Alias to YUI Get Utility. Allows implementers to specify their own
+ * subclasses of the YUI Get Utility.
+ *
+ * @property getUtility
+ * @type Object
+ * @default YAHOO.util.Get
+ */
+YAHOO.widget.DS_ScriptNode.prototype.getUtility = YAHOO.util.Get;
+
+/**
+ * URI to the script that returns data.
+ *
+ * @property scriptURI
+ * @type String
+ */
+YAHOO.widget.DS_ScriptNode.prototype.scriptURI = null;
+
+/**
+ * Query string parameter name sent to scriptURI. For instance, requests will be
+ * sent to <scriptURI>?<scriptQueryParam>=queryString
+ *
+ * @property scriptQueryParam
+ * @type String
+ * @default "query"
+ */
+YAHOO.widget.DS_ScriptNode.prototype.scriptQueryParam = "query";
+
+/**
+ * Defines request/response management in the following manner:
+ * <dl>
+ *     <!--<dt>queueRequests</dt>
+ *     <dd>If a request is already in progress, wait until response is returned before sending the next request.</dd>
+ *     <dt>cancelStaleRequests</dt>
+ *     <dd>If a request is already in progress, cancel it before sending the next request.</dd>-->
+ *     <dt>ignoreStaleResponses</dt>
+ *     <dd>Send all requests, but handle only the response for the most recently sent request.</dd>
+ *     <dt>allowAll</dt>
+ *     <dd>Send all requests and handle all responses.</dd>
+ * </dl>
+ *
+ * @property asyncMode
+ * @type String
+ * @default "allowAll"
+ */
+YAHOO.widget.DS_ScriptNode.prototype.asyncMode = "allowAll";
+
+/**
+ * Callback string parameter name sent to scriptURI. For instance, requests will be
+ * sent to <scriptURI>?<scriptCallbackParam>=callbackFunction
+ *
+ * @property scriptCallbackParam
+ * @type String
+ * @default "callback"
+ */
+YAHOO.widget.DS_ScriptNode.prototype.scriptCallbackParam = "callback";
+
+/**
+ * Global array of callback functions, one for each request sent.
+ *
+ * @property callbacks
+ * @type Function[]
+ * @static
+ */
+YAHOO.widget.DS_ScriptNode.callbacks = [];
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Private member variables
+//
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Unique ID to track requests.
+ *
+ * @property _nId
+ * @type Number
+ * @private
+ * @static
+ */
+YAHOO.widget.DS_ScriptNode._nId = 0;
+
+/**
+ * Counter for pending requests. When this is 0, it is safe to purge callbacks
+ * array.
+ *
+ * @property _nPending
+ * @type Number
+ * @private
+ * @static
+ */
+YAHOO.widget.DS_ScriptNode._nPending = 0;
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Public methods
+//
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Queries the live data source. Results are passed back to a callback function.
+ *
+ * @method doQuery
+ * @param oCallbackFn {HTMLFunction} Callback function defined by oParent object to which to return results.
+ * @param sQuery {String} Query string.
+ * @param oParent {Object} The object instance that has requested data.
+ */
+YAHOO.widget.DS_ScriptNode.prototype.doQuery = function(oCallbackFn, sQuery, oParent) {
+    var oSelf = this;
+    
+    // If there are no global pending requests, it is safe to purge global callback stack and global counter
+    if(YAHOO.widget.DS_ScriptNode._nPending === 0) {
+        YAHOO.widget.DS_ScriptNode.callbacks = [];
+        YAHOO.widget.DS_ScriptNode._nId = 0;
+    }
+    
+    // ID for this request
+    var id = YAHOO.widget.DS_ScriptNode._nId;
+    YAHOO.widget.DS_ScriptNode._nId++;
+
+    // Dynamically add handler function with a closure to the callback stack
+    YAHOO.widget.DS_ScriptNode.callbacks[id] = function(oResponse) {
+        if((oSelf.asyncMode !== "ignoreStaleResponses")||
+                (id === YAHOO.widget.DS_ScriptNode.callbacks.length-1)) { // Must ignore stale responses
+            oSelf.handleResponse(oResponse, oCallbackFn, sQuery, oParent);
+        }
+        else {
+            YAHOO.log("DataSource ignored stale response for " + sQuery, "info", oSelf.toString());
+        }
+
+        delete YAHOO.widget.DS_ScriptNode.callbacks[id];
+    };
+
+    // We are now creating a request
+    YAHOO.widget.DS_ScriptNode._nPending++;
+
+    var sUri = this.scriptURI+"&"+ this.scriptQueryParam+"="+sQuery+"&"+
+            this.scriptCallbackParam+"=YAHOO.widget.DS_ScriptNode.callbacks["+id+"]";
+    YAHOO.log("DataSource is querying URL " + sUri, "info", this.toString());
+    this.getUtility.script(sUri,
+            {autopurge:true,
+            onsuccess:YAHOO.widget.DS_ScriptNode._bumpPendingDown,
+            onfail:YAHOO.widget.DS_ScriptNode._bumpPendingDown});
+};
+
+/**
+ * Parses JSON response data into an array of result objects and passes it to
+ * the callback function.
+ *
+ * @method handleResponse
+ * @param oResponse {Object} The raw response data to parse.
+ * @param oCallbackFn {HTMLFunction} Callback function defined by oParent object to which to return results.
+ * @param sQuery {String} Query string.
+ * @param oParent {Object} The object instance that has requested data.
+ */
+YAHOO.widget.DS_ScriptNode.prototype.handleResponse = function(oResponse, oCallbackFn, sQuery, oParent) {
+    var aSchema = this.schema;
+    var aResults = [];
+    var bError = false;
+
+    var jsonList, jsonObjParsed;
+
+    // Parse the JSON response as a string
+    try {
+        // Grab the object member that contains an array of all reponses...
+        // ...eval is necessary here since aSchema[0] is of unknown depth
+        jsonList = eval("(oResponse." + aSchema[0]+")");
+    }
+    catch(e) {
+        bError = true;
+   }
+
+    if(!jsonList) {
+        bError = true;
+        jsonList = [];
+    }
+
+    else if(!YAHOO.lang.isArray(jsonList)) {
+        jsonList = [jsonList];
+    }
+
+    // Loop through the array of all responses...
+    for(var i = jsonList.length-1; i >= 0 ; i--) {
+        var aResultItem = [];
+        var jsonResult = jsonList[i];
+        // ...and loop through each data field value of each response
+        for(var j = aSchema.length-1; j >= 1 ; j--) {
+            // ...and capture data into an array mapped according to the schema...
+            var dataFieldValue = jsonResult[aSchema[j]];
+            if(!dataFieldValue) {
+                dataFieldValue = "";
+            }
+            //YAHOO.log("data: " + i + " value:" +j+" = "+dataFieldValue,"debug",this.toString());
+            aResultItem.unshift(dataFieldValue);
+        }
+        // If schema isn't well defined, pass along the entire result object
+        if(aResultItem.length == 1) {
+            aResultItem.push(jsonResult);
+        }
+        // Capture the array of data field values in an array of results
+        aResults.unshift(aResultItem);
+    }
+
+    if(bError) {
+        aResults = null;
+    }
+
+    if(aResults === null) {
+        this.dataErrorEvent.fire(this, oParent, sQuery, YAHOO.widget.DataSource.ERROR_DATAPARSE);
+        YAHOO.log(YAHOO.widget.DataSource.ERROR_DATAPARSE, "error", this.toString());
+        aResults = [];
+    }
+    else {
+        var resultObj = {};
+        resultObj.query = decodeURIComponent(sQuery);
+        resultObj.results = aResults;
+        this._addCacheElem(resultObj);
+        
+        this.getResultsEvent.fire(this, oParent, sQuery, aResults);
+        YAHOO.log("Results returned for query \"" + sQuery + "\": " +
+                YAHOO.lang.dump(aResults), "info", this.toString());
+    }
+
+    oCallbackFn(sQuery, aResults, oParent);
+};
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Private methods
+//
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Any success/failure response should decrement counter.
+ *
+ * @method _bumpPendingDown
+ * @private
+ */
+YAHOO.widget.DS_ScriptNode._bumpPendingDown = function() {
+    YAHOO.widget.DS_ScriptNode._nPending--;
+};
+
+
+/****************************************************************************/
+/****************************************************************************/
+/****************************************************************************/
+
+/**
  * Implementation of YAHOO.widget.DataSource using a native Javascript function as
  * its live data source.
  *  
@@ -3134,6 +3442,7 @@
     return;
 };
 
+
 /****************************************************************************/
 /****************************************************************************/
 /****************************************************************************/
@@ -3254,4 +3563,4 @@
     oCallbackFn(sQuery, aResults, oParent);
 };
 
-YAHOO.register("autocomplete", YAHOO.widget.AutoComplete, {version: "2.3.1", build: "541"});
+YAHOO.register("autocomplete", YAHOO.widget.AutoComplete, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/autocomplete/autocomplete-min.js
===================================================================
--- trunk/root/static/yui/autocomplete/autocomplete-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/autocomplete/autocomplete-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,11 +2,11 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-YAHOO.widget.AutoComplete=function(G,B,J,D){if(G&&B&&J){if(J instanceof YAHOO.widget.DataSource){this.dataSource=J;}else{return ;}if(YAHOO.util.Dom.inDocument(G)){if(YAHOO.lang.isString(G)){this._sName="instance"+YAHOO.widget.AutoComplete._nIndex+" "+G;this._oTextbox=document.getElementById(G);}else{this._sName=(G.id)?"instance"+YAHOO.widget.AutoComplete._nIndex+" "+G.id:"instance"+YAHOO.widget.AutoComplete._nIndex;this._oTextbox=G;}YAHOO.util.Dom.addClass(this._oTextbox,"yui-ac-input");}else{return ;}if(YAHOO.util.Dom.inDocument(B)){if(YAHOO.lang.isString(B)){this._oContainer=document.getElementById(B);}else{this._oContainer=B;}if(this._oContainer.style.display=="none"){}var E=this._oContainer.parentNode;var A=E.tagName.toLowerCase();if(A=="div"){YAHOO.util.Dom.addClass(E,"yui-ac");}else{}}else{return ;}if(D&&(D.constructor==Object)){for(var I in D){if(I){this[I]=D[I];}}}this._initContainer();this._initProps();this._initList();this._initContainerHelpers();var H=this;var F=!
 this._oTextbox;var C=this._oContainer._oContent;YAHOO.util.Event.addListener(F,"keyup",H._onTextboxKeyUp,H);YAHOO.util.Event.addListener(F,"keydown",H._onTextboxKeyDown,H);YAHOO.util.Event.addListener(F,"focus",H._onTextboxFocus,H);YAHOO.util.Event.addListener(F,"blur",H._onTextboxBlur,H);YAHOO.util.Event.addListener(C,"mouseover",H._onContainerMouseover,H);YAHOO.util.Event.addListener(C,"mouseout",H._onContainerMouseout,H);YAHOO.util.Event.addListener(C,"scroll",H._onContainerScroll,H);YAHOO.util.Event.addListener(C,"resize",H._onContainerResize,H);if(F.form){YAHOO.util.Event.addListener(F.form,"submit",H._onFormSubmit,H);}YAHOO.util.Event.addListener(F,"keypress",H._onTextboxKeyPress,H);this.textboxFocusEvent=new YAHOO.util.CustomEvent("textboxFocus",this);this.textboxKeyEvent=new YAHOO.util.CustomEvent("textboxKey",this);this.dataRequestEvent=new YAHOO.util.CustomEvent("dataRequest",this);this.dataReturnEvent=new YAHOO.util.CustomEvent("dataReturn",this);this.dataErrorEv!
 ent=new YAHOO.util.CustomEvent("dataError",this);this.containe!
 rExpandE
vent=new YAHOO.util.CustomEvent("containerExpand",this);this.typeAheadEvent=new YAHOO.util.CustomEvent("typeAhead",this);this.itemMouseOverEvent=new YAHOO.util.CustomEvent("itemMouseOver",this);this.itemMouseOutEvent=new YAHOO.util.CustomEvent("itemMouseOut",this);this.itemArrowToEvent=new YAHOO.util.CustomEvent("itemArrowTo",this);this.itemArrowFromEvent=new YAHOO.util.CustomEvent("itemArrowFrom",this);this.itemSelectEvent=new YAHOO.util.CustomEvent("itemSelect",this);this.unmatchedItemSelectEvent=new YAHOO.util.CustomEvent("unmatchedItemSelect",this);this.selectionEnforceEvent=new YAHOO.util.CustomEvent("selectionEnforce",this);this.containerCollapseEvent=new YAHOO.util.CustomEvent("containerCollapse",this);this.textboxBlurEvent=new YAHOO.util.CustomEvent("textboxBlur",this);F.setAttribute("autocomplete","off");YAHOO.widget.AutoComplete._nIndex++;}else{}};YAHOO.widget.AutoComplete.prototype.dataSource=null;YAHOO.widget.AutoComplete.prototype.minQueryLength=1;YAHOO.widget.A!
 utoComplete.prototype.maxResultsDisplayed=10;YAHOO.widget.AutoComplete.prototype.queryDelay=0.2;YAHOO.widget.AutoComplete.prototype.highlightClassName="yui-ac-highlight";YAHOO.widget.AutoComplete.prototype.prehighlightClassName=null;YAHOO.widget.AutoComplete.prototype.delimChar=null;YAHOO.widget.AutoComplete.prototype.autoHighlight=true;YAHOO.widget.AutoComplete.prototype.typeAhead=false;YAHOO.widget.AutoComplete.prototype.animHoriz=false;YAHOO.widget.AutoComplete.prototype.animVert=true;YAHOO.widget.AutoComplete.prototype.animSpeed=0.3;YAHOO.widget.AutoComplete.prototype.forceSelection=false;YAHOO.widget.AutoComplete.prototype.allowBrowserAutocomplete=true;YAHOO.widget.AutoComplete.prototype.alwaysShowContainer=false;YAHOO.widget.AutoComplete.prototype.useIFrame=false;YAHOO.widget.AutoComplete.prototype.useShadow=false;YAHOO.widget.AutoComplete.prototype.toString=function(){return"AutoComplete "+this._sName;};YAHOO.widget.AutoComplete.prototype.isContainerOpen=function(){r!
 eturn this._bContainerOpen;};YAHOO.widget.AutoComplete.prototy!
 pe.getLi
stItems=function(){return this._aListItems;};YAHOO.widget.AutoComplete.prototype.getListItemData=function(A){if(A._oResultData){return A._oResultData;}else{return false;}};YAHOO.widget.AutoComplete.prototype.setHeader=function(A){if(A){if(this._oContainer._oContent._oHeader){this._oContainer._oContent._oHeader.innerHTML=A;this._oContainer._oContent._oHeader.style.display="block";}}else{this._oContainer._oContent._oHeader.innerHTML="";this._oContainer._oContent._oHeader.style.display="none";}};YAHOO.widget.AutoComplete.prototype.setFooter=function(A){if(A){if(this._oContainer._oContent._oFooter){this._oContainer._oContent._oFooter.innerHTML=A;this._oContainer._oContent._oFooter.style.display="block";}}else{this._oContainer._oContent._oFooter.innerHTML="";this._oContainer._oContent._oFooter.style.display="none";}};YAHOO.widget.AutoComplete.prototype.setBody=function(A){if(A){if(this._oContainer._oContent._oBody){this._oContainer._oContent._oBody.innerHTML=A;this._oContainer._o!
 Content._oBody.style.display="block";this._oContainer._oContent.style.display="block";}}else{this._oContainer._oContent._oBody.innerHTML="";this._oContainer._oContent.style.display="none";}this._maxResultsDisplayed=0;};YAHOO.widget.AutoComplete.prototype.formatResult=function(B,C){var A=B[0];if(A){return A;}else{return"";}};YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer=function(A,B,D,C){return true;};YAHOO.widget.AutoComplete.prototype.sendQuery=function(A){this._sendQuery(A);};YAHOO.widget.AutoComplete.prototype.doBeforeSendQuery=function(A){return A;};YAHOO.widget.AutoComplete.prototype.destroy=function(){var B=this.toString();var A=this._oTextbox;var D=this._oContainer;this.textboxFocusEvent.unsubscribe();this.textboxKeyEvent.unsubscribe();this.dataRequestEvent.unsubscribe();this.dataReturnEvent.unsubscribe();this.dataErrorEvent.unsubscribe();this.containerExpandEvent.unsubscribe();this.typeAheadEvent.unsubscribe();
+YAHOO.widget.AutoComplete=function(G,B,J,D){if(G&&B&&J){if(J instanceof YAHOO.widget.DataSource){this.dataSource=J;}else{return ;}if(YAHOO.util.Dom.inDocument(G)){if(YAHOO.lang.isString(G)){this._sName="instance"+YAHOO.widget.AutoComplete._nIndex+" "+G;this._oTextbox=document.getElementById(G);}else{this._sName=(G.id)?"instance"+YAHOO.widget.AutoComplete._nIndex+" "+G.id:"instance"+YAHOO.widget.AutoComplete._nIndex;this._oTextbox=G;}YAHOO.util.Dom.addClass(this._oTextbox,"yui-ac-input");}else{return ;}if(YAHOO.util.Dom.inDocument(B)){if(YAHOO.lang.isString(B)){this._oContainer=document.getElementById(B);}else{this._oContainer=B;}if(this._oContainer.style.display=="none"){}var E=this._oContainer.parentNode;var A=E.tagName.toLowerCase();if(A=="div"){YAHOO.util.Dom.addClass(E,"yui-ac");}else{}}else{return ;}if(D&&(D.constructor==Object)){for(var I in D){if(I){this[I]=D[I];}}}this._initContainer();this._initProps();this._initList();this._initContainerHelpers();var H=this;var F=!
 this._oTextbox;var C=this._oContainer._oContent;YAHOO.util.Event.addListener(F,"keyup",H._onTextboxKeyUp,H);YAHOO.util.Event.addListener(F,"keydown",H._onTextboxKeyDown,H);YAHOO.util.Event.addListener(F,"focus",H._onTextboxFocus,H);YAHOO.util.Event.addListener(F,"blur",H._onTextboxBlur,H);YAHOO.util.Event.addListener(C,"mouseover",H._onContainerMouseover,H);YAHOO.util.Event.addListener(C,"mouseout",H._onContainerMouseout,H);YAHOO.util.Event.addListener(C,"scroll",H._onContainerScroll,H);YAHOO.util.Event.addListener(C,"resize",H._onContainerResize,H);YAHOO.util.Event.addListener(F,"keypress",H._onTextboxKeyPress,H);YAHOO.util.Event.addListener(window,"unload",H._onWindowUnload,H);this.textboxFocusEvent=new YAHOO.util.CustomEvent("textboxFocus",this);this.textboxKeyEvent=new YAHOO.util.CustomEvent("textboxKey",this);this.dataRequestEvent=new YAHOO.util.CustomEvent("dataRequest",this);this.dataReturnEvent=new YAHOO.util.CustomEvent("dataReturn",this);this.dataErrorEvent=new YA!
 HOO.util.CustomEvent("dataError",this);this.containerExpandEve!
 nt=new Y
AHOO.util.CustomEvent("containerExpand",this);this.typeAheadEvent=new YAHOO.util.CustomEvent("typeAhead",this);this.itemMouseOverEvent=new YAHOO.util.CustomEvent("itemMouseOver",this);this.itemMouseOutEvent=new YAHOO.util.CustomEvent("itemMouseOut",this);this.itemArrowToEvent=new YAHOO.util.CustomEvent("itemArrowTo",this);this.itemArrowFromEvent=new YAHOO.util.CustomEvent("itemArrowFrom",this);this.itemSelectEvent=new YAHOO.util.CustomEvent("itemSelect",this);this.unmatchedItemSelectEvent=new YAHOO.util.CustomEvent("unmatchedItemSelect",this);this.selectionEnforceEvent=new YAHOO.util.CustomEvent("selectionEnforce",this);this.containerCollapseEvent=new YAHOO.util.CustomEvent("containerCollapse",this);this.textboxBlurEvent=new YAHOO.util.CustomEvent("textboxBlur",this);F.setAttribute("autocomplete","off");YAHOO.widget.AutoComplete._nIndex++;}else{}};YAHOO.widget.AutoComplete.prototype.dataSource=null;YAHOO.widget.AutoComplete.prototype.minQueryLength=1;YAHOO.widget.AutoComplet!
 e.prototype.maxResultsDisplayed=10;YAHOO.widget.AutoComplete.prototype.queryDelay=0.2;YAHOO.widget.AutoComplete.prototype.highlightClassName="yui-ac-highlight";YAHOO.widget.AutoComplete.prototype.prehighlightClassName=null;YAHOO.widget.AutoComplete.prototype.delimChar=null;YAHOO.widget.AutoComplete.prototype.autoHighlight=true;YAHOO.widget.AutoComplete.prototype.typeAhead=false;YAHOO.widget.AutoComplete.prototype.animHoriz=false;YAHOO.widget.AutoComplete.prototype.animVert=true;YAHOO.widget.AutoComplete.prototype.animSpeed=0.3;YAHOO.widget.AutoComplete.prototype.forceSelection=false;YAHOO.widget.AutoComplete.prototype.allowBrowserAutocomplete=true;YAHOO.widget.AutoComplete.prototype.alwaysShowContainer=false;YAHOO.widget.AutoComplete.prototype.useIFrame=false;YAHOO.widget.AutoComplete.prototype.useShadow=false;YAHOO.widget.AutoComplete.prototype.toString=function(){return"AutoComplete "+this._sName;};YAHOO.widget.AutoComplete.prototype.isContainerOpen=function(){return this!
 ._bContainerOpen;};YAHOO.widget.AutoComplete.prototype.getList!
 Items=fu
nction(){return this._aListItems;};YAHOO.widget.AutoComplete.prototype.getListItemData=function(A){if(A._oResultData){return A._oResultData;}else{return false;}};YAHOO.widget.AutoComplete.prototype.setHeader=function(A){if(A){if(this._oContainer._oContent._oHeader){this._oContainer._oContent._oHeader.innerHTML=A;this._oContainer._oContent._oHeader.style.display="block";}}else{this._oContainer._oContent._oHeader.innerHTML="";this._oContainer._oContent._oHeader.style.display="none";}};YAHOO.widget.AutoComplete.prototype.setFooter=function(A){if(A){if(this._oContainer._oContent._oFooter){this._oContainer._oContent._oFooter.innerHTML=A;this._oContainer._oContent._oFooter.style.display="block";}}else{this._oContainer._oContent._oFooter.innerHTML="";this._oContainer._oContent._oFooter.style.display="none";}};YAHOO.widget.AutoComplete.prototype.setBody=function(A){if(A){if(this._oContainer._oContent._oBody){this._oContainer._oContent._oBody.innerHTML=A;this._oContainer._oContent._o!
 Body.style.display="block";this._oContainer._oContent.style.display="block";}}else{this._oContainer._oContent._oBody.innerHTML="";this._oContainer._oContent.style.display="none";}this._maxResultsDisplayed=0;};YAHOO.widget.AutoComplete.prototype.formatResult=function(B,C){var A=B[0];if(A){return A;}else{return"";}};YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer=function(A,B,D,C){return true;};YAHOO.widget.AutoComplete.prototype.sendQuery=function(A){this._sendQuery(A);};YAHOO.widget.AutoComplete.prototype.doBeforeSendQuery=function(A){return A;};YAHOO.widget.AutoComplete.prototype.destroy=function(){var B=this.toString();var A=this._oTextbox;var D=this._oContainer;this.textboxFocusEvent.unsubscribe();this.textboxKeyEvent.unsubscribe();this.dataRequestEvent.unsubscribe();this.dataReturnEvent.unsubscribe();this.dataErrorEvent.unsubscribe();this.containerExpandEvent.unsubscribe();this.typeAheadEvent.unsubscribe();
 this.itemMouseOverEvent.unsubscribe();this.itemMouseOutEvent.unsubscribe();this.itemArrowToEvent.unsubscribe();this.itemArrowFromEvent.unsubscribe();this.itemSelectEvent.unsubscribe();this.unmatchedItemSelectEvent.unsubscribe();this.selectionEnforceEvent.unsubscribe();this.containerCollapseEvent.unsubscribe();this.textboxBlurEvent.unsubscribe();YAHOO.util.Event.purgeElement(A,true);YAHOO.util.Event.purgeElement(D,true);D.innerHTML="";for(var C in this){if(YAHOO.lang.hasOwnProperty(this,C)){this[C]=null;}}};YAHOO.widget.AutoComplete.prototype.textboxFocusEvent=null;YAHOO.widget.AutoComplete.prototype.textboxKeyEvent=null;YAHOO.widget.AutoComplete.prototype.dataRequestEvent=null;YAHOO.widget.AutoComplete.prototype.dataReturnEvent=null;YAHOO.widget.AutoComplete.prototype.dataErrorEvent=null;YAHOO.widget.AutoComplete.prototype.containerExpandEvent=null;YAHOO.widget.AutoComplete.prototype.typeAheadEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent=null;YAHOO.widge!
 t.AutoComplete.prototype.itemMouseOutEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowToEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowFromEvent=null;YAHOO.widget.AutoComplete.prototype.itemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent=null;YAHOO.widget.AutoComplete.prototype.containerCollapseEvent=null;YAHOO.widget.AutoComplete.prototype.textboxBlurEvent=null;YAHOO.widget.AutoComplete._nIndex=0;YAHOO.widget.AutoComplete.prototype._sName=null;YAHOO.widget.AutoComplete.prototype._oTextbox=null;YAHOO.widget.AutoComplete.prototype._bFocused=true;YAHOO.widget.AutoComplete.prototype._oAnim=null;YAHOO.widget.AutoComplete.prototype._oContainer=null;YAHOO.widget.AutoComplete.prototype._bContainerOpen=false;YAHOO.widget.AutoComplete.prototype._bOverContainer=false;YAHOO.widget.AutoComplete.prototype._aListItems=null;YAHOO.widget.AutoComplete.prototype._nDisplayedItems=0;YAH!
 OO.widget.AutoComplete.prototype._maxResultsDisplayed=0;YAHOO.!
 widget.A
utoComplete.prototype._sCurQuery=null;YAHOO.widget.AutoComplete.prototype._sSavedQuery=null;YAHOO.widget.AutoComplete.prototype._oCurItem=null;YAHOO.widget.AutoComplete.prototype._bItemSelected=false;YAHOO.widget.AutoComplete.prototype._nKeyCode=null;YAHOO.widget.AutoComplete.prototype._nDelayID=-1;YAHOO.widget.AutoComplete.prototype._iFrameSrc="javascript:false;";YAHOO.widget.AutoComplete.prototype._queryInterval=null;YAHOO.widget.AutoComplete.prototype._sLastTextboxValue=null;YAHOO.widget.AutoComplete.prototype._initProps=function(){var B=this.minQueryLength;if(!YAHOO.lang.isNumber(B)){this.minQueryLength=1;}var D=this.maxResultsDisplayed;if(!YAHOO.lang.isNumber(D)||(D<1)){this.maxResultsDisplayed=10;}var E=this.queryDelay;if(!YAHOO.lang.isNumber(E)||(E<0)){this.queryDelay=0.2;}var A=this.delimChar;if(YAHOO.lang.isString(A)&&(A.length>0)){this.delimChar=[A];}else{if(!YAHOO.lang.isArray(A)){this.delimChar=null;}}var C=this.animSpeed;if((this.animHoriz||this.animVert)&&YAHOO!
 .util.Anim){if(!YAHOO.lang.isNumber(C)||(C<0)){this.animSpeed=0.3;}if(!this._oAnim){this._oAnim=new YAHOO.util.Anim(this._oContainer._oContent,{},this.animSpeed);}else{this._oAnim.duration=this.animSpeed;}}if(this.forceSelection&&A){}};YAHOO.widget.AutoComplete.prototype._initContainerHelpers=function(){if(this.useShadow&&!this._oContainer._oShadow){var B=document.createElement("div");B.className="yui-ac-shadow";this._oContainer._oShadow=this._oContainer.appendChild(B);}if(this.useIFrame&&!this._oContainer._oIFrame){var A=document.createElement("iframe");A.src=this._iFrameSrc;A.frameBorder=0;A.scrolling="no";A.style.position="absolute";A.style.width="100%";A.style.height="100%";A.tabIndex=-1;this._oContainer._oIFrame=this._oContainer.appendChild(A);}};YAHOO.widget.AutoComplete.prototype._initContainer=function(){YAHOO.util.Dom.addClass(this._oContainer,"yui-ac-container");if(!this._oContainer._oContent){var D=document.createElement("div");D.className="yui-ac-content";D.styl!
 e.display="none";this._oContainer._oContent=this._oContainer.a!
 ppendChi
ld(D);var B=document.createElement("div");B.className="yui-ac-hd";B.style.display="none";this._oContainer._oContent._oHeader=this._oContainer._oContent.appendChild(B);var C=document.createElement("div");C.className="yui-ac-bd";this._oContainer._oContent._oBody=this._oContainer._oContent.appendChild(C);var A=document.createElement("div");A.className="yui-ac-ft";A.style.display="none";this._oContainer._oContent._oFooter=this._oContainer._oContent.appendChild(A);}else{}};YAHOO.widget.AutoComplete.prototype._initList=function(){this._aListItems=[];while(this._oContainer._oContent._oBody.hasChildNodes()){var B=this.getListItems();if(B){for(var A=B.length-1;A>=0;A--){B[A]=null;}}this._oContainer._oContent._oBody.innerHTML="";}var E=document.createElement("ul");E=this._oContainer._oContent._oBody.appendChild(E);for(var C=0;C<this.maxResultsDisplayed;C++){var D=document.createElement("li");D=E.appendChild(D);this._aListItems[C]=D;this._initListItem(D,C);}this._maxResultsDisplayed=th!
 is.maxResultsDisplayed;};YAHOO.widget.AutoComplete.prototype._initListItem=function(C,B){var A=this;C.style.display="none";C._nItemIndex=B;C.mouseover=C.mouseout=C.onclick=null;YAHOO.util.Event.addListener(C,"mouseover",A._onItemMouseover,A);YAHOO.util.Event.addListener(C,"mouseout",A._onItemMouseout,A);YAHOO.util.Event.addListener(C,"click",A._onItemMouseclick,A);};YAHOO.widget.AutoComplete.prototype._onIMEDetected=function(A){A._enableIntervalDetection();};YAHOO.widget.AutoComplete.prototype._enableIntervalDetection=function(){var A=this._oTextbox.value;var B=this._sLastTextboxValue;if(A!=B){this._sLastTextboxValue=A;this._sendQuery(A);}};YAHOO.widget.AutoComplete.prototype._cancelIntervalDetection=function(A){if(A._queryInterval){clearInterval(A._queryInterval);}};YAHOO.widget.AutoComplete.prototype._isIgnoreKey=function(A){if((A==9)||(A==13)||(A==16)||(A==17)||(A>=18&&A<=20)||(A==27)||(A>=33&&A<=35)||(A>=36&&A<=40)||(A>=44&&A<=45)){return true;
 }return false;};YAHOO.widget.AutoComplete.prototype._sendQuery=function(G){if(this.minQueryLength==-1){this._toggleContainer(false);return ;}var C=(this.delimChar)?this.delimChar:null;if(C){var E=-1;for(var B=C.length-1;B>=0;B--){var F=G.lastIndexOf(C[B]);if(F>E){E=F;}}if(C[B]==" "){for(var A=C.length-1;A>=0;A--){if(G[E-1]==C[A]){E--;break;}}}if(E>-1){var D=E+1;while(G.charAt(D)==" "){D+=1;}this._sSavedQuery=G.substring(0,D);G=G.substr(D);}else{if(G.indexOf(this._sSavedQuery)<0){this._sSavedQuery=null;}}}if((G&&(G.length<this.minQueryLength))||(!G&&this.minQueryLength>0)){if(this._nDelayID!=-1){clearTimeout(this._nDelayID);}this._toggleContainer(false);return ;}G=encodeURIComponent(G);this._nDelayID=-1;G=this.doBeforeSendQuery(G);this.dataRequestEvent.fire(this,G);this.dataSource.getResults(this._populateList,G,this);};YAHOO.widget.AutoComplete.prototype._populateList=function(K,L,I){if(L===null){I.dataErrorEvent.fire(I,K);}if(!I._bFocused||!L){return ;}var A=(navigator.use!
 rAgent.toLowerCase().indexOf("opera")!=-1);var O=I._oContainer._oContent.style;O.width=(!A)?null:"";O.height=(!A)?null:"";var H=decodeURIComponent(K);I._sCurQuery=H;I._bItemSelected=false;if(I._maxResultsDisplayed!=I.maxResultsDisplayed){I._initList();}var C=Math.min(L.length,I.maxResultsDisplayed);I._nDisplayedItems=C;if(C>0){I._initContainerHelpers();var D=I._aListItems;for(var G=C-1;G>=0;G--){var N=D[G];var B=L[G];N.innerHTML=I.formatResult(B,H);N.style.display="list-item";N._sResultKey=B[0];N._oResultData=B;}for(var F=D.length-1;F>=C;F--){var M=D[F];M.innerHTML=null;M.style.display="none";M._sResultKey=null;M._oResultData=null;}var J=I.doBeforeExpandContainer(I._oTextbox,I._oContainer,K,L);I._toggleContainer(J);if(I.autoHighlight){var E=D[0];I._toggleHighlight(E,"to");I.itemArrowToEvent.fire(I,E);I._typeAhead(E,K);}else{I._oCurItem=null;}}else{I._toggleContainer(false);}I.dataReturnEvent.fire(I,K,L);};YAHOO.widget.AutoComplete.prototype._clearSelection=function(){var C=!
 this._oTextbox.value;var B=(this.delimChar)?this.delimChar[0]:!
 null;var
 A=(B)?C.lastIndexOf(B,C.length-2):-1;if(A>-1){this._oTextbox.value=C.substring(0,A);}else{this._oTextbox.value="";}this._sSavedQuery=this._oTextbox.value;this.selectionEnforceEvent.fire(this);};YAHOO.widget.AutoComplete.prototype._textMatchesOption=function(){var D=null;for(var A=this._nDisplayedItems-1;A>=0;A--){var C=this._aListItems[A];var B=C._sResultKey.toLowerCase();if(B==this._sCurQuery.toLowerCase()){D=C;break;}}return(D);};YAHOO.widget.AutoComplete.prototype._typeAhead=function(E,G){if(!this.typeAhead||(this._nKeyCode==8)){return ;}var B=this._oTextbox;var F=this._oTextbox.value;if(!B.setSelectionRange&&!B.createTextRange){return ;}var C=F.length;this._updateValue(E);var D=B.value.length;this._selectText(B,C,D);var A=B.value.substr(C,D);this.typeAheadEvent.fire(this,G,A);};YAHOO.widget.AutoComplete.prototype._selectText=function(A,B,C){if(A.setSelectionRange){A.setSelectionRange(B,C);}else{if(A.createTextRange){var D=A.createTextRange();D.moveStart("character",B);D!
 .moveEnd("character",C-A.value.length);D.select();}else{A.select();}}};YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers=function(B){var D=false;var C=this._oContainer._oContent.offsetWidth+"px";var A=this._oContainer._oContent.offsetHeight+"px";if(this.useIFrame&&this._oContainer._oIFrame){D=true;if(B){this._oContainer._oIFrame.style.width=C;this._oContainer._oIFrame.style.height=A;}else{this._oContainer._oIFrame.style.width=0;this._oContainer._oIFrame.style.height=0;}}if(this.useShadow&&this._oContainer._oShadow){D=true;if(B){this._oContainer._oShadow.style.width=C;this._oContainer._oShadow.style.height=A;}else{this._oContainer._oShadow.style.width=0;this._oContainer._oShadow.style.height=0;}}};YAHOO.widget.AutoComplete.prototype._toggleContainer=function(J){var L=this._oContainer;if(this.alwaysShowContainer&&this._bContainerOpen){return ;}if(!J){this._oContainer._oContent.scrollTop=0;var C=this._aListItems;if(C&&(C.length>0)){for(var G=C.length-1;G>=0;G--){C[G]!
 .style.display="none";}}if(this._oCurItem){this._toggleHighlig!
 ht(this.
_oCurItem,"from");}this._oCurItem=null;this._nDisplayedItems=0;this._sCurQuery=null;}if(!J&&!this._bContainerOpen){L._oContent.style.display="none";return ;}var B=this._oAnim;if(B&&B.getEl()&&(this.animHoriz||this.animVert)){if(!J){this._toggleContainerHelpers(J);}if(B.isAnimated()){B.stop();}var H=L._oContent.cloneNode(true);L.appendChild(H);H.style.top="-9000px";H.style.display="block";var F=H.offsetWidth;var D=H.offsetHeight;var A=(this.animHoriz)?0:F;var E=(this.animVert)?0:D;B.attributes=(J)?{width:{to:F},height:{to:D}}:{width:{to:A},height:{to:E}};if(J&&!this._bContainerOpen){L._oContent.style.width=A+"px";L._oContent.style.height=E+"px";}else{L._oContent.style.width=F+"px";L._oContent.style.height=D+"px";}L.removeChild(H);H=null;var I=this;var K=function(){B.onComplete.unsubscribeAll();if(J){I.containerExpandEvent.fire(I);}else{L._oContent.style.display="none";I.containerCollapseEvent.fire(I);}I._toggleContainerHelpers(J);};L._oContent.style.display="block";B.onComple!
 te.subscribe(K);B.animate();this._bContainerOpen=J;}else{if(J){L._oContent.style.display="block";this.containerExpandEvent.fire(this);}else{L._oContent.style.display="none";this.containerCollapseEvent.fire(this);}this._toggleContainerHelpers(J);this._bContainerOpen=J;}};YAHOO.widget.AutoComplete.prototype._toggleHighlight=function(A,C){var B=this.highlightClassName;if(this._oCurItem){YAHOO.util.Dom.removeClass(this._oCurItem,B);}if((C=="to")&&B){YAHOO.util.Dom.addClass(A,B);this._oCurItem=A;}};YAHOO.widget.AutoComplete.prototype._togglePrehighlight=function(A,C){if(A==this._oCurItem){return ;}var B=this.prehighlightClassName;if((C=="mouseover")&&B){YAHOO.util.Dom.addClass(A,B);}else{YAHOO.util.Dom.removeClass(A,B);}};YAHOO.widget.AutoComplete.prototype._updateValue=function(F){var C=this._oTextbox;var E=(this.delimChar)?(this.delimChar[0]||this.delimChar):null;var B=this._sSavedQuery;var D=F._sResultKey;C.focus();
-C.value="";if(E){if(B){C.value=B;}C.value+=D+E;if(E!=" "){C.value+=" ";}}else{C.value=D;}if(C.type=="textarea"){C.scrollTop=C.scrollHeight;}var A=C.value.length;this._selectText(C,A,A);this._oCurItem=F;};YAHOO.widget.AutoComplete.prototype._selectItem=function(A){this._bItemSelected=true;this._updateValue(A);this._cancelIntervalDetection(this);this.itemSelectEvent.fire(this,A,A._oResultData);this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype._jumpSelection=function(){if(this._oCurItem){this._selectItem(this._oCurItem);}else{this._toggleContainer(false);}};YAHOO.widget.AutoComplete.prototype._moveSelection=function(G){if(this._bContainerOpen){var D=this._oCurItem;var F=-1;if(D){F=D._nItemIndex;}var C=(G==40)?(F+1):(F-1);if(C<-2||C>=this._nDisplayedItems){return ;}if(D){this._toggleHighlight(D,"from");this.itemArrowFromEvent.fire(this,D);}if(C==-1){if(this.delimChar&&this._sSavedQuery){if(!this._textMatchesOption()){this._oTextbox.value=this._sSavedQuery;}else!
 {this._oTextbox.value=this._sSavedQuery+this._sCurQuery;}}else{this._oTextbox.value=this._sCurQuery;}this._oCurItem=null;return ;}if(C==-2){this._toggleContainer(false);return ;}var B=this._aListItems[C];var E=this._oContainer._oContent;var A=((YAHOO.util.Dom.getStyle(E,"overflow")=="auto")||(YAHOO.util.Dom.getStyle(E,"overflowY")=="auto"));if(A&&(C>-1)&&(C<this._nDisplayedItems)){if(G==40){if((B.offsetTop+B.offsetHeight)>(E.scrollTop+E.offsetHeight)){E.scrollTop=(B.offsetTop+B.offsetHeight)-E.offsetHeight;}else{if((B.offsetTop+B.offsetHeight)<E.scrollTop){E.scrollTop=B.offsetTop;}}}else{if(B.offsetTop<E.scrollTop){this._oContainer._oContent.scrollTop=B.offsetTop;}else{if(B.offsetTop>(E.scrollTop+E.offsetHeight)){this._oContainer._oContent.scrollTop=(B.offsetTop+B.offsetHeight)-E.offsetHeight;}}}}this._toggleHighlight(B,"to");this.itemArrowToEvent.fire(this,B);if(this.typeAhead){this._updateValue(B);}}};YAHOO.widget.AutoComplete.prototype._onItemMouseover=function(A,B){if(B!
 .prehighlightClassName){B._togglePrehighlight(this,"mouseover"!
 );}else{
B._toggleHighlight(this,"to");}B.itemMouseOverEvent.fire(B,this);};YAHOO.widget.AutoComplete.prototype._onItemMouseout=function(A,B){if(B.prehighlightClassName){B._togglePrehighlight(this,"mouseout");}else{B._toggleHighlight(this,"from");}B.itemMouseOutEvent.fire(B,this);};YAHOO.widget.AutoComplete.prototype._onItemMouseclick=function(A,B){B._toggleHighlight(this,"to");B._selectItem(this);};YAHOO.widget.AutoComplete.prototype._onContainerMouseover=function(A,B){B._bOverContainer=true;};YAHOO.widget.AutoComplete.prototype._onContainerMouseout=function(A,B){B._bOverContainer=false;if(B._oCurItem){B._toggleHighlight(B._oCurItem,"to");}};YAHOO.widget.AutoComplete.prototype._onContainerScroll=function(A,B){B._oTextbox.focus();};YAHOO.widget.AutoComplete.prototype._onContainerResize=function(A,B){B._toggleContainerHelpers(B._bContainerOpen);};YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown=function(A,B){var C=A.keyCode;switch(C){case 9:if(B._oCurItem){if(B.delimChar&&(B._nKe!
 yCode!=C)){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}B._selectItem(B._oCurItem);}else{B._toggleContainer(false);}break;case 13:if(B._oCurItem){if(B._nKeyCode!=C){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}B._selectItem(B._oCurItem);}else{B._toggleContainer(false);}break;case 27:B._toggleContainer(false);return ;case 39:B._jumpSelection();break;case 38:YAHOO.util.Event.stopEvent(A);B._moveSelection(C);break;case 40:YAHOO.util.Event.stopEvent(A);B._moveSelection(C);break;default:break;}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress=function(A,C){var D=A.keyCode;var B=(navigator.userAgent.toLowerCase().indexOf("mac")!=-1);if(B){switch(D){case 9:if(C._oCurItem){if(C.delimChar&&(C._nKeyCode!=D)){YAHOO.util.Event.stopEvent(A);}}break;case 13:if(C._oCurItem){if(C._nKeyCode!=D){if(C._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}}break;case 38:case 40:YAHOO.util.Event.stopEvent(A);break;default:break;}}else{if(D==229){C._queryInterval=setInterval(!
 function(){C._onIMEDetected(C);},500);}}};YAHOO.widget.AutoCom!
 plete.pr
ototype._onTextboxKeyUp=function(B,D){D._initProps();var E=B.keyCode;D._nKeyCode=E;var C=this.value;if(D._isIgnoreKey(E)||(C.toLowerCase()==D._sCurQuery)){return ;}else{D._bItemSelected=false;YAHOO.util.Dom.removeClass(D._oCurItem,D.highlightClassName);D._oCurItem=null;D.textboxKeyEvent.fire(D,E);}if(D.queryDelay>0){var A=setTimeout(function(){D._sendQuery(C);},(D.queryDelay*1000));if(D._nDelayID!=-1){clearTimeout(D._nDelayID);}D._nDelayID=A;}else{D._sendQuery(C);}};YAHOO.widget.AutoComplete.prototype._onTextboxFocus=function(A,B){B._oTextbox.setAttribute("autocomplete","off");B._bFocused=true;if(!B._bItemSelected){B.textboxFocusEvent.fire(B);}};YAHOO.widget.AutoComplete.prototype._onTextboxBlur=function(A,B){if(!B._bOverContainer||(B._nKeyCode==9)){if(!B._bItemSelected){var C=B._textMatchesOption();if(!B._bContainerOpen||(B._bContainerOpen&&(C===null))){if(B.forceSelection){B._clearSelection();}else{B.unmatchedItemSelectEvent.fire(B);}}else{if(B.forceSelection){B._selectIte!
 m(C);}}}if(B._bContainerOpen){B._toggleContainer(false);}B._cancelIntervalDetection(B);B._bFocused=false;B.textboxBlurEvent.fire(B);}};YAHOO.widget.AutoComplete.prototype._onFormSubmit=function(A,B){if(B.allowBrowserAutocomplete){B._oTextbox.setAttribute("autocomplete","on");}else{B._oTextbox.setAttribute("autocomplete","off");}};YAHOO.widget.DataSource=function(){};YAHOO.widget.DataSource.ERROR_DATANULL="Response data was null";YAHOO.widget.DataSource.ERROR_DATAPARSE="Response data could not be parsed";YAHOO.widget.DataSource.prototype.maxCacheEntries=15;YAHOO.widget.DataSource.prototype.queryMatchContains=false;YAHOO.widget.DataSource.prototype.queryMatchSubset=false;YAHOO.widget.DataSource.prototype.queryMatchCase=false;YAHOO.widget.DataSource.prototype.toString=function(){return"DataSource "+this._sName;};YAHOO.widget.DataSource.prototype.getResults=function(A,D,B){var C=this._doQueryCache(A,D,B);if(C.length===0){this.queryEvent.fire(this,B,D);
-this.doQuery(A,D,B);}};YAHOO.widget.DataSource.prototype.doQuery=function(A,C,B){};YAHOO.widget.DataSource.prototype.flushCache=function(){if(this._aCache){this._aCache=[];}if(this._aCacheHelper){this._aCacheHelper=[];}this.cacheFlushEvent.fire(this);};YAHOO.widget.DataSource.prototype.queryEvent=null;YAHOO.widget.DataSource.prototype.cacheQueryEvent=null;YAHOO.widget.DataSource.prototype.getResultsEvent=null;YAHOO.widget.DataSource.prototype.getCachedResultsEvent=null;YAHOO.widget.DataSource.prototype.dataErrorEvent=null;YAHOO.widget.DataSource.prototype.cacheFlushEvent=null;YAHOO.widget.DataSource._nIndex=0;YAHOO.widget.DataSource.prototype._sName=null;YAHOO.widget.DataSource.prototype._aCache=null;YAHOO.widget.DataSource.prototype._init=function(){var A=this.maxCacheEntries;if(!YAHOO.lang.isNumber(A)||(A<0)){A=0;}if(A>0&&!this._aCache){this._aCache=[];}this._sName="instance"+YAHOO.widget.DataSource._nIndex;YAHOO.widget.DataSource._nIndex++;this.queryEvent=new YAHOO.util.!
 CustomEvent("query",this);this.cacheQueryEvent=new YAHOO.util.CustomEvent("cacheQuery",this);this.getResultsEvent=new YAHOO.util.CustomEvent("getResults",this);this.getCachedResultsEvent=new YAHOO.util.CustomEvent("getCachedResults",this);this.dataErrorEvent=new YAHOO.util.CustomEvent("dataError",this);this.cacheFlushEvent=new YAHOO.util.CustomEvent("cacheFlush",this);};YAHOO.widget.DataSource.prototype._addCacheElem=function(B){var A=this._aCache;if(!A||!B||!B.query||!B.results){return ;}if(A.length>=this.maxCacheEntries){A.shift();}A.push(B);};YAHOO.widget.DataSource.prototype._doQueryCache=function(A,I,N){var H=[];var G=false;var J=this._aCache;var F=(J)?J.length:0;var K=this.queryMatchContains;var D;if((this.maxCacheEntries>0)&&J&&(F>0)){this.cacheQueryEvent.fire(this,N,I);if(!this.queryMatchCase){D=I;I=I.toLowerCase();}for(var P=F-1;P>=0;P--){var E=J[P];var B=E.results;var C=(!this.queryMatchCase)?encodeURIComponent(E.query).toLowerCase():encodeURIComponent(E.query);if!
 (C==I){G=true;H=B;if(P!=F-1){J.splice(P,1);this._addCacheElem(!
 E);}brea
k;}else{if(this.queryMatchSubset){for(var O=I.length-1;O>=0;O--){var R=I.substr(0,O);if(C==R){G=true;for(var M=B.length-1;M>=0;M--){var Q=B[M];var L=(this.queryMatchCase)?encodeURIComponent(Q[0]).indexOf(I):encodeURIComponent(Q[0]).toLowerCase().indexOf(I);if((!K&&(L===0))||(K&&(L>-1))){H.unshift(Q);}}E={};E.query=I;E.results=H;this._addCacheElem(E);break;}}if(G){break;}}}}if(G){this.getCachedResultsEvent.fire(this,N,D,H);A(D,H,N);}}return H;};YAHOO.widget.DS_XHR=function(C,A,D){if(D&&(D.constructor==Object)){for(var B in D){this[B]=D[B];}}if(!YAHOO.lang.isArray(A)||!YAHOO.lang.isString(C)){return ;}this.schema=A;this.scriptURI=C;this._init();};YAHOO.widget.DS_XHR.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_XHR.TYPE_JSON=0;YAHOO.widget.DS_XHR.TYPE_XML=1;YAHOO.widget.DS_XHR.TYPE_FLAT=2;YAHOO.widget.DS_XHR.ERROR_DATAXHR="XHR response failed";YAHOO.widget.DS_XHR.prototype.connMgr=YAHOO.util.Connect;YAHOO.widget.DS_XHR.prototype.connTimeout=0;YAHOO.widget.DS_XHR.prot!
 otype.scriptURI=null;YAHOO.widget.DS_XHR.prototype.scriptQueryParam="query";YAHOO.widget.DS_XHR.prototype.scriptQueryAppend="";YAHOO.widget.DS_XHR.prototype.responseType=YAHOO.widget.DS_XHR.TYPE_JSON;YAHOO.widget.DS_XHR.prototype.responseStripAfter="\n<!-";YAHOO.widget.DS_XHR.prototype.doQuery=function(E,G,B){var J=(this.responseType==YAHOO.widget.DS_XHR.TYPE_XML);var D=this.scriptURI+"?"+this.scriptQueryParam+"="+G;if(this.scriptQueryAppend.length>0){D+="&"+this.scriptQueryAppend;}var C=null;var F=this;var I=function(K){if(!F._oConn||(K.tId!=F._oConn.tId)){F.dataErrorEvent.fire(F,B,G,YAHOO.widget.DataSource.ERROR_DATANULL);return ;}for(var N in K){}if(!J){K=K.responseText;}else{K=K.responseXML;}if(K===null){F.dataErrorEvent.fire(F,B,G,YAHOO.widget.DataSource.ERROR_DATANULL);return ;}var M=F.parseResponse(G,K,B);var L={};L.query=decodeURIComponent(G);L.results=M;if(M===null){F.dataErrorEvent.fire(F,B,G,YAHOO.widget.DataSource.ERROR_DATAPARSE);M=[];}else{F.getResultsEvent.fi!
 re(F,B,G,M);F._addCacheElem(L);}E(G,M,B);};var A=function(K){F!
 .dataErr
orEvent.fire(F,B,G,YAHOO.widget.DS_XHR.ERROR_DATAXHR);return ;};var H={success:I,failure:A};if(YAHOO.lang.isNumber(this.connTimeout)&&(this.connTimeout>0)){H.timeout=this.connTimeout;}if(this._oConn){this.connMgr.abort(this._oConn);}F._oConn=this.connMgr.asyncRequest("GET",D,H,null);};YAHOO.widget.DS_XHR.prototype.parseResponse=function(sQuery,oResponse,oParent){var aSchema=this.schema;var aResults=[];var bError=false;var nEnd=((this.responseStripAfter!=="")&&(oResponse.indexOf))?oResponse.indexOf(this.responseStripAfter):-1;if(nEnd!=-1){oResponse=oResponse.substring(0,nEnd);}switch(this.responseType){case YAHOO.widget.DS_XHR.TYPE_JSON:var jsonList,jsonObjParsed;var isNotMac=(navigator.userAgent.toLowerCase().indexOf("khtml")==-1);if(oResponse.parseJSON&&isNotMac){jsonObjParsed=oResponse.parseJSON();if(!jsonObjParsed){bError=true;}else{try{jsonList=eval("jsonObjParsed."+aSchema[0]);}catch(e){bError=true;break;}}}else{if(window.JSON&&isNotMac){jsonObjParsed=JSON.parse(oRespon!
 se);if(!jsonObjParsed){bError=true;break;}else{try{jsonList=eval("jsonObjParsed."+aSchema[0]);}catch(e){bError=true;break;}}}else{try{while(oResponse.substring(0,1)==" "){oResponse=oResponse.substring(1,oResponse.length);}if(oResponse.indexOf("{")<0){bError=true;break;}if(oResponse.indexOf("{}")===0){break;}var jsonObjRaw=eval("("+oResponse+")");if(!jsonObjRaw){bError=true;break;}jsonList=eval("(jsonObjRaw."+aSchema[0]+")");}catch(e){bError=true;break;}}}if(!jsonList){bError=true;break;}if(!YAHOO.lang.isArray(jsonList)){jsonList=[jsonList];}for(var i=jsonList.length-1;i>=0;i--){var aResultItem=[];var jsonResult=jsonList[i];for(var j=aSchema.length-1;j>=1;j--){var dataFieldValue=jsonResult[aSchema[j]];if(!dataFieldValue){dataFieldValue="";}aResultItem.unshift(dataFieldValue);}if(aResultItem.length==1){aResultItem.push(jsonResult);}aResults.unshift(aResultItem);}break;case YAHOO.widget.DS_XHR.TYPE_XML:var xmlList=oResponse.getElementsByTagName(aSchema[0]);
-if(!xmlList){bError=true;break;}for(var k=xmlList.length-1;k>=0;k--){var result=xmlList.item(k);var aFieldSet=[];for(var m=aSchema.length-1;m>=1;m--){var sValue=null;var xmlAttr=result.attributes.getNamedItem(aSchema[m]);if(xmlAttr){sValue=xmlAttr.value;}else{var xmlNode=result.getElementsByTagName(aSchema[m]);if(xmlNode&&xmlNode.item(0)&&xmlNode.item(0).firstChild){sValue=xmlNode.item(0).firstChild.nodeValue;}else{sValue="";}}aFieldSet.unshift(sValue);}aResults.unshift(aFieldSet);}break;case YAHOO.widget.DS_XHR.TYPE_FLAT:if(oResponse.length>0){var newLength=oResponse.length-aSchema[0].length;if(oResponse.substr(newLength)==aSchema[0]){oResponse=oResponse.substr(0,newLength);}var aRecords=oResponse.split(aSchema[0]);for(var n=aRecords.length-1;n>=0;n--){aResults[n]=aRecords[n].split(aSchema[1]);}}break;default:break;}sQuery=null;oResponse=null;oParent=null;if(bError){return null;}else{return aResults;}};YAHOO.widget.DS_XHR.prototype._oConn=null;YAHOO.widget.DS_JSFunction=fu!
 nction(A,C){if(C&&(C.constructor==Object)){for(var B in C){this[B]=C[B];}}if(!YAHOO.lang.isFunction(A)){return ;}else{this.dataFunction=A;this._init();}};YAHOO.widget.DS_JSFunction.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_JSFunction.prototype.dataFunction=null;YAHOO.widget.DS_JSFunction.prototype.doQuery=function(C,F,D){var B=this.dataFunction;var E=[];E=B(F);if(E===null){this.dataErrorEvent.fire(this,D,F,YAHOO.widget.DataSource.ERROR_DATANULL);return ;}var A={};A.query=decodeURIComponent(F);A.results=E;this._addCacheElem(A);this.getResultsEvent.fire(this,D,F,E);C(F,E,D);return ;};YAHOO.widget.DS_JSArray=function(A,C){if(C&&(C.constructor==Object)){for(var B in C){this[B]=C[B];}}if(!YAHOO.lang.isArray(A)){return ;}else{this.data=A;this._init();}};YAHOO.widget.DS_JSArray.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_JSArray.prototype.data=null;YAHOO.widget.DS_JSArray.prototype.doQuery=function(E,I,A){var F;var C=this.data;var J=[];var D=false;var B=t!
 his.queryMatchContains;if(I){if(!this.queryMatchCase){I=I.toLo!
 werCase(
);}for(F=C.length-1;F>=0;F--){var H=[];if(YAHOO.lang.isString(C[F])){H[0]=C[F];}else{if(YAHOO.lang.isArray(C[F])){H=C[F];}}if(YAHOO.lang.isString(H[0])){var G=(this.queryMatchCase)?encodeURIComponent(H[0]).indexOf(I):encodeURIComponent(H[0]).toLowerCase().indexOf(I);if((!B&&(G===0))||(B&&(G>-1))){J.unshift(H);}}}}else{for(F=C.length-1;F>=0;F--){if(YAHOO.lang.isString(C[F])){J.unshift([C[F]]);}else{if(YAHOO.lang.isArray(C[F])){J.unshift(C[F]);}}}}this.getResultsEvent.fire(this,A,I,J);E(I,J,A);};YAHOO.register("autocomplete",YAHOO.widget.AutoComplete,{version:"2.3.1",build:"541"});
\ No newline at end of file
+C.value="";if(E){if(B){C.value=B;}C.value+=D+E;if(E!=" "){C.value+=" ";}}else{C.value=D;}if(C.type=="textarea"){C.scrollTop=C.scrollHeight;}var A=C.value.length;this._selectText(C,A,A);this._oCurItem=F;};YAHOO.widget.AutoComplete.prototype._selectItem=function(A){this._bItemSelected=true;this._updateValue(A);this._cancelIntervalDetection(this);this.itemSelectEvent.fire(this,A,A._oResultData);this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype._jumpSelection=function(){if(this._oCurItem){this._selectItem(this._oCurItem);}else{this._toggleContainer(false);}};YAHOO.widget.AutoComplete.prototype._moveSelection=function(G){if(this._bContainerOpen){var D=this._oCurItem;var F=-1;if(D){F=D._nItemIndex;}var C=(G==40)?(F+1):(F-1);if(C<-2||C>=this._nDisplayedItems){return ;}if(D){this._toggleHighlight(D,"from");this.itemArrowFromEvent.fire(this,D);}if(C==-1){if(this.delimChar&&this._sSavedQuery){if(!this._textMatchesOption()){this._oTextbox.value=this._sSavedQuery;}else!
 {this._oTextbox.value=this._sSavedQuery+this._sCurQuery;}}else{this._oTextbox.value=this._sCurQuery;}this._oCurItem=null;return ;}if(C==-2){this._toggleContainer(false);return ;}var B=this._aListItems[C];var E=this._oContainer._oContent;var A=((YAHOO.util.Dom.getStyle(E,"overflow")=="auto")||(YAHOO.util.Dom.getStyle(E,"overflowY")=="auto"));if(A&&(C>-1)&&(C<this._nDisplayedItems)){if(G==40){if((B.offsetTop+B.offsetHeight)>(E.scrollTop+E.offsetHeight)){E.scrollTop=(B.offsetTop+B.offsetHeight)-E.offsetHeight;}else{if((B.offsetTop+B.offsetHeight)<E.scrollTop){E.scrollTop=B.offsetTop;}}}else{if(B.offsetTop<E.scrollTop){this._oContainer._oContent.scrollTop=B.offsetTop;}else{if(B.offsetTop>(E.scrollTop+E.offsetHeight)){this._oContainer._oContent.scrollTop=(B.offsetTop+B.offsetHeight)-E.offsetHeight;}}}}this._toggleHighlight(B,"to");this.itemArrowToEvent.fire(this,B);if(this.typeAhead){this._updateValue(B);}}};YAHOO.widget.AutoComplete.prototype._onItemMouseover=function(A,B){if(B!
 .prehighlightClassName){B._togglePrehighlight(this,"mouseover"!
 );}else{
B._toggleHighlight(this,"to");}B.itemMouseOverEvent.fire(B,this);};YAHOO.widget.AutoComplete.prototype._onItemMouseout=function(A,B){if(B.prehighlightClassName){B._togglePrehighlight(this,"mouseout");}else{B._toggleHighlight(this,"from");}B.itemMouseOutEvent.fire(B,this);};YAHOO.widget.AutoComplete.prototype._onItemMouseclick=function(A,B){B._toggleHighlight(this,"to");B._selectItem(this);};YAHOO.widget.AutoComplete.prototype._onContainerMouseover=function(A,B){B._bOverContainer=true;};YAHOO.widget.AutoComplete.prototype._onContainerMouseout=function(A,B){B._bOverContainer=false;if(B._oCurItem){B._toggleHighlight(B._oCurItem,"to");}};YAHOO.widget.AutoComplete.prototype._onContainerScroll=function(A,B){B._oTextbox.focus();};YAHOO.widget.AutoComplete.prototype._onContainerResize=function(A,B){B._toggleContainerHelpers(B._bContainerOpen);};YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown=function(A,C){var D=A.keyCode;switch(D){case 9:if(C._oCurItem){if(C.delimChar&&(C._nKe!
 yCode!=D)){if(C._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}C._selectItem(C._oCurItem);}else{C._toggleContainer(false);}break;case 13:var B=(navigator.userAgent.toLowerCase().indexOf("mac")!=-1);if(!B){if(C._oCurItem){if(C._nKeyCode!=D){if(C._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}C._selectItem(C._oCurItem);}else{C._toggleContainer(false);}}break;case 27:C._toggleContainer(false);return ;case 39:C._jumpSelection();break;case 38:YAHOO.util.Event.stopEvent(A);C._moveSelection(D);break;case 40:YAHOO.util.Event.stopEvent(A);C._moveSelection(D);break;default:break;}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress=function(A,C){var D=A.keyCode;var B=(navigator.userAgent.toLowerCase().indexOf("mac")!=-1);if(B){switch(D){case 9:if(C._oCurItem){if(C.delimChar&&(C._nKeyCode!=D)){YAHOO.util.Event.stopEvent(A);}}break;case 13:if(C._oCurItem){if(C._nKeyCode!=D){if(C._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}C._selectItem(C._oCurItem);}else{C._toggleContainer!
 (false);}break;case 38:case 40:YAHOO.util.Event.stopEvent(A);b!
 reak;def
ault:break;}}else{if(D==229){C._queryInterval=setInterval(function(){C._onIMEDetected(C);},500);}}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp=function(B,D){D._initProps();var E=B.keyCode;D._nKeyCode=E;var C=this.value;if(D._isIgnoreKey(E)||(C.toLowerCase()==D._sCurQuery)){return ;}else{D._bItemSelected=false;YAHOO.util.Dom.removeClass(D._oCurItem,D.highlightClassName);D._oCurItem=null;D.textboxKeyEvent.fire(D,E);}if(D.queryDelay>0){var A=setTimeout(function(){D._sendQuery(C);},(D.queryDelay*1000));if(D._nDelayID!=-1){clearTimeout(D._nDelayID);}D._nDelayID=A;}else{D._sendQuery(C);}};YAHOO.widget.AutoComplete.prototype._onTextboxFocus=function(A,B){B._oTextbox.setAttribute("autocomplete","off");B._bFocused=true;if(!B._bItemSelected){B.textboxFocusEvent.fire(B);}};YAHOO.widget.AutoComplete.prototype._onTextboxBlur=function(A,B){if(!B._bOverContainer||(B._nKeyCode==9)){if(!B._bItemSelected){var C=B._textMatchesOption();if(!B._bContainerOpen||(B._bContainerOpen&&(C===nu!
 ll))){if(B.forceSelection){B._clearSelection();}else{B.unmatchedItemSelectEvent.fire(B);}}else{if(B.forceSelection){B._selectItem(C);}}}if(B._bContainerOpen){B._toggleContainer(false);}B._cancelIntervalDetection(B);B._bFocused=false;B.textboxBlurEvent.fire(B);}};YAHOO.widget.AutoComplete.prototype._onWindowUnload=function(A,B){if(B&&B._oTextbox&&B.allowBrowserAutocomplete){B._oTextbox.setAttribute("autocomplete","on");}};YAHOO.widget.DataSource=function(){};YAHOO.widget.DataSource.ERROR_DATANULL="Response data was null";YAHOO.widget.DataSource.ERROR_DATAPARSE="Response data could not be parsed";YAHOO.widget.DataSource.prototype.maxCacheEntries=15;YAHOO.widget.DataSource.prototype.queryMatchContains=false;YAHOO.widget.DataSource.prototype.queryMatchSubset=false;YAHOO.widget.DataSource.prototype.queryMatchCase=false;YAHOO.widget.DataSource.prototype.toString=function(){return"DataSource "+this._sName;};YAHOO.widget.DataSource.prototype.getResults=function(A,D,B){var C=this._d!
 oQueryCache(A,D,B);
+if(C.length===0){this.queryEvent.fire(this,B,D);this.doQuery(A,D,B);}};YAHOO.widget.DataSource.prototype.doQuery=function(A,C,B){};YAHOO.widget.DataSource.prototype.flushCache=function(){if(this._aCache){this._aCache=[];}if(this._aCacheHelper){this._aCacheHelper=[];}this.cacheFlushEvent.fire(this);};YAHOO.widget.DataSource.prototype.queryEvent=null;YAHOO.widget.DataSource.prototype.cacheQueryEvent=null;YAHOO.widget.DataSource.prototype.getResultsEvent=null;YAHOO.widget.DataSource.prototype.getCachedResultsEvent=null;YAHOO.widget.DataSource.prototype.dataErrorEvent=null;YAHOO.widget.DataSource.prototype.cacheFlushEvent=null;YAHOO.widget.DataSource._nIndex=0;YAHOO.widget.DataSource.prototype._sName=null;YAHOO.widget.DataSource.prototype._aCache=null;YAHOO.widget.DataSource.prototype._init=function(){var A=this.maxCacheEntries;if(!YAHOO.lang.isNumber(A)||(A<0)){A=0;}if(A>0&&!this._aCache){this._aCache=[];}this._sName="instance"+YAHOO.widget.DataSource._nIndex;YAHOO.widget.Data!
 Source._nIndex++;this.queryEvent=new YAHOO.util.CustomEvent("query",this);this.cacheQueryEvent=new YAHOO.util.CustomEvent("cacheQuery",this);this.getResultsEvent=new YAHOO.util.CustomEvent("getResults",this);this.getCachedResultsEvent=new YAHOO.util.CustomEvent("getCachedResults",this);this.dataErrorEvent=new YAHOO.util.CustomEvent("dataError",this);this.cacheFlushEvent=new YAHOO.util.CustomEvent("cacheFlush",this);};YAHOO.widget.DataSource.prototype._addCacheElem=function(B){var A=this._aCache;if(!A||!B||!B.query||!B.results){return ;}if(A.length>=this.maxCacheEntries){A.shift();}A.push(B);};YAHOO.widget.DataSource.prototype._doQueryCache=function(A,I,N){var H=[];var G=false;var J=this._aCache;var F=(J)?J.length:0;var K=this.queryMatchContains;var D;if((this.maxCacheEntries>0)&&J&&(F>0)){this.cacheQueryEvent.fire(this,N,I);if(!this.queryMatchCase){D=I;I=I.toLowerCase();}for(var P=F-1;P>=0;P--){var E=J[P];var B=E.results;var C=(!this.queryMatchCase)?encodeURIComponent(E.que!
 ry).toLowerCase():encodeURIComponent(E.query);if(C==I){G=true;!
 H=B;if(P
!=F-1){J.splice(P,1);this._addCacheElem(E);}break;}else{if(this.queryMatchSubset){for(var O=I.length-1;O>=0;O--){var R=I.substr(0,O);if(C==R){G=true;for(var M=B.length-1;M>=0;M--){var Q=B[M];var L=(this.queryMatchCase)?encodeURIComponent(Q[0]).indexOf(I):encodeURIComponent(Q[0]).toLowerCase().indexOf(I);if((!K&&(L===0))||(K&&(L>-1))){H.unshift(Q);}}E={};E.query=I;E.results=H;this._addCacheElem(E);break;}}if(G){break;}}}}if(G){this.getCachedResultsEvent.fire(this,N,D,H);A(D,H,N);}}return H;};YAHOO.widget.DS_XHR=function(C,A,D){if(D&&(D.constructor==Object)){for(var B in D){this[B]=D[B];}}if(!YAHOO.lang.isArray(A)||!YAHOO.lang.isString(C)){return ;}this.schema=A;this.scriptURI=C;this._init();};YAHOO.widget.DS_XHR.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_XHR.TYPE_JSON=0;YAHOO.widget.DS_XHR.TYPE_XML=1;YAHOO.widget.DS_XHR.TYPE_FLAT=2;YAHOO.widget.DS_XHR.ERROR_DATAXHR="XHR response failed";YAHOO.widget.DS_XHR.prototype.connMgr=YAHOO.util.Connect;YAHOO.widget.DS_XHR.!
 prototype.connTimeout=0;YAHOO.widget.DS_XHR.prototype.scriptURI=null;YAHOO.widget.DS_XHR.prototype.scriptQueryParam="query";YAHOO.widget.DS_XHR.prototype.scriptQueryAppend="";YAHOO.widget.DS_XHR.prototype.responseType=YAHOO.widget.DS_XHR.TYPE_JSON;YAHOO.widget.DS_XHR.prototype.responseStripAfter="\n<!-";YAHOO.widget.DS_XHR.prototype.doQuery=function(E,G,B){var J=(this.responseType==YAHOO.widget.DS_XHR.TYPE_XML);var D=this.scriptURI+"?"+this.scriptQueryParam+"="+G;if(this.scriptQueryAppend.length>0){D+="&"+this.scriptQueryAppend;}var C=null;var F=this;var I=function(K){if(!F._oConn||(K.tId!=F._oConn.tId)){F.dataErrorEvent.fire(F,B,G,YAHOO.widget.DataSource.ERROR_DATANULL);return ;}for(var N in K){}if(!J){K=K.responseText;}else{K=K.responseXML;}if(K===null){F.dataErrorEvent.fire(F,B,G,YAHOO.widget.DataSource.ERROR_DATANULL);return ;}var M=F.parseResponse(G,K,B);var L={};L.query=decodeURIComponent(G);L.results=M;if(M===null){F.dataErrorEvent.fire(F,B,G,YAHOO.widget.DataSource.!
 ERROR_DATAPARSE);M=[];}else{F.getResultsEvent.fire(F,B,G,M);F.!
 _addCach
eElem(L);}E(G,M,B);};var A=function(K){F.dataErrorEvent.fire(F,B,G,YAHOO.widget.DS_XHR.ERROR_DATAXHR);return ;};var H={success:I,failure:A};if(YAHOO.lang.isNumber(this.connTimeout)&&(this.connTimeout>0)){H.timeout=this.connTimeout;}if(this._oConn){this.connMgr.abort(this._oConn);}F._oConn=this.connMgr.asyncRequest("GET",D,H,null);};YAHOO.widget.DS_XHR.prototype.parseResponse=function(sQuery,oResponse,oParent){var aSchema=this.schema;var aResults=[];var bError=false;var nEnd=((this.responseStripAfter!=="")&&(oResponse.indexOf))?oResponse.indexOf(this.responseStripAfter):-1;if(nEnd!=-1){oResponse=oResponse.substring(0,nEnd);}switch(this.responseType){case YAHOO.widget.DS_XHR.TYPE_JSON:var jsonList,jsonObjParsed;var isNotMac=(navigator.userAgent.toLowerCase().indexOf("khtml")==-1);if(oResponse.parseJSON&&isNotMac){jsonObjParsed=oResponse.parseJSON();if(!jsonObjParsed){bError=true;}else{try{jsonList=eval("jsonObjParsed."+aSchema[0]);}catch(e){bError=true;break;}}}else{if(YAHOO.l!
 ang.JSON&&isNotMac){jsonObjParsed=YAHOO.lang.JSON.parse(oResponse);if(!jsonObjParsed){bError=true;break;}else{try{jsonList=eval("jsonObjParsed."+aSchema[0]);}catch(e){bError=true;break;}}}else{if(window.JSON&&isNotMac){jsonObjParsed=JSON.parse(oResponse);if(!jsonObjParsed){bError=true;break;}else{try{jsonList=eval("jsonObjParsed."+aSchema[0]);}catch(e){bError=true;break;}}}else{try{while(oResponse.substring(0,1)==" "){oResponse=oResponse.substring(1,oResponse.length);}if(oResponse.indexOf("{")<0){bError=true;break;}if(oResponse.indexOf("{}")===0){break;}var jsonObjRaw=eval("("+oResponse+")");if(!jsonObjRaw){bError=true;break;}jsonList=eval("(jsonObjRaw."+aSchema[0]+")");}catch(e){bError=true;break;}}}}if(!jsonList){bError=true;break;}if(!YAHOO.lang.isArray(jsonList)){jsonList=[jsonList];}for(var i=jsonList.length-1;i>=0;i--){var aResultItem=[];var jsonResult=jsonList[i];for(var j=aSchema.length-1;j>=1;j--){var dataFieldValue=jsonResult[aSchema[j]];
+if(!dataFieldValue){dataFieldValue="";}aResultItem.unshift(dataFieldValue);}if(aResultItem.length==1){aResultItem.push(jsonResult);}aResults.unshift(aResultItem);}break;case YAHOO.widget.DS_XHR.TYPE_XML:var xmlList=oResponse.getElementsByTagName(aSchema[0]);if(!xmlList){bError=true;break;}for(var k=xmlList.length-1;k>=0;k--){var result=xmlList.item(k);var aFieldSet=[];for(var m=aSchema.length-1;m>=1;m--){var sValue=null;var xmlAttr=result.attributes.getNamedItem(aSchema[m]);if(xmlAttr){sValue=xmlAttr.value;}else{var xmlNode=result.getElementsByTagName(aSchema[m]);if(xmlNode&&xmlNode.item(0)&&xmlNode.item(0).firstChild){sValue=xmlNode.item(0).firstChild.nodeValue;}else{sValue="";}}aFieldSet.unshift(sValue);}aResults.unshift(aFieldSet);}break;case YAHOO.widget.DS_XHR.TYPE_FLAT:if(oResponse.length>0){var newLength=oResponse.length-aSchema[0].length;if(oResponse.substr(newLength)==aSchema[0]){oResponse=oResponse.substr(0,newLength);}var aRecords=oResponse.split(aSchema[0]);for(!
 var n=aRecords.length-1;n>=0;n--){aResults[n]=aRecords[n].split(aSchema[1]);}}break;default:break;}sQuery=null;oResponse=null;oParent=null;if(bError){return null;}else{return aResults;}};YAHOO.widget.DS_XHR.prototype._oConn=null;YAHOO.widget.DS_ScriptNode=function(D,A,C){if(C&&(C.constructor==Object)){for(var B in C){this[B]=C[B];}}if(!YAHOO.lang.isArray(A)||!YAHOO.lang.isString(D)){return ;}this.schema=A;this.scriptURI=D;this._init();};YAHOO.widget.DS_ScriptNode.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_ScriptNode.prototype.getUtility=YAHOO.util.Get;YAHOO.widget.DS_ScriptNode.prototype.scriptURI=null;YAHOO.widget.DS_ScriptNode.prototype.scriptQueryParam="query";YAHOO.widget.DS_ScriptNode.prototype.asyncMode="allowAll";YAHOO.widget.DS_ScriptNode.prototype.scriptCallbackParam="callback";YAHOO.widget.DS_ScriptNode.callbacks=[];YAHOO.widget.DS_ScriptNode._nId=0;YAHOO.widget.DS_ScriptNode._nPending=0;YAHOO.widget.DS_ScriptNode.prototype.doQuery=function(A,F,C){var!
  B=this;if(YAHOO.widget.DS_ScriptNode._nPending===0){YAHOO.wid!
 get.DS_S
criptNode.callbacks=[];YAHOO.widget.DS_ScriptNode._nId=0;}var E=YAHOO.widget.DS_ScriptNode._nId;YAHOO.widget.DS_ScriptNode._nId++;YAHOO.widget.DS_ScriptNode.callbacks[E]=function(G){if((B.asyncMode!=="ignoreStaleResponses")||(E===YAHOO.widget.DS_ScriptNode.callbacks.length-1)){B.handleResponse(G,A,F,C);}else{}delete YAHOO.widget.DS_ScriptNode.callbacks[E];};YAHOO.widget.DS_ScriptNode._nPending++;var D=this.scriptURI+"&"+this.scriptQueryParam+"="+F+"&"+this.scriptCallbackParam+"=YAHOO.widget.DS_ScriptNode.callbacks["+E+"]";this.getUtility.script(D,{autopurge:true,onsuccess:YAHOO.widget.DS_ScriptNode._bumpPendingDown,onfail:YAHOO.widget.DS_ScriptNode._bumpPendingDown});};YAHOO.widget.DS_ScriptNode.prototype.handleResponse=function(oResponse,oCallbackFn,sQuery,oParent){var aSchema=this.schema;var aResults=[];var bError=false;var jsonList,jsonObjParsed;try{jsonList=eval("(oResponse."+aSchema[0]+")");}catch(e){bError=true;}if(!jsonList){bError=true;jsonList=[];}else{if(!YAHOO.lan!
 g.isArray(jsonList)){jsonList=[jsonList];}}for(var i=jsonList.length-1;i>=0;i--){var aResultItem=[];var jsonResult=jsonList[i];for(var j=aSchema.length-1;j>=1;j--){var dataFieldValue=jsonResult[aSchema[j]];if(!dataFieldValue){dataFieldValue="";}aResultItem.unshift(dataFieldValue);}if(aResultItem.length==1){aResultItem.push(jsonResult);}aResults.unshift(aResultItem);}if(bError){aResults=null;}if(aResults===null){this.dataErrorEvent.fire(this,oParent,sQuery,YAHOO.widget.DataSource.ERROR_DATAPARSE);aResults=[];}else{var resultObj={};resultObj.query=decodeURIComponent(sQuery);resultObj.results=aResults;this._addCacheElem(resultObj);this.getResultsEvent.fire(this,oParent,sQuery,aResults);}oCallbackFn(sQuery,aResults,oParent);};YAHOO.widget.DS_ScriptNode._bumpPendingDown=function(){YAHOO.widget.DS_ScriptNode._nPending--;};YAHOO.widget.DS_JSFunction=function(A,C){if(C&&(C.constructor==Object)){for(var B in C){this[B]=C[B];}}if(!YAHOO.lang.isFunction(A)){return ;}else{this.dataFunc!
 tion=A;this._init();}};YAHOO.widget.DS_JSFunction.prototype=ne!
 w YAHOO.
widget.DataSource();YAHOO.widget.DS_JSFunction.prototype.dataFunction=null;YAHOO.widget.DS_JSFunction.prototype.doQuery=function(C,F,D){var B=this.dataFunction;var E=[];E=B(F);if(E===null){this.dataErrorEvent.fire(this,D,F,YAHOO.widget.DataSource.ERROR_DATANULL);return ;}var A={};A.query=decodeURIComponent(F);A.results=E;this._addCacheElem(A);this.getResultsEvent.fire(this,D,F,E);C(F,E,D);return ;};YAHOO.widget.DS_JSArray=function(A,C){if(C&&(C.constructor==Object)){for(var B in C){this[B]=C[B];}}if(!YAHOO.lang.isArray(A)){return ;}else{this.data=A;this._init();}};YAHOO.widget.DS_JSArray.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_JSArray.prototype.data=null;YAHOO.widget.DS_JSArray.prototype.doQuery=function(E,I,A){var F;var C=this.data;var J=[];var D=false;var B=this.queryMatchContains;if(I){if(!this.queryMatchCase){I=I.toLowerCase();}for(F=C.length-1;F>=0;F--){var H=[];if(YAHOO.lang.isString(C[F])){H[0]=C[F];}else{if(YAHOO.lang.isArray(C[F])){H=C[F];}}if(YAHOO.!
 lang.isString(H[0])){var G=(this.queryMatchCase)?encodeURIComponent(H[0]).indexOf(I):encodeURIComponent(H[0]).toLowerCase().indexOf(I);if((!B&&(G===0))||(B&&(G>-1))){J.unshift(H);}}}}else{for(F=C.length-1;F>=0;F--){if(YAHOO.lang.isString(C[F])){J.unshift([C[F]]);}else{if(YAHOO.lang.isArray(C[F])){J.unshift(C[F]);}}}}this.getResultsEvent.fire(this,A,I,J);E(I,J,A);};YAHOO.register("autocomplete",YAHOO.widget.AutoComplete,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/autocomplete/autocomplete.js
===================================================================
--- trunk/root/static/yui/autocomplete/autocomplete.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/autocomplete/autocomplete.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
  /**
  * The AutoComplete control provides the front-end logic for text-entry suggestion and
@@ -121,10 +121,8 @@
         YAHOO.util.Event.addListener(oContent,"mouseout",oSelf._onContainerMouseout,oSelf);
         YAHOO.util.Event.addListener(oContent,"scroll",oSelf._onContainerScroll,oSelf);
         YAHOO.util.Event.addListener(oContent,"resize",oSelf._onContainerResize,oSelf);
-        if(oTextbox.form) {
-            YAHOO.util.Event.addListener(oTextbox.form,"submit",oSelf._onFormSubmit,oSelf);
-        }
         YAHOO.util.Event.addListener(oTextbox,"keypress",oSelf._onTextboxKeyPress,oSelf);
+        YAHOO.util.Event.addListener(window,"unload",oSelf._onWindowUnload,oSelf);
 
         // Custom events
         this.textboxFocusEvent = new YAHOO.util.CustomEvent("textboxFocus", this);
@@ -1902,17 +1900,20 @@
             }
             break;
         case 13: // enter
-            if(oSelf._oCurItem) {
-                if(oSelf._nKeyCode != nKeyCode) {
-                    if(oSelf._bContainerOpen) {
-                        YAHOO.util.Event.stopEvent(v);
+            var isMac = (navigator.userAgent.toLowerCase().indexOf("mac") != -1);
+            if(!isMac) {
+                if(oSelf._oCurItem) {
+                    if(oSelf._nKeyCode != nKeyCode) {
+                        if(oSelf._bContainerOpen) {
+                            YAHOO.util.Event.stopEvent(v);
+                        }
                     }
+                    oSelf._selectItem(oSelf._oCurItem);
                 }
-                oSelf._selectItem(oSelf._oCurItem);
+                else {
+                    oSelf._toggleContainer(false);
+                }
             }
-            else {
-                oSelf._toggleContainer(false);
-            }
             break;
         case 27: // esc
             oSelf._toggleContainer(false);
@@ -1961,7 +1962,11 @@
                             YAHOO.util.Event.stopEvent(v);
                         }
                     }
+                    oSelf._selectItem(oSelf._oCurItem);
                 }
+                else {
+                    oSelf._toggleContainer(false);
+                }
                 break;
             case 38: // up
             case 40: // down
@@ -2084,20 +2089,17 @@
 };
 
 /**
- * Handles form submission event.
+ * Handles window unload event.
  *
- * @method _onFormSubmit
- * @param v {HTMLEvent} The submit event.
+ * @method _onWindowUnload
+ * @param v {HTMLEvent} The unload event.
  * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance.
  * @private
  */
-YAHOO.widget.AutoComplete.prototype._onFormSubmit = function(v,oSelf) {
-    if(oSelf.allowBrowserAutocomplete) {
+YAHOO.widget.AutoComplete.prototype._onWindowUnload = function(v,oSelf) {
+    if(oSelf && oSelf._oTextbox && oSelf.allowBrowserAutocomplete) {
         oSelf._oTextbox.setAttribute("autocomplete","on");
     }
-    else {
-        oSelf._oTextbox.setAttribute("autocomplete","off");
-    }
 };
 
 /****************************************************************************/
@@ -2828,6 +2830,25 @@
                    }
                 }
             }
+            // Check for YUI JSON lib but divert KHTML clients
+            else if(YAHOO.lang.JSON && isNotMac) {
+                // Use the JSON utility if available
+                jsonObjParsed = YAHOO.lang.JSON.parse(oResponse);
+                if(!jsonObjParsed) {
+                    bError = true;
+                    break;
+                }
+                else {
+                    try {
+                        // eval is necessary here since aSchema[0] is of unknown depth
+                        jsonList = eval("jsonObjParsed." + aSchema[0]);
+                    }
+                    catch(e) {
+                        bError = true;
+                        break;
+                   }
+                }
+            }
             else if(window.JSON && isNotMac) {
                 // Use older JSON lib if available
                 jsonObjParsed = JSON.parse(oResponse);
@@ -2891,7 +2912,7 @@
             if(!YAHOO.lang.isArray(jsonList)) {
                 jsonList = [jsonList];
             }
-            
+
             // Loop through the array of all responses...
             for(var i = jsonList.length-1; i >= 0 ; i--) {
                 var aResultItem = [];
@@ -2997,6 +3018,285 @@
 /****************************************************************************/
 
 /**
+ * Implementation of YAHOO.widget.DataSource using the Get Utility to generate
+ * dynamic SCRIPT nodes for data retrieval.
+ *
+ * @class DS_ScriptNode
+ * @constructor
+ * @extends YAHOO.widget.DataSource
+ * @param sUri {String} URI to the script location that will return data.
+ * @param aSchema {String[]} Data schema definition of results.
+ * @param oConfigs {Object} (optional) Object literal of config params.
+ */
+YAHOO.widget.DS_ScriptNode = function(sUri, aSchema, oConfigs) {
+    // Set any config params passed in to override defaults
+    if(oConfigs && (oConfigs.constructor == Object)) {
+        for(var sConfig in oConfigs) {
+            this[sConfig] = oConfigs[sConfig];
+        }
+    }
+
+    // Initialization sequence
+    if(!YAHOO.lang.isArray(aSchema) || !YAHOO.lang.isString(sUri)) {
+        return;
+    }
+
+    this.schema = aSchema;
+    this.scriptURI = sUri;
+
+    this._init();
+};
+
+YAHOO.widget.DS_ScriptNode.prototype = new YAHOO.widget.DataSource();
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Public member variables
+//
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Alias to YUI Get Utility. Allows implementers to specify their own
+ * subclasses of the YUI Get Utility.
+ *
+ * @property getUtility
+ * @type Object
+ * @default YAHOO.util.Get
+ */
+YAHOO.widget.DS_ScriptNode.prototype.getUtility = YAHOO.util.Get;
+
+/**
+ * URI to the script that returns data.
+ *
+ * @property scriptURI
+ * @type String
+ */
+YAHOO.widget.DS_ScriptNode.prototype.scriptURI = null;
+
+/**
+ * Query string parameter name sent to scriptURI. For instance, requests will be
+ * sent to <scriptURI>?<scriptQueryParam>=queryString
+ *
+ * @property scriptQueryParam
+ * @type String
+ * @default "query"
+ */
+YAHOO.widget.DS_ScriptNode.prototype.scriptQueryParam = "query";
+
+/**
+ * Defines request/response management in the following manner:
+ * <dl>
+ *     <!--<dt>queueRequests</dt>
+ *     <dd>If a request is already in progress, wait until response is returned before sending the next request.</dd>
+ *     <dt>cancelStaleRequests</dt>
+ *     <dd>If a request is already in progress, cancel it before sending the next request.</dd>-->
+ *     <dt>ignoreStaleResponses</dt>
+ *     <dd>Send all requests, but handle only the response for the most recently sent request.</dd>
+ *     <dt>allowAll</dt>
+ *     <dd>Send all requests and handle all responses.</dd>
+ * </dl>
+ *
+ * @property asyncMode
+ * @type String
+ * @default "allowAll"
+ */
+YAHOO.widget.DS_ScriptNode.prototype.asyncMode = "allowAll";
+
+/**
+ * Callback string parameter name sent to scriptURI. For instance, requests will be
+ * sent to <scriptURI>?<scriptCallbackParam>=callbackFunction
+ *
+ * @property scriptCallbackParam
+ * @type String
+ * @default "callback"
+ */
+YAHOO.widget.DS_ScriptNode.prototype.scriptCallbackParam = "callback";
+
+/**
+ * Global array of callback functions, one for each request sent.
+ *
+ * @property callbacks
+ * @type Function[]
+ * @static
+ */
+YAHOO.widget.DS_ScriptNode.callbacks = [];
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Private member variables
+//
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Unique ID to track requests.
+ *
+ * @property _nId
+ * @type Number
+ * @private
+ * @static
+ */
+YAHOO.widget.DS_ScriptNode._nId = 0;
+
+/**
+ * Counter for pending requests. When this is 0, it is safe to purge callbacks
+ * array.
+ *
+ * @property _nPending
+ * @type Number
+ * @private
+ * @static
+ */
+YAHOO.widget.DS_ScriptNode._nPending = 0;
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Public methods
+//
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Queries the live data source. Results are passed back to a callback function.
+ *
+ * @method doQuery
+ * @param oCallbackFn {HTMLFunction} Callback function defined by oParent object to which to return results.
+ * @param sQuery {String} Query string.
+ * @param oParent {Object} The object instance that has requested data.
+ */
+YAHOO.widget.DS_ScriptNode.prototype.doQuery = function(oCallbackFn, sQuery, oParent) {
+    var oSelf = this;
+    
+    // If there are no global pending requests, it is safe to purge global callback stack and global counter
+    if(YAHOO.widget.DS_ScriptNode._nPending === 0) {
+        YAHOO.widget.DS_ScriptNode.callbacks = [];
+        YAHOO.widget.DS_ScriptNode._nId = 0;
+    }
+    
+    // ID for this request
+    var id = YAHOO.widget.DS_ScriptNode._nId;
+    YAHOO.widget.DS_ScriptNode._nId++;
+
+    // Dynamically add handler function with a closure to the callback stack
+    YAHOO.widget.DS_ScriptNode.callbacks[id] = function(oResponse) {
+        if((oSelf.asyncMode !== "ignoreStaleResponses")||
+                (id === YAHOO.widget.DS_ScriptNode.callbacks.length-1)) { // Must ignore stale responses
+            oSelf.handleResponse(oResponse, oCallbackFn, sQuery, oParent);
+        }
+        else {
+        }
+
+        delete YAHOO.widget.DS_ScriptNode.callbacks[id];
+    };
+
+    // We are now creating a request
+    YAHOO.widget.DS_ScriptNode._nPending++;
+
+    var sUri = this.scriptURI+"&"+ this.scriptQueryParam+"="+sQuery+"&"+
+            this.scriptCallbackParam+"=YAHOO.widget.DS_ScriptNode.callbacks["+id+"]";
+    this.getUtility.script(sUri,
+            {autopurge:true,
+            onsuccess:YAHOO.widget.DS_ScriptNode._bumpPendingDown,
+            onfail:YAHOO.widget.DS_ScriptNode._bumpPendingDown});
+};
+
+/**
+ * Parses JSON response data into an array of result objects and passes it to
+ * the callback function.
+ *
+ * @method handleResponse
+ * @param oResponse {Object} The raw response data to parse.
+ * @param oCallbackFn {HTMLFunction} Callback function defined by oParent object to which to return results.
+ * @param sQuery {String} Query string.
+ * @param oParent {Object} The object instance that has requested data.
+ */
+YAHOO.widget.DS_ScriptNode.prototype.handleResponse = function(oResponse, oCallbackFn, sQuery, oParent) {
+    var aSchema = this.schema;
+    var aResults = [];
+    var bError = false;
+
+    var jsonList, jsonObjParsed;
+
+    // Parse the JSON response as a string
+    try {
+        // Grab the object member that contains an array of all reponses...
+        // ...eval is necessary here since aSchema[0] is of unknown depth
+        jsonList = eval("(oResponse." + aSchema[0]+")");
+    }
+    catch(e) {
+        bError = true;
+   }
+
+    if(!jsonList) {
+        bError = true;
+        jsonList = [];
+    }
+
+    else if(!YAHOO.lang.isArray(jsonList)) {
+        jsonList = [jsonList];
+    }
+
+    // Loop through the array of all responses...
+    for(var i = jsonList.length-1; i >= 0 ; i--) {
+        var aResultItem = [];
+        var jsonResult = jsonList[i];
+        // ...and loop through each data field value of each response
+        for(var j = aSchema.length-1; j >= 1 ; j--) {
+            // ...and capture data into an array mapped according to the schema...
+            var dataFieldValue = jsonResult[aSchema[j]];
+            if(!dataFieldValue) {
+                dataFieldValue = "";
+            }
+            aResultItem.unshift(dataFieldValue);
+        }
+        // If schema isn't well defined, pass along the entire result object
+        if(aResultItem.length == 1) {
+            aResultItem.push(jsonResult);
+        }
+        // Capture the array of data field values in an array of results
+        aResults.unshift(aResultItem);
+    }
+
+    if(bError) {
+        aResults = null;
+    }
+
+    if(aResults === null) {
+        this.dataErrorEvent.fire(this, oParent, sQuery, YAHOO.widget.DataSource.ERROR_DATAPARSE);
+        aResults = [];
+    }
+    else {
+        var resultObj = {};
+        resultObj.query = decodeURIComponent(sQuery);
+        resultObj.results = aResults;
+        this._addCacheElem(resultObj);
+        
+        this.getResultsEvent.fire(this, oParent, sQuery, aResults);
+    }
+
+    oCallbackFn(sQuery, aResults, oParent);
+};
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Private methods
+//
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Any success/failure response should decrement counter.
+ *
+ * @method _bumpPendingDown
+ * @private
+ */
+YAHOO.widget.DS_ScriptNode._bumpPendingDown = function() {
+    YAHOO.widget.DS_ScriptNode._nPending--;
+};
+
+
+/****************************************************************************/
+/****************************************************************************/
+/****************************************************************************/
+
+/**
  * Implementation of YAHOO.widget.DataSource using a native Javascript function as
  * its live data source.
  *  
@@ -3075,6 +3375,7 @@
     return;
 };
 
+
 /****************************************************************************/
 /****************************************************************************/
 /****************************************************************************/
@@ -3191,4 +3492,4 @@
     oCallbackFn(sQuery, aResults, oParent);
 };
 
-YAHOO.register("autocomplete", YAHOO.widget.AutoComplete, {version: "2.3.1", build: "541"});
+YAHOO.register("autocomplete", YAHOO.widget.AutoComplete, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/base/README
===================================================================
--- trunk/root/static/yui/base/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/base/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,16 @@
 YUI Library - Base - Release Notes
 
+Version 2.4.0
+  * No change
+
+Version 2.4.0
+
+  * Fixed typo in comments.
+  * Added margin-bottom:1em; for PRE element to match P
+  * Added color:#000 for legend element, accomodation for IE
+  * Added set width (equivilant to 160px but set in EMs) for input's
+    width type = text or password, and for textareas. 
+  
 Version 2.3.0
 
-  * Initial release.
\ No newline at end of file
+  * Initial release.

Modified: trunk/root/static/yui/base/base-min.css
===================================================================
--- trunk/root/static/yui/base/base-min.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/base/base-min.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-h1{font-size:138.5%;}h2{font-size:123.1%;}h3{font-size:108%;}h1,h2,h3{margin:1em 0;}h1,h2,h3,h4,h5,h6,strong{font-weight:bold;}abbr,acronym{border-bottom:1px dotted #000;cursor:help;}em{font-style:italic;}blockquote,ul,ol,dl{margin:1em;}ol,ul,dl{margin-left:2em;}ol li{list-style: decimal outside;}ul li{list-style: disc outside;}dl dd{margin-left:1em;}th,td {border:1px solid #000;padding:.5em;}th {font-weight:bold;text-align:center;}caption {margin-bottom:.5em;text-align:center;}p,fieldset,table {margin-bottom:1em;}
\ No newline at end of file
+h1{font-size:138.5%;}h2{font-size:123.1%;}h3{font-size:108%;}h1,h2,h3{margin:1em 0;}h1,h2,h3,h4,h5,h6,strong{font-weight:bold;}abbr,acronym{border-bottom:1px dotted #000;cursor:help;} em{font-style:italic;}blockquote,ul,ol,dl{margin:1em;}ol,ul,dl{margin-left:2em;}ol li{list-style:decimal outside;}ul li{list-style:disc outside;}dl dd{margin-left:1em;}th,td{border:1px solid #000;padding:.5em;}th{font-weight:bold;text-align:center;}caption{margin-bottom:.5em;text-align:center;}p,fieldset,table,pre{margin-bottom:1em;}input[type=text],input[type=password],textarea{width:12.25em;*width:11.9em;}

Modified: trunk/root/static/yui/base/base.css
===================================================================
--- trunk/root/static/yui/base/base.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/base/base.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* base.css, part of YUI's CSS Foundation */
 h1 {
@@ -65,12 +65,15 @@
 	text-align:center;
 }
 caption {
-	/*coordinated marking to match cell's padding*/
+	/*coordinated margin to match cell's padding*/
 	margin-bottom:.5em;
 	/*centered so it doesn't blend in to other content*/
 	text-align:center;
 }
-p,fieldset,table {
+p,fieldset,table,pre {
 	/*so things don't run into each other*/
 	margin-bottom:1em;
-}
\ No newline at end of file
+}
+/* setting a consistent width, 160px; 
+   control of type=file still not possible */
+input[type=text],input[type=password],textarea{width:12.25em;*width:11.9em;}

Modified: trunk/root/static/yui/button/README
===================================================================
--- trunk/root/static/yui/button/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/button/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,3 +1,39 @@
+*** Version 2.4.1 ***
+No change
+
+*** Version 2.4.0 ***
+
+Added the following features:
+-----------------------------
+
++ Added a static method "YAHOO.widget.Button.getButton" that returns a Button 
+  instance with the specified HTML element id.
+
+
+Fixed the following bugs:
+-------------------------
+
++ Removed the ".yui-skin-sam" CSS class name from style rules in the core 
+  stylesheet so that it is now truly skin agnostic.
+
++ Updated the default text for tooltips for Buttons of type "radio" so that 
+  they offer the correct instructional text.
+
++ Menus with grouped YAHOO.widget.MenuItem instances will now highlight 
+  correctly when used with Button.
+
++ Buttons of type "link" now have the same default height as other Button
+  types in Internet Explorer.
+
++ Buttons of various types now line up correctly on the same line.
+
++ Menu is now truly an optional dependancy of Button.
+
++ Menus now render with the correct width when the "yui-skin-sam" CSS class 
+  name is applied to an element other than the <BODY>.
+
+
+
 *** Version 2.3.1 ***
 
 Fixed the following bugs:

Modified: trunk/root/static/yui/button/assets/button-core.css
===================================================================
--- trunk/root/static/yui/button/assets/button-core.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/button/assets/button-core.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,32 +2,34 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-.yui-skin-sam .yui-button  {
+.yui-button  {
 
     display: -moz-inline-box; /* Gecko */
     display: inline-block; /* IE, Opera and Safari */
+    vertical-align: text-bottom;
     
 }
 
-.yui-skin-sam .yui-button .first-child {
+.yui-button .first-child {
 
     display: block;
     *display: inline-block; /* IE */
 
 }
 
-.yui-skin-sam .yui-button button,
-.yui-skin-sam .yui-button a {
+.yui-button button,
+.yui-button a {
 
     display: block;
     *display: inline-block; /* IE */
     border: none;
+    margin: 0;
 
 }
 
-.yui-skin-sam .yui-button button {
+.yui-button button {
 
     background-color: transparent;
     *overflow: visible; /* Remove superfluous padding for IE */
@@ -35,7 +37,7 @@
 
 }
 
-.yui-skin-sam .yui-button a {
+.yui-button a {
 
     text-decoration: none;
 

Modified: trunk/root/static/yui/button/assets/skins/sam/button-skin.css
===================================================================
--- trunk/root/static/yui/button/assets/skins/sam/button-skin.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/button/assets/skins/sam/button-skin.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 .yui-skin-sam .yui-button  {
 
@@ -20,7 +20,7 @@
     border-style: solid;
     border-color: #808080;
     margin: 0 -1px;
-    *position: relative;
+    *position: relative;    /* Necessary to get negative margins working in IE */
     *left: -1px;
 
 }
@@ -38,6 +38,16 @@
 
 }
 
+.yui-skin-sam .yui-button a {
+
+    /*
+        Necessary to get Button's of type "link" to be the correct 
+        height in IE.
+    */
+    *line-height: 2;
+
+}
+
 .yui-skin-sam .yui-split-button button,
 .yui-skin-sam .yui-menu-button button {
 

Modified: trunk/root/static/yui/button/assets/skins/sam/button.css
===================================================================
--- trunk/root/static/yui/button/assets/skins/sam/button.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/button/assets/skins/sam/button.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-.yui-skin-sam .yui-button{display:-moz-inline-box;display:inline-block;}.yui-skin-sam .yui-button .first-child{display:block;*display:inline-block;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a{display:block;*display:inline-block;border:none;}.yui-skin-sam .yui-button button{background-color:transparent;*overflow:visible;cursor:pointer;}.yui-skin-sam .yui-button a{text-decoration:none;}.yui-skin-sam .yui-button{border-width:1px 0;border-style:solid;border-color:#808080;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;*position:relative;*left:-1px;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a{padding:0 10px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20px;backgro!
 und-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-focus button,.yui-skin-sam .yui-button-focus a{color:#000;}.yui-skin-sam .yui-split-button-focus button{background-image:url(split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-hover button,.yui-skin-sam .yui-button-hover a{color:#000;}.yui-skin-sam .yui-split-button-hover button{background-image:url(split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam !
 .yui-button-active .first-child{border-color:#7D98B8;}.yui-ski!
 n-sam .y
ui-button-active button,.yui-skin-sam .yui-button-active a{color:#000;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sam .yui-button-disabled a{color:#A6A6A6;cursor:default;}.yui-sk!
 in-sam .yui-menu-button-disabled button{background-image:url(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);}
+.yui-button{display:-moz-inline-box;display:inline-block;vertical-align:text-bottom;}.yui-button .first-child{display:block;*display:inline-block;}.yui-button button,.yui-button a{display:block;*display:inline-block;border:none;margin:0;}.yui-button button{background-color:transparent;*overflow:visible;cursor:pointer;}.yui-button a{text-decoration:none;}.yui-skin-sam .yui-button{border-width:1px 0;border-style:solid;border-color:#808080;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;*position:relative;*left:-1px;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a{padding:0 10px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-button a{*line-height:2;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20px;background-!
 position:right center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-focus button,.yui-skin-sam .yui-button-focus a{color:#000;}.yui-skin-sam .yui-split-button-focus button{background-image:url(split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-hover button,.yui-skin-sam .yui-button-hover a{color:#000;}.yui-skin-sam .yui-split-button-hover button{background-image:url(split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam .yui!
 -button-active .first-child{border-color:#7D98B8;}.yui-skin-sa!
 m .yui-b
utton-active button,.yui-skin-sam .yui-button-active a{color:#000;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sam .yui-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-s!
 am .yui-menu-button-disabled button{background-image:url(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);}

Deleted: trunk/root/static/yui/button/button-beta-debug.js
===================================================================
--- trunk/root/static/yui/button/button-beta-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/button/button-beta-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,4612 +0,0 @@
-/*
-Copyright (c) 2007, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
-*/
-/**
-* @module button
-* @description <p>The Button Control enables the creation of rich, graphical 
-* buttons that function like traditional HTML form buttons.  <em>Unlike</em> 
-* tradition HTML form buttons, buttons created with the Button Control can have 
-* a label that is different from its value.  With the inclusion of the optional 
-* <a href="module_menu.html">Menu Control</a>, the Button Control can also be
-* used to create menu buttons and split buttons, controls that are not 
-* available natively in HTML.  The Button Control can also be thought of as a 
-* way to create more visually engaging implementations of the browser's 
-* default radio-button and check-box controls.</p>
-* <p>The Button Control supports the following types:</p>
-* <dl>
-* <dt>push</dt>
-* <dd>Basic push button that can execute a user-specified command when 
-* pressed.</dd>
-* <dt>link</dt>
-* <dd>Navigates to a specified url when pressed.</dd>
-* <dt>submit</dt>
-* <dd>Submits the parent form when pressed.</dd>
-* <dt>reset</dt>
-* <dd>Resets the parent form when pressed.</dd>
-* <dt>checkbox</dt>
-* <dd>Maintains a "checked" state that can be toggled on and off.</dd>
-* <dt>radio</dt>
-* <dd>Maintains a "checked" state that can be toggled on and off.  Use with 
-* the ButtonGroup class to create a set of controls that are mutually 
-* exclusive; checking one button in the set will uncheck all others in 
-* the group.</dd>
-* <dt>menu</dt>
-* <dd>When pressed will show/hide a menu.</dd>
-* <dt>split</dt>
-* <dd>Can execute a user-specified command or display a menu when pressed.</dd>
-* </dl>
-* @title Button
-* @namespace YAHOO.widget
-* @requires yahoo, dom, element, event
-* @optional container, menu
-* @beta
-*/
-
-
-(function () {
-
-
-    /**
-    * The Button class creates a rich, graphical button.
-    * @param {String} p_oElement String specifying the id attribute of the 
-    * <code><input></code>, <code><button></code>,
-    * <code><a></code>, or <code><span></code> element to 
-    * be used to create the button.
-    * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
-    * one-html.html#ID-6043025">HTMLInputElement</a>|<a href="http://www.w3.org
-    * /TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-34812697">
-    * HTMLButtonElement</a>|<a href="
-    * http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#
-    * ID-33759296">HTMLElement</a>} p_oElement Object reference for the 
-    * <code><input></code>, <code><button></code>, 
-    * <code><a></code>, or <code><span></code> element to be 
-    * used to create the button.
-    * @param {Object} p_oElement Object literal specifying a set of   
-    * configuration attributes used to create the button.
-    * @param {Object} p_oAttributes Optional. Object literal specifying a set  
-    * of configuration attributes used to create the button.
-    * @namespace YAHOO.widget
-    * @class Button
-    * @constructor
-    * @extends YAHOO.util.Element
-    */
-
-
-
-    // Shorthard for utilities
-
-    var Dom = YAHOO.util.Dom,
-        Event = YAHOO.util.Event,
-        Lang = YAHOO.lang,
-        Overlay = YAHOO.widget.Overlay,
-        Menu = YAHOO.widget.Menu,
-    
-    
-        // Private member variables
-    
-        m_oButtons = {},    // Collection of all Button instances
-        m_oOverlayManager = null,   // YAHOO.widget.OverlayManager instance
-        m_oSubmitTrigger = null,    // The button that submitted the form 
-        m_oFocusedButton = null;    // The button that has focus
-
-
-
-    // Private methods
-
-    
-    
-    /**
-    * @method createInputElement
-    * @description Creates an <code><input></code> element of the 
-    * specified type.
-    * @private
-    * @param {String} p_sType String specifying the type of 
-    * <code><input></code> element to create.
-    * @param {String} p_sName String specifying the name of 
-    * <code><input></code> element to create.
-    * @param {String} p_sValue String specifying the value of 
-    * <code><input></code> element to create.
-    * @param {String} p_bChecked Boolean specifying if the  
-    * <code><input></code> element is to be checked.
-    * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
-    * one-html.html#ID-6043025">HTMLInputElement</a>}
-    */
-    function createInputElement(p_sType, p_sName, p_sValue, p_bChecked) {
-    
-        var oInput,
-            sInput;
-    
-        if (Lang.isString(p_sType) && Lang.isString(p_sName)) {
-        
-            if (YAHOO.env.ua.ie) {
-        
-                /*
-                    For IE it is necessary to create the element with the 
-                    "type," "name," "value," and "checked" properties set all 
-                    at once.
-                */
-            
-                sInput = "<input type=\"" + p_sType + "\" name=\"" + 
-                    p_sName + "\"";
-        
-                if (p_bChecked) {
-        
-                    sInput += " checked";
-                
-                }
-                
-                sInput += ">";
-        
-                oInput = document.createElement(sInput);
-        
-            }
-            else {
-            
-                oInput = document.createElement("input");
-                oInput.name = p_sName;
-                oInput.type = p_sType;
-        
-                if (p_bChecked) {
-        
-                    oInput.checked = true;
-                
-                }
-        
-            }
-        
-            oInput.value = p_sValue;
-            
-            return oInput;
-        
-        }
-    
-    }
-    
-    
-    /**
-    * @method setAttributesFromSrcElement
-    * @description Gets the values for all the attributes of the source element 
-    * (either <code><input></code> or <code><a></code>) that 
-    * map to Button configuration attributes and sets them into a collection 
-    * that is passed to the Button constructor.
-    * @private
-    * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
-    * one-html.html#ID-6043025">HTMLInputElement</a>|<a href="http://www.w3.org/
-    * TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-
-    * 48250443">HTMLAnchorElement</a>} p_oElement Object reference to the HTML 
-    * element (either <code><input></code> or <code><span>
-    * </code>) used to create the button.
-    * @param {Object} p_oAttributes Object reference for the collection of 
-    * configuration attributes used to create the button.
-    */
-    function setAttributesFromSrcElement(p_oElement, p_oAttributes) {
-    
-        var sSrcElementNodeName = p_oElement.nodeName.toUpperCase(),
-            me = this,
-            oAttribute,
-            oRootNode,
-            sText;
-            
-    
-        /**
-        * @method setAttributeFromDOMAttribute
-        * @description Gets the value of the specified DOM attribute and sets it 
-        * into the collection of configuration attributes used to configure 
-        * the button.
-        * @private
-        * @param {String} p_sAttribute String representing the name of the 
-        * attribute to retrieve from the DOM element.
-        */
-        function setAttributeFromDOMAttribute(p_sAttribute) {
-    
-            if (!(p_sAttribute in p_oAttributes)) {
-    
-                /*
-                    Need to use "getAttributeNode" instead of "getAttribute" 
-                    because using "getAttribute," IE will return the innerText 
-                    of a <code><button></code> for the value attribute  
-                    rather than the value of the "value" attribute.
-                */
-        
-                oAttribute = p_oElement.getAttributeNode(p_sAttribute);
-        
-    
-                if (oAttribute && ("value" in oAttribute)) {
-    
-                    me.logger.log("Setting attribute \"" + p_sAttribute + 
-                        "\" using source element's attribute value of \"" + 
-                        oAttribute.value + "\"");
-    
-                    p_oAttributes[p_sAttribute] = oAttribute.value;
-    
-                }
-    
-            }
-        
-        }
-    
-    
-        /**
-        * @method setFormElementProperties
-        * @description Gets the value of the attributes from the form element  
-        * and sets them into the collection of configuration attributes used to 
-        * configure the button.
-        * @private
-        */
-        function setFormElementProperties() {
-    
-            setAttributeFromDOMAttribute("type");
-    
-            if (p_oAttributes.type == "button") {
-            
-                p_oAttributes.type = "push";
-            
-            }
-    
-            if (!("disabled" in p_oAttributes)) {
-    
-                p_oAttributes.disabled = p_oElement.disabled;
-    
-            }
-    
-            setAttributeFromDOMAttribute("name");
-            setAttributeFromDOMAttribute("value");
-            setAttributeFromDOMAttribute("title");
-    
-        }
-
-    
-        switch (sSrcElementNodeName) {
-        
-        case "A":
-            
-            p_oAttributes.type = "link";
-            
-            setAttributeFromDOMAttribute("href");
-            setAttributeFromDOMAttribute("target");
-        
-            break;
-    
-        case "INPUT":
-
-            setFormElementProperties();
-
-            if (!("checked" in p_oAttributes)) {
-    
-                p_oAttributes.checked = p_oElement.checked;
-    
-            }
-
-            break;
-
-        case "BUTTON":
-
-            setFormElementProperties();
-
-            oRootNode = p_oElement.parentNode.parentNode;
-
-            if (Dom.hasClass(oRootNode, this.CSS_CLASS_NAME + "-checked")) {
-            
-                p_oAttributes.checked = true;
-            
-            }
-
-            if (Dom.hasClass(oRootNode, this.CSS_CLASS_NAME + "-disabled")) {
-
-                p_oAttributes.disabled = true;
-            
-            }
-
-            p_oElement.removeAttribute("value");
-
-            p_oElement.setAttribute("type", "button");
-
-            break;
-        
-        }
-
-        p_oElement.removeAttribute("id");
-        p_oElement.removeAttribute("name");
-        
-        if (!("tabindex" in p_oAttributes)) {
-
-            p_oAttributes.tabindex = p_oElement.tabIndex;
-
-        }
-    
-        if (!("label" in p_oAttributes)) {
-    
-            // Set the "label" property
-        
-            sText = sSrcElementNodeName == "INPUT" ? 
-                            p_oElement.value : p_oElement.innerHTML;
-        
-    
-            if (sText && sText.length > 0) {
-                
-                p_oAttributes.label = sText;
-                
-            } 
-    
-        }
-    
-    }
-    
-    
-    /**
-    * @method initConfig
-    * @description Initializes the set of configuration attributes that are 
-    * used to instantiate the button.
-    * @private
-    * @param {Object} Object representing the button's set of 
-    * configuration attributes.
-    */
-    function initConfig(p_oConfig) {
-    
-        var oAttributes = p_oConfig.attributes,
-            oSrcElement = oAttributes.srcelement,
-            sSrcElementNodeName = oSrcElement.nodeName.toUpperCase(),
-            me = this;
-    
-    
-        if (sSrcElementNodeName == this.NODE_NAME) {
-    
-            p_oConfig.element = oSrcElement;
-            p_oConfig.id = oSrcElement.id;
-
-            Dom.getElementsBy(function (p_oElement) {
-            
-                switch (p_oElement.nodeName.toUpperCase()) {
-                
-                case "BUTTON":
-                case "A":
-                case "INPUT":
-
-                    setAttributesFromSrcElement.call(me, p_oElement, 
-                        oAttributes);
-
-                    break;                        
-                
-                }
-            
-            }, "*", oSrcElement);
-        
-        }
-        else {
-    
-            switch (sSrcElementNodeName) {
-
-            case "BUTTON":
-            case "A":
-            case "INPUT":
-
-                setAttributesFromSrcElement.call(this, oSrcElement, 
-                    oAttributes);
-
-                break;
-
-            }
-        
-        }
-    
-    }
-
-
-
-    //  Constructor
-
-    YAHOO.widget.Button = function (p_oElement, p_oAttributes) {
-    
-        var fnSuperClass = YAHOO.widget.Button.superclass.constructor,
-            oConfig,
-            oElement;
-    
-        if (arguments.length == 1 && !Lang.isString(p_oElement) && 
-            !p_oElement.nodeName) {
-    
-            if (!p_oElement.id) {
-    
-                p_oElement.id = Dom.generateId();
-    
-                YAHOO.log("No value specified for the button's \"id\" " + 
-                    "attribute. Setting button id to \"" + p_oElement.id + 
-                    "\".", "warn");
-    
-            }
-    
-            this.logger = new YAHOO.widget.LogWriter("Button " + p_oElement.id);
-    
-            this.logger.log("No source HTML element.  Building the button " +
-                    "using the set of configuration attributes.");
-    
-            fnSuperClass.call(this, 
-                (this.createButtonElement(p_oElement.type)),
-                p_oElement);
-    
-        }
-        else {
-    
-            oConfig = { element: null, attributes: (p_oAttributes || {}) };
-    
-    
-            if (Lang.isString(p_oElement)) {
-    
-                oElement = Dom.get(p_oElement);
-    
-                if (oElement) {
-
-                    if (!oConfig.attributes.id) {
-                    
-                        oConfig.attributes.id = p_oElement;
-                    
-                    }
-    
-                    this.logger = new YAHOO.widget.LogWriter(
-                                        "Button " + oConfig.attributes.id);
-                
-                    this.logger.log("Building the button using an existing " + 
-                            "HTML element as a source element.");
-                
-                
-                    oConfig.attributes.srcelement = oElement;
-                
-                    initConfig.call(this, oConfig);
-                
-                
-                    if (!oConfig.element) {
-                
-                        this.logger.log("Source element could not be used " +
-                                "as is.  Creating a new HTML element for " + 
-                                "the button.");
-                
-                        oConfig.element = 
-                            this.createButtonElement(oConfig.attributes.type);
-                
-                    }
-                
-                    fnSuperClass.call(this, oConfig.element, 
-                        oConfig.attributes);
-    
-                }
-    
-            }
-            else if (p_oElement.nodeName) {
-    
-                if (!oConfig.attributes.id) {
-    
-                    if (p_oElement.id) {
-        
-                        oConfig.attributes.id = p_oElement.id;
-                    
-                    }
-                    else {
-        
-                        oConfig.attributes.id = Dom.generateId();
-        
-                        YAHOO.log("No value specified for the button's " +
-                            "\"id\" attribute. Setting button id to \"" + 
-                            oConfig.attributes.id + "\".", "warn");
-        
-                    }
-    
-                }
-    
-    
-                this.logger = new YAHOO.widget.LogWriter(
-                    "Button " + oConfig.attributes.id);
-    
-                this.logger.log("Building the button using an existing HTML " + 
-                    "element as a source element.");
-    
-    
-                oConfig.attributes.srcelement = p_oElement;
-        
-                initConfig.call(this, oConfig);
-        
-        
-                if (!oConfig.element) {
-    
-                    this.logger.log("Source element could not be used as is." +
-                            "  Creating a new HTML element for the button.");
-            
-                    oConfig.element = 
-                        this.createButtonElement(oConfig.attributes.type);
-            
-                }
-            
-                fnSuperClass.call(this, oConfig.element, oConfig.attributes);
-            
-            }
-    
-        }
-    
-    };
-
-
-
-    YAHOO.extend(YAHOO.widget.Button, YAHOO.util.Element, {
-    
-    
-        // Protected properties
-        
-        
-        /** 
-        * @property _button
-        * @description Object reference to the button's internal 
-        * <code><a></code> or <code><button></code> element.
-        * @default null
-        * @protected
-        * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-        * level-one-html.html#ID-48250443">HTMLAnchorElement</a>|<a href="
-        * http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html
-        * #ID-34812697">HTMLButtonElement</a>
-        */
-        _button: null,
-        
-        
-        /** 
-        * @property _menu
-        * @description Object reference to the button's menu.
-        * @default null
-        * @protected
-        * @type {<a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>|
-        * <a href="YAHOO.widget.Menu.html">YAHOO.widget.Menu</a>}
-        */
-        _menu: null,
-        
-        
-        /** 
-        * @property _hiddenFields
-        * @description Object reference to the <code><input></code>  
-        * element, or array of HTML form elements used to represent the button
-        *  when its parent form is submitted.
-        * @default null
-        * @protected
-        * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-        * level-one-html.html#ID-6043025">HTMLInputElement</a>|Array
-        */
-        _hiddenFields: null,
-        
-        
-        /** 
-        * @property _onclickAttributeValue
-        * @description Object reference to the button's current value for the 
-        * "onclick" configuration attribute.
-        * @default null
-        * @protected
-        * @type Object
-        */
-        _onclickAttributeValue: null,
-        
-        
-        /** 
-        * @property _activationKeyPressed
-        * @description Boolean indicating if the key(s) that toggle the button's 
-        * "active" state have been pressed.
-        * @default false
-        * @protected
-        * @type Boolean
-        */
-        _activationKeyPressed: false,
-        
-        
-        /** 
-        * @property _activationButtonPressed
-        * @description Boolean indicating if the mouse button that toggles 
-        * the button's "active" state has been pressed.
-        * @default false
-        * @protected
-        * @type Boolean
-        */
-        _activationButtonPressed: false,
-        
-        
-        /** 
-        * @property _hasKeyEventHandlers
-        * @description Boolean indicating if the button's "blur", "keydown" and 
-        * "keyup" event handlers are assigned
-        * @default false
-        * @protected
-        * @type Boolean
-        */
-        _hasKeyEventHandlers: false,
-        
-        
-        /** 
-        * @property _hasMouseEventHandlers
-        * @description Boolean indicating if the button's "mouseout," 
-        * "mousedown," and "mouseup" event handlers are assigned
-        * @default false
-        * @protected
-        * @type Boolean
-        */
-        _hasMouseEventHandlers: false,
-        
-        
-        
-        // Constants
-        
-        
-        /**
-        * @property NODE_NAME
-        * @description The name of the node to be used for the button's 
-        * root element.
-        * @default "SPAN"
-        * @final
-        * @type String
-        */
-        NODE_NAME: "SPAN",
-        
-        
-        /**
-        * @property CHECK_ACTIVATION_KEYS
-        * @description Array of numbers representing keys that (when pressed) 
-        * toggle the button's "checked" attribute.
-        * @default [32]
-        * @final
-        * @type Array
-        */
-        CHECK_ACTIVATION_KEYS: [32],
-        
-        
-        /**
-        * @property ACTIVATION_KEYS
-        * @description Array of numbers representing keys that (when presed) 
-        * toggle the button's "active" state.
-        * @default [13, 32]
-        * @final
-        * @type Array
-        */
-        ACTIVATION_KEYS: [13, 32],
-        
-        
-        /**
-        * @property OPTION_AREA_WIDTH
-        * @description Width (in pixels) of the area of a split button that  
-        * when pressed will display a menu.
-        * @default 20
-        * @final
-        * @type Number
-        */
-        OPTION_AREA_WIDTH: 20,
-        
-        
-        /**
-        * @property CSS_CLASS_NAME
-        * @description String representing the CSS class(es) to be applied to  
-        * the button's root element.
-        * @default "yui-button"
-        * @final
-        * @type String
-        */
-        CSS_CLASS_NAME: "yui-button",
-        
-        
-        /**
-        * @property RADIO_DEFAULT_TITLE
-        * @description String representing the default title applied to buttons 
-        * of type "radio." 
-        * @default "Unchecked.  Click to check."
-        * @final
-        * @type String
-        */
-        RADIO_DEFAULT_TITLE: "Unchecked.  Click to check.",
-        
-        
-        /**
-        * @property RADIO_CHECKED_TITLE
-        * @description String representing the title applied to buttons of 
-        * type "radio" when checked.
-        * @default "Checked.  Click to uncheck."
-        * @final
-        * @type String
-        */
-        RADIO_CHECKED_TITLE: "Checked.  Click to uncheck.",
-        
-        
-        /**
-        * @property CHECKBOX_DEFAULT_TITLE
-        * @description String representing the default title applied to 
-        * buttons of type "checkbox." 
-        * @default "Unchecked.  Click to check."
-        * @final
-        * @type String
-        */
-        CHECKBOX_DEFAULT_TITLE: "Unchecked.  Click to check.",
-        
-        
-        /**
-        * @property CHECKBOX_CHECKED_TITLE
-        * @description String representing the title applied to buttons of type 
-        * "checkbox" when checked.
-        * @default "Checked.  Click to uncheck."
-        * @final
-        * @type String
-        */
-        CHECKBOX_CHECKED_TITLE: "Checked.  Click to uncheck.",
-        
-        
-        /**
-        * @property MENUBUTTON_DEFAULT_TITLE
-        * @description String representing the default title applied to 
-        * buttons of type "menu." 
-        * @default "Menu collapsed.  Click to expand."
-        * @final
-        * @type String
-        */
-        MENUBUTTON_DEFAULT_TITLE: "Menu collapsed.  Click to expand.",
-        
-        
-        /**
-        * @property MENUBUTTON_MENU_VISIBLE_TITLE
-        * @description String representing the title applied to buttons of type 
-        * "menu" when the button's menu is visible. 
-        * @default "Menu expanded.  Click or press Esc to collapse."
-        * @final
-        * @type String
-        */
-        MENUBUTTON_MENU_VISIBLE_TITLE: 
-            "Menu expanded.  Click or press Esc to collapse.",
-        
-        
-        /**
-        * @property SPLITBUTTON_DEFAULT_TITLE
-        * @description  String representing the default title applied to 
-        * buttons of type "split." 
-        * @default "Menu collapsed.  Click inside option region or press 
-        * Ctrl + Shift + M to show the menu."
-        * @final
-        * @type String
-        */
-        SPLITBUTTON_DEFAULT_TITLE: ("Menu collapsed.  Click inside option " + 
-            "region or press Ctrl + Shift + M to show the menu."),
-        
-        
-        /**
-        * @property SPLITBUTTON_OPTION_VISIBLE_TITLE
-        * @description String representing the title applied to buttons of type 
-        * "split" when the button's menu is visible. 
-        * @default "Menu expanded.  Press Esc or Ctrl + Shift + M to hide 
-        * the menu."
-        * @final
-        * @type String
-        */
-        SPLITBUTTON_OPTION_VISIBLE_TITLE: 
-            "Menu expanded.  Press Esc or Ctrl + Shift + M to hide the menu.",
-        
-        
-        /**
-        * @property SUBMIT_TITLE
-        * @description String representing the title applied to buttons of 
-        * type "submit." 
-        * @default "Click to submit form."
-        * @final
-        * @type String
-        */
-        SUBMIT_TITLE: "Click to submit form.",
-        
-        
-        
-        // Protected attribute setter methods
-        
-        
-        /**
-        * @method _setType
-        * @description Sets the value of the button's "type" attribute.
-        * @protected
-        * @param {String} p_sType String indicating the value for the button's 
-        * "type" attribute.
-        */
-        _setType: function (p_sType) {
-        
-            if (p_sType == "split") {
-        
-                this.on("option", this._onOption);
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _setLabel
-        * @description Sets the value of the button's "label" attribute.
-        * @protected
-        * @param {String} p_sLabel String indicating the value for the button's 
-        * "label" attribute.
-        */
-        _setLabel: function (p_sLabel) {
-
-            this._button.innerHTML = p_sLabel;
-            
-            /*
-                Remove and add the default class name from the root element
-                for Gecko to ensure that the button shrinkwraps to the label.
-                Without this the button will not be rendered at the correct 
-                width when the label changes.  The most likely cause for this 
-                bug is button's use of the Gecko-specific CSS display type of 
-                "-moz-inline-box" to simulate "inline-block" supported by IE, 
-                Safari and Opera.
-            */
-            
-            var sClass,
-                me;
-            
-            if (YAHOO.env.ua.gecko && Dom.inDocument(this.get("element"))) {
-            
-                me = this;
-                sClass = this.CSS_CLASS_NAME;                
-
-                this.removeClass(sClass);
-                
-                window.setTimeout(function () {
-                
-                    me.addClass(sClass);
-                
-                }, 0);
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _setTabIndex
-        * @description Sets the value of the button's "tabindex" attribute.
-        * @protected
-        * @param {Number} p_nTabIndex Number indicating the value for the 
-        * button's "tabindex" attribute.
-        */
-        _setTabIndex: function (p_nTabIndex) {
-        
-            this._button.tabIndex = p_nTabIndex;
-        
-        },
-        
-        
-        /**
-        * @method _setTitle
-        * @description Sets the value of the button's "title" attribute.
-        * @protected
-        * @param {String} p_nTabIndex Number indicating the value for 
-        * the button's "title" attribute.
-        */
-        _setTitle: function (p_sTitle) {
-        
-            var sTitle = p_sTitle;
-        
-            if (this.get("type") != "link") {
-        
-                if (!sTitle) {
-        
-                    switch (this.get("type")) {
-        
-                    case "radio":
-    
-                        sTitle = this.RADIO_DEFAULT_TITLE;
-    
-                        break;
-    
-                    case "checkbox":
-    
-                        sTitle = this.CHECKBOX_DEFAULT_TITLE;
-    
-                        break;
-                    
-                    case "menu":
-    
-                        sTitle = this.MENUBUTTON_DEFAULT_TITLE;
-    
-                        break;
-    
-                    case "split":
-    
-                        sTitle = this.SPLITBUTTON_DEFAULT_TITLE;
-    
-                        break;
-    
-                    case "submit":
-    
-                        sTitle = this.SUBMIT_TITLE;
-    
-                        break;
-        
-                    }
-        
-                }
-        
-                this._button.title = sTitle;
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _setDisabled
-        * @description Sets the value of the button's "disabled" attribute.
-        * @protected
-        * @param {Boolean} p_bDisabled Boolean indicating the value for 
-        * the button's "disabled" attribute.
-        */
-        _setDisabled: function (p_bDisabled) {
-        
-            if (this.get("type") != "link") {
-        
-                if (p_bDisabled) {
-        
-                    if (this._menu) {
-        
-                        this._menu.hide();
-        
-                    }
-        
-                    if (this.hasFocus()) {
-                    
-                        this.blur();
-                    
-                    }
-        
-                    this._button.setAttribute("disabled", "disabled");
-        
-                    this.addStateCSSClasses("disabled");
-
-                    this.removeStateCSSClasses("hover");
-                    this.removeStateCSSClasses("active");
-                    this.removeStateCSSClasses("focus");
-        
-                }
-                else {
-        
-                    this._button.removeAttribute("disabled");
-        
-                    this.removeStateCSSClasses("disabled");
-                
-                }
-        
-            }
-        
-        },
-
-        
-        /**
-        * @method _setHref
-        * @description Sets the value of the button's "href" attribute.
-        * @protected
-        * @param {String} p_sHref String indicating the value for the button's 
-        * "href" attribute.
-        */
-        _setHref: function (p_sHref) {
-        
-            if (this.get("type") == "link") {
-        
-                this._button.href = p_sHref;
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _setTarget
-        * @description Sets the value of the button's "target" attribute.
-        * @protected
-        * @param {String} p_sTarget String indicating the value for the button's 
-        * "target" attribute.
-        */
-        _setTarget: function (p_sTarget) {
-        
-            if (this.get("type") == "link") {
-        
-                this._button.setAttribute("target", p_sTarget);
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _setChecked
-        * @description Sets the value of the button's "target" attribute.
-        * @protected
-        * @param {Boolean} p_bChecked Boolean indicating the value for  
-        * the button's "checked" attribute.
-        */
-        _setChecked: function (p_bChecked) {
-        
-            var sType = this.get("type"),
-                sTitle;
-        
-            if (sType == "checkbox" || sType == "radio") {
-        
-                if (p_bChecked) {
-        
-                    this.addStateCSSClasses("checked");
-                    
-                    sTitle = (sType == "radio") ? 
-                                this.RADIO_CHECKED_TITLE : 
-                                this.CHECKBOX_CHECKED_TITLE;
-                
-                }
-                else {
-
-                    this.removeStateCSSClasses("checked");
-        
-                    sTitle = (sType == "radio") ? 
-                                this.RADIO_DEFAULT_TITLE : 
-                                this.CHECKBOX_DEFAULT_TITLE;
-                
-                }
-        
-                this.set("title", sTitle);
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _setMenu
-        * @description Sets the value of the button's "menu" attribute.
-        * @protected
-        * @param {Object} p_oMenu Object indicating the value for the button's 
-        * "menu" attribute.
-        */
-        _setMenu: function (p_oMenu) {
-
-            var bLazyLoad = this.get("lazyloadmenu"),
-                oButtonElement = this.get("element"),
-                sMenuCSSClassName = Menu.prototype.CSS_CLASS_NAME,
-        
-                /*
-                    Boolean indicating if the value of p_oMenu is an instance 
-                    of YAHOO.widget.Menu or YAHOO.widget.Overlay.
-                */
-        
-                bInstance = false,
-        
-
-                oMenu,
-                oMenuElement,
-                oSrcElement,
-                aItems,
-                nItems,
-                oItem,
-                i;
-        
-        
-            if (!Overlay) {
-        
-                this.logger.log("YAHOO.widget.Overlay dependency not met.", 
-                    "error");
-        
-                return false;
-            
-            }
-        
-        
-            if (!Menu) {
-        
-                this.logger.log("YAHOO.widget.Menu dependency not met.", 
-                    "error");
-        
-                return false;
-            
-            }
-        
-        
-            function onAppendTo() {
-
-                oMenu.render(oButtonElement.parentNode);
-                
-                this.removeListener("appendTo", onAppendTo);
-            
-            }
-        
-        
-            function initMenu() {
-        
-                if (oMenu) {
-
-                    Dom.addClass(oMenu.element, this.get("menuclassname"));
-                    Dom.addClass(oMenu.element, 
-                            "yui-" + this.get("type") + "-button-menu");
-
-                    oMenu.showEvent.subscribe(this._onMenuShow, null, this);
-                    oMenu.hideEvent.subscribe(this._onMenuHide, null, this);
-                    oMenu.renderEvent.subscribe(this._onMenuRender, null, this);
-        
-        
-                    if (oMenu instanceof Menu) {
-        
-                        oMenu.keyDownEvent.subscribe(this._onMenuKeyDown, 
-                            this, true);
-
-                        oMenu.subscribe("click", this._onMenuClick, 
-                            this, true);
-
-                        oMenu.itemAddedEvent.subscribe(this._onMenuItemAdded, 
-                            this, true);
-        
-                        oSrcElement = oMenu.srcElement;
-        
-                        if (oSrcElement && 
-                            oSrcElement.nodeName.toUpperCase() == "SELECT") {
-                
-                            oSrcElement.style.display = "none";
-                            oSrcElement.parentNode.removeChild(oSrcElement);
-        
-                        }
-        
-                    }
-                    else if (oMenu instanceof Overlay) {
-        
-                        if (!m_oOverlayManager) {
-        
-                            m_oOverlayManager = 
-                                new YAHOO.widget.OverlayManager();
-                        
-                        }
-                        
-                        m_oOverlayManager.register(oMenu);
-                        
-                    }
-        
-        
-                    this._menu = oMenu;
-
-        
-                    if (!bInstance) {
-        
-                        if (bLazyLoad && !(oMenu instanceof Menu)) {
-        
-                            /*
-                                Mimic Menu's "lazyload" functionality by adding  
-                                a "beforeshow" event listener that renders the 
-                                Overlay instance before it is made visible by  
-                                the button.
-                            */
-        
-                            oMenu.beforeShowEvent.subscribe(
-                                this._onOverlayBeforeShow, null, this);
-            
-                        }
-                        else if (!bLazyLoad) {
-        
-                            if (Dom.inDocument(oButtonElement)) {
-        
-                                oMenu.render(oButtonElement.parentNode);
-                            
-                            }
-                            else {
-            
-                                this.on("appendTo", onAppendTo);
-                            
-                            }
-                        
-                        }
-                    
-                    }
-        
-                }
-        
-            }
-        
-        
-            if (p_oMenu && (p_oMenu instanceof Menu)) {
-        
-                oMenu = p_oMenu;
-                aItems = oMenu.getItems();
-                nItems = aItems.length;
-                bInstance = true;
-        
-        
-                if (nItems > 0) {
-        
-                    i = nItems - 1;
-        
-                    do {
-        
-                        oItem = aItems[i];
-        
-                        if (oItem) {
-        
-                            oItem.cfg.subscribeToConfigEvent("selected", 
-                                this._onMenuItemSelected, 
-                                oItem, 
-                                this);
-        
-                        }
-        
-                    }
-                    while (i--);
-        
-                }
-        
-                initMenu.call(this);
-        
-            }
-            else if (p_oMenu && (p_oMenu instanceof Overlay)) {
-        
-                oMenu = p_oMenu;
-                bInstance = true;
-        
-                oMenu.cfg.setProperty("visible", false);
-                oMenu.cfg.setProperty("context", [oButtonElement, "tl", "bl"]);
-        
-                initMenu.call(this);
-        
-            }
-            else if (Lang.isArray(p_oMenu)) {
-        
-                this.on("appendTo", function () {
-        
-                    oMenu = new Menu(Dom.generateId(), { lazyload: bLazyLoad, 
-                        itemdata: p_oMenu });
-        
-                    initMenu.call(this);
-        
-                });
-        
-            }
-            else if (Lang.isString(p_oMenu)) {
-        
-                oMenuElement = Dom.get(p_oMenu);
-        
-                if (oMenuElement) {
-        
-                    if (Dom.hasClass(oMenuElement, sMenuCSSClassName) || 
-                        oMenuElement.nodeName.toUpperCase() == "SELECT") {
-            
-                        oMenu = new Menu(p_oMenu, { lazyload: bLazyLoad });
-            
-                        initMenu.call(this);
-            
-                    }
-                    else {
-        
-                        oMenu = new Overlay(p_oMenu, { visible: false, 
-                            context: [oButtonElement, "tl", "bl"] });
-            
-                        initMenu.call(this);
-            
-                    }
-        
-                }
-        
-            }
-            else if (p_oMenu && p_oMenu.nodeName) {
-        
-                if (Dom.hasClass(p_oMenu, sMenuCSSClassName) || 
-                        p_oMenu.nodeName.toUpperCase() == "SELECT") {
-        
-                    oMenu = new Menu(p_oMenu, { lazyload: bLazyLoad });
-                
-                    initMenu.call(this);
-        
-                }
-                else {
-        
-                    if (!p_oMenu.id) {
-                    
-                        Dom.generateId(p_oMenu);
-                    
-                    }
-        
-                    oMenu = new Overlay(p_oMenu, { visible: false, 
-                                    context: [oButtonElement, "tl", "bl"] });
-        
-                    initMenu.call(this);
-                
-                }
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _setOnClick
-        * @description Sets the value of the button's "onclick" attribute.
-        * @protected
-        * @param {Object} p_oObject Object indicating the value for the button's 
-        * "onclick" attribute.
-        */
-        _setOnClick: function (p_oObject) {
-        
-            /*
-                Remove any existing listeners if a "click" event handler 
-                has already been specified.
-            */
-        
-            if (this._onclickAttributeValue && 
-                (this._onclickAttributeValue != p_oObject)) {
-        
-                this.removeListener("click", this._onclickAttributeValue.fn);
-        
-                this._onclickAttributeValue = null;
-        
-            }
-        
-        
-            if (!this._onclickAttributeValue && 
-                Lang.isObject(p_oObject) && 
-                Lang.isFunction(p_oObject.fn)) {
-        
-                this.on("click", p_oObject.fn, p_oObject.obj, p_oObject.scope);
-        
-                this._onclickAttributeValue = p_oObject;
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _setSelectedMenuItem
-        * @description Sets the value of the button's 
-        * "selectedMenuItem" attribute.
-        * @protected
-        * @param {Number} p_nIndex Number representing the index of the item 
-        * in the button's menu that is currently selected.
-        */
-        _setSelectedMenuItem: function (p_nIndex) {
-
-            var oMenu = this._menu,
-                oMenuItem;
-
-
-            if (oMenu && oMenu instanceof Menu) {
-
-                oMenuItem = oMenu.getItem(p_nIndex);
-                
-
-                if (oMenuItem && !oMenuItem.cfg.getProperty("selected")) {
-                
-                    oMenuItem.cfg.setProperty("selected", true);
-                
-                }
-            
-            }
-
-        },
-        
-        
-        // Protected methods
-
-        
-        
-        /**
-        * @method _isActivationKey
-        * @description Determines if the specified keycode is one that toggles  
-        * the button's "active" state.
-        * @protected
-        * @param {Number} p_nKeyCode Number representing the keycode to 
-        * be evaluated.
-        * @return {Boolean}
-        */
-        _isActivationKey: function (p_nKeyCode) {
-        
-            var sType = this.get("type"),
-                aKeyCodes = (sType == "checkbox" || sType == "radio") ? 
-                    this.CHECK_ACTIVATION_KEYS : this.ACTIVATION_KEYS,
-        
-                nKeyCodes = aKeyCodes.length,
-                i;
-        
-            if (nKeyCodes > 0) {
-        
-                i = nKeyCodes - 1;
-        
-                do {
-        
-                    if (p_nKeyCode == aKeyCodes[i]) {
-        
-                        return true;
-        
-                    }
-        
-                }
-                while (i--);
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _isSplitButtonOptionKey
-        * @description Determines if the specified keycode is one that toggles  
-        * the display of the split button's menu.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        * @return {Boolean}
-        */
-        _isSplitButtonOptionKey: function (p_oEvent) {
-        
-            return (p_oEvent.ctrlKey && p_oEvent.shiftKey && 
-                Event.getCharCode(p_oEvent) == 77);
-        
-        },
-        
-        
-        /**
-        * @method _addListenersToForm
-        * @description Adds event handlers to the button's form.
-        * @protected
-        */
-        _addListenersToForm: function () {
-        
-            var oForm = this.getForm(),
-                onFormKeyPress = YAHOO.widget.Button.onFormKeyPress,
-                bHasKeyPressListener,
-                oSrcElement,
-                aListeners,
-                nListeners,
-                i;
-        
-        
-            if (oForm) {
-        
-                Event.on(oForm, "reset", this._onFormReset, null, this);
-                Event.on(oForm, "submit", this.createHiddenFields, null, this);
-        
-                oSrcElement = this.get("srcelement");
-        
-        
-                if (this.get("type") == "submit" || 
-                    (oSrcElement && oSrcElement.type == "submit")) 
-                {
-                
-                    aListeners = Event.getListeners(oForm, "keypress");
-                    bHasKeyPressListener = false;
-            
-                    if (aListeners) {
-            
-                        nListeners = aListeners.length;
-        
-                        if (nListeners > 0) {
-            
-                            i = nListeners - 1;
-                            
-                            do {
-               
-                                if (aListeners[i].fn == onFormKeyPress) {
-                
-                                    bHasKeyPressListener = true;
-                                    break;
-                                
-                                }
-                
-                            }
-                            while (i--);
-                        
-                        }
-                    
-                    }
-            
-            
-                    if (!bHasKeyPressListener) {
-               
-                        Event.on(oForm, "keypress", onFormKeyPress);
-            
-                    }
-        
-                }
-            
-            }
-        
-        },
-        
-        
-        _originalMaxHeight: -1,
-        
-        
-        /**
-        * @method _showMenu
-        * @description Shows the button's menu.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object 
-        * passed back by the event utility (YAHOO.util.Event) that triggered 
-        * the display of the menu.
-        */
-        _showMenu: function (p_oEvent) {
-        
-            YAHOO.widget.MenuManager.hideVisible();
-        
-            if (m_oOverlayManager) {
-        
-                m_oOverlayManager.hideAll();
-            
-            }
-        
-        
-            var oMenu = this._menu,
-                nViewportHeight = Dom.getViewportHeight(),
-                nMenuHeight,
-                nScrollTop,
-                nY;
-        
-        
-            if (oMenu && (oMenu instanceof Menu)) {
-        
-                oMenu.cfg.applyConfig({ context: [this.get("id"), "tl", "bl"],
-                    constraintoviewport: false,
-                    clicktohide: false,
-                    visible: true });
-                    
-                oMenu.cfg.fireQueue();
-            
-                oMenu.align("tl", "bl");
-        
-                /*
-                    Stop the propagation of the event so that the MenuManager 
-                    doesn't blur the menu after it gets focus.
-                */
-        
-                if (p_oEvent.type == "mousedown") {
-        
-                    Event.stopPropagation(p_oEvent);
-        
-                }
-
-
-                if (this.get("focusmenu")) {
-        
-                    this._menu.focus();
-                
-                }
-        
-                nMenuHeight = oMenu.element.offsetHeight;
-        
-        
-                if ((oMenu.cfg.getProperty("y") + nMenuHeight) > 
-                    nViewportHeight) {
-        
-                    this.logger.log("Current menu position will place a " + 
-                        "portion, or the entire menu outside the boundary of " +
-                        "the viewport.  Repositioning the menu to stay " +
-                        "inside the viewport.");
-        
-                    oMenu.align("bl", "tl");
-        
-                    nY = oMenu.cfg.getProperty("y");
-        
-                    nScrollTop = Dom.getDocumentScrollTop();
-        
-        
-                    if (nScrollTop >= nY) {
-        
-                        if (this._originalMaxHeight == -1) {
-        
-                            this._originalMaxHeight = 
-                                    oMenu.cfg.getProperty("maxheight");
-        
-                        }
-        
-                        oMenu.cfg.setProperty("maxheight", 
-                                    (nMenuHeight - ((nScrollTop - nY) + 20)));
-        
-                        oMenu.align("bl", "tl");
-        
-                    }
-        
-                }
-        
-            }
-            else if (oMenu && (oMenu instanceof Overlay)) {
-        
-                oMenu.show();
-                oMenu.align("tl", "bl");
-
-                nMenuHeight = oMenu.element.offsetHeight;
-        
-        
-                if ((oMenu.cfg.getProperty("y") + nMenuHeight) > 
-                    nViewportHeight) {
-        
-                    this.logger.log("Current menu position will place a " +
-                        "portion, or the entire menu outside the boundary of " + 
-                        "the viewport.  Repositioning the menu to stay inside" + 
-                        " the viewport.");
-        
-                    oMenu.align("bl", "tl");
-                    
-                }
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _hideMenu
-        * @description Hides the button's menu.
-        * @protected
-        */
-        _hideMenu: function () {
-        
-            var oMenu = this._menu;
-        
-            if (oMenu) {
-        
-                oMenu.hide();
-        
-            }
-        
-        },
-        
-        
-        
-        
-        // Protected event handlers
-        
-        
-        /**
-        * @method _onMouseOver
-        * @description "mouseover" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onMouseOver: function (p_oEvent) {
-        
-            if (!this._hasMouseEventHandlers) {
-        
-                this.on("mouseout", this._onMouseOut);
-                this.on("mousedown", this._onMouseDown);
-                this.on("mouseup", this._onMouseUp);
-        
-                this._hasMouseEventHandlers = true;
-        
-            }
-        
-            this.addStateCSSClasses("hover");
-        
-            if (this._activationButtonPressed) {
-        
-                this.addStateCSSClasses("active");
-        
-            }
-        
-        
-            if (this._bOptionPressed) {
-        
-                this.addStateCSSClasses("activeoption");
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onMouseOut
-        * @description "mouseout" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onMouseOut: function (p_oEvent) {
-        
-            this.removeStateCSSClasses("hover");
-        
-            if (this.get("type") != "menu") {
-        
-                this.removeStateCSSClasses("active");
-        
-            }
-        
-            if (this._activationButtonPressed || this._bOptionPressed) {
-        
-                Event.on(document, "mouseup", this._onDocumentMouseUp, 
-                    null, this);
-        
-            }
-            
-        },
-        
-        
-        /**
-        * @method _onDocumentMouseUp
-        * @description "mouseup" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onDocumentMouseUp: function (p_oEvent) {
-        
-            this._activationButtonPressed = false;
-            this._bOptionPressed = false;
-        
-            var sType = this.get("type");
-        
-            if (sType == "menu" || sType == "split") {
-        
-                this.removeStateCSSClasses(
-                    (sType == "menu" ? "active" : "activeoption"));
-        
-                this._hideMenu();
-        
-            }
-        
-            Event.removeListener(document, "mouseup", this._onDocumentMouseUp);
-        
-        },
-        
-        
-        /**
-        * @method _onMouseDown
-        * @description "mousedown" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onMouseDown: function (p_oEvent) {
-        
-            var sType,
-                oElement,
-                nX,
-                me;
-        
-        
-            function onMouseUp() {
-            
-                this._hideMenu();
-                this.removeListener("mouseup", onMouseUp);
-            
-            }
-        
-        
-            if ((p_oEvent.which || p_oEvent.button) == 1) {
-        
-        
-                if (!this.hasFocus()) {
-                
-                    this.focus();
-                
-                }
-        
-        
-                sType = this.get("type");
-        
-        
-                if (sType == "split") {
-                
-                    oElement = this.get("element");
-                    nX = Event.getPageX(p_oEvent) - Dom.getX(oElement);
-        
-                    if ((oElement.offsetWidth - this.OPTION_AREA_WIDTH) < nX) {
-                        
-                        this.fireEvent("option", p_oEvent);
-        
-                    }
-                    else {
-        
-                        this.addStateCSSClasses("active");
-        
-                        this._activationButtonPressed = true;
-        
-                    }
-        
-                }
-                else if (sType == "menu") {
-        
-                    if (this.isActive()) {
-        
-                        this._hideMenu();
-        
-                        this._activationButtonPressed = false;
-        
-                    }
-                    else {
-        
-                        this._showMenu(p_oEvent);
-        
-                        this._activationButtonPressed = true;
-                    
-                    }
-        
-                }
-                else {
-        
-                    this.addStateCSSClasses("active");
-        
-                    this._activationButtonPressed = true;
-                
-                }
-        
-        
-        
-                if (sType == "split" || sType == "menu") {
-
-                    me = this;
-        
-                    this._hideMenuTimerId = window.setTimeout(function () {
-                    
-                        me.on("mouseup", onMouseUp);
-                    
-                    }, 250);
-        
-                }
-        
-            }
-            
-        },
-        
-        
-        /**
-        * @method _onMouseUp
-        * @description "mouseup" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onMouseUp: function (p_oEvent) {
-        
-            var sType = this.get("type");
-        
-        
-            if (this._hideMenuTimerId) {
-        
-                window.clearTimeout(this._hideMenuTimerId);
-        
-            }
-        
-        
-            if (sType == "checkbox" || sType == "radio") {
-        
-                this.set("checked", !(this.get("checked")));
-            
-            }
-        
-        
-            this._activationButtonPressed = false;
-            
-        
-            if (this.get("type") != "menu") {
-        
-                this.removeStateCSSClasses("active");
-            
-            }
-            
-        },
-        
-        
-        /**
-        * @method _onFocus
-        * @description "focus" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onFocus: function (p_oEvent) {
-        
-            var oElement;
-        
-            this.addStateCSSClasses("focus");
-        
-            if (this._activationKeyPressed) {
-        
-                this.addStateCSSClasses("active");
-           
-            }
-        
-            m_oFocusedButton = this;
-        
-        
-            if (!this._hasKeyEventHandlers) {
-        
-                oElement = this._button;
-        
-                Event.on(oElement, "blur", this._onBlur, null, this);
-                Event.on(oElement, "keydown", this._onKeyDown, null, this);
-                Event.on(oElement, "keyup", this._onKeyUp, null, this);
-        
-                this._hasKeyEventHandlers = true;
-        
-            }
-        
-        
-            this.fireEvent("focus", p_oEvent);
-        
-        },
-        
-        
-        /**
-        * @method _onBlur
-        * @description "blur" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onBlur: function (p_oEvent) {
-        
-            this.removeStateCSSClasses("focus");
-        
-            if (this.get("type") != "menu") {
-        
-                this.removeStateCSSClasses("active");
-
-            }    
-        
-            if (this._activationKeyPressed) {
-        
-                Event.on(document, "keyup", this._onDocumentKeyUp, null, this);
-        
-            }
-        
-        
-            m_oFocusedButton = null;
-        
-            this.fireEvent("blur", p_oEvent);
-           
-        },
-        
-        
-        /**
-        * @method _onDocumentKeyUp
-        * @description "keyup" event handler for the document.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onDocumentKeyUp: function (p_oEvent) {
-        
-            if (this._isActivationKey(Event.getCharCode(p_oEvent))) {
-        
-                this._activationKeyPressed = false;
-                
-                Event.removeListener(document, "keyup", this._onDocumentKeyUp);
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onKeyDown
-        * @description "keydown" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onKeyDown: function (p_oEvent) {
-        
-            var oMenu = this._menu;
-        
-        
-            if (this.get("type") == "split" && 
-                this._isSplitButtonOptionKey(p_oEvent)) {
-        
-                this.fireEvent("option", p_oEvent);
-        
-            }
-            else if (this._isActivationKey(Event.getCharCode(p_oEvent))) {
-        
-                if (this.get("type") == "menu") {
-        
-                    this._showMenu(p_oEvent);
-        
-                }
-                else {
-        
-                    this._activationKeyPressed = true;
-                    
-                    this.addStateCSSClasses("active");
-                
-                }
-            
-            }
-        
-        
-            if (oMenu && oMenu.cfg.getProperty("visible") && 
-                Event.getCharCode(p_oEvent) == 27) {
-            
-                oMenu.hide();
-                this.focus();
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onKeyUp
-        * @description "keyup" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onKeyUp: function (p_oEvent) {
-        
-            var sType;
-        
-            if (this._isActivationKey(Event.getCharCode(p_oEvent))) {
-        
-                sType = this.get("type");
-        
-                if (sType == "checkbox" || sType == "radio") {
-        
-                    this.set("checked", !(this.get("checked")));
-                
-                }
-        
-                this._activationKeyPressed = false;
-        
-                if (this.get("type") != "menu") {
-        
-                    this.removeStateCSSClasses("active");
-        
-                }
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onClick
-        * @description "click" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onClick: function (p_oEvent) {
-        
-            var sType = this.get("type"),
-                sTitle,
-                oForm,
-                oSrcElement,
-                oElement,
-                nX;
-        
-        
-            switch (sType) {
-        
-            case "radio":
-            case "checkbox":
-    
-                if (this.get("checked")) {
-                    
-                    sTitle = (sType == "radio") ? 
-                                this.RADIO_CHECKED_TITLE : 
-                                this.CHECKBOX_CHECKED_TITLE;
-                
-                }
-                else {
-                
-                    sTitle = (sType == "radio") ? 
-                                this.RADIO_DEFAULT_TITLE : 
-                                this.CHECKBOX_DEFAULT_TITLE;
-                
-                }
-                
-                this.set("title", sTitle);
-    
-                break;
-    
-            case "submit":
-    
-                this.submitForm();
-            
-                break;
-    
-            case "reset":
-    
-                oForm = this.getForm();
-    
-                if (oForm) {
-    
-                    oForm.reset();
-                
-                }
-    
-                break;
-    
-            case "menu":
-    
-                sTitle = this._menu.cfg.getProperty("visible") ? 
-                                this.MENUBUTTON_MENU_VISIBLE_TITLE : 
-                                this.MENUBUTTON_DEFAULT_TITLE;
-    
-                this.set("title", sTitle);
-    
-                break;
-    
-            case "split":
-    
-                oElement = this.get("element");
-                nX = Event.getPageX(p_oEvent) - Dom.getX(oElement);
-    
-                if ((oElement.offsetWidth - this.OPTION_AREA_WIDTH) < nX) {
-    
-                    return false;
-                
-                }
-                else {
-    
-                    this._hideMenu();
-        
-                    oSrcElement = this.get("srcelement");
-        
-                    if (oSrcElement && oSrcElement.type == "submit") {
-    
-                        this.submitForm();
-                    
-                    }
-                
-                }
-    
-                sTitle = this._menu.cfg.getProperty("visible") ? 
-                                this.SPLITBUTTON_OPTION_VISIBLE_TITLE : 
-                                this.SPLITBUTTON_DEFAULT_TITLE;
-    
-                this.set("title", sTitle);
-    
-                break;
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onAppendTo
-        * @description "appendTo" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onAppendTo: function (p_oEvent) {
-        
-            /*
-                It is necessary to call "_addListenersToForm" using 
-                "setTimeout" to make sure that the button's "form" property 
-                returns a node reference.  Sometimes, if you try to get the 
-                reference immediately after appending the field, it is null.
-            */
-        
-            var me = this;
-        
-            window.setTimeout(function () {
-        
-                me._addListenersToForm();
-        
-            }, 0);
-        
-        },
-        
-        
-        /**
-        * @method _onFormReset
-        * @description "reset" event handler for the button's form.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event 
-        * object passed back by the event utility (YAHOO.util.Event).
-        */
-        _onFormReset: function (p_oEvent) {
-        
-            var sType = this.get("type"),
-                oMenu = this._menu;
-        
-            if (sType == "checkbox" || sType == "radio") {
-        
-                this.resetValue("checked");
-        
-            }
-        
-        
-            if (oMenu && (oMenu instanceof Menu)) {
-        
-                this.resetValue("selectedMenuItem");
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onDocumentMouseDown
-        * @description "mousedown" event handler for the document.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onDocumentMouseDown: function (p_oEvent) {
-        
-            var oTarget = Event.getTarget(p_oEvent),
-                oButtonElement = this.get("element"),
-                oMenuElement = this._menu.element;
-        
-            if (oTarget != oButtonElement && 
-                !Dom.isAncestor(oButtonElement, oTarget) && 
-                oTarget != oMenuElement && 
-                !Dom.isAncestor(oMenuElement, oTarget)) {
-        
-                this._hideMenu();
-        
-                Event.removeListener(document, "mousedown", 
-                    this._onDocumentMouseDown);    
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onOption
-        * @description "option" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onOption: function (p_oEvent) {
-        
-            if (this.hasClass("yui-split-button-activeoption")) {
-        
-                this._hideMenu();
-        
-                this._bOptionPressed = false;
-        
-            }
-            else {
-        
-                this._showMenu(p_oEvent);    
-        
-                this._bOptionPressed = true;
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onOverlayBeforeShow
-        * @description "beforeshow" event handler for the 
-        * <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a> instance 
-        * serving as the button's menu.
-        * @private
-        * @param {String} p_sType String representing the name of the event  
-        * that was fired.
-        */
-        _onOverlayBeforeShow: function (p_sType) {
-        
-            var oMenu = this._menu;
-        
-            oMenu.render(this.get("element").parentNode);
-            
-            oMenu.beforeShowEvent.unsubscribe(this._onOverlayBeforeShow);
-        
-        },
-        
-        
-        /**
-        * @method _onMenuShow
-        * @description "show" event handler for the button's menu.
-        * @private
-        * @param {String} p_sType String representing the name of the event  
-        * that was fired.
-        */
-        _onMenuShow: function (p_sType) {
-        
-            Event.on(document, "mousedown", this._onDocumentMouseDown, 
-                null, this);
-        
-            var sTitle,
-                sState;
-            
-            if (this.get("type") == "split") {
-        
-                sTitle = this.SPLITBUTTON_OPTION_VISIBLE_TITLE;
-                sState = "activeoption";
-            
-            }
-            else {
-        
-                sTitle = this.MENUBUTTON_MENU_VISIBLE_TITLE;        
-                sState = "active";
-        
-            }
-        
-            this.addStateCSSClasses(sState);
-            this.set("title", sTitle);
-        
-        },
-        
-        
-        /**
-        * @method _onMenuHide
-        * @description "hide" event handler for the button's menu.
-        * @private
-        * @param {String} p_sType String representing the name of the event  
-        * that was fired.
-        */
-        _onMenuHide: function (p_sType) {
-            
-            var oMenu = this._menu,
-                sTitle,
-                sState;
-        
-            if (oMenu && (oMenu instanceof Menu) && 
-                this._originalMaxHeight != -1) {
-            
-                this._menu.cfg.setProperty("maxheight", 
-                    this._originalMaxHeight);
-        
-            }
-        
-            
-            if (this.get("type") == "split") {
-        
-                sTitle = this.SPLITBUTTON_DEFAULT_TITLE;
-                sState = "activeoption";
-        
-            }
-            else {
-        
-                sTitle = this.MENUBUTTON_DEFAULT_TITLE;        
-                sState = "active";
-            }
-        
-        
-            this.removeStateCSSClasses(sState);
-            this.set("title", sTitle);
-        
-        
-            if (this.get("type") == "split") {
-        
-                this._bOptionPressed = false;
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onMenuKeyDown
-        * @description "keydown" event handler for the button's menu.
-        * @private
-        * @param {String} p_sType String representing the name of the event  
-        * that was fired.
-        * @param {Array} p_aArgs Array of arguments sent when the event 
-        * was fired.
-        */
-        _onMenuKeyDown: function (p_sType, p_aArgs) {
-        
-            var oEvent = p_aArgs[0];
-        
-            if (Event.getCharCode(oEvent) == 27) {
-        
-                this.focus();
-        
-                if (this.get("type") == "split") {
-                
-                    this._bOptionPressed = false;
-                
-                }
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onMenuRender
-        * @description "render" event handler for the button's menu.
-        * @private
-        * @param {String} p_sType String representing the name of the  
-        * event thatwas fired.
-        */
-        _onMenuRender: function (p_sType) {
-        
-            var oButtonElement = this.get("element"),
-                oButtonParent = oButtonElement.parentNode,
-                oMenuElement = this._menu.element;
-        
-        
-            if (oButtonParent != oMenuElement.parentNode) {
-        
-                oButtonParent.appendChild(oMenuElement);
-            
-            }
-
-            this.set("selectedMenuItem", this.get("selectedMenuItem"));
-
-        },
-        
-        
-        /**
-        * @method _onMenuItemSelected
-        * @description "selectedchange" event handler for each item in the 
-        * button's menu.
-        * @private
-        * @param {String} p_sType String representing the name of the event  
-        * that was fired.
-        * @param {Array} p_aArgs Array of arguments sent when the event 
-        * was fired.
-        * @param {Number} p_nItem Number representing the index of the menu
-        * item that subscribed to the event.
-        */
-        _onMenuItemSelected: function (p_sType, p_aArgs, p_nItem) {
-
-            var bSelected = p_aArgs[0];
-
-            if (bSelected) {
-            
-                this.set("selectedMenuItem", p_nItem);
-
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onMenuItemAdded
-        * @description "itemadded" event handler for the button's menu.
-        * @private
-        * @param {String} p_sType String representing the name of the event  
-        * that was fired.
-        * @param {Array} p_aArgs Array of arguments sent when the event
-        * was fired.
-        * @param {<a href="YAHOO.widget.MenuItem.html">
-        * YAHOO.widget.MenuItem</a>} p_oItem Object representing the menu 
-        * item that subscribed to the event.
-        */
-        _onMenuItemAdded: function (p_sType, p_aArgs, p_oItem) {
-            
-            var oItem = p_aArgs[0];
-        
-            oItem.cfg.subscribeToConfigEvent("selected", 
-                this._onMenuItemSelected, 
-                oItem.index, 
-                this);
-        
-        },
-        
-        
-        /**
-        * @method _onMenuClick
-        * @description "click" event handler for the button's menu.
-        * @private
-        * @param {String} p_sType String representing the name of the event  
-        * that was fired.
-        * @param {Array} p_aArgs Array of arguments sent when the event 
-        * was fired.
-        */
-        _onMenuClick: function (p_sType, p_aArgs) {
-
-            var oItem = p_aArgs[1],
-                oSrcElement;
-        
-            if (oItem) {
-        
-                oSrcElement = this.get("srcelement");
-            
-                if (oSrcElement && oSrcElement.type == "submit") {
-        
-                    this.submitForm();
-            
-                }
-            
-                this._hideMenu();
-            
-            }
-        
-        },
-        
-        
-        
-        // Public methods
-        
-        
-        /**
-        * @method createButtonElement
-        * @description Creates the button's HTML elements.
-        * @param {String} p_sType String indicating the type of element 
-        * to create.
-        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-        * level-one-html.html#ID-58190037">HTMLElement</a>}
-        */
-        createButtonElement: function (p_sType) {
-        
-            var sNodeName = this.NODE_NAME,
-                oElement = document.createElement(sNodeName);
-        
-            oElement.innerHTML =  "<" + sNodeName + " class=\"first-child\">" + 
-                (p_sType == "link" ? "<a></a>" : 
-                "<button type=\"button\"></button>") + "</" + sNodeName + ">";
-        
-            return oElement;
-        
-        },
-
-        
-        /**
-        * @method addStateCSSClasses
-        * @description Appends state-specific CSS classes to the button's root 
-        * DOM element.
-        */
-        addStateCSSClasses: function (p_sState) {
-        
-            var sType = this.get("type");
-        
-            if (Lang.isString(p_sState)) {
-        
-                if (p_sState != "activeoption") {
-        
-                    this.addClass(this.CSS_CLASS_NAME + ("-" + p_sState));
-        
-                }
-        
-                this.addClass("yui-" + sType + ("-button-" + p_sState));
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method removeStateCSSClasses
-        * @description Removes state-specific CSS classes to the button's root 
-        * DOM element.
-        */
-        removeStateCSSClasses: function (p_sState) {
-        
-            var sType = this.get("type");
-        
-            if (Lang.isString(p_sState)) {
-        
-                this.removeClass(this.CSS_CLASS_NAME + ("-" + p_sState));
-                this.removeClass("yui-" + sType + ("-button-" + p_sState));
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method createHiddenFields
-        * @description Creates the button's hidden form field and appends it 
-        * to its parent form.
-        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-        * level-one-html.html#ID-6043025">HTMLInputElement</a>|Array}
-        */
-        createHiddenFields: function () {
-        
-            this.removeHiddenFields();
-        
-            var oForm = this.getForm(),
-                oButtonField,
-                sType,     
-                bCheckable,
-                oMenu,
-                oMenuItem,
-                sName,
-                oValue,
-                oMenuField;
-        
-        
-            if (oForm && !this.get("disabled")) {
-        
-                sType = this.get("type");
-                bCheckable = (sType == "checkbox" || sType == "radio");
-        
-        
-                if (bCheckable || (m_oSubmitTrigger == this)) {
-                
-                    this.logger.log("Creating hidden field.");
-        
-                    oButtonField = createInputElement(
-                                    (bCheckable ? sType : "hidden"),
-                                    this.get("name"),
-                                    this.get("value"),
-                                    this.get("checked"));
-            
-            
-                    if (oButtonField) {
-            
-                        if (bCheckable) {
-            
-                            oButtonField.style.display = "none";
-            
-                        }
-            
-                        oForm.appendChild(oButtonField);
-            
-                    }
-        
-                }
-                    
-        
-                oMenu = this._menu;
-            
-            
-                if (oMenu && (oMenu instanceof Menu)) {
-        
-                    this.logger.log("Creating hidden field for menu.");
-        
-                    oMenuField = oMenu.srcElement;
-                    oMenuItem = oMenu.getItem(this.get("selectedMenuItem"));
-
-                    if (oMenuItem) {
-
-                        if (oMenuField && 
-                            oMenuField.nodeName.toUpperCase() == "SELECT") {
-            
-                            oForm.appendChild(oMenuField);
-                            oMenuField.selectedIndex = oMenuItem.index;
-            
-                        }
-                        else {
-            
-                            oValue = (oMenuItem.value === null || 
-                                        oMenuItem.value === "") ? 
-                                        oMenuItem.cfg.getProperty("text") : 
-                                        oMenuItem.value;
-            
-                            sName = this.get("name");
-            
-                            if (oValue && sName) {
-            
-                                oMenuField = createInputElement("hidden", 
-                                                    (sName + "_options"),
-                                                    oValue);
-            
-                                oForm.appendChild(oMenuField);
-            
-                            }
-            
-                        }  
-                    
-                    }
-        
-                }
-            
-            
-                if (oButtonField && oMenuField) {
-        
-                    this._hiddenFields = [oButtonField, oMenuField];
-        
-                }
-                else if (!oButtonField && oMenuField) {
-        
-                    this._hiddenFields = oMenuField;
-                
-                }
-                else if (oButtonField && !oMenuField) {
-        
-                    this._hiddenFields = oButtonField;
-                
-                }
-        
-        
-                return this._hiddenFields;
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method removeHiddenFields
-        * @description Removes the button's hidden form field(s) from its 
-        * parent form.
-        */
-        removeHiddenFields: function () {
-        
-            var oField = this._hiddenFields,
-                nFields,
-                i;
-        
-            function removeChild(p_oElement) {
-        
-                if (Dom.inDocument(p_oElement)) {
-        
-                    p_oElement.parentNode.removeChild(p_oElement);
-                
-                }
-                
-            }
-            
-        
-            if (oField) {
-        
-                if (Lang.isArray(oField)) {
-        
-                    nFields = oField.length;
-                    
-                    if (nFields > 0) {
-                    
-                        i = nFields - 1;
-                        
-                        do {
-        
-                            removeChild(oField[i]);
-        
-                        }
-                        while (i--);
-                    
-                    }
-                
-                }
-                else {
-        
-                    removeChild(oField);
-        
-                }
-        
-                this._hiddenFields = null;
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method submitForm
-        * @description Submits the form to which the button belongs.  Returns  
-        * true if the form was submitted successfully, false if the submission 
-        * was cancelled.
-        * @protected
-        * @return {Boolean}
-        */
-        submitForm: function () {
-        
-            var oForm = this.getForm(),
-        
-                oSrcElement = this.get("srcelement"),
-        
-                /*
-                    Boolean indicating if the event fired successfully 
-                    (was not cancelled by any handlers)
-                */
-        
-                bSubmitForm = false,
-                
-                oEvent;
-        
-        
-            if (oForm) {
-        
-                if (this.get("type") == "submit" || 
-                    (oSrcElement && oSrcElement.type == "submit")) 
-                {
-        
-                    m_oSubmitTrigger = this;
-                    
-                }
-        
-        
-                if (YAHOO.env.ua.ie) {
-        
-                    bSubmitForm = oForm.fireEvent("onsubmit");
-        
-                }
-                else {  // Gecko, Opera, and Safari
-        
-                    oEvent = document.createEvent("HTMLEvents");
-                    oEvent.initEvent("submit", true, true);
-        
-                    bSubmitForm = oForm.dispatchEvent(oEvent);
-        
-                }
-        
-        
-                /*
-                    In IE and Safari, dispatching a "submit" event to a form 
-                    WILL cause the form's "submit" event to fire, but WILL NOT 
-                    submit the form.  Therefore, we need to call the "submit" 
-                    method as well.
-                */
-              
-                if ((YAHOO.env.ua.ie || YAHOO.env.ua.webkit) && bSubmitForm) {
-        
-                    oForm.submit();
-                
-                }
-            
-            }
-        
-            return bSubmitForm;
-            
-        },
-        
-        
-        /**
-        * @method init
-        * @description The Button class's initialization method.
-        * @param {String} p_oElement String specifying the id attribute of the 
-        * <code><input></code>, <code><button></code>,
-        * <code><a></code>, or <code><span></code> element to 
-        * be used to create the button.
-        * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-        * level-one-html.html#ID-6043025">HTMLInputElement</a>|<a href="http://
-        * www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html
-        * #ID-34812697">HTMLButtonElement</a>|<a href="http://www.w3.org/TR
-        * /2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-33759296">
-        * HTMLElement</a>} p_oElement Object reference for the 
-        * <code><input></code>, <code><button></code>, 
-        * <code><a></code>, or <code><span></code> element to be 
-        * used to create the button.
-        * @param {Object} p_oElement Object literal specifying a set of 
-        * configuration attributes used to create the button.
-        * @param {Object} p_oAttributes Optional. Object literal specifying a 
-        * set of configuration attributes used to create the button.
-        */
-        init: function (p_oElement, p_oAttributes) {
-        
-            var sNodeName = p_oAttributes.type == "link" ? "a" : "button",
-                oSrcElement = p_oAttributes.srcelement,
-                oButton = p_oElement.getElementsByTagName(sNodeName)[0],
-                oInput;
-        
-
-            if (!oButton) {
-
-                oInput = p_oElement.getElementsByTagName("input")[0];
-
-
-                if (oInput) {
-
-                    oButton = document.createElement("button");
-                    oButton.setAttribute("type", "button");
-
-                    oInput.parentNode.replaceChild(oButton, oInput);
-                
-                }
-
-            }
-
-            this._button = oButton;
-        
-
-            YAHOO.widget.Button.superclass.init.call(this, p_oElement, 
-                p_oAttributes);
-        
-        
-            m_oButtons[this.get("id")] = this;
-        
-        
-            this.addClass(this.CSS_CLASS_NAME);
-            
-            this.addClass("yui-" + this.get("type") + "-button");
-        
-            Event.on(this._button, "focus", this._onFocus, null, this);
-            this.on("mouseover", this._onMouseOver);
-            this.on("click", this._onClick);
-            this.on("appendTo", this._onAppendTo);
-            
-        
-            var oContainer = this.get("container"),
-                oElement = this.get("element"),
-                bElInDoc = Dom.inDocument(oElement),
-                oParentNode;
-
-
-            if (oContainer) {
-        
-                if (oSrcElement && oSrcElement != oElement) {
-                
-                    oParentNode = oSrcElement.parentNode;
-
-                    if (oParentNode) {
-                    
-                        oParentNode.removeChild(oSrcElement);
-                    
-                    }
-
-                }
-        
-                if (Lang.isString(oContainer)) {
-        
-                    Event.onContentReady(oContainer, function () {
-        
-                        this.appendTo(oContainer);
-                    
-                    }, null, this);
-        
-                }
-                else {
-        
-                    this.appendTo(oContainer);
-        
-                }
-        
-            }
-            else if (!bElInDoc && oSrcElement && oSrcElement != oElement) {
-
-                oParentNode = oSrcElement.parentNode;
-        
-                if (oParentNode) {
-        
-                    this.fireEvent("beforeAppendTo", {
-                        type: "beforeAppendTo",
-                        target: oParentNode
-                    });
-            
-                    oParentNode.replaceChild(oElement, oSrcElement);
-            
-                    this.fireEvent("appendTo", {
-                        type: "appendTo",
-                        target: oParentNode
-                    });
-                
-                }
-        
-            }
-            else if (this.get("type") != "link" && bElInDoc && oSrcElement && 
-                oSrcElement == oElement) {
-        
-                this._addListenersToForm();
-        
-            }
-        
-            this.logger.log("Initialization completed.");
-        
-        },
-        
-        
-        /**
-        * @method initAttributes
-        * @description Initializes all of the configuration attributes used to  
-        * create the button.
-        * @param {Object} p_oAttributes Object literal specifying a set of 
-        * configuration attributes used to create the button.
-        */
-        initAttributes: function (p_oAttributes) {
-        
-            var oAttributes = p_oAttributes || {};
-        
-            YAHOO.widget.Button.superclass.initAttributes.call(this, 
-                oAttributes);
-        
-        
-            /**
-            * @attribute type
-            * @description String specifying the button's type.  Possible 
-            * values are: "push," "link," "submit," "reset," "checkbox," 
-            * "radio," "menu," and "split."
-            * @default "push"
-            * @type String
-            */
-            this.setAttributeConfig("type", {
-        
-                value: (oAttributes.type || "push"),
-                validator: Lang.isString,
-                writeOnce: true,
-                method: this._setType
-        
-            });
-        
-        
-            /**
-            * @attribute label
-            * @description String specifying the button's text label 
-            * or innerHTML.
-            * @default null
-            * @type String
-            */
-            this.setAttributeConfig("label", {
-        
-                value: oAttributes.label,
-                validator: Lang.isString,
-                method: this._setLabel
-        
-            });
-        
-        
-            /**
-            * @attribute value
-            * @description Object specifying the value for the button.
-            * @default null
-            * @type Object
-            */
-            this.setAttributeConfig("value", {
-        
-                value: oAttributes.value
-        
-            });
-        
-        
-            /**
-            * @attribute name
-            * @description String specifying the name for the button.
-            * @default null
-            * @type String
-            */
-            this.setAttributeConfig("name", {
-        
-                value: oAttributes.name,
-                validator: Lang.isString
-        
-            });
-        
-        
-            /**
-            * @attribute tabindex
-            * @description Number specifying the tabindex for the button.
-            * @default null
-            * @type Number
-            */
-            this.setAttributeConfig("tabindex", {
-        
-                value: oAttributes.tabindex,
-                validator: Lang.isNumber,
-                method: this._setTabIndex
-        
-            });
-        
-        
-            /**
-            * @attribute title
-            * @description String specifying the title for the button.
-            * @default null
-            * @type String
-            */
-            this.configureAttribute("title", {
-        
-                value: oAttributes.title,
-                validator: Lang.isString,
-                method: this._setTitle
-        
-            });
-        
-        
-            /**
-            * @attribute disabled
-            * @description Boolean indicating if the button should be disabled.  
-            * (Disabled buttons are dimmed and will not respond to user input 
-            * or fire events.  Does not apply to button's of type "link.")
-            * @default false
-            * @type Boolean
-            */
-            this.setAttributeConfig("disabled", {
-        
-                value: (oAttributes.disabled || false),
-                validator: Lang.isBoolean,
-                method: this._setDisabled
-        
-            });
-        
-        
-            /**
-            * @attribute href
-            * @description String specifying the href for the button.  Applies
-            * only to buttons of type "link."
-            * @type String
-            */
-            this.setAttributeConfig("href", {
-        
-                value: oAttributes.href,
-                validator: Lang.isString,
-                method: this._setHref
-        
-            });
-        
-        
-            /**
-            * @attribute target
-            * @description String specifying the target for the button.  
-            * Applies only to buttons of type "link."
-            * @type String
-            */
-            this.setAttributeConfig("target", {
-        
-                value: oAttributes.target,
-                validator: Lang.isString,
-                method: this._setTarget
-        
-            });
-        
-        
-            /**
-            * @attribute checked
-            * @description Boolean indicating if the button is checked. 
-            * Applies only to buttons of type "radio" and "checkbox."
-            * @default false
-            * @type Boolean
-            */
-            this.setAttributeConfig("checked", {
-        
-                value: (oAttributes.checked || false),
-                validator: Lang.isBoolean,
-                method: this._setChecked
-        
-            });
-        
-        
-            /**
-            * @attribute container
-            * @description HTML element reference or string specifying the id 
-            * attribute of the HTML element that the button's markup should be 
-            * rendered into.
-            * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-            * level-one-html.html#ID-58190037">HTMLElement</a>|String
-            * @default null
-            */
-            this.setAttributeConfig("container", {
-        
-                value: oAttributes.container,
-                writeOnce: true
-        
-            });
-        
-        
-            /**
-            * @attribute srcelement
-            * @description Object reference to the HTML element (either 
-            * <code><input></code> or <code><span></code>) 
-            * used to create the button.
-            * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-            * level-one-html.html#ID-58190037">HTMLElement</a>|String
-            * @default null
-            */
-            this.setAttributeConfig("srcelement", {
-        
-                value: oAttributes.srcelement,
-                writeOnce: true
-        
-            });
-        
-        
-            /**
-            * @attribute menu
-            * @description Object specifying the menu for the button.  
-            * The value can be one of the following:
-            * <ul>
-            * <li>Object specifying a <a href="YAHOO.widget.Menu.html">
-            * YAHOO.widget.Menu</a> instance.</li>
-            * <li>Object specifying a <a href="YAHOO.widget.Overlay.html">
-            * YAHOO.widget.Overlay</a> instance.</li>
-            * <li>String specifying the id attribute of the <code><div>
-            * </code> element used to create the menu.  By default the menu 
-            * will be created as an instance of 
-            * <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>.  
-            * If the <a href="YAHOO.widget.Menu.html#CSS_CLASS_NAME">
-            * default CSS class name for YAHOO.widget.Menu</a> is applied to 
-            * the <code><div></code> element, it will be created as an
-            * instance of <a href="YAHOO.widget.Menu.html">YAHOO.widget.Menu
-            * </a>.</li><li>String specifying the id attribute of the 
-            * <code><select></code> element used to create the menu.
-            * </li><li>Object specifying the <code><div></code> element
-            * used to create the menu.</li>
-            * <li>Object specifying the <code><select></code> element
-            * used to create the menu.</li>
-            * <li>Array of object literals, each representing a set of 
-            * <a href="YAHOO.widget.MenuItem.html">YAHOO.widget.MenuItem</a> 
-            * configuration attributes.</li>
-            * <li>Array of strings representing the text labels for each menu 
-            * item in the menu.</li>
-            * </ul>
-            * @type <a href="YAHOO.widget.Menu.html">YAHOO.widget.Menu</a>|<a 
-            * href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>|<a 
-            * href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
-            * one-html.html#ID-58190037">HTMLElement</a>|String|Array
-            * @default null
-            */
-            this.setAttributeConfig("menu", {
-        
-                value: null,
-                method: this._setMenu,
-                writeOnce: true
-            
-            });
-        
-        
-            /**
-            * @attribute lazyloadmenu
-            * @description Boolean indicating the value to set for the 
-            * <a href="YAHOO.widget.Menu.html#lazyLoad">"lazyload"</a>
-            * configuration property of the button's menu.  Setting 
-            * "lazyloadmenu" to <code>true </code> will defer rendering of 
-            * the button's menu until the first time it is made visible.  
-            * If "lazyloadmenu" is set to <code>false</code>, the button's 
-            * menu will be rendered immediately if the button is in the 
-            * document, or in response to the button's "appendTo" event if 
-            * the button is not yet in the document.  In either case, the 
-            * menu is rendered into the button's parent HTML element.  
-            * <em>This attribute does not apply if a 
-            * <a href="YAHOO.widget.Menu.html">YAHOO.widget.Menu</a> or 
-            * <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a> 
-            * instance is passed as the value of the button's "menu" 
-            * configuration attribute. <a href="YAHOO.widget.Menu.html">
-            * YAHOO.widget.Menu</a> or <a href="YAHOO.widget.Overlay.html">
-            * YAHOO.widget.Overlay</a> instances should be rendered before 
-            * being set as the value for the "menu" configuration 
-            * attribute.</em>
-            * @default true
-            * @type Boolean
-            */
-            this.setAttributeConfig("lazyloadmenu", {
-        
-                value: (oAttributes.lazyloadmenu === false ? false : true),
-                validator: Lang.isBoolean,
-                writeOnce: true
-        
-            });
-
-
-            /**
-            * @attribute menuclassname
-            * @description String representing the CSS class name to be 
-            * applied to the root element of the button's menu.
-            * @type String
-            * @default "yui-button-menu"
-            */
-            this.setAttributeConfig("menuclassname", {
-        
-                value: (oAttributes.menuclassname || "yui-button-menu"),
-                validator: Lang.isString,
-                method: this._setMenuClassName,
-                writeOnce: true
-        
-            });        
-
-
-            /**
-            * @attribute selectedMenuItem
-            * @description Number representing the index of the item in the 
-            * button's menu that is currently selected.
-            * @type Number
-            * @default null
-            */
-            this.setAttributeConfig("selectedMenuItem", {
-        
-                value: 0,
-                validator: Lang.isNumber,
-                method: this._setSelectedMenuItem
-        
-            });
-        
-        
-            /**
-            * @attribute onclick
-            * @description Object literal representing the code to be executed  
-            * when the button is clicked.  Format:<br> <code> {<br> 
-            * <strong>fn:</strong> Function,   // The handler to call 
-            * when the event fires.<br> <strong>obj:</strong> Object, 
-            * // An object to pass back to the handler.<br> 
-            * <strong>scope:</strong> Object //  The object to use 
-            * for the scope of the handler.<br> } </code>
-            * @type Object
-            * @default null
-            */
-            this.setAttributeConfig("onclick", {
-        
-                value: oAttributes.onclick,
-                method: this._setOnClick
-            
-            });
-
-
-            /**
-            * @attribute focusmenu
-            * @description Boolean indicating whether or not the button's menu 
-            * should be focused when it is made visible.
-            * @type Boolean
-            * @default true
-            */
-            this.setAttributeConfig("focusmenu", {
-        
-                value: (oAttributes.focusmenu === false ? false : true),
-                validator: Lang.isBoolean
-        
-            });
-
-        },
-        
-        
-        /**
-        * @method focus
-        * @description Causes the button to receive the focus and fires the 
-        * button's "focus" event.
-        */
-        focus: function () {
-        
-            if (!this.get("disabled")) {
-        
-                this._button.focus();
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method blur
-        * @description Causes the button to lose focus and fires the button's
-        * "blur" event.
-        */
-        blur: function () {
-        
-            if (!this.get("disabled")) {
-        
-                this._button.blur();
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method hasFocus
-        * @description Returns a boolean indicating whether or not the button 
-        * has focus.
-        * @return {Boolean}
-        */
-        hasFocus: function () {
-        
-            return (m_oFocusedButton == this);
-        
-        },
-        
-        
-        /**
-        * @method isActive
-        * @description Returns a boolean indicating whether or not the button 
-        * is active.
-        * @return {Boolean}
-        */
-        isActive: function () {
-        
-            return this.hasClass(this.CSS_CLASS_NAME + "-active");
-        
-        },
-        
-        
-        /**
-        * @method getMenu
-        * @description Returns a reference to the button's menu.
-        * @return {<a href="YAHOO.widget.Overlay.html">
-        * YAHOO.widget.Overlay</a>|<a 
-        * href="YAHOO.widget.Menu.html">YAHOO.widget.Menu</a>}
-        */
-        getMenu: function () {
-        
-            return this._menu;
-        
-        },
-        
-        
-        /**
-        * @method getForm
-        * @description Returns a reference to the button's parent form.
-        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-
-        * 20000929/level-one-html.html#ID-40002357">HTMLFormElement</a>}
-        */
-        getForm: function () {
-        
-            return this._button.form;
-        
-        },
-        
-        
-        /** 
-        * @method getHiddenFields
-        * @description Returns an <code><input></code> element or 
-        * array of form elements used to represent the button when its parent 
-        * form is submitted.  
-        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-        * level-one-html.html#ID-6043025">HTMLInputElement</a>|Array}
-        */
-        getHiddenFields: function () {
-        
-            return this._hiddenFields;
-        
-        },
-        
-        
-        /**
-        * @method destroy
-        * @description Removes the button's element from its parent element and 
-        * removes all event handlers.
-        */
-        destroy: function () {
-        
-            this.logger.log("Destroying ...");
-        
-            var oElement = this.get("element"),
-                oParentNode = oElement.parentNode,
-                oMenu = this._menu,
-                aButtons;
-        
-            if (oMenu) {
-        
-                this.logger.log("Destroying menu.");
-
-                if (m_oOverlayManager.find(oMenu)) {
-
-                    m_oOverlayManager.remove(oMenu);
-
-                }
-        
-                oMenu.destroy();
-        
-            }
-        
-            this.logger.log("Removing DOM event listeners.");
-        
-            Event.purgeElement(oElement);
-            Event.purgeElement(this._button);
-            Event.removeListener(document, "mouseup", this._onDocumentMouseUp);
-            Event.removeListener(document, "keyup", this._onDocumentKeyUp);
-            Event.removeListener(document, "mousedown", 
-                this._onDocumentMouseDown);
-        
-        
-            var oForm = this.getForm();
-            
-            if (oForm) {
-        
-                Event.removeListener(oForm, "reset", this._onFormReset);
-                Event.removeListener(oForm, "submit", this.createHiddenFields);
-        
-            }
-
-            this.logger.log("Removing CustomEvent listeners.");
-
-            this.unsubscribeAll();
-
-            if (oParentNode) {
-
-                oParentNode.removeChild(oElement);
-            
-            }
-        
-            this.logger.log("Removing from document.");
-        
-            delete m_oButtons[this.get("id")];
-
-            aButtons = Dom.getElementsByClassName(this.CSS_CLASS_NAME, 
-                                this.NODE_NAME, oForm); 
-
-            if (Lang.isArray(aButtons) && aButtons.length === 0) {
-
-                Event.removeListener(oForm, "keypress", 
-                        YAHOO.widget.Button.onFormKeyPress);
-
-            }
-
-            this.logger.log("Destroyed.");
-        
-        },
-        
-        
-        fireEvent: function (p_sType , p_aArgs) {
-        
-            //  Disabled buttons should not respond to DOM events
-        
-            if (this.DOM_EVENTS[p_sType] && this.get("disabled")) {
-        
-                return;
-        
-            }
-        
-            YAHOO.widget.Button.superclass.fireEvent.call(this, p_sType, 
-                p_aArgs);
-        
-        },
-        
-        
-        /**
-        * @method toString
-        * @description Returns a string representing the button.
-        * @return {String}
-        */
-        toString: function () {
-        
-            return ("Button " + this.get("id"));
-        
-        }
-    
-    });
-    
-    
-    /**
-    * @method YAHOO.widget.Button.onFormKeyPress
-    * @description "keypress" event handler for the button's form.
-    * @param {Event} p_oEvent Object representing the DOM event object passed 
-    * back by the event utility (YAHOO.util.Event).
-    */
-    YAHOO.widget.Button.onFormKeyPress = function (p_oEvent) {
-    
-        var oTarget = Event.getTarget(p_oEvent),
-            nCharCode = Event.getCharCode(p_oEvent),
-            sNodeName = oTarget.nodeName && oTarget.nodeName.toUpperCase(),
-            sType = oTarget.type,
-    
-            /*
-                Boolean indicating if the form contains any enabled or 
-                disabled YUI submit buttons
-            */
-    
-            bFormContainsYUIButtons = false,
-    
-            oButton,
-    
-            oYUISubmitButton,   // The form's first, enabled YUI submit button
-    
-            /*
-                 The form's first, enabled HTML submit button that precedes any 
-                 YUI submit button
-            */
-    
-            oPrecedingSubmitButton,
-            
-    
-            /*
-                 The form's first, enabled HTML submit button that follows a 
-                 YUI button
-            */
-            
-            oFollowingSubmitButton; 
-    
-    
-        function isSubmitButton(p_oElement) {
-    
-            var sId,
-                oSrcElement;
-    
-            switch (p_oElement.nodeName.toUpperCase()) {
-    
-            case "INPUT":
-            case "BUTTON":
-            
-                if (p_oElement.type == "submit" && !p_oElement.disabled) {
-                    
-                    if (!bFormContainsYUIButtons && 
-                        !oPrecedingSubmitButton) {
-
-                        oPrecedingSubmitButton = p_oElement;
-
-                    }
-                    
-                    if (oYUISubmitButton && !oFollowingSubmitButton) {
-                    
-                        oFollowingSubmitButton = p_oElement;
-                    
-                    }
-                
-                }
-
-                break;
-            
-
-            default:
-            
-                sId = p_oElement.id;
-    
-                if (sId) {
-    
-                    oButton = m_oButtons[sId];
-        
-                    if (oButton) {
-
-                        bFormContainsYUIButtons = true;
-        
-                        if (!oButton.get("disabled")) {
-
-                            oSrcElement = oButton.get("srcelement");
-    
-                            if (!oYUISubmitButton &&
-                                (oButton.get("type") == "submit" || 
-                                (oSrcElement && oSrcElement.type == "submit"))) 
-                            {
-
-                                oYUISubmitButton = oButton;
-                            
-                            }
-                        
-                        }
-                        
-                    }
-                
-                }
-
-                break;
-    
-            }
-    
-        }
-    
-    
-        if (nCharCode == 13 && ((sNodeName == "INPUT" && (sType == "text" || 
-            sType == "password" || sType == "checkbox" || sType == "radio" || 
-            sType == "file")) || sNodeName == "SELECT"))
-        {
-    
-            Dom.getElementsBy(isSubmitButton, "*", this);
-    
-    
-            if (oPrecedingSubmitButton) {
-    
-                /*
-                     Need to set focus to the first enabled submit button
-                     to make sure that IE includes its name and value 
-                     in the form's data set.
-                */
-    
-                oPrecedingSubmitButton.focus();
-            
-            }
-            else if (!oPrecedingSubmitButton && oYUISubmitButton) {
-    
-                if (oFollowingSubmitButton) {
-    
-                    /*
-                        Need to call "preventDefault" to ensure that 
-                        the name and value of the regular submit button 
-                        following the YUI button doesn't get added to the 
-                        form's data set when it is submitted.
-                    */
-    
-                    Event.preventDefault(p_oEvent);
-                
-                }
-    
-                oYUISubmitButton.submitForm();
-    
-            }
-            
-        }
-    
-    };
-    
-    
-    /**
-    * @method YAHOO.widget.Button.addHiddenFieldsToForm
-    * @description Searches the specified form and adds hidden fields for  
-    * instances of YAHOO.widget.Button that are of type "radio," "checkbox," 
-    * "menu," and "split."
-    * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
-    * one-html.html#ID-40002357">HTMLFormElement</a>} p_oForm Object reference 
-    * for the form to search.
-    */
-    YAHOO.widget.Button.addHiddenFieldsToForm = function (p_oForm) {
-    
-        var aButtons = Dom.getElementsByClassName(
-                            YAHOO.widget.Button.prototype.CSS_CLASS_NAME, 
-                            "*", 
-                            p_oForm),
-    
-            nButtons = aButtons.length,
-            oButton,
-            sId,
-            i;
-    
-        if (nButtons > 0) {
-    
-            YAHOO.log("Form contains " + nButtons + " YUI buttons.");
-    
-            for (i = 0; i < nButtons; i++) {
-    
-                sId = aButtons[i].id;
-    
-                if (sId) {
-    
-                    oButton = m_oButtons[sId];
-        
-                    if (oButton) {
-           
-                        oButton.createHiddenFields();
-                        
-                    }
-                
-                }
-            
-            }
-    
-        }
-    
-    };
-    
-    
-    
-    // Events
-    
-    
-    /**
-    * @event focus
-    * @description Fires when the menu item receives focus.  Passes back a  
-    * single object representing the original DOM event object passed back by 
-    * the event utility (YAHOO.util.Event) when the event was fired.  See 
-    * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> 
-    * for more information on listening for this event.
-    * @type YAHOO.util.CustomEvent
-    */
-    
-    
-    /**
-    * @event blur
-    * @description Fires when the menu item loses the input focus.  Passes back  
-    * a single object representing the original DOM event object passed back by 
-    * the event utility (YAHOO.util.Event) when the event was fired.  See 
-    * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for  
-    * more information on listening for this event.
-    * @type YAHOO.util.CustomEvent
-    */
-    
-    
-    /**
-    * @event option
-    * @description Fires when the user invokes the button's option.  Passes 
-    * back a single object representing the original DOM event (either 
-    * "mousedown" or "keydown") that caused the "option" event to fire.  See 
-    * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> 
-    * for more information on listening for this event.
-    * @type YAHOO.util.CustomEvent
-    */
-
-})();
-(function () {
-
-    // Shorthard for utilities
-    
-    var Dom = YAHOO.util.Dom,
-        Event = YAHOO.util.Event,
-        Lang = YAHOO.lang,
-        Button = YAHOO.widget.Button,  
-    
-        // Private collection of radio buttons
-    
-        m_oButtons = {};
-
-
-
-    /**
-    * The ButtonGroup class creates a set of buttons that are mutually 
-    * exclusive; checking one button in the set will uncheck all others in the 
-    * button group.
-    * @param {String} p_oElement String specifying the id attribute of the 
-    * <code><div></code> element of the button group.
-    * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-    * level-one-html.html#ID-22445964">HTMLDivElement</a>} p_oElement Object 
-    * specifying the <code><div></code> element of the button group.
-    * @param {Object} p_oElement Object literal specifying a set of 
-    * configuration attributes used to create the button group.
-    * @param {Object} p_oAttributes Optional. Object literal specifying a set 
-    * of configuration attributes used to create the button group.
-    * @namespace YAHOO.widget
-    * @class ButtonGroup
-    * @constructor
-    * @extends YAHOO.util.Element
-    */
-    YAHOO.widget.ButtonGroup = function (p_oElement, p_oAttributes) {
-    
-        var fnSuperClass = YAHOO.widget.ButtonGroup.superclass.constructor,
-            sNodeName,
-            oElement,
-            sId;
-    
-        if (arguments.length == 1 && !Lang.isString(p_oElement) && 
-            !p_oElement.nodeName) {
-    
-            if (!p_oElement.id) {
-    
-                sId = Dom.generateId();
-    
-                p_oElement.id = sId;
-    
-                YAHOO.log("No value specified for the button group's \"id\"" +
-                    " attribute. Setting button group id to \"" + sId + "\".",
-                    "warn");
-    
-            }
-    
-            this.logger = new YAHOO.widget.LogWriter("ButtonGroup " + sId);
-    
-            this.logger.log("No source HTML element.  Building the button " +
-                    "group using the set of configuration attributes.");
-    
-            fnSuperClass.call(this, (this._createGroupElement()), p_oElement);
-    
-        }
-        else if (Lang.isString(p_oElement)) {
-    
-            oElement = Dom.get(p_oElement);
-    
-            if (oElement) {
-            
-                if (oElement.nodeName.toUpperCase() == this.NODE_NAME) {
-    
-                    this.logger = 
-                        new YAHOO.widget.LogWriter("ButtonGroup " + p_oElement);
-            
-                    fnSuperClass.call(this, oElement, p_oAttributes);
-    
-                }
-    
-            }
-        
-        }
-        else {
-    
-            sNodeName = p_oElement.nodeName.toUpperCase();
-    
-            if (sNodeName && sNodeName == this.NODE_NAME) {
-        
-                if (!p_oElement.id) {
-        
-                    p_oElement.id = Dom.generateId();
-        
-                    YAHOO.log("No value specified for the button group's" +
-                        " \"id\" attribute. Setting button group id " +
-                        "to \"" + p_oElement.id + "\".", "warn");
-        
-                }
-        
-                this.logger = 
-                    new YAHOO.widget.LogWriter("ButtonGroup " + p_oElement.id);
-        
-                fnSuperClass.call(this, p_oElement, p_oAttributes);
-    
-            }
-    
-        }
-    
-    };
-    
-    
-    YAHOO.extend(YAHOO.widget.ButtonGroup, YAHOO.util.Element, {
-    
-    
-        // Protected properties
-        
-        
-        /** 
-        * @property _buttons
-        * @description Array of buttons in the button group.
-        * @default null
-        * @protected
-        * @type Array
-        */
-        _buttons: null,
-        
-        
-        
-        // Constants
-        
-        
-        /**
-        * @property NODE_NAME
-        * @description The name of the tag to be used for the button 
-        * group's element. 
-        * @default "DIV"
-        * @final
-        * @type String
-        */
-        NODE_NAME: "DIV",
-        
-        
-        /**
-        * @property CSS_CLASS_NAME
-        * @description String representing the CSS class(es) to be applied  
-        * to the button group's element.
-        * @default "yui-buttongroup"
-        * @final
-        * @type String
-        */
-        CSS_CLASS_NAME: "yui-buttongroup",
-    
-    
-    
-        // Protected methods
-        
-        
-        /**
-        * @method _createGroupElement
-        * @description Creates the button group's element.
-        * @protected
-        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-        * level-one-html.html#ID-22445964">HTMLDivElement</a>}
-        */
-        _createGroupElement: function () {
-        
-            var oElement = document.createElement(this.NODE_NAME);
-        
-            return oElement;
-        
-        },
-        
-        
-        
-        // Protected attribute setter methods
-        
-        
-        /**
-        * @method _setDisabled
-        * @description Sets the value of the button groups's 
-        * "disabled" attribute.
-        * @protected
-        * @param {Boolean} p_bDisabled Boolean indicating the value for
-        * the button group's "disabled" attribute.
-        */
-        _setDisabled: function (p_bDisabled) {
-        
-            var nButtons = this.getCount(),
-                i;
-        
-            if (nButtons > 0) {
-        
-                i = nButtons - 1;
-                
-                do {
-        
-                    this._buttons[i].set("disabled", p_bDisabled);
-                
-                }
-                while (i--);
-        
-            }
-        
-        },
-        
-        
-        
-        // Protected event handlers
-        
-        
-        /**
-        * @method _onKeyDown
-        * @description "keydown" event handler for the button group.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onKeyDown: function (p_oEvent) {
-        
-            var oTarget = Event.getTarget(p_oEvent),
-                nCharCode = Event.getCharCode(p_oEvent),
-                sId = oTarget.parentNode.parentNode.id,
-                oButton = m_oButtons[sId],
-                nIndex = -1;
-        
-        
-            if (nCharCode == 37 || nCharCode == 38) {
-        
-                nIndex = (oButton.index === 0) ? 
-                            (this._buttons.length - 1) : (oButton.index - 1);
-            
-            }
-            else if (nCharCode == 39 || nCharCode == 40) {
-        
-                nIndex = (oButton.index === (this._buttons.length - 1)) ? 
-                            0 : (oButton.index + 1);
-        
-            }
-        
-        
-            if (nIndex > -1) {
-        
-                this.check(nIndex);
-                this.getButton(nIndex).focus();
-            
-            }        
-        
-        },
-        
-        
-        /**
-        * @method _onAppendTo
-        * @description "appendTo" event handler for the button group.
-        * @protected
-        * @param {Event} p_oEvent Object representing the event that was fired.
-        */
-        _onAppendTo: function (p_oEvent) {
-        
-            var aButtons = this._buttons,
-                nButtons = aButtons.length,
-                i;
-        
-            for (i = 0; i < nButtons; i++) {
-        
-                aButtons[i].appendTo(this.get("element"));
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onButtonCheckedChange
-        * @description "checkedChange" event handler for each button in the 
-        * button group.
-        * @protected
-        * @param {Event} p_oEvent Object representing the event that was fired.
-        * @param {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}  
-        * p_oButton Object representing the button that fired the event.
-        */
-        _onButtonCheckedChange: function (p_oEvent, p_oButton) {
-        
-            var bChecked = p_oEvent.newValue,
-                oCheckedButton = this.get("checkedButton");
-        
-            if (bChecked && oCheckedButton != p_oButton) {
-        
-                if (oCheckedButton) {
-        
-                    oCheckedButton.set("checked", false, true);
-        
-                }
-        
-                this.set("checkedButton", p_oButton);
-                this.set("value", p_oButton.get("value"));
-        
-            }
-            else if (oCheckedButton && !oCheckedButton.set("checked")) {
-        
-                oCheckedButton.set("checked", true, true);
-        
-            }
-           
-        },
-        
-        
-        
-        // Public methods
-        
-        
-        /**
-        * @method init
-        * @description The ButtonGroup class's initialization method.
-        * @param {String} p_oElement String specifying the id attribute of the 
-        * <code><div></code> element of the button group.
-        * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-        * level-one-html.html#ID-22445964">HTMLDivElement</a>} p_oElement Object 
-        * specifying the <code><div></code> element of the button group.
-        * @param {Object} p_oElement Object literal specifying a set of  
-        * configuration attributes used to create the button group.
-        * @param {Object} p_oAttributes Optional. Object literal specifying a
-        * set of configuration attributes used to create the button group.
-        */
-        init: function (p_oElement, p_oAttributes) {
-        
-            this._buttons = [];
-        
-            YAHOO.widget.ButtonGroup.superclass.init.call(this, p_oElement, 
-                    p_oAttributes);
-        
-            this.addClass(this.CSS_CLASS_NAME);
-        
-            this.logger.log("Searching for child nodes with the class name " +
-                "\"yui-radio-button\" to add to the button group.");
-        
-            var aButtons = this.getElementsByClassName("yui-radio-button");
-        
-        
-            if (aButtons.length > 0) {
-        
-                this.logger.log("Found " + aButtons.length + 
-                    " child nodes with the class name \"yui-radio-button.\"" + 
-                    "  Attempting to add to button group.");
-        
-                this.addButtons(aButtons);
-        
-            }
-        
-        
-            this.logger.log("Searching for child nodes with the type of " +
-                " \"radio\" to add to the button group.");
-        
-            function isRadioButton(p_oElement) {
-        
-                return (p_oElement.type == "radio");
-        
-            }
-        
-            aButtons = 
-                Dom.getElementsBy(isRadioButton, "input", this.get("element"));
-        
-        
-            if (aButtons.length > 0) {
-        
-                this.logger.log("Found " + aButtons.length + " child nodes" +
-                    " with the type of \"radio.\"  Attempting to add to" +
-                    " button group.");
-        
-                this.addButtons(aButtons);
-        
-            }
-        
-            this.on("keydown", this._onKeyDown);
-            this.on("appendTo", this._onAppendTo);
-        
-
-            var oContainer = this.get("container");
-
-            if (oContainer) {
-        
-                if (Lang.isString(oContainer)) {
-        
-                    Event.onContentReady(oContainer, function () {
-        
-                        this.appendTo(oContainer);            
-                    
-                    }, null, this);
-        
-                }
-                else {
-        
-                    this.appendTo(oContainer);
-        
-                }
-        
-            }
-        
-        
-            this.logger.log("Initialization completed.");
-        
-        },
-        
-        
-        /**
-        * @method initAttributes
-        * @description Initializes all of the configuration attributes used to  
-        * create the button group.
-        * @param {Object} p_oAttributes Object literal specifying a set of 
-        * configuration attributes used to create the button group.
-        */
-        initAttributes: function (p_oAttributes) {
-        
-            var oAttributes = p_oAttributes || {};
-        
-            YAHOO.widget.ButtonGroup.superclass.initAttributes.call(
-                this, oAttributes);
-        
-        
-            /**
-            * @attribute name
-            * @description String specifying the name for the button group.  
-            * This name will be applied to each button in the button group.
-            * @default null
-            * @type String
-            */
-            this.setAttributeConfig("name", {
-        
-                value: oAttributes.name,
-                validator: Lang.isString
-        
-            });
-        
-        
-            /**
-            * @attribute disabled
-            * @description Boolean indicating if the button group should be 
-            * disabled.  Disabling the button group will disable each button 
-            * in the button group.  Disabled buttons are dimmed and will not 
-            * respond to user input or fire events.
-            * @default false
-            * @type Boolean
-            */
-            this.setAttributeConfig("disabled", {
-        
-                value: (oAttributes.disabled || false),
-                validator: Lang.isBoolean,
-                method: this._setDisabled
-        
-            });
-        
-        
-            /**
-            * @attribute value
-            * @description Object specifying the value for the button group.
-            * @default null
-            * @type Object
-            */
-            this.setAttributeConfig("value", {
-        
-                value: oAttributes.value
-        
-            });
-        
-        
-            /**
-            * @attribute container
-            * @description HTML element reference or string specifying the id 
-            * attribute of the HTML element that the button group's markup
-            * should be rendered into.
-            * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-            * level-one-html.html#ID-58190037">HTMLElement</a>|String
-            * @default null
-            */
-            this.setAttributeConfig("container", {
-        
-                value: oAttributes.container,
-                writeOnce: true
-        
-            });
-        
-        
-            /**
-            * @attribute checkedButton
-            * @description Reference for the button in the button group that 
-            * is checked.
-            * @type {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}
-            * @default null
-            */
-            this.setAttributeConfig("checkedButton", {
-        
-                value: null
-        
-            });
-        
-        },
-        
-        
-        /**
-        * @method addButton
-        * @description Adds the button to the button group.
-        * @param {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}  
-        * p_oButton Object reference for the <a href="YAHOO.widget.Button.html">
-        * YAHOO.widget.Button</a> instance to be added to the button group.
-        * @param {String} p_oButton String specifying the id attribute of the 
-        * <code><input></code> or <code><span></code> element 
-        * to be used to create the button to be added to the button group.
-        * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-        * level-one-html.html#ID-6043025">HTMLInputElement</a>|<a href="
-        * http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#
-        * ID-33759296">HTMLElement</a>} p_oButton Object reference for the 
-        * <code><input></code> or <code><span></code> element 
-        * to be used to create the button to be added to the button group.
-        * @param {Object} p_oButton Object literal specifying a set of 
-        * <a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a> 
-        * configuration attributes used to configure the button to be added to 
-        * the button group.
-        * @return {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>} 
-        */
-        addButton: function (p_oButton) {
-        
-            var oButton,
-                oButtonElement,
-                oGroupElement,
-                nIndex,
-                sButtonName,
-                sGroupName;
-        
-        
-            if (p_oButton instanceof Button && 
-                p_oButton.get("type") == "radio") {
-        
-                oButton = p_oButton;
-        
-            }
-            else if (!Lang.isString(p_oButton) && !p_oButton.nodeName) {
-        
-                p_oButton.type = "radio";
-        
-                oButton = new Button(p_oButton);
-
-            }
-            else {
-        
-                oButton = new Button(p_oButton, { type: "radio" });
-        
-            }
-        
-        
-            if (oButton) {
-        
-                nIndex = this._buttons.length;
-                sButtonName = oButton.get("name");
-                sGroupName = this.get("name");
-        
-                oButton.index = nIndex;
-        
-                this._buttons[nIndex] = oButton;
-                m_oButtons[oButton.get("id")] = oButton;
-        
-        
-                if (sButtonName != sGroupName) {
-        
-                    oButton.set("name", sGroupName);
-                
-                }
-        
-        
-                if (this.get("disabled")) {
-        
-                    oButton.set("disabled", true);
-        
-                }
-        
-        
-                if (oButton.get("checked")) {
-        
-                    this.set("checkedButton", oButton);
-        
-                }
-
-                
-                oButtonElement = oButton.get("element");
-                oGroupElement = this.get("element");
-                
-                if (oButtonElement.parentNode != oGroupElement) {
-                
-                    oGroupElement.appendChild(oButtonElement);
-                
-                }
-        
-                
-                oButton.on("checkedChange", 
-                    this._onButtonCheckedChange, oButton, this);
-        
-                this.logger.log("Button " + oButton.get("id") + " added.");
-        
-                return oButton;
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method addButtons
-        * @description Adds the array of buttons to the button group.
-        * @param {Array} p_aButtons Array of <a href="YAHOO.widget.Button.html">
-        * YAHOO.widget.Button</a> instances to be added 
-        * to the button group.
-        * @param {Array} p_aButtons Array of strings specifying the id 
-        * attribute of the <code><input></code> or <code><span>
-        * </code> elements to be used to create the buttons to be added to the 
-        * button group.
-        * @param {Array} p_aButtons Array of object references for the 
-        * <code><input></code> or <code><span></code> elements 
-        * to be used to create the buttons to be added to the button group.
-        * @param {Array} p_aButtons Array of object literals, each containing
-        * a set of <a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>  
-        * configuration attributes used to configure each button to be added 
-        * to the button group.
-        * @return {Array}
-        */
-        addButtons: function (p_aButtons) {
-    
-            var nButtons,
-                oButton,
-                aButtons,
-                i;
-        
-            if (Lang.isArray(p_aButtons)) {
-            
-                nButtons = p_aButtons.length;
-                aButtons = [];
-        
-                if (nButtons > 0) {
-        
-                    for (i = 0; i < nButtons; i++) {
-        
-                        oButton = this.addButton(p_aButtons[i]);
-                        
-                        if (oButton) {
-        
-                            aButtons[aButtons.length] = oButton;
-        
-                        }
-                    
-                    }
-        
-                    if (aButtons.length > 0) {
-        
-                        this.logger.log(aButtons.length + " buttons added.");
-        
-                        return aButtons;
-        
-                    }
-                
-                }
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method removeButton
-        * @description Removes the button at the specified index from the 
-        * button group.
-        * @param {Number} p_nIndex Number specifying the index of the button 
-        * to be removed from the button group.
-        */
-        removeButton: function (p_nIndex) {
-        
-            var oButton = this.getButton(p_nIndex),
-                nButtons,
-                i;
-            
-            if (oButton) {
-        
-                this.logger.log("Removing button " + oButton.get("id") + ".");
-        
-                this._buttons.splice(p_nIndex, 1);
-                delete m_oButtons[oButton.get("id")];
-        
-                oButton.removeListener("checkedChange", 
-                    this._onButtonCheckedChange);
-
-                oButton.destroy();
-        
-        
-                nButtons = this._buttons.length;
-                
-                if (nButtons > 0) {
-        
-                    i = this._buttons.length - 1;
-                    
-                    do {
-        
-                        this._buttons[i].index = i;
-        
-                    }
-                    while (i--);
-                
-                }
-        
-                this.logger.log("Button " + oButton.get("id") + " removed.");
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method getButton
-        * @description Returns the button at the specified index.
-        * @param {Number} p_nIndex The index of the button to retrieve from the 
-        * button group.
-        * @return {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}
-        */
-        getButton: function (p_nIndex) {
-        
-            if (Lang.isNumber(p_nIndex)) {
-        
-                return this._buttons[p_nIndex];
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method getButtons
-        * @description Returns an array of the buttons in the button group.
-        * @return {Array}
-        */
-        getButtons: function () {
-        
-            return this._buttons;
-        
-        },
-        
-        
-        /**
-        * @method getCount
-        * @description Returns the number of buttons in the button group.
-        * @return {Number}
-        */
-        getCount: function () {
-        
-            return this._buttons.length;
-        
-        },
-        
-        
-        /**
-        * @method focus
-        * @description Sets focus to the button at the specified index.
-        * @param {Number} p_nIndex Number indicating the index of the button 
-        * to focus. 
-        */
-        focus: function (p_nIndex) {
-        
-            var oButton,
-                nButtons,
-                i;
-        
-            if (Lang.isNumber(p_nIndex)) {
-        
-                oButton = this._buttons[p_nIndex];
-                
-                if (oButton) {
-        
-                    oButton.focus();
-        
-                }
-            
-            }
-            else {
-        
-                nButtons = this.getCount();
-        
-                for (i = 0; i < nButtons; i++) {
-        
-                    oButton = this._buttons[i];
-        
-                    if (!oButton.get("disabled")) {
-        
-                        oButton.focus();
-                        break;
-        
-                    }
-        
-                }
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method check
-        * @description Checks the button at the specified index.
-        * @param {Number} p_nIndex Number indicating the index of the button 
-        * to check. 
-        */
-        check: function (p_nIndex) {
-        
-            var oButton = this.getButton(p_nIndex);
-            
-            if (oButton) {
-        
-                oButton.set("checked", true);
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method destroy
-        * @description Removes the button group's element from its parent 
-        * element and removes all event handlers.
-        */
-        destroy: function () {
-        
-            this.logger.log("Destroying...");
-        
-            var nButtons = this._buttons.length,
-                oElement = this.get("element"),
-                oParentNode = oElement.parentNode,
-                i;
-            
-            if (nButtons > 0) {
-        
-                i = this._buttons.length - 1;
-        
-                do {
-        
-                    this._buttons[i].destroy();
-        
-                }
-                while (i--);
-            
-            }
-        
-            this.logger.log("Removing DOM event handlers.");
-        
-            Event.purgeElement(oElement);
-            
-            this.logger.log("Removing from document.");
-        
-            oParentNode.removeChild(oElement);
-        
-        },
-        
-        
-        /**
-        * @method toString
-        * @description Returns a string representing the button group.
-        * @return {String}
-        */
-        toString: function () {
-        
-            return ("ButtonGroup " + this.get("id"));
-        
-        }
-    
-    });
-
-})();
-YAHOO.register("button", YAHOO.widget.Button, {version: "2.3.1", build: "541"});

Deleted: trunk/root/static/yui/button/button-beta-min.js
===================================================================
--- trunk/root/static/yui/button/button-beta-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/button/button-beta-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,11 +0,0 @@
-/*
-Copyright (c) 2007, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
-*/
-(function(){var G=YAHOO.util.Dom,L=YAHOO.util.Event,I=YAHOO.lang,B=YAHOO.widget.Overlay,J=YAHOO.widget.Menu,D={},K=null,E=null,C=null;function F(N,M,Q,O){var R,P;if(I.isString(N)&&I.isString(M)){if(YAHOO.env.ua.ie){P="<input type=\""+N+"\" name=\""+M+"\"";if(O){P+=" checked";}P+=">";R=document.createElement(P);}else{R=document.createElement("input");R.name=M;R.type=N;if(O){R.checked=true;}}R.value=Q;return R;}}function H(N,T){var M=N.nodeName.toUpperCase(),R=this,S,O,P;function U(V){if(!(V in T)){S=N.getAttributeNode(V);if(S&&("value" in S)){T[V]=S.value;}}}function Q(){U("type");if(T.type=="button"){T.type="push";}if(!("disabled" in T)){T.disabled=N.disabled;}U("name");U("value");U("title");}switch(M){case"A":T.type="link";U("href");U("target");break;case"INPUT":Q();if(!("checked" in T)){T.checked=N.checked;}break;case"BUTTON":Q();O=N.parentNode.parentNode;if(G.hasClass(O,this.CSS_CLASS_NAME+"-checked")){T.checked=true;}if(G.hasClass(O,this.CSS_CLASS_NAME+"-disabled")){T.d!
 isabled=true;}N.removeAttribute("value");N.setAttribute("type","button");break;}N.removeAttribute("id");N.removeAttribute("name");if(!("tabindex" in T)){T.tabindex=N.tabIndex;}if(!("label" in T)){P=M=="INPUT"?N.value:N.innerHTML;if(P&&P.length>0){T.label=P;}}}function A(O){var N=O.attributes,M=N.srcelement,Q=M.nodeName.toUpperCase(),P=this;if(Q==this.NODE_NAME){O.element=M;O.id=M.id;G.getElementsBy(function(R){switch(R.nodeName.toUpperCase()){case"BUTTON":case"A":case"INPUT":H.call(P,R,N);break;}},"*",M);}else{switch(Q){case"BUTTON":case"A":case"INPUT":H.call(this,M,N);break;}}}YAHOO.widget.Button=function(Q,N){var P=YAHOO.widget.Button.superclass.constructor,O,M;if(arguments.length==1&&!I.isString(Q)&&!Q.nodeName){if(!Q.id){Q.id=G.generateId();}P.call(this,(this.createButtonElement(Q.type)),Q);}else{O={element:null,attributes:(N||{})};if(I.isString(Q)){M=G.get(Q);if(M){if(!O.attributes.id){O.attributes.id=Q;}O.attributes.srcelement=M;A.call(this,O);if(!O.element){O.element!
 =this.createButtonElement(O.attributes.type);}P.call(this,O.el!
 ement,O.
attributes);}}else{if(Q.nodeName){if(!O.attributes.id){if(Q.id){O.attributes.id=Q.id;}else{O.attributes.id=G.generateId();}}O.attributes.srcelement=Q;A.call(this,O);if(!O.element){O.element=this.createButtonElement(O.attributes.type);}P.call(this,O.element,O.attributes);}}}};YAHOO.extend(YAHOO.widget.Button,YAHOO.util.Element,{_button:null,_menu:null,_hiddenFields:null,_onclickAttributeValue:null,_activationKeyPressed:false,_activationButtonPressed:false,_hasKeyEventHandlers:false,_hasMouseEventHandlers:false,NODE_NAME:"SPAN",CHECK_ACTIVATION_KEYS:[32],ACTIVATION_KEYS:[13,32],OPTION_AREA_WIDTH:20,CSS_CLASS_NAME:"yui-button",RADIO_DEFAULT_TITLE:"Unchecked.  Click to check.",RADIO_CHECKED_TITLE:"Checked.  Click to uncheck.",CHECKBOX_DEFAULT_TITLE:"Unchecked.  Click to check.",CHECKBOX_CHECKED_TITLE:"Checked.  Click to uncheck.",MENUBUTTON_DEFAULT_TITLE:"Menu collapsed.  Click to expand.",MENUBUTTON_MENU_VISIBLE_TITLE:"Menu expanded.  Click or press Esc to collapse.",SPLITBUTTO!
 N_DEFAULT_TITLE:("Menu collapsed.  Click inside option region or press Ctrl + Shift + M to show the menu."),SPLITBUTTON_OPTION_VISIBLE_TITLE:"Menu expanded.  Press Esc or Ctrl + Shift + M to hide the menu.",SUBMIT_TITLE:"Click to submit form.",_setType:function(M){if(M=="split"){this.on("option",this._onOption);}},_setLabel:function(M){this._button.innerHTML=M;var O,N;if(YAHOO.env.ua.gecko&&G.inDocument(this.get("element"))){N=this;O=this.CSS_CLASS_NAME;this.removeClass(O);window.setTimeout(function(){N.addClass(O);},0);}},_setTabIndex:function(M){this._button.tabIndex=M;},_setTitle:function(N){var M=N;if(this.get("type")!="link"){if(!M){switch(this.get("type")){case"radio":M=this.RADIO_DEFAULT_TITLE;break;case"checkbox":M=this.CHECKBOX_DEFAULT_TITLE;break;case"menu":M=this.MENUBUTTON_DEFAULT_TITLE;break;case"split":M=this.SPLITBUTTON_DEFAULT_TITLE;break;case"submit":M=this.SUBMIT_TITLE;break;}}this._button.title=M;}},_setDisabled:function(M){if(this.get("type")!="link"){if!
 (M){if(this._menu){this._menu.hide();}if(this.hasFocus()){this!
 .blur();
}this._button.setAttribute("disabled","disabled");this.addStateCSSClasses("disabled");this.removeStateCSSClasses("hover");this.removeStateCSSClasses("active");this.removeStateCSSClasses("focus");}else{this._button.removeAttribute("disabled");this.removeStateCSSClasses("disabled");}}},_setHref:function(M){if(this.get("type")=="link"){this._button.href=M;}},_setTarget:function(M){if(this.get("type")=="link"){this._button.setAttribute("target",M);}},_setChecked:function(N){var O=this.get("type"),M;if(O=="checkbox"||O=="radio"){if(N){this.addStateCSSClasses("checked");M=(O=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE;}else{this.removeStateCSSClasses("checked");M=(O=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE;}this.set("title",M);}},_setMenu:function(W){var Q=this.get("lazyloadmenu"),T=this.get("element"),M=J.prototype.CSS_CLASS_NAME,Y=false,Z,P,S,O,N,V,R;if(!B){return false;}if(!J){return false;}function X(){Z.render(T.parentNode);this.remove!
 Listener("appendTo",X);}function U(){if(Z){G.addClass(Z.element,this.get("menuclassname"));G.addClass(Z.element,"yui-"+this.get("type")+"-button-menu");Z.showEvent.subscribe(this._onMenuShow,null,this);Z.hideEvent.subscribe(this._onMenuHide,null,this);Z.renderEvent.subscribe(this._onMenuRender,null,this);if(Z instanceof J){Z.keyDownEvent.subscribe(this._onMenuKeyDown,this,true);Z.subscribe("click",this._onMenuClick,this,true);Z.itemAddedEvent.subscribe(this._onMenuItemAdded,this,true);S=Z.srcElement;if(S&&S.nodeName.toUpperCase()=="SELECT"){S.style.display="none";S.parentNode.removeChild(S);}}else{if(Z instanceof B){if(!K){K=new YAHOO.widget.OverlayManager();}K.register(Z);}}this._menu=Z;if(!Y){if(Q&&!(Z instanceof J)){Z.beforeShowEvent.subscribe(this._onOverlayBeforeShow,null,this);}else{if(!Q){if(G.inDocument(T)){Z.render(T.parentNode);}else{this.on("appendTo",X);}}}}}}if(W&&(W instanceof J)){Z=W;O=Z.getItems();
-N=O.length;Y=true;if(N>0){R=N-1;do{V=O[R];if(V){V.cfg.subscribeToConfigEvent("selected",this._onMenuItemSelected,V,this);}}while(R--);}U.call(this);}else{if(W&&(W instanceof B)){Z=W;Y=true;Z.cfg.setProperty("visible",false);Z.cfg.setProperty("context",[T,"tl","bl"]);U.call(this);}else{if(I.isArray(W)){this.on("appendTo",function(){Z=new J(G.generateId(),{lazyload:Q,itemdata:W});U.call(this);});}else{if(I.isString(W)){P=G.get(W);if(P){if(G.hasClass(P,M)||P.nodeName.toUpperCase()=="SELECT"){Z=new J(W,{lazyload:Q});U.call(this);}else{Z=new B(W,{visible:false,context:[T,"tl","bl"]});U.call(this);}}}else{if(W&&W.nodeName){if(G.hasClass(W,M)||W.nodeName.toUpperCase()=="SELECT"){Z=new J(W,{lazyload:Q});U.call(this);}else{if(!W.id){G.generateId(W);}Z=new B(W,{visible:false,context:[T,"tl","bl"]});U.call(this);}}}}}}},_setOnClick:function(M){if(this._onclickAttributeValue&&(this._onclickAttributeValue!=M)){this.removeListener("click",this._onclickAttributeValue.fn);this._onclickAttr!
 ibuteValue=null;}if(!this._onclickAttributeValue&&I.isObject(M)&&I.isFunction(M.fn)){this.on("click",M.fn,M.obj,M.scope);this._onclickAttributeValue=M;}},_setSelectedMenuItem:function(N){var M=this._menu,O;if(M&&M instanceof J){O=M.getItem(N);if(O&&!O.cfg.getProperty("selected")){O.cfg.setProperty("selected",true);}}},_isActivationKey:function(M){var Q=this.get("type"),N=(Q=="checkbox"||Q=="radio")?this.CHECK_ACTIVATION_KEYS:this.ACTIVATION_KEYS,P=N.length,O;if(P>0){O=P-1;do{if(M==N[O]){return true;}}while(O--);}},_isSplitButtonOptionKey:function(M){return(M.ctrlKey&&M.shiftKey&&L.getCharCode(M)==77);},_addListenersToForm:function(){var S=this.getForm(),R=YAHOO.widget.Button.onFormKeyPress,Q,M,P,O,N;if(S){L.on(S,"reset",this._onFormReset,null,this);L.on(S,"submit",this.createHiddenFields,null,this);M=this.get("srcelement");if(this.get("type")=="submit"||(M&&M.type=="submit")){P=L.getListeners(S,"keypress");Q=false;if(P){O=P.length;if(O>0){N=O-1;do{if(P[N].fn==R){Q=true;brea!
 k;}}while(N--);}}if(!Q){L.on(S,"keypress",R);}}}},_originalMax!
 Height:-
1,_showMenu:function(O){YAHOO.widget.MenuManager.hideVisible();if(K){K.hideAll();}var M=this._menu,N=G.getViewportHeight(),Q,R,P;if(M&&(M instanceof J)){M.cfg.applyConfig({context:[this.get("id"),"tl","bl"],constraintoviewport:false,clicktohide:false,visible:true});M.cfg.fireQueue();M.align("tl","bl");if(O.type=="mousedown"){L.stopPropagation(O);}if(this.get("focusmenu")){this._menu.focus();}Q=M.element.offsetHeight;if((M.cfg.getProperty("y")+Q)>N){M.align("bl","tl");P=M.cfg.getProperty("y");R=G.getDocumentScrollTop();if(R>=P){if(this._originalMaxHeight==-1){this._originalMaxHeight=M.cfg.getProperty("maxheight");}M.cfg.setProperty("maxheight",(Q-((R-P)+20)));M.align("bl","tl");}}}else{if(M&&(M instanceof B)){M.show();M.align("tl","bl");Q=M.element.offsetHeight;if((M.cfg.getProperty("y")+Q)>N){M.align("bl","tl");}}}},_hideMenu:function(){var M=this._menu;if(M){M.hide();}},_onMouseOver:function(M){if(!this._hasMouseEventHandlers){this.on("mouseout",this._onMouseOut);this.on("m!
 ousedown",this._onMouseDown);this.on("mouseup",this._onMouseUp);this._hasMouseEventHandlers=true;}this.addStateCSSClasses("hover");if(this._activationButtonPressed){this.addStateCSSClasses("active");}if(this._bOptionPressed){this.addStateCSSClasses("activeoption");}},_onMouseOut:function(M){this.removeStateCSSClasses("hover");if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}if(this._activationButtonPressed||this._bOptionPressed){L.on(document,"mouseup",this._onDocumentMouseUp,null,this);}},_onDocumentMouseUp:function(M){this._activationButtonPressed=false;this._bOptionPressed=false;var N=this.get("type");if(N=="menu"||N=="split"){this.removeStateCSSClasses((N=="menu"?"active":"activeoption"));this._hideMenu();}L.removeListener(document,"mouseup",this._onDocumentMouseUp);},_onMouseDown:function(P){var R,N,Q,O;function M(){this._hideMenu();this.removeListener("mouseup",M);}if((P.which||P.button)==1){if(!this.hasFocus()){this.focus();}R=this.get("type");if(R=!
 ="split"){N=this.get("element");Q=L.getPageX(P)-G.getX(N);if((!
 N.offset
Width-this.OPTION_AREA_WIDTH)<Q){this.fireEvent("option",P);}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}else{if(R=="menu"){if(this.isActive()){this._hideMenu();this._activationButtonPressed=false;}else{this._showMenu(P);this._activationButtonPressed=true;}}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}if(R=="split"||R=="menu"){O=this;this._hideMenuTimerId=window.setTimeout(function(){O.on("mouseup",M);},250);}}},_onMouseUp:function(M){var N=this.get("type");if(this._hideMenuTimerId){window.clearTimeout(this._hideMenuTimerId);}if(N=="checkbox"||N=="radio"){this.set("checked",!(this.get("checked")));}this._activationButtonPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}},_onFocus:function(N){var M;this.addStateCSSClasses("focus");if(this._activationKeyPressed){this.addStateCSSClasses("active");}C=this;if(!this._hasKeyEventHandlers){M=this._button;L.on(M,"blur",this._onBlur,null,this!
 );L.on(M,"keydown",this._onKeyDown,null,this);L.on(M,"keyup",this._onKeyUp,null,this);this._hasKeyEventHandlers=true;}this.fireEvent("focus",N);},_onBlur:function(M){this.removeStateCSSClasses("focus");if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}if(this._activationKeyPressed){L.on(document,"keyup",this._onDocumentKeyUp,null,this);}C=null;this.fireEvent("blur",M);},_onDocumentKeyUp:function(M){if(this._isActivationKey(L.getCharCode(M))){this._activationKeyPressed=false;L.removeListener(document,"keyup",this._onDocumentKeyUp);}},_onKeyDown:function(N){var M=this._menu;if(this.get("type")=="split"&&this._isSplitButtonOptionKey(N)){this.fireEvent("option",N);}else{if(this._isActivationKey(L.getCharCode(N))){if(this.get("type")=="menu"){this._showMenu(N);}else{this._activationKeyPressed=true;this.addStateCSSClasses("active");}}}if(M&&M.cfg.getProperty("visible")&&L.getCharCode(N)==27){M.hide();
-this.focus();}},_onKeyUp:function(M){var N;if(this._isActivationKey(L.getCharCode(M))){N=this.get("type");if(N=="checkbox"||N=="radio"){this.set("checked",!(this.get("checked")));}this._activationKeyPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}}},_onClick:function(P){var S=this.get("type"),M,Q,N,O,R;switch(S){case"radio":case"checkbox":if(this.get("checked")){M=(S=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE;}else{M=(S=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE;}this.set("title",M);break;case"submit":this.submitForm();break;case"reset":Q=this.getForm();if(Q){Q.reset();}break;case"menu":M=this._menu.cfg.getProperty("visible")?this.MENUBUTTON_MENU_VISIBLE_TITLE:this.MENUBUTTON_DEFAULT_TITLE;this.set("title",M);break;case"split":O=this.get("element");R=L.getPageX(P)-G.getX(O);if((O.offsetWidth-this.OPTION_AREA_WIDTH)<R){return false;}else{this._hideMenu();N=this.get("srcelement");if(N&&N.type=="submit"){!
 this.submitForm();}}M=this._menu.cfg.getProperty("visible")?this.SPLITBUTTON_OPTION_VISIBLE_TITLE:this.SPLITBUTTON_DEFAULT_TITLE;this.set("title",M);break;}},_onAppendTo:function(N){var M=this;window.setTimeout(function(){M._addListenersToForm();},0);},_onFormReset:function(N){var O=this.get("type"),M=this._menu;if(O=="checkbox"||O=="radio"){this.resetValue("checked");}if(M&&(M instanceof J)){this.resetValue("selectedMenuItem");}},_onDocumentMouseDown:function(P){var M=L.getTarget(P),O=this.get("element"),N=this._menu.element;if(M!=O&&!G.isAncestor(O,M)&&M!=N&&!G.isAncestor(N,M)){this._hideMenu();L.removeListener(document,"mousedown",this._onDocumentMouseDown);}},_onOption:function(M){if(this.hasClass("yui-split-button-activeoption")){this._hideMenu();this._bOptionPressed=false;}else{this._showMenu(M);this._bOptionPressed=true;}},_onOverlayBeforeShow:function(N){var M=this._menu;M.render(this.get("element").parentNode);M.beforeShowEvent.unsubscribe(this._onOverlayBeforeShow!
 );},_onMenuShow:function(N){L.on(document,"mousedown",this._on!
 Document
MouseDown,null,this);var M,O;if(this.get("type")=="split"){M=this.SPLITBUTTON_OPTION_VISIBLE_TITLE;O="activeoption";}else{M=this.MENUBUTTON_MENU_VISIBLE_TITLE;O="active";}this.addStateCSSClasses(O);this.set("title",M);},_onMenuHide:function(O){var N=this._menu,M,P;if(N&&(N instanceof J)&&this._originalMaxHeight!=-1){this._menu.cfg.setProperty("maxheight",this._originalMaxHeight);}if(this.get("type")=="split"){M=this.SPLITBUTTON_DEFAULT_TITLE;P="activeoption";}else{M=this.MENUBUTTON_DEFAULT_TITLE;P="active";}this.removeStateCSSClasses(P);this.set("title",M);if(this.get("type")=="split"){this._bOptionPressed=false;}},_onMenuKeyDown:function(O,N){var M=N[0];if(L.getCharCode(M)==27){this.focus();if(this.get("type")=="split"){this._bOptionPressed=false;}}},_onMenuRender:function(N){var P=this.get("element"),M=P.parentNode,O=this._menu.element;if(M!=O.parentNode){M.appendChild(O);}this.set("selectedMenuItem",this.get("selectedMenuItem"));},_onMenuItemSelected:function(N,M,P){var O!
 =M[0];if(O){this.set("selectedMenuItem",P);}},_onMenuItemAdded:function(O,N,M){var P=N[0];P.cfg.subscribeToConfigEvent("selected",this._onMenuItemSelected,P.index,this);},_onMenuClick:function(N,M){var P=M[1],O;if(P){O=this.get("srcelement");if(O&&O.type=="submit"){this.submitForm();}this._hideMenu();}},createButtonElement:function(M){var O=this.NODE_NAME,N=document.createElement(O);N.innerHTML="<"+O+" class=\"first-child\">"+(M=="link"?"<a></a>":"<button type=\"button\"></button>")+"</"+O+">";return N;},addStateCSSClasses:function(M){var N=this.get("type");if(I.isString(M)){if(M!="activeoption"){this.addClass(this.CSS_CLASS_NAME+("-"+M));}this.addClass("yui-"+N+("-button-"+M));}},removeStateCSSClasses:function(M){var N=this.get("type");if(I.isString(M)){this.removeClass(this.CSS_CLASS_NAME+("-"+M));this.removeClass("yui-"+N+("-button-"+M));}},createHiddenFields:function(){this.removeHiddenFields();var R=this.getForm(),U,N,P,S,T,O,Q,M;if(R&&!this.get("disabled")){N=this.get!
 ("type");P=(N=="checkbox"||N=="radio");if(P||(E==this)){U=F((P!
 ?N:"hidd
en"),this.get("name"),this.get("value"),this.get("checked"));if(U){if(P){U.style.display="none";}R.appendChild(U);}}S=this._menu;if(S&&(S instanceof J)){M=S.srcElement;T=S.getItem(this.get("selectedMenuItem"));if(T){if(M&&M.nodeName.toUpperCase()=="SELECT"){R.appendChild(M);M.selectedIndex=T.index;}else{Q=(T.value===null||T.value==="")?T.cfg.getProperty("text"):T.value;O=this.get("name");if(Q&&O){M=F("hidden",(O+"_options"),Q);R.appendChild(M);}}}}if(U&&M){this._hiddenFields=[U,M];}else{if(!U&&M){this._hiddenFields=M;}else{if(U&&!M){this._hiddenFields=U;}}}return this._hiddenFields;}},removeHiddenFields:function(){var P=this._hiddenFields,N,O;function M(Q){if(G.inDocument(Q)){Q.parentNode.removeChild(Q);}}if(P){if(I.isArray(P)){N=P.length;if(N>0){O=N-1;do{M(P[O]);}while(O--);}}else{M(P);}this._hiddenFields=null;}},submitForm:function(){var P=this.getForm(),O=this.get("srcelement"),N=false,M;if(P){if(this.get("type")=="submit"||(O&&O.type=="submit")){E=this;}if(YAHOO.env.ua.i!
 e){N=P.fireEvent("onsubmit");}else{M=document.createEvent("HTMLEvents");M.initEvent("submit",true,true);N=P.dispatchEvent(M);}if((YAHOO.env.ua.ie||YAHOO.env.ua.webkit)&&N){P.submit();}}return N;},init:function(M,T){var O=T.type=="link"?"a":"button",Q=T.srcelement,S=M.getElementsByTagName(O)[0],R;if(!S){R=M.getElementsByTagName("input")[0];if(R){S=document.createElement("button");S.setAttribute("type","button");R.parentNode.replaceChild(S,R);}}this._button=S;YAHOO.widget.Button.superclass.init.call(this,M,T);D[this.get("id")]=this;this.addClass(this.CSS_CLASS_NAME);this.addClass("yui-"+this.get("type")+"-button");L.on(this._button,"focus",this._onFocus,null,this);this.on("mouseover",this._onMouseOver);this.on("click",this._onClick);this.on("appendTo",this._onAppendTo);var V=this.get("container"),N=this.get("element"),U=G.inDocument(N),P;if(V){if(Q&&Q!=N){P=Q.parentNode;if(P){P.removeChild(Q);}}if(I.isString(V)){L.onContentReady(V,function(){this.appendTo(V);
-},null,this);}else{this.appendTo(V);}}else{if(!U&&Q&&Q!=N){P=Q.parentNode;if(P){this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:P});P.replaceChild(N,Q);this.fireEvent("appendTo",{type:"appendTo",target:P});}}else{if(this.get("type")!="link"&&U&&Q&&Q==N){this._addListenersToForm();}}}},initAttributes:function(N){var M=N||{};YAHOO.widget.Button.superclass.initAttributes.call(this,M);this.setAttributeConfig("type",{value:(M.type||"push"),validator:I.isString,writeOnce:true,method:this._setType});this.setAttributeConfig("label",{value:M.label,validator:I.isString,method:this._setLabel});this.setAttributeConfig("value",{value:M.value});this.setAttributeConfig("name",{value:M.name,validator:I.isString});this.setAttributeConfig("tabindex",{value:M.tabindex,validator:I.isNumber,method:this._setTabIndex});this.configureAttribute("title",{value:M.title,validator:I.isString,method:this._setTitle});this.setAttributeConfig("disabled",{value:(M.disabled||false),validator:I.!
 isBoolean,method:this._setDisabled});this.setAttributeConfig("href",{value:M.href,validator:I.isString,method:this._setHref});this.setAttributeConfig("target",{value:M.target,validator:I.isString,method:this._setTarget});this.setAttributeConfig("checked",{value:(M.checked||false),validator:I.isBoolean,method:this._setChecked});this.setAttributeConfig("container",{value:M.container,writeOnce:true});this.setAttributeConfig("srcelement",{value:M.srcelement,writeOnce:true});this.setAttributeConfig("menu",{value:null,method:this._setMenu,writeOnce:true});this.setAttributeConfig("lazyloadmenu",{value:(M.lazyloadmenu===false?false:true),validator:I.isBoolean,writeOnce:true});this.setAttributeConfig("menuclassname",{value:(M.menuclassname||"yui-button-menu"),validator:I.isString,method:this._setMenuClassName,writeOnce:true});this.setAttributeConfig("selectedMenuItem",{value:0,validator:I.isNumber,method:this._setSelectedMenuItem});this.setAttributeConfig("onclick",{value:M.onclick,!
 method:this._setOnClick});this.setAttributeConfig("focusmenu",!
 {value:(
M.focusmenu===false?false:true),validator:I.isBoolean});},focus:function(){if(!this.get("disabled")){this._button.focus();}},blur:function(){if(!this.get("disabled")){this._button.blur();}},hasFocus:function(){return(C==this);},isActive:function(){return this.hasClass(this.CSS_CLASS_NAME+"-active");},getMenu:function(){return this._menu;},getForm:function(){return this._button.form;},getHiddenFields:function(){return this._hiddenFields;},destroy:function(){var O=this.get("element"),N=O.parentNode,M=this._menu,Q;if(M){if(K.find(M)){K.remove(M);}M.destroy();}L.purgeElement(O);L.purgeElement(this._button);L.removeListener(document,"mouseup",this._onDocumentMouseUp);L.removeListener(document,"keyup",this._onDocumentKeyUp);L.removeListener(document,"mousedown",this._onDocumentMouseDown);var P=this.getForm();if(P){L.removeListener(P,"reset",this._onFormReset);L.removeListener(P,"submit",this.createHiddenFields);}this.unsubscribeAll();if(N){N.removeChild(O);}delete D[this.get("id")!
 ];Q=G.getElementsByClassName(this.CSS_CLASS_NAME,this.NODE_NAME,P);if(I.isArray(Q)&&Q.length===0){L.removeListener(P,"keypress",YAHOO.widget.Button.onFormKeyPress);}},fireEvent:function(N,M){if(this.DOM_EVENTS[N]&&this.get("disabled")){return ;}YAHOO.widget.Button.superclass.fireEvent.call(this,N,M);},toString:function(){return("Button "+this.get("id"));}});YAHOO.widget.Button.onFormKeyPress=function(Q){var O=L.getTarget(Q),R=L.getCharCode(Q),P=O.nodeName&&O.nodeName.toUpperCase(),M=O.type,S=false,U,V,N,W;function T(Z){var Y,X;switch(Z.nodeName.toUpperCase()){case"INPUT":case"BUTTON":if(Z.type=="submit"&&!Z.disabled){if(!S&&!N){N=Z;}if(V&&!W){W=Z;}}break;default:Y=Z.id;if(Y){U=D[Y];if(U){S=true;if(!U.get("disabled")){X=U.get("srcelement");if(!V&&(U.get("type")=="submit"||(X&&X.type=="submit"))){V=U;}}}}break;}}if(R==13&&((P=="INPUT"&&(M=="text"||M=="password"||M=="checkbox"||M=="radio"||M=="file"))||P=="SELECT")){G.getElementsBy(T,"*",this);if(N){N.focus();}else{if(!N&&V){i!
 f(W){L.preventDefault(Q);}V.submitForm();}}}};YAHOO.widget.But!
 ton.addH
iddenFieldsToForm=function(M){var R=G.getElementsByClassName(YAHOO.widget.Button.prototype.CSS_CLASS_NAME,"*",M),P=R.length,Q,N,O;if(P>0){for(O=0;O<P;O++){N=R[O].id;if(N){Q=D[N];if(Q){Q.createHiddenFields();}}}}};})();(function(){var C=YAHOO.util.Dom,B=YAHOO.util.Event,D=YAHOO.lang,A=YAHOO.widget.Button,E={};YAHOO.widget.ButtonGroup=function(J,H){var I=YAHOO.widget.ButtonGroup.superclass.constructor,K,G,F;if(arguments.length==1&&!D.isString(J)&&!J.nodeName){if(!J.id){F=C.generateId();J.id=F;}I.call(this,(this._createGroupElement()),J);}else{if(D.isString(J)){G=C.get(J);if(G){if(G.nodeName.toUpperCase()==this.NODE_NAME){I.call(this,G,H);}}}else{K=J.nodeName.toUpperCase();if(K&&K==this.NODE_NAME){if(!J.id){J.id=C.generateId();}I.call(this,J,H);}}}};YAHOO.extend(YAHOO.widget.ButtonGroup,YAHOO.util.Element,{_buttons:null,NODE_NAME:"DIV",CSS_CLASS_NAME:"yui-buttongroup",_createGroupElement:function(){var F=document.createElement(this.NODE_NAME);return F;},_setDisabled:function(G)!
 {var H=this.getCount(),F;if(H>0){F=H-1;do{this._buttons[F].set("disabled",G);}while(F--);}},_onKeyDown:function(K){var G=B.getTarget(K),I=B.getCharCode(K),H=G.parentNode.parentNode.id,J=E[H],F=-1;if(I==37||I==38){F=(J.index===0)?(this._buttons.length-1):(J.index-1);}else{if(I==39||I==40){F=(J.index===(this._buttons.length-1))?0:(J.index+1);}}if(F>-1){this.check(F);this.getButton(F).focus();}},_onAppendTo:function(H){var I=this._buttons,G=I.length,F;for(F=0;F<G;F++){I[F].appendTo(this.get("element"));}},_onButtonCheckedChange:function(G,F){var I=G.newValue,H=this.get("checkedButton");if(I&&H!=F){if(H){H.set("checked",false,true);}this.set("checkedButton",F);this.set("value",F.get("value"));}else{if(H&&!H.set("checked")){H.set("checked",true,true);}}},init:function(I,H){this._buttons=[];YAHOO.widget.ButtonGroup.superclass.init.call(this,I,H);this.addClass(this.CSS_CLASS_NAME);var J=this.getElementsByClassName("yui-radio-button");
-if(J.length>0){this.addButtons(J);}function F(K){return(K.type=="radio");}J=C.getElementsBy(F,"input",this.get("element"));if(J.length>0){this.addButtons(J);}this.on("keydown",this._onKeyDown);this.on("appendTo",this._onAppendTo);var G=this.get("container");if(G){if(D.isString(G)){B.onContentReady(G,function(){this.appendTo(G);},null,this);}else{this.appendTo(G);}}},initAttributes:function(G){var F=G||{};YAHOO.widget.ButtonGroup.superclass.initAttributes.call(this,F);this.setAttributeConfig("name",{value:F.name,validator:D.isString});this.setAttributeConfig("disabled",{value:(F.disabled||false),validator:D.isBoolean,method:this._setDisabled});this.setAttributeConfig("value",{value:F.value});this.setAttributeConfig("container",{value:F.container,writeOnce:true});this.setAttributeConfig("checkedButton",{value:null});},addButton:function(J){var L,K,G,F,H,I;if(J instanceof A&&J.get("type")=="radio"){L=J;}else{if(!D.isString(J)&&!J.nodeName){J.type="radio";L=new A(J);}else{L=new!
  A(J,{type:"radio"});}}if(L){F=this._buttons.length;H=L.get("name");I=this.get("name");L.index=F;this._buttons[F]=L;E[L.get("id")]=L;if(H!=I){L.set("name",I);}if(this.get("disabled")){L.set("disabled",true);}if(L.get("checked")){this.set("checkedButton",L);}K=L.get("element");G=this.get("element");if(K.parentNode!=G){G.appendChild(K);}L.on("checkedChange",this._onButtonCheckedChange,L,this);return L;}},addButtons:function(G){var H,I,J,F;if(D.isArray(G)){H=G.length;J=[];if(H>0){for(F=0;F<H;F++){I=this.addButton(G[F]);if(I){J[J.length]=I;}}if(J.length>0){return J;}}}},removeButton:function(H){var I=this.getButton(H),G,F;if(I){this._buttons.splice(H,1);delete E[I.get("id")];I.removeListener("checkedChange",this._onButtonCheckedChange);I.destroy();G=this._buttons.length;if(G>0){F=this._buttons.length-1;do{this._buttons[F].index=F;}while(F--);}}},getButton:function(F){if(D.isNumber(F)){return this._buttons[F];}},getButtons:function(){return this._buttons;},getCount:function(){re!
 turn this._buttons.length;},focus:function(H){var I,G,F;if(D.i!
 sNumber(
H)){I=this._buttons[H];if(I){I.focus();}}else{G=this.getCount();for(F=0;F<G;F++){I=this._buttons[F];if(!I.get("disabled")){I.focus();break;}}}},check:function(F){var G=this.getButton(F);if(G){G.set("checked",true);}},destroy:function(){var I=this._buttons.length,H=this.get("element"),F=H.parentNode,G;if(I>0){G=this._buttons.length-1;do{this._buttons[G].destroy();}while(G--);}B.purgeElement(H);F.removeChild(H);},toString:function(){return("ButtonGroup "+this.get("id"));}});})();YAHOO.register("button",YAHOO.widget.Button,{version:"2.3.1",build:"541"});
\ No newline at end of file

Deleted: trunk/root/static/yui/button/button-beta.js
===================================================================
--- trunk/root/static/yui/button/button-beta.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/button/button-beta.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,4534 +0,0 @@
-/*
-Copyright (c) 2007, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
-*/
-/**
-* @module button
-* @description <p>The Button Control enables the creation of rich, graphical 
-* buttons that function like traditional HTML form buttons.  <em>Unlike</em> 
-* tradition HTML form buttons, buttons created with the Button Control can have 
-* a label that is different from its value.  With the inclusion of the optional 
-* <a href="module_menu.html">Menu Control</a>, the Button Control can also be
-* used to create menu buttons and split buttons, controls that are not 
-* available natively in HTML.  The Button Control can also be thought of as a 
-* way to create more visually engaging implementations of the browser's 
-* default radio-button and check-box controls.</p>
-* <p>The Button Control supports the following types:</p>
-* <dl>
-* <dt>push</dt>
-* <dd>Basic push button that can execute a user-specified command when 
-* pressed.</dd>
-* <dt>link</dt>
-* <dd>Navigates to a specified url when pressed.</dd>
-* <dt>submit</dt>
-* <dd>Submits the parent form when pressed.</dd>
-* <dt>reset</dt>
-* <dd>Resets the parent form when pressed.</dd>
-* <dt>checkbox</dt>
-* <dd>Maintains a "checked" state that can be toggled on and off.</dd>
-* <dt>radio</dt>
-* <dd>Maintains a "checked" state that can be toggled on and off.  Use with 
-* the ButtonGroup class to create a set of controls that are mutually 
-* exclusive; checking one button in the set will uncheck all others in 
-* the group.</dd>
-* <dt>menu</dt>
-* <dd>When pressed will show/hide a menu.</dd>
-* <dt>split</dt>
-* <dd>Can execute a user-specified command or display a menu when pressed.</dd>
-* </dl>
-* @title Button
-* @namespace YAHOO.widget
-* @requires yahoo, dom, element, event
-* @optional container, menu
-* @beta
-*/
-
-
-(function () {
-
-
-    /**
-    * The Button class creates a rich, graphical button.
-    * @param {String} p_oElement String specifying the id attribute of the 
-    * <code><input></code>, <code><button></code>,
-    * <code><a></code>, or <code><span></code> element to 
-    * be used to create the button.
-    * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
-    * one-html.html#ID-6043025">HTMLInputElement</a>|<a href="http://www.w3.org
-    * /TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-34812697">
-    * HTMLButtonElement</a>|<a href="
-    * http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#
-    * ID-33759296">HTMLElement</a>} p_oElement Object reference for the 
-    * <code><input></code>, <code><button></code>, 
-    * <code><a></code>, or <code><span></code> element to be 
-    * used to create the button.
-    * @param {Object} p_oElement Object literal specifying a set of   
-    * configuration attributes used to create the button.
-    * @param {Object} p_oAttributes Optional. Object literal specifying a set  
-    * of configuration attributes used to create the button.
-    * @namespace YAHOO.widget
-    * @class Button
-    * @constructor
-    * @extends YAHOO.util.Element
-    */
-
-
-
-    // Shorthard for utilities
-
-    var Dom = YAHOO.util.Dom,
-        Event = YAHOO.util.Event,
-        Lang = YAHOO.lang,
-        Overlay = YAHOO.widget.Overlay,
-        Menu = YAHOO.widget.Menu,
-    
-    
-        // Private member variables
-    
-        m_oButtons = {},    // Collection of all Button instances
-        m_oOverlayManager = null,   // YAHOO.widget.OverlayManager instance
-        m_oSubmitTrigger = null,    // The button that submitted the form 
-        m_oFocusedButton = null;    // The button that has focus
-
-
-
-    // Private methods
-
-    
-    
-    /**
-    * @method createInputElement
-    * @description Creates an <code><input></code> element of the 
-    * specified type.
-    * @private
-    * @param {String} p_sType String specifying the type of 
-    * <code><input></code> element to create.
-    * @param {String} p_sName String specifying the name of 
-    * <code><input></code> element to create.
-    * @param {String} p_sValue String specifying the value of 
-    * <code><input></code> element to create.
-    * @param {String} p_bChecked Boolean specifying if the  
-    * <code><input></code> element is to be checked.
-    * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
-    * one-html.html#ID-6043025">HTMLInputElement</a>}
-    */
-    function createInputElement(p_sType, p_sName, p_sValue, p_bChecked) {
-    
-        var oInput,
-            sInput;
-    
-        if (Lang.isString(p_sType) && Lang.isString(p_sName)) {
-        
-            if (YAHOO.env.ua.ie) {
-        
-                /*
-                    For IE it is necessary to create the element with the 
-                    "type," "name," "value," and "checked" properties set all 
-                    at once.
-                */
-            
-                sInput = "<input type=\"" + p_sType + "\" name=\"" + 
-                    p_sName + "\"";
-        
-                if (p_bChecked) {
-        
-                    sInput += " checked";
-                
-                }
-                
-                sInput += ">";
-        
-                oInput = document.createElement(sInput);
-        
-            }
-            else {
-            
-                oInput = document.createElement("input");
-                oInput.name = p_sName;
-                oInput.type = p_sType;
-        
-                if (p_bChecked) {
-        
-                    oInput.checked = true;
-                
-                }
-        
-            }
-        
-            oInput.value = p_sValue;
-            
-            return oInput;
-        
-        }
-    
-    }
-    
-    
-    /**
-    * @method setAttributesFromSrcElement
-    * @description Gets the values for all the attributes of the source element 
-    * (either <code><input></code> or <code><a></code>) that 
-    * map to Button configuration attributes and sets them into a collection 
-    * that is passed to the Button constructor.
-    * @private
-    * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
-    * one-html.html#ID-6043025">HTMLInputElement</a>|<a href="http://www.w3.org/
-    * TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-
-    * 48250443">HTMLAnchorElement</a>} p_oElement Object reference to the HTML 
-    * element (either <code><input></code> or <code><span>
-    * </code>) used to create the button.
-    * @param {Object} p_oAttributes Object reference for the collection of 
-    * configuration attributes used to create the button.
-    */
-    function setAttributesFromSrcElement(p_oElement, p_oAttributes) {
-    
-        var sSrcElementNodeName = p_oElement.nodeName.toUpperCase(),
-            me = this,
-            oAttribute,
-            oRootNode,
-            sText;
-            
-    
-        /**
-        * @method setAttributeFromDOMAttribute
-        * @description Gets the value of the specified DOM attribute and sets it 
-        * into the collection of configuration attributes used to configure 
-        * the button.
-        * @private
-        * @param {String} p_sAttribute String representing the name of the 
-        * attribute to retrieve from the DOM element.
-        */
-        function setAttributeFromDOMAttribute(p_sAttribute) {
-    
-            if (!(p_sAttribute in p_oAttributes)) {
-    
-                /*
-                    Need to use "getAttributeNode" instead of "getAttribute" 
-                    because using "getAttribute," IE will return the innerText 
-                    of a <code><button></code> for the value attribute  
-                    rather than the value of the "value" attribute.
-                */
-        
-                oAttribute = p_oElement.getAttributeNode(p_sAttribute);
-        
-    
-                if (oAttribute && ("value" in oAttribute)) {
-    
-    
-                    p_oAttributes[p_sAttribute] = oAttribute.value;
-    
-                }
-    
-            }
-        
-        }
-    
-    
-        /**
-        * @method setFormElementProperties
-        * @description Gets the value of the attributes from the form element  
-        * and sets them into the collection of configuration attributes used to 
-        * configure the button.
-        * @private
-        */
-        function setFormElementProperties() {
-    
-            setAttributeFromDOMAttribute("type");
-    
-            if (p_oAttributes.type == "button") {
-            
-                p_oAttributes.type = "push";
-            
-            }
-    
-            if (!("disabled" in p_oAttributes)) {
-    
-                p_oAttributes.disabled = p_oElement.disabled;
-    
-            }
-    
-            setAttributeFromDOMAttribute("name");
-            setAttributeFromDOMAttribute("value");
-            setAttributeFromDOMAttribute("title");
-    
-        }
-
-    
-        switch (sSrcElementNodeName) {
-        
-        case "A":
-            
-            p_oAttributes.type = "link";
-            
-            setAttributeFromDOMAttribute("href");
-            setAttributeFromDOMAttribute("target");
-        
-            break;
-    
-        case "INPUT":
-
-            setFormElementProperties();
-
-            if (!("checked" in p_oAttributes)) {
-    
-                p_oAttributes.checked = p_oElement.checked;
-    
-            }
-
-            break;
-
-        case "BUTTON":
-
-            setFormElementProperties();
-
-            oRootNode = p_oElement.parentNode.parentNode;
-
-            if (Dom.hasClass(oRootNode, this.CSS_CLASS_NAME + "-checked")) {
-            
-                p_oAttributes.checked = true;
-            
-            }
-
-            if (Dom.hasClass(oRootNode, this.CSS_CLASS_NAME + "-disabled")) {
-
-                p_oAttributes.disabled = true;
-            
-            }
-
-            p_oElement.removeAttribute("value");
-
-            p_oElement.setAttribute("type", "button");
-
-            break;
-        
-        }
-
-        p_oElement.removeAttribute("id");
-        p_oElement.removeAttribute("name");
-        
-        if (!("tabindex" in p_oAttributes)) {
-
-            p_oAttributes.tabindex = p_oElement.tabIndex;
-
-        }
-    
-        if (!("label" in p_oAttributes)) {
-    
-            // Set the "label" property
-        
-            sText = sSrcElementNodeName == "INPUT" ? 
-                            p_oElement.value : p_oElement.innerHTML;
-        
-    
-            if (sText && sText.length > 0) {
-                
-                p_oAttributes.label = sText;
-                
-            } 
-    
-        }
-    
-    }
-    
-    
-    /**
-    * @method initConfig
-    * @description Initializes the set of configuration attributes that are 
-    * used to instantiate the button.
-    * @private
-    * @param {Object} Object representing the button's set of 
-    * configuration attributes.
-    */
-    function initConfig(p_oConfig) {
-    
-        var oAttributes = p_oConfig.attributes,
-            oSrcElement = oAttributes.srcelement,
-            sSrcElementNodeName = oSrcElement.nodeName.toUpperCase(),
-            me = this;
-    
-    
-        if (sSrcElementNodeName == this.NODE_NAME) {
-    
-            p_oConfig.element = oSrcElement;
-            p_oConfig.id = oSrcElement.id;
-
-            Dom.getElementsBy(function (p_oElement) {
-            
-                switch (p_oElement.nodeName.toUpperCase()) {
-                
-                case "BUTTON":
-                case "A":
-                case "INPUT":
-
-                    setAttributesFromSrcElement.call(me, p_oElement, 
-                        oAttributes);
-
-                    break;                        
-                
-                }
-            
-            }, "*", oSrcElement);
-        
-        }
-        else {
-    
-            switch (sSrcElementNodeName) {
-
-            case "BUTTON":
-            case "A":
-            case "INPUT":
-
-                setAttributesFromSrcElement.call(this, oSrcElement, 
-                    oAttributes);
-
-                break;
-
-            }
-        
-        }
-    
-    }
-
-
-
-    //  Constructor
-
-    YAHOO.widget.Button = function (p_oElement, p_oAttributes) {
-    
-        var fnSuperClass = YAHOO.widget.Button.superclass.constructor,
-            oConfig,
-            oElement;
-    
-        if (arguments.length == 1 && !Lang.isString(p_oElement) && 
-            !p_oElement.nodeName) {
-    
-            if (!p_oElement.id) {
-    
-                p_oElement.id = Dom.generateId();
-    
-    
-            }
-    
-    
-    
-            fnSuperClass.call(this, 
-                (this.createButtonElement(p_oElement.type)),
-                p_oElement);
-    
-        }
-        else {
-    
-            oConfig = { element: null, attributes: (p_oAttributes || {}) };
-    
-    
-            if (Lang.isString(p_oElement)) {
-    
-                oElement = Dom.get(p_oElement);
-    
-                if (oElement) {
-
-                    if (!oConfig.attributes.id) {
-                    
-                        oConfig.attributes.id = p_oElement;
-                    
-                    }
-    
-                
-                
-                
-                    oConfig.attributes.srcelement = oElement;
-                
-                    initConfig.call(this, oConfig);
-                
-                
-                    if (!oConfig.element) {
-                
-                
-                        oConfig.element = 
-                            this.createButtonElement(oConfig.attributes.type);
-                
-                    }
-                
-                    fnSuperClass.call(this, oConfig.element, 
-                        oConfig.attributes);
-    
-                }
-    
-            }
-            else if (p_oElement.nodeName) {
-    
-                if (!oConfig.attributes.id) {
-    
-                    if (p_oElement.id) {
-        
-                        oConfig.attributes.id = p_oElement.id;
-                    
-                    }
-                    else {
-        
-                        oConfig.attributes.id = Dom.generateId();
-        
-        
-                    }
-    
-                }
-    
-    
-    
-    
-    
-                oConfig.attributes.srcelement = p_oElement;
-        
-                initConfig.call(this, oConfig);
-        
-        
-                if (!oConfig.element) {
-    
-            
-                    oConfig.element = 
-                        this.createButtonElement(oConfig.attributes.type);
-            
-                }
-            
-                fnSuperClass.call(this, oConfig.element, oConfig.attributes);
-            
-            }
-    
-        }
-    
-    };
-
-
-
-    YAHOO.extend(YAHOO.widget.Button, YAHOO.util.Element, {
-    
-    
-        // Protected properties
-        
-        
-        /** 
-        * @property _button
-        * @description Object reference to the button's internal 
-        * <code><a></code> or <code><button></code> element.
-        * @default null
-        * @protected
-        * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-        * level-one-html.html#ID-48250443">HTMLAnchorElement</a>|<a href="
-        * http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html
-        * #ID-34812697">HTMLButtonElement</a>
-        */
-        _button: null,
-        
-        
-        /** 
-        * @property _menu
-        * @description Object reference to the button's menu.
-        * @default null
-        * @protected
-        * @type {<a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>|
-        * <a href="YAHOO.widget.Menu.html">YAHOO.widget.Menu</a>}
-        */
-        _menu: null,
-        
-        
-        /** 
-        * @property _hiddenFields
-        * @description Object reference to the <code><input></code>  
-        * element, or array of HTML form elements used to represent the button
-        *  when its parent form is submitted.
-        * @default null
-        * @protected
-        * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-        * level-one-html.html#ID-6043025">HTMLInputElement</a>|Array
-        */
-        _hiddenFields: null,
-        
-        
-        /** 
-        * @property _onclickAttributeValue
-        * @description Object reference to the button's current value for the 
-        * "onclick" configuration attribute.
-        * @default null
-        * @protected
-        * @type Object
-        */
-        _onclickAttributeValue: null,
-        
-        
-        /** 
-        * @property _activationKeyPressed
-        * @description Boolean indicating if the key(s) that toggle the button's 
-        * "active" state have been pressed.
-        * @default false
-        * @protected
-        * @type Boolean
-        */
-        _activationKeyPressed: false,
-        
-        
-        /** 
-        * @property _activationButtonPressed
-        * @description Boolean indicating if the mouse button that toggles 
-        * the button's "active" state has been pressed.
-        * @default false
-        * @protected
-        * @type Boolean
-        */
-        _activationButtonPressed: false,
-        
-        
-        /** 
-        * @property _hasKeyEventHandlers
-        * @description Boolean indicating if the button's "blur", "keydown" and 
-        * "keyup" event handlers are assigned
-        * @default false
-        * @protected
-        * @type Boolean
-        */
-        _hasKeyEventHandlers: false,
-        
-        
-        /** 
-        * @property _hasMouseEventHandlers
-        * @description Boolean indicating if the button's "mouseout," 
-        * "mousedown," and "mouseup" event handlers are assigned
-        * @default false
-        * @protected
-        * @type Boolean
-        */
-        _hasMouseEventHandlers: false,
-        
-        
-        
-        // Constants
-        
-        
-        /**
-        * @property NODE_NAME
-        * @description The name of the node to be used for the button's 
-        * root element.
-        * @default "SPAN"
-        * @final
-        * @type String
-        */
-        NODE_NAME: "SPAN",
-        
-        
-        /**
-        * @property CHECK_ACTIVATION_KEYS
-        * @description Array of numbers representing keys that (when pressed) 
-        * toggle the button's "checked" attribute.
-        * @default [32]
-        * @final
-        * @type Array
-        */
-        CHECK_ACTIVATION_KEYS: [32],
-        
-        
-        /**
-        * @property ACTIVATION_KEYS
-        * @description Array of numbers representing keys that (when presed) 
-        * toggle the button's "active" state.
-        * @default [13, 32]
-        * @final
-        * @type Array
-        */
-        ACTIVATION_KEYS: [13, 32],
-        
-        
-        /**
-        * @property OPTION_AREA_WIDTH
-        * @description Width (in pixels) of the area of a split button that  
-        * when pressed will display a menu.
-        * @default 20
-        * @final
-        * @type Number
-        */
-        OPTION_AREA_WIDTH: 20,
-        
-        
-        /**
-        * @property CSS_CLASS_NAME
-        * @description String representing the CSS class(es) to be applied to  
-        * the button's root element.
-        * @default "yui-button"
-        * @final
-        * @type String
-        */
-        CSS_CLASS_NAME: "yui-button",
-        
-        
-        /**
-        * @property RADIO_DEFAULT_TITLE
-        * @description String representing the default title applied to buttons 
-        * of type "radio." 
-        * @default "Unchecked.  Click to check."
-        * @final
-        * @type String
-        */
-        RADIO_DEFAULT_TITLE: "Unchecked.  Click to check.",
-        
-        
-        /**
-        * @property RADIO_CHECKED_TITLE
-        * @description String representing the title applied to buttons of 
-        * type "radio" when checked.
-        * @default "Checked.  Click to uncheck."
-        * @final
-        * @type String
-        */
-        RADIO_CHECKED_TITLE: "Checked.  Click to uncheck.",
-        
-        
-        /**
-        * @property CHECKBOX_DEFAULT_TITLE
-        * @description String representing the default title applied to 
-        * buttons of type "checkbox." 
-        * @default "Unchecked.  Click to check."
-        * @final
-        * @type String
-        */
-        CHECKBOX_DEFAULT_TITLE: "Unchecked.  Click to check.",
-        
-        
-        /**
-        * @property CHECKBOX_CHECKED_TITLE
-        * @description String representing the title applied to buttons of type 
-        * "checkbox" when checked.
-        * @default "Checked.  Click to uncheck."
-        * @final
-        * @type String
-        */
-        CHECKBOX_CHECKED_TITLE: "Checked.  Click to uncheck.",
-        
-        
-        /**
-        * @property MENUBUTTON_DEFAULT_TITLE
-        * @description String representing the default title applied to 
-        * buttons of type "menu." 
-        * @default "Menu collapsed.  Click to expand."
-        * @final
-        * @type String
-        */
-        MENUBUTTON_DEFAULT_TITLE: "Menu collapsed.  Click to expand.",
-        
-        
-        /**
-        * @property MENUBUTTON_MENU_VISIBLE_TITLE
-        * @description String representing the title applied to buttons of type 
-        * "menu" when the button's menu is visible. 
-        * @default "Menu expanded.  Click or press Esc to collapse."
-        * @final
-        * @type String
-        */
-        MENUBUTTON_MENU_VISIBLE_TITLE: 
-            "Menu expanded.  Click or press Esc to collapse.",
-        
-        
-        /**
-        * @property SPLITBUTTON_DEFAULT_TITLE
-        * @description  String representing the default title applied to 
-        * buttons of type "split." 
-        * @default "Menu collapsed.  Click inside option region or press 
-        * Ctrl + Shift + M to show the menu."
-        * @final
-        * @type String
-        */
-        SPLITBUTTON_DEFAULT_TITLE: ("Menu collapsed.  Click inside option " + 
-            "region or press Ctrl + Shift + M to show the menu."),
-        
-        
-        /**
-        * @property SPLITBUTTON_OPTION_VISIBLE_TITLE
-        * @description String representing the title applied to buttons of type 
-        * "split" when the button's menu is visible. 
-        * @default "Menu expanded.  Press Esc or Ctrl + Shift + M to hide 
-        * the menu."
-        * @final
-        * @type String
-        */
-        SPLITBUTTON_OPTION_VISIBLE_TITLE: 
-            "Menu expanded.  Press Esc or Ctrl + Shift + M to hide the menu.",
-        
-        
-        /**
-        * @property SUBMIT_TITLE
-        * @description String representing the title applied to buttons of 
-        * type "submit." 
-        * @default "Click to submit form."
-        * @final
-        * @type String
-        */
-        SUBMIT_TITLE: "Click to submit form.",
-        
-        
-        
-        // Protected attribute setter methods
-        
-        
-        /**
-        * @method _setType
-        * @description Sets the value of the button's "type" attribute.
-        * @protected
-        * @param {String} p_sType String indicating the value for the button's 
-        * "type" attribute.
-        */
-        _setType: function (p_sType) {
-        
-            if (p_sType == "split") {
-        
-                this.on("option", this._onOption);
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _setLabel
-        * @description Sets the value of the button's "label" attribute.
-        * @protected
-        * @param {String} p_sLabel String indicating the value for the button's 
-        * "label" attribute.
-        */
-        _setLabel: function (p_sLabel) {
-
-            this._button.innerHTML = p_sLabel;
-            
-            /*
-                Remove and add the default class name from the root element
-                for Gecko to ensure that the button shrinkwraps to the label.
-                Without this the button will not be rendered at the correct 
-                width when the label changes.  The most likely cause for this 
-                bug is button's use of the Gecko-specific CSS display type of 
-                "-moz-inline-box" to simulate "inline-block" supported by IE, 
-                Safari and Opera.
-            */
-            
-            var sClass,
-                me;
-            
-            if (YAHOO.env.ua.gecko && Dom.inDocument(this.get("element"))) {
-            
-                me = this;
-                sClass = this.CSS_CLASS_NAME;                
-
-                this.removeClass(sClass);
-                
-                window.setTimeout(function () {
-                
-                    me.addClass(sClass);
-                
-                }, 0);
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _setTabIndex
-        * @description Sets the value of the button's "tabindex" attribute.
-        * @protected
-        * @param {Number} p_nTabIndex Number indicating the value for the 
-        * button's "tabindex" attribute.
-        */
-        _setTabIndex: function (p_nTabIndex) {
-        
-            this._button.tabIndex = p_nTabIndex;
-        
-        },
-        
-        
-        /**
-        * @method _setTitle
-        * @description Sets the value of the button's "title" attribute.
-        * @protected
-        * @param {String} p_nTabIndex Number indicating the value for 
-        * the button's "title" attribute.
-        */
-        _setTitle: function (p_sTitle) {
-        
-            var sTitle = p_sTitle;
-        
-            if (this.get("type") != "link") {
-        
-                if (!sTitle) {
-        
-                    switch (this.get("type")) {
-        
-                    case "radio":
-    
-                        sTitle = this.RADIO_DEFAULT_TITLE;
-    
-                        break;
-    
-                    case "checkbox":
-    
-                        sTitle = this.CHECKBOX_DEFAULT_TITLE;
-    
-                        break;
-                    
-                    case "menu":
-    
-                        sTitle = this.MENUBUTTON_DEFAULT_TITLE;
-    
-                        break;
-    
-                    case "split":
-    
-                        sTitle = this.SPLITBUTTON_DEFAULT_TITLE;
-    
-                        break;
-    
-                    case "submit":
-    
-                        sTitle = this.SUBMIT_TITLE;
-    
-                        break;
-        
-                    }
-        
-                }
-        
-                this._button.title = sTitle;
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _setDisabled
-        * @description Sets the value of the button's "disabled" attribute.
-        * @protected
-        * @param {Boolean} p_bDisabled Boolean indicating the value for 
-        * the button's "disabled" attribute.
-        */
-        _setDisabled: function (p_bDisabled) {
-        
-            if (this.get("type") != "link") {
-        
-                if (p_bDisabled) {
-        
-                    if (this._menu) {
-        
-                        this._menu.hide();
-        
-                    }
-        
-                    if (this.hasFocus()) {
-                    
-                        this.blur();
-                    
-                    }
-        
-                    this._button.setAttribute("disabled", "disabled");
-        
-                    this.addStateCSSClasses("disabled");
-
-                    this.removeStateCSSClasses("hover");
-                    this.removeStateCSSClasses("active");
-                    this.removeStateCSSClasses("focus");
-        
-                }
-                else {
-        
-                    this._button.removeAttribute("disabled");
-        
-                    this.removeStateCSSClasses("disabled");
-                
-                }
-        
-            }
-        
-        },
-
-        
-        /**
-        * @method _setHref
-        * @description Sets the value of the button's "href" attribute.
-        * @protected
-        * @param {String} p_sHref String indicating the value for the button's 
-        * "href" attribute.
-        */
-        _setHref: function (p_sHref) {
-        
-            if (this.get("type") == "link") {
-        
-                this._button.href = p_sHref;
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _setTarget
-        * @description Sets the value of the button's "target" attribute.
-        * @protected
-        * @param {String} p_sTarget String indicating the value for the button's 
-        * "target" attribute.
-        */
-        _setTarget: function (p_sTarget) {
-        
-            if (this.get("type") == "link") {
-        
-                this._button.setAttribute("target", p_sTarget);
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _setChecked
-        * @description Sets the value of the button's "target" attribute.
-        * @protected
-        * @param {Boolean} p_bChecked Boolean indicating the value for  
-        * the button's "checked" attribute.
-        */
-        _setChecked: function (p_bChecked) {
-        
-            var sType = this.get("type"),
-                sTitle;
-        
-            if (sType == "checkbox" || sType == "radio") {
-        
-                if (p_bChecked) {
-        
-                    this.addStateCSSClasses("checked");
-                    
-                    sTitle = (sType == "radio") ? 
-                                this.RADIO_CHECKED_TITLE : 
-                                this.CHECKBOX_CHECKED_TITLE;
-                
-                }
-                else {
-
-                    this.removeStateCSSClasses("checked");
-        
-                    sTitle = (sType == "radio") ? 
-                                this.RADIO_DEFAULT_TITLE : 
-                                this.CHECKBOX_DEFAULT_TITLE;
-                
-                }
-        
-                this.set("title", sTitle);
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _setMenu
-        * @description Sets the value of the button's "menu" attribute.
-        * @protected
-        * @param {Object} p_oMenu Object indicating the value for the button's 
-        * "menu" attribute.
-        */
-        _setMenu: function (p_oMenu) {
-
-            var bLazyLoad = this.get("lazyloadmenu"),
-                oButtonElement = this.get("element"),
-                sMenuCSSClassName = Menu.prototype.CSS_CLASS_NAME,
-        
-                /*
-                    Boolean indicating if the value of p_oMenu is an instance 
-                    of YAHOO.widget.Menu or YAHOO.widget.Overlay.
-                */
-        
-                bInstance = false,
-        
-
-                oMenu,
-                oMenuElement,
-                oSrcElement,
-                aItems,
-                nItems,
-                oItem,
-                i;
-        
-        
-            if (!Overlay) {
-        
-        
-                return false;
-            
-            }
-        
-        
-            if (!Menu) {
-        
-        
-                return false;
-            
-            }
-        
-        
-            function onAppendTo() {
-
-                oMenu.render(oButtonElement.parentNode);
-                
-                this.removeListener("appendTo", onAppendTo);
-            
-            }
-        
-        
-            function initMenu() {
-        
-                if (oMenu) {
-
-                    Dom.addClass(oMenu.element, this.get("menuclassname"));
-                    Dom.addClass(oMenu.element, 
-                            "yui-" + this.get("type") + "-button-menu");
-
-                    oMenu.showEvent.subscribe(this._onMenuShow, null, this);
-                    oMenu.hideEvent.subscribe(this._onMenuHide, null, this);
-                    oMenu.renderEvent.subscribe(this._onMenuRender, null, this);
-        
-        
-                    if (oMenu instanceof Menu) {
-        
-                        oMenu.keyDownEvent.subscribe(this._onMenuKeyDown, 
-                            this, true);
-
-                        oMenu.subscribe("click", this._onMenuClick, 
-                            this, true);
-
-                        oMenu.itemAddedEvent.subscribe(this._onMenuItemAdded, 
-                            this, true);
-        
-                        oSrcElement = oMenu.srcElement;
-        
-                        if (oSrcElement && 
-                            oSrcElement.nodeName.toUpperCase() == "SELECT") {
-                
-                            oSrcElement.style.display = "none";
-                            oSrcElement.parentNode.removeChild(oSrcElement);
-        
-                        }
-        
-                    }
-                    else if (oMenu instanceof Overlay) {
-        
-                        if (!m_oOverlayManager) {
-        
-                            m_oOverlayManager = 
-                                new YAHOO.widget.OverlayManager();
-                        
-                        }
-                        
-                        m_oOverlayManager.register(oMenu);
-                        
-                    }
-        
-        
-                    this._menu = oMenu;
-
-        
-                    if (!bInstance) {
-        
-                        if (bLazyLoad && !(oMenu instanceof Menu)) {
-        
-                            /*
-                                Mimic Menu's "lazyload" functionality by adding  
-                                a "beforeshow" event listener that renders the 
-                                Overlay instance before it is made visible by  
-                                the button.
-                            */
-        
-                            oMenu.beforeShowEvent.subscribe(
-                                this._onOverlayBeforeShow, null, this);
-            
-                        }
-                        else if (!bLazyLoad) {
-        
-                            if (Dom.inDocument(oButtonElement)) {
-        
-                                oMenu.render(oButtonElement.parentNode);
-                            
-                            }
-                            else {
-            
-                                this.on("appendTo", onAppendTo);
-                            
-                            }
-                        
-                        }
-                    
-                    }
-        
-                }
-        
-            }
-        
-        
-            if (p_oMenu && (p_oMenu instanceof Menu)) {
-        
-                oMenu = p_oMenu;
-                aItems = oMenu.getItems();
-                nItems = aItems.length;
-                bInstance = true;
-        
-        
-                if (nItems > 0) {
-        
-                    i = nItems - 1;
-        
-                    do {
-        
-                        oItem = aItems[i];
-        
-                        if (oItem) {
-        
-                            oItem.cfg.subscribeToConfigEvent("selected", 
-                                this._onMenuItemSelected, 
-                                oItem, 
-                                this);
-        
-                        }
-        
-                    }
-                    while (i--);
-        
-                }
-        
-                initMenu.call(this);
-        
-            }
-            else if (p_oMenu && (p_oMenu instanceof Overlay)) {
-        
-                oMenu = p_oMenu;
-                bInstance = true;
-        
-                oMenu.cfg.setProperty("visible", false);
-                oMenu.cfg.setProperty("context", [oButtonElement, "tl", "bl"]);
-        
-                initMenu.call(this);
-        
-            }
-            else if (Lang.isArray(p_oMenu)) {
-        
-                this.on("appendTo", function () {
-        
-                    oMenu = new Menu(Dom.generateId(), { lazyload: bLazyLoad, 
-                        itemdata: p_oMenu });
-        
-                    initMenu.call(this);
-        
-                });
-        
-            }
-            else if (Lang.isString(p_oMenu)) {
-        
-                oMenuElement = Dom.get(p_oMenu);
-        
-                if (oMenuElement) {
-        
-                    if (Dom.hasClass(oMenuElement, sMenuCSSClassName) || 
-                        oMenuElement.nodeName.toUpperCase() == "SELECT") {
-            
-                        oMenu = new Menu(p_oMenu, { lazyload: bLazyLoad });
-            
-                        initMenu.call(this);
-            
-                    }
-                    else {
-        
-                        oMenu = new Overlay(p_oMenu, { visible: false, 
-                            context: [oButtonElement, "tl", "bl"] });
-            
-                        initMenu.call(this);
-            
-                    }
-        
-                }
-        
-            }
-            else if (p_oMenu && p_oMenu.nodeName) {
-        
-                if (Dom.hasClass(p_oMenu, sMenuCSSClassName) || 
-                        p_oMenu.nodeName.toUpperCase() == "SELECT") {
-        
-                    oMenu = new Menu(p_oMenu, { lazyload: bLazyLoad });
-                
-                    initMenu.call(this);
-        
-                }
-                else {
-        
-                    if (!p_oMenu.id) {
-                    
-                        Dom.generateId(p_oMenu);
-                    
-                    }
-        
-                    oMenu = new Overlay(p_oMenu, { visible: false, 
-                                    context: [oButtonElement, "tl", "bl"] });
-        
-                    initMenu.call(this);
-                
-                }
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _setOnClick
-        * @description Sets the value of the button's "onclick" attribute.
-        * @protected
-        * @param {Object} p_oObject Object indicating the value for the button's 
-        * "onclick" attribute.
-        */
-        _setOnClick: function (p_oObject) {
-        
-            /*
-                Remove any existing listeners if a "click" event handler 
-                has already been specified.
-            */
-        
-            if (this._onclickAttributeValue && 
-                (this._onclickAttributeValue != p_oObject)) {
-        
-                this.removeListener("click", this._onclickAttributeValue.fn);
-        
-                this._onclickAttributeValue = null;
-        
-            }
-        
-        
-            if (!this._onclickAttributeValue && 
-                Lang.isObject(p_oObject) && 
-                Lang.isFunction(p_oObject.fn)) {
-        
-                this.on("click", p_oObject.fn, p_oObject.obj, p_oObject.scope);
-        
-                this._onclickAttributeValue = p_oObject;
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _setSelectedMenuItem
-        * @description Sets the value of the button's 
-        * "selectedMenuItem" attribute.
-        * @protected
-        * @param {Number} p_nIndex Number representing the index of the item 
-        * in the button's menu that is currently selected.
-        */
-        _setSelectedMenuItem: function (p_nIndex) {
-
-            var oMenu = this._menu,
-                oMenuItem;
-
-
-            if (oMenu && oMenu instanceof Menu) {
-
-                oMenuItem = oMenu.getItem(p_nIndex);
-                
-
-                if (oMenuItem && !oMenuItem.cfg.getProperty("selected")) {
-                
-                    oMenuItem.cfg.setProperty("selected", true);
-                
-                }
-            
-            }
-
-        },
-        
-        
-        // Protected methods
-
-        
-        
-        /**
-        * @method _isActivationKey
-        * @description Determines if the specified keycode is one that toggles  
-        * the button's "active" state.
-        * @protected
-        * @param {Number} p_nKeyCode Number representing the keycode to 
-        * be evaluated.
-        * @return {Boolean}
-        */
-        _isActivationKey: function (p_nKeyCode) {
-        
-            var sType = this.get("type"),
-                aKeyCodes = (sType == "checkbox" || sType == "radio") ? 
-                    this.CHECK_ACTIVATION_KEYS : this.ACTIVATION_KEYS,
-        
-                nKeyCodes = aKeyCodes.length,
-                i;
-        
-            if (nKeyCodes > 0) {
-        
-                i = nKeyCodes - 1;
-        
-                do {
-        
-                    if (p_nKeyCode == aKeyCodes[i]) {
-        
-                        return true;
-        
-                    }
-        
-                }
-                while (i--);
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _isSplitButtonOptionKey
-        * @description Determines if the specified keycode is one that toggles  
-        * the display of the split button's menu.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        * @return {Boolean}
-        */
-        _isSplitButtonOptionKey: function (p_oEvent) {
-        
-            return (p_oEvent.ctrlKey && p_oEvent.shiftKey && 
-                Event.getCharCode(p_oEvent) == 77);
-        
-        },
-        
-        
-        /**
-        * @method _addListenersToForm
-        * @description Adds event handlers to the button's form.
-        * @protected
-        */
-        _addListenersToForm: function () {
-        
-            var oForm = this.getForm(),
-                onFormKeyPress = YAHOO.widget.Button.onFormKeyPress,
-                bHasKeyPressListener,
-                oSrcElement,
-                aListeners,
-                nListeners,
-                i;
-        
-        
-            if (oForm) {
-        
-                Event.on(oForm, "reset", this._onFormReset, null, this);
-                Event.on(oForm, "submit", this.createHiddenFields, null, this);
-        
-                oSrcElement = this.get("srcelement");
-        
-        
-                if (this.get("type") == "submit" || 
-                    (oSrcElement && oSrcElement.type == "submit")) 
-                {
-                
-                    aListeners = Event.getListeners(oForm, "keypress");
-                    bHasKeyPressListener = false;
-            
-                    if (aListeners) {
-            
-                        nListeners = aListeners.length;
-        
-                        if (nListeners > 0) {
-            
-                            i = nListeners - 1;
-                            
-                            do {
-               
-                                if (aListeners[i].fn == onFormKeyPress) {
-                
-                                    bHasKeyPressListener = true;
-                                    break;
-                                
-                                }
-                
-                            }
-                            while (i--);
-                        
-                        }
-                    
-                    }
-            
-            
-                    if (!bHasKeyPressListener) {
-               
-                        Event.on(oForm, "keypress", onFormKeyPress);
-            
-                    }
-        
-                }
-            
-            }
-        
-        },
-        
-        
-        _originalMaxHeight: -1,
-        
-        
-        /**
-        * @method _showMenu
-        * @description Shows the button's menu.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object 
-        * passed back by the event utility (YAHOO.util.Event) that triggered 
-        * the display of the menu.
-        */
-        _showMenu: function (p_oEvent) {
-        
-            YAHOO.widget.MenuManager.hideVisible();
-        
-            if (m_oOverlayManager) {
-        
-                m_oOverlayManager.hideAll();
-            
-            }
-        
-        
-            var oMenu = this._menu,
-                nViewportHeight = Dom.getViewportHeight(),
-                nMenuHeight,
-                nScrollTop,
-                nY;
-        
-        
-            if (oMenu && (oMenu instanceof Menu)) {
-        
-                oMenu.cfg.applyConfig({ context: [this.get("id"), "tl", "bl"],
-                    constraintoviewport: false,
-                    clicktohide: false,
-                    visible: true });
-                    
-                oMenu.cfg.fireQueue();
-            
-                oMenu.align("tl", "bl");
-        
-                /*
-                    Stop the propagation of the event so that the MenuManager 
-                    doesn't blur the menu after it gets focus.
-                */
-        
-                if (p_oEvent.type == "mousedown") {
-        
-                    Event.stopPropagation(p_oEvent);
-        
-                }
-
-
-                if (this.get("focusmenu")) {
-        
-                    this._menu.focus();
-                
-                }
-        
-                nMenuHeight = oMenu.element.offsetHeight;
-        
-        
-                if ((oMenu.cfg.getProperty("y") + nMenuHeight) > 
-                    nViewportHeight) {
-        
-        
-                    oMenu.align("bl", "tl");
-        
-                    nY = oMenu.cfg.getProperty("y");
-        
-                    nScrollTop = Dom.getDocumentScrollTop();
-        
-        
-                    if (nScrollTop >= nY) {
-        
-                        if (this._originalMaxHeight == -1) {
-        
-                            this._originalMaxHeight = 
-                                    oMenu.cfg.getProperty("maxheight");
-        
-                        }
-        
-                        oMenu.cfg.setProperty("maxheight", 
-                                    (nMenuHeight - ((nScrollTop - nY) + 20)));
-        
-                        oMenu.align("bl", "tl");
-        
-                    }
-        
-                }
-        
-            }
-            else if (oMenu && (oMenu instanceof Overlay)) {
-        
-                oMenu.show();
-                oMenu.align("tl", "bl");
-
-                nMenuHeight = oMenu.element.offsetHeight;
-        
-        
-                if ((oMenu.cfg.getProperty("y") + nMenuHeight) > 
-                    nViewportHeight) {
-        
-        
-                    oMenu.align("bl", "tl");
-                    
-                }
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _hideMenu
-        * @description Hides the button's menu.
-        * @protected
-        */
-        _hideMenu: function () {
-        
-            var oMenu = this._menu;
-        
-            if (oMenu) {
-        
-                oMenu.hide();
-        
-            }
-        
-        },
-        
-        
-        
-        
-        // Protected event handlers
-        
-        
-        /**
-        * @method _onMouseOver
-        * @description "mouseover" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onMouseOver: function (p_oEvent) {
-        
-            if (!this._hasMouseEventHandlers) {
-        
-                this.on("mouseout", this._onMouseOut);
-                this.on("mousedown", this._onMouseDown);
-                this.on("mouseup", this._onMouseUp);
-        
-                this._hasMouseEventHandlers = true;
-        
-            }
-        
-            this.addStateCSSClasses("hover");
-        
-            if (this._activationButtonPressed) {
-        
-                this.addStateCSSClasses("active");
-        
-            }
-        
-        
-            if (this._bOptionPressed) {
-        
-                this.addStateCSSClasses("activeoption");
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onMouseOut
-        * @description "mouseout" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onMouseOut: function (p_oEvent) {
-        
-            this.removeStateCSSClasses("hover");
-        
-            if (this.get("type") != "menu") {
-        
-                this.removeStateCSSClasses("active");
-        
-            }
-        
-            if (this._activationButtonPressed || this._bOptionPressed) {
-        
-                Event.on(document, "mouseup", this._onDocumentMouseUp, 
-                    null, this);
-        
-            }
-            
-        },
-        
-        
-        /**
-        * @method _onDocumentMouseUp
-        * @description "mouseup" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onDocumentMouseUp: function (p_oEvent) {
-        
-            this._activationButtonPressed = false;
-            this._bOptionPressed = false;
-        
-            var sType = this.get("type");
-        
-            if (sType == "menu" || sType == "split") {
-        
-                this.removeStateCSSClasses(
-                    (sType == "menu" ? "active" : "activeoption"));
-        
-                this._hideMenu();
-        
-            }
-        
-            Event.removeListener(document, "mouseup", this._onDocumentMouseUp);
-        
-        },
-        
-        
-        /**
-        * @method _onMouseDown
-        * @description "mousedown" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onMouseDown: function (p_oEvent) {
-        
-            var sType,
-                oElement,
-                nX,
-                me;
-        
-        
-            function onMouseUp() {
-            
-                this._hideMenu();
-                this.removeListener("mouseup", onMouseUp);
-            
-            }
-        
-        
-            if ((p_oEvent.which || p_oEvent.button) == 1) {
-        
-        
-                if (!this.hasFocus()) {
-                
-                    this.focus();
-                
-                }
-        
-        
-                sType = this.get("type");
-        
-        
-                if (sType == "split") {
-                
-                    oElement = this.get("element");
-                    nX = Event.getPageX(p_oEvent) - Dom.getX(oElement);
-        
-                    if ((oElement.offsetWidth - this.OPTION_AREA_WIDTH) < nX) {
-                        
-                        this.fireEvent("option", p_oEvent);
-        
-                    }
-                    else {
-        
-                        this.addStateCSSClasses("active");
-        
-                        this._activationButtonPressed = true;
-        
-                    }
-        
-                }
-                else if (sType == "menu") {
-        
-                    if (this.isActive()) {
-        
-                        this._hideMenu();
-        
-                        this._activationButtonPressed = false;
-        
-                    }
-                    else {
-        
-                        this._showMenu(p_oEvent);
-        
-                        this._activationButtonPressed = true;
-                    
-                    }
-        
-                }
-                else {
-        
-                    this.addStateCSSClasses("active");
-        
-                    this._activationButtonPressed = true;
-                
-                }
-        
-        
-        
-                if (sType == "split" || sType == "menu") {
-
-                    me = this;
-        
-                    this._hideMenuTimerId = window.setTimeout(function () {
-                    
-                        me.on("mouseup", onMouseUp);
-                    
-                    }, 250);
-        
-                }
-        
-            }
-            
-        },
-        
-        
-        /**
-        * @method _onMouseUp
-        * @description "mouseup" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onMouseUp: function (p_oEvent) {
-        
-            var sType = this.get("type");
-        
-        
-            if (this._hideMenuTimerId) {
-        
-                window.clearTimeout(this._hideMenuTimerId);
-        
-            }
-        
-        
-            if (sType == "checkbox" || sType == "radio") {
-        
-                this.set("checked", !(this.get("checked")));
-            
-            }
-        
-        
-            this._activationButtonPressed = false;
-            
-        
-            if (this.get("type") != "menu") {
-        
-                this.removeStateCSSClasses("active");
-            
-            }
-            
-        },
-        
-        
-        /**
-        * @method _onFocus
-        * @description "focus" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onFocus: function (p_oEvent) {
-        
-            var oElement;
-        
-            this.addStateCSSClasses("focus");
-        
-            if (this._activationKeyPressed) {
-        
-                this.addStateCSSClasses("active");
-           
-            }
-        
-            m_oFocusedButton = this;
-        
-        
-            if (!this._hasKeyEventHandlers) {
-        
-                oElement = this._button;
-        
-                Event.on(oElement, "blur", this._onBlur, null, this);
-                Event.on(oElement, "keydown", this._onKeyDown, null, this);
-                Event.on(oElement, "keyup", this._onKeyUp, null, this);
-        
-                this._hasKeyEventHandlers = true;
-        
-            }
-        
-        
-            this.fireEvent("focus", p_oEvent);
-        
-        },
-        
-        
-        /**
-        * @method _onBlur
-        * @description "blur" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onBlur: function (p_oEvent) {
-        
-            this.removeStateCSSClasses("focus");
-        
-            if (this.get("type") != "menu") {
-        
-                this.removeStateCSSClasses("active");
-
-            }    
-        
-            if (this._activationKeyPressed) {
-        
-                Event.on(document, "keyup", this._onDocumentKeyUp, null, this);
-        
-            }
-        
-        
-            m_oFocusedButton = null;
-        
-            this.fireEvent("blur", p_oEvent);
-           
-        },
-        
-        
-        /**
-        * @method _onDocumentKeyUp
-        * @description "keyup" event handler for the document.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onDocumentKeyUp: function (p_oEvent) {
-        
-            if (this._isActivationKey(Event.getCharCode(p_oEvent))) {
-        
-                this._activationKeyPressed = false;
-                
-                Event.removeListener(document, "keyup", this._onDocumentKeyUp);
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onKeyDown
-        * @description "keydown" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onKeyDown: function (p_oEvent) {
-        
-            var oMenu = this._menu;
-        
-        
-            if (this.get("type") == "split" && 
-                this._isSplitButtonOptionKey(p_oEvent)) {
-        
-                this.fireEvent("option", p_oEvent);
-        
-            }
-            else if (this._isActivationKey(Event.getCharCode(p_oEvent))) {
-        
-                if (this.get("type") == "menu") {
-        
-                    this._showMenu(p_oEvent);
-        
-                }
-                else {
-        
-                    this._activationKeyPressed = true;
-                    
-                    this.addStateCSSClasses("active");
-                
-                }
-            
-            }
-        
-        
-            if (oMenu && oMenu.cfg.getProperty("visible") && 
-                Event.getCharCode(p_oEvent) == 27) {
-            
-                oMenu.hide();
-                this.focus();
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onKeyUp
-        * @description "keyup" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onKeyUp: function (p_oEvent) {
-        
-            var sType;
-        
-            if (this._isActivationKey(Event.getCharCode(p_oEvent))) {
-        
-                sType = this.get("type");
-        
-                if (sType == "checkbox" || sType == "radio") {
-        
-                    this.set("checked", !(this.get("checked")));
-                
-                }
-        
-                this._activationKeyPressed = false;
-        
-                if (this.get("type") != "menu") {
-        
-                    this.removeStateCSSClasses("active");
-        
-                }
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onClick
-        * @description "click" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onClick: function (p_oEvent) {
-        
-            var sType = this.get("type"),
-                sTitle,
-                oForm,
-                oSrcElement,
-                oElement,
-                nX;
-        
-        
-            switch (sType) {
-        
-            case "radio":
-            case "checkbox":
-    
-                if (this.get("checked")) {
-                    
-                    sTitle = (sType == "radio") ? 
-                                this.RADIO_CHECKED_TITLE : 
-                                this.CHECKBOX_CHECKED_TITLE;
-                
-                }
-                else {
-                
-                    sTitle = (sType == "radio") ? 
-                                this.RADIO_DEFAULT_TITLE : 
-                                this.CHECKBOX_DEFAULT_TITLE;
-                
-                }
-                
-                this.set("title", sTitle);
-    
-                break;
-    
-            case "submit":
-    
-                this.submitForm();
-            
-                break;
-    
-            case "reset":
-    
-                oForm = this.getForm();
-    
-                if (oForm) {
-    
-                    oForm.reset();
-                
-                }
-    
-                break;
-    
-            case "menu":
-    
-                sTitle = this._menu.cfg.getProperty("visible") ? 
-                                this.MENUBUTTON_MENU_VISIBLE_TITLE : 
-                                this.MENUBUTTON_DEFAULT_TITLE;
-    
-                this.set("title", sTitle);
-    
-                break;
-    
-            case "split":
-    
-                oElement = this.get("element");
-                nX = Event.getPageX(p_oEvent) - Dom.getX(oElement);
-    
-                if ((oElement.offsetWidth - this.OPTION_AREA_WIDTH) < nX) {
-    
-                    return false;
-                
-                }
-                else {
-    
-                    this._hideMenu();
-        
-                    oSrcElement = this.get("srcelement");
-        
-                    if (oSrcElement && oSrcElement.type == "submit") {
-    
-                        this.submitForm();
-                    
-                    }
-                
-                }
-    
-                sTitle = this._menu.cfg.getProperty("visible") ? 
-                                this.SPLITBUTTON_OPTION_VISIBLE_TITLE : 
-                                this.SPLITBUTTON_DEFAULT_TITLE;
-    
-                this.set("title", sTitle);
-    
-                break;
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onAppendTo
-        * @description "appendTo" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onAppendTo: function (p_oEvent) {
-        
-            /*
-                It is necessary to call "_addListenersToForm" using 
-                "setTimeout" to make sure that the button's "form" property 
-                returns a node reference.  Sometimes, if you try to get the 
-                reference immediately after appending the field, it is null.
-            */
-        
-            var me = this;
-        
-            window.setTimeout(function () {
-        
-                me._addListenersToForm();
-        
-            }, 0);
-        
-        },
-        
-        
-        /**
-        * @method _onFormReset
-        * @description "reset" event handler for the button's form.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event 
-        * object passed back by the event utility (YAHOO.util.Event).
-        */
-        _onFormReset: function (p_oEvent) {
-        
-            var sType = this.get("type"),
-                oMenu = this._menu;
-        
-            if (sType == "checkbox" || sType == "radio") {
-        
-                this.resetValue("checked");
-        
-            }
-        
-        
-            if (oMenu && (oMenu instanceof Menu)) {
-        
-                this.resetValue("selectedMenuItem");
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onDocumentMouseDown
-        * @description "mousedown" event handler for the document.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onDocumentMouseDown: function (p_oEvent) {
-        
-            var oTarget = Event.getTarget(p_oEvent),
-                oButtonElement = this.get("element"),
-                oMenuElement = this._menu.element;
-        
-            if (oTarget != oButtonElement && 
-                !Dom.isAncestor(oButtonElement, oTarget) && 
-                oTarget != oMenuElement && 
-                !Dom.isAncestor(oMenuElement, oTarget)) {
-        
-                this._hideMenu();
-        
-                Event.removeListener(document, "mousedown", 
-                    this._onDocumentMouseDown);    
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onOption
-        * @description "option" event handler for the button.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onOption: function (p_oEvent) {
-        
-            if (this.hasClass("yui-split-button-activeoption")) {
-        
-                this._hideMenu();
-        
-                this._bOptionPressed = false;
-        
-            }
-            else {
-        
-                this._showMenu(p_oEvent);    
-        
-                this._bOptionPressed = true;
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onOverlayBeforeShow
-        * @description "beforeshow" event handler for the 
-        * <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a> instance 
-        * serving as the button's menu.
-        * @private
-        * @param {String} p_sType String representing the name of the event  
-        * that was fired.
-        */
-        _onOverlayBeforeShow: function (p_sType) {
-        
-            var oMenu = this._menu;
-        
-            oMenu.render(this.get("element").parentNode);
-            
-            oMenu.beforeShowEvent.unsubscribe(this._onOverlayBeforeShow);
-        
-        },
-        
-        
-        /**
-        * @method _onMenuShow
-        * @description "show" event handler for the button's menu.
-        * @private
-        * @param {String} p_sType String representing the name of the event  
-        * that was fired.
-        */
-        _onMenuShow: function (p_sType) {
-        
-            Event.on(document, "mousedown", this._onDocumentMouseDown, 
-                null, this);
-        
-            var sTitle,
-                sState;
-            
-            if (this.get("type") == "split") {
-        
-                sTitle = this.SPLITBUTTON_OPTION_VISIBLE_TITLE;
-                sState = "activeoption";
-            
-            }
-            else {
-        
-                sTitle = this.MENUBUTTON_MENU_VISIBLE_TITLE;        
-                sState = "active";
-        
-            }
-        
-            this.addStateCSSClasses(sState);
-            this.set("title", sTitle);
-        
-        },
-        
-        
-        /**
-        * @method _onMenuHide
-        * @description "hide" event handler for the button's menu.
-        * @private
-        * @param {String} p_sType String representing the name of the event  
-        * that was fired.
-        */
-        _onMenuHide: function (p_sType) {
-            
-            var oMenu = this._menu,
-                sTitle,
-                sState;
-        
-            if (oMenu && (oMenu instanceof Menu) && 
-                this._originalMaxHeight != -1) {
-            
-                this._menu.cfg.setProperty("maxheight", 
-                    this._originalMaxHeight);
-        
-            }
-        
-            
-            if (this.get("type") == "split") {
-        
-                sTitle = this.SPLITBUTTON_DEFAULT_TITLE;
-                sState = "activeoption";
-        
-            }
-            else {
-        
-                sTitle = this.MENUBUTTON_DEFAULT_TITLE;        
-                sState = "active";
-            }
-        
-        
-            this.removeStateCSSClasses(sState);
-            this.set("title", sTitle);
-        
-        
-            if (this.get("type") == "split") {
-        
-                this._bOptionPressed = false;
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onMenuKeyDown
-        * @description "keydown" event handler for the button's menu.
-        * @private
-        * @param {String} p_sType String representing the name of the event  
-        * that was fired.
-        * @param {Array} p_aArgs Array of arguments sent when the event 
-        * was fired.
-        */
-        _onMenuKeyDown: function (p_sType, p_aArgs) {
-        
-            var oEvent = p_aArgs[0];
-        
-            if (Event.getCharCode(oEvent) == 27) {
-        
-                this.focus();
-        
-                if (this.get("type") == "split") {
-                
-                    this._bOptionPressed = false;
-                
-                }
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onMenuRender
-        * @description "render" event handler for the button's menu.
-        * @private
-        * @param {String} p_sType String representing the name of the  
-        * event thatwas fired.
-        */
-        _onMenuRender: function (p_sType) {
-        
-            var oButtonElement = this.get("element"),
-                oButtonParent = oButtonElement.parentNode,
-                oMenuElement = this._menu.element;
-        
-        
-            if (oButtonParent != oMenuElement.parentNode) {
-        
-                oButtonParent.appendChild(oMenuElement);
-            
-            }
-
-            this.set("selectedMenuItem", this.get("selectedMenuItem"));
-
-        },
-        
-        
-        /**
-        * @method _onMenuItemSelected
-        * @description "selectedchange" event handler for each item in the 
-        * button's menu.
-        * @private
-        * @param {String} p_sType String representing the name of the event  
-        * that was fired.
-        * @param {Array} p_aArgs Array of arguments sent when the event 
-        * was fired.
-        * @param {Number} p_nItem Number representing the index of the menu
-        * item that subscribed to the event.
-        */
-        _onMenuItemSelected: function (p_sType, p_aArgs, p_nItem) {
-
-            var bSelected = p_aArgs[0];
-
-            if (bSelected) {
-            
-                this.set("selectedMenuItem", p_nItem);
-
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onMenuItemAdded
-        * @description "itemadded" event handler for the button's menu.
-        * @private
-        * @param {String} p_sType String representing the name of the event  
-        * that was fired.
-        * @param {Array} p_aArgs Array of arguments sent when the event
-        * was fired.
-        * @param {<a href="YAHOO.widget.MenuItem.html">
-        * YAHOO.widget.MenuItem</a>} p_oItem Object representing the menu 
-        * item that subscribed to the event.
-        */
-        _onMenuItemAdded: function (p_sType, p_aArgs, p_oItem) {
-            
-            var oItem = p_aArgs[0];
-        
-            oItem.cfg.subscribeToConfigEvent("selected", 
-                this._onMenuItemSelected, 
-                oItem.index, 
-                this);
-        
-        },
-        
-        
-        /**
-        * @method _onMenuClick
-        * @description "click" event handler for the button's menu.
-        * @private
-        * @param {String} p_sType String representing the name of the event  
-        * that was fired.
-        * @param {Array} p_aArgs Array of arguments sent when the event 
-        * was fired.
-        */
-        _onMenuClick: function (p_sType, p_aArgs) {
-
-            var oItem = p_aArgs[1],
-                oSrcElement;
-        
-            if (oItem) {
-        
-                oSrcElement = this.get("srcelement");
-            
-                if (oSrcElement && oSrcElement.type == "submit") {
-        
-                    this.submitForm();
-            
-                }
-            
-                this._hideMenu();
-            
-            }
-        
-        },
-        
-        
-        
-        // Public methods
-        
-        
-        /**
-        * @method createButtonElement
-        * @description Creates the button's HTML elements.
-        * @param {String} p_sType String indicating the type of element 
-        * to create.
-        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-        * level-one-html.html#ID-58190037">HTMLElement</a>}
-        */
-        createButtonElement: function (p_sType) {
-        
-            var sNodeName = this.NODE_NAME,
-                oElement = document.createElement(sNodeName);
-        
-            oElement.innerHTML =  "<" + sNodeName + " class=\"first-child\">" + 
-                (p_sType == "link" ? "<a></a>" : 
-                "<button type=\"button\"></button>") + "</" + sNodeName + ">";
-        
-            return oElement;
-        
-        },
-
-        
-        /**
-        * @method addStateCSSClasses
-        * @description Appends state-specific CSS classes to the button's root 
-        * DOM element.
-        */
-        addStateCSSClasses: function (p_sState) {
-        
-            var sType = this.get("type");
-        
-            if (Lang.isString(p_sState)) {
-        
-                if (p_sState != "activeoption") {
-        
-                    this.addClass(this.CSS_CLASS_NAME + ("-" + p_sState));
-        
-                }
-        
-                this.addClass("yui-" + sType + ("-button-" + p_sState));
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method removeStateCSSClasses
-        * @description Removes state-specific CSS classes to the button's root 
-        * DOM element.
-        */
-        removeStateCSSClasses: function (p_sState) {
-        
-            var sType = this.get("type");
-        
-            if (Lang.isString(p_sState)) {
-        
-                this.removeClass(this.CSS_CLASS_NAME + ("-" + p_sState));
-                this.removeClass("yui-" + sType + ("-button-" + p_sState));
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method createHiddenFields
-        * @description Creates the button's hidden form field and appends it 
-        * to its parent form.
-        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-        * level-one-html.html#ID-6043025">HTMLInputElement</a>|Array}
-        */
-        createHiddenFields: function () {
-        
-            this.removeHiddenFields();
-        
-            var oForm = this.getForm(),
-                oButtonField,
-                sType,     
-                bCheckable,
-                oMenu,
-                oMenuItem,
-                sName,
-                oValue,
-                oMenuField;
-        
-        
-            if (oForm && !this.get("disabled")) {
-        
-                sType = this.get("type");
-                bCheckable = (sType == "checkbox" || sType == "radio");
-        
-        
-                if (bCheckable || (m_oSubmitTrigger == this)) {
-                
-        
-                    oButtonField = createInputElement(
-                                    (bCheckable ? sType : "hidden"),
-                                    this.get("name"),
-                                    this.get("value"),
-                                    this.get("checked"));
-            
-            
-                    if (oButtonField) {
-            
-                        if (bCheckable) {
-            
-                            oButtonField.style.display = "none";
-            
-                        }
-            
-                        oForm.appendChild(oButtonField);
-            
-                    }
-        
-                }
-                    
-        
-                oMenu = this._menu;
-            
-            
-                if (oMenu && (oMenu instanceof Menu)) {
-        
-        
-                    oMenuField = oMenu.srcElement;
-                    oMenuItem = oMenu.getItem(this.get("selectedMenuItem"));
-
-                    if (oMenuItem) {
-
-                        if (oMenuField && 
-                            oMenuField.nodeName.toUpperCase() == "SELECT") {
-            
-                            oForm.appendChild(oMenuField);
-                            oMenuField.selectedIndex = oMenuItem.index;
-            
-                        }
-                        else {
-            
-                            oValue = (oMenuItem.value === null || 
-                                        oMenuItem.value === "") ? 
-                                        oMenuItem.cfg.getProperty("text") : 
-                                        oMenuItem.value;
-            
-                            sName = this.get("name");
-            
-                            if (oValue && sName) {
-            
-                                oMenuField = createInputElement("hidden", 
-                                                    (sName + "_options"),
-                                                    oValue);
-            
-                                oForm.appendChild(oMenuField);
-            
-                            }
-            
-                        }  
-                    
-                    }
-        
-                }
-            
-            
-                if (oButtonField && oMenuField) {
-        
-                    this._hiddenFields = [oButtonField, oMenuField];
-        
-                }
-                else if (!oButtonField && oMenuField) {
-        
-                    this._hiddenFields = oMenuField;
-                
-                }
-                else if (oButtonField && !oMenuField) {
-        
-                    this._hiddenFields = oButtonField;
-                
-                }
-        
-        
-                return this._hiddenFields;
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method removeHiddenFields
-        * @description Removes the button's hidden form field(s) from its 
-        * parent form.
-        */
-        removeHiddenFields: function () {
-        
-            var oField = this._hiddenFields,
-                nFields,
-                i;
-        
-            function removeChild(p_oElement) {
-        
-                if (Dom.inDocument(p_oElement)) {
-        
-                    p_oElement.parentNode.removeChild(p_oElement);
-                
-                }
-                
-            }
-            
-        
-            if (oField) {
-        
-                if (Lang.isArray(oField)) {
-        
-                    nFields = oField.length;
-                    
-                    if (nFields > 0) {
-                    
-                        i = nFields - 1;
-                        
-                        do {
-        
-                            removeChild(oField[i]);
-        
-                        }
-                        while (i--);
-                    
-                    }
-                
-                }
-                else {
-        
-                    removeChild(oField);
-        
-                }
-        
-                this._hiddenFields = null;
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method submitForm
-        * @description Submits the form to which the button belongs.  Returns  
-        * true if the form was submitted successfully, false if the submission 
-        * was cancelled.
-        * @protected
-        * @return {Boolean}
-        */
-        submitForm: function () {
-        
-            var oForm = this.getForm(),
-        
-                oSrcElement = this.get("srcelement"),
-        
-                /*
-                    Boolean indicating if the event fired successfully 
-                    (was not cancelled by any handlers)
-                */
-        
-                bSubmitForm = false,
-                
-                oEvent;
-        
-        
-            if (oForm) {
-        
-                if (this.get("type") == "submit" || 
-                    (oSrcElement && oSrcElement.type == "submit")) 
-                {
-        
-                    m_oSubmitTrigger = this;
-                    
-                }
-        
-        
-                if (YAHOO.env.ua.ie) {
-        
-                    bSubmitForm = oForm.fireEvent("onsubmit");
-        
-                }
-                else {  // Gecko, Opera, and Safari
-        
-                    oEvent = document.createEvent("HTMLEvents");
-                    oEvent.initEvent("submit", true, true);
-        
-                    bSubmitForm = oForm.dispatchEvent(oEvent);
-        
-                }
-        
-        
-                /*
-                    In IE and Safari, dispatching a "submit" event to a form 
-                    WILL cause the form's "submit" event to fire, but WILL NOT 
-                    submit the form.  Therefore, we need to call the "submit" 
-                    method as well.
-                */
-              
-                if ((YAHOO.env.ua.ie || YAHOO.env.ua.webkit) && bSubmitForm) {
-        
-                    oForm.submit();
-                
-                }
-            
-            }
-        
-            return bSubmitForm;
-            
-        },
-        
-        
-        /**
-        * @method init
-        * @description The Button class's initialization method.
-        * @param {String} p_oElement String specifying the id attribute of the 
-        * <code><input></code>, <code><button></code>,
-        * <code><a></code>, or <code><span></code> element to 
-        * be used to create the button.
-        * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-        * level-one-html.html#ID-6043025">HTMLInputElement</a>|<a href="http://
-        * www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html
-        * #ID-34812697">HTMLButtonElement</a>|<a href="http://www.w3.org/TR
-        * /2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-33759296">
-        * HTMLElement</a>} p_oElement Object reference for the 
-        * <code><input></code>, <code><button></code>, 
-        * <code><a></code>, or <code><span></code> element to be 
-        * used to create the button.
-        * @param {Object} p_oElement Object literal specifying a set of 
-        * configuration attributes used to create the button.
-        * @param {Object} p_oAttributes Optional. Object literal specifying a 
-        * set of configuration attributes used to create the button.
-        */
-        init: function (p_oElement, p_oAttributes) {
-        
-            var sNodeName = p_oAttributes.type == "link" ? "a" : "button",
-                oSrcElement = p_oAttributes.srcelement,
-                oButton = p_oElement.getElementsByTagName(sNodeName)[0],
-                oInput;
-        
-
-            if (!oButton) {
-
-                oInput = p_oElement.getElementsByTagName("input")[0];
-
-
-                if (oInput) {
-
-                    oButton = document.createElement("button");
-                    oButton.setAttribute("type", "button");
-
-                    oInput.parentNode.replaceChild(oButton, oInput);
-                
-                }
-
-            }
-
-            this._button = oButton;
-        
-
-            YAHOO.widget.Button.superclass.init.call(this, p_oElement, 
-                p_oAttributes);
-        
-        
-            m_oButtons[this.get("id")] = this;
-        
-        
-            this.addClass(this.CSS_CLASS_NAME);
-            
-            this.addClass("yui-" + this.get("type") + "-button");
-        
-            Event.on(this._button, "focus", this._onFocus, null, this);
-            this.on("mouseover", this._onMouseOver);
-            this.on("click", this._onClick);
-            this.on("appendTo", this._onAppendTo);
-            
-        
-            var oContainer = this.get("container"),
-                oElement = this.get("element"),
-                bElInDoc = Dom.inDocument(oElement),
-                oParentNode;
-
-
-            if (oContainer) {
-        
-                if (oSrcElement && oSrcElement != oElement) {
-                
-                    oParentNode = oSrcElement.parentNode;
-
-                    if (oParentNode) {
-                    
-                        oParentNode.removeChild(oSrcElement);
-                    
-                    }
-
-                }
-        
-                if (Lang.isString(oContainer)) {
-        
-                    Event.onContentReady(oContainer, function () {
-        
-                        this.appendTo(oContainer);
-                    
-                    }, null, this);
-        
-                }
-                else {
-        
-                    this.appendTo(oContainer);
-        
-                }
-        
-            }
-            else if (!bElInDoc && oSrcElement && oSrcElement != oElement) {
-
-                oParentNode = oSrcElement.parentNode;
-        
-                if (oParentNode) {
-        
-                    this.fireEvent("beforeAppendTo", {
-                        type: "beforeAppendTo",
-                        target: oParentNode
-                    });
-            
-                    oParentNode.replaceChild(oElement, oSrcElement);
-            
-                    this.fireEvent("appendTo", {
-                        type: "appendTo",
-                        target: oParentNode
-                    });
-                
-                }
-        
-            }
-            else if (this.get("type") != "link" && bElInDoc && oSrcElement && 
-                oSrcElement == oElement) {
-        
-                this._addListenersToForm();
-        
-            }
-        
-        
-        },
-        
-        
-        /**
-        * @method initAttributes
-        * @description Initializes all of the configuration attributes used to  
-        * create the button.
-        * @param {Object} p_oAttributes Object literal specifying a set of 
-        * configuration attributes used to create the button.
-        */
-        initAttributes: function (p_oAttributes) {
-        
-            var oAttributes = p_oAttributes || {};
-        
-            YAHOO.widget.Button.superclass.initAttributes.call(this, 
-                oAttributes);
-        
-        
-            /**
-            * @attribute type
-            * @description String specifying the button's type.  Possible 
-            * values are: "push," "link," "submit," "reset," "checkbox," 
-            * "radio," "menu," and "split."
-            * @default "push"
-            * @type String
-            */
-            this.setAttributeConfig("type", {
-        
-                value: (oAttributes.type || "push"),
-                validator: Lang.isString,
-                writeOnce: true,
-                method: this._setType
-        
-            });
-        
-        
-            /**
-            * @attribute label
-            * @description String specifying the button's text label 
-            * or innerHTML.
-            * @default null
-            * @type String
-            */
-            this.setAttributeConfig("label", {
-        
-                value: oAttributes.label,
-                validator: Lang.isString,
-                method: this._setLabel
-        
-            });
-        
-        
-            /**
-            * @attribute value
-            * @description Object specifying the value for the button.
-            * @default null
-            * @type Object
-            */
-            this.setAttributeConfig("value", {
-        
-                value: oAttributes.value
-        
-            });
-        
-        
-            /**
-            * @attribute name
-            * @description String specifying the name for the button.
-            * @default null
-            * @type String
-            */
-            this.setAttributeConfig("name", {
-        
-                value: oAttributes.name,
-                validator: Lang.isString
-        
-            });
-        
-        
-            /**
-            * @attribute tabindex
-            * @description Number specifying the tabindex for the button.
-            * @default null
-            * @type Number
-            */
-            this.setAttributeConfig("tabindex", {
-        
-                value: oAttributes.tabindex,
-                validator: Lang.isNumber,
-                method: this._setTabIndex
-        
-            });
-        
-        
-            /**
-            * @attribute title
-            * @description String specifying the title for the button.
-            * @default null
-            * @type String
-            */
-            this.configureAttribute("title", {
-        
-                value: oAttributes.title,
-                validator: Lang.isString,
-                method: this._setTitle
-        
-            });
-        
-        
-            /**
-            * @attribute disabled
-            * @description Boolean indicating if the button should be disabled.  
-            * (Disabled buttons are dimmed and will not respond to user input 
-            * or fire events.  Does not apply to button's of type "link.")
-            * @default false
-            * @type Boolean
-            */
-            this.setAttributeConfig("disabled", {
-        
-                value: (oAttributes.disabled || false),
-                validator: Lang.isBoolean,
-                method: this._setDisabled
-        
-            });
-        
-        
-            /**
-            * @attribute href
-            * @description String specifying the href for the button.  Applies
-            * only to buttons of type "link."
-            * @type String
-            */
-            this.setAttributeConfig("href", {
-        
-                value: oAttributes.href,
-                validator: Lang.isString,
-                method: this._setHref
-        
-            });
-        
-        
-            /**
-            * @attribute target
-            * @description String specifying the target for the button.  
-            * Applies only to buttons of type "link."
-            * @type String
-            */
-            this.setAttributeConfig("target", {
-        
-                value: oAttributes.target,
-                validator: Lang.isString,
-                method: this._setTarget
-        
-            });
-        
-        
-            /**
-            * @attribute checked
-            * @description Boolean indicating if the button is checked. 
-            * Applies only to buttons of type "radio" and "checkbox."
-            * @default false
-            * @type Boolean
-            */
-            this.setAttributeConfig("checked", {
-        
-                value: (oAttributes.checked || false),
-                validator: Lang.isBoolean,
-                method: this._setChecked
-        
-            });
-        
-        
-            /**
-            * @attribute container
-            * @description HTML element reference or string specifying the id 
-            * attribute of the HTML element that the button's markup should be 
-            * rendered into.
-            * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-            * level-one-html.html#ID-58190037">HTMLElement</a>|String
-            * @default null
-            */
-            this.setAttributeConfig("container", {
-        
-                value: oAttributes.container,
-                writeOnce: true
-        
-            });
-        
-        
-            /**
-            * @attribute srcelement
-            * @description Object reference to the HTML element (either 
-            * <code><input></code> or <code><span></code>) 
-            * used to create the button.
-            * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-            * level-one-html.html#ID-58190037">HTMLElement</a>|String
-            * @default null
-            */
-            this.setAttributeConfig("srcelement", {
-        
-                value: oAttributes.srcelement,
-                writeOnce: true
-        
-            });
-        
-        
-            /**
-            * @attribute menu
-            * @description Object specifying the menu for the button.  
-            * The value can be one of the following:
-            * <ul>
-            * <li>Object specifying a <a href="YAHOO.widget.Menu.html">
-            * YAHOO.widget.Menu</a> instance.</li>
-            * <li>Object specifying a <a href="YAHOO.widget.Overlay.html">
-            * YAHOO.widget.Overlay</a> instance.</li>
-            * <li>String specifying the id attribute of the <code><div>
-            * </code> element used to create the menu.  By default the menu 
-            * will be created as an instance of 
-            * <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>.  
-            * If the <a href="YAHOO.widget.Menu.html#CSS_CLASS_NAME">
-            * default CSS class name for YAHOO.widget.Menu</a> is applied to 
-            * the <code><div></code> element, it will be created as an
-            * instance of <a href="YAHOO.widget.Menu.html">YAHOO.widget.Menu
-            * </a>.</li><li>String specifying the id attribute of the 
-            * <code><select></code> element used to create the menu.
-            * </li><li>Object specifying the <code><div></code> element
-            * used to create the menu.</li>
-            * <li>Object specifying the <code><select></code> element
-            * used to create the menu.</li>
-            * <li>Array of object literals, each representing a set of 
-            * <a href="YAHOO.widget.MenuItem.html">YAHOO.widget.MenuItem</a> 
-            * configuration attributes.</li>
-            * <li>Array of strings representing the text labels for each menu 
-            * item in the menu.</li>
-            * </ul>
-            * @type <a href="YAHOO.widget.Menu.html">YAHOO.widget.Menu</a>|<a 
-            * href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>|<a 
-            * href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
-            * one-html.html#ID-58190037">HTMLElement</a>|String|Array
-            * @default null
-            */
-            this.setAttributeConfig("menu", {
-        
-                value: null,
-                method: this._setMenu,
-                writeOnce: true
-            
-            });
-        
-        
-            /**
-            * @attribute lazyloadmenu
-            * @description Boolean indicating the value to set for the 
-            * <a href="YAHOO.widget.Menu.html#lazyLoad">"lazyload"</a>
-            * configuration property of the button's menu.  Setting 
-            * "lazyloadmenu" to <code>true </code> will defer rendering of 
-            * the button's menu until the first time it is made visible.  
-            * If "lazyloadmenu" is set to <code>false</code>, the button's 
-            * menu will be rendered immediately if the button is in the 
-            * document, or in response to the button's "appendTo" event if 
-            * the button is not yet in the document.  In either case, the 
-            * menu is rendered into the button's parent HTML element.  
-            * <em>This attribute does not apply if a 
-            * <a href="YAHOO.widget.Menu.html">YAHOO.widget.Menu</a> or 
-            * <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a> 
-            * instance is passed as the value of the button's "menu" 
-            * configuration attribute. <a href="YAHOO.widget.Menu.html">
-            * YAHOO.widget.Menu</a> or <a href="YAHOO.widget.Overlay.html">
-            * YAHOO.widget.Overlay</a> instances should be rendered before 
-            * being set as the value for the "menu" configuration 
-            * attribute.</em>
-            * @default true
-            * @type Boolean
-            */
-            this.setAttributeConfig("lazyloadmenu", {
-        
-                value: (oAttributes.lazyloadmenu === false ? false : true),
-                validator: Lang.isBoolean,
-                writeOnce: true
-        
-            });
-
-
-            /**
-            * @attribute menuclassname
-            * @description String representing the CSS class name to be 
-            * applied to the root element of the button's menu.
-            * @type String
-            * @default "yui-button-menu"
-            */
-            this.setAttributeConfig("menuclassname", {
-        
-                value: (oAttributes.menuclassname || "yui-button-menu"),
-                validator: Lang.isString,
-                method: this._setMenuClassName,
-                writeOnce: true
-        
-            });        
-
-
-            /**
-            * @attribute selectedMenuItem
-            * @description Number representing the index of the item in the 
-            * button's menu that is currently selected.
-            * @type Number
-            * @default null
-            */
-            this.setAttributeConfig("selectedMenuItem", {
-        
-                value: 0,
-                validator: Lang.isNumber,
-                method: this._setSelectedMenuItem
-        
-            });
-        
-        
-            /**
-            * @attribute onclick
-            * @description Object literal representing the code to be executed  
-            * when the button is clicked.  Format:<br> <code> {<br> 
-            * <strong>fn:</strong> Function,   // The handler to call 
-            * when the event fires.<br> <strong>obj:</strong> Object, 
-            * // An object to pass back to the handler.<br> 
-            * <strong>scope:</strong> Object //  The object to use 
-            * for the scope of the handler.<br> } </code>
-            * @type Object
-            * @default null
-            */
-            this.setAttributeConfig("onclick", {
-        
-                value: oAttributes.onclick,
-                method: this._setOnClick
-            
-            });
-
-
-            /**
-            * @attribute focusmenu
-            * @description Boolean indicating whether or not the button's menu 
-            * should be focused when it is made visible.
-            * @type Boolean
-            * @default true
-            */
-            this.setAttributeConfig("focusmenu", {
-        
-                value: (oAttributes.focusmenu === false ? false : true),
-                validator: Lang.isBoolean
-        
-            });
-
-        },
-        
-        
-        /**
-        * @method focus
-        * @description Causes the button to receive the focus and fires the 
-        * button's "focus" event.
-        */
-        focus: function () {
-        
-            if (!this.get("disabled")) {
-        
-                this._button.focus();
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method blur
-        * @description Causes the button to lose focus and fires the button's
-        * "blur" event.
-        */
-        blur: function () {
-        
-            if (!this.get("disabled")) {
-        
-                this._button.blur();
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method hasFocus
-        * @description Returns a boolean indicating whether or not the button 
-        * has focus.
-        * @return {Boolean}
-        */
-        hasFocus: function () {
-        
-            return (m_oFocusedButton == this);
-        
-        },
-        
-        
-        /**
-        * @method isActive
-        * @description Returns a boolean indicating whether or not the button 
-        * is active.
-        * @return {Boolean}
-        */
-        isActive: function () {
-        
-            return this.hasClass(this.CSS_CLASS_NAME + "-active");
-        
-        },
-        
-        
-        /**
-        * @method getMenu
-        * @description Returns a reference to the button's menu.
-        * @return {<a href="YAHOO.widget.Overlay.html">
-        * YAHOO.widget.Overlay</a>|<a 
-        * href="YAHOO.widget.Menu.html">YAHOO.widget.Menu</a>}
-        */
-        getMenu: function () {
-        
-            return this._menu;
-        
-        },
-        
-        
-        /**
-        * @method getForm
-        * @description Returns a reference to the button's parent form.
-        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-
-        * 20000929/level-one-html.html#ID-40002357">HTMLFormElement</a>}
-        */
-        getForm: function () {
-        
-            return this._button.form;
-        
-        },
-        
-        
-        /** 
-        * @method getHiddenFields
-        * @description Returns an <code><input></code> element or 
-        * array of form elements used to represent the button when its parent 
-        * form is submitted.  
-        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-        * level-one-html.html#ID-6043025">HTMLInputElement</a>|Array}
-        */
-        getHiddenFields: function () {
-        
-            return this._hiddenFields;
-        
-        },
-        
-        
-        /**
-        * @method destroy
-        * @description Removes the button's element from its parent element and 
-        * removes all event handlers.
-        */
-        destroy: function () {
-        
-        
-            var oElement = this.get("element"),
-                oParentNode = oElement.parentNode,
-                oMenu = this._menu,
-                aButtons;
-        
-            if (oMenu) {
-        
-
-                if (m_oOverlayManager.find(oMenu)) {
-
-                    m_oOverlayManager.remove(oMenu);
-
-                }
-        
-                oMenu.destroy();
-        
-            }
-        
-        
-            Event.purgeElement(oElement);
-            Event.purgeElement(this._button);
-            Event.removeListener(document, "mouseup", this._onDocumentMouseUp);
-            Event.removeListener(document, "keyup", this._onDocumentKeyUp);
-            Event.removeListener(document, "mousedown", 
-                this._onDocumentMouseDown);
-        
-        
-            var oForm = this.getForm();
-            
-            if (oForm) {
-        
-                Event.removeListener(oForm, "reset", this._onFormReset);
-                Event.removeListener(oForm, "submit", this.createHiddenFields);
-        
-            }
-
-
-            this.unsubscribeAll();
-
-            if (oParentNode) {
-
-                oParentNode.removeChild(oElement);
-            
-            }
-        
-        
-            delete m_oButtons[this.get("id")];
-
-            aButtons = Dom.getElementsByClassName(this.CSS_CLASS_NAME, 
-                                this.NODE_NAME, oForm); 
-
-            if (Lang.isArray(aButtons) && aButtons.length === 0) {
-
-                Event.removeListener(oForm, "keypress", 
-                        YAHOO.widget.Button.onFormKeyPress);
-
-            }
-
-        
-        },
-        
-        
-        fireEvent: function (p_sType , p_aArgs) {
-        
-            //  Disabled buttons should not respond to DOM events
-        
-            if (this.DOM_EVENTS[p_sType] && this.get("disabled")) {
-        
-                return;
-        
-            }
-        
-            YAHOO.widget.Button.superclass.fireEvent.call(this, p_sType, 
-                p_aArgs);
-        
-        },
-        
-        
-        /**
-        * @method toString
-        * @description Returns a string representing the button.
-        * @return {String}
-        */
-        toString: function () {
-        
-            return ("Button " + this.get("id"));
-        
-        }
-    
-    });
-    
-    
-    /**
-    * @method YAHOO.widget.Button.onFormKeyPress
-    * @description "keypress" event handler for the button's form.
-    * @param {Event} p_oEvent Object representing the DOM event object passed 
-    * back by the event utility (YAHOO.util.Event).
-    */
-    YAHOO.widget.Button.onFormKeyPress = function (p_oEvent) {
-    
-        var oTarget = Event.getTarget(p_oEvent),
-            nCharCode = Event.getCharCode(p_oEvent),
-            sNodeName = oTarget.nodeName && oTarget.nodeName.toUpperCase(),
-            sType = oTarget.type,
-    
-            /*
-                Boolean indicating if the form contains any enabled or 
-                disabled YUI submit buttons
-            */
-    
-            bFormContainsYUIButtons = false,
-    
-            oButton,
-    
-            oYUISubmitButton,   // The form's first, enabled YUI submit button
-    
-            /*
-                 The form's first, enabled HTML submit button that precedes any 
-                 YUI submit button
-            */
-    
-            oPrecedingSubmitButton,
-            
-    
-            /*
-                 The form's first, enabled HTML submit button that follows a 
-                 YUI button
-            */
-            
-            oFollowingSubmitButton; 
-    
-    
-        function isSubmitButton(p_oElement) {
-    
-            var sId,
-                oSrcElement;
-    
-            switch (p_oElement.nodeName.toUpperCase()) {
-    
-            case "INPUT":
-            case "BUTTON":
-            
-                if (p_oElement.type == "submit" && !p_oElement.disabled) {
-                    
-                    if (!bFormContainsYUIButtons && 
-                        !oPrecedingSubmitButton) {
-
-                        oPrecedingSubmitButton = p_oElement;
-
-                    }
-                    
-                    if (oYUISubmitButton && !oFollowingSubmitButton) {
-                    
-                        oFollowingSubmitButton = p_oElement;
-                    
-                    }
-                
-                }
-
-                break;
-            
-
-            default:
-            
-                sId = p_oElement.id;
-    
-                if (sId) {
-    
-                    oButton = m_oButtons[sId];
-        
-                    if (oButton) {
-
-                        bFormContainsYUIButtons = true;
-        
-                        if (!oButton.get("disabled")) {
-
-                            oSrcElement = oButton.get("srcelement");
-    
-                            if (!oYUISubmitButton &&
-                                (oButton.get("type") == "submit" || 
-                                (oSrcElement && oSrcElement.type == "submit"))) 
-                            {
-
-                                oYUISubmitButton = oButton;
-                            
-                            }
-                        
-                        }
-                        
-                    }
-                
-                }
-
-                break;
-    
-            }
-    
-        }
-    
-    
-        if (nCharCode == 13 && ((sNodeName == "INPUT" && (sType == "text" || 
-            sType == "password" || sType == "checkbox" || sType == "radio" || 
-            sType == "file")) || sNodeName == "SELECT"))
-        {
-    
-            Dom.getElementsBy(isSubmitButton, "*", this);
-    
-    
-            if (oPrecedingSubmitButton) {
-    
-                /*
-                     Need to set focus to the first enabled submit button
-                     to make sure that IE includes its name and value 
-                     in the form's data set.
-                */
-    
-                oPrecedingSubmitButton.focus();
-            
-            }
-            else if (!oPrecedingSubmitButton && oYUISubmitButton) {
-    
-                if (oFollowingSubmitButton) {
-    
-                    /*
-                        Need to call "preventDefault" to ensure that 
-                        the name and value of the regular submit button 
-                        following the YUI button doesn't get added to the 
-                        form's data set when it is submitted.
-                    */
-    
-                    Event.preventDefault(p_oEvent);
-                
-                }
-    
-                oYUISubmitButton.submitForm();
-    
-            }
-            
-        }
-    
-    };
-    
-    
-    /**
-    * @method YAHOO.widget.Button.addHiddenFieldsToForm
-    * @description Searches the specified form and adds hidden fields for  
-    * instances of YAHOO.widget.Button that are of type "radio," "checkbox," 
-    * "menu," and "split."
-    * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
-    * one-html.html#ID-40002357">HTMLFormElement</a>} p_oForm Object reference 
-    * for the form to search.
-    */
-    YAHOO.widget.Button.addHiddenFieldsToForm = function (p_oForm) {
-    
-        var aButtons = Dom.getElementsByClassName(
-                            YAHOO.widget.Button.prototype.CSS_CLASS_NAME, 
-                            "*", 
-                            p_oForm),
-    
-            nButtons = aButtons.length,
-            oButton,
-            sId,
-            i;
-    
-        if (nButtons > 0) {
-    
-    
-            for (i = 0; i < nButtons; i++) {
-    
-                sId = aButtons[i].id;
-    
-                if (sId) {
-    
-                    oButton = m_oButtons[sId];
-        
-                    if (oButton) {
-           
-                        oButton.createHiddenFields();
-                        
-                    }
-                
-                }
-            
-            }
-    
-        }
-    
-    };
-    
-    
-    
-    // Events
-    
-    
-    /**
-    * @event focus
-    * @description Fires when the menu item receives focus.  Passes back a  
-    * single object representing the original DOM event object passed back by 
-    * the event utility (YAHOO.util.Event) when the event was fired.  See 
-    * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> 
-    * for more information on listening for this event.
-    * @type YAHOO.util.CustomEvent
-    */
-    
-    
-    /**
-    * @event blur
-    * @description Fires when the menu item loses the input focus.  Passes back  
-    * a single object representing the original DOM event object passed back by 
-    * the event utility (YAHOO.util.Event) when the event was fired.  See 
-    * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for  
-    * more information on listening for this event.
-    * @type YAHOO.util.CustomEvent
-    */
-    
-    
-    /**
-    * @event option
-    * @description Fires when the user invokes the button's option.  Passes 
-    * back a single object representing the original DOM event (either 
-    * "mousedown" or "keydown") that caused the "option" event to fire.  See 
-    * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> 
-    * for more information on listening for this event.
-    * @type YAHOO.util.CustomEvent
-    */
-
-})();
-(function () {
-
-    // Shorthard for utilities
-    
-    var Dom = YAHOO.util.Dom,
-        Event = YAHOO.util.Event,
-        Lang = YAHOO.lang,
-        Button = YAHOO.widget.Button,  
-    
-        // Private collection of radio buttons
-    
-        m_oButtons = {};
-
-
-
-    /**
-    * The ButtonGroup class creates a set of buttons that are mutually 
-    * exclusive; checking one button in the set will uncheck all others in the 
-    * button group.
-    * @param {String} p_oElement String specifying the id attribute of the 
-    * <code><div></code> element of the button group.
-    * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-    * level-one-html.html#ID-22445964">HTMLDivElement</a>} p_oElement Object 
-    * specifying the <code><div></code> element of the button group.
-    * @param {Object} p_oElement Object literal specifying a set of 
-    * configuration attributes used to create the button group.
-    * @param {Object} p_oAttributes Optional. Object literal specifying a set 
-    * of configuration attributes used to create the button group.
-    * @namespace YAHOO.widget
-    * @class ButtonGroup
-    * @constructor
-    * @extends YAHOO.util.Element
-    */
-    YAHOO.widget.ButtonGroup = function (p_oElement, p_oAttributes) {
-    
-        var fnSuperClass = YAHOO.widget.ButtonGroup.superclass.constructor,
-            sNodeName,
-            oElement,
-            sId;
-    
-        if (arguments.length == 1 && !Lang.isString(p_oElement) && 
-            !p_oElement.nodeName) {
-    
-            if (!p_oElement.id) {
-    
-                sId = Dom.generateId();
-    
-                p_oElement.id = sId;
-    
-    
-            }
-    
-    
-    
-            fnSuperClass.call(this, (this._createGroupElement()), p_oElement);
-    
-        }
-        else if (Lang.isString(p_oElement)) {
-    
-            oElement = Dom.get(p_oElement);
-    
-            if (oElement) {
-            
-                if (oElement.nodeName.toUpperCase() == this.NODE_NAME) {
-    
-            
-                    fnSuperClass.call(this, oElement, p_oAttributes);
-    
-                }
-    
-            }
-        
-        }
-        else {
-    
-            sNodeName = p_oElement.nodeName.toUpperCase();
-    
-            if (sNodeName && sNodeName == this.NODE_NAME) {
-        
-                if (!p_oElement.id) {
-        
-                    p_oElement.id = Dom.generateId();
-        
-        
-                }
-        
-        
-                fnSuperClass.call(this, p_oElement, p_oAttributes);
-    
-            }
-    
-        }
-    
-    };
-    
-    
-    YAHOO.extend(YAHOO.widget.ButtonGroup, YAHOO.util.Element, {
-    
-    
-        // Protected properties
-        
-        
-        /** 
-        * @property _buttons
-        * @description Array of buttons in the button group.
-        * @default null
-        * @protected
-        * @type Array
-        */
-        _buttons: null,
-        
-        
-        
-        // Constants
-        
-        
-        /**
-        * @property NODE_NAME
-        * @description The name of the tag to be used for the button 
-        * group's element. 
-        * @default "DIV"
-        * @final
-        * @type String
-        */
-        NODE_NAME: "DIV",
-        
-        
-        /**
-        * @property CSS_CLASS_NAME
-        * @description String representing the CSS class(es) to be applied  
-        * to the button group's element.
-        * @default "yui-buttongroup"
-        * @final
-        * @type String
-        */
-        CSS_CLASS_NAME: "yui-buttongroup",
-    
-    
-    
-        // Protected methods
-        
-        
-        /**
-        * @method _createGroupElement
-        * @description Creates the button group's element.
-        * @protected
-        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-        * level-one-html.html#ID-22445964">HTMLDivElement</a>}
-        */
-        _createGroupElement: function () {
-        
-            var oElement = document.createElement(this.NODE_NAME);
-        
-            return oElement;
-        
-        },
-        
-        
-        
-        // Protected attribute setter methods
-        
-        
-        /**
-        * @method _setDisabled
-        * @description Sets the value of the button groups's 
-        * "disabled" attribute.
-        * @protected
-        * @param {Boolean} p_bDisabled Boolean indicating the value for
-        * the button group's "disabled" attribute.
-        */
-        _setDisabled: function (p_bDisabled) {
-        
-            var nButtons = this.getCount(),
-                i;
-        
-            if (nButtons > 0) {
-        
-                i = nButtons - 1;
-                
-                do {
-        
-                    this._buttons[i].set("disabled", p_bDisabled);
-                
-                }
-                while (i--);
-        
-            }
-        
-        },
-        
-        
-        
-        // Protected event handlers
-        
-        
-        /**
-        * @method _onKeyDown
-        * @description "keydown" event handler for the button group.
-        * @protected
-        * @param {Event} p_oEvent Object representing the DOM event object  
-        * passed back by the event utility (YAHOO.util.Event).
-        */
-        _onKeyDown: function (p_oEvent) {
-        
-            var oTarget = Event.getTarget(p_oEvent),
-                nCharCode = Event.getCharCode(p_oEvent),
-                sId = oTarget.parentNode.parentNode.id,
-                oButton = m_oButtons[sId],
-                nIndex = -1;
-        
-        
-            if (nCharCode == 37 || nCharCode == 38) {
-        
-                nIndex = (oButton.index === 0) ? 
-                            (this._buttons.length - 1) : (oButton.index - 1);
-            
-            }
-            else if (nCharCode == 39 || nCharCode == 40) {
-        
-                nIndex = (oButton.index === (this._buttons.length - 1)) ? 
-                            0 : (oButton.index + 1);
-        
-            }
-        
-        
-            if (nIndex > -1) {
-        
-                this.check(nIndex);
-                this.getButton(nIndex).focus();
-            
-            }        
-        
-        },
-        
-        
-        /**
-        * @method _onAppendTo
-        * @description "appendTo" event handler for the button group.
-        * @protected
-        * @param {Event} p_oEvent Object representing the event that was fired.
-        */
-        _onAppendTo: function (p_oEvent) {
-        
-            var aButtons = this._buttons,
-                nButtons = aButtons.length,
-                i;
-        
-            for (i = 0; i < nButtons; i++) {
-        
-                aButtons[i].appendTo(this.get("element"));
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method _onButtonCheckedChange
-        * @description "checkedChange" event handler for each button in the 
-        * button group.
-        * @protected
-        * @param {Event} p_oEvent Object representing the event that was fired.
-        * @param {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}  
-        * p_oButton Object representing the button that fired the event.
-        */
-        _onButtonCheckedChange: function (p_oEvent, p_oButton) {
-        
-            var bChecked = p_oEvent.newValue,
-                oCheckedButton = this.get("checkedButton");
-        
-            if (bChecked && oCheckedButton != p_oButton) {
-        
-                if (oCheckedButton) {
-        
-                    oCheckedButton.set("checked", false, true);
-        
-                }
-        
-                this.set("checkedButton", p_oButton);
-                this.set("value", p_oButton.get("value"));
-        
-            }
-            else if (oCheckedButton && !oCheckedButton.set("checked")) {
-        
-                oCheckedButton.set("checked", true, true);
-        
-            }
-           
-        },
-        
-        
-        
-        // Public methods
-        
-        
-        /**
-        * @method init
-        * @description The ButtonGroup class's initialization method.
-        * @param {String} p_oElement String specifying the id attribute of the 
-        * <code><div></code> element of the button group.
-        * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-        * level-one-html.html#ID-22445964">HTMLDivElement</a>} p_oElement Object 
-        * specifying the <code><div></code> element of the button group.
-        * @param {Object} p_oElement Object literal specifying a set of  
-        * configuration attributes used to create the button group.
-        * @param {Object} p_oAttributes Optional. Object literal specifying a
-        * set of configuration attributes used to create the button group.
-        */
-        init: function (p_oElement, p_oAttributes) {
-        
-            this._buttons = [];
-        
-            YAHOO.widget.ButtonGroup.superclass.init.call(this, p_oElement, 
-                    p_oAttributes);
-        
-            this.addClass(this.CSS_CLASS_NAME);
-        
-        
-            var aButtons = this.getElementsByClassName("yui-radio-button");
-        
-        
-            if (aButtons.length > 0) {
-        
-        
-                this.addButtons(aButtons);
-        
-            }
-        
-        
-        
-            function isRadioButton(p_oElement) {
-        
-                return (p_oElement.type == "radio");
-        
-            }
-        
-            aButtons = 
-                Dom.getElementsBy(isRadioButton, "input", this.get("element"));
-        
-        
-            if (aButtons.length > 0) {
-        
-        
-                this.addButtons(aButtons);
-        
-            }
-        
-            this.on("keydown", this._onKeyDown);
-            this.on("appendTo", this._onAppendTo);
-        
-
-            var oContainer = this.get("container");
-
-            if (oContainer) {
-        
-                if (Lang.isString(oContainer)) {
-        
-                    Event.onContentReady(oContainer, function () {
-        
-                        this.appendTo(oContainer);            
-                    
-                    }, null, this);
-        
-                }
-                else {
-        
-                    this.appendTo(oContainer);
-        
-                }
-        
-            }
-        
-        
-        
-        },
-        
-        
-        /**
-        * @method initAttributes
-        * @description Initializes all of the configuration attributes used to  
-        * create the button group.
-        * @param {Object} p_oAttributes Object literal specifying a set of 
-        * configuration attributes used to create the button group.
-        */
-        initAttributes: function (p_oAttributes) {
-        
-            var oAttributes = p_oAttributes || {};
-        
-            YAHOO.widget.ButtonGroup.superclass.initAttributes.call(
-                this, oAttributes);
-        
-        
-            /**
-            * @attribute name
-            * @description String specifying the name for the button group.  
-            * This name will be applied to each button in the button group.
-            * @default null
-            * @type String
-            */
-            this.setAttributeConfig("name", {
-        
-                value: oAttributes.name,
-                validator: Lang.isString
-        
-            });
-        
-        
-            /**
-            * @attribute disabled
-            * @description Boolean indicating if the button group should be 
-            * disabled.  Disabling the button group will disable each button 
-            * in the button group.  Disabled buttons are dimmed and will not 
-            * respond to user input or fire events.
-            * @default false
-            * @type Boolean
-            */
-            this.setAttributeConfig("disabled", {
-        
-                value: (oAttributes.disabled || false),
-                validator: Lang.isBoolean,
-                method: this._setDisabled
-        
-            });
-        
-        
-            /**
-            * @attribute value
-            * @description Object specifying the value for the button group.
-            * @default null
-            * @type Object
-            */
-            this.setAttributeConfig("value", {
-        
-                value: oAttributes.value
-        
-            });
-        
-        
-            /**
-            * @attribute container
-            * @description HTML element reference or string specifying the id 
-            * attribute of the HTML element that the button group's markup
-            * should be rendered into.
-            * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-            * level-one-html.html#ID-58190037">HTMLElement</a>|String
-            * @default null
-            */
-            this.setAttributeConfig("container", {
-        
-                value: oAttributes.container,
-                writeOnce: true
-        
-            });
-        
-        
-            /**
-            * @attribute checkedButton
-            * @description Reference for the button in the button group that 
-            * is checked.
-            * @type {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}
-            * @default null
-            */
-            this.setAttributeConfig("checkedButton", {
-        
-                value: null
-        
-            });
-        
-        },
-        
-        
-        /**
-        * @method addButton
-        * @description Adds the button to the button group.
-        * @param {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}  
-        * p_oButton Object reference for the <a href="YAHOO.widget.Button.html">
-        * YAHOO.widget.Button</a> instance to be added to the button group.
-        * @param {String} p_oButton String specifying the id attribute of the 
-        * <code><input></code> or <code><span></code> element 
-        * to be used to create the button to be added to the button group.
-        * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-        * level-one-html.html#ID-6043025">HTMLInputElement</a>|<a href="
-        * http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#
-        * ID-33759296">HTMLElement</a>} p_oButton Object reference for the 
-        * <code><input></code> or <code><span></code> element 
-        * to be used to create the button to be added to the button group.
-        * @param {Object} p_oButton Object literal specifying a set of 
-        * <a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a> 
-        * configuration attributes used to configure the button to be added to 
-        * the button group.
-        * @return {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>} 
-        */
-        addButton: function (p_oButton) {
-        
-            var oButton,
-                oButtonElement,
-                oGroupElement,
-                nIndex,
-                sButtonName,
-                sGroupName;
-        
-        
-            if (p_oButton instanceof Button && 
-                p_oButton.get("type") == "radio") {
-        
-                oButton = p_oButton;
-        
-            }
-            else if (!Lang.isString(p_oButton) && !p_oButton.nodeName) {
-        
-                p_oButton.type = "radio";
-        
-                oButton = new Button(p_oButton);
-
-            }
-            else {
-        
-                oButton = new Button(p_oButton, { type: "radio" });
-        
-            }
-        
-        
-            if (oButton) {
-        
-                nIndex = this._buttons.length;
-                sButtonName = oButton.get("name");
-                sGroupName = this.get("name");
-        
-                oButton.index = nIndex;
-        
-                this._buttons[nIndex] = oButton;
-                m_oButtons[oButton.get("id")] = oButton;
-        
-        
-                if (sButtonName != sGroupName) {
-        
-                    oButton.set("name", sGroupName);
-                
-                }
-        
-        
-                if (this.get("disabled")) {
-        
-                    oButton.set("disabled", true);
-        
-                }
-        
-        
-                if (oButton.get("checked")) {
-        
-                    this.set("checkedButton", oButton);
-        
-                }
-
-                
-                oButtonElement = oButton.get("element");
-                oGroupElement = this.get("element");
-                
-                if (oButtonElement.parentNode != oGroupElement) {
-                
-                    oGroupElement.appendChild(oButtonElement);
-                
-                }
-        
-                
-                oButton.on("checkedChange", 
-                    this._onButtonCheckedChange, oButton, this);
-        
-        
-                return oButton;
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method addButtons
-        * @description Adds the array of buttons to the button group.
-        * @param {Array} p_aButtons Array of <a href="YAHOO.widget.Button.html">
-        * YAHOO.widget.Button</a> instances to be added 
-        * to the button group.
-        * @param {Array} p_aButtons Array of strings specifying the id 
-        * attribute of the <code><input></code> or <code><span>
-        * </code> elements to be used to create the buttons to be added to the 
-        * button group.
-        * @param {Array} p_aButtons Array of object references for the 
-        * <code><input></code> or <code><span></code> elements 
-        * to be used to create the buttons to be added to the button group.
-        * @param {Array} p_aButtons Array of object literals, each containing
-        * a set of <a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>  
-        * configuration attributes used to configure each button to be added 
-        * to the button group.
-        * @return {Array}
-        */
-        addButtons: function (p_aButtons) {
-    
-            var nButtons,
-                oButton,
-                aButtons,
-                i;
-        
-            if (Lang.isArray(p_aButtons)) {
-            
-                nButtons = p_aButtons.length;
-                aButtons = [];
-        
-                if (nButtons > 0) {
-        
-                    for (i = 0; i < nButtons; i++) {
-        
-                        oButton = this.addButton(p_aButtons[i]);
-                        
-                        if (oButton) {
-        
-                            aButtons[aButtons.length] = oButton;
-        
-                        }
-                    
-                    }
-        
-                    if (aButtons.length > 0) {
-        
-        
-                        return aButtons;
-        
-                    }
-                
-                }
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method removeButton
-        * @description Removes the button at the specified index from the 
-        * button group.
-        * @param {Number} p_nIndex Number specifying the index of the button 
-        * to be removed from the button group.
-        */
-        removeButton: function (p_nIndex) {
-        
-            var oButton = this.getButton(p_nIndex),
-                nButtons,
-                i;
-            
-            if (oButton) {
-        
-        
-                this._buttons.splice(p_nIndex, 1);
-                delete m_oButtons[oButton.get("id")];
-        
-                oButton.removeListener("checkedChange", 
-                    this._onButtonCheckedChange);
-
-                oButton.destroy();
-        
-        
-                nButtons = this._buttons.length;
-                
-                if (nButtons > 0) {
-        
-                    i = this._buttons.length - 1;
-                    
-                    do {
-        
-                        this._buttons[i].index = i;
-        
-                    }
-                    while (i--);
-                
-                }
-        
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method getButton
-        * @description Returns the button at the specified index.
-        * @param {Number} p_nIndex The index of the button to retrieve from the 
-        * button group.
-        * @return {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}
-        */
-        getButton: function (p_nIndex) {
-        
-            if (Lang.isNumber(p_nIndex)) {
-        
-                return this._buttons[p_nIndex];
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method getButtons
-        * @description Returns an array of the buttons in the button group.
-        * @return {Array}
-        */
-        getButtons: function () {
-        
-            return this._buttons;
-        
-        },
-        
-        
-        /**
-        * @method getCount
-        * @description Returns the number of buttons in the button group.
-        * @return {Number}
-        */
-        getCount: function () {
-        
-            return this._buttons.length;
-        
-        },
-        
-        
-        /**
-        * @method focus
-        * @description Sets focus to the button at the specified index.
-        * @param {Number} p_nIndex Number indicating the index of the button 
-        * to focus. 
-        */
-        focus: function (p_nIndex) {
-        
-            var oButton,
-                nButtons,
-                i;
-        
-            if (Lang.isNumber(p_nIndex)) {
-        
-                oButton = this._buttons[p_nIndex];
-                
-                if (oButton) {
-        
-                    oButton.focus();
-        
-                }
-            
-            }
-            else {
-        
-                nButtons = this.getCount();
-        
-                for (i = 0; i < nButtons; i++) {
-        
-                    oButton = this._buttons[i];
-        
-                    if (!oButton.get("disabled")) {
-        
-                        oButton.focus();
-                        break;
-        
-                    }
-        
-                }
-        
-            }
-        
-        },
-        
-        
-        /**
-        * @method check
-        * @description Checks the button at the specified index.
-        * @param {Number} p_nIndex Number indicating the index of the button 
-        * to check. 
-        */
-        check: function (p_nIndex) {
-        
-            var oButton = this.getButton(p_nIndex);
-            
-            if (oButton) {
-        
-                oButton.set("checked", true);
-            
-            }
-        
-        },
-        
-        
-        /**
-        * @method destroy
-        * @description Removes the button group's element from its parent 
-        * element and removes all event handlers.
-        */
-        destroy: function () {
-        
-        
-            var nButtons = this._buttons.length,
-                oElement = this.get("element"),
-                oParentNode = oElement.parentNode,
-                i;
-            
-            if (nButtons > 0) {
-        
-                i = this._buttons.length - 1;
-        
-                do {
-        
-                    this._buttons[i].destroy();
-        
-                }
-                while (i--);
-            
-            }
-        
-        
-            Event.purgeElement(oElement);
-            
-        
-            oParentNode.removeChild(oElement);
-        
-        },
-        
-        
-        /**
-        * @method toString
-        * @description Returns a string representing the button group.
-        * @return {String}
-        */
-        toString: function () {
-        
-            return ("ButtonGroup " + this.get("id"));
-        
-        }
-    
-    });
-
-})();
-YAHOO.register("button", YAHOO.widget.Button, {version: "2.3.1", build: "541"});

Added: trunk/root/static/yui/button/button-debug.js
===================================================================
--- trunk/root/static/yui/button/button-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/button/button-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,4723 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+/**
+* @module button
+* @description <p>The Button Control enables the creation of rich, graphical 
+* buttons that function like traditional HTML form buttons.  <em>Unlike</em> 
+* tradition HTML form buttons, buttons created with the Button Control can have 
+* a label that is different from its value.  With the inclusion of the optional 
+* <a href="module_menu.html">Menu Control</a>, the Button Control can also be
+* used to create menu buttons and split buttons, controls that are not 
+* available natively in HTML.  The Button Control can also be thought of as a 
+* way to create more visually engaging implementations of the browser's 
+* default radio-button and check-box controls.</p>
+* <p>The Button Control supports the following types:</p>
+* <dl>
+* <dt>push</dt>
+* <dd>Basic push button that can execute a user-specified command when 
+* pressed.</dd>
+* <dt>link</dt>
+* <dd>Navigates to a specified url when pressed.</dd>
+* <dt>submit</dt>
+* <dd>Submits the parent form when pressed.</dd>
+* <dt>reset</dt>
+* <dd>Resets the parent form when pressed.</dd>
+* <dt>checkbox</dt>
+* <dd>Maintains a "checked" state that can be toggled on and off.</dd>
+* <dt>radio</dt>
+* <dd>Maintains a "checked" state that can be toggled on and off.  Use with 
+* the ButtonGroup class to create a set of controls that are mutually 
+* exclusive; checking one button in the set will uncheck all others in 
+* the group.</dd>
+* <dt>menu</dt>
+* <dd>When pressed will show/hide a menu.</dd>
+* <dt>split</dt>
+* <dd>Can execute a user-specified command or display a menu when pressed.</dd>
+* </dl>
+* @title Button
+* @namespace YAHOO.widget
+* @requires yahoo, dom, element, event
+* @optional container, menu
+*/
+
+
+(function () {
+
+
+    /**
+    * The Button class creates a rich, graphical button.
+    * @param {String} p_oElement String specifying the id attribute of the 
+    * <code><input></code>, <code><button></code>,
+    * <code><a></code>, or <code><span></code> element to 
+    * be used to create the button.
+    * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
+    * one-html.html#ID-6043025">HTMLInputElement</a>|<a href="http://www.w3.org
+    * /TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-34812697">
+    * HTMLButtonElement</a>|<a href="
+    * http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#
+    * ID-33759296">HTMLElement</a>} p_oElement Object reference for the 
+    * <code><input></code>, <code><button></code>, 
+    * <code><a></code>, or <code><span></code> element to be 
+    * used to create the button.
+    * @param {Object} p_oElement Object literal specifying a set of   
+    * configuration attributes used to create the button.
+    * @param {Object} p_oAttributes Optional. Object literal specifying a set  
+    * of configuration attributes used to create the button.
+    * @namespace YAHOO.widget
+    * @class Button
+    * @constructor
+    * @extends YAHOO.util.Element
+    */
+
+
+
+    // Shorthard for utilities
+
+    var Dom = YAHOO.util.Dom,
+        Event = YAHOO.util.Event,
+        Lang = YAHOO.lang,
+        Overlay = YAHOO.widget.Overlay,
+        Menu = YAHOO.widget.Menu,
+    
+    
+        // Private member variables
+    
+        m_oButtons = {},    // Collection of all Button instances
+        m_oOverlayManager = null,   // YAHOO.widget.OverlayManager instance
+        m_oSubmitTrigger = null,    // The button that submitted the form 
+        m_oFocusedButton = null;    // The button that has focus
+
+
+
+    // Private methods
+
+    
+    
+    /**
+    * @method createInputElement
+    * @description Creates an <code><input></code> element of the 
+    * specified type.
+    * @private
+    * @param {String} p_sType String specifying the type of 
+    * <code><input></code> element to create.
+    * @param {String} p_sName String specifying the name of 
+    * <code><input></code> element to create.
+    * @param {String} p_sValue String specifying the value of 
+    * <code><input></code> element to create.
+    * @param {String} p_bChecked Boolean specifying if the  
+    * <code><input></code> element is to be checked.
+    * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
+    * one-html.html#ID-6043025">HTMLInputElement</a>}
+    */
+    function createInputElement(p_sType, p_sName, p_sValue, p_bChecked) {
+    
+        var oInput,
+            sInput;
+    
+        if (Lang.isString(p_sType) && Lang.isString(p_sName)) {
+        
+            if (YAHOO.env.ua.ie) {
+        
+                /*
+                    For IE it is necessary to create the element with the 
+                    "type," "name," "value," and "checked" properties set all 
+                    at once.
+                */
+            
+                sInput = "<input type=\"" + p_sType + "\" name=\"" + 
+                    p_sName + "\"";
+        
+                if (p_bChecked) {
+        
+                    sInput += " checked";
+                
+                }
+                
+                sInput += ">";
+        
+                oInput = document.createElement(sInput);
+        
+            }
+            else {
+            
+                oInput = document.createElement("input");
+                oInput.name = p_sName;
+                oInput.type = p_sType;
+        
+                if (p_bChecked) {
+        
+                    oInput.checked = true;
+                
+                }
+        
+            }
+        
+            oInput.value = p_sValue;
+            
+            return oInput;
+        
+        }
+    
+    }
+    
+    
+    /**
+    * @method setAttributesFromSrcElement
+    * @description Gets the values for all the attributes of the source element 
+    * (either <code><input></code> or <code><a></code>) that 
+    * map to Button configuration attributes and sets them into a collection 
+    * that is passed to the Button constructor.
+    * @private
+    * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
+    * one-html.html#ID-6043025">HTMLInputElement</a>|<a href="http://www.w3.org/
+    * TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-
+    * 48250443">HTMLAnchorElement</a>} p_oElement Object reference to the HTML 
+    * element (either <code><input></code> or <code><span>
+    * </code>) used to create the button.
+    * @param {Object} p_oAttributes Object reference for the collection of 
+    * configuration attributes used to create the button.
+    */
+    function setAttributesFromSrcElement(p_oElement, p_oAttributes) {
+    
+        var sSrcElementNodeName = p_oElement.nodeName.toUpperCase(),
+            me = this,
+            oAttribute,
+            oRootNode,
+            sText;
+            
+    
+        /**
+        * @method setAttributeFromDOMAttribute
+        * @description Gets the value of the specified DOM attribute and sets it 
+        * into the collection of configuration attributes used to configure 
+        * the button.
+        * @private
+        * @param {String} p_sAttribute String representing the name of the 
+        * attribute to retrieve from the DOM element.
+        */
+        function setAttributeFromDOMAttribute(p_sAttribute) {
+    
+            if (!(p_sAttribute in p_oAttributes)) {
+    
+                /*
+                    Need to use "getAttributeNode" instead of "getAttribute" 
+                    because using "getAttribute," IE will return the innerText 
+                    of a <code><button></code> for the value attribute  
+                    rather than the value of the "value" attribute.
+                */
+        
+                oAttribute = p_oElement.getAttributeNode(p_sAttribute);
+        
+    
+                if (oAttribute && ("value" in oAttribute)) {
+    
+                    me.logger.log("Setting attribute \"" + p_sAttribute + 
+                        "\" using source element's attribute value of \"" + 
+                        oAttribute.value + "\"");
+    
+                    p_oAttributes[p_sAttribute] = oAttribute.value;
+    
+                }
+    
+            }
+        
+        }
+    
+    
+        /**
+        * @method setFormElementProperties
+        * @description Gets the value of the attributes from the form element  
+        * and sets them into the collection of configuration attributes used to 
+        * configure the button.
+        * @private
+        */
+        function setFormElementProperties() {
+    
+            setAttributeFromDOMAttribute("type");
+    
+            if (p_oAttributes.type == "button") {
+            
+                p_oAttributes.type = "push";
+            
+            }
+    
+            if (!("disabled" in p_oAttributes)) {
+    
+                p_oAttributes.disabled = p_oElement.disabled;
+    
+            }
+    
+            setAttributeFromDOMAttribute("name");
+            setAttributeFromDOMAttribute("value");
+            setAttributeFromDOMAttribute("title");
+    
+        }
+
+    
+        switch (sSrcElementNodeName) {
+        
+        case "A":
+            
+            p_oAttributes.type = "link";
+            
+            setAttributeFromDOMAttribute("href");
+            setAttributeFromDOMAttribute("target");
+        
+            break;
+    
+        case "INPUT":
+
+            setFormElementProperties();
+
+            if (!("checked" in p_oAttributes)) {
+    
+                p_oAttributes.checked = p_oElement.checked;
+    
+            }
+
+            break;
+
+        case "BUTTON":
+
+            setFormElementProperties();
+
+            oRootNode = p_oElement.parentNode.parentNode;
+
+            if (Dom.hasClass(oRootNode, this.CSS_CLASS_NAME + "-checked")) {
+            
+                p_oAttributes.checked = true;
+            
+            }
+
+            if (Dom.hasClass(oRootNode, this.CSS_CLASS_NAME + "-disabled")) {
+
+                p_oAttributes.disabled = true;
+            
+            }
+
+            p_oElement.removeAttribute("value");
+
+            p_oElement.setAttribute("type", "button");
+
+            break;
+        
+        }
+
+        p_oElement.removeAttribute("id");
+        p_oElement.removeAttribute("name");
+        
+        if (!("tabindex" in p_oAttributes)) {
+
+            p_oAttributes.tabindex = p_oElement.tabIndex;
+
+        }
+    
+        if (!("label" in p_oAttributes)) {
+    
+            // Set the "label" property
+        
+            sText = sSrcElementNodeName == "INPUT" ? 
+                            p_oElement.value : p_oElement.innerHTML;
+        
+    
+            if (sText && sText.length > 0) {
+                
+                p_oAttributes.label = sText;
+                
+            } 
+    
+        }
+    
+    }
+    
+    
+    /**
+    * @method initConfig
+    * @description Initializes the set of configuration attributes that are 
+    * used to instantiate the button.
+    * @private
+    * @param {Object} Object representing the button's set of 
+    * configuration attributes.
+    */
+    function initConfig(p_oConfig) {
+    
+        var oAttributes = p_oConfig.attributes,
+            oSrcElement = oAttributes.srcelement,
+            sSrcElementNodeName = oSrcElement.nodeName.toUpperCase(),
+            me = this;
+    
+    
+        if (sSrcElementNodeName == this.NODE_NAME) {
+    
+            p_oConfig.element = oSrcElement;
+            p_oConfig.id = oSrcElement.id;
+
+            Dom.getElementsBy(function (p_oElement) {
+            
+                switch (p_oElement.nodeName.toUpperCase()) {
+                
+                case "BUTTON":
+                case "A":
+                case "INPUT":
+
+                    setAttributesFromSrcElement.call(me, p_oElement, 
+                        oAttributes);
+
+                    break;                        
+                
+                }
+            
+            }, "*", oSrcElement);
+        
+        }
+        else {
+    
+            switch (sSrcElementNodeName) {
+
+            case "BUTTON":
+            case "A":
+            case "INPUT":
+
+                setAttributesFromSrcElement.call(this, oSrcElement, 
+                    oAttributes);
+
+                break;
+
+            }
+        
+        }
+    
+    }
+
+
+
+    //  Constructor
+
+    YAHOO.widget.Button = function (p_oElement, p_oAttributes) {
+    
+        var fnSuperClass = YAHOO.widget.Button.superclass.constructor,
+            oConfig,
+            oElement;
+    
+        if (arguments.length == 1 && !Lang.isString(p_oElement) && 
+            !p_oElement.nodeName) {
+    
+            if (!p_oElement.id) {
+    
+                p_oElement.id = Dom.generateId();
+    
+                YAHOO.log("No value specified for the button's \"id\" " + 
+                    "attribute. Setting button id to \"" + p_oElement.id + 
+                    "\".", "warn");
+    
+            }
+    
+            this.logger = new YAHOO.widget.LogWriter("Button " + p_oElement.id);
+    
+            this.logger.log("No source HTML element.  Building the button " +
+                    "using the set of configuration attributes.");
+    
+            fnSuperClass.call(this, 
+                (this.createButtonElement(p_oElement.type)),
+                p_oElement);
+    
+        }
+        else {
+    
+            oConfig = { element: null, attributes: (p_oAttributes || {}) };
+    
+    
+            if (Lang.isString(p_oElement)) {
+    
+                oElement = Dom.get(p_oElement);
+    
+                if (oElement) {
+
+                    if (!oConfig.attributes.id) {
+                    
+                        oConfig.attributes.id = p_oElement;
+                    
+                    }
+    
+                    this.logger = new YAHOO.widget.LogWriter(
+                                        "Button " + oConfig.attributes.id);
+                
+                    this.logger.log("Building the button using an existing " + 
+                            "HTML element as a source element.");
+                
+                
+                    oConfig.attributes.srcelement = oElement;
+                
+                    initConfig.call(this, oConfig);
+                
+                
+                    if (!oConfig.element) {
+                
+                        this.logger.log("Source element could not be used " +
+                                "as is.  Creating a new HTML element for " + 
+                                "the button.");
+                
+                        oConfig.element = 
+                            this.createButtonElement(oConfig.attributes.type);
+                
+                    }
+                
+                    fnSuperClass.call(this, oConfig.element, 
+                        oConfig.attributes);
+    
+                }
+    
+            }
+            else if (p_oElement.nodeName) {
+    
+                if (!oConfig.attributes.id) {
+    
+                    if (p_oElement.id) {
+        
+                        oConfig.attributes.id = p_oElement.id;
+                    
+                    }
+                    else {
+        
+                        oConfig.attributes.id = Dom.generateId();
+        
+                        YAHOO.log("No value specified for the button's " +
+                            "\"id\" attribute. Setting button id to \"" + 
+                            oConfig.attributes.id + "\".", "warn");
+        
+                    }
+    
+                }
+    
+    
+                this.logger = new YAHOO.widget.LogWriter(
+                    "Button " + oConfig.attributes.id);
+    
+                this.logger.log("Building the button using an existing HTML " + 
+                    "element as a source element.");
+    
+    
+                oConfig.attributes.srcelement = p_oElement;
+        
+                initConfig.call(this, oConfig);
+        
+        
+                if (!oConfig.element) {
+    
+                    this.logger.log("Source element could not be used as is." +
+                            "  Creating a new HTML element for the button.");
+            
+                    oConfig.element = 
+                        this.createButtonElement(oConfig.attributes.type);
+            
+                }
+            
+                fnSuperClass.call(this, oConfig.element, oConfig.attributes);
+            
+            }
+    
+        }
+    
+    };
+
+
+
+    YAHOO.extend(YAHOO.widget.Button, YAHOO.util.Element, {
+    
+    
+        // Protected properties
+        
+        
+        /** 
+        * @property _button
+        * @description Object reference to the button's internal 
+        * <code><a></code> or <code><button></code> element.
+        * @default null
+        * @protected
+        * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+        * level-one-html.html#ID-48250443">HTMLAnchorElement</a>|<a href="
+        * http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html
+        * #ID-34812697">HTMLButtonElement</a>
+        */
+        _button: null,
+        
+        
+        /** 
+        * @property _menu
+        * @description Object reference to the button's menu.
+        * @default null
+        * @protected
+        * @type {<a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>|
+        * <a href="YAHOO.widget.Menu.html">YAHOO.widget.Menu</a>}
+        */
+        _menu: null,
+        
+        
+        /** 
+        * @property _hiddenFields
+        * @description Object reference to the <code><input></code>  
+        * element, or array of HTML form elements used to represent the button
+        *  when its parent form is submitted.
+        * @default null
+        * @protected
+        * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+        * level-one-html.html#ID-6043025">HTMLInputElement</a>|Array
+        */
+        _hiddenFields: null,
+        
+        
+        /** 
+        * @property _onclickAttributeValue
+        * @description Object reference to the button's current value for the 
+        * "onclick" configuration attribute.
+        * @default null
+        * @protected
+        * @type Object
+        */
+        _onclickAttributeValue: null,
+        
+        
+        /** 
+        * @property _activationKeyPressed
+        * @description Boolean indicating if the key(s) that toggle the button's 
+        * "active" state have been pressed.
+        * @default false
+        * @protected
+        * @type Boolean
+        */
+        _activationKeyPressed: false,
+        
+        
+        /** 
+        * @property _activationButtonPressed
+        * @description Boolean indicating if the mouse button that toggles 
+        * the button's "active" state has been pressed.
+        * @default false
+        * @protected
+        * @type Boolean
+        */
+        _activationButtonPressed: false,
+        
+        
+        /** 
+        * @property _hasKeyEventHandlers
+        * @description Boolean indicating if the button's "blur", "keydown" and 
+        * "keyup" event handlers are assigned
+        * @default false
+        * @protected
+        * @type Boolean
+        */
+        _hasKeyEventHandlers: false,
+        
+        
+        /** 
+        * @property _hasMouseEventHandlers
+        * @description Boolean indicating if the button's "mouseout," 
+        * "mousedown," and "mouseup" event handlers are assigned
+        * @default false
+        * @protected
+        * @type Boolean
+        */
+        _hasMouseEventHandlers: false,
+        
+        
+        
+        // Constants
+        
+        
+        /**
+        * @property NODE_NAME
+        * @description The name of the node to be used for the button's 
+        * root element.
+        * @default "SPAN"
+        * @final
+        * @type String
+        */
+        NODE_NAME: "SPAN",
+        
+        
+        /**
+        * @property CHECK_ACTIVATION_KEYS
+        * @description Array of numbers representing keys that (when pressed) 
+        * toggle the button's "checked" attribute.
+        * @default [32]
+        * @final
+        * @type Array
+        */
+        CHECK_ACTIVATION_KEYS: [32],
+        
+        
+        /**
+        * @property ACTIVATION_KEYS
+        * @description Array of numbers representing keys that (when presed) 
+        * toggle the button's "active" state.
+        * @default [13, 32]
+        * @final
+        * @type Array
+        */
+        ACTIVATION_KEYS: [13, 32],
+        
+        
+        /**
+        * @property OPTION_AREA_WIDTH
+        * @description Width (in pixels) of the area of a split button that  
+        * when pressed will display a menu.
+        * @default 20
+        * @final
+        * @type Number
+        */
+        OPTION_AREA_WIDTH: 20,
+        
+        
+        /**
+        * @property CSS_CLASS_NAME
+        * @description String representing the CSS class(es) to be applied to  
+        * the button's root element.
+        * @default "yui-button"
+        * @final
+        * @type String
+        */
+        CSS_CLASS_NAME: "yui-button",
+        
+        
+        /**
+        * @property RADIO_DEFAULT_TITLE
+        * @description String representing the default title applied to buttons 
+        * of type "radio." 
+        * @default "Unchecked.  Click to check."
+        * @final
+        * @type String
+        */
+        RADIO_DEFAULT_TITLE: "Unchecked.  Click to check.",
+        
+        
+        /**
+        * @property RADIO_CHECKED_TITLE
+        * @description String representing the title applied to buttons of 
+        * type "radio" when checked.
+        * @default "Checked.  Click another button to uncheck"
+        * @final
+        * @type String
+        */
+        RADIO_CHECKED_TITLE: "Checked.  Click another button to uncheck",
+        
+        
+        /**
+        * @property CHECKBOX_DEFAULT_TITLE
+        * @description String representing the default title applied to 
+        * buttons of type "checkbox." 
+        * @default "Unchecked.  Click to check."
+        * @final
+        * @type String
+        */
+        CHECKBOX_DEFAULT_TITLE: "Unchecked.  Click to check.",
+        
+        
+        /**
+        * @property CHECKBOX_CHECKED_TITLE
+        * @description String representing the title applied to buttons of type 
+        * "checkbox" when checked.
+        * @default "Checked.  Click to uncheck."
+        * @final
+        * @type String
+        */
+        CHECKBOX_CHECKED_TITLE: "Checked.  Click to uncheck.",
+        
+        
+        /**
+        * @property MENUBUTTON_DEFAULT_TITLE
+        * @description String representing the default title applied to 
+        * buttons of type "menu." 
+        * @default "Menu collapsed.  Click to expand."
+        * @final
+        * @type String
+        */
+        MENUBUTTON_DEFAULT_TITLE: "Menu collapsed.  Click to expand.",
+        
+        
+        /**
+        * @property MENUBUTTON_MENU_VISIBLE_TITLE
+        * @description String representing the title applied to buttons of type 
+        * "menu" when the button's menu is visible. 
+        * @default "Menu expanded.  Click or press Esc to collapse."
+        * @final
+        * @type String
+        */
+        MENUBUTTON_MENU_VISIBLE_TITLE: 
+            "Menu expanded.  Click or press Esc to collapse.",
+        
+        
+        /**
+        * @property SPLITBUTTON_DEFAULT_TITLE
+        * @description  String representing the default title applied to 
+        * buttons of type "split." 
+        * @default "Menu collapsed.  Click inside option region or press 
+        * Ctrl + Shift + M to show the menu."
+        * @final
+        * @type String
+        */
+        SPLITBUTTON_DEFAULT_TITLE: ("Menu collapsed.  Click inside option " + 
+            "region or press Ctrl + Shift + M to show the menu."),
+        
+        
+        /**
+        * @property SPLITBUTTON_OPTION_VISIBLE_TITLE
+        * @description String representing the title applied to buttons of type 
+        * "split" when the button's menu is visible. 
+        * @default "Menu expanded.  Press Esc or Ctrl + Shift + M to hide 
+        * the menu."
+        * @final
+        * @type String
+        */
+        SPLITBUTTON_OPTION_VISIBLE_TITLE: 
+            "Menu expanded.  Press Esc or Ctrl + Shift + M to hide the menu.",
+        
+        
+        /**
+        * @property SUBMIT_TITLE
+        * @description String representing the title applied to buttons of 
+        * type "submit." 
+        * @default "Click to submit form."
+        * @final
+        * @type String
+        */
+        SUBMIT_TITLE: "Click to submit form.",
+        
+        
+        
+        // Protected attribute setter methods
+        
+        
+        /**
+        * @method _setType
+        * @description Sets the value of the button's "type" attribute.
+        * @protected
+        * @param {String} p_sType String indicating the value for the button's 
+        * "type" attribute.
+        */
+        _setType: function (p_sType) {
+        
+            if (p_sType == "split") {
+        
+                this.on("option", this._onOption);
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _setLabel
+        * @description Sets the value of the button's "label" attribute.
+        * @protected
+        * @param {String} p_sLabel String indicating the value for the button's 
+        * "label" attribute.
+        */
+        _setLabel: function (p_sLabel) {
+
+            this._button.innerHTML = p_sLabel;
+            
+            /*
+                Remove and add the default class name from the root element
+                for Gecko to ensure that the button shrinkwraps to the label.
+                Without this the button will not be rendered at the correct 
+                width when the label changes.  The most likely cause for this 
+                bug is button's use of the Gecko-specific CSS display type of 
+                "-moz-inline-box" to simulate "inline-block" supported by IE, 
+                Safari and Opera.
+            */
+            
+            var sClass,
+                me;
+            
+            if (YAHOO.env.ua.gecko && Dom.inDocument(this.get("element"))) {
+            
+                me = this;
+                sClass = this.CSS_CLASS_NAME;                
+
+                this.removeClass(sClass);
+                
+                window.setTimeout(function () {
+                
+                    me.addClass(sClass);
+                
+                }, 0);
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method _setTabIndex
+        * @description Sets the value of the button's "tabindex" attribute.
+        * @protected
+        * @param {Number} p_nTabIndex Number indicating the value for the 
+        * button's "tabindex" attribute.
+        */
+        _setTabIndex: function (p_nTabIndex) {
+        
+            this._button.tabIndex = p_nTabIndex;
+        
+        },
+        
+        
+        /**
+        * @method _setTitle
+        * @description Sets the value of the button's "title" attribute.
+        * @protected
+        * @param {String} p_nTabIndex Number indicating the value for 
+        * the button's "title" attribute.
+        */
+        _setTitle: function (p_sTitle) {
+        
+            var sTitle = p_sTitle;
+        
+            if (this.get("type") != "link") {
+        
+                if (!sTitle) {
+        
+                    switch (this.get("type")) {
+        
+                    case "radio":
+    
+                        sTitle = this.RADIO_DEFAULT_TITLE;
+    
+                        break;
+    
+                    case "checkbox":
+    
+                        sTitle = this.CHECKBOX_DEFAULT_TITLE;
+    
+                        break;
+                    
+                    case "menu":
+    
+                        sTitle = this.MENUBUTTON_DEFAULT_TITLE;
+    
+                        break;
+    
+                    case "split":
+    
+                        sTitle = this.SPLITBUTTON_DEFAULT_TITLE;
+    
+                        break;
+    
+                    case "submit":
+    
+                        sTitle = this.SUBMIT_TITLE;
+    
+                        break;
+        
+                    }
+        
+                }
+        
+                this._button.title = sTitle;
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _setDisabled
+        * @description Sets the value of the button's "disabled" attribute.
+        * @protected
+        * @param {Boolean} p_bDisabled Boolean indicating the value for 
+        * the button's "disabled" attribute.
+        */
+        _setDisabled: function (p_bDisabled) {
+        
+            if (this.get("type") != "link") {
+        
+                if (p_bDisabled) {
+        
+                    if (this._menu) {
+        
+                        this._menu.hide();
+        
+                    }
+        
+                    if (this.hasFocus()) {
+                    
+                        this.blur();
+                    
+                    }
+        
+                    this._button.setAttribute("disabled", "disabled");
+        
+                    this.addStateCSSClasses("disabled");
+
+                    this.removeStateCSSClasses("hover");
+                    this.removeStateCSSClasses("active");
+                    this.removeStateCSSClasses("focus");
+        
+                }
+                else {
+        
+                    this._button.removeAttribute("disabled");
+        
+                    this.removeStateCSSClasses("disabled");
+                
+                }
+        
+            }
+        
+        },
+
+        
+        /**
+        * @method _setHref
+        * @description Sets the value of the button's "href" attribute.
+        * @protected
+        * @param {String} p_sHref String indicating the value for the button's 
+        * "href" attribute.
+        */
+        _setHref: function (p_sHref) {
+        
+            if (this.get("type") == "link") {
+        
+                this._button.href = p_sHref;
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method _setTarget
+        * @description Sets the value of the button's "target" attribute.
+        * @protected
+        * @param {String} p_sTarget String indicating the value for the button's 
+        * "target" attribute.
+        */
+        _setTarget: function (p_sTarget) {
+        
+            if (this.get("type") == "link") {
+        
+                this._button.setAttribute("target", p_sTarget);
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method _setChecked
+        * @description Sets the value of the button's "target" attribute.
+        * @protected
+        * @param {Boolean} p_bChecked Boolean indicating the value for  
+        * the button's "checked" attribute.
+        */
+        _setChecked: function (p_bChecked) {
+        
+            var sType = this.get("type"),
+                sTitle;
+        
+            if (sType == "checkbox" || sType == "radio") {
+        
+                if (p_bChecked) {
+        
+                    this.addStateCSSClasses("checked");
+                    
+                    sTitle = (sType == "radio") ? 
+                                this.RADIO_CHECKED_TITLE : 
+                                this.CHECKBOX_CHECKED_TITLE;
+                
+                }
+                else {
+
+                    this.removeStateCSSClasses("checked");
+        
+                    sTitle = (sType == "radio") ? 
+                                this.RADIO_DEFAULT_TITLE : 
+                                this.CHECKBOX_DEFAULT_TITLE;
+                
+                }
+        
+                this.set("title", sTitle);
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _setMenu
+        * @description Sets the value of the button's "menu" attribute.
+        * @protected
+        * @param {Object} p_oMenu Object indicating the value for the button's 
+        * "menu" attribute.
+        */
+        _setMenu: function (p_oMenu) {
+
+            var bLazyLoad = this.get("lazyloadmenu"),
+                oButtonElement = this.get("element"),
+                sMenuCSSClassName,
+        
+                /*
+                    Boolean indicating if the value of p_oMenu is an instance 
+                    of YAHOO.widget.Menu or YAHOO.widget.Overlay.
+                */
+        
+                bInstance = false,
+        
+
+                oMenu,
+                oMenuElement,
+                oSrcElement,
+                aItems,
+                nItems,
+                oItem,
+                i;
+        
+        
+            if (!Overlay) {
+        
+                this.logger.log("YAHOO.widget.Overlay dependency not met.", 
+                    "error");
+        
+                return false;
+            
+            }
+
+
+            if (Menu) {
+            
+                sMenuCSSClassName = Menu.prototype.CSS_CLASS_NAME;
+            
+            }
+        
+        
+            function onAppendTo() {
+
+                oMenu.render(oButtonElement.parentNode);
+                
+                this.removeListener("appendTo", onAppendTo);
+            
+            }
+        
+        
+            function initMenu() {
+        
+                if (oMenu) {
+
+                    Dom.addClass(oMenu.element, this.get("menuclassname"));
+                    Dom.addClass(oMenu.element, 
+                            "yui-" + this.get("type") + "-button-menu");
+
+                    oMenu.showEvent.subscribe(this._onMenuShow, null, this);
+                    oMenu.hideEvent.subscribe(this._onMenuHide, null, this);
+                    oMenu.renderEvent.subscribe(this._onMenuRender, null, this);
+        
+        
+                    if (Menu && oMenu instanceof Menu) {
+        
+                        oMenu.keyDownEvent.subscribe(this._onMenuKeyDown, 
+                            this, true);
+
+                        oMenu.subscribe("click", this._onMenuClick, 
+                            this, true);
+
+                        oMenu.itemAddedEvent.subscribe(this._onMenuItemAdded, 
+                            this, true);
+        
+                        oSrcElement = oMenu.srcElement;
+        
+                        if (oSrcElement && 
+                            oSrcElement.nodeName.toUpperCase() == "SELECT") {
+                
+                            oSrcElement.style.display = "none";
+                            oSrcElement.parentNode.removeChild(oSrcElement);
+        
+                        }
+        
+                    }
+                    else if (Overlay && oMenu instanceof Overlay) {
+        
+                        if (!m_oOverlayManager) {
+        
+                            m_oOverlayManager = 
+                                new YAHOO.widget.OverlayManager();
+                        
+                        }
+                        
+                        m_oOverlayManager.register(oMenu);
+                        
+                    }
+        
+        
+                    this._menu = oMenu;
+
+        
+                    if (!bInstance) {
+        
+                        if (bLazyLoad && Menu && !(oMenu instanceof Menu)) {
+        
+                            /*
+                                Mimic Menu's "lazyload" functionality by adding  
+                                a "beforeshow" event listener that renders the 
+                                Overlay instance before it is made visible by  
+                                the button.
+                            */
+        
+                            oMenu.beforeShowEvent.subscribe(
+                                this._onOverlayBeforeShow, null, this);
+            
+                        }
+                        else if (!bLazyLoad) {
+        
+                            if (Dom.inDocument(oButtonElement)) {
+        
+                                oMenu.render(oButtonElement.parentNode);
+                            
+                            }
+                            else {
+            
+                                this.on("appendTo", onAppendTo);
+                            
+                            }
+                        
+                        }
+                    
+                    }
+        
+                }
+        
+            }
+        
+        
+            if (p_oMenu && Menu && (p_oMenu instanceof Menu)) {
+        
+                oMenu = p_oMenu;
+                aItems = oMenu.getItems();
+                nItems = aItems.length;
+                bInstance = true;
+        
+        
+                if (nItems > 0) {
+        
+                    i = nItems - 1;
+        
+                    do {
+        
+                        oItem = aItems[i];
+        
+                        if (oItem) {
+        
+                            oItem.cfg.subscribeToConfigEvent("selected", 
+                                this._onMenuItemSelected, 
+                                oItem, 
+                                this);
+        
+                        }
+        
+                    }
+                    while (i--);
+        
+                }
+        
+                initMenu.call(this);
+        
+            }
+            else if (Overlay && p_oMenu && (p_oMenu instanceof Overlay)) {
+        
+                oMenu = p_oMenu;
+                bInstance = true;
+        
+                oMenu.cfg.setProperty("visible", false);
+                oMenu.cfg.setProperty("context", [oButtonElement, "tl", "bl"]);
+        
+                initMenu.call(this);
+        
+            }
+            else if (Menu && Lang.isArray(p_oMenu)) {
+        
+                this.on("appendTo", function () {
+        
+                    oMenu = new Menu(Dom.generateId(), { lazyload: bLazyLoad, 
+                        itemdata: p_oMenu });
+        
+                    initMenu.call(this);
+        
+                });
+        
+            }
+            else if (Lang.isString(p_oMenu)) {
+        
+                oMenuElement = Dom.get(p_oMenu);
+        
+                if (oMenuElement) {
+        
+                    if (Menu && Dom.hasClass(oMenuElement, sMenuCSSClassName) || 
+                        oMenuElement.nodeName.toUpperCase() == "SELECT") {
+            
+                        oMenu = new Menu(p_oMenu, { lazyload: bLazyLoad });
+            
+                        initMenu.call(this);
+            
+                    }
+                    else if (Overlay) {
+        
+                        oMenu = new Overlay(p_oMenu, { visible: false, 
+                            context: [oButtonElement, "tl", "bl"] });
+            
+                        initMenu.call(this);
+            
+                    }
+        
+                }
+        
+            }
+            else if (p_oMenu && p_oMenu.nodeName) {
+        
+                if (Menu && Dom.hasClass(p_oMenu, sMenuCSSClassName) || 
+                        p_oMenu.nodeName.toUpperCase() == "SELECT") {
+        
+                    oMenu = new Menu(p_oMenu, { lazyload: bLazyLoad });
+                
+                    initMenu.call(this);
+        
+                }
+                else if (Overlay) {
+        
+                    if (!p_oMenu.id) {
+                    
+                        Dom.generateId(p_oMenu);
+                    
+                    }
+        
+                    oMenu = new Overlay(p_oMenu, { visible: false, 
+                                    context: [oButtonElement, "tl", "bl"] });
+        
+                    initMenu.call(this);
+                
+                }
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method _setOnClick
+        * @description Sets the value of the button's "onclick" attribute.
+        * @protected
+        * @param {Object} p_oObject Object indicating the value for the button's 
+        * "onclick" attribute.
+        */
+        _setOnClick: function (p_oObject) {
+        
+            /*
+                Remove any existing listeners if a "click" event handler 
+                has already been specified.
+            */
+        
+            if (this._onclickAttributeValue && 
+                (this._onclickAttributeValue != p_oObject)) {
+        
+                this.removeListener("click", this._onclickAttributeValue.fn);
+        
+                this._onclickAttributeValue = null;
+        
+            }
+        
+        
+            if (!this._onclickAttributeValue && 
+                Lang.isObject(p_oObject) && 
+                Lang.isFunction(p_oObject.fn)) {
+        
+                this.on("click", p_oObject.fn, p_oObject.obj, p_oObject.scope);
+        
+                this._onclickAttributeValue = p_oObject;
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _setSelectedMenuItem
+        * @description Sets the value of the button's 
+        * "selectedMenuItem" attribute.
+        * @protected
+        * @param {Number} p_nIndex Number representing the index of the item 
+        * in the button's menu that is currently selected.
+        */
+        _setSelectedMenuItem: function (p_nIndex) {
+
+            var oMenu = this._menu,
+                oMenuItem;
+
+
+            if (Menu && oMenu && oMenu instanceof Menu) {
+
+                oMenuItem = oMenu.getItem(p_nIndex);
+                
+
+                if (oMenuItem && !oMenuItem.cfg.getProperty("selected")) {
+                
+                    oMenuItem.cfg.setProperty("selected", true);
+                
+                }
+            
+            }
+
+        },
+        
+        
+        // Protected methods
+
+        
+        
+        /**
+        * @method _isActivationKey
+        * @description Determines if the specified keycode is one that toggles  
+        * the button's "active" state.
+        * @protected
+        * @param {Number} p_nKeyCode Number representing the keycode to 
+        * be evaluated.
+        * @return {Boolean}
+        */
+        _isActivationKey: function (p_nKeyCode) {
+        
+            var sType = this.get("type"),
+                aKeyCodes = (sType == "checkbox" || sType == "radio") ? 
+                    this.CHECK_ACTIVATION_KEYS : this.ACTIVATION_KEYS,
+        
+                nKeyCodes = aKeyCodes.length,
+                i;
+        
+            if (nKeyCodes > 0) {
+        
+                i = nKeyCodes - 1;
+        
+                do {
+        
+                    if (p_nKeyCode == aKeyCodes[i]) {
+        
+                        return true;
+        
+                    }
+        
+                }
+                while (i--);
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method _isSplitButtonOptionKey
+        * @description Determines if the specified keycode is one that toggles  
+        * the display of the split button's menu.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        * @return {Boolean}
+        */
+        _isSplitButtonOptionKey: function (p_oEvent) {
+        
+            return (p_oEvent.ctrlKey && p_oEvent.shiftKey && 
+                Event.getCharCode(p_oEvent) == 77);
+        
+        },
+        
+        
+        /**
+        * @method _addListenersToForm
+        * @description Adds event handlers to the button's form.
+        * @protected
+        */
+        _addListenersToForm: function () {
+        
+            var oForm = this.getForm(),
+                onFormKeyPress = YAHOO.widget.Button.onFormKeyPress,
+                bHasKeyPressListener,
+                oSrcElement,
+                aListeners,
+                nListeners,
+                i;
+        
+        
+            if (oForm) {
+        
+                Event.on(oForm, "reset", this._onFormReset, null, this);
+                Event.on(oForm, "submit", this.createHiddenFields, null, this);
+        
+                oSrcElement = this.get("srcelement");
+        
+        
+                if (this.get("type") == "submit" || 
+                    (oSrcElement && oSrcElement.type == "submit")) 
+                {
+                
+                    aListeners = Event.getListeners(oForm, "keypress");
+                    bHasKeyPressListener = false;
+            
+                    if (aListeners) {
+            
+                        nListeners = aListeners.length;
+        
+                        if (nListeners > 0) {
+            
+                            i = nListeners - 1;
+                            
+                            do {
+               
+                                if (aListeners[i].fn == onFormKeyPress) {
+                
+                                    bHasKeyPressListener = true;
+                                    break;
+                                
+                                }
+                
+                            }
+                            while (i--);
+                        
+                        }
+                    
+                    }
+            
+            
+                    if (!bHasKeyPressListener) {
+               
+                        Event.on(oForm, "keypress", onFormKeyPress);
+            
+                    }
+        
+                }
+            
+            }
+        
+        },
+        
+        
+        
+        /**
+        * @method _showMenu
+        * @description Shows the button's menu.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object 
+        * passed back by the event utility (YAHOO.util.Event) that triggered 
+        * the display of the menu.
+        */
+        _showMenu: function (p_oEvent) {
+
+            if (YAHOO.widget.MenuManager) {
+
+                YAHOO.widget.MenuManager.hideVisible();
+            
+            }
+
+        
+            if (m_oOverlayManager) {
+        
+                m_oOverlayManager.hideAll();
+            
+            }
+
+
+            var nViewportOffset = Overlay.VIEWPORT_OFFSET,   
+        
+                oMenu = this._menu,
+                oButton = this,
+                oButtonEL = oButton.get("element"),
+                bMenuFlipped = false,
+                nButtonY = Dom.getY(oButtonEL),
+                nScrollTop = Dom.getDocumentScrollTop(),
+                nMenuMinScrollHeight,
+                nMenuHeight,
+                oMenuShadow;
+    
+    
+            if (nScrollTop) {
+        
+                nButtonY = nButtonY - nScrollTop;
+        
+            }
+        
+        
+            var nTopRegion = nButtonY,
+                nBottomRegion = (Dom.getViewportHeight() - 
+                    (nButtonY + oButtonEL.offsetHeight));
+        
+
+            /*
+                 Uses the Button's position to calculate the availble height 
+                 above and below it to display its corresponding Menu.
+            */
+        
+            function getMenuDisplayRegionHeight() {
+        
+                if (bMenuFlipped) {
+        
+                    return (nTopRegion - nViewportOffset);
+        
+                }
+                else {
+        
+                    return (nBottomRegion - nViewportOffset);
+        
+                }
+        
+            }
+
+    
+    
+            /*
+                Sets the Menu's "maxheight" configuration property and trys to 
+                place the Menu in the best possible position (either above or 
+                below its corresponding Button).
+            */
+        
+            function sizeAndPositionMenu() {
+        
+                var nDisplayRegionHeight = getMenuDisplayRegionHeight();
+        
+        
+                if (nMenuHeight > nDisplayRegionHeight) {
+        
+                    nMenuMinScrollHeight = oMenu.cfg.getProperty("minscrollheight");
+        
+        
+                    if (nDisplayRegionHeight > nMenuMinScrollHeight) {
+        
+                        oMenu.cfg.setProperty("maxheight", 
+                                    nDisplayRegionHeight);
+            
+        
+                        if (bMenuFlipped) {
+                        
+                            oMenu.align("bl", "tl");
+                        
+                        }
+            
+                    }
+            
+        
+                    if (nDisplayRegionHeight < nMenuMinScrollHeight) {
+                   
+                        if (bMenuFlipped) {
+            
+                            /*
+                                 All possible positions and values for the 
+                                 "maxheight" configuration property have been 
+                                 tried, but none were successful, so fall back 
+                                 to the original size and position.
+                            */
+        
+                            oMenu.cfg.setProperty("context", 
+                                [oButtonEL, "tl", "bl"], true);
+
+                            oMenu.align("tl", "bl");
+                            
+                        }
+                        else {
+            
+                            oMenu.cfg.setProperty("context", 
+                                [oButtonEL, "bl", "tl"], true);
+
+                            oMenu.align("bl", "tl");
+            
+                            bMenuFlipped = true;
+            
+                            return sizeAndPositionMenu();
+            
+                        }
+                    
+                    }
+                
+                }
+        
+            }
+
+
+            if (Menu && oMenu && (oMenu instanceof Menu)) {
+        
+                oMenu.cfg.applyConfig({ context: [oButtonEL, "tl", "bl"],
+                    clicktohide: false,
+                    visible: true });
+                    
+                oMenu.cfg.fireQueue();
+                
+                oMenu.cfg.setProperty("maxheight", 0);
+            
+                oMenu.align("tl", "bl");
+        
+        
+                /*
+                    Stop the propagation of the event so that the MenuManager 
+                    doesn't blur the menu after it gets focus.
+                */
+        
+                if (p_oEvent.type == "mousedown") {
+        
+                    Event.stopPropagation(p_oEvent);
+        
+                }
+        
+                
+                nMenuHeight = oMenu.element.offsetHeight;
+                
+                oMenuShadow = oMenu.element.lastChild; 
+        
+                sizeAndPositionMenu();
+        
+                if (this.get("focusmenu")) {
+        
+                    this._menu.focus();
+                
+                }
+
+            }
+            else if (Overlay && oMenu && (oMenu instanceof Overlay)) {
+        
+                oMenu.show();
+                oMenu.align("tl", "bl");
+                
+                var nDisplayRegionHeight = getMenuDisplayRegionHeight();
+
+                nMenuHeight = oMenu.element.offsetHeight;
+
+
+                if (nDisplayRegionHeight < nMenuHeight) {
+
+                    oMenu.align("bl", "tl");
+
+                    bMenuFlipped = true;
+
+                    nDisplayRegionHeight = getMenuDisplayRegionHeight();
+
+                    if (nDisplayRegionHeight < nMenuHeight) {
+
+                        oMenu.align("tl", "bl");
+                    
+                    }
+
+                }
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _hideMenu
+        * @description Hides the button's menu.
+        * @protected
+        */
+        _hideMenu: function () {
+        
+            var oMenu = this._menu;
+        
+            if (oMenu) {
+        
+                oMenu.hide();
+        
+            }
+        
+        },
+        
+        
+        
+        
+        // Protected event handlers
+        
+        
+        /**
+        * @method _onMouseOver
+        * @description "mouseover" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onMouseOver: function (p_oEvent) {
+        
+            if (!this._hasMouseEventHandlers) {
+        
+                this.on("mouseout", this._onMouseOut);
+                this.on("mousedown", this._onMouseDown);
+                this.on("mouseup", this._onMouseUp);
+        
+                this._hasMouseEventHandlers = true;
+        
+            }
+        
+            this.addStateCSSClasses("hover");
+        
+            if (this._activationButtonPressed) {
+        
+                this.addStateCSSClasses("active");
+        
+            }
+        
+        
+            if (this._bOptionPressed) {
+        
+                this.addStateCSSClasses("activeoption");
+            
+            }
+
+
+            if (this._activationButtonPressed || this._bOptionPressed) {
+        
+                Event.removeListener(document, "mouseup", this._onDocumentMouseUp);
+        
+            }
+
+        },
+        
+        
+        /**
+        * @method _onMouseOut
+        * @description "mouseout" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onMouseOut: function (p_oEvent) {
+        
+            this.removeStateCSSClasses("hover");
+        
+            if (this.get("type") != "menu") {
+        
+                this.removeStateCSSClasses("active");
+        
+            }
+        
+            if (this._activationButtonPressed || this._bOptionPressed) {
+        
+                Event.on(document, "mouseup", this._onDocumentMouseUp, 
+                    null, this);
+        
+            }
+            
+        },
+        
+        
+        /**
+        * @method _onDocumentMouseUp
+        * @description "mouseup" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onDocumentMouseUp: function (p_oEvent) {
+        
+            this._activationButtonPressed = false;
+            this._bOptionPressed = false;
+        
+            var sType = this.get("type"),
+                oTarget,
+                oMenuElement;
+        
+            if (sType == "menu" || sType == "split") {
+
+                oTarget = Event.getTarget(p_oEvent);
+                oMenuElement = this._menu.element;
+        
+                if (oTarget != oMenuElement && 
+                    !Dom.isAncestor(oMenuElement, oTarget)) {
+
+                    this.removeStateCSSClasses((sType == "menu" ? 
+                        "active" : "activeoption"));
+            
+                    this._hideMenu();
+
+                }
+        
+            }
+        
+            Event.removeListener(document, "mouseup", this._onDocumentMouseUp);
+        
+        },
+        
+        
+        /**
+        * @method _onMouseDown
+        * @description "mousedown" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onMouseDown: function (p_oEvent) {
+        
+            var sType,
+                oElement,
+                nX,
+                me;
+        
+        
+            function onMouseUp() {
+            
+                this._hideMenu();
+                this.removeListener("mouseup", onMouseUp);
+            
+            }
+        
+        
+            if ((p_oEvent.which || p_oEvent.button) == 1) {
+        
+        
+                if (!this.hasFocus()) {
+                
+                    this.focus();
+                
+                }
+        
+        
+                sType = this.get("type");
+        
+        
+                if (sType == "split") {
+                
+                    oElement = this.get("element");
+                    nX = Event.getPageX(p_oEvent) - Dom.getX(oElement);
+        
+                    if ((oElement.offsetWidth - this.OPTION_AREA_WIDTH) < nX) {
+                        
+                        this.fireEvent("option", p_oEvent);
+        
+                    }
+                    else {
+        
+                        this.addStateCSSClasses("active");
+        
+                        this._activationButtonPressed = true;
+        
+                    }
+        
+                }
+                else if (sType == "menu") {
+        
+                    if (this.isActive()) {
+        
+                        this._hideMenu();
+        
+                        this._activationButtonPressed = false;
+        
+                    }
+                    else {
+        
+                        this._showMenu(p_oEvent);
+        
+                        this._activationButtonPressed = true;
+                    
+                    }
+        
+                }
+                else {
+        
+                    this.addStateCSSClasses("active");
+        
+                    this._activationButtonPressed = true;
+                
+                }
+        
+        
+        
+                if (sType == "split" || sType == "menu") {
+
+                    me = this;
+        
+                    this._hideMenuTimerId = window.setTimeout(function () {
+                    
+                        me.on("mouseup", onMouseUp);
+                    
+                    }, 250);
+        
+                }
+        
+            }
+            
+        },
+        
+        
+        /**
+        * @method _onMouseUp
+        * @description "mouseup" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onMouseUp: function (p_oEvent) {
+        
+            var sType = this.get("type");
+        
+        
+            if (this._hideMenuTimerId) {
+        
+                window.clearTimeout(this._hideMenuTimerId);
+        
+            }
+        
+        
+            if (sType == "checkbox" || sType == "radio") {
+        
+                this.set("checked", !(this.get("checked")));
+            
+            }
+        
+        
+            this._activationButtonPressed = false;
+            
+        
+            if (this.get("type") != "menu") {
+        
+                this.removeStateCSSClasses("active");
+            
+            }
+            
+        },
+        
+        
+        /**
+        * @method _onFocus
+        * @description "focus" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onFocus: function (p_oEvent) {
+        
+            var oElement;
+        
+            this.addStateCSSClasses("focus");
+        
+            if (this._activationKeyPressed) {
+        
+                this.addStateCSSClasses("active");
+           
+            }
+        
+            m_oFocusedButton = this;
+        
+        
+            if (!this._hasKeyEventHandlers) {
+        
+                oElement = this._button;
+        
+                Event.on(oElement, "blur", this._onBlur, null, this);
+                Event.on(oElement, "keydown", this._onKeyDown, null, this);
+                Event.on(oElement, "keyup", this._onKeyUp, null, this);
+        
+                this._hasKeyEventHandlers = true;
+        
+            }
+        
+        
+            this.fireEvent("focus", p_oEvent);
+        
+        },
+        
+        
+        /**
+        * @method _onBlur
+        * @description "blur" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onBlur: function (p_oEvent) {
+        
+            this.removeStateCSSClasses("focus");
+        
+            if (this.get("type") != "menu") {
+        
+                this.removeStateCSSClasses("active");
+
+            }    
+        
+            if (this._activationKeyPressed) {
+        
+                Event.on(document, "keyup", this._onDocumentKeyUp, null, this);
+        
+            }
+        
+        
+            m_oFocusedButton = null;
+        
+            this.fireEvent("blur", p_oEvent);
+           
+        },
+        
+        
+        /**
+        * @method _onDocumentKeyUp
+        * @description "keyup" event handler for the document.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onDocumentKeyUp: function (p_oEvent) {
+        
+            if (this._isActivationKey(Event.getCharCode(p_oEvent))) {
+        
+                this._activationKeyPressed = false;
+                
+                Event.removeListener(document, "keyup", this._onDocumentKeyUp);
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onKeyDown
+        * @description "keydown" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onKeyDown: function (p_oEvent) {
+        
+            var oMenu = this._menu;
+        
+        
+            if (this.get("type") == "split" && 
+                this._isSplitButtonOptionKey(p_oEvent)) {
+        
+                this.fireEvent("option", p_oEvent);
+        
+            }
+            else if (this._isActivationKey(Event.getCharCode(p_oEvent))) {
+        
+                if (this.get("type") == "menu") {
+        
+                    this._showMenu(p_oEvent);
+        
+                }
+                else {
+        
+                    this._activationKeyPressed = true;
+                    
+                    this.addStateCSSClasses("active");
+                
+                }
+            
+            }
+        
+        
+            if (oMenu && oMenu.cfg.getProperty("visible") && 
+                Event.getCharCode(p_oEvent) == 27) {
+            
+                oMenu.hide();
+                this.focus();
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onKeyUp
+        * @description "keyup" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onKeyUp: function (p_oEvent) {
+        
+            var sType;
+        
+            if (this._isActivationKey(Event.getCharCode(p_oEvent))) {
+        
+                sType = this.get("type");
+        
+                if (sType == "checkbox" || sType == "radio") {
+        
+                    this.set("checked", !(this.get("checked")));
+                
+                }
+        
+                this._activationKeyPressed = false;
+        
+                if (this.get("type") != "menu") {
+        
+                    this.removeStateCSSClasses("active");
+        
+                }
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onClick
+        * @description "click" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onClick: function (p_oEvent) {
+        
+            var sType = this.get("type"),
+                sTitle,
+                oForm,
+                oSrcElement,
+                oElement,
+                nX;
+        
+        
+            switch (sType) {
+        
+            case "radio":
+            case "checkbox":
+    
+                if (this.get("checked")) {
+                    
+                    sTitle = (sType == "radio") ? 
+                                this.RADIO_CHECKED_TITLE : 
+                                this.CHECKBOX_CHECKED_TITLE;
+                
+                }
+                else {
+                
+                    sTitle = (sType == "radio") ? 
+                                this.RADIO_DEFAULT_TITLE : 
+                                this.CHECKBOX_DEFAULT_TITLE;
+                
+                }
+                
+                this.set("title", sTitle);
+    
+                break;
+    
+            case "submit":
+    
+                this.submitForm();
+            
+                break;
+    
+            case "reset":
+    
+                oForm = this.getForm();
+    
+                if (oForm) {
+    
+                    oForm.reset();
+                
+                }
+    
+                break;
+    
+            case "menu":
+    
+                sTitle = this._menu.cfg.getProperty("visible") ? 
+                                this.MENUBUTTON_MENU_VISIBLE_TITLE : 
+                                this.MENUBUTTON_DEFAULT_TITLE;
+    
+                this.set("title", sTitle);
+    
+                break;
+    
+            case "split":
+    
+                oElement = this.get("element");
+                nX = Event.getPageX(p_oEvent) - Dom.getX(oElement);
+    
+                if ((oElement.offsetWidth - this.OPTION_AREA_WIDTH) < nX) {
+    
+                    return false;
+                
+                }
+                else {
+    
+                    this._hideMenu();
+        
+                    oSrcElement = this.get("srcelement");
+        
+                    if (oSrcElement && oSrcElement.type == "submit") {
+    
+                        this.submitForm();
+                    
+                    }
+                
+                }
+    
+                sTitle = this._menu.cfg.getProperty("visible") ? 
+                                this.SPLITBUTTON_OPTION_VISIBLE_TITLE : 
+                                this.SPLITBUTTON_DEFAULT_TITLE;
+    
+                this.set("title", sTitle);
+    
+                break;
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onAppendTo
+        * @description "appendTo" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onAppendTo: function (p_oEvent) {
+        
+            /*
+                It is necessary to call "_addListenersToForm" using 
+                "setTimeout" to make sure that the button's "form" property 
+                returns a node reference.  Sometimes, if you try to get the 
+                reference immediately after appending the field, it is null.
+            */
+        
+            var me = this;
+        
+            window.setTimeout(function () {
+        
+                me._addListenersToForm();
+        
+            }, 0);
+        
+        },
+        
+        
+        /**
+        * @method _onFormReset
+        * @description "reset" event handler for the button's form.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event 
+        * object passed back by the event utility (YAHOO.util.Event).
+        */
+        _onFormReset: function (p_oEvent) {
+        
+            var sType = this.get("type"),
+                oMenu = this._menu;
+        
+            if (sType == "checkbox" || sType == "radio") {
+        
+                this.resetValue("checked");
+        
+            }
+        
+        
+            if (Menu && oMenu && (oMenu instanceof Menu)) {
+        
+                this.resetValue("selectedMenuItem");
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onDocumentMouseDown
+        * @description "mousedown" event handler for the document.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onDocumentMouseDown: function (p_oEvent) {
+
+            var oTarget = Event.getTarget(p_oEvent),
+                oButtonElement = this.get("element"),
+                oMenuElement = this._menu.element;
+           
+        
+            if (oTarget != oButtonElement && 
+                !Dom.isAncestor(oButtonElement, oTarget) && 
+                oTarget != oMenuElement && 
+                !Dom.isAncestor(oMenuElement, oTarget)) {
+        
+                this._hideMenu();
+        
+                Event.removeListener(document, "mousedown", 
+                    this._onDocumentMouseDown);    
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onOption
+        * @description "option" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onOption: function (p_oEvent) {
+        
+            if (this.hasClass("yui-split-button-activeoption")) {
+        
+                this._hideMenu();
+        
+                this._bOptionPressed = false;
+        
+            }
+            else {
+        
+                this._showMenu(p_oEvent);    
+        
+                this._bOptionPressed = true;
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onOverlayBeforeShow
+        * @description "beforeshow" event handler for the 
+        * <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a> instance 
+        * serving as the button's menu.
+        * @private
+        * @param {String} p_sType String representing the name of the event  
+        * that was fired.
+        */
+        _onOverlayBeforeShow: function (p_sType) {
+        
+            var oMenu = this._menu;
+        
+            oMenu.render(this.get("element").parentNode);
+            
+            oMenu.beforeShowEvent.unsubscribe(this._onOverlayBeforeShow);
+        
+        },
+        
+        
+        /**
+        * @method _onMenuShow
+        * @description "show" event handler for the button's menu.
+        * @private
+        * @param {String} p_sType String representing the name of the event  
+        * that was fired.
+        */
+        _onMenuShow: function (p_sType) {
+        
+            Event.on(document, "mousedown", this._onDocumentMouseDown, 
+                null, this);
+        
+            var sTitle,
+                sState;
+            
+            if (this.get("type") == "split") {
+        
+                sTitle = this.SPLITBUTTON_OPTION_VISIBLE_TITLE;
+                sState = "activeoption";
+            
+            }
+            else {
+        
+                sTitle = this.MENUBUTTON_MENU_VISIBLE_TITLE;        
+                sState = "active";
+        
+            }
+        
+            this.addStateCSSClasses(sState);
+            this.set("title", sTitle);
+        
+        },
+        
+        
+        /**
+        * @method _onMenuHide
+        * @description "hide" event handler for the button's menu.
+        * @private
+        * @param {String} p_sType String representing the name of the event  
+        * that was fired.
+        */
+        _onMenuHide: function (p_sType) {
+            
+            var oMenu = this._menu,
+                sTitle,
+                sState;
+        
+            
+            if (this.get("type") == "split") {
+        
+                sTitle = this.SPLITBUTTON_DEFAULT_TITLE;
+                sState = "activeoption";
+        
+            }
+            else {
+        
+                sTitle = this.MENUBUTTON_DEFAULT_TITLE;        
+                sState = "active";
+            }
+        
+        
+            this.removeStateCSSClasses(sState);
+            this.set("title", sTitle);
+        
+        
+            if (this.get("type") == "split") {
+        
+                this._bOptionPressed = false;
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onMenuKeyDown
+        * @description "keydown" event handler for the button's menu.
+        * @private
+        * @param {String} p_sType String representing the name of the event  
+        * that was fired.
+        * @param {Array} p_aArgs Array of arguments sent when the event 
+        * was fired.
+        */
+        _onMenuKeyDown: function (p_sType, p_aArgs) {
+        
+            var oEvent = p_aArgs[0];
+        
+            if (Event.getCharCode(oEvent) == 27) {
+        
+                this.focus();
+        
+                if (this.get("type") == "split") {
+                
+                    this._bOptionPressed = false;
+                
+                }
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onMenuRender
+        * @description "render" event handler for the button's menu.
+        * @private
+        * @param {String} p_sType String representing the name of the  
+        * event thatwas fired.
+        */
+        _onMenuRender: function (p_sType) {
+        
+            var oButtonElement = this.get("element"),
+                oButtonParent = oButtonElement.parentNode,
+                oMenuElement = this._menu.element;
+        
+        
+            if (oButtonParent != oMenuElement.parentNode) {
+        
+                oButtonParent.appendChild(oMenuElement);
+            
+            }
+
+            this.set("selectedMenuItem", this.get("selectedMenuItem"));
+
+        },
+        
+        
+        /**
+        * @method _onMenuItemSelected
+        * @description "selectedchange" event handler for each item in the 
+        * button's menu.
+        * @private
+        * @param {String} p_sType String representing the name of the event  
+        * that was fired.
+        * @param {Array} p_aArgs Array of arguments sent when the event 
+        * was fired.
+        * @param {MenuItem} p_oItem Object representing the menu item that
+        * subscribed to the event.
+        */
+        _onMenuItemSelected: function (p_sType, p_aArgs, p_oItem) {
+
+            var bSelected = p_aArgs[0];
+
+            if (bSelected) {
+            
+                this.set("selectedMenuItem", p_oItem);
+
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onMenuItemAdded
+        * @description "itemadded" event handler for the button's menu.
+        * @private
+        * @param {String} p_sType String representing the name of the event  
+        * that was fired.
+        * @param {Array} p_aArgs Array of arguments sent when the event
+        * was fired.
+        * @param {<a href="YAHOO.widget.MenuItem.html">
+        * YAHOO.widget.MenuItem</a>} p_oItem Object representing the menu 
+        * item that subscribed to the event.
+        */
+        _onMenuItemAdded: function (p_sType, p_aArgs, p_oItem) {
+            
+            var oItem = p_aArgs[0];
+        
+            oItem.cfg.subscribeToConfigEvent("selected", 
+                this._onMenuItemSelected, oItem, this);
+        
+        },
+        
+        
+        /**
+        * @method _onMenuClick
+        * @description "click" event handler for the button's menu.
+        * @private
+        * @param {String} p_sType String representing the name of the event  
+        * that was fired.
+        * @param {Array} p_aArgs Array of arguments sent when the event 
+        * was fired.
+        */
+        _onMenuClick: function (p_sType, p_aArgs) {
+
+            var oItem = p_aArgs[1],
+                oSrcElement;
+        
+            if (oItem) {
+        
+                oSrcElement = this.get("srcelement");
+            
+                if (oSrcElement && oSrcElement.type == "submit") {
+        
+                    this.submitForm();
+            
+                }
+            
+                this._hideMenu();
+            
+            }
+        
+        },
+        
+        
+        
+        // Public methods
+        
+        
+        /**
+        * @method createButtonElement
+        * @description Creates the button's HTML elements.
+        * @param {String} p_sType String indicating the type of element 
+        * to create.
+        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+        * level-one-html.html#ID-58190037">HTMLElement</a>}
+        */
+        createButtonElement: function (p_sType) {
+        
+            var sNodeName = this.NODE_NAME,
+                oElement = document.createElement(sNodeName);
+        
+            oElement.innerHTML =  "<" + sNodeName + " class=\"first-child\">" + 
+                (p_sType == "link" ? "<a></a>" : 
+                "<button type=\"button\"></button>") + "</" + sNodeName + ">";
+        
+            return oElement;
+        
+        },
+
+        
+        /**
+        * @method addStateCSSClasses
+        * @description Appends state-specific CSS classes to the button's root 
+        * DOM element.
+        */
+        addStateCSSClasses: function (p_sState) {
+        
+            var sType = this.get("type");
+        
+            if (Lang.isString(p_sState)) {
+        
+                if (p_sState != "activeoption") {
+        
+                    this.addClass(this.CSS_CLASS_NAME + ("-" + p_sState));
+        
+                }
+        
+                this.addClass("yui-" + sType + ("-button-" + p_sState));
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method removeStateCSSClasses
+        * @description Removes state-specific CSS classes to the button's root 
+        * DOM element.
+        */
+        removeStateCSSClasses: function (p_sState) {
+        
+            var sType = this.get("type");
+        
+            if (Lang.isString(p_sState)) {
+        
+                this.removeClass(this.CSS_CLASS_NAME + ("-" + p_sState));
+                this.removeClass("yui-" + sType + ("-button-" + p_sState));
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method createHiddenFields
+        * @description Creates the button's hidden form field and appends it 
+        * to its parent form.
+        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+        * level-one-html.html#ID-6043025">HTMLInputElement</a>|Array}
+        */
+        createHiddenFields: function () {
+        
+            this.removeHiddenFields();
+        
+            var oForm = this.getForm(),
+                oButtonField,
+                sType,     
+                bCheckable,
+                oMenu,
+                oMenuItem,
+                sName,
+                oValue,
+                oMenuField;
+        
+        
+            if (oForm && !this.get("disabled")) {
+        
+                sType = this.get("type");
+                bCheckable = (sType == "checkbox" || sType == "radio");
+        
+        
+                if (bCheckable || (m_oSubmitTrigger == this)) {
+                
+                    this.logger.log("Creating hidden field.");
+        
+                    oButtonField = createInputElement(
+                                    (bCheckable ? sType : "hidden"),
+                                    this.get("name"),
+                                    this.get("value"),
+                                    this.get("checked"));
+            
+            
+                    if (oButtonField) {
+            
+                        if (bCheckable) {
+            
+                            oButtonField.style.display = "none";
+            
+                        }
+            
+                        oForm.appendChild(oButtonField);
+            
+                    }
+        
+                }
+                    
+        
+                oMenu = this._menu;
+            
+            
+                if (Menu && oMenu && (oMenu instanceof Menu)) {
+        
+                    this.logger.log("Creating hidden field for menu.");
+        
+                    oMenuField = oMenu.srcElement;
+                    oMenuItem = this.get("selectedMenuItem");
+
+                    if (oMenuItem) {
+
+                        if (oMenuField && 
+                            oMenuField.nodeName.toUpperCase() == "SELECT") {
+            
+                            oForm.appendChild(oMenuField);
+                            oMenuField.selectedIndex = oMenuItem.index;
+            
+                        }
+                        else {
+            
+                            oValue = (oMenuItem.value === null || 
+                                        oMenuItem.value === "") ? 
+                                        oMenuItem.cfg.getProperty("text") : 
+                                        oMenuItem.value;
+            
+                            sName = this.get("name");
+            
+                            if (oValue && sName) {
+            
+                                oMenuField = createInputElement("hidden", 
+                                                    (sName + "_options"),
+                                                    oValue);
+            
+                                oForm.appendChild(oMenuField);
+            
+                            }
+            
+                        }  
+                    
+                    }
+        
+                }
+            
+            
+                if (oButtonField && oMenuField) {
+        
+                    this._hiddenFields = [oButtonField, oMenuField];
+        
+                }
+                else if (!oButtonField && oMenuField) {
+        
+                    this._hiddenFields = oMenuField;
+                
+                }
+                else if (oButtonField && !oMenuField) {
+        
+                    this._hiddenFields = oButtonField;
+                
+                }
+        
+        
+                return this._hiddenFields;
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method removeHiddenFields
+        * @description Removes the button's hidden form field(s) from its 
+        * parent form.
+        */
+        removeHiddenFields: function () {
+        
+            var oField = this._hiddenFields,
+                nFields,
+                i;
+        
+            function removeChild(p_oElement) {
+        
+                if (Dom.inDocument(p_oElement)) {
+        
+                    p_oElement.parentNode.removeChild(p_oElement);
+                
+                }
+                
+            }
+            
+        
+            if (oField) {
+        
+                if (Lang.isArray(oField)) {
+        
+                    nFields = oField.length;
+                    
+                    if (nFields > 0) {
+                    
+                        i = nFields - 1;
+                        
+                        do {
+        
+                            removeChild(oField[i]);
+        
+                        }
+                        while (i--);
+                    
+                    }
+                
+                }
+                else {
+        
+                    removeChild(oField);
+        
+                }
+        
+                this._hiddenFields = null;
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method submitForm
+        * @description Submits the form to which the button belongs.  Returns  
+        * true if the form was submitted successfully, false if the submission 
+        * was cancelled.
+        * @protected
+        * @return {Boolean}
+        */
+        submitForm: function () {
+        
+            var oForm = this.getForm(),
+        
+                oSrcElement = this.get("srcelement"),
+        
+                /*
+                    Boolean indicating if the event fired successfully 
+                    (was not cancelled by any handlers)
+                */
+        
+                bSubmitForm = false,
+                
+                oEvent;
+        
+        
+            if (oForm) {
+        
+                if (this.get("type") == "submit" || 
+                    (oSrcElement && oSrcElement.type == "submit")) 
+                {
+        
+                    m_oSubmitTrigger = this;
+                    
+                }
+        
+        
+                if (YAHOO.env.ua.ie) {
+        
+                    bSubmitForm = oForm.fireEvent("onsubmit");
+        
+                }
+                else {  // Gecko, Opera, and Safari
+        
+                    oEvent = document.createEvent("HTMLEvents");
+                    oEvent.initEvent("submit", true, true);
+        
+                    bSubmitForm = oForm.dispatchEvent(oEvent);
+        
+                }
+        
+        
+                /*
+                    In IE and Safari, dispatching a "submit" event to a form 
+                    WILL cause the form's "submit" event to fire, but WILL NOT 
+                    submit the form.  Therefore, we need to call the "submit" 
+                    method as well.
+                */
+              
+                if ((YAHOO.env.ua.ie || YAHOO.env.ua.webkit) && bSubmitForm) {
+        
+                    oForm.submit();
+                
+                }
+            
+            }
+        
+            return bSubmitForm;
+            
+        },
+        
+        
+        /**
+        * @method init
+        * @description The Button class's initialization method.
+        * @param {String} p_oElement String specifying the id attribute of the 
+        * <code><input></code>, <code><button></code>,
+        * <code><a></code>, or <code><span></code> element to 
+        * be used to create the button.
+        * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+        * level-one-html.html#ID-6043025">HTMLInputElement</a>|<a href="http://
+        * www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html
+        * #ID-34812697">HTMLButtonElement</a>|<a href="http://www.w3.org/TR
+        * /2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-33759296">
+        * HTMLElement</a>} p_oElement Object reference for the 
+        * <code><input></code>, <code><button></code>, 
+        * <code><a></code>, or <code><span></code> element to be 
+        * used to create the button.
+        * @param {Object} p_oElement Object literal specifying a set of 
+        * configuration attributes used to create the button.
+        * @param {Object} p_oAttributes Optional. Object literal specifying a 
+        * set of configuration attributes used to create the button.
+        */
+        init: function (p_oElement, p_oAttributes) {
+        
+            var sNodeName = p_oAttributes.type == "link" ? "a" : "button",
+                oSrcElement = p_oAttributes.srcelement,
+                oButton = p_oElement.getElementsByTagName(sNodeName)[0],
+                oInput;
+        
+
+            if (!oButton) {
+
+                oInput = p_oElement.getElementsByTagName("input")[0];
+
+
+                if (oInput) {
+
+                    oButton = document.createElement("button");
+                    oButton.setAttribute("type", "button");
+
+                    oInput.parentNode.replaceChild(oButton, oInput);
+                
+                }
+
+            }
+
+            this._button = oButton;
+        
+
+            YAHOO.widget.Button.superclass.init.call(this, p_oElement, 
+                p_oAttributes);
+        
+        
+            m_oButtons[this.get("id")] = this;
+        
+        
+            this.addClass(this.CSS_CLASS_NAME);
+            
+            this.addClass("yui-" + this.get("type") + "-button");
+        
+            Event.on(this._button, "focus", this._onFocus, null, this);
+            this.on("mouseover", this._onMouseOver);
+            this.on("click", this._onClick);
+            this.on("appendTo", this._onAppendTo);
+            
+        
+            var oContainer = this.get("container"),
+                oElement = this.get("element"),
+                bElInDoc = Dom.inDocument(oElement),
+                oParentNode;
+
+
+            if (oContainer) {
+        
+                if (oSrcElement && oSrcElement != oElement) {
+                
+                    oParentNode = oSrcElement.parentNode;
+
+                    if (oParentNode) {
+                    
+                        oParentNode.removeChild(oSrcElement);
+                    
+                    }
+
+                }
+        
+                if (Lang.isString(oContainer)) {
+        
+                    Event.onContentReady(oContainer, function () {
+        
+                        this.appendTo(oContainer);
+                    
+                    }, null, this);
+        
+                }
+                else {
+        
+                    this.appendTo(oContainer);
+        
+                }
+        
+            }
+            else if (!bElInDoc && oSrcElement && oSrcElement != oElement) {
+
+                oParentNode = oSrcElement.parentNode;
+        
+                if (oParentNode) {
+        
+                    this.fireEvent("beforeAppendTo", {
+                        type: "beforeAppendTo",
+                        target: oParentNode
+                    });
+            
+                    oParentNode.replaceChild(oElement, oSrcElement);
+            
+                    this.fireEvent("appendTo", {
+                        type: "appendTo",
+                        target: oParentNode
+                    });
+                
+                }
+        
+            }
+            else if (this.get("type") != "link" && bElInDoc && oSrcElement && 
+                oSrcElement == oElement) {
+        
+                this._addListenersToForm();
+        
+            }
+        
+            this.logger.log("Initialization completed.");
+        
+        },
+        
+        
+        /**
+        * @method initAttributes
+        * @description Initializes all of the configuration attributes used to  
+        * create the button.
+        * @param {Object} p_oAttributes Object literal specifying a set of 
+        * configuration attributes used to create the button.
+        */
+        initAttributes: function (p_oAttributes) {
+        
+            var oAttributes = p_oAttributes || {};
+        
+            YAHOO.widget.Button.superclass.initAttributes.call(this, 
+                oAttributes);
+        
+        
+            /**
+            * @attribute type
+            * @description String specifying the button's type.  Possible 
+            * values are: "push," "link," "submit," "reset," "checkbox," 
+            * "radio," "menu," and "split."
+            * @default "push"
+            * @type String
+            */
+            this.setAttributeConfig("type", {
+        
+                value: (oAttributes.type || "push"),
+                validator: Lang.isString,
+                writeOnce: true,
+                method: this._setType
+        
+            });
+        
+        
+            /**
+            * @attribute label
+            * @description String specifying the button's text label 
+            * or innerHTML.
+            * @default null
+            * @type String
+            */
+            this.setAttributeConfig("label", {
+        
+                value: oAttributes.label,
+                validator: Lang.isString,
+                method: this._setLabel
+        
+            });
+        
+        
+            /**
+            * @attribute value
+            * @description Object specifying the value for the button.
+            * @default null
+            * @type Object
+            */
+            this.setAttributeConfig("value", {
+        
+                value: oAttributes.value
+        
+            });
+        
+        
+            /**
+            * @attribute name
+            * @description String specifying the name for the button.
+            * @default null
+            * @type String
+            */
+            this.setAttributeConfig("name", {
+        
+                value: oAttributes.name,
+                validator: Lang.isString
+        
+            });
+        
+        
+            /**
+            * @attribute tabindex
+            * @description Number specifying the tabindex for the button.
+            * @default null
+            * @type Number
+            */
+            this.setAttributeConfig("tabindex", {
+        
+                value: oAttributes.tabindex,
+                validator: Lang.isNumber,
+                method: this._setTabIndex
+        
+            });
+        
+        
+            /**
+            * @attribute title
+            * @description String specifying the title for the button.
+            * @default null
+            * @type String
+            */
+            this.configureAttribute("title", {
+        
+                value: oAttributes.title,
+                validator: Lang.isString,
+                method: this._setTitle
+        
+            });
+        
+        
+            /**
+            * @attribute disabled
+            * @description Boolean indicating if the button should be disabled.  
+            * (Disabled buttons are dimmed and will not respond to user input 
+            * or fire events.  Does not apply to button's of type "link.")
+            * @default false
+            * @type Boolean
+            */
+            this.setAttributeConfig("disabled", {
+        
+                value: (oAttributes.disabled || false),
+                validator: Lang.isBoolean,
+                method: this._setDisabled
+        
+            });
+        
+        
+            /**
+            * @attribute href
+            * @description String specifying the href for the button.  Applies
+            * only to buttons of type "link."
+            * @type String
+            */
+            this.setAttributeConfig("href", {
+        
+                value: oAttributes.href,
+                validator: Lang.isString,
+                method: this._setHref
+        
+            });
+        
+        
+            /**
+            * @attribute target
+            * @description String specifying the target for the button.  
+            * Applies only to buttons of type "link."
+            * @type String
+            */
+            this.setAttributeConfig("target", {
+        
+                value: oAttributes.target,
+                validator: Lang.isString,
+                method: this._setTarget
+        
+            });
+        
+        
+            /**
+            * @attribute checked
+            * @description Boolean indicating if the button is checked. 
+            * Applies only to buttons of type "radio" and "checkbox."
+            * @default false
+            * @type Boolean
+            */
+            this.setAttributeConfig("checked", {
+        
+                value: (oAttributes.checked || false),
+                validator: Lang.isBoolean,
+                method: this._setChecked
+        
+            });
+        
+        
+            /**
+            * @attribute container
+            * @description HTML element reference or string specifying the id 
+            * attribute of the HTML element that the button's markup should be 
+            * rendered into.
+            * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+            * level-one-html.html#ID-58190037">HTMLElement</a>|String
+            * @default null
+            */
+            this.setAttributeConfig("container", {
+        
+                value: oAttributes.container,
+                writeOnce: true
+        
+            });
+        
+        
+            /**
+            * @attribute srcelement
+            * @description Object reference to the HTML element (either 
+            * <code><input></code> or <code><span></code>) 
+            * used to create the button.
+            * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+            * level-one-html.html#ID-58190037">HTMLElement</a>|String
+            * @default null
+            */
+            this.setAttributeConfig("srcelement", {
+        
+                value: oAttributes.srcelement,
+                writeOnce: true
+        
+            });
+        
+        
+            /**
+            * @attribute menu
+            * @description Object specifying the menu for the button.  
+            * The value can be one of the following:
+            * <ul>
+            * <li>Object specifying a <a href="YAHOO.widget.Menu.html">
+            * YAHOO.widget.Menu</a> instance.</li>
+            * <li>Object specifying a <a href="YAHOO.widget.Overlay.html">
+            * YAHOO.widget.Overlay</a> instance.</li>
+            * <li>String specifying the id attribute of the <code><div>
+            * </code> element used to create the menu.  By default the menu 
+            * will be created as an instance of 
+            * <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>.  
+            * If the <a href="YAHOO.widget.Menu.html#CSS_CLASS_NAME">
+            * default CSS class name for YAHOO.widget.Menu</a> is applied to 
+            * the <code><div></code> element, it will be created as an
+            * instance of <a href="YAHOO.widget.Menu.html">YAHOO.widget.Menu
+            * </a>.</li><li>String specifying the id attribute of the 
+            * <code><select></code> element used to create the menu.
+            * </li><li>Object specifying the <code><div></code> element
+            * used to create the menu.</li>
+            * <li>Object specifying the <code><select></code> element
+            * used to create the menu.</li>
+            * <li>Array of object literals, each representing a set of 
+            * <a href="YAHOO.widget.MenuItem.html">YAHOO.widget.MenuItem</a> 
+            * configuration attributes.</li>
+            * <li>Array of strings representing the text labels for each menu 
+            * item in the menu.</li>
+            * </ul>
+            * @type <a href="YAHOO.widget.Menu.html">YAHOO.widget.Menu</a>|<a 
+            * href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>|<a 
+            * href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
+            * one-html.html#ID-58190037">HTMLElement</a>|String|Array
+            * @default null
+            */
+            this.setAttributeConfig("menu", {
+        
+                value: null,
+                method: this._setMenu,
+                writeOnce: true
+            
+            });
+        
+        
+            /**
+            * @attribute lazyloadmenu
+            * @description Boolean indicating the value to set for the 
+            * <a href="YAHOO.widget.Menu.html#lazyLoad">"lazyload"</a>
+            * configuration property of the button's menu.  Setting 
+            * "lazyloadmenu" to <code>true </code> will defer rendering of 
+            * the button's menu until the first time it is made visible.  
+            * If "lazyloadmenu" is set to <code>false</code>, the button's 
+            * menu will be rendered immediately if the button is in the 
+            * document, or in response to the button's "appendTo" event if 
+            * the button is not yet in the document.  In either case, the 
+            * menu is rendered into the button's parent HTML element.  
+            * <em>This attribute does not apply if a 
+            * <a href="YAHOO.widget.Menu.html">YAHOO.widget.Menu</a> or 
+            * <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a> 
+            * instance is passed as the value of the button's "menu" 
+            * configuration attribute. <a href="YAHOO.widget.Menu.html">
+            * YAHOO.widget.Menu</a> or <a href="YAHOO.widget.Overlay.html">
+            * YAHOO.widget.Overlay</a> instances should be rendered before 
+            * being set as the value for the "menu" configuration 
+            * attribute.</em>
+            * @default true
+            * @type Boolean
+            */
+            this.setAttributeConfig("lazyloadmenu", {
+        
+                value: (oAttributes.lazyloadmenu === false ? false : true),
+                validator: Lang.isBoolean,
+                writeOnce: true
+        
+            });
+
+
+            /**
+            * @attribute menuclassname
+            * @description String representing the CSS class name to be 
+            * applied to the root element of the button's menu.
+            * @type String
+            * @default "yui-button-menu"
+            */
+            this.setAttributeConfig("menuclassname", {
+        
+                value: (oAttributes.menuclassname || "yui-button-menu"),
+                validator: Lang.isString,
+                method: this._setMenuClassName,
+                writeOnce: true
+        
+            });        
+
+
+            /**
+            * @attribute selectedMenuItem
+            * @description Object representing the item in the button's menu 
+            * that is currently selected.
+            * @type Number
+            * @default null
+            */
+            this.setAttributeConfig("selectedMenuItem", {
+        
+                value: null,
+                method: this._setSelectedMenuItem
+        
+            });
+        
+        
+            /**
+            * @attribute onclick
+            * @description Object literal representing the code to be executed  
+            * when the button is clicked.  Format:<br> <code> {<br> 
+            * <strong>fn:</strong> Function,   // The handler to call 
+            * when the event fires.<br> <strong>obj:</strong> Object, 
+            * // An object to pass back to the handler.<br> 
+            * <strong>scope:</strong> Object //  The object to use 
+            * for the scope of the handler.<br> } </code>
+            * @type Object
+            * @default null
+            */
+            this.setAttributeConfig("onclick", {
+        
+                value: oAttributes.onclick,
+                method: this._setOnClick
+            
+            });
+
+
+            /**
+            * @attribute focusmenu
+            * @description Boolean indicating whether or not the button's menu 
+            * should be focused when it is made visible.
+            * @type Boolean
+            * @default true
+            */
+            this.setAttributeConfig("focusmenu", {
+        
+                value: (oAttributes.focusmenu === false ? false : true),
+                validator: Lang.isBoolean
+        
+            });
+
+        },
+        
+        
+        /**
+        * @method focus
+        * @description Causes the button to receive the focus and fires the 
+        * button's "focus" event.
+        */
+        focus: function () {
+        
+            if (!this.get("disabled")) {
+        
+                this._button.focus();
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method blur
+        * @description Causes the button to lose focus and fires the button's
+        * "blur" event.
+        */
+        blur: function () {
+        
+            if (!this.get("disabled")) {
+        
+                this._button.blur();
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method hasFocus
+        * @description Returns a boolean indicating whether or not the button 
+        * has focus.
+        * @return {Boolean}
+        */
+        hasFocus: function () {
+        
+            return (m_oFocusedButton == this);
+        
+        },
+        
+        
+        /**
+        * @method isActive
+        * @description Returns a boolean indicating whether or not the button 
+        * is active.
+        * @return {Boolean}
+        */
+        isActive: function () {
+        
+            return this.hasClass(this.CSS_CLASS_NAME + "-active");
+        
+        },
+        
+        
+        /**
+        * @method getMenu
+        * @description Returns a reference to the button's menu.
+        * @return {<a href="YAHOO.widget.Overlay.html">
+        * YAHOO.widget.Overlay</a>|<a 
+        * href="YAHOO.widget.Menu.html">YAHOO.widget.Menu</a>}
+        */
+        getMenu: function () {
+        
+            return this._menu;
+        
+        },
+        
+        
+        /**
+        * @method getForm
+        * @description Returns a reference to the button's parent form.
+        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-
+        * 20000929/level-one-html.html#ID-40002357">HTMLFormElement</a>}
+        */
+        getForm: function () {
+        
+            return this._button.form;
+        
+        },
+        
+        
+        /** 
+        * @method getHiddenFields
+        * @description Returns an <code><input></code> element or 
+        * array of form elements used to represent the button when its parent 
+        * form is submitted.  
+        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+        * level-one-html.html#ID-6043025">HTMLInputElement</a>|Array}
+        */
+        getHiddenFields: function () {
+        
+            return this._hiddenFields;
+        
+        },
+        
+        
+        /**
+        * @method destroy
+        * @description Removes the button's element from its parent element and 
+        * removes all event handlers.
+        */
+        destroy: function () {
+        
+            this.logger.log("Destroying ...");
+        
+            var oElement = this.get("element"),
+                oParentNode = oElement.parentNode,
+                oMenu = this._menu,
+                aButtons;
+        
+            if (oMenu) {
+        
+                this.logger.log("Destroying menu.");
+
+                if (m_oOverlayManager && m_oOverlayManager.find(oMenu)) {
+
+                    m_oOverlayManager.remove(oMenu);
+
+                }
+        
+                oMenu.destroy();
+        
+            }
+        
+            this.logger.log("Removing DOM event listeners.");
+        
+            Event.purgeElement(oElement);
+            Event.purgeElement(this._button);
+            Event.removeListener(document, "mouseup", this._onDocumentMouseUp);
+            Event.removeListener(document, "keyup", this._onDocumentKeyUp);
+            Event.removeListener(document, "mousedown", 
+                this._onDocumentMouseDown);
+        
+        
+            var oForm = this.getForm();
+            
+            if (oForm) {
+        
+                Event.removeListener(oForm, "reset", this._onFormReset);
+                Event.removeListener(oForm, "submit", this.createHiddenFields);
+        
+            }
+
+            this.logger.log("Removing CustomEvent listeners.");
+
+            this.unsubscribeAll();
+
+            if (oParentNode) {
+
+                oParentNode.removeChild(oElement);
+            
+            }
+        
+            this.logger.log("Removing from document.");
+        
+            delete m_oButtons[this.get("id")];
+
+            aButtons = Dom.getElementsByClassName(this.CSS_CLASS_NAME, 
+                                this.NODE_NAME, oForm); 
+
+            if (Lang.isArray(aButtons) && aButtons.length === 0) {
+
+                Event.removeListener(oForm, "keypress", 
+                        YAHOO.widget.Button.onFormKeyPress);
+
+            }
+
+            this.logger.log("Destroyed.");
+        
+        },
+        
+        
+        fireEvent: function (p_sType , p_aArgs) {
+        
+            //  Disabled buttons should not respond to DOM events
+        
+            if (this.DOM_EVENTS[p_sType] && this.get("disabled")) {
+        
+                return;
+        
+            }
+        
+            YAHOO.widget.Button.superclass.fireEvent.call(this, p_sType, 
+                p_aArgs);
+        
+        },
+        
+        
+        /**
+        * @method toString
+        * @description Returns a string representing the button.
+        * @return {String}
+        */
+        toString: function () {
+        
+            return ("Button " + this.get("id"));
+        
+        }
+    
+    });
+    
+    
+    /**
+    * @method YAHOO.widget.Button.onFormKeyPress
+    * @description "keypress" event handler for the button's form.
+    * @param {Event} p_oEvent Object representing the DOM event object passed 
+    * back by the event utility (YAHOO.util.Event).
+    */
+    YAHOO.widget.Button.onFormKeyPress = function (p_oEvent) {
+    
+        var oTarget = Event.getTarget(p_oEvent),
+            nCharCode = Event.getCharCode(p_oEvent),
+            sNodeName = oTarget.nodeName && oTarget.nodeName.toUpperCase(),
+            sType = oTarget.type,
+    
+            /*
+                Boolean indicating if the form contains any enabled or 
+                disabled YUI submit buttons
+            */
+    
+            bFormContainsYUIButtons = false,
+    
+            oButton,
+    
+            oYUISubmitButton,   // The form's first, enabled YUI submit button
+    
+            /*
+                 The form's first, enabled HTML submit button that precedes any 
+                 YUI submit button
+            */
+    
+            oPrecedingSubmitButton,
+            
+    
+            /*
+                 The form's first, enabled HTML submit button that follows a 
+                 YUI button
+            */
+            
+            oFollowingSubmitButton; 
+    
+    
+        function isSubmitButton(p_oElement) {
+    
+            var sId,
+                oSrcElement;
+    
+            switch (p_oElement.nodeName.toUpperCase()) {
+    
+            case "INPUT":
+            case "BUTTON":
+            
+                if (p_oElement.type == "submit" && !p_oElement.disabled) {
+                    
+                    if (!bFormContainsYUIButtons && 
+                        !oPrecedingSubmitButton) {
+
+                        oPrecedingSubmitButton = p_oElement;
+
+                    }
+                    
+                    if (oYUISubmitButton && !oFollowingSubmitButton) {
+                    
+                        oFollowingSubmitButton = p_oElement;
+                    
+                    }
+                
+                }
+
+                break;
+            
+
+            default:
+            
+                sId = p_oElement.id;
+    
+                if (sId) {
+    
+                    oButton = m_oButtons[sId];
+        
+                    if (oButton) {
+
+                        bFormContainsYUIButtons = true;
+        
+                        if (!oButton.get("disabled")) {
+
+                            oSrcElement = oButton.get("srcelement");
+    
+                            if (!oYUISubmitButton &&
+                                (oButton.get("type") == "submit" || 
+                                (oSrcElement && oSrcElement.type == "submit"))) 
+                            {
+
+                                oYUISubmitButton = oButton;
+                            
+                            }
+                        
+                        }
+                        
+                    }
+                
+                }
+
+                break;
+    
+            }
+    
+        }
+    
+    
+        if (nCharCode == 13 && ((sNodeName == "INPUT" && (sType == "text" || 
+            sType == "password" || sType == "checkbox" || sType == "radio" || 
+            sType == "file")) || sNodeName == "SELECT"))
+        {
+    
+            Dom.getElementsBy(isSubmitButton, "*", this);
+    
+    
+            if (oPrecedingSubmitButton) {
+    
+                /*
+                     Need to set focus to the first enabled submit button
+                     to make sure that IE includes its name and value 
+                     in the form's data set.
+                */
+    
+                oPrecedingSubmitButton.focus();
+            
+            }
+            else if (!oPrecedingSubmitButton && oYUISubmitButton) {
+    
+                if (oFollowingSubmitButton) {
+    
+                    /*
+                        Need to call "preventDefault" to ensure that 
+                        the name and value of the regular submit button 
+                        following the YUI button doesn't get added to the 
+                        form's data set when it is submitted.
+                    */
+    
+                    Event.preventDefault(p_oEvent);
+                
+                }
+    
+                oYUISubmitButton.submitForm();
+    
+            }
+            
+        }
+    
+    };
+    
+    
+    /**
+    * @method YAHOO.widget.Button.addHiddenFieldsToForm
+    * @description Searches the specified form and adds hidden fields for  
+    * instances of YAHOO.widget.Button that are of type "radio," "checkbox," 
+    * "menu," and "split."
+    * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
+    * one-html.html#ID-40002357">HTMLFormElement</a>} p_oForm Object reference 
+    * for the form to search.
+    */
+    YAHOO.widget.Button.addHiddenFieldsToForm = function (p_oForm) {
+    
+        var aButtons = Dom.getElementsByClassName(
+                            YAHOO.widget.Button.prototype.CSS_CLASS_NAME, 
+                            "*", 
+                            p_oForm),
+    
+            nButtons = aButtons.length,
+            oButton,
+            sId,
+            i;
+    
+        if (nButtons > 0) {
+    
+            YAHOO.log("Form contains " + nButtons + " YUI buttons.");
+    
+            for (i = 0; i < nButtons; i++) {
+    
+                sId = aButtons[i].id;
+    
+                if (sId) {
+    
+                    oButton = m_oButtons[sId];
+        
+                    if (oButton) {
+           
+                        oButton.createHiddenFields();
+                        
+                    }
+                
+                }
+            
+            }
+    
+        }
+    
+    };
+    
+
+    /**
+    * @method YAHOO.widget.Button.getButton
+    * @description Returns a button with the specified id.
+    * @param {String} p_sId String specifying the id of the root node of the 
+    * HTML element representing the button to be retrieved.
+    * @return {YAHOO.widget.Button}
+    */
+    YAHOO.widget.Button.getButton = function (p_sId) {
+
+        var oButton = m_oButtons[p_sId];
+
+        if (oButton) {
+        
+            return oButton;
+        
+        }
+
+    };
+    
+    
+    // Events
+    
+    
+    /**
+    * @event focus
+    * @description Fires when the menu item receives focus.  Passes back a  
+    * single object representing the original DOM event object passed back by 
+    * the event utility (YAHOO.util.Event) when the event was fired.  See 
+    * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> 
+    * for more information on listening for this event.
+    * @type YAHOO.util.CustomEvent
+    */
+    
+    
+    /**
+    * @event blur
+    * @description Fires when the menu item loses the input focus.  Passes back  
+    * a single object representing the original DOM event object passed back by 
+    * the event utility (YAHOO.util.Event) when the event was fired.  See 
+    * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for  
+    * more information on listening for this event.
+    * @type YAHOO.util.CustomEvent
+    */
+    
+    
+    /**
+    * @event option
+    * @description Fires when the user invokes the button's option.  Passes 
+    * back a single object representing the original DOM event (either 
+    * "mousedown" or "keydown") that caused the "option" event to fire.  See 
+    * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> 
+    * for more information on listening for this event.
+    * @type YAHOO.util.CustomEvent
+    */
+
+})();
+(function () {
+
+    // Shorthard for utilities
+    
+    var Dom = YAHOO.util.Dom,
+        Event = YAHOO.util.Event,
+        Lang = YAHOO.lang,
+        Button = YAHOO.widget.Button,  
+    
+        // Private collection of radio buttons
+    
+        m_oButtons = {};
+
+
+
+    /**
+    * The ButtonGroup class creates a set of buttons that are mutually 
+    * exclusive; checking one button in the set will uncheck all others in the 
+    * button group.
+    * @param {String} p_oElement String specifying the id attribute of the 
+    * <code><div></code> element of the button group.
+    * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+    * level-one-html.html#ID-22445964">HTMLDivElement</a>} p_oElement Object 
+    * specifying the <code><div></code> element of the button group.
+    * @param {Object} p_oElement Object literal specifying a set of 
+    * configuration attributes used to create the button group.
+    * @param {Object} p_oAttributes Optional. Object literal specifying a set 
+    * of configuration attributes used to create the button group.
+    * @namespace YAHOO.widget
+    * @class ButtonGroup
+    * @constructor
+    * @extends YAHOO.util.Element
+    */
+    YAHOO.widget.ButtonGroup = function (p_oElement, p_oAttributes) {
+    
+        var fnSuperClass = YAHOO.widget.ButtonGroup.superclass.constructor,
+            sNodeName,
+            oElement,
+            sId;
+    
+        if (arguments.length == 1 && !Lang.isString(p_oElement) && 
+            !p_oElement.nodeName) {
+    
+            if (!p_oElement.id) {
+    
+                sId = Dom.generateId();
+    
+                p_oElement.id = sId;
+    
+                YAHOO.log("No value specified for the button group's \"id\"" +
+                    " attribute. Setting button group id to \"" + sId + "\".",
+                    "warn");
+    
+            }
+    
+            this.logger = new YAHOO.widget.LogWriter("ButtonGroup " + sId);
+    
+            this.logger.log("No source HTML element.  Building the button " +
+                    "group using the set of configuration attributes.");
+    
+            fnSuperClass.call(this, (this._createGroupElement()), p_oElement);
+    
+        }
+        else if (Lang.isString(p_oElement)) {
+    
+            oElement = Dom.get(p_oElement);
+    
+            if (oElement) {
+            
+                if (oElement.nodeName.toUpperCase() == this.NODE_NAME) {
+    
+                    this.logger = 
+                        new YAHOO.widget.LogWriter("ButtonGroup " + p_oElement);
+            
+                    fnSuperClass.call(this, oElement, p_oAttributes);
+    
+                }
+    
+            }
+        
+        }
+        else {
+    
+            sNodeName = p_oElement.nodeName.toUpperCase();
+    
+            if (sNodeName && sNodeName == this.NODE_NAME) {
+        
+                if (!p_oElement.id) {
+        
+                    p_oElement.id = Dom.generateId();
+        
+                    YAHOO.log("No value specified for the button group's" +
+                        " \"id\" attribute. Setting button group id " +
+                        "to \"" + p_oElement.id + "\".", "warn");
+        
+                }
+        
+                this.logger = 
+                    new YAHOO.widget.LogWriter("ButtonGroup " + p_oElement.id);
+        
+                fnSuperClass.call(this, p_oElement, p_oAttributes);
+    
+            }
+    
+        }
+    
+    };
+    
+    
+    YAHOO.extend(YAHOO.widget.ButtonGroup, YAHOO.util.Element, {
+    
+    
+        // Protected properties
+        
+        
+        /** 
+        * @property _buttons
+        * @description Array of buttons in the button group.
+        * @default null
+        * @protected
+        * @type Array
+        */
+        _buttons: null,
+        
+        
+        
+        // Constants
+        
+        
+        /**
+        * @property NODE_NAME
+        * @description The name of the tag to be used for the button 
+        * group's element. 
+        * @default "DIV"
+        * @final
+        * @type String
+        */
+        NODE_NAME: "DIV",
+        
+        
+        /**
+        * @property CSS_CLASS_NAME
+        * @description String representing the CSS class(es) to be applied  
+        * to the button group's element.
+        * @default "yui-buttongroup"
+        * @final
+        * @type String
+        */
+        CSS_CLASS_NAME: "yui-buttongroup",
+    
+    
+    
+        // Protected methods
+        
+        
+        /**
+        * @method _createGroupElement
+        * @description Creates the button group's element.
+        * @protected
+        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+        * level-one-html.html#ID-22445964">HTMLDivElement</a>}
+        */
+        _createGroupElement: function () {
+        
+            var oElement = document.createElement(this.NODE_NAME);
+        
+            return oElement;
+        
+        },
+        
+        
+        
+        // Protected attribute setter methods
+        
+        
+        /**
+        * @method _setDisabled
+        * @description Sets the value of the button groups's 
+        * "disabled" attribute.
+        * @protected
+        * @param {Boolean} p_bDisabled Boolean indicating the value for
+        * the button group's "disabled" attribute.
+        */
+        _setDisabled: function (p_bDisabled) {
+        
+            var nButtons = this.getCount(),
+                i;
+        
+            if (nButtons > 0) {
+        
+                i = nButtons - 1;
+                
+                do {
+        
+                    this._buttons[i].set("disabled", p_bDisabled);
+                
+                }
+                while (i--);
+        
+            }
+        
+        },
+        
+        
+        
+        // Protected event handlers
+        
+        
+        /**
+        * @method _onKeyDown
+        * @description "keydown" event handler for the button group.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onKeyDown: function (p_oEvent) {
+        
+            var oTarget = Event.getTarget(p_oEvent),
+                nCharCode = Event.getCharCode(p_oEvent),
+                sId = oTarget.parentNode.parentNode.id,
+                oButton = m_oButtons[sId],
+                nIndex = -1;
+        
+        
+            if (nCharCode == 37 || nCharCode == 38) {
+        
+                nIndex = (oButton.index === 0) ? 
+                            (this._buttons.length - 1) : (oButton.index - 1);
+            
+            }
+            else if (nCharCode == 39 || nCharCode == 40) {
+        
+                nIndex = (oButton.index === (this._buttons.length - 1)) ? 
+                            0 : (oButton.index + 1);
+        
+            }
+        
+        
+            if (nIndex > -1) {
+        
+                this.check(nIndex);
+                this.getButton(nIndex).focus();
+            
+            }        
+        
+        },
+        
+        
+        /**
+        * @method _onAppendTo
+        * @description "appendTo" event handler for the button group.
+        * @protected
+        * @param {Event} p_oEvent Object representing the event that was fired.
+        */
+        _onAppendTo: function (p_oEvent) {
+        
+            var aButtons = this._buttons,
+                nButtons = aButtons.length,
+                i;
+        
+            for (i = 0; i < nButtons; i++) {
+        
+                aButtons[i].appendTo(this.get("element"));
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onButtonCheckedChange
+        * @description "checkedChange" event handler for each button in the 
+        * button group.
+        * @protected
+        * @param {Event} p_oEvent Object representing the event that was fired.
+        * @param {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}  
+        * p_oButton Object representing the button that fired the event.
+        */
+        _onButtonCheckedChange: function (p_oEvent, p_oButton) {
+        
+            var bChecked = p_oEvent.newValue,
+                oCheckedButton = this.get("checkedButton");
+        
+            if (bChecked && oCheckedButton != p_oButton) {
+        
+                if (oCheckedButton) {
+        
+                    oCheckedButton.set("checked", false, true);
+        
+                }
+        
+                this.set("checkedButton", p_oButton);
+                this.set("value", p_oButton.get("value"));
+        
+            }
+            else if (oCheckedButton && !oCheckedButton.set("checked")) {
+        
+                oCheckedButton.set("checked", true, true);
+        
+            }
+           
+        },
+        
+        
+        
+        // Public methods
+        
+        
+        /**
+        * @method init
+        * @description The ButtonGroup class's initialization method.
+        * @param {String} p_oElement String specifying the id attribute of the 
+        * <code><div></code> element of the button group.
+        * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+        * level-one-html.html#ID-22445964">HTMLDivElement</a>} p_oElement Object 
+        * specifying the <code><div></code> element of the button group.
+        * @param {Object} p_oElement Object literal specifying a set of  
+        * configuration attributes used to create the button group.
+        * @param {Object} p_oAttributes Optional. Object literal specifying a
+        * set of configuration attributes used to create the button group.
+        */
+        init: function (p_oElement, p_oAttributes) {
+        
+            this._buttons = [];
+        
+            YAHOO.widget.ButtonGroup.superclass.init.call(this, p_oElement, 
+                    p_oAttributes);
+        
+            this.addClass(this.CSS_CLASS_NAME);
+        
+            this.logger.log("Searching for child nodes with the class name " +
+                "\"yui-radio-button\" to add to the button group.");
+        
+            var aButtons = this.getElementsByClassName("yui-radio-button");
+        
+        
+            if (aButtons.length > 0) {
+        
+                this.logger.log("Found " + aButtons.length + 
+                    " child nodes with the class name \"yui-radio-button.\"" + 
+                    "  Attempting to add to button group.");
+        
+                this.addButtons(aButtons);
+        
+            }
+        
+        
+            this.logger.log("Searching for child nodes with the type of " +
+                " \"radio\" to add to the button group.");
+        
+            function isRadioButton(p_oElement) {
+        
+                return (p_oElement.type == "radio");
+        
+            }
+        
+            aButtons = 
+                Dom.getElementsBy(isRadioButton, "input", this.get("element"));
+        
+        
+            if (aButtons.length > 0) {
+        
+                this.logger.log("Found " + aButtons.length + " child nodes" +
+                    " with the type of \"radio.\"  Attempting to add to" +
+                    " button group.");
+        
+                this.addButtons(aButtons);
+        
+            }
+        
+            this.on("keydown", this._onKeyDown);
+            this.on("appendTo", this._onAppendTo);
+        
+
+            var oContainer = this.get("container");
+
+            if (oContainer) {
+        
+                if (Lang.isString(oContainer)) {
+        
+                    Event.onContentReady(oContainer, function () {
+        
+                        this.appendTo(oContainer);            
+                    
+                    }, null, this);
+        
+                }
+                else {
+        
+                    this.appendTo(oContainer);
+        
+                }
+        
+            }
+        
+        
+            this.logger.log("Initialization completed.");
+        
+        },
+        
+        
+        /**
+        * @method initAttributes
+        * @description Initializes all of the configuration attributes used to  
+        * create the button group.
+        * @param {Object} p_oAttributes Object literal specifying a set of 
+        * configuration attributes used to create the button group.
+        */
+        initAttributes: function (p_oAttributes) {
+        
+            var oAttributes = p_oAttributes || {};
+        
+            YAHOO.widget.ButtonGroup.superclass.initAttributes.call(
+                this, oAttributes);
+        
+        
+            /**
+            * @attribute name
+            * @description String specifying the name for the button group.  
+            * This name will be applied to each button in the button group.
+            * @default null
+            * @type String
+            */
+            this.setAttributeConfig("name", {
+        
+                value: oAttributes.name,
+                validator: Lang.isString
+        
+            });
+        
+        
+            /**
+            * @attribute disabled
+            * @description Boolean indicating if the button group should be 
+            * disabled.  Disabling the button group will disable each button 
+            * in the button group.  Disabled buttons are dimmed and will not 
+            * respond to user input or fire events.
+            * @default false
+            * @type Boolean
+            */
+            this.setAttributeConfig("disabled", {
+        
+                value: (oAttributes.disabled || false),
+                validator: Lang.isBoolean,
+                method: this._setDisabled
+        
+            });
+        
+        
+            /**
+            * @attribute value
+            * @description Object specifying the value for the button group.
+            * @default null
+            * @type Object
+            */
+            this.setAttributeConfig("value", {
+        
+                value: oAttributes.value
+        
+            });
+        
+        
+            /**
+            * @attribute container
+            * @description HTML element reference or string specifying the id 
+            * attribute of the HTML element that the button group's markup
+            * should be rendered into.
+            * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+            * level-one-html.html#ID-58190037">HTMLElement</a>|String
+            * @default null
+            */
+            this.setAttributeConfig("container", {
+        
+                value: oAttributes.container,
+                writeOnce: true
+        
+            });
+        
+        
+            /**
+            * @attribute checkedButton
+            * @description Reference for the button in the button group that 
+            * is checked.
+            * @type {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}
+            * @default null
+            */
+            this.setAttributeConfig("checkedButton", {
+        
+                value: null
+        
+            });
+        
+        },
+        
+        
+        /**
+        * @method addButton
+        * @description Adds the button to the button group.
+        * @param {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}  
+        * p_oButton Object reference for the <a href="YAHOO.widget.Button.html">
+        * YAHOO.widget.Button</a> instance to be added to the button group.
+        * @param {String} p_oButton String specifying the id attribute of the 
+        * <code><input></code> or <code><span></code> element 
+        * to be used to create the button to be added to the button group.
+        * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+        * level-one-html.html#ID-6043025">HTMLInputElement</a>|<a href="
+        * http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#
+        * ID-33759296">HTMLElement</a>} p_oButton Object reference for the 
+        * <code><input></code> or <code><span></code> element 
+        * to be used to create the button to be added to the button group.
+        * @param {Object} p_oButton Object literal specifying a set of 
+        * <a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a> 
+        * configuration attributes used to configure the button to be added to 
+        * the button group.
+        * @return {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>} 
+        */
+        addButton: function (p_oButton) {
+        
+            var oButton,
+                oButtonElement,
+                oGroupElement,
+                nIndex,
+                sButtonName,
+                sGroupName;
+        
+        
+            if (p_oButton instanceof Button && 
+                p_oButton.get("type") == "radio") {
+        
+                oButton = p_oButton;
+        
+            }
+            else if (!Lang.isString(p_oButton) && !p_oButton.nodeName) {
+        
+                p_oButton.type = "radio";
+        
+                oButton = new Button(p_oButton);
+
+            }
+            else {
+        
+                oButton = new Button(p_oButton, { type: "radio" });
+        
+            }
+        
+        
+            if (oButton) {
+        
+                nIndex = this._buttons.length;
+                sButtonName = oButton.get("name");
+                sGroupName = this.get("name");
+        
+                oButton.index = nIndex;
+        
+                this._buttons[nIndex] = oButton;
+                m_oButtons[oButton.get("id")] = oButton;
+        
+        
+                if (sButtonName != sGroupName) {
+        
+                    oButton.set("name", sGroupName);
+                
+                }
+        
+        
+                if (this.get("disabled")) {
+        
+                    oButton.set("disabled", true);
+        
+                }
+        
+        
+                if (oButton.get("checked")) {
+        
+                    this.set("checkedButton", oButton);
+        
+                }
+
+                
+                oButtonElement = oButton.get("element");
+                oGroupElement = this.get("element");
+                
+                if (oButtonElement.parentNode != oGroupElement) {
+                
+                    oGroupElement.appendChild(oButtonElement);
+                
+                }
+        
+                
+                oButton.on("checkedChange", 
+                    this._onButtonCheckedChange, oButton, this);
+        
+                this.logger.log("Button " + oButton.get("id") + " added.");
+        
+                return oButton;
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method addButtons
+        * @description Adds the array of buttons to the button group.
+        * @param {Array} p_aButtons Array of <a href="YAHOO.widget.Button.html">
+        * YAHOO.widget.Button</a> instances to be added 
+        * to the button group.
+        * @param {Array} p_aButtons Array of strings specifying the id 
+        * attribute of the <code><input></code> or <code><span>
+        * </code> elements to be used to create the buttons to be added to the 
+        * button group.
+        * @param {Array} p_aButtons Array of object references for the 
+        * <code><input></code> or <code><span></code> elements 
+        * to be used to create the buttons to be added to the button group.
+        * @param {Array} p_aButtons Array of object literals, each containing
+        * a set of <a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>  
+        * configuration attributes used to configure each button to be added 
+        * to the button group.
+        * @return {Array}
+        */
+        addButtons: function (p_aButtons) {
+    
+            var nButtons,
+                oButton,
+                aButtons,
+                i;
+        
+            if (Lang.isArray(p_aButtons)) {
+            
+                nButtons = p_aButtons.length;
+                aButtons = [];
+        
+                if (nButtons > 0) {
+        
+                    for (i = 0; i < nButtons; i++) {
+        
+                        oButton = this.addButton(p_aButtons[i]);
+                        
+                        if (oButton) {
+        
+                            aButtons[aButtons.length] = oButton;
+        
+                        }
+                    
+                    }
+        
+                    if (aButtons.length > 0) {
+        
+                        this.logger.log(aButtons.length + " buttons added.");
+        
+                        return aButtons;
+        
+                    }
+                
+                }
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method removeButton
+        * @description Removes the button at the specified index from the 
+        * button group.
+        * @param {Number} p_nIndex Number specifying the index of the button 
+        * to be removed from the button group.
+        */
+        removeButton: function (p_nIndex) {
+        
+            var oButton = this.getButton(p_nIndex),
+                nButtons,
+                i;
+            
+            if (oButton) {
+        
+                this.logger.log("Removing button " + oButton.get("id") + ".");
+        
+                this._buttons.splice(p_nIndex, 1);
+                delete m_oButtons[oButton.get("id")];
+        
+                oButton.removeListener("checkedChange", 
+                    this._onButtonCheckedChange);
+
+                oButton.destroy();
+        
+        
+                nButtons = this._buttons.length;
+                
+                if (nButtons > 0) {
+        
+                    i = this._buttons.length - 1;
+                    
+                    do {
+        
+                        this._buttons[i].index = i;
+        
+                    }
+                    while (i--);
+                
+                }
+        
+                this.logger.log("Button " + oButton.get("id") + " removed.");
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method getButton
+        * @description Returns the button at the specified index.
+        * @param {Number} p_nIndex The index of the button to retrieve from the 
+        * button group.
+        * @return {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}
+        */
+        getButton: function (p_nIndex) {
+        
+            if (Lang.isNumber(p_nIndex)) {
+        
+                return this._buttons[p_nIndex];
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method getButtons
+        * @description Returns an array of the buttons in the button group.
+        * @return {Array}
+        */
+        getButtons: function () {
+        
+            return this._buttons;
+        
+        },
+        
+        
+        /**
+        * @method getCount
+        * @description Returns the number of buttons in the button group.
+        * @return {Number}
+        */
+        getCount: function () {
+        
+            return this._buttons.length;
+        
+        },
+        
+        
+        /**
+        * @method focus
+        * @description Sets focus to the button at the specified index.
+        * @param {Number} p_nIndex Number indicating the index of the button 
+        * to focus. 
+        */
+        focus: function (p_nIndex) {
+        
+            var oButton,
+                nButtons,
+                i;
+        
+            if (Lang.isNumber(p_nIndex)) {
+        
+                oButton = this._buttons[p_nIndex];
+                
+                if (oButton) {
+        
+                    oButton.focus();
+        
+                }
+            
+            }
+            else {
+        
+                nButtons = this.getCount();
+        
+                for (i = 0; i < nButtons; i++) {
+        
+                    oButton = this._buttons[i];
+        
+                    if (!oButton.get("disabled")) {
+        
+                        oButton.focus();
+                        break;
+        
+                    }
+        
+                }
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method check
+        * @description Checks the button at the specified index.
+        * @param {Number} p_nIndex Number indicating the index of the button 
+        * to check. 
+        */
+        check: function (p_nIndex) {
+        
+            var oButton = this.getButton(p_nIndex);
+            
+            if (oButton) {
+        
+                oButton.set("checked", true);
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method destroy
+        * @description Removes the button group's element from its parent 
+        * element and removes all event handlers.
+        */
+        destroy: function () {
+        
+            this.logger.log("Destroying...");
+        
+            var nButtons = this._buttons.length,
+                oElement = this.get("element"),
+                oParentNode = oElement.parentNode,
+                i;
+            
+            if (nButtons > 0) {
+        
+                i = this._buttons.length - 1;
+        
+                do {
+        
+                    this._buttons[i].destroy();
+        
+                }
+                while (i--);
+            
+            }
+        
+            this.logger.log("Removing DOM event handlers.");
+        
+            Event.purgeElement(oElement);
+            
+            this.logger.log("Removing from document.");
+        
+            oParentNode.removeChild(oElement);
+        
+        },
+        
+        
+        /**
+        * @method toString
+        * @description Returns a string representing the button group.
+        * @return {String}
+        */
+        toString: function () {
+        
+            return ("ButtonGroup " + this.get("id"));
+        
+        }
+    
+    });
+
+})();
+YAHOO.register("button", YAHOO.widget.Button, {version: "2.4.1", build: "742"});

Added: trunk/root/static/yui/button/button-min.js
===================================================================
--- trunk/root/static/yui/button/button-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/button/button-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,11 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+(function(){var G=YAHOO.util.Dom,L=YAHOO.util.Event,I=YAHOO.lang,B=YAHOO.widget.Overlay,J=YAHOO.widget.Menu,D={},K=null,E=null,C=null;function F(N,M,Q,O){var R,P;if(I.isString(N)&&I.isString(M)){if(YAHOO.env.ua.ie){P="<input type=\""+N+"\" name=\""+M+"\"";if(O){P+=" checked";}P+=">";R=document.createElement(P);}else{R=document.createElement("input");R.name=M;R.type=N;if(O){R.checked=true;}}R.value=Q;return R;}}function H(N,T){var M=N.nodeName.toUpperCase(),R=this,S,O,P;function U(V){if(!(V in T)){S=N.getAttributeNode(V);if(S&&("value" in S)){T[V]=S.value;}}}function Q(){U("type");if(T.type=="button"){T.type="push";}if(!("disabled" in T)){T.disabled=N.disabled;}U("name");U("value");U("title");}switch(M){case"A":T.type="link";U("href");U("target");break;case"INPUT":Q();if(!("checked" in T)){T.checked=N.checked;}break;case"BUTTON":Q();O=N.parentNode.parentNode;if(G.hasClass(O,this.CSS_CLASS_NAME+"-checked")){T.checked=true;}if(G.hasClass(O,this.CSS_CLASS_NAME+"-disabled")){T.d!
 isabled=true;}N.removeAttribute("value");N.setAttribute("type","button");break;}N.removeAttribute("id");N.removeAttribute("name");if(!("tabindex" in T)){T.tabindex=N.tabIndex;}if(!("label" in T)){P=M=="INPUT"?N.value:N.innerHTML;if(P&&P.length>0){T.label=P;}}}function A(O){var N=O.attributes,M=N.srcelement,Q=M.nodeName.toUpperCase(),P=this;if(Q==this.NODE_NAME){O.element=M;O.id=M.id;G.getElementsBy(function(R){switch(R.nodeName.toUpperCase()){case"BUTTON":case"A":case"INPUT":H.call(P,R,N);break;}},"*",M);}else{switch(Q){case"BUTTON":case"A":case"INPUT":H.call(this,M,N);break;}}}YAHOO.widget.Button=function(Q,N){var P=YAHOO.widget.Button.superclass.constructor,O,M;if(arguments.length==1&&!I.isString(Q)&&!Q.nodeName){if(!Q.id){Q.id=G.generateId();}P.call(this,(this.createButtonElement(Q.type)),Q);}else{O={element:null,attributes:(N||{})};if(I.isString(Q)){M=G.get(Q);if(M){if(!O.attributes.id){O.attributes.id=Q;}O.attributes.srcelement=M;A.call(this,O);if(!O.element){O.element!
 =this.createButtonElement(O.attributes.type);}P.call(this,O.el!
 ement,O.
attributes);}}else{if(Q.nodeName){if(!O.attributes.id){if(Q.id){O.attributes.id=Q.id;}else{O.attributes.id=G.generateId();}}O.attributes.srcelement=Q;A.call(this,O);if(!O.element){O.element=this.createButtonElement(O.attributes.type);}P.call(this,O.element,O.attributes);}}}};YAHOO.extend(YAHOO.widget.Button,YAHOO.util.Element,{_button:null,_menu:null,_hiddenFields:null,_onclickAttributeValue:null,_activationKeyPressed:false,_activationButtonPressed:false,_hasKeyEventHandlers:false,_hasMouseEventHandlers:false,NODE_NAME:"SPAN",CHECK_ACTIVATION_KEYS:[32],ACTIVATION_KEYS:[13,32],OPTION_AREA_WIDTH:20,CSS_CLASS_NAME:"yui-button",RADIO_DEFAULT_TITLE:"Unchecked.  Click to check.",RADIO_CHECKED_TITLE:"Checked.  Click another button to uncheck",CHECKBOX_DEFAULT_TITLE:"Unchecked.  Click to check.",CHECKBOX_CHECKED_TITLE:"Checked.  Click to uncheck.",MENUBUTTON_DEFAULT_TITLE:"Menu collapsed.  Click to expand.",MENUBUTTON_MENU_VISIBLE_TITLE:"Menu expanded.  Click or press Esc to collaps!
 e.",SPLITBUTTON_DEFAULT_TITLE:("Menu collapsed.  Click inside option region or press Ctrl + Shift + M to show the menu."),SPLITBUTTON_OPTION_VISIBLE_TITLE:"Menu expanded.  Press Esc or Ctrl + Shift + M to hide the menu.",SUBMIT_TITLE:"Click to submit form.",_setType:function(M){if(M=="split"){this.on("option",this._onOption);}},_setLabel:function(M){this._button.innerHTML=M;var O,N;if(YAHOO.env.ua.gecko&&G.inDocument(this.get("element"))){N=this;O=this.CSS_CLASS_NAME;this.removeClass(O);window.setTimeout(function(){N.addClass(O);},0);}},_setTabIndex:function(M){this._button.tabIndex=M;},_setTitle:function(N){var M=N;if(this.get("type")!="link"){if(!M){switch(this.get("type")){case"radio":M=this.RADIO_DEFAULT_TITLE;break;case"checkbox":M=this.CHECKBOX_DEFAULT_TITLE;break;case"menu":M=this.MENUBUTTON_DEFAULT_TITLE;break;case"split":M=this.SPLITBUTTON_DEFAULT_TITLE;break;case"submit":M=this.SUBMIT_TITLE;break;}}this._button.title=M;}},_setDisabled:function(M){if(this.get("type!
 ")!="link"){if(M){if(this._menu){this._menu.hide();}if(this.ha!
 sFocus()
){this.blur();}this._button.setAttribute("disabled","disabled");this.addStateCSSClasses("disabled");this.removeStateCSSClasses("hover");this.removeStateCSSClasses("active");this.removeStateCSSClasses("focus");}else{this._button.removeAttribute("disabled");this.removeStateCSSClasses("disabled");}}},_setHref:function(M){if(this.get("type")=="link"){this._button.href=M;}},_setTarget:function(M){if(this.get("type")=="link"){this._button.setAttribute("target",M);}},_setChecked:function(N){var O=this.get("type"),M;if(O=="checkbox"||O=="radio"){if(N){this.addStateCSSClasses("checked");M=(O=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE;}else{this.removeStateCSSClasses("checked");M=(O=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE;}this.set("title",M);}},_setMenu:function(W){var Q=this.get("lazyloadmenu"),T=this.get("element"),M,Y=false,Z,P,S,O,N,V,R;if(!B){return false;}if(J){M=J.prototype.CSS_CLASS_NAME;}function X(){Z.render(T.parentNode);this.remo!
 veListener("appendTo",X);}function U(){if(Z){G.addClass(Z.element,this.get("menuclassname"));G.addClass(Z.element,"yui-"+this.get("type")+"-button-menu");Z.showEvent.subscribe(this._onMenuShow,null,this);Z.hideEvent.subscribe(this._onMenuHide,null,this);Z.renderEvent.subscribe(this._onMenuRender,null,this);if(J&&Z instanceof J){Z.keyDownEvent.subscribe(this._onMenuKeyDown,this,true);Z.subscribe("click",this._onMenuClick,this,true);Z.itemAddedEvent.subscribe(this._onMenuItemAdded,this,true);S=Z.srcElement;if(S&&S.nodeName.toUpperCase()=="SELECT"){S.style.display="none";S.parentNode.removeChild(S);}}else{if(B&&Z instanceof B){if(!K){K=new YAHOO.widget.OverlayManager();}K.register(Z);}}this._menu=Z;if(!Y){if(Q&&J&&!(Z instanceof J)){Z.beforeShowEvent.subscribe(this._onOverlayBeforeShow,null,this);}else{if(!Q){if(G.inDocument(T)){Z.render(T.parentNode);}else{this.on("appendTo",X);}}}}}}if(W&&J&&(W instanceof J)){Z=W;
+O=Z.getItems();N=O.length;Y=true;if(N>0){R=N-1;do{V=O[R];if(V){V.cfg.subscribeToConfigEvent("selected",this._onMenuItemSelected,V,this);}}while(R--);}U.call(this);}else{if(B&&W&&(W instanceof B)){Z=W;Y=true;Z.cfg.setProperty("visible",false);Z.cfg.setProperty("context",[T,"tl","bl"]);U.call(this);}else{if(J&&I.isArray(W)){this.on("appendTo",function(){Z=new J(G.generateId(),{lazyload:Q,itemdata:W});U.call(this);});}else{if(I.isString(W)){P=G.get(W);if(P){if(J&&G.hasClass(P,M)||P.nodeName.toUpperCase()=="SELECT"){Z=new J(W,{lazyload:Q});U.call(this);}else{if(B){Z=new B(W,{visible:false,context:[T,"tl","bl"]});U.call(this);}}}}else{if(W&&W.nodeName){if(J&&G.hasClass(W,M)||W.nodeName.toUpperCase()=="SELECT"){Z=new J(W,{lazyload:Q});U.call(this);}else{if(B){if(!W.id){G.generateId(W);}Z=new B(W,{visible:false,context:[T,"tl","bl"]});U.call(this);}}}}}}}},_setOnClick:function(M){if(this._onclickAttributeValue&&(this._onclickAttributeValue!=M)){this.removeListener("click",this._on!
 clickAttributeValue.fn);this._onclickAttributeValue=null;}if(!this._onclickAttributeValue&&I.isObject(M)&&I.isFunction(M.fn)){this.on("click",M.fn,M.obj,M.scope);this._onclickAttributeValue=M;}},_setSelectedMenuItem:function(N){var M=this._menu,O;if(J&&M&&M instanceof J){O=M.getItem(N);if(O&&!O.cfg.getProperty("selected")){O.cfg.setProperty("selected",true);}}},_isActivationKey:function(M){var Q=this.get("type"),N=(Q=="checkbox"||Q=="radio")?this.CHECK_ACTIVATION_KEYS:this.ACTIVATION_KEYS,P=N.length,O;if(P>0){O=P-1;do{if(M==N[O]){return true;}}while(O--);}},_isSplitButtonOptionKey:function(M){return(M.ctrlKey&&M.shiftKey&&L.getCharCode(M)==77);},_addListenersToForm:function(){var S=this.getForm(),R=YAHOO.widget.Button.onFormKeyPress,Q,M,P,O,N;if(S){L.on(S,"reset",this._onFormReset,null,this);L.on(S,"submit",this.createHiddenFields,null,this);M=this.get("srcelement");if(this.get("type")=="submit"||(M&&M.type=="submit")){P=L.getListeners(S,"keypress");Q=false;if(P){O=P.length!
 ;if(O>0){N=O-1;do{if(P[N].fn==R){Q=true;break;}}while(N--);}}i!
 f(!Q){L.
on(S,"keypress",R);}}}},_showMenu:function(R){if(YAHOO.widget.MenuManager){YAHOO.widget.MenuManager.hideVisible();}if(K){K.hideAll();}var P=B.VIEWPORT_OFFSET,Y=this._menu,W=this,Z=W.get("element"),T=false,V=G.getY(Z),U=G.getDocumentScrollTop(),M,Q,b;if(U){V=V-U;}var O=V,N=(G.getViewportHeight()-(V+Z.offsetHeight));function S(){if(T){return(O-P);}else{return(N-P);}}function a(){var c=S();if(Q>c){M=Y.cfg.getProperty("minscrollheight");if(c>M){Y.cfg.setProperty("maxheight",c);if(T){Y.align("bl","tl");}}if(c<M){if(T){Y.cfg.setProperty("context",[Z,"tl","bl"],true);Y.align("tl","bl");}else{Y.cfg.setProperty("context",[Z,"bl","tl"],true);Y.align("bl","tl");T=true;return a();}}}}if(J&&Y&&(Y instanceof J)){Y.cfg.applyConfig({context:[Z,"tl","bl"],clicktohide:false,visible:true});Y.cfg.fireQueue();Y.cfg.setProperty("maxheight",0);Y.align("tl","bl");if(R.type=="mousedown"){L.stopPropagation(R);}Q=Y.element.offsetHeight;b=Y.element.lastChild;a();if(this.get("focusmenu")){this._menu.foc!
 us();}}else{if(B&&Y&&(Y instanceof B)){Y.show();Y.align("tl","bl");var X=S();Q=Y.element.offsetHeight;if(X<Q){Y.align("bl","tl");T=true;X=S();if(X<Q){Y.align("tl","bl");}}}}},_hideMenu:function(){var M=this._menu;if(M){M.hide();}},_onMouseOver:function(M){if(!this._hasMouseEventHandlers){this.on("mouseout",this._onMouseOut);this.on("mousedown",this._onMouseDown);this.on("mouseup",this._onMouseUp);this._hasMouseEventHandlers=true;}this.addStateCSSClasses("hover");if(this._activationButtonPressed){this.addStateCSSClasses("active");}if(this._bOptionPressed){this.addStateCSSClasses("activeoption");}if(this._activationButtonPressed||this._bOptionPressed){L.removeListener(document,"mouseup",this._onDocumentMouseUp);}},_onMouseOut:function(M){this.removeStateCSSClasses("hover");if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}if(this._activationButtonPressed||this._bOptionPressed){L.on(document,"mouseup",this._onDocumentMouseUp,null,this);}},_onDocumentMouseUp:fu!
 nction(O){this._activationButtonPressed=false;this._bOptionPre!
 ssed=fal
se;var P=this.get("type"),M,N;if(P=="menu"||P=="split"){M=L.getTarget(O);N=this._menu.element;if(M!=N&&!G.isAncestor(N,M)){this.removeStateCSSClasses((P=="menu"?"active":"activeoption"));this._hideMenu();}}L.removeListener(document,"mouseup",this._onDocumentMouseUp);},_onMouseDown:function(P){var R,N,Q,O;function M(){this._hideMenu();this.removeListener("mouseup",M);}if((P.which||P.button)==1){if(!this.hasFocus()){this.focus();}R=this.get("type");if(R=="split"){N=this.get("element");Q=L.getPageX(P)-G.getX(N);if((N.offsetWidth-this.OPTION_AREA_WIDTH)<Q){this.fireEvent("option",P);}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}else{if(R=="menu"){if(this.isActive()){this._hideMenu();this._activationButtonPressed=false;}else{this._showMenu(P);this._activationButtonPressed=true;}}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}if(R=="split"||R=="menu"){O=this;this._hideMenuTimerId=window.setTimeout(function(){O.on("mouseup!
 ",M);},250);}}},_onMouseUp:function(M){var N=this.get("type");if(this._hideMenuTimerId){window.clearTimeout(this._hideMenuTimerId);}if(N=="checkbox"||N=="radio"){this.set("checked",!(this.get("checked")));}this._activationButtonPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}},_onFocus:function(N){var M;this.addStateCSSClasses("focus");if(this._activationKeyPressed){this.addStateCSSClasses("active");}C=this;if(!this._hasKeyEventHandlers){M=this._button;L.on(M,"blur",this._onBlur,null,this);L.on(M,"keydown",this._onKeyDown,null,this);L.on(M,"keyup",this._onKeyUp,null,this);this._hasKeyEventHandlers=true;}this.fireEvent("focus",N);},_onBlur:function(M){this.removeStateCSSClasses("focus");if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}if(this._activationKeyPressed){L.on(document,"keyup",this._onDocumentKeyUp,null,this);}C=null;this.fireEvent("blur",M);},_onDocumentKeyUp:function(M){if(this._isActivationKey(L.getCharCode(M)))!
 {this._activationKeyPressed=false;
+L.removeListener(document,"keyup",this._onDocumentKeyUp);}},_onKeyDown:function(N){var M=this._menu;if(this.get("type")=="split"&&this._isSplitButtonOptionKey(N)){this.fireEvent("option",N);}else{if(this._isActivationKey(L.getCharCode(N))){if(this.get("type")=="menu"){this._showMenu(N);}else{this._activationKeyPressed=true;this.addStateCSSClasses("active");}}}if(M&&M.cfg.getProperty("visible")&&L.getCharCode(N)==27){M.hide();this.focus();}},_onKeyUp:function(M){var N;if(this._isActivationKey(L.getCharCode(M))){N=this.get("type");if(N=="checkbox"||N=="radio"){this.set("checked",!(this.get("checked")));}this._activationKeyPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}}},_onClick:function(P){var S=this.get("type"),M,Q,N,O,R;switch(S){case"radio":case"checkbox":if(this.get("checked")){M=(S=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE;}else{M=(S=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE;}this.set("title",M!
 );break;case"submit":this.submitForm();break;case"reset":Q=this.getForm();if(Q){Q.reset();}break;case"menu":M=this._menu.cfg.getProperty("visible")?this.MENUBUTTON_MENU_VISIBLE_TITLE:this.MENUBUTTON_DEFAULT_TITLE;this.set("title",M);break;case"split":O=this.get("element");R=L.getPageX(P)-G.getX(O);if((O.offsetWidth-this.OPTION_AREA_WIDTH)<R){return false;}else{this._hideMenu();N=this.get("srcelement");if(N&&N.type=="submit"){this.submitForm();}}M=this._menu.cfg.getProperty("visible")?this.SPLITBUTTON_OPTION_VISIBLE_TITLE:this.SPLITBUTTON_DEFAULT_TITLE;this.set("title",M);break;}},_onAppendTo:function(N){var M=this;window.setTimeout(function(){M._addListenersToForm();},0);},_onFormReset:function(N){var O=this.get("type"),M=this._menu;if(O=="checkbox"||O=="radio"){this.resetValue("checked");}if(J&&M&&(M instanceof J)){this.resetValue("selectedMenuItem");}},_onDocumentMouseDown:function(P){var M=L.getTarget(P),O=this.get("element"),N=this._menu.element;if(M!=O&&!G.isAncestor(O!
 ,M)&&M!=N&&!G.isAncestor(N,M)){this._hideMenu();L.removeListen!
 er(docum
ent,"mousedown",this._onDocumentMouseDown);}},_onOption:function(M){if(this.hasClass("yui-split-button-activeoption")){this._hideMenu();this._bOptionPressed=false;}else{this._showMenu(M);this._bOptionPressed=true;}},_onOverlayBeforeShow:function(N){var M=this._menu;M.render(this.get("element").parentNode);M.beforeShowEvent.unsubscribe(this._onOverlayBeforeShow);},_onMenuShow:function(N){L.on(document,"mousedown",this._onDocumentMouseDown,null,this);var M,O;if(this.get("type")=="split"){M=this.SPLITBUTTON_OPTION_VISIBLE_TITLE;O="activeoption";}else{M=this.MENUBUTTON_MENU_VISIBLE_TITLE;O="active";}this.addStateCSSClasses(O);this.set("title",M);},_onMenuHide:function(O){var N=this._menu,M,P;if(this.get("type")=="split"){M=this.SPLITBUTTON_DEFAULT_TITLE;P="activeoption";}else{M=this.MENUBUTTON_DEFAULT_TITLE;P="active";}this.removeStateCSSClasses(P);this.set("title",M);if(this.get("type")=="split"){this._bOptionPressed=false;}},_onMenuKeyDown:function(O,N){var M=N[0];if(L.getChar!
 Code(M)==27){this.focus();if(this.get("type")=="split"){this._bOptionPressed=false;}}},_onMenuRender:function(N){var P=this.get("element"),M=P.parentNode,O=this._menu.element;if(M!=O.parentNode){M.appendChild(O);}this.set("selectedMenuItem",this.get("selectedMenuItem"));},_onMenuItemSelected:function(O,N,M){var P=N[0];if(P){this.set("selectedMenuItem",M);}},_onMenuItemAdded:function(O,N,M){var P=N[0];P.cfg.subscribeToConfigEvent("selected",this._onMenuItemSelected,P,this);},_onMenuClick:function(N,M){var P=M[1],O;if(P){O=this.get("srcelement");if(O&&O.type=="submit"){this.submitForm();}this._hideMenu();}},createButtonElement:function(M){var O=this.NODE_NAME,N=document.createElement(O);N.innerHTML="<"+O+" class=\"first-child\">"+(M=="link"?"<a></a>":"<button type=\"button\"></button>")+"</"+O+">";return N;},addStateCSSClasses:function(M){var N=this.get("type");if(I.isString(M)){if(M!="activeoption"){this.addClass(this.CSS_CLASS_NAME+("-"+M));}this.addClass("yui-"+N+("-button!
 -"+M));}},removeStateCSSClasses:function(M){var N=this.get("ty!
 pe");if(
I.isString(M)){this.removeClass(this.CSS_CLASS_NAME+("-"+M));this.removeClass("yui-"+N+("-button-"+M));}},createHiddenFields:function(){this.removeHiddenFields();var R=this.getForm(),U,N,P,S,T,O,Q,M;if(R&&!this.get("disabled")){N=this.get("type");P=(N=="checkbox"||N=="radio");if(P||(E==this)){U=F((P?N:"hidden"),this.get("name"),this.get("value"),this.get("checked"));if(U){if(P){U.style.display="none";}R.appendChild(U);}}S=this._menu;if(J&&S&&(S instanceof J)){M=S.srcElement;T=this.get("selectedMenuItem");if(T){if(M&&M.nodeName.toUpperCase()=="SELECT"){R.appendChild(M);M.selectedIndex=T.index;}else{Q=(T.value===null||T.value==="")?T.cfg.getProperty("text"):T.value;O=this.get("name");if(Q&&O){M=F("hidden",(O+"_options"),Q);R.appendChild(M);}}}}if(U&&M){this._hiddenFields=[U,M];}else{if(!U&&M){this._hiddenFields=M;}else{if(U&&!M){this._hiddenFields=U;}}}return this._hiddenFields;}},removeHiddenFields:function(){var P=this._hiddenFields,N,O;function M(Q){if(G.inDocument(Q)){Q.pa!
 rentNode.removeChild(Q);}}if(P){if(I.isArray(P)){N=P.length;if(N>0){O=N-1;do{M(P[O]);}while(O--);}}else{M(P);}this._hiddenFields=null;}},submitForm:function(){var P=this.getForm(),O=this.get("srcelement"),N=false,M;if(P){if(this.get("type")=="submit"||(O&&O.type=="submit")){E=this;}if(YAHOO.env.ua.ie){N=P.fireEvent("onsubmit");}else{M=document.createEvent("HTMLEvents");M.initEvent("submit",true,true);N=P.dispatchEvent(M);}if((YAHOO.env.ua.ie||YAHOO.env.ua.webkit)&&N){P.submit();}}return N;},init:function(M,T){var O=T.type=="link"?"a":"button",Q=T.srcelement,S=M.getElementsByTagName(O)[0],R;if(!S){R=M.getElementsByTagName("input")[0];if(R){S=document.createElement("button");S.setAttribute("type","button");R.parentNode.replaceChild(S,R);}}this._button=S;YAHOO.widget.Button.superclass.init.call(this,M,T);D[this.get("id")]=this;this.addClass(this.CSS_CLASS_NAME);this.addClass("yui-"+this.get("type")+"-button");
+L.on(this._button,"focus",this._onFocus,null,this);this.on("mouseover",this._onMouseOver);this.on("click",this._onClick);this.on("appendTo",this._onAppendTo);var V=this.get("container"),N=this.get("element"),U=G.inDocument(N),P;if(V){if(Q&&Q!=N){P=Q.parentNode;if(P){P.removeChild(Q);}}if(I.isString(V)){L.onContentReady(V,function(){this.appendTo(V);},null,this);}else{this.appendTo(V);}}else{if(!U&&Q&&Q!=N){P=Q.parentNode;if(P){this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:P});P.replaceChild(N,Q);this.fireEvent("appendTo",{type:"appendTo",target:P});}}else{if(this.get("type")!="link"&&U&&Q&&Q==N){this._addListenersToForm();}}}},initAttributes:function(N){var M=N||{};YAHOO.widget.Button.superclass.initAttributes.call(this,M);this.setAttributeConfig("type",{value:(M.type||"push"),validator:I.isString,writeOnce:true,method:this._setType});this.setAttributeConfig("label",{value:M.label,validator:I.isString,method:this._setLabel});this.setAttributeConfig("value",{!
 value:M.value});this.setAttributeConfig("name",{value:M.name,validator:I.isString});this.setAttributeConfig("tabindex",{value:M.tabindex,validator:I.isNumber,method:this._setTabIndex});this.configureAttribute("title",{value:M.title,validator:I.isString,method:this._setTitle});this.setAttributeConfig("disabled",{value:(M.disabled||false),validator:I.isBoolean,method:this._setDisabled});this.setAttributeConfig("href",{value:M.href,validator:I.isString,method:this._setHref});this.setAttributeConfig("target",{value:M.target,validator:I.isString,method:this._setTarget});this.setAttributeConfig("checked",{value:(M.checked||false),validator:I.isBoolean,method:this._setChecked});this.setAttributeConfig("container",{value:M.container,writeOnce:true});this.setAttributeConfig("srcelement",{value:M.srcelement,writeOnce:true});this.setAttributeConfig("menu",{value:null,method:this._setMenu,writeOnce:true});this.setAttributeConfig("lazyloadmenu",{value:(M.lazyloadmenu===false?false:true)!
 ,validator:I.isBoolean,writeOnce:true});this.setAttributeConfi!
 g("menuc
lassname",{value:(M.menuclassname||"yui-button-menu"),validator:I.isString,method:this._setMenuClassName,writeOnce:true});this.setAttributeConfig("selectedMenuItem",{value:null,method:this._setSelectedMenuItem});this.setAttributeConfig("onclick",{value:M.onclick,method:this._setOnClick});this.setAttributeConfig("focusmenu",{value:(M.focusmenu===false?false:true),validator:I.isBoolean});},focus:function(){if(!this.get("disabled")){this._button.focus();}},blur:function(){if(!this.get("disabled")){this._button.blur();}},hasFocus:function(){return(C==this);},isActive:function(){return this.hasClass(this.CSS_CLASS_NAME+"-active");},getMenu:function(){return this._menu;},getForm:function(){return this._button.form;},getHiddenFields:function(){return this._hiddenFields;},destroy:function(){var O=this.get("element"),N=O.parentNode,M=this._menu,Q;if(M){if(K&&K.find(M)){K.remove(M);}M.destroy();}L.purgeElement(O);L.purgeElement(this._button);L.removeListener(document,"mouseup",this._o!
 nDocumentMouseUp);L.removeListener(document,"keyup",this._onDocumentKeyUp);L.removeListener(document,"mousedown",this._onDocumentMouseDown);var P=this.getForm();if(P){L.removeListener(P,"reset",this._onFormReset);L.removeListener(P,"submit",this.createHiddenFields);}this.unsubscribeAll();if(N){N.removeChild(O);}delete D[this.get("id")];Q=G.getElementsByClassName(this.CSS_CLASS_NAME,this.NODE_NAME,P);if(I.isArray(Q)&&Q.length===0){L.removeListener(P,"keypress",YAHOO.widget.Button.onFormKeyPress);}},fireEvent:function(N,M){if(this.DOM_EVENTS[N]&&this.get("disabled")){return ;}YAHOO.widget.Button.superclass.fireEvent.call(this,N,M);},toString:function(){return("Button "+this.get("id"));}});YAHOO.widget.Button.onFormKeyPress=function(Q){var O=L.getTarget(Q),R=L.getCharCode(Q),P=O.nodeName&&O.nodeName.toUpperCase(),M=O.type,S=false,U,V,N,W;function T(Z){var Y,X;switch(Z.nodeName.toUpperCase()){case"INPUT":case"BUTTON":if(Z.type=="submit"&&!Z.disabled){if(!S&&!N){N=Z;}if(V&&!W){W!
 =Z;}}break;default:Y=Z.id;if(Y){U=D[Y];if(U){S=true;if(!U.get(!
 "disable
d")){X=U.get("srcelement");if(!V&&(U.get("type")=="submit"||(X&&X.type=="submit"))){V=U;}}}}break;}}if(R==13&&((P=="INPUT"&&(M=="text"||M=="password"||M=="checkbox"||M=="radio"||M=="file"))||P=="SELECT")){G.getElementsBy(T,"*",this);if(N){N.focus();}else{if(!N&&V){if(W){L.preventDefault(Q);}V.submitForm();}}}};YAHOO.widget.Button.addHiddenFieldsToForm=function(M){var R=G.getElementsByClassName(YAHOO.widget.Button.prototype.CSS_CLASS_NAME,"*",M),P=R.length,Q,N,O;if(P>0){for(O=0;O<P;O++){N=R[O].id;if(N){Q=D[N];if(Q){Q.createHiddenFields();}}}}};YAHOO.widget.Button.getButton=function(M){var N=D[M];if(N){return N;}};})();(function(){var C=YAHOO.util.Dom,B=YAHOO.util.Event,D=YAHOO.lang,A=YAHOO.widget.Button,E={};YAHOO.widget.ButtonGroup=function(J,H){var I=YAHOO.widget.ButtonGroup.superclass.constructor,K,G,F;if(arguments.length==1&&!D.isString(J)&&!J.nodeName){if(!J.id){F=C.generateId();J.id=F;}I.call(this,(this._createGroupElement()),J);}else{if(D.isString(J)){G=C.get(J);if(G){!
 if(G.nodeName.toUpperCase()==this.NODE_NAME){I.call(this,G,H);}}}else{K=J.nodeName.toUpperCase();if(K&&K==this.NODE_NAME){if(!J.id){J.id=C.generateId();}I.call(this,J,H);}}}};YAHOO.extend(YAHOO.widget.ButtonGroup,YAHOO.util.Element,{_buttons:null,NODE_NAME:"DIV",CSS_CLASS_NAME:"yui-buttongroup",_createGroupElement:function(){var F=document.createElement(this.NODE_NAME);return F;},_setDisabled:function(G){var H=this.getCount(),F;if(H>0){F=H-1;do{this._buttons[F].set("disabled",G);}while(F--);}},_onKeyDown:function(K){var G=B.getTarget(K),I=B.getCharCode(K),H=G.parentNode.parentNode.id,J=E[H],F=-1;if(I==37||I==38){F=(J.index===0)?(this._buttons.length-1):(J.index-1);}else{if(I==39||I==40){F=(J.index===(this._buttons.length-1))?0:(J.index+1);}}if(F>-1){this.check(F);this.getButton(F).focus();}},_onAppendTo:function(H){var I=this._buttons,G=I.length,F;for(F=0;F<G;F++){I[F].appendTo(this.get("element"));}},_onButtonCheckedChange:function(G,F){var I=G.newValue,H=this.get("checked!
 Button");
+if(I&&H!=F){if(H){H.set("checked",false,true);}this.set("checkedButton",F);this.set("value",F.get("value"));}else{if(H&&!H.set("checked")){H.set("checked",true,true);}}},init:function(I,H){this._buttons=[];YAHOO.widget.ButtonGroup.superclass.init.call(this,I,H);this.addClass(this.CSS_CLASS_NAME);var J=this.getElementsByClassName("yui-radio-button");if(J.length>0){this.addButtons(J);}function F(K){return(K.type=="radio");}J=C.getElementsBy(F,"input",this.get("element"));if(J.length>0){this.addButtons(J);}this.on("keydown",this._onKeyDown);this.on("appendTo",this._onAppendTo);var G=this.get("container");if(G){if(D.isString(G)){B.onContentReady(G,function(){this.appendTo(G);},null,this);}else{this.appendTo(G);}}},initAttributes:function(G){var F=G||{};YAHOO.widget.ButtonGroup.superclass.initAttributes.call(this,F);this.setAttributeConfig("name",{value:F.name,validator:D.isString});this.setAttributeConfig("disabled",{value:(F.disabled||false),validator:D.isBoolean,method:this._!
 setDisabled});this.setAttributeConfig("value",{value:F.value});this.setAttributeConfig("container",{value:F.container,writeOnce:true});this.setAttributeConfig("checkedButton",{value:null});},addButton:function(J){var L,K,G,F,H,I;if(J instanceof A&&J.get("type")=="radio"){L=J;}else{if(!D.isString(J)&&!J.nodeName){J.type="radio";L=new A(J);}else{L=new A(J,{type:"radio"});}}if(L){F=this._buttons.length;H=L.get("name");I=this.get("name");L.index=F;this._buttons[F]=L;E[L.get("id")]=L;if(H!=I){L.set("name",I);}if(this.get("disabled")){L.set("disabled",true);}if(L.get("checked")){this.set("checkedButton",L);}K=L.get("element");G=this.get("element");if(K.parentNode!=G){G.appendChild(K);}L.on("checkedChange",this._onButtonCheckedChange,L,this);return L;}},addButtons:function(G){var H,I,J,F;if(D.isArray(G)){H=G.length;J=[];if(H>0){for(F=0;F<H;F++){I=this.addButton(G[F]);if(I){J[J.length]=I;}}if(J.length>0){return J;}}}},removeButton:function(H){var I=this.getButton(H),G,F;if(I){this.!
 _buttons.splice(H,1);delete E[I.get("id")];I.removeListener("c!
 heckedCh
ange",this._onButtonCheckedChange);I.destroy();G=this._buttons.length;if(G>0){F=this._buttons.length-1;do{this._buttons[F].index=F;}while(F--);}}},getButton:function(F){if(D.isNumber(F)){return this._buttons[F];}},getButtons:function(){return this._buttons;},getCount:function(){return this._buttons.length;},focus:function(H){var I,G,F;if(D.isNumber(H)){I=this._buttons[H];if(I){I.focus();}}else{G=this.getCount();for(F=0;F<G;F++){I=this._buttons[F];if(!I.get("disabled")){I.focus();break;}}}},check:function(F){var G=this.getButton(F);if(G){G.set("checked",true);}},destroy:function(){var I=this._buttons.length,H=this.get("element"),F=H.parentNode,G;if(I>0){G=this._buttons.length-1;do{this._buttons[G].destroy();}while(G--);}B.purgeElement(H);F.removeChild(H);},toString:function(){return("ButtonGroup "+this.get("id"));}});})();YAHOO.register("button",YAHOO.widget.Button,{version:"2.4.1",build:"742"});
\ No newline at end of file

Added: trunk/root/static/yui/button/button.js
===================================================================
--- trunk/root/static/yui/button/button.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/button/button.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,4655 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+/**
+* @module button
+* @description <p>The Button Control enables the creation of rich, graphical 
+* buttons that function like traditional HTML form buttons.  <em>Unlike</em> 
+* tradition HTML form buttons, buttons created with the Button Control can have 
+* a label that is different from its value.  With the inclusion of the optional 
+* <a href="module_menu.html">Menu Control</a>, the Button Control can also be
+* used to create menu buttons and split buttons, controls that are not 
+* available natively in HTML.  The Button Control can also be thought of as a 
+* way to create more visually engaging implementations of the browser's 
+* default radio-button and check-box controls.</p>
+* <p>The Button Control supports the following types:</p>
+* <dl>
+* <dt>push</dt>
+* <dd>Basic push button that can execute a user-specified command when 
+* pressed.</dd>
+* <dt>link</dt>
+* <dd>Navigates to a specified url when pressed.</dd>
+* <dt>submit</dt>
+* <dd>Submits the parent form when pressed.</dd>
+* <dt>reset</dt>
+* <dd>Resets the parent form when pressed.</dd>
+* <dt>checkbox</dt>
+* <dd>Maintains a "checked" state that can be toggled on and off.</dd>
+* <dt>radio</dt>
+* <dd>Maintains a "checked" state that can be toggled on and off.  Use with 
+* the ButtonGroup class to create a set of controls that are mutually 
+* exclusive; checking one button in the set will uncheck all others in 
+* the group.</dd>
+* <dt>menu</dt>
+* <dd>When pressed will show/hide a menu.</dd>
+* <dt>split</dt>
+* <dd>Can execute a user-specified command or display a menu when pressed.</dd>
+* </dl>
+* @title Button
+* @namespace YAHOO.widget
+* @requires yahoo, dom, element, event
+* @optional container, menu
+*/
+
+
+(function () {
+
+
+    /**
+    * The Button class creates a rich, graphical button.
+    * @param {String} p_oElement String specifying the id attribute of the 
+    * <code><input></code>, <code><button></code>,
+    * <code><a></code>, or <code><span></code> element to 
+    * be used to create the button.
+    * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
+    * one-html.html#ID-6043025">HTMLInputElement</a>|<a href="http://www.w3.org
+    * /TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-34812697">
+    * HTMLButtonElement</a>|<a href="
+    * http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#
+    * ID-33759296">HTMLElement</a>} p_oElement Object reference for the 
+    * <code><input></code>, <code><button></code>, 
+    * <code><a></code>, or <code><span></code> element to be 
+    * used to create the button.
+    * @param {Object} p_oElement Object literal specifying a set of   
+    * configuration attributes used to create the button.
+    * @param {Object} p_oAttributes Optional. Object literal specifying a set  
+    * of configuration attributes used to create the button.
+    * @namespace YAHOO.widget
+    * @class Button
+    * @constructor
+    * @extends YAHOO.util.Element
+    */
+
+
+
+    // Shorthard for utilities
+
+    var Dom = YAHOO.util.Dom,
+        Event = YAHOO.util.Event,
+        Lang = YAHOO.lang,
+        Overlay = YAHOO.widget.Overlay,
+        Menu = YAHOO.widget.Menu,
+    
+    
+        // Private member variables
+    
+        m_oButtons = {},    // Collection of all Button instances
+        m_oOverlayManager = null,   // YAHOO.widget.OverlayManager instance
+        m_oSubmitTrigger = null,    // The button that submitted the form 
+        m_oFocusedButton = null;    // The button that has focus
+
+
+
+    // Private methods
+
+    
+    
+    /**
+    * @method createInputElement
+    * @description Creates an <code><input></code> element of the 
+    * specified type.
+    * @private
+    * @param {String} p_sType String specifying the type of 
+    * <code><input></code> element to create.
+    * @param {String} p_sName String specifying the name of 
+    * <code><input></code> element to create.
+    * @param {String} p_sValue String specifying the value of 
+    * <code><input></code> element to create.
+    * @param {String} p_bChecked Boolean specifying if the  
+    * <code><input></code> element is to be checked.
+    * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
+    * one-html.html#ID-6043025">HTMLInputElement</a>}
+    */
+    function createInputElement(p_sType, p_sName, p_sValue, p_bChecked) {
+    
+        var oInput,
+            sInput;
+    
+        if (Lang.isString(p_sType) && Lang.isString(p_sName)) {
+        
+            if (YAHOO.env.ua.ie) {
+        
+                /*
+                    For IE it is necessary to create the element with the 
+                    "type," "name," "value," and "checked" properties set all 
+                    at once.
+                */
+            
+                sInput = "<input type=\"" + p_sType + "\" name=\"" + 
+                    p_sName + "\"";
+        
+                if (p_bChecked) {
+        
+                    sInput += " checked";
+                
+                }
+                
+                sInput += ">";
+        
+                oInput = document.createElement(sInput);
+        
+            }
+            else {
+            
+                oInput = document.createElement("input");
+                oInput.name = p_sName;
+                oInput.type = p_sType;
+        
+                if (p_bChecked) {
+        
+                    oInput.checked = true;
+                
+                }
+        
+            }
+        
+            oInput.value = p_sValue;
+            
+            return oInput;
+        
+        }
+    
+    }
+    
+    
+    /**
+    * @method setAttributesFromSrcElement
+    * @description Gets the values for all the attributes of the source element 
+    * (either <code><input></code> or <code><a></code>) that 
+    * map to Button configuration attributes and sets them into a collection 
+    * that is passed to the Button constructor.
+    * @private
+    * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
+    * one-html.html#ID-6043025">HTMLInputElement</a>|<a href="http://www.w3.org/
+    * TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-
+    * 48250443">HTMLAnchorElement</a>} p_oElement Object reference to the HTML 
+    * element (either <code><input></code> or <code><span>
+    * </code>) used to create the button.
+    * @param {Object} p_oAttributes Object reference for the collection of 
+    * configuration attributes used to create the button.
+    */
+    function setAttributesFromSrcElement(p_oElement, p_oAttributes) {
+    
+        var sSrcElementNodeName = p_oElement.nodeName.toUpperCase(),
+            me = this,
+            oAttribute,
+            oRootNode,
+            sText;
+            
+    
+        /**
+        * @method setAttributeFromDOMAttribute
+        * @description Gets the value of the specified DOM attribute and sets it 
+        * into the collection of configuration attributes used to configure 
+        * the button.
+        * @private
+        * @param {String} p_sAttribute String representing the name of the 
+        * attribute to retrieve from the DOM element.
+        */
+        function setAttributeFromDOMAttribute(p_sAttribute) {
+    
+            if (!(p_sAttribute in p_oAttributes)) {
+    
+                /*
+                    Need to use "getAttributeNode" instead of "getAttribute" 
+                    because using "getAttribute," IE will return the innerText 
+                    of a <code><button></code> for the value attribute  
+                    rather than the value of the "value" attribute.
+                */
+        
+                oAttribute = p_oElement.getAttributeNode(p_sAttribute);
+        
+    
+                if (oAttribute && ("value" in oAttribute)) {
+    
+    
+                    p_oAttributes[p_sAttribute] = oAttribute.value;
+    
+                }
+    
+            }
+        
+        }
+    
+    
+        /**
+        * @method setFormElementProperties
+        * @description Gets the value of the attributes from the form element  
+        * and sets them into the collection of configuration attributes used to 
+        * configure the button.
+        * @private
+        */
+        function setFormElementProperties() {
+    
+            setAttributeFromDOMAttribute("type");
+    
+            if (p_oAttributes.type == "button") {
+            
+                p_oAttributes.type = "push";
+            
+            }
+    
+            if (!("disabled" in p_oAttributes)) {
+    
+                p_oAttributes.disabled = p_oElement.disabled;
+    
+            }
+    
+            setAttributeFromDOMAttribute("name");
+            setAttributeFromDOMAttribute("value");
+            setAttributeFromDOMAttribute("title");
+    
+        }
+
+    
+        switch (sSrcElementNodeName) {
+        
+        case "A":
+            
+            p_oAttributes.type = "link";
+            
+            setAttributeFromDOMAttribute("href");
+            setAttributeFromDOMAttribute("target");
+        
+            break;
+    
+        case "INPUT":
+
+            setFormElementProperties();
+
+            if (!("checked" in p_oAttributes)) {
+    
+                p_oAttributes.checked = p_oElement.checked;
+    
+            }
+
+            break;
+
+        case "BUTTON":
+
+            setFormElementProperties();
+
+            oRootNode = p_oElement.parentNode.parentNode;
+
+            if (Dom.hasClass(oRootNode, this.CSS_CLASS_NAME + "-checked")) {
+            
+                p_oAttributes.checked = true;
+            
+            }
+
+            if (Dom.hasClass(oRootNode, this.CSS_CLASS_NAME + "-disabled")) {
+
+                p_oAttributes.disabled = true;
+            
+            }
+
+            p_oElement.removeAttribute("value");
+
+            p_oElement.setAttribute("type", "button");
+
+            break;
+        
+        }
+
+        p_oElement.removeAttribute("id");
+        p_oElement.removeAttribute("name");
+        
+        if (!("tabindex" in p_oAttributes)) {
+
+            p_oAttributes.tabindex = p_oElement.tabIndex;
+
+        }
+    
+        if (!("label" in p_oAttributes)) {
+    
+            // Set the "label" property
+        
+            sText = sSrcElementNodeName == "INPUT" ? 
+                            p_oElement.value : p_oElement.innerHTML;
+        
+    
+            if (sText && sText.length > 0) {
+                
+                p_oAttributes.label = sText;
+                
+            } 
+    
+        }
+    
+    }
+    
+    
+    /**
+    * @method initConfig
+    * @description Initializes the set of configuration attributes that are 
+    * used to instantiate the button.
+    * @private
+    * @param {Object} Object representing the button's set of 
+    * configuration attributes.
+    */
+    function initConfig(p_oConfig) {
+    
+        var oAttributes = p_oConfig.attributes,
+            oSrcElement = oAttributes.srcelement,
+            sSrcElementNodeName = oSrcElement.nodeName.toUpperCase(),
+            me = this;
+    
+    
+        if (sSrcElementNodeName == this.NODE_NAME) {
+    
+            p_oConfig.element = oSrcElement;
+            p_oConfig.id = oSrcElement.id;
+
+            Dom.getElementsBy(function (p_oElement) {
+            
+                switch (p_oElement.nodeName.toUpperCase()) {
+                
+                case "BUTTON":
+                case "A":
+                case "INPUT":
+
+                    setAttributesFromSrcElement.call(me, p_oElement, 
+                        oAttributes);
+
+                    break;                        
+                
+                }
+            
+            }, "*", oSrcElement);
+        
+        }
+        else {
+    
+            switch (sSrcElementNodeName) {
+
+            case "BUTTON":
+            case "A":
+            case "INPUT":
+
+                setAttributesFromSrcElement.call(this, oSrcElement, 
+                    oAttributes);
+
+                break;
+
+            }
+        
+        }
+    
+    }
+
+
+
+    //  Constructor
+
+    YAHOO.widget.Button = function (p_oElement, p_oAttributes) {
+    
+        var fnSuperClass = YAHOO.widget.Button.superclass.constructor,
+            oConfig,
+            oElement;
+    
+        if (arguments.length == 1 && !Lang.isString(p_oElement) && 
+            !p_oElement.nodeName) {
+    
+            if (!p_oElement.id) {
+    
+                p_oElement.id = Dom.generateId();
+    
+    
+            }
+    
+    
+    
+            fnSuperClass.call(this, 
+                (this.createButtonElement(p_oElement.type)),
+                p_oElement);
+    
+        }
+        else {
+    
+            oConfig = { element: null, attributes: (p_oAttributes || {}) };
+    
+    
+            if (Lang.isString(p_oElement)) {
+    
+                oElement = Dom.get(p_oElement);
+    
+                if (oElement) {
+
+                    if (!oConfig.attributes.id) {
+                    
+                        oConfig.attributes.id = p_oElement;
+                    
+                    }
+    
+                
+                
+                
+                    oConfig.attributes.srcelement = oElement;
+                
+                    initConfig.call(this, oConfig);
+                
+                
+                    if (!oConfig.element) {
+                
+                
+                        oConfig.element = 
+                            this.createButtonElement(oConfig.attributes.type);
+                
+                    }
+                
+                    fnSuperClass.call(this, oConfig.element, 
+                        oConfig.attributes);
+    
+                }
+    
+            }
+            else if (p_oElement.nodeName) {
+    
+                if (!oConfig.attributes.id) {
+    
+                    if (p_oElement.id) {
+        
+                        oConfig.attributes.id = p_oElement.id;
+                    
+                    }
+                    else {
+        
+                        oConfig.attributes.id = Dom.generateId();
+        
+        
+                    }
+    
+                }
+    
+    
+    
+    
+    
+                oConfig.attributes.srcelement = p_oElement;
+        
+                initConfig.call(this, oConfig);
+        
+        
+                if (!oConfig.element) {
+    
+            
+                    oConfig.element = 
+                        this.createButtonElement(oConfig.attributes.type);
+            
+                }
+            
+                fnSuperClass.call(this, oConfig.element, oConfig.attributes);
+            
+            }
+    
+        }
+    
+    };
+
+
+
+    YAHOO.extend(YAHOO.widget.Button, YAHOO.util.Element, {
+    
+    
+        // Protected properties
+        
+        
+        /** 
+        * @property _button
+        * @description Object reference to the button's internal 
+        * <code><a></code> or <code><button></code> element.
+        * @default null
+        * @protected
+        * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+        * level-one-html.html#ID-48250443">HTMLAnchorElement</a>|<a href="
+        * http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html
+        * #ID-34812697">HTMLButtonElement</a>
+        */
+        _button: null,
+        
+        
+        /** 
+        * @property _menu
+        * @description Object reference to the button's menu.
+        * @default null
+        * @protected
+        * @type {<a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>|
+        * <a href="YAHOO.widget.Menu.html">YAHOO.widget.Menu</a>}
+        */
+        _menu: null,
+        
+        
+        /** 
+        * @property _hiddenFields
+        * @description Object reference to the <code><input></code>  
+        * element, or array of HTML form elements used to represent the button
+        *  when its parent form is submitted.
+        * @default null
+        * @protected
+        * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+        * level-one-html.html#ID-6043025">HTMLInputElement</a>|Array
+        */
+        _hiddenFields: null,
+        
+        
+        /** 
+        * @property _onclickAttributeValue
+        * @description Object reference to the button's current value for the 
+        * "onclick" configuration attribute.
+        * @default null
+        * @protected
+        * @type Object
+        */
+        _onclickAttributeValue: null,
+        
+        
+        /** 
+        * @property _activationKeyPressed
+        * @description Boolean indicating if the key(s) that toggle the button's 
+        * "active" state have been pressed.
+        * @default false
+        * @protected
+        * @type Boolean
+        */
+        _activationKeyPressed: false,
+        
+        
+        /** 
+        * @property _activationButtonPressed
+        * @description Boolean indicating if the mouse button that toggles 
+        * the button's "active" state has been pressed.
+        * @default false
+        * @protected
+        * @type Boolean
+        */
+        _activationButtonPressed: false,
+        
+        
+        /** 
+        * @property _hasKeyEventHandlers
+        * @description Boolean indicating if the button's "blur", "keydown" and 
+        * "keyup" event handlers are assigned
+        * @default false
+        * @protected
+        * @type Boolean
+        */
+        _hasKeyEventHandlers: false,
+        
+        
+        /** 
+        * @property _hasMouseEventHandlers
+        * @description Boolean indicating if the button's "mouseout," 
+        * "mousedown," and "mouseup" event handlers are assigned
+        * @default false
+        * @protected
+        * @type Boolean
+        */
+        _hasMouseEventHandlers: false,
+        
+        
+        
+        // Constants
+        
+        
+        /**
+        * @property NODE_NAME
+        * @description The name of the node to be used for the button's 
+        * root element.
+        * @default "SPAN"
+        * @final
+        * @type String
+        */
+        NODE_NAME: "SPAN",
+        
+        
+        /**
+        * @property CHECK_ACTIVATION_KEYS
+        * @description Array of numbers representing keys that (when pressed) 
+        * toggle the button's "checked" attribute.
+        * @default [32]
+        * @final
+        * @type Array
+        */
+        CHECK_ACTIVATION_KEYS: [32],
+        
+        
+        /**
+        * @property ACTIVATION_KEYS
+        * @description Array of numbers representing keys that (when presed) 
+        * toggle the button's "active" state.
+        * @default [13, 32]
+        * @final
+        * @type Array
+        */
+        ACTIVATION_KEYS: [13, 32],
+        
+        
+        /**
+        * @property OPTION_AREA_WIDTH
+        * @description Width (in pixels) of the area of a split button that  
+        * when pressed will display a menu.
+        * @default 20
+        * @final
+        * @type Number
+        */
+        OPTION_AREA_WIDTH: 20,
+        
+        
+        /**
+        * @property CSS_CLASS_NAME
+        * @description String representing the CSS class(es) to be applied to  
+        * the button's root element.
+        * @default "yui-button"
+        * @final
+        * @type String
+        */
+        CSS_CLASS_NAME: "yui-button",
+        
+        
+        /**
+        * @property RADIO_DEFAULT_TITLE
+        * @description String representing the default title applied to buttons 
+        * of type "radio." 
+        * @default "Unchecked.  Click to check."
+        * @final
+        * @type String
+        */
+        RADIO_DEFAULT_TITLE: "Unchecked.  Click to check.",
+        
+        
+        /**
+        * @property RADIO_CHECKED_TITLE
+        * @description String representing the title applied to buttons of 
+        * type "radio" when checked.
+        * @default "Checked.  Click another button to uncheck"
+        * @final
+        * @type String
+        */
+        RADIO_CHECKED_TITLE: "Checked.  Click another button to uncheck",
+        
+        
+        /**
+        * @property CHECKBOX_DEFAULT_TITLE
+        * @description String representing the default title applied to 
+        * buttons of type "checkbox." 
+        * @default "Unchecked.  Click to check."
+        * @final
+        * @type String
+        */
+        CHECKBOX_DEFAULT_TITLE: "Unchecked.  Click to check.",
+        
+        
+        /**
+        * @property CHECKBOX_CHECKED_TITLE
+        * @description String representing the title applied to buttons of type 
+        * "checkbox" when checked.
+        * @default "Checked.  Click to uncheck."
+        * @final
+        * @type String
+        */
+        CHECKBOX_CHECKED_TITLE: "Checked.  Click to uncheck.",
+        
+        
+        /**
+        * @property MENUBUTTON_DEFAULT_TITLE
+        * @description String representing the default title applied to 
+        * buttons of type "menu." 
+        * @default "Menu collapsed.  Click to expand."
+        * @final
+        * @type String
+        */
+        MENUBUTTON_DEFAULT_TITLE: "Menu collapsed.  Click to expand.",
+        
+        
+        /**
+        * @property MENUBUTTON_MENU_VISIBLE_TITLE
+        * @description String representing the title applied to buttons of type 
+        * "menu" when the button's menu is visible. 
+        * @default "Menu expanded.  Click or press Esc to collapse."
+        * @final
+        * @type String
+        */
+        MENUBUTTON_MENU_VISIBLE_TITLE: 
+            "Menu expanded.  Click or press Esc to collapse.",
+        
+        
+        /**
+        * @property SPLITBUTTON_DEFAULT_TITLE
+        * @description  String representing the default title applied to 
+        * buttons of type "split." 
+        * @default "Menu collapsed.  Click inside option region or press 
+        * Ctrl + Shift + M to show the menu."
+        * @final
+        * @type String
+        */
+        SPLITBUTTON_DEFAULT_TITLE: ("Menu collapsed.  Click inside option " + 
+            "region or press Ctrl + Shift + M to show the menu."),
+        
+        
+        /**
+        * @property SPLITBUTTON_OPTION_VISIBLE_TITLE
+        * @description String representing the title applied to buttons of type 
+        * "split" when the button's menu is visible. 
+        * @default "Menu expanded.  Press Esc or Ctrl + Shift + M to hide 
+        * the menu."
+        * @final
+        * @type String
+        */
+        SPLITBUTTON_OPTION_VISIBLE_TITLE: 
+            "Menu expanded.  Press Esc or Ctrl + Shift + M to hide the menu.",
+        
+        
+        /**
+        * @property SUBMIT_TITLE
+        * @description String representing the title applied to buttons of 
+        * type "submit." 
+        * @default "Click to submit form."
+        * @final
+        * @type String
+        */
+        SUBMIT_TITLE: "Click to submit form.",
+        
+        
+        
+        // Protected attribute setter methods
+        
+        
+        /**
+        * @method _setType
+        * @description Sets the value of the button's "type" attribute.
+        * @protected
+        * @param {String} p_sType String indicating the value for the button's 
+        * "type" attribute.
+        */
+        _setType: function (p_sType) {
+        
+            if (p_sType == "split") {
+        
+                this.on("option", this._onOption);
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _setLabel
+        * @description Sets the value of the button's "label" attribute.
+        * @protected
+        * @param {String} p_sLabel String indicating the value for the button's 
+        * "label" attribute.
+        */
+        _setLabel: function (p_sLabel) {
+
+            this._button.innerHTML = p_sLabel;
+            
+            /*
+                Remove and add the default class name from the root element
+                for Gecko to ensure that the button shrinkwraps to the label.
+                Without this the button will not be rendered at the correct 
+                width when the label changes.  The most likely cause for this 
+                bug is button's use of the Gecko-specific CSS display type of 
+                "-moz-inline-box" to simulate "inline-block" supported by IE, 
+                Safari and Opera.
+            */
+            
+            var sClass,
+                me;
+            
+            if (YAHOO.env.ua.gecko && Dom.inDocument(this.get("element"))) {
+            
+                me = this;
+                sClass = this.CSS_CLASS_NAME;                
+
+                this.removeClass(sClass);
+                
+                window.setTimeout(function () {
+                
+                    me.addClass(sClass);
+                
+                }, 0);
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method _setTabIndex
+        * @description Sets the value of the button's "tabindex" attribute.
+        * @protected
+        * @param {Number} p_nTabIndex Number indicating the value for the 
+        * button's "tabindex" attribute.
+        */
+        _setTabIndex: function (p_nTabIndex) {
+        
+            this._button.tabIndex = p_nTabIndex;
+        
+        },
+        
+        
+        /**
+        * @method _setTitle
+        * @description Sets the value of the button's "title" attribute.
+        * @protected
+        * @param {String} p_nTabIndex Number indicating the value for 
+        * the button's "title" attribute.
+        */
+        _setTitle: function (p_sTitle) {
+        
+            var sTitle = p_sTitle;
+        
+            if (this.get("type") != "link") {
+        
+                if (!sTitle) {
+        
+                    switch (this.get("type")) {
+        
+                    case "radio":
+    
+                        sTitle = this.RADIO_DEFAULT_TITLE;
+    
+                        break;
+    
+                    case "checkbox":
+    
+                        sTitle = this.CHECKBOX_DEFAULT_TITLE;
+    
+                        break;
+                    
+                    case "menu":
+    
+                        sTitle = this.MENUBUTTON_DEFAULT_TITLE;
+    
+                        break;
+    
+                    case "split":
+    
+                        sTitle = this.SPLITBUTTON_DEFAULT_TITLE;
+    
+                        break;
+    
+                    case "submit":
+    
+                        sTitle = this.SUBMIT_TITLE;
+    
+                        break;
+        
+                    }
+        
+                }
+        
+                this._button.title = sTitle;
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _setDisabled
+        * @description Sets the value of the button's "disabled" attribute.
+        * @protected
+        * @param {Boolean} p_bDisabled Boolean indicating the value for 
+        * the button's "disabled" attribute.
+        */
+        _setDisabled: function (p_bDisabled) {
+        
+            if (this.get("type") != "link") {
+        
+                if (p_bDisabled) {
+        
+                    if (this._menu) {
+        
+                        this._menu.hide();
+        
+                    }
+        
+                    if (this.hasFocus()) {
+                    
+                        this.blur();
+                    
+                    }
+        
+                    this._button.setAttribute("disabled", "disabled");
+        
+                    this.addStateCSSClasses("disabled");
+
+                    this.removeStateCSSClasses("hover");
+                    this.removeStateCSSClasses("active");
+                    this.removeStateCSSClasses("focus");
+        
+                }
+                else {
+        
+                    this._button.removeAttribute("disabled");
+        
+                    this.removeStateCSSClasses("disabled");
+                
+                }
+        
+            }
+        
+        },
+
+        
+        /**
+        * @method _setHref
+        * @description Sets the value of the button's "href" attribute.
+        * @protected
+        * @param {String} p_sHref String indicating the value for the button's 
+        * "href" attribute.
+        */
+        _setHref: function (p_sHref) {
+        
+            if (this.get("type") == "link") {
+        
+                this._button.href = p_sHref;
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method _setTarget
+        * @description Sets the value of the button's "target" attribute.
+        * @protected
+        * @param {String} p_sTarget String indicating the value for the button's 
+        * "target" attribute.
+        */
+        _setTarget: function (p_sTarget) {
+        
+            if (this.get("type") == "link") {
+        
+                this._button.setAttribute("target", p_sTarget);
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method _setChecked
+        * @description Sets the value of the button's "target" attribute.
+        * @protected
+        * @param {Boolean} p_bChecked Boolean indicating the value for  
+        * the button's "checked" attribute.
+        */
+        _setChecked: function (p_bChecked) {
+        
+            var sType = this.get("type"),
+                sTitle;
+        
+            if (sType == "checkbox" || sType == "radio") {
+        
+                if (p_bChecked) {
+        
+                    this.addStateCSSClasses("checked");
+                    
+                    sTitle = (sType == "radio") ? 
+                                this.RADIO_CHECKED_TITLE : 
+                                this.CHECKBOX_CHECKED_TITLE;
+                
+                }
+                else {
+
+                    this.removeStateCSSClasses("checked");
+        
+                    sTitle = (sType == "radio") ? 
+                                this.RADIO_DEFAULT_TITLE : 
+                                this.CHECKBOX_DEFAULT_TITLE;
+                
+                }
+        
+                this.set("title", sTitle);
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _setMenu
+        * @description Sets the value of the button's "menu" attribute.
+        * @protected
+        * @param {Object} p_oMenu Object indicating the value for the button's 
+        * "menu" attribute.
+        */
+        _setMenu: function (p_oMenu) {
+
+            var bLazyLoad = this.get("lazyloadmenu"),
+                oButtonElement = this.get("element"),
+                sMenuCSSClassName,
+        
+                /*
+                    Boolean indicating if the value of p_oMenu is an instance 
+                    of YAHOO.widget.Menu or YAHOO.widget.Overlay.
+                */
+        
+                bInstance = false,
+        
+
+                oMenu,
+                oMenuElement,
+                oSrcElement,
+                aItems,
+                nItems,
+                oItem,
+                i;
+        
+        
+            if (!Overlay) {
+        
+        
+                return false;
+            
+            }
+
+
+            if (Menu) {
+            
+                sMenuCSSClassName = Menu.prototype.CSS_CLASS_NAME;
+            
+            }
+        
+        
+            function onAppendTo() {
+
+                oMenu.render(oButtonElement.parentNode);
+                
+                this.removeListener("appendTo", onAppendTo);
+            
+            }
+        
+        
+            function initMenu() {
+        
+                if (oMenu) {
+
+                    Dom.addClass(oMenu.element, this.get("menuclassname"));
+                    Dom.addClass(oMenu.element, 
+                            "yui-" + this.get("type") + "-button-menu");
+
+                    oMenu.showEvent.subscribe(this._onMenuShow, null, this);
+                    oMenu.hideEvent.subscribe(this._onMenuHide, null, this);
+                    oMenu.renderEvent.subscribe(this._onMenuRender, null, this);
+        
+        
+                    if (Menu && oMenu instanceof Menu) {
+        
+                        oMenu.keyDownEvent.subscribe(this._onMenuKeyDown, 
+                            this, true);
+
+                        oMenu.subscribe("click", this._onMenuClick, 
+                            this, true);
+
+                        oMenu.itemAddedEvent.subscribe(this._onMenuItemAdded, 
+                            this, true);
+        
+                        oSrcElement = oMenu.srcElement;
+        
+                        if (oSrcElement && 
+                            oSrcElement.nodeName.toUpperCase() == "SELECT") {
+                
+                            oSrcElement.style.display = "none";
+                            oSrcElement.parentNode.removeChild(oSrcElement);
+        
+                        }
+        
+                    }
+                    else if (Overlay && oMenu instanceof Overlay) {
+        
+                        if (!m_oOverlayManager) {
+        
+                            m_oOverlayManager = 
+                                new YAHOO.widget.OverlayManager();
+                        
+                        }
+                        
+                        m_oOverlayManager.register(oMenu);
+                        
+                    }
+        
+        
+                    this._menu = oMenu;
+
+        
+                    if (!bInstance) {
+        
+                        if (bLazyLoad && Menu && !(oMenu instanceof Menu)) {
+        
+                            /*
+                                Mimic Menu's "lazyload" functionality by adding  
+                                a "beforeshow" event listener that renders the 
+                                Overlay instance before it is made visible by  
+                                the button.
+                            */
+        
+                            oMenu.beforeShowEvent.subscribe(
+                                this._onOverlayBeforeShow, null, this);
+            
+                        }
+                        else if (!bLazyLoad) {
+        
+                            if (Dom.inDocument(oButtonElement)) {
+        
+                                oMenu.render(oButtonElement.parentNode);
+                            
+                            }
+                            else {
+            
+                                this.on("appendTo", onAppendTo);
+                            
+                            }
+                        
+                        }
+                    
+                    }
+        
+                }
+        
+            }
+        
+        
+            if (p_oMenu && Menu && (p_oMenu instanceof Menu)) {
+        
+                oMenu = p_oMenu;
+                aItems = oMenu.getItems();
+                nItems = aItems.length;
+                bInstance = true;
+        
+        
+                if (nItems > 0) {
+        
+                    i = nItems - 1;
+        
+                    do {
+        
+                        oItem = aItems[i];
+        
+                        if (oItem) {
+        
+                            oItem.cfg.subscribeToConfigEvent("selected", 
+                                this._onMenuItemSelected, 
+                                oItem, 
+                                this);
+        
+                        }
+        
+                    }
+                    while (i--);
+        
+                }
+        
+                initMenu.call(this);
+        
+            }
+            else if (Overlay && p_oMenu && (p_oMenu instanceof Overlay)) {
+        
+                oMenu = p_oMenu;
+                bInstance = true;
+        
+                oMenu.cfg.setProperty("visible", false);
+                oMenu.cfg.setProperty("context", [oButtonElement, "tl", "bl"]);
+        
+                initMenu.call(this);
+        
+            }
+            else if (Menu && Lang.isArray(p_oMenu)) {
+        
+                this.on("appendTo", function () {
+        
+                    oMenu = new Menu(Dom.generateId(), { lazyload: bLazyLoad, 
+                        itemdata: p_oMenu });
+        
+                    initMenu.call(this);
+        
+                });
+        
+            }
+            else if (Lang.isString(p_oMenu)) {
+        
+                oMenuElement = Dom.get(p_oMenu);
+        
+                if (oMenuElement) {
+        
+                    if (Menu && Dom.hasClass(oMenuElement, sMenuCSSClassName) || 
+                        oMenuElement.nodeName.toUpperCase() == "SELECT") {
+            
+                        oMenu = new Menu(p_oMenu, { lazyload: bLazyLoad });
+            
+                        initMenu.call(this);
+            
+                    }
+                    else if (Overlay) {
+        
+                        oMenu = new Overlay(p_oMenu, { visible: false, 
+                            context: [oButtonElement, "tl", "bl"] });
+            
+                        initMenu.call(this);
+            
+                    }
+        
+                }
+        
+            }
+            else if (p_oMenu && p_oMenu.nodeName) {
+        
+                if (Menu && Dom.hasClass(p_oMenu, sMenuCSSClassName) || 
+                        p_oMenu.nodeName.toUpperCase() == "SELECT") {
+        
+                    oMenu = new Menu(p_oMenu, { lazyload: bLazyLoad });
+                
+                    initMenu.call(this);
+        
+                }
+                else if (Overlay) {
+        
+                    if (!p_oMenu.id) {
+                    
+                        Dom.generateId(p_oMenu);
+                    
+                    }
+        
+                    oMenu = new Overlay(p_oMenu, { visible: false, 
+                                    context: [oButtonElement, "tl", "bl"] });
+        
+                    initMenu.call(this);
+                
+                }
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method _setOnClick
+        * @description Sets the value of the button's "onclick" attribute.
+        * @protected
+        * @param {Object} p_oObject Object indicating the value for the button's 
+        * "onclick" attribute.
+        */
+        _setOnClick: function (p_oObject) {
+        
+            /*
+                Remove any existing listeners if a "click" event handler 
+                has already been specified.
+            */
+        
+            if (this._onclickAttributeValue && 
+                (this._onclickAttributeValue != p_oObject)) {
+        
+                this.removeListener("click", this._onclickAttributeValue.fn);
+        
+                this._onclickAttributeValue = null;
+        
+            }
+        
+        
+            if (!this._onclickAttributeValue && 
+                Lang.isObject(p_oObject) && 
+                Lang.isFunction(p_oObject.fn)) {
+        
+                this.on("click", p_oObject.fn, p_oObject.obj, p_oObject.scope);
+        
+                this._onclickAttributeValue = p_oObject;
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _setSelectedMenuItem
+        * @description Sets the value of the button's 
+        * "selectedMenuItem" attribute.
+        * @protected
+        * @param {Number} p_nIndex Number representing the index of the item 
+        * in the button's menu that is currently selected.
+        */
+        _setSelectedMenuItem: function (p_nIndex) {
+
+            var oMenu = this._menu,
+                oMenuItem;
+
+
+            if (Menu && oMenu && oMenu instanceof Menu) {
+
+                oMenuItem = oMenu.getItem(p_nIndex);
+                
+
+                if (oMenuItem && !oMenuItem.cfg.getProperty("selected")) {
+                
+                    oMenuItem.cfg.setProperty("selected", true);
+                
+                }
+            
+            }
+
+        },
+        
+        
+        // Protected methods
+
+        
+        
+        /**
+        * @method _isActivationKey
+        * @description Determines if the specified keycode is one that toggles  
+        * the button's "active" state.
+        * @protected
+        * @param {Number} p_nKeyCode Number representing the keycode to 
+        * be evaluated.
+        * @return {Boolean}
+        */
+        _isActivationKey: function (p_nKeyCode) {
+        
+            var sType = this.get("type"),
+                aKeyCodes = (sType == "checkbox" || sType == "radio") ? 
+                    this.CHECK_ACTIVATION_KEYS : this.ACTIVATION_KEYS,
+        
+                nKeyCodes = aKeyCodes.length,
+                i;
+        
+            if (nKeyCodes > 0) {
+        
+                i = nKeyCodes - 1;
+        
+                do {
+        
+                    if (p_nKeyCode == aKeyCodes[i]) {
+        
+                        return true;
+        
+                    }
+        
+                }
+                while (i--);
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method _isSplitButtonOptionKey
+        * @description Determines if the specified keycode is one that toggles  
+        * the display of the split button's menu.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        * @return {Boolean}
+        */
+        _isSplitButtonOptionKey: function (p_oEvent) {
+        
+            return (p_oEvent.ctrlKey && p_oEvent.shiftKey && 
+                Event.getCharCode(p_oEvent) == 77);
+        
+        },
+        
+        
+        /**
+        * @method _addListenersToForm
+        * @description Adds event handlers to the button's form.
+        * @protected
+        */
+        _addListenersToForm: function () {
+        
+            var oForm = this.getForm(),
+                onFormKeyPress = YAHOO.widget.Button.onFormKeyPress,
+                bHasKeyPressListener,
+                oSrcElement,
+                aListeners,
+                nListeners,
+                i;
+        
+        
+            if (oForm) {
+        
+                Event.on(oForm, "reset", this._onFormReset, null, this);
+                Event.on(oForm, "submit", this.createHiddenFields, null, this);
+        
+                oSrcElement = this.get("srcelement");
+        
+        
+                if (this.get("type") == "submit" || 
+                    (oSrcElement && oSrcElement.type == "submit")) 
+                {
+                
+                    aListeners = Event.getListeners(oForm, "keypress");
+                    bHasKeyPressListener = false;
+            
+                    if (aListeners) {
+            
+                        nListeners = aListeners.length;
+        
+                        if (nListeners > 0) {
+            
+                            i = nListeners - 1;
+                            
+                            do {
+               
+                                if (aListeners[i].fn == onFormKeyPress) {
+                
+                                    bHasKeyPressListener = true;
+                                    break;
+                                
+                                }
+                
+                            }
+                            while (i--);
+                        
+                        }
+                    
+                    }
+            
+            
+                    if (!bHasKeyPressListener) {
+               
+                        Event.on(oForm, "keypress", onFormKeyPress);
+            
+                    }
+        
+                }
+            
+            }
+        
+        },
+        
+        
+        
+        /**
+        * @method _showMenu
+        * @description Shows the button's menu.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object 
+        * passed back by the event utility (YAHOO.util.Event) that triggered 
+        * the display of the menu.
+        */
+        _showMenu: function (p_oEvent) {
+
+            if (YAHOO.widget.MenuManager) {
+
+                YAHOO.widget.MenuManager.hideVisible();
+            
+            }
+
+        
+            if (m_oOverlayManager) {
+        
+                m_oOverlayManager.hideAll();
+            
+            }
+
+
+            var nViewportOffset = Overlay.VIEWPORT_OFFSET,   
+        
+                oMenu = this._menu,
+                oButton = this,
+                oButtonEL = oButton.get("element"),
+                bMenuFlipped = false,
+                nButtonY = Dom.getY(oButtonEL),
+                nScrollTop = Dom.getDocumentScrollTop(),
+                nMenuMinScrollHeight,
+                nMenuHeight,
+                oMenuShadow;
+    
+    
+            if (nScrollTop) {
+        
+                nButtonY = nButtonY - nScrollTop;
+        
+            }
+        
+        
+            var nTopRegion = nButtonY,
+                nBottomRegion = (Dom.getViewportHeight() - 
+                    (nButtonY + oButtonEL.offsetHeight));
+        
+
+            /*
+                 Uses the Button's position to calculate the availble height 
+                 above and below it to display its corresponding Menu.
+            */
+        
+            function getMenuDisplayRegionHeight() {
+        
+                if (bMenuFlipped) {
+        
+                    return (nTopRegion - nViewportOffset);
+        
+                }
+                else {
+        
+                    return (nBottomRegion - nViewportOffset);
+        
+                }
+        
+            }
+
+    
+    
+            /*
+                Sets the Menu's "maxheight" configuration property and trys to 
+                place the Menu in the best possible position (either above or 
+                below its corresponding Button).
+            */
+        
+            function sizeAndPositionMenu() {
+        
+                var nDisplayRegionHeight = getMenuDisplayRegionHeight();
+        
+        
+                if (nMenuHeight > nDisplayRegionHeight) {
+        
+                    nMenuMinScrollHeight = oMenu.cfg.getProperty("minscrollheight");
+        
+        
+                    if (nDisplayRegionHeight > nMenuMinScrollHeight) {
+        
+                        oMenu.cfg.setProperty("maxheight", 
+                                    nDisplayRegionHeight);
+            
+        
+                        if (bMenuFlipped) {
+                        
+                            oMenu.align("bl", "tl");
+                        
+                        }
+            
+                    }
+            
+        
+                    if (nDisplayRegionHeight < nMenuMinScrollHeight) {
+                   
+                        if (bMenuFlipped) {
+            
+                            /*
+                                 All possible positions and values for the 
+                                 "maxheight" configuration property have been 
+                                 tried, but none were successful, so fall back 
+                                 to the original size and position.
+                            */
+        
+                            oMenu.cfg.setProperty("context", 
+                                [oButtonEL, "tl", "bl"], true);
+
+                            oMenu.align("tl", "bl");
+                            
+                        }
+                        else {
+            
+                            oMenu.cfg.setProperty("context", 
+                                [oButtonEL, "bl", "tl"], true);
+
+                            oMenu.align("bl", "tl");
+            
+                            bMenuFlipped = true;
+            
+                            return sizeAndPositionMenu();
+            
+                        }
+                    
+                    }
+                
+                }
+        
+            }
+
+
+            if (Menu && oMenu && (oMenu instanceof Menu)) {
+        
+                oMenu.cfg.applyConfig({ context: [oButtonEL, "tl", "bl"],
+                    clicktohide: false,
+                    visible: true });
+                    
+                oMenu.cfg.fireQueue();
+                
+                oMenu.cfg.setProperty("maxheight", 0);
+            
+                oMenu.align("tl", "bl");
+        
+        
+                /*
+                    Stop the propagation of the event so that the MenuManager 
+                    doesn't blur the menu after it gets focus.
+                */
+        
+                if (p_oEvent.type == "mousedown") {
+        
+                    Event.stopPropagation(p_oEvent);
+        
+                }
+        
+                
+                nMenuHeight = oMenu.element.offsetHeight;
+                
+                oMenuShadow = oMenu.element.lastChild; 
+        
+                sizeAndPositionMenu();
+        
+                if (this.get("focusmenu")) {
+        
+                    this._menu.focus();
+                
+                }
+
+            }
+            else if (Overlay && oMenu && (oMenu instanceof Overlay)) {
+        
+                oMenu.show();
+                oMenu.align("tl", "bl");
+                
+                var nDisplayRegionHeight = getMenuDisplayRegionHeight();
+
+                nMenuHeight = oMenu.element.offsetHeight;
+
+
+                if (nDisplayRegionHeight < nMenuHeight) {
+
+                    oMenu.align("bl", "tl");
+
+                    bMenuFlipped = true;
+
+                    nDisplayRegionHeight = getMenuDisplayRegionHeight();
+
+                    if (nDisplayRegionHeight < nMenuHeight) {
+
+                        oMenu.align("tl", "bl");
+                    
+                    }
+
+                }
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _hideMenu
+        * @description Hides the button's menu.
+        * @protected
+        */
+        _hideMenu: function () {
+        
+            var oMenu = this._menu;
+        
+            if (oMenu) {
+        
+                oMenu.hide();
+        
+            }
+        
+        },
+        
+        
+        
+        
+        // Protected event handlers
+        
+        
+        /**
+        * @method _onMouseOver
+        * @description "mouseover" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onMouseOver: function (p_oEvent) {
+        
+            if (!this._hasMouseEventHandlers) {
+        
+                this.on("mouseout", this._onMouseOut);
+                this.on("mousedown", this._onMouseDown);
+                this.on("mouseup", this._onMouseUp);
+        
+                this._hasMouseEventHandlers = true;
+        
+            }
+        
+            this.addStateCSSClasses("hover");
+        
+            if (this._activationButtonPressed) {
+        
+                this.addStateCSSClasses("active");
+        
+            }
+        
+        
+            if (this._bOptionPressed) {
+        
+                this.addStateCSSClasses("activeoption");
+            
+            }
+
+
+            if (this._activationButtonPressed || this._bOptionPressed) {
+        
+                Event.removeListener(document, "mouseup", this._onDocumentMouseUp);
+        
+            }
+
+        },
+        
+        
+        /**
+        * @method _onMouseOut
+        * @description "mouseout" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onMouseOut: function (p_oEvent) {
+        
+            this.removeStateCSSClasses("hover");
+        
+            if (this.get("type") != "menu") {
+        
+                this.removeStateCSSClasses("active");
+        
+            }
+        
+            if (this._activationButtonPressed || this._bOptionPressed) {
+        
+                Event.on(document, "mouseup", this._onDocumentMouseUp, 
+                    null, this);
+        
+            }
+            
+        },
+        
+        
+        /**
+        * @method _onDocumentMouseUp
+        * @description "mouseup" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onDocumentMouseUp: function (p_oEvent) {
+        
+            this._activationButtonPressed = false;
+            this._bOptionPressed = false;
+        
+            var sType = this.get("type"),
+                oTarget,
+                oMenuElement;
+        
+            if (sType == "menu" || sType == "split") {
+
+                oTarget = Event.getTarget(p_oEvent);
+                oMenuElement = this._menu.element;
+        
+                if (oTarget != oMenuElement && 
+                    !Dom.isAncestor(oMenuElement, oTarget)) {
+
+                    this.removeStateCSSClasses((sType == "menu" ? 
+                        "active" : "activeoption"));
+            
+                    this._hideMenu();
+
+                }
+        
+            }
+        
+            Event.removeListener(document, "mouseup", this._onDocumentMouseUp);
+        
+        },
+        
+        
+        /**
+        * @method _onMouseDown
+        * @description "mousedown" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onMouseDown: function (p_oEvent) {
+        
+            var sType,
+                oElement,
+                nX,
+                me;
+        
+        
+            function onMouseUp() {
+            
+                this._hideMenu();
+                this.removeListener("mouseup", onMouseUp);
+            
+            }
+        
+        
+            if ((p_oEvent.which || p_oEvent.button) == 1) {
+        
+        
+                if (!this.hasFocus()) {
+                
+                    this.focus();
+                
+                }
+        
+        
+                sType = this.get("type");
+        
+        
+                if (sType == "split") {
+                
+                    oElement = this.get("element");
+                    nX = Event.getPageX(p_oEvent) - Dom.getX(oElement);
+        
+                    if ((oElement.offsetWidth - this.OPTION_AREA_WIDTH) < nX) {
+                        
+                        this.fireEvent("option", p_oEvent);
+        
+                    }
+                    else {
+        
+                        this.addStateCSSClasses("active");
+        
+                        this._activationButtonPressed = true;
+        
+                    }
+        
+                }
+                else if (sType == "menu") {
+        
+                    if (this.isActive()) {
+        
+                        this._hideMenu();
+        
+                        this._activationButtonPressed = false;
+        
+                    }
+                    else {
+        
+                        this._showMenu(p_oEvent);
+        
+                        this._activationButtonPressed = true;
+                    
+                    }
+        
+                }
+                else {
+        
+                    this.addStateCSSClasses("active");
+        
+                    this._activationButtonPressed = true;
+                
+                }
+        
+        
+        
+                if (sType == "split" || sType == "menu") {
+
+                    me = this;
+        
+                    this._hideMenuTimerId = window.setTimeout(function () {
+                    
+                        me.on("mouseup", onMouseUp);
+                    
+                    }, 250);
+        
+                }
+        
+            }
+            
+        },
+        
+        
+        /**
+        * @method _onMouseUp
+        * @description "mouseup" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onMouseUp: function (p_oEvent) {
+        
+            var sType = this.get("type");
+        
+        
+            if (this._hideMenuTimerId) {
+        
+                window.clearTimeout(this._hideMenuTimerId);
+        
+            }
+        
+        
+            if (sType == "checkbox" || sType == "radio") {
+        
+                this.set("checked", !(this.get("checked")));
+            
+            }
+        
+        
+            this._activationButtonPressed = false;
+            
+        
+            if (this.get("type") != "menu") {
+        
+                this.removeStateCSSClasses("active");
+            
+            }
+            
+        },
+        
+        
+        /**
+        * @method _onFocus
+        * @description "focus" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onFocus: function (p_oEvent) {
+        
+            var oElement;
+        
+            this.addStateCSSClasses("focus");
+        
+            if (this._activationKeyPressed) {
+        
+                this.addStateCSSClasses("active");
+           
+            }
+        
+            m_oFocusedButton = this;
+        
+        
+            if (!this._hasKeyEventHandlers) {
+        
+                oElement = this._button;
+        
+                Event.on(oElement, "blur", this._onBlur, null, this);
+                Event.on(oElement, "keydown", this._onKeyDown, null, this);
+                Event.on(oElement, "keyup", this._onKeyUp, null, this);
+        
+                this._hasKeyEventHandlers = true;
+        
+            }
+        
+        
+            this.fireEvent("focus", p_oEvent);
+        
+        },
+        
+        
+        /**
+        * @method _onBlur
+        * @description "blur" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onBlur: function (p_oEvent) {
+        
+            this.removeStateCSSClasses("focus");
+        
+            if (this.get("type") != "menu") {
+        
+                this.removeStateCSSClasses("active");
+
+            }    
+        
+            if (this._activationKeyPressed) {
+        
+                Event.on(document, "keyup", this._onDocumentKeyUp, null, this);
+        
+            }
+        
+        
+            m_oFocusedButton = null;
+        
+            this.fireEvent("blur", p_oEvent);
+           
+        },
+        
+        
+        /**
+        * @method _onDocumentKeyUp
+        * @description "keyup" event handler for the document.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onDocumentKeyUp: function (p_oEvent) {
+        
+            if (this._isActivationKey(Event.getCharCode(p_oEvent))) {
+        
+                this._activationKeyPressed = false;
+                
+                Event.removeListener(document, "keyup", this._onDocumentKeyUp);
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onKeyDown
+        * @description "keydown" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onKeyDown: function (p_oEvent) {
+        
+            var oMenu = this._menu;
+        
+        
+            if (this.get("type") == "split" && 
+                this._isSplitButtonOptionKey(p_oEvent)) {
+        
+                this.fireEvent("option", p_oEvent);
+        
+            }
+            else if (this._isActivationKey(Event.getCharCode(p_oEvent))) {
+        
+                if (this.get("type") == "menu") {
+        
+                    this._showMenu(p_oEvent);
+        
+                }
+                else {
+        
+                    this._activationKeyPressed = true;
+                    
+                    this.addStateCSSClasses("active");
+                
+                }
+            
+            }
+        
+        
+            if (oMenu && oMenu.cfg.getProperty("visible") && 
+                Event.getCharCode(p_oEvent) == 27) {
+            
+                oMenu.hide();
+                this.focus();
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onKeyUp
+        * @description "keyup" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onKeyUp: function (p_oEvent) {
+        
+            var sType;
+        
+            if (this._isActivationKey(Event.getCharCode(p_oEvent))) {
+        
+                sType = this.get("type");
+        
+                if (sType == "checkbox" || sType == "radio") {
+        
+                    this.set("checked", !(this.get("checked")));
+                
+                }
+        
+                this._activationKeyPressed = false;
+        
+                if (this.get("type") != "menu") {
+        
+                    this.removeStateCSSClasses("active");
+        
+                }
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onClick
+        * @description "click" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onClick: function (p_oEvent) {
+        
+            var sType = this.get("type"),
+                sTitle,
+                oForm,
+                oSrcElement,
+                oElement,
+                nX;
+        
+        
+            switch (sType) {
+        
+            case "radio":
+            case "checkbox":
+    
+                if (this.get("checked")) {
+                    
+                    sTitle = (sType == "radio") ? 
+                                this.RADIO_CHECKED_TITLE : 
+                                this.CHECKBOX_CHECKED_TITLE;
+                
+                }
+                else {
+                
+                    sTitle = (sType == "radio") ? 
+                                this.RADIO_DEFAULT_TITLE : 
+                                this.CHECKBOX_DEFAULT_TITLE;
+                
+                }
+                
+                this.set("title", sTitle);
+    
+                break;
+    
+            case "submit":
+    
+                this.submitForm();
+            
+                break;
+    
+            case "reset":
+    
+                oForm = this.getForm();
+    
+                if (oForm) {
+    
+                    oForm.reset();
+                
+                }
+    
+                break;
+    
+            case "menu":
+    
+                sTitle = this._menu.cfg.getProperty("visible") ? 
+                                this.MENUBUTTON_MENU_VISIBLE_TITLE : 
+                                this.MENUBUTTON_DEFAULT_TITLE;
+    
+                this.set("title", sTitle);
+    
+                break;
+    
+            case "split":
+    
+                oElement = this.get("element");
+                nX = Event.getPageX(p_oEvent) - Dom.getX(oElement);
+    
+                if ((oElement.offsetWidth - this.OPTION_AREA_WIDTH) < nX) {
+    
+                    return false;
+                
+                }
+                else {
+    
+                    this._hideMenu();
+        
+                    oSrcElement = this.get("srcelement");
+        
+                    if (oSrcElement && oSrcElement.type == "submit") {
+    
+                        this.submitForm();
+                    
+                    }
+                
+                }
+    
+                sTitle = this._menu.cfg.getProperty("visible") ? 
+                                this.SPLITBUTTON_OPTION_VISIBLE_TITLE : 
+                                this.SPLITBUTTON_DEFAULT_TITLE;
+    
+                this.set("title", sTitle);
+    
+                break;
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onAppendTo
+        * @description "appendTo" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onAppendTo: function (p_oEvent) {
+        
+            /*
+                It is necessary to call "_addListenersToForm" using 
+                "setTimeout" to make sure that the button's "form" property 
+                returns a node reference.  Sometimes, if you try to get the 
+                reference immediately after appending the field, it is null.
+            */
+        
+            var me = this;
+        
+            window.setTimeout(function () {
+        
+                me._addListenersToForm();
+        
+            }, 0);
+        
+        },
+        
+        
+        /**
+        * @method _onFormReset
+        * @description "reset" event handler for the button's form.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event 
+        * object passed back by the event utility (YAHOO.util.Event).
+        */
+        _onFormReset: function (p_oEvent) {
+        
+            var sType = this.get("type"),
+                oMenu = this._menu;
+        
+            if (sType == "checkbox" || sType == "radio") {
+        
+                this.resetValue("checked");
+        
+            }
+        
+        
+            if (Menu && oMenu && (oMenu instanceof Menu)) {
+        
+                this.resetValue("selectedMenuItem");
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onDocumentMouseDown
+        * @description "mousedown" event handler for the document.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onDocumentMouseDown: function (p_oEvent) {
+
+            var oTarget = Event.getTarget(p_oEvent),
+                oButtonElement = this.get("element"),
+                oMenuElement = this._menu.element;
+           
+        
+            if (oTarget != oButtonElement && 
+                !Dom.isAncestor(oButtonElement, oTarget) && 
+                oTarget != oMenuElement && 
+                !Dom.isAncestor(oMenuElement, oTarget)) {
+        
+                this._hideMenu();
+        
+                Event.removeListener(document, "mousedown", 
+                    this._onDocumentMouseDown);    
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onOption
+        * @description "option" event handler for the button.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onOption: function (p_oEvent) {
+        
+            if (this.hasClass("yui-split-button-activeoption")) {
+        
+                this._hideMenu();
+        
+                this._bOptionPressed = false;
+        
+            }
+            else {
+        
+                this._showMenu(p_oEvent);    
+        
+                this._bOptionPressed = true;
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onOverlayBeforeShow
+        * @description "beforeshow" event handler for the 
+        * <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a> instance 
+        * serving as the button's menu.
+        * @private
+        * @param {String} p_sType String representing the name of the event  
+        * that was fired.
+        */
+        _onOverlayBeforeShow: function (p_sType) {
+        
+            var oMenu = this._menu;
+        
+            oMenu.render(this.get("element").parentNode);
+            
+            oMenu.beforeShowEvent.unsubscribe(this._onOverlayBeforeShow);
+        
+        },
+        
+        
+        /**
+        * @method _onMenuShow
+        * @description "show" event handler for the button's menu.
+        * @private
+        * @param {String} p_sType String representing the name of the event  
+        * that was fired.
+        */
+        _onMenuShow: function (p_sType) {
+        
+            Event.on(document, "mousedown", this._onDocumentMouseDown, 
+                null, this);
+        
+            var sTitle,
+                sState;
+            
+            if (this.get("type") == "split") {
+        
+                sTitle = this.SPLITBUTTON_OPTION_VISIBLE_TITLE;
+                sState = "activeoption";
+            
+            }
+            else {
+        
+                sTitle = this.MENUBUTTON_MENU_VISIBLE_TITLE;        
+                sState = "active";
+        
+            }
+        
+            this.addStateCSSClasses(sState);
+            this.set("title", sTitle);
+        
+        },
+        
+        
+        /**
+        * @method _onMenuHide
+        * @description "hide" event handler for the button's menu.
+        * @private
+        * @param {String} p_sType String representing the name of the event  
+        * that was fired.
+        */
+        _onMenuHide: function (p_sType) {
+            
+            var oMenu = this._menu,
+                sTitle,
+                sState;
+        
+            
+            if (this.get("type") == "split") {
+        
+                sTitle = this.SPLITBUTTON_DEFAULT_TITLE;
+                sState = "activeoption";
+        
+            }
+            else {
+        
+                sTitle = this.MENUBUTTON_DEFAULT_TITLE;        
+                sState = "active";
+            }
+        
+        
+            this.removeStateCSSClasses(sState);
+            this.set("title", sTitle);
+        
+        
+            if (this.get("type") == "split") {
+        
+                this._bOptionPressed = false;
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onMenuKeyDown
+        * @description "keydown" event handler for the button's menu.
+        * @private
+        * @param {String} p_sType String representing the name of the event  
+        * that was fired.
+        * @param {Array} p_aArgs Array of arguments sent when the event 
+        * was fired.
+        */
+        _onMenuKeyDown: function (p_sType, p_aArgs) {
+        
+            var oEvent = p_aArgs[0];
+        
+            if (Event.getCharCode(oEvent) == 27) {
+        
+                this.focus();
+        
+                if (this.get("type") == "split") {
+                
+                    this._bOptionPressed = false;
+                
+                }
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onMenuRender
+        * @description "render" event handler for the button's menu.
+        * @private
+        * @param {String} p_sType String representing the name of the  
+        * event thatwas fired.
+        */
+        _onMenuRender: function (p_sType) {
+        
+            var oButtonElement = this.get("element"),
+                oButtonParent = oButtonElement.parentNode,
+                oMenuElement = this._menu.element;
+        
+        
+            if (oButtonParent != oMenuElement.parentNode) {
+        
+                oButtonParent.appendChild(oMenuElement);
+            
+            }
+
+            this.set("selectedMenuItem", this.get("selectedMenuItem"));
+
+        },
+        
+        
+        /**
+        * @method _onMenuItemSelected
+        * @description "selectedchange" event handler for each item in the 
+        * button's menu.
+        * @private
+        * @param {String} p_sType String representing the name of the event  
+        * that was fired.
+        * @param {Array} p_aArgs Array of arguments sent when the event 
+        * was fired.
+        * @param {MenuItem} p_oItem Object representing the menu item that
+        * subscribed to the event.
+        */
+        _onMenuItemSelected: function (p_sType, p_aArgs, p_oItem) {
+
+            var bSelected = p_aArgs[0];
+
+            if (bSelected) {
+            
+                this.set("selectedMenuItem", p_oItem);
+
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onMenuItemAdded
+        * @description "itemadded" event handler for the button's menu.
+        * @private
+        * @param {String} p_sType String representing the name of the event  
+        * that was fired.
+        * @param {Array} p_aArgs Array of arguments sent when the event
+        * was fired.
+        * @param {<a href="YAHOO.widget.MenuItem.html">
+        * YAHOO.widget.MenuItem</a>} p_oItem Object representing the menu 
+        * item that subscribed to the event.
+        */
+        _onMenuItemAdded: function (p_sType, p_aArgs, p_oItem) {
+            
+            var oItem = p_aArgs[0];
+        
+            oItem.cfg.subscribeToConfigEvent("selected", 
+                this._onMenuItemSelected, oItem, this);
+        
+        },
+        
+        
+        /**
+        * @method _onMenuClick
+        * @description "click" event handler for the button's menu.
+        * @private
+        * @param {String} p_sType String representing the name of the event  
+        * that was fired.
+        * @param {Array} p_aArgs Array of arguments sent when the event 
+        * was fired.
+        */
+        _onMenuClick: function (p_sType, p_aArgs) {
+
+            var oItem = p_aArgs[1],
+                oSrcElement;
+        
+            if (oItem) {
+        
+                oSrcElement = this.get("srcelement");
+            
+                if (oSrcElement && oSrcElement.type == "submit") {
+        
+                    this.submitForm();
+            
+                }
+            
+                this._hideMenu();
+            
+            }
+        
+        },
+        
+        
+        
+        // Public methods
+        
+        
+        /**
+        * @method createButtonElement
+        * @description Creates the button's HTML elements.
+        * @param {String} p_sType String indicating the type of element 
+        * to create.
+        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+        * level-one-html.html#ID-58190037">HTMLElement</a>}
+        */
+        createButtonElement: function (p_sType) {
+        
+            var sNodeName = this.NODE_NAME,
+                oElement = document.createElement(sNodeName);
+        
+            oElement.innerHTML =  "<" + sNodeName + " class=\"first-child\">" + 
+                (p_sType == "link" ? "<a></a>" : 
+                "<button type=\"button\"></button>") + "</" + sNodeName + ">";
+        
+            return oElement;
+        
+        },
+
+        
+        /**
+        * @method addStateCSSClasses
+        * @description Appends state-specific CSS classes to the button's root 
+        * DOM element.
+        */
+        addStateCSSClasses: function (p_sState) {
+        
+            var sType = this.get("type");
+        
+            if (Lang.isString(p_sState)) {
+        
+                if (p_sState != "activeoption") {
+        
+                    this.addClass(this.CSS_CLASS_NAME + ("-" + p_sState));
+        
+                }
+        
+                this.addClass("yui-" + sType + ("-button-" + p_sState));
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method removeStateCSSClasses
+        * @description Removes state-specific CSS classes to the button's root 
+        * DOM element.
+        */
+        removeStateCSSClasses: function (p_sState) {
+        
+            var sType = this.get("type");
+        
+            if (Lang.isString(p_sState)) {
+        
+                this.removeClass(this.CSS_CLASS_NAME + ("-" + p_sState));
+                this.removeClass("yui-" + sType + ("-button-" + p_sState));
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method createHiddenFields
+        * @description Creates the button's hidden form field and appends it 
+        * to its parent form.
+        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+        * level-one-html.html#ID-6043025">HTMLInputElement</a>|Array}
+        */
+        createHiddenFields: function () {
+        
+            this.removeHiddenFields();
+        
+            var oForm = this.getForm(),
+                oButtonField,
+                sType,     
+                bCheckable,
+                oMenu,
+                oMenuItem,
+                sName,
+                oValue,
+                oMenuField;
+        
+        
+            if (oForm && !this.get("disabled")) {
+        
+                sType = this.get("type");
+                bCheckable = (sType == "checkbox" || sType == "radio");
+        
+        
+                if (bCheckable || (m_oSubmitTrigger == this)) {
+                
+        
+                    oButtonField = createInputElement(
+                                    (bCheckable ? sType : "hidden"),
+                                    this.get("name"),
+                                    this.get("value"),
+                                    this.get("checked"));
+            
+            
+                    if (oButtonField) {
+            
+                        if (bCheckable) {
+            
+                            oButtonField.style.display = "none";
+            
+                        }
+            
+                        oForm.appendChild(oButtonField);
+            
+                    }
+        
+                }
+                    
+        
+                oMenu = this._menu;
+            
+            
+                if (Menu && oMenu && (oMenu instanceof Menu)) {
+        
+        
+                    oMenuField = oMenu.srcElement;
+                    oMenuItem = this.get("selectedMenuItem");
+
+                    if (oMenuItem) {
+
+                        if (oMenuField && 
+                            oMenuField.nodeName.toUpperCase() == "SELECT") {
+            
+                            oForm.appendChild(oMenuField);
+                            oMenuField.selectedIndex = oMenuItem.index;
+            
+                        }
+                        else {
+            
+                            oValue = (oMenuItem.value === null || 
+                                        oMenuItem.value === "") ? 
+                                        oMenuItem.cfg.getProperty("text") : 
+                                        oMenuItem.value;
+            
+                            sName = this.get("name");
+            
+                            if (oValue && sName) {
+            
+                                oMenuField = createInputElement("hidden", 
+                                                    (sName + "_options"),
+                                                    oValue);
+            
+                                oForm.appendChild(oMenuField);
+            
+                            }
+            
+                        }  
+                    
+                    }
+        
+                }
+            
+            
+                if (oButtonField && oMenuField) {
+        
+                    this._hiddenFields = [oButtonField, oMenuField];
+        
+                }
+                else if (!oButtonField && oMenuField) {
+        
+                    this._hiddenFields = oMenuField;
+                
+                }
+                else if (oButtonField && !oMenuField) {
+        
+                    this._hiddenFields = oButtonField;
+                
+                }
+        
+        
+                return this._hiddenFields;
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method removeHiddenFields
+        * @description Removes the button's hidden form field(s) from its 
+        * parent form.
+        */
+        removeHiddenFields: function () {
+        
+            var oField = this._hiddenFields,
+                nFields,
+                i;
+        
+            function removeChild(p_oElement) {
+        
+                if (Dom.inDocument(p_oElement)) {
+        
+                    p_oElement.parentNode.removeChild(p_oElement);
+                
+                }
+                
+            }
+            
+        
+            if (oField) {
+        
+                if (Lang.isArray(oField)) {
+        
+                    nFields = oField.length;
+                    
+                    if (nFields > 0) {
+                    
+                        i = nFields - 1;
+                        
+                        do {
+        
+                            removeChild(oField[i]);
+        
+                        }
+                        while (i--);
+                    
+                    }
+                
+                }
+                else {
+        
+                    removeChild(oField);
+        
+                }
+        
+                this._hiddenFields = null;
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method submitForm
+        * @description Submits the form to which the button belongs.  Returns  
+        * true if the form was submitted successfully, false if the submission 
+        * was cancelled.
+        * @protected
+        * @return {Boolean}
+        */
+        submitForm: function () {
+        
+            var oForm = this.getForm(),
+        
+                oSrcElement = this.get("srcelement"),
+        
+                /*
+                    Boolean indicating if the event fired successfully 
+                    (was not cancelled by any handlers)
+                */
+        
+                bSubmitForm = false,
+                
+                oEvent;
+        
+        
+            if (oForm) {
+        
+                if (this.get("type") == "submit" || 
+                    (oSrcElement && oSrcElement.type == "submit")) 
+                {
+        
+                    m_oSubmitTrigger = this;
+                    
+                }
+        
+        
+                if (YAHOO.env.ua.ie) {
+        
+                    bSubmitForm = oForm.fireEvent("onsubmit");
+        
+                }
+                else {  // Gecko, Opera, and Safari
+        
+                    oEvent = document.createEvent("HTMLEvents");
+                    oEvent.initEvent("submit", true, true);
+        
+                    bSubmitForm = oForm.dispatchEvent(oEvent);
+        
+                }
+        
+        
+                /*
+                    In IE and Safari, dispatching a "submit" event to a form 
+                    WILL cause the form's "submit" event to fire, but WILL NOT 
+                    submit the form.  Therefore, we need to call the "submit" 
+                    method as well.
+                */
+              
+                if ((YAHOO.env.ua.ie || YAHOO.env.ua.webkit) && bSubmitForm) {
+        
+                    oForm.submit();
+                
+                }
+            
+            }
+        
+            return bSubmitForm;
+            
+        },
+        
+        
+        /**
+        * @method init
+        * @description The Button class's initialization method.
+        * @param {String} p_oElement String specifying the id attribute of the 
+        * <code><input></code>, <code><button></code>,
+        * <code><a></code>, or <code><span></code> element to 
+        * be used to create the button.
+        * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+        * level-one-html.html#ID-6043025">HTMLInputElement</a>|<a href="http://
+        * www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html
+        * #ID-34812697">HTMLButtonElement</a>|<a href="http://www.w3.org/TR
+        * /2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-33759296">
+        * HTMLElement</a>} p_oElement Object reference for the 
+        * <code><input></code>, <code><button></code>, 
+        * <code><a></code>, or <code><span></code> element to be 
+        * used to create the button.
+        * @param {Object} p_oElement Object literal specifying a set of 
+        * configuration attributes used to create the button.
+        * @param {Object} p_oAttributes Optional. Object literal specifying a 
+        * set of configuration attributes used to create the button.
+        */
+        init: function (p_oElement, p_oAttributes) {
+        
+            var sNodeName = p_oAttributes.type == "link" ? "a" : "button",
+                oSrcElement = p_oAttributes.srcelement,
+                oButton = p_oElement.getElementsByTagName(sNodeName)[0],
+                oInput;
+        
+
+            if (!oButton) {
+
+                oInput = p_oElement.getElementsByTagName("input")[0];
+
+
+                if (oInput) {
+
+                    oButton = document.createElement("button");
+                    oButton.setAttribute("type", "button");
+
+                    oInput.parentNode.replaceChild(oButton, oInput);
+                
+                }
+
+            }
+
+            this._button = oButton;
+        
+
+            YAHOO.widget.Button.superclass.init.call(this, p_oElement, 
+                p_oAttributes);
+        
+        
+            m_oButtons[this.get("id")] = this;
+        
+        
+            this.addClass(this.CSS_CLASS_NAME);
+            
+            this.addClass("yui-" + this.get("type") + "-button");
+        
+            Event.on(this._button, "focus", this._onFocus, null, this);
+            this.on("mouseover", this._onMouseOver);
+            this.on("click", this._onClick);
+            this.on("appendTo", this._onAppendTo);
+            
+        
+            var oContainer = this.get("container"),
+                oElement = this.get("element"),
+                bElInDoc = Dom.inDocument(oElement),
+                oParentNode;
+
+
+            if (oContainer) {
+        
+                if (oSrcElement && oSrcElement != oElement) {
+                
+                    oParentNode = oSrcElement.parentNode;
+
+                    if (oParentNode) {
+                    
+                        oParentNode.removeChild(oSrcElement);
+                    
+                    }
+
+                }
+        
+                if (Lang.isString(oContainer)) {
+        
+                    Event.onContentReady(oContainer, function () {
+        
+                        this.appendTo(oContainer);
+                    
+                    }, null, this);
+        
+                }
+                else {
+        
+                    this.appendTo(oContainer);
+        
+                }
+        
+            }
+            else if (!bElInDoc && oSrcElement && oSrcElement != oElement) {
+
+                oParentNode = oSrcElement.parentNode;
+        
+                if (oParentNode) {
+        
+                    this.fireEvent("beforeAppendTo", {
+                        type: "beforeAppendTo",
+                        target: oParentNode
+                    });
+            
+                    oParentNode.replaceChild(oElement, oSrcElement);
+            
+                    this.fireEvent("appendTo", {
+                        type: "appendTo",
+                        target: oParentNode
+                    });
+                
+                }
+        
+            }
+            else if (this.get("type") != "link" && bElInDoc && oSrcElement && 
+                oSrcElement == oElement) {
+        
+                this._addListenersToForm();
+        
+            }
+        
+        
+        },
+        
+        
+        /**
+        * @method initAttributes
+        * @description Initializes all of the configuration attributes used to  
+        * create the button.
+        * @param {Object} p_oAttributes Object literal specifying a set of 
+        * configuration attributes used to create the button.
+        */
+        initAttributes: function (p_oAttributes) {
+        
+            var oAttributes = p_oAttributes || {};
+        
+            YAHOO.widget.Button.superclass.initAttributes.call(this, 
+                oAttributes);
+        
+        
+            /**
+            * @attribute type
+            * @description String specifying the button's type.  Possible 
+            * values are: "push," "link," "submit," "reset," "checkbox," 
+            * "radio," "menu," and "split."
+            * @default "push"
+            * @type String
+            */
+            this.setAttributeConfig("type", {
+        
+                value: (oAttributes.type || "push"),
+                validator: Lang.isString,
+                writeOnce: true,
+                method: this._setType
+        
+            });
+        
+        
+            /**
+            * @attribute label
+            * @description String specifying the button's text label 
+            * or innerHTML.
+            * @default null
+            * @type String
+            */
+            this.setAttributeConfig("label", {
+        
+                value: oAttributes.label,
+                validator: Lang.isString,
+                method: this._setLabel
+        
+            });
+        
+        
+            /**
+            * @attribute value
+            * @description Object specifying the value for the button.
+            * @default null
+            * @type Object
+            */
+            this.setAttributeConfig("value", {
+        
+                value: oAttributes.value
+        
+            });
+        
+        
+            /**
+            * @attribute name
+            * @description String specifying the name for the button.
+            * @default null
+            * @type String
+            */
+            this.setAttributeConfig("name", {
+        
+                value: oAttributes.name,
+                validator: Lang.isString
+        
+            });
+        
+        
+            /**
+            * @attribute tabindex
+            * @description Number specifying the tabindex for the button.
+            * @default null
+            * @type Number
+            */
+            this.setAttributeConfig("tabindex", {
+        
+                value: oAttributes.tabindex,
+                validator: Lang.isNumber,
+                method: this._setTabIndex
+        
+            });
+        
+        
+            /**
+            * @attribute title
+            * @description String specifying the title for the button.
+            * @default null
+            * @type String
+            */
+            this.configureAttribute("title", {
+        
+                value: oAttributes.title,
+                validator: Lang.isString,
+                method: this._setTitle
+        
+            });
+        
+        
+            /**
+            * @attribute disabled
+            * @description Boolean indicating if the button should be disabled.  
+            * (Disabled buttons are dimmed and will not respond to user input 
+            * or fire events.  Does not apply to button's of type "link.")
+            * @default false
+            * @type Boolean
+            */
+            this.setAttributeConfig("disabled", {
+        
+                value: (oAttributes.disabled || false),
+                validator: Lang.isBoolean,
+                method: this._setDisabled
+        
+            });
+        
+        
+            /**
+            * @attribute href
+            * @description String specifying the href for the button.  Applies
+            * only to buttons of type "link."
+            * @type String
+            */
+            this.setAttributeConfig("href", {
+        
+                value: oAttributes.href,
+                validator: Lang.isString,
+                method: this._setHref
+        
+            });
+        
+        
+            /**
+            * @attribute target
+            * @description String specifying the target for the button.  
+            * Applies only to buttons of type "link."
+            * @type String
+            */
+            this.setAttributeConfig("target", {
+        
+                value: oAttributes.target,
+                validator: Lang.isString,
+                method: this._setTarget
+        
+            });
+        
+        
+            /**
+            * @attribute checked
+            * @description Boolean indicating if the button is checked. 
+            * Applies only to buttons of type "radio" and "checkbox."
+            * @default false
+            * @type Boolean
+            */
+            this.setAttributeConfig("checked", {
+        
+                value: (oAttributes.checked || false),
+                validator: Lang.isBoolean,
+                method: this._setChecked
+        
+            });
+        
+        
+            /**
+            * @attribute container
+            * @description HTML element reference or string specifying the id 
+            * attribute of the HTML element that the button's markup should be 
+            * rendered into.
+            * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+            * level-one-html.html#ID-58190037">HTMLElement</a>|String
+            * @default null
+            */
+            this.setAttributeConfig("container", {
+        
+                value: oAttributes.container,
+                writeOnce: true
+        
+            });
+        
+        
+            /**
+            * @attribute srcelement
+            * @description Object reference to the HTML element (either 
+            * <code><input></code> or <code><span></code>) 
+            * used to create the button.
+            * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+            * level-one-html.html#ID-58190037">HTMLElement</a>|String
+            * @default null
+            */
+            this.setAttributeConfig("srcelement", {
+        
+                value: oAttributes.srcelement,
+                writeOnce: true
+        
+            });
+        
+        
+            /**
+            * @attribute menu
+            * @description Object specifying the menu for the button.  
+            * The value can be one of the following:
+            * <ul>
+            * <li>Object specifying a <a href="YAHOO.widget.Menu.html">
+            * YAHOO.widget.Menu</a> instance.</li>
+            * <li>Object specifying a <a href="YAHOO.widget.Overlay.html">
+            * YAHOO.widget.Overlay</a> instance.</li>
+            * <li>String specifying the id attribute of the <code><div>
+            * </code> element used to create the menu.  By default the menu 
+            * will be created as an instance of 
+            * <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>.  
+            * If the <a href="YAHOO.widget.Menu.html#CSS_CLASS_NAME">
+            * default CSS class name for YAHOO.widget.Menu</a> is applied to 
+            * the <code><div></code> element, it will be created as an
+            * instance of <a href="YAHOO.widget.Menu.html">YAHOO.widget.Menu
+            * </a>.</li><li>String specifying the id attribute of the 
+            * <code><select></code> element used to create the menu.
+            * </li><li>Object specifying the <code><div></code> element
+            * used to create the menu.</li>
+            * <li>Object specifying the <code><select></code> element
+            * used to create the menu.</li>
+            * <li>Array of object literals, each representing a set of 
+            * <a href="YAHOO.widget.MenuItem.html">YAHOO.widget.MenuItem</a> 
+            * configuration attributes.</li>
+            * <li>Array of strings representing the text labels for each menu 
+            * item in the menu.</li>
+            * </ul>
+            * @type <a href="YAHOO.widget.Menu.html">YAHOO.widget.Menu</a>|<a 
+            * href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>|<a 
+            * href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
+            * one-html.html#ID-58190037">HTMLElement</a>|String|Array
+            * @default null
+            */
+            this.setAttributeConfig("menu", {
+        
+                value: null,
+                method: this._setMenu,
+                writeOnce: true
+            
+            });
+        
+        
+            /**
+            * @attribute lazyloadmenu
+            * @description Boolean indicating the value to set for the 
+            * <a href="YAHOO.widget.Menu.html#lazyLoad">"lazyload"</a>
+            * configuration property of the button's menu.  Setting 
+            * "lazyloadmenu" to <code>true </code> will defer rendering of 
+            * the button's menu until the first time it is made visible.  
+            * If "lazyloadmenu" is set to <code>false</code>, the button's 
+            * menu will be rendered immediately if the button is in the 
+            * document, or in response to the button's "appendTo" event if 
+            * the button is not yet in the document.  In either case, the 
+            * menu is rendered into the button's parent HTML element.  
+            * <em>This attribute does not apply if a 
+            * <a href="YAHOO.widget.Menu.html">YAHOO.widget.Menu</a> or 
+            * <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a> 
+            * instance is passed as the value of the button's "menu" 
+            * configuration attribute. <a href="YAHOO.widget.Menu.html">
+            * YAHOO.widget.Menu</a> or <a href="YAHOO.widget.Overlay.html">
+            * YAHOO.widget.Overlay</a> instances should be rendered before 
+            * being set as the value for the "menu" configuration 
+            * attribute.</em>
+            * @default true
+            * @type Boolean
+            */
+            this.setAttributeConfig("lazyloadmenu", {
+        
+                value: (oAttributes.lazyloadmenu === false ? false : true),
+                validator: Lang.isBoolean,
+                writeOnce: true
+        
+            });
+
+
+            /**
+            * @attribute menuclassname
+            * @description String representing the CSS class name to be 
+            * applied to the root element of the button's menu.
+            * @type String
+            * @default "yui-button-menu"
+            */
+            this.setAttributeConfig("menuclassname", {
+        
+                value: (oAttributes.menuclassname || "yui-button-menu"),
+                validator: Lang.isString,
+                method: this._setMenuClassName,
+                writeOnce: true
+        
+            });        
+
+
+            /**
+            * @attribute selectedMenuItem
+            * @description Object representing the item in the button's menu 
+            * that is currently selected.
+            * @type Number
+            * @default null
+            */
+            this.setAttributeConfig("selectedMenuItem", {
+        
+                value: null,
+                method: this._setSelectedMenuItem
+        
+            });
+        
+        
+            /**
+            * @attribute onclick
+            * @description Object literal representing the code to be executed  
+            * when the button is clicked.  Format:<br> <code> {<br> 
+            * <strong>fn:</strong> Function,   // The handler to call 
+            * when the event fires.<br> <strong>obj:</strong> Object, 
+            * // An object to pass back to the handler.<br> 
+            * <strong>scope:</strong> Object //  The object to use 
+            * for the scope of the handler.<br> } </code>
+            * @type Object
+            * @default null
+            */
+            this.setAttributeConfig("onclick", {
+        
+                value: oAttributes.onclick,
+                method: this._setOnClick
+            
+            });
+
+
+            /**
+            * @attribute focusmenu
+            * @description Boolean indicating whether or not the button's menu 
+            * should be focused when it is made visible.
+            * @type Boolean
+            * @default true
+            */
+            this.setAttributeConfig("focusmenu", {
+        
+                value: (oAttributes.focusmenu === false ? false : true),
+                validator: Lang.isBoolean
+        
+            });
+
+        },
+        
+        
+        /**
+        * @method focus
+        * @description Causes the button to receive the focus and fires the 
+        * button's "focus" event.
+        */
+        focus: function () {
+        
+            if (!this.get("disabled")) {
+        
+                this._button.focus();
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method blur
+        * @description Causes the button to lose focus and fires the button's
+        * "blur" event.
+        */
+        blur: function () {
+        
+            if (!this.get("disabled")) {
+        
+                this._button.blur();
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method hasFocus
+        * @description Returns a boolean indicating whether or not the button 
+        * has focus.
+        * @return {Boolean}
+        */
+        hasFocus: function () {
+        
+            return (m_oFocusedButton == this);
+        
+        },
+        
+        
+        /**
+        * @method isActive
+        * @description Returns a boolean indicating whether or not the button 
+        * is active.
+        * @return {Boolean}
+        */
+        isActive: function () {
+        
+            return this.hasClass(this.CSS_CLASS_NAME + "-active");
+        
+        },
+        
+        
+        /**
+        * @method getMenu
+        * @description Returns a reference to the button's menu.
+        * @return {<a href="YAHOO.widget.Overlay.html">
+        * YAHOO.widget.Overlay</a>|<a 
+        * href="YAHOO.widget.Menu.html">YAHOO.widget.Menu</a>}
+        */
+        getMenu: function () {
+        
+            return this._menu;
+        
+        },
+        
+        
+        /**
+        * @method getForm
+        * @description Returns a reference to the button's parent form.
+        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-
+        * 20000929/level-one-html.html#ID-40002357">HTMLFormElement</a>}
+        */
+        getForm: function () {
+        
+            return this._button.form;
+        
+        },
+        
+        
+        /** 
+        * @method getHiddenFields
+        * @description Returns an <code><input></code> element or 
+        * array of form elements used to represent the button when its parent 
+        * form is submitted.  
+        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+        * level-one-html.html#ID-6043025">HTMLInputElement</a>|Array}
+        */
+        getHiddenFields: function () {
+        
+            return this._hiddenFields;
+        
+        },
+        
+        
+        /**
+        * @method destroy
+        * @description Removes the button's element from its parent element and 
+        * removes all event handlers.
+        */
+        destroy: function () {
+        
+        
+            var oElement = this.get("element"),
+                oParentNode = oElement.parentNode,
+                oMenu = this._menu,
+                aButtons;
+        
+            if (oMenu) {
+        
+
+                if (m_oOverlayManager && m_oOverlayManager.find(oMenu)) {
+
+                    m_oOverlayManager.remove(oMenu);
+
+                }
+        
+                oMenu.destroy();
+        
+            }
+        
+        
+            Event.purgeElement(oElement);
+            Event.purgeElement(this._button);
+            Event.removeListener(document, "mouseup", this._onDocumentMouseUp);
+            Event.removeListener(document, "keyup", this._onDocumentKeyUp);
+            Event.removeListener(document, "mousedown", 
+                this._onDocumentMouseDown);
+        
+        
+            var oForm = this.getForm();
+            
+            if (oForm) {
+        
+                Event.removeListener(oForm, "reset", this._onFormReset);
+                Event.removeListener(oForm, "submit", this.createHiddenFields);
+        
+            }
+
+
+            this.unsubscribeAll();
+
+            if (oParentNode) {
+
+                oParentNode.removeChild(oElement);
+            
+            }
+        
+        
+            delete m_oButtons[this.get("id")];
+
+            aButtons = Dom.getElementsByClassName(this.CSS_CLASS_NAME, 
+                                this.NODE_NAME, oForm); 
+
+            if (Lang.isArray(aButtons) && aButtons.length === 0) {
+
+                Event.removeListener(oForm, "keypress", 
+                        YAHOO.widget.Button.onFormKeyPress);
+
+            }
+
+        
+        },
+        
+        
+        fireEvent: function (p_sType , p_aArgs) {
+        
+            //  Disabled buttons should not respond to DOM events
+        
+            if (this.DOM_EVENTS[p_sType] && this.get("disabled")) {
+        
+                return;
+        
+            }
+        
+            YAHOO.widget.Button.superclass.fireEvent.call(this, p_sType, 
+                p_aArgs);
+        
+        },
+        
+        
+        /**
+        * @method toString
+        * @description Returns a string representing the button.
+        * @return {String}
+        */
+        toString: function () {
+        
+            return ("Button " + this.get("id"));
+        
+        }
+    
+    });
+    
+    
+    /**
+    * @method YAHOO.widget.Button.onFormKeyPress
+    * @description "keypress" event handler for the button's form.
+    * @param {Event} p_oEvent Object representing the DOM event object passed 
+    * back by the event utility (YAHOO.util.Event).
+    */
+    YAHOO.widget.Button.onFormKeyPress = function (p_oEvent) {
+    
+        var oTarget = Event.getTarget(p_oEvent),
+            nCharCode = Event.getCharCode(p_oEvent),
+            sNodeName = oTarget.nodeName && oTarget.nodeName.toUpperCase(),
+            sType = oTarget.type,
+    
+            /*
+                Boolean indicating if the form contains any enabled or 
+                disabled YUI submit buttons
+            */
+    
+            bFormContainsYUIButtons = false,
+    
+            oButton,
+    
+            oYUISubmitButton,   // The form's first, enabled YUI submit button
+    
+            /*
+                 The form's first, enabled HTML submit button that precedes any 
+                 YUI submit button
+            */
+    
+            oPrecedingSubmitButton,
+            
+    
+            /*
+                 The form's first, enabled HTML submit button that follows a 
+                 YUI button
+            */
+            
+            oFollowingSubmitButton; 
+    
+    
+        function isSubmitButton(p_oElement) {
+    
+            var sId,
+                oSrcElement;
+    
+            switch (p_oElement.nodeName.toUpperCase()) {
+    
+            case "INPUT":
+            case "BUTTON":
+            
+                if (p_oElement.type == "submit" && !p_oElement.disabled) {
+                    
+                    if (!bFormContainsYUIButtons && 
+                        !oPrecedingSubmitButton) {
+
+                        oPrecedingSubmitButton = p_oElement;
+
+                    }
+                    
+                    if (oYUISubmitButton && !oFollowingSubmitButton) {
+                    
+                        oFollowingSubmitButton = p_oElement;
+                    
+                    }
+                
+                }
+
+                break;
+            
+
+            default:
+            
+                sId = p_oElement.id;
+    
+                if (sId) {
+    
+                    oButton = m_oButtons[sId];
+        
+                    if (oButton) {
+
+                        bFormContainsYUIButtons = true;
+        
+                        if (!oButton.get("disabled")) {
+
+                            oSrcElement = oButton.get("srcelement");
+    
+                            if (!oYUISubmitButton &&
+                                (oButton.get("type") == "submit" || 
+                                (oSrcElement && oSrcElement.type == "submit"))) 
+                            {
+
+                                oYUISubmitButton = oButton;
+                            
+                            }
+                        
+                        }
+                        
+                    }
+                
+                }
+
+                break;
+    
+            }
+    
+        }
+    
+    
+        if (nCharCode == 13 && ((sNodeName == "INPUT" && (sType == "text" || 
+            sType == "password" || sType == "checkbox" || sType == "radio" || 
+            sType == "file")) || sNodeName == "SELECT"))
+        {
+    
+            Dom.getElementsBy(isSubmitButton, "*", this);
+    
+    
+            if (oPrecedingSubmitButton) {
+    
+                /*
+                     Need to set focus to the first enabled submit button
+                     to make sure that IE includes its name and value 
+                     in the form's data set.
+                */
+    
+                oPrecedingSubmitButton.focus();
+            
+            }
+            else if (!oPrecedingSubmitButton && oYUISubmitButton) {
+    
+                if (oFollowingSubmitButton) {
+    
+                    /*
+                        Need to call "preventDefault" to ensure that 
+                        the name and value of the regular submit button 
+                        following the YUI button doesn't get added to the 
+                        form's data set when it is submitted.
+                    */
+    
+                    Event.preventDefault(p_oEvent);
+                
+                }
+    
+                oYUISubmitButton.submitForm();
+    
+            }
+            
+        }
+    
+    };
+    
+    
+    /**
+    * @method YAHOO.widget.Button.addHiddenFieldsToForm
+    * @description Searches the specified form and adds hidden fields for  
+    * instances of YAHOO.widget.Button that are of type "radio," "checkbox," 
+    * "menu," and "split."
+    * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
+    * one-html.html#ID-40002357">HTMLFormElement</a>} p_oForm Object reference 
+    * for the form to search.
+    */
+    YAHOO.widget.Button.addHiddenFieldsToForm = function (p_oForm) {
+    
+        var aButtons = Dom.getElementsByClassName(
+                            YAHOO.widget.Button.prototype.CSS_CLASS_NAME, 
+                            "*", 
+                            p_oForm),
+    
+            nButtons = aButtons.length,
+            oButton,
+            sId,
+            i;
+    
+        if (nButtons > 0) {
+    
+    
+            for (i = 0; i < nButtons; i++) {
+    
+                sId = aButtons[i].id;
+    
+                if (sId) {
+    
+                    oButton = m_oButtons[sId];
+        
+                    if (oButton) {
+           
+                        oButton.createHiddenFields();
+                        
+                    }
+                
+                }
+            
+            }
+    
+        }
+    
+    };
+    
+
+    /**
+    * @method YAHOO.widget.Button.getButton
+    * @description Returns a button with the specified id.
+    * @param {String} p_sId String specifying the id of the root node of the 
+    * HTML element representing the button to be retrieved.
+    * @return {YAHOO.widget.Button}
+    */
+    YAHOO.widget.Button.getButton = function (p_sId) {
+
+        var oButton = m_oButtons[p_sId];
+
+        if (oButton) {
+        
+            return oButton;
+        
+        }
+
+    };
+    
+    
+    // Events
+    
+    
+    /**
+    * @event focus
+    * @description Fires when the menu item receives focus.  Passes back a  
+    * single object representing the original DOM event object passed back by 
+    * the event utility (YAHOO.util.Event) when the event was fired.  See 
+    * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> 
+    * for more information on listening for this event.
+    * @type YAHOO.util.CustomEvent
+    */
+    
+    
+    /**
+    * @event blur
+    * @description Fires when the menu item loses the input focus.  Passes back  
+    * a single object representing the original DOM event object passed back by 
+    * the event utility (YAHOO.util.Event) when the event was fired.  See 
+    * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for  
+    * more information on listening for this event.
+    * @type YAHOO.util.CustomEvent
+    */
+    
+    
+    /**
+    * @event option
+    * @description Fires when the user invokes the button's option.  Passes 
+    * back a single object representing the original DOM event (either 
+    * "mousedown" or "keydown") that caused the "option" event to fire.  See 
+    * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> 
+    * for more information on listening for this event.
+    * @type YAHOO.util.CustomEvent
+    */
+
+})();
+(function () {
+
+    // Shorthard for utilities
+    
+    var Dom = YAHOO.util.Dom,
+        Event = YAHOO.util.Event,
+        Lang = YAHOO.lang,
+        Button = YAHOO.widget.Button,  
+    
+        // Private collection of radio buttons
+    
+        m_oButtons = {};
+
+
+
+    /**
+    * The ButtonGroup class creates a set of buttons that are mutually 
+    * exclusive; checking one button in the set will uncheck all others in the 
+    * button group.
+    * @param {String} p_oElement String specifying the id attribute of the 
+    * <code><div></code> element of the button group.
+    * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+    * level-one-html.html#ID-22445964">HTMLDivElement</a>} p_oElement Object 
+    * specifying the <code><div></code> element of the button group.
+    * @param {Object} p_oElement Object literal specifying a set of 
+    * configuration attributes used to create the button group.
+    * @param {Object} p_oAttributes Optional. Object literal specifying a set 
+    * of configuration attributes used to create the button group.
+    * @namespace YAHOO.widget
+    * @class ButtonGroup
+    * @constructor
+    * @extends YAHOO.util.Element
+    */
+    YAHOO.widget.ButtonGroup = function (p_oElement, p_oAttributes) {
+    
+        var fnSuperClass = YAHOO.widget.ButtonGroup.superclass.constructor,
+            sNodeName,
+            oElement,
+            sId;
+    
+        if (arguments.length == 1 && !Lang.isString(p_oElement) && 
+            !p_oElement.nodeName) {
+    
+            if (!p_oElement.id) {
+    
+                sId = Dom.generateId();
+    
+                p_oElement.id = sId;
+    
+    
+            }
+    
+    
+    
+            fnSuperClass.call(this, (this._createGroupElement()), p_oElement);
+    
+        }
+        else if (Lang.isString(p_oElement)) {
+    
+            oElement = Dom.get(p_oElement);
+    
+            if (oElement) {
+            
+                if (oElement.nodeName.toUpperCase() == this.NODE_NAME) {
+    
+            
+                    fnSuperClass.call(this, oElement, p_oAttributes);
+    
+                }
+    
+            }
+        
+        }
+        else {
+    
+            sNodeName = p_oElement.nodeName.toUpperCase();
+    
+            if (sNodeName && sNodeName == this.NODE_NAME) {
+        
+                if (!p_oElement.id) {
+        
+                    p_oElement.id = Dom.generateId();
+        
+        
+                }
+        
+        
+                fnSuperClass.call(this, p_oElement, p_oAttributes);
+    
+            }
+    
+        }
+    
+    };
+    
+    
+    YAHOO.extend(YAHOO.widget.ButtonGroup, YAHOO.util.Element, {
+    
+    
+        // Protected properties
+        
+        
+        /** 
+        * @property _buttons
+        * @description Array of buttons in the button group.
+        * @default null
+        * @protected
+        * @type Array
+        */
+        _buttons: null,
+        
+        
+        
+        // Constants
+        
+        
+        /**
+        * @property NODE_NAME
+        * @description The name of the tag to be used for the button 
+        * group's element. 
+        * @default "DIV"
+        * @final
+        * @type String
+        */
+        NODE_NAME: "DIV",
+        
+        
+        /**
+        * @property CSS_CLASS_NAME
+        * @description String representing the CSS class(es) to be applied  
+        * to the button group's element.
+        * @default "yui-buttongroup"
+        * @final
+        * @type String
+        */
+        CSS_CLASS_NAME: "yui-buttongroup",
+    
+    
+    
+        // Protected methods
+        
+        
+        /**
+        * @method _createGroupElement
+        * @description Creates the button group's element.
+        * @protected
+        * @return {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+        * level-one-html.html#ID-22445964">HTMLDivElement</a>}
+        */
+        _createGroupElement: function () {
+        
+            var oElement = document.createElement(this.NODE_NAME);
+        
+            return oElement;
+        
+        },
+        
+        
+        
+        // Protected attribute setter methods
+        
+        
+        /**
+        * @method _setDisabled
+        * @description Sets the value of the button groups's 
+        * "disabled" attribute.
+        * @protected
+        * @param {Boolean} p_bDisabled Boolean indicating the value for
+        * the button group's "disabled" attribute.
+        */
+        _setDisabled: function (p_bDisabled) {
+        
+            var nButtons = this.getCount(),
+                i;
+        
+            if (nButtons > 0) {
+        
+                i = nButtons - 1;
+                
+                do {
+        
+                    this._buttons[i].set("disabled", p_bDisabled);
+                
+                }
+                while (i--);
+        
+            }
+        
+        },
+        
+        
+        
+        // Protected event handlers
+        
+        
+        /**
+        * @method _onKeyDown
+        * @description "keydown" event handler for the button group.
+        * @protected
+        * @param {Event} p_oEvent Object representing the DOM event object  
+        * passed back by the event utility (YAHOO.util.Event).
+        */
+        _onKeyDown: function (p_oEvent) {
+        
+            var oTarget = Event.getTarget(p_oEvent),
+                nCharCode = Event.getCharCode(p_oEvent),
+                sId = oTarget.parentNode.parentNode.id,
+                oButton = m_oButtons[sId],
+                nIndex = -1;
+        
+        
+            if (nCharCode == 37 || nCharCode == 38) {
+        
+                nIndex = (oButton.index === 0) ? 
+                            (this._buttons.length - 1) : (oButton.index - 1);
+            
+            }
+            else if (nCharCode == 39 || nCharCode == 40) {
+        
+                nIndex = (oButton.index === (this._buttons.length - 1)) ? 
+                            0 : (oButton.index + 1);
+        
+            }
+        
+        
+            if (nIndex > -1) {
+        
+                this.check(nIndex);
+                this.getButton(nIndex).focus();
+            
+            }        
+        
+        },
+        
+        
+        /**
+        * @method _onAppendTo
+        * @description "appendTo" event handler for the button group.
+        * @protected
+        * @param {Event} p_oEvent Object representing the event that was fired.
+        */
+        _onAppendTo: function (p_oEvent) {
+        
+            var aButtons = this._buttons,
+                nButtons = aButtons.length,
+                i;
+        
+            for (i = 0; i < nButtons; i++) {
+        
+                aButtons[i].appendTo(this.get("element"));
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method _onButtonCheckedChange
+        * @description "checkedChange" event handler for each button in the 
+        * button group.
+        * @protected
+        * @param {Event} p_oEvent Object representing the event that was fired.
+        * @param {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}  
+        * p_oButton Object representing the button that fired the event.
+        */
+        _onButtonCheckedChange: function (p_oEvent, p_oButton) {
+        
+            var bChecked = p_oEvent.newValue,
+                oCheckedButton = this.get("checkedButton");
+        
+            if (bChecked && oCheckedButton != p_oButton) {
+        
+                if (oCheckedButton) {
+        
+                    oCheckedButton.set("checked", false, true);
+        
+                }
+        
+                this.set("checkedButton", p_oButton);
+                this.set("value", p_oButton.get("value"));
+        
+            }
+            else if (oCheckedButton && !oCheckedButton.set("checked")) {
+        
+                oCheckedButton.set("checked", true, true);
+        
+            }
+           
+        },
+        
+        
+        
+        // Public methods
+        
+        
+        /**
+        * @method init
+        * @description The ButtonGroup class's initialization method.
+        * @param {String} p_oElement String specifying the id attribute of the 
+        * <code><div></code> element of the button group.
+        * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+        * level-one-html.html#ID-22445964">HTMLDivElement</a>} p_oElement Object 
+        * specifying the <code><div></code> element of the button group.
+        * @param {Object} p_oElement Object literal specifying a set of  
+        * configuration attributes used to create the button group.
+        * @param {Object} p_oAttributes Optional. Object literal specifying a
+        * set of configuration attributes used to create the button group.
+        */
+        init: function (p_oElement, p_oAttributes) {
+        
+            this._buttons = [];
+        
+            YAHOO.widget.ButtonGroup.superclass.init.call(this, p_oElement, 
+                    p_oAttributes);
+        
+            this.addClass(this.CSS_CLASS_NAME);
+        
+        
+            var aButtons = this.getElementsByClassName("yui-radio-button");
+        
+        
+            if (aButtons.length > 0) {
+        
+        
+                this.addButtons(aButtons);
+        
+            }
+        
+        
+        
+            function isRadioButton(p_oElement) {
+        
+                return (p_oElement.type == "radio");
+        
+            }
+        
+            aButtons = 
+                Dom.getElementsBy(isRadioButton, "input", this.get("element"));
+        
+        
+            if (aButtons.length > 0) {
+        
+        
+                this.addButtons(aButtons);
+        
+            }
+        
+            this.on("keydown", this._onKeyDown);
+            this.on("appendTo", this._onAppendTo);
+        
+
+            var oContainer = this.get("container");
+
+            if (oContainer) {
+        
+                if (Lang.isString(oContainer)) {
+        
+                    Event.onContentReady(oContainer, function () {
+        
+                        this.appendTo(oContainer);            
+                    
+                    }, null, this);
+        
+                }
+                else {
+        
+                    this.appendTo(oContainer);
+        
+                }
+        
+            }
+        
+        
+        
+        },
+        
+        
+        /**
+        * @method initAttributes
+        * @description Initializes all of the configuration attributes used to  
+        * create the button group.
+        * @param {Object} p_oAttributes Object literal specifying a set of 
+        * configuration attributes used to create the button group.
+        */
+        initAttributes: function (p_oAttributes) {
+        
+            var oAttributes = p_oAttributes || {};
+        
+            YAHOO.widget.ButtonGroup.superclass.initAttributes.call(
+                this, oAttributes);
+        
+        
+            /**
+            * @attribute name
+            * @description String specifying the name for the button group.  
+            * This name will be applied to each button in the button group.
+            * @default null
+            * @type String
+            */
+            this.setAttributeConfig("name", {
+        
+                value: oAttributes.name,
+                validator: Lang.isString
+        
+            });
+        
+        
+            /**
+            * @attribute disabled
+            * @description Boolean indicating if the button group should be 
+            * disabled.  Disabling the button group will disable each button 
+            * in the button group.  Disabled buttons are dimmed and will not 
+            * respond to user input or fire events.
+            * @default false
+            * @type Boolean
+            */
+            this.setAttributeConfig("disabled", {
+        
+                value: (oAttributes.disabled || false),
+                validator: Lang.isBoolean,
+                method: this._setDisabled
+        
+            });
+        
+        
+            /**
+            * @attribute value
+            * @description Object specifying the value for the button group.
+            * @default null
+            * @type Object
+            */
+            this.setAttributeConfig("value", {
+        
+                value: oAttributes.value
+        
+            });
+        
+        
+            /**
+            * @attribute container
+            * @description HTML element reference or string specifying the id 
+            * attribute of the HTML element that the button group's markup
+            * should be rendered into.
+            * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+            * level-one-html.html#ID-58190037">HTMLElement</a>|String
+            * @default null
+            */
+            this.setAttributeConfig("container", {
+        
+                value: oAttributes.container,
+                writeOnce: true
+        
+            });
+        
+        
+            /**
+            * @attribute checkedButton
+            * @description Reference for the button in the button group that 
+            * is checked.
+            * @type {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}
+            * @default null
+            */
+            this.setAttributeConfig("checkedButton", {
+        
+                value: null
+        
+            });
+        
+        },
+        
+        
+        /**
+        * @method addButton
+        * @description Adds the button to the button group.
+        * @param {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}  
+        * p_oButton Object reference for the <a href="YAHOO.widget.Button.html">
+        * YAHOO.widget.Button</a> instance to be added to the button group.
+        * @param {String} p_oButton String specifying the id attribute of the 
+        * <code><input></code> or <code><span></code> element 
+        * to be used to create the button to be added to the button group.
+        * @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
+        * level-one-html.html#ID-6043025">HTMLInputElement</a>|<a href="
+        * http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#
+        * ID-33759296">HTMLElement</a>} p_oButton Object reference for the 
+        * <code><input></code> or <code><span></code> element 
+        * to be used to create the button to be added to the button group.
+        * @param {Object} p_oButton Object literal specifying a set of 
+        * <a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a> 
+        * configuration attributes used to configure the button to be added to 
+        * the button group.
+        * @return {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>} 
+        */
+        addButton: function (p_oButton) {
+        
+            var oButton,
+                oButtonElement,
+                oGroupElement,
+                nIndex,
+                sButtonName,
+                sGroupName;
+        
+        
+            if (p_oButton instanceof Button && 
+                p_oButton.get("type") == "radio") {
+        
+                oButton = p_oButton;
+        
+            }
+            else if (!Lang.isString(p_oButton) && !p_oButton.nodeName) {
+        
+                p_oButton.type = "radio";
+        
+                oButton = new Button(p_oButton);
+
+            }
+            else {
+        
+                oButton = new Button(p_oButton, { type: "radio" });
+        
+            }
+        
+        
+            if (oButton) {
+        
+                nIndex = this._buttons.length;
+                sButtonName = oButton.get("name");
+                sGroupName = this.get("name");
+        
+                oButton.index = nIndex;
+        
+                this._buttons[nIndex] = oButton;
+                m_oButtons[oButton.get("id")] = oButton;
+        
+        
+                if (sButtonName != sGroupName) {
+        
+                    oButton.set("name", sGroupName);
+                
+                }
+        
+        
+                if (this.get("disabled")) {
+        
+                    oButton.set("disabled", true);
+        
+                }
+        
+        
+                if (oButton.get("checked")) {
+        
+                    this.set("checkedButton", oButton);
+        
+                }
+
+                
+                oButtonElement = oButton.get("element");
+                oGroupElement = this.get("element");
+                
+                if (oButtonElement.parentNode != oGroupElement) {
+                
+                    oGroupElement.appendChild(oButtonElement);
+                
+                }
+        
+                
+                oButton.on("checkedChange", 
+                    this._onButtonCheckedChange, oButton, this);
+        
+        
+                return oButton;
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method addButtons
+        * @description Adds the array of buttons to the button group.
+        * @param {Array} p_aButtons Array of <a href="YAHOO.widget.Button.html">
+        * YAHOO.widget.Button</a> instances to be added 
+        * to the button group.
+        * @param {Array} p_aButtons Array of strings specifying the id 
+        * attribute of the <code><input></code> or <code><span>
+        * </code> elements to be used to create the buttons to be added to the 
+        * button group.
+        * @param {Array} p_aButtons Array of object references for the 
+        * <code><input></code> or <code><span></code> elements 
+        * to be used to create the buttons to be added to the button group.
+        * @param {Array} p_aButtons Array of object literals, each containing
+        * a set of <a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>  
+        * configuration attributes used to configure each button to be added 
+        * to the button group.
+        * @return {Array}
+        */
+        addButtons: function (p_aButtons) {
+    
+            var nButtons,
+                oButton,
+                aButtons,
+                i;
+        
+            if (Lang.isArray(p_aButtons)) {
+            
+                nButtons = p_aButtons.length;
+                aButtons = [];
+        
+                if (nButtons > 0) {
+        
+                    for (i = 0; i < nButtons; i++) {
+        
+                        oButton = this.addButton(p_aButtons[i]);
+                        
+                        if (oButton) {
+        
+                            aButtons[aButtons.length] = oButton;
+        
+                        }
+                    
+                    }
+        
+                    if (aButtons.length > 0) {
+        
+        
+                        return aButtons;
+        
+                    }
+                
+                }
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method removeButton
+        * @description Removes the button at the specified index from the 
+        * button group.
+        * @param {Number} p_nIndex Number specifying the index of the button 
+        * to be removed from the button group.
+        */
+        removeButton: function (p_nIndex) {
+        
+            var oButton = this.getButton(p_nIndex),
+                nButtons,
+                i;
+            
+            if (oButton) {
+        
+        
+                this._buttons.splice(p_nIndex, 1);
+                delete m_oButtons[oButton.get("id")];
+        
+                oButton.removeListener("checkedChange", 
+                    this._onButtonCheckedChange);
+
+                oButton.destroy();
+        
+        
+                nButtons = this._buttons.length;
+                
+                if (nButtons > 0) {
+        
+                    i = this._buttons.length - 1;
+                    
+                    do {
+        
+                        this._buttons[i].index = i;
+        
+                    }
+                    while (i--);
+                
+                }
+        
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method getButton
+        * @description Returns the button at the specified index.
+        * @param {Number} p_nIndex The index of the button to retrieve from the 
+        * button group.
+        * @return {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}
+        */
+        getButton: function (p_nIndex) {
+        
+            if (Lang.isNumber(p_nIndex)) {
+        
+                return this._buttons[p_nIndex];
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method getButtons
+        * @description Returns an array of the buttons in the button group.
+        * @return {Array}
+        */
+        getButtons: function () {
+        
+            return this._buttons;
+        
+        },
+        
+        
+        /**
+        * @method getCount
+        * @description Returns the number of buttons in the button group.
+        * @return {Number}
+        */
+        getCount: function () {
+        
+            return this._buttons.length;
+        
+        },
+        
+        
+        /**
+        * @method focus
+        * @description Sets focus to the button at the specified index.
+        * @param {Number} p_nIndex Number indicating the index of the button 
+        * to focus. 
+        */
+        focus: function (p_nIndex) {
+        
+            var oButton,
+                nButtons,
+                i;
+        
+            if (Lang.isNumber(p_nIndex)) {
+        
+                oButton = this._buttons[p_nIndex];
+                
+                if (oButton) {
+        
+                    oButton.focus();
+        
+                }
+            
+            }
+            else {
+        
+                nButtons = this.getCount();
+        
+                for (i = 0; i < nButtons; i++) {
+        
+                    oButton = this._buttons[i];
+        
+                    if (!oButton.get("disabled")) {
+        
+                        oButton.focus();
+                        break;
+        
+                    }
+        
+                }
+        
+            }
+        
+        },
+        
+        
+        /**
+        * @method check
+        * @description Checks the button at the specified index.
+        * @param {Number} p_nIndex Number indicating the index of the button 
+        * to check. 
+        */
+        check: function (p_nIndex) {
+        
+            var oButton = this.getButton(p_nIndex);
+            
+            if (oButton) {
+        
+                oButton.set("checked", true);
+            
+            }
+        
+        },
+        
+        
+        /**
+        * @method destroy
+        * @description Removes the button group's element from its parent 
+        * element and removes all event handlers.
+        */
+        destroy: function () {
+        
+        
+            var nButtons = this._buttons.length,
+                oElement = this.get("element"),
+                oParentNode = oElement.parentNode,
+                i;
+            
+            if (nButtons > 0) {
+        
+                i = this._buttons.length - 1;
+        
+                do {
+        
+                    this._buttons[i].destroy();
+        
+                }
+                while (i--);
+            
+            }
+        
+        
+            Event.purgeElement(oElement);
+            
+        
+            oParentNode.removeChild(oElement);
+        
+        },
+        
+        
+        /**
+        * @method toString
+        * @description Returns a string representing the button group.
+        * @return {String}
+        */
+        toString: function () {
+        
+            return ("ButtonGroup " + this.get("id"));
+        
+        }
+    
+    });
+
+})();
+YAHOO.register("button", YAHOO.widget.Button, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/calendar/README
===================================================================
--- trunk/root/static/yui/calendar/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/calendar/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,114 +1,345 @@
-Calendar Release Notes
+Calendar Release Notes 
 
-*** version 2.3.1 ***
+*** version 2.4.1 *** 
 
-	- Changed Calendar/CalendarGroup to render an empty title bar element when "close" is set to true, but "title" has not been set, to allow Sam Skin to render a title bar correctly.
+No change
 
-*** version 2.3.0 ***
+*** version 2.4.0 *** 
 
-	- Added checks to select, selectCell, deselect and deselectCell methods to ensure the Calendar/Calendar group was not set to an invalid state by programmatically selecting unselectable dates or cells.
-	- Added new locale configuration properties for the Month/Year label used in the Calendar header (MY_LABEL_MONTH_POSITION, MY_LABEL_YEAR_POSITION, MY_LABEL_YEAR_SUFFIX, MY_LABEL_MONTH_SUFFIX). Japan is an example locale, where customization of the Month/Year label is required.
-	- Changed "first", "last" class names to "first-of-type", "last-of-type", to avoid collision with YUI Grids' use of the "first" class name.
-	- Added public isDateOOB method, to check if a given date is outside of the minimum/maximum configuration dates of the Calendar.
-	- Deprecated YAHOO.widget.Calendar.browser, refactored to use YAHOO.env.ua instead.
-	- Removed overflow:hidden from default Calendar/CalendarGroup container for non-IE6 browsers to fix clipping issue with IE7 when CalendarGroup was inside a box with a specific width. overflow:hidden is still required for IE6 with an iframe shim.
-	- Added Opera container width calculation fix to CalendarGroup.show method, to fix incorrect wrapping when using a CalendarGroup which is initially rendered hidden (display:none). Previously this fix was only applied on render.
++ Added CalendarNavigator (year selector) feature to allow the user to 
+  jump to a year/month directly without having to scroll through months
+  sequentially. 
 
-*** version 2.2.2 ***
+  The feature is enabled/configured using the "navigator" configuration
+  property.
 
-	- Fixed problem with selected dates being shared across instances, when more than one Calendar/CalendarGroup was on the page
++ Added Custom Events: 
 
-*** version 2.2.1 ***
+    showNav/beforeShowNav
+    hideNav/beforeHideNav, 
+    renderNav/beforeRenderNav 
 
-	- Fixed problem with selectCell adding duplicate selected date entries for dates which were already selected
-	- Fixed problem with CalendarGroup iframe shim not covering the CalendarGroup title area
-	- Removed javascript:void(null) from close button and cell links which was interrupting form submission and firing onbeforeunload in IE
-	- Fixed problem with CalendarGroup getSelectedDates returning invalid results, when used in conjunction with the "selected" Config property (either passed in the constructor config argument or set seperately after construction)
-	- Refactored Calendar and CalendarGroup to improve performance, especially when working with a large number of instances in IE6
+  To Calendar/CalendarGroup, in support of the CalendarNavigator 
+  functionality. 
 
-*** version 2.2.0 ***
++ Added Custom Events:
 
-	- Image customization can now be done through CSS. Images for Close, Left and Right Arrows are now pulled in using CSS defined in calendar.css and by default use relative paths to the images in the same directory as calendar.css. 
-	- Deprecated Calendar.IMG_ROOT and NAV_ARROW_LEFT, NAV_ARROW_RIGHT configuration properties. Customizations based on older releases which set these properties will still function as expected.
-	- Deprecated CalendarGroup.CSS_2UPCLOSE. Calendar's Style.CSS_CLOSE property now represents the new default CSS class (calclose) for the close button. CSS_2UPCLOSE is still applied along with CSS_CLOSE to the new markup for the close button to support existing customizations of the CSS_2UPCLOSE CSS class (close-icon)
-	- Fixed problem with Safari setting Calendar pages to incorrect dates if the pages spanned a year boundary in CalendarGroups with 3 or more pages, due to a bug in Safari's implementation of Date setMonth
-	- Fixed problem with CalendarGroup setMonth rendering Calendar pages with incorrect dates in all browsers if current pages spanned year boundary
-	- Fixed incorrect CalendarGroup logging statement in calendar-debug.js
-	- Fixed domEventMap support for Safari versions prior to 2.0.2, caused by hasOwnProperty not being supported
-	- Removed unused private property : _pageDate from Calendar class
+    show/beforeShow
+    hide/beforeHide 
 
-*** version 0.12.2 ***
+  To Calendar and CalendarGroup. Returning false from a 
+  beforeShow/beforeHide listener can be used to prevent the Calendar 
+  from being shown/hidden respectively. 
 
-	- Corrected documentation for clearTime function to reflect the change from midnight to noon
++ Added Public Methods: 
 
-*** version 0.12.1 ***
+    getCellIndex(date)    [ Calendar ]
+    getCalendarPage(date) [ CalendarGroup ]
+    toDate(dateArray)     [ Calendar/CalendarGroup ]
+    removeRenderers()     [ Calendar/CalendarGroup ]
+    
++ The Calendar/CalendarGroup constructor is now more flexible: 
 
-	- Calendar and CalendarGroup now automatically parse the argument passed to setMonth and setYear into an integer, eliminating potential concatenation bugs. 
+    * It no longer requires an "id" argument. 
 
-*** version 0.12 ***
+      In it's simplest form, a Calendar/CalendarGroup can be 
+      constructed by simply providing a container id or reference.
 
-	- New documentation format implemented
-	- Calendar2up and Calendar_Core are now deprecated. Now, Calendar alone represents the single Calendar instance, and CalendarGroup represents an n-up instance, defaulting to 2up
-	- Added semantic style classes to Calendar elements to allow for custom styling solely using CSS.
-	- Remapped all configuration properties to use the Config object (familiar to those who use the Container collection of controls). Property names are the same as their previous counterparts, but wrapped into Calendar.cfg, allowing for runtime reconfiguration of most properties
-	- Added "title" property for setting the Calendar title
-	- Added "close" property for enabling and disabling the close icon
-	- Added "iframe" property for enabling an iframe shim in Internet Explorer 6 and below to fix the select bleed-through bug
-	- pageDate moved to property:  "pagedate"
-	- selectedDates moved to property:  "selected"
-	- minDate moved to property : "mindate", which accepts a JavaScript Date object like its predecessor, but also supports string dates
-	- maxDate moved to property : "maxdate", which accepts a JavaScript Date object like its predecessor, but also supports string dates
-	- Moved style declarations to initStyles function
-	- Optimized event handling in doSelectCell/doCellMouseOver/doCellMouseOut by only attaching the listener to the outer Calendar container, and only reacting to events on cells with the "selectable" CSS class.
-	- Added domEventMap field for applying DOM event listeners to cells containing specific class and tag combinations.
-	- Moved all cell DOM event attachment to applyListeners function
-	- Added getDateByCellId / getDateFieldsByCellId helper functions
-	- Corrected DateMath.getWeekNumber to comply with ISO week number handling
-	- Separated renderCellDefault style portions into styleCellDefault function for easy extension
-	- Deprecated onBeforeSelect. Created beforeSelectEvent which automatically subscribes to its deprecated predecessor.
-	- Deprecated onSelect. Created selectEvent, which automatically subscribes to its deprecated predecessor.
-	- Deprecated onBeforeDeselect. Created beforeSelectEvent which automatically subscribes to its deprecated predecessor.
-	- Deprecated onDeselect. Created beforeDeselectEvent, which automatically subscribes to its deprecated predecessor.
-	- Deprecated onChangePage. Created changePageEvent, which automatically subscribes to its deprecated predecessor.
-	- Deprecated onRender. Created renderEvent, which automatically subscribes to its deprecated predecessor.
-	- Deprecated onReset. Created resetEvent, which automatically subscribes to its deprecated predecessor.
-	- Deprecated onClear. Created clearEvent, which automatically subscribes to its deprecated predecessor.
-	- Corrected setMonth documentation to refer to 0-11 indexed months.
-	- Added show and hide methods to Calendar for setting the Calendar's display property.
-	- Optimized internal render classes to use innerHTML and string buffers 
-	- Removed wireCustomEvents function
-	- Removed wireDefaultEvents function
-	- Removed doNextMonth / doPreviousMonth
-	- Removed all buildShell (header, body, footer) functions, since the Calendar shell is now built dynamically on each render
-	- Wired all CalendarGroup events and configuration properties to be properly delegated to Calendar
-	- Augmented CalendarGroup with all built-in renderers, label functions, hide, show, and initStyles, creating API transparency between Calendar and CalendarGroup.
-	- Made all tagName, createElement, and entity references XHTML compliant
-	- Fixed Daylight Saving Time bug for Brazilian time zone
+          var cal = new YAHOO.widget.Calendar("container"); 
+          -or-
+          var containerDiv = YAHOO.util.Dom.get("container");
+          var cal = new YAHOO.widget.Calendar(containerDiv); 
 
-*** version 0.11.3 ***
+      An id for the Calendar does not need to be provided, and will be 
+      generated from the container id by appending an "_t" suffix to the
+      container id if only the container is provided. 
 
-	- Calendar_Core: Added arguments for selected/deselected dates to onSelect/onDeselect
-	- CalendarGroup: Fixed bug where selected dates passed to constructor were not represented in selectedDates
-	- Calendar2up: Now displays correctly in Opera 9
+    * The container argument can be either a string, representing the 
+      id of the container, or an HTMLElement referring to the container 
+      element itself, as suggested in the example above. 
 
-*** version 0.11.0 ***
+    * If an HTMLElement is provided for the container argument and the 
+      element does not have an id, one will be generated for it using 
+      YAHOO.util.Dom.generateId(). 
 
-	- DateMath: DateMath.add now properly adds weeks
-	- DateMath: between() function added
-	- DateMath: getWeekNumber() fixed to take starting day of week into account
-	- All references to Calendar's built in CSS class handlers are removed, replaced with calls to Dom utility (addClass, removeClass)
-	- Several CSS class constants now have clearer names
-	- All CSS classes are now properly namespaced to avoid CSS conflicts
-	- Fixed table:hover bug in CSS
-	- Calendar no longer requires the container ID and variable name to match in order for month navigation to function properly
-	- Calendar month navigation arrows are now represented as background images
+    * The older form of Calendar/CalendarGroup signature, expecting 
+      both an id and containerId is still supported and works as it did 
+      prior to 2.4.0. 
 
-*** version 0.10.0 ***
++ Fixed performance issue, where the same custom renderer was being 
+  applied multiple times to the same cell.
 
-	- Major performance improvements from attaching DOM events to associated table cells only once, when the Calendar shell is built
-	- DOM events for mouseover/mouseout are now fired for all browsers (not just Internet Explorer)
-	- Reset functionality bug fixed for 2-up Calendar view
++ Added getDate(year, month, date) factory method to the DateMath utility, 
+  which can be used to create JavaScript Date instances for years less 
+  than 100.
 
-*** version 0.9.0 ***
+  The default Date(year, month, date) constructor implementations across 
+  browsers, assume that if year < 100, the caller is referring to the 
+  nineteen hundreds, and the year is set to 19xx instead of xx (as with
+  the deprecated setYear method). However Date.setFullYear(xx) can 
+  be used to set dates below 100. The above factory method provides a 
+  construction mechanism consistent with setFullYear.
 
++ Changed Calendar/CalendarGroup/DateMath code to use the DateMath.getDate
+  method, so that 2 digit years are  not assumed to be in the 1900's. 
+
+  NOTE: Calendar's API already expects 4 digit date strings when referring 
+  to years after 999.
+
+*** version 2.3.1 *** 
+
+- Changed Calendar/CalendarGroup to render an empty title bar element 
+  when "close" is set to true, but "title" has not been set, to allow Sam 
+  Skin to render a title bar correctly. 
+
+*** version 2.3.0 *** 
+
++ Added checks to select, selectCell, deselect and deselectCell methods 
+  to ensure the Calendar/Calendar group was not set to an invalid state 
+  by programmatically selecting unselectable dates or cells.
+  
++ Added new locale configuration properties for the Month/Year label 
+  used in the Calendar header (MY_LABEL_MONTH_POSITION, 
+  MY_LABEL_YEAR_POSITION, MY_LABEL_YEAR_SUFFIX, MY_LABEL_MONTH_SUFFIX). 
+  Japan is an example locale, where customization of the Month/Year 
+  label is required.
+  
++ Changed "first", "last" class names to "first-of-type", "last-of-type", 
+  to avoid collision with YUI Grids' use of the "first" class name.
+  
++ Added public isDateOOB method, to check if a given date is outside of 
+  the minimum/maximum configuration dates of the Calendar.
+  
++ Deprecated YAHOO.widget.Calendar.browser, refactored to use 
+  YAHOO.env.ua instead. 
+  
++ Removed overflow:hidden from default Calendar/CalendarGroup container 
+  for non-IE6 browsers to fix clipping issue with IE7 when CalendarGroup 
+  was inside a box with a specific width. overflow:hidden is still 
+  required for IE6 with an iframe shim.
+
++ Added Opera container width calculation fix to CalendarGroup.show 
+  method, to fix incorrect wrapping when using a CalendarGroup which is 
+  initially rendered hidden (display:none). Previously this fix was 
+  only applied on render. 
+
+*** version 2.2.2 *** 
+
++ Fixed problem with selected dates being shared across instances, when 
+  more than one Calendar/CalendarGroup was on the page 
+
+*** version 2.2.1 *** 
+
++ Fixed problem with selectCell adding duplicate selected date entries 
+  for dates which were already selected
+
++ Fixed problem with CalendarGroup iframe shim not covering the 
+  CalendarGroup title area
+  
++ Removed javascript:void(null) from close button and cell links which 
+  was interrupting form submission and firing onbeforeunload in IE
+  
++ Fixed problem with CalendarGroup getSelectedDates returning invalid 
+  results, when used in conjunction with the "selected" Config property 
+  (either passed in the constructor config argument or set seperately 
+  after construction)
+  
++ Refactored Calendar and CalendarGroup to improve performance, 
+  especially when working with a large number of instances in 
+  IE6 
+
+*** version 2.2.0 *** 
+
++ Image customization can now be done through CSS. Images for Close, 
+  Left and Right Arrows are now pulled in using CSS defined in 
+  calendar.css and by default use relative paths to the images in 
+  the same directory as calendar.css.
+  
++ Deprecated Calendar.IMG_ROOT and NAV_ARROW_LEFT, NAV_ARROW_RIGHT 
+  configuration properties. Customizations based on older releases 
+  which set these properties will still function as expected.
+
++ Deprecated CalendarGroup.CSS_2UPCLOSE. Calendar's Style.CSS_CLOSE 
+  property now represents the new default CSS class (calclose) for 
+  the close button. CSS_2UPCLOSE is still applied along with 
+  CSS_CLOSE to the new markup for the close button to support existing
+  customizations of the CSS_2UPCLOSE CSS class (close-icon)
+
++ Fixed problem with Safari setting Calendar pages to incorrect dates 
+  if the pages spanned a year boundary in CalendarGroups with 3 or more 
+  pages, due to a bug in Safari's implementation of Date setMonth
+
++ Fixed problem with CalendarGroup setMonth rendering Calendar pages 
+  with incorrect dates in all browsers if current pages spanned year 
+  boundary 
+
++ Fixed incorrect CalendarGroup logging statement in calendar-debug.js
+
++ Fixed domEventMap support for Safari versions prior to 2.0.2, 
+  caused by hasOwnProperty not being supported
+  
++ Removed unused private property : _pageDate from Calendar class 
+
+*** version 0.12.2 *** 
+
++ Corrected documentation for clearTime function to reflect the 
+  change from midnight to noon 
+
+*** version 0.12.1 *** 
+
++ Calendar and CalendarGroup now automatically parse the argument 
+  passed to setMonth and setYear into an integer, eliminating 
+  potential concatenation bugs. 
+
+*** version 0.12 *** 
+
++ New documentation format implemented
+
++ Calendar2up and Calendar_Core are now deprecated. Now, Calendar alone
+  represents the single Calendar instance, and CalendarGroup represents 
+  an n-up instance, defaulting to 2up
+  
++ Added semantic style classes to Calendar elements to allow for 
+  custom styling solely using CSS.
+  
++ Remapped all configuration properties to use the Config object 
+ (familiar to those who use the Container collection of controls). 
+ Property names are the same as their previous counterparts, but 
+ wrapped into Calendar.cfg, allowing for runtime reconfiguration of 
+ most properties
+ 
++ Added "title" property for setting the Calendar title
+
++ Added "close" property for enabling and disabling the close icon
+
++ Added "iframe" property for enabling an iframe shim in Internet 
+  Explorer 6 and below to fix the select bleed-through bug
+  
++ pageDate moved to property: "pagedate"
+
++ selectedDates moved to property: "selected"
+
++ minDate moved to property : "mindate", which accepts a JavaScript 
+  Date object like its predecessor, but also supports string dates
+  
++ maxDate moved to property : "maxdate", which accepts a JavaScript 
+  Date object like its predecessor, but also supports string dates
+  
++ Moved style declarations to initStyles function
+
++ Optimized event handling in doSelectCell/doCellMouseOver/
+  doCellMouseOut by only attaching the listener to the outer 
+  Calendar container, and only reacting to events on cells with 
+  the "selectable" CSS class.
+  
++ Added domEventMap field for applying DOM event listeners to cells 
+  containing specific class and tag combinations.
+  
++ Moved all cell DOM event attachment to applyListeners function
+
++ Added getDateByCellId / getDateFieldsByCellId helper functions
+
++ Corrected DateMath.getWeekNumber to comply with ISO week number 
+  handling
+  
++ Separated renderCellDefault style portions into styleCellDefault 
+  function for easy extension
+  
++ Deprecated onBeforeSelect. Created beforeSelectEvent which 
+  automatically subscribes to its deprecated predecessor.
+  
++ Deprecated onSelect. Created selectEvent, which automatically 
+  subscribes to its deprecated predecessor.
+  
++ Deprecated onBeforeDeselect. Created beforeSelectEvent which 
+  automatically subscribes to its deprecated predecessor.
+  
++ Deprecated onDeselect. Created beforeDeselectEvent, which 
+  automatically subscribes to its deprecated predecessor.
+  
++ Deprecated onChangePage. Created changePageEvent, which automatically
+  subscribes to its deprecated predecessor.
+  
++ Deprecated onRender. Created renderEvent, which automatically 
+  subscribes to its deprecated predecessor.
+  
++ Deprecated onReset. Created resetEvent, which automatically 
+  subscribes to its deprecated predecessor.
+  
++ Deprecated onClear. Created clearEvent, which automatically 
+  subscribes to its deprecated predecessor.
+  
++ Corrected setMonth documentation to refer to 0-11 indexed months.
+
++ Added show and hide methods to Calendar for setting the Calendar's 
+  display property.
+  
++ Optimized internal render classes to use innerHTML and string buffers
+ 
++ Removed wireCustomEvents function
+
++ Removed wireDefaultEvents function 
+
++ Removed doNextMonth / doPreviousMonth
+
++ Removed all buildShell (header, body, footer) functions, since 
+  the Calendar shell is now built dynamically on each render
+  
++ Wired all CalendarGroup events and configuration properties to 
+  be properly delegated to Calendar
+  
++ Augmented CalendarGroup with all built-in renderers, label functions, 
+  hide, show, and initStyles, creating API transparency between Calendar 
+  and CalendarGroup.
+  
++ Made all tagName, createElement, and entity references XHTML compliant
+
++ Fixed Daylight Saving Time bug for Brazilian time zone 
+
+*** version 0.11.3 *** 
+
++ Calendar_Core: Added arguments for selected/deselected dates to 
+  onSelect/onDeselect
+  
++ CalendarGroup: Fixed bug where selected dates passed to constructor 
+  were not represented in selectedDates
+  
++ Calendar2up: Now displays correctly in Opera 9 
+
+*** version 0.11.0 *** 
+
++ DateMath: DateMath.add now properly adds weeks
+
++ DateMath: between() function added
+
++ DateMath: getWeekNumber() fixed to take starting day of week into
+  account
+  
++ All references to Calendar's built in CSS class handlers are 
+  removed, replaced with calls to Dom utility (addClass, removeClass)
+  
++ Several CSS class constants now have clearer names
+
++ All CSS classes are now properly namespaced to avoid CSS conflicts
+
++ Fixed table:hover bug in CSS
+
++ Calendar no longer requires the container ID and variable name to 
+  match in order for month navigation to function properly
+
++ Calendar month navigation arrows are now represented as 
+  background images 
+
+*** version 0.10.0 *** 
+
++ Major performance improvements from attaching DOM events to 
+  associated table cells only once, when the Calendar shell is built
+  
++ DOM events for mouseover/mouseout are now fired for all browsers 
+ (not just Internet Explorer)
+ 
++ Reset functionality bug fixed for 2-up Calendar view 
+
+*** version 0.9.0 *** 
+
 * Initial release

Modified: trunk/root/static/yui/calendar/assets/calendar-core.css
===================================================================
--- trunk/root/static/yui/calendar/assets/calendar-core.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/calendar/assets/calendar-core.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * CORE
@@ -83,6 +83,44 @@
 	text-align:center;
 }
 
+/* CalendarNavigator */
+.yui-calcontainer .yui-cal-nav-mask {
+	position:absolute;
+	z-index:2;
+	margin:0;
+	padding:0;
+	width:100%;
+	height:100%;
+	_width:0;    /* IE6, IE7 quirks - width/height set programmatically to match container */
+	_height:0;
+	left:0;
+	top:0;
+	display:none;
+}
+
+/* NAVIGATOR BOUNDING BOX */
+.yui-calcontainer .yui-cal-nav {
+	position:absolute;
+	z-index:3;
+	top:0;
+	display:none;
+}
+
+/* NAVIGATOR BUTTONS (based on button-core.css) */
+.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn  {
+	display: -moz-inline-box; /* Gecko */
+	display: inline-block; /* IE, Opera and Safari */
+}
+
+.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button {
+	display: block;
+	*display: inline-block; /* IE */
+	*overflow: visible; /* Remove superfluous padding for IE */
+	border: none;
+	background-color: transparent;
+	cursor: pointer;
+}
+
 /* Specific changes for calendar running under fonts/reset */
 .yui-calendar .calbody a:hover {background:inherit;}
 p#clear {clear:left; padding-top:10px;}
\ No newline at end of file

Modified: trunk/root/static/yui/calendar/assets/calendar.css
===================================================================
--- trunk/root/static/yui/calendar/assets/calendar.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/calendar/assets/calendar.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 .yui-calcontainer {
 	position:relative;
@@ -91,7 +91,7 @@
 	top:2px;
 	bottom:0;
 	width:9px;
-	height:12px;   
+	height:12px;
 	left:2px;
 	z-index:1;
 	background: url("callt.gif") no-repeat;
@@ -200,6 +200,115 @@
 	border-right-width:2px;
 }
 
+/* CalendarNavigator */
+.yui-calendar a.calnav {
+	_position:relative;
+	padding-left:2px;
+	padding-right:2px;
+	text-decoration:none;
+	color:#000;
+}
+
+.yui-calendar a.calnav:hover {
+	border:1px solid #003366;
+	background-color:#6699cc;
+	background: url(calgrad.png) repeat-x;
+	color:#fff;
+	cursor:pointer;
+}
+
+.yui-calcontainer .yui-cal-nav-mask {
+	position:absolute;
+	z-index:2;
+	display:none;
+
+	margin:0;
+	padding:0;
+
+	left:0;
+	top:0;
+	width:100%;
+	height:100%;
+	_width:0;    /* IE6, IE7 Quirks - width/height set programmatically to match container */
+	_height:0;
+
+	background-color:#000;
+	opacity:0.25;
+	*filter:alpha(opacity=25);
+}
+
+.yui-calcontainer .yui-cal-nav {
+	position:absolute;
+	z-index:3;
+	display:none;
+
+	padding:0;
+	top:1.5em;
+	left:50%;
+	width:12em;
+	margin-left:-6em;
+
+	border:1px solid #7B9EBD;
+	background-color:#F7F9FB;
+	font-size:93%;
+}
+
+.yui-calcontainer.withtitle .yui-cal-nav {
+	top:3.5em;
+}
+
+.yui-calcontainer .yui-cal-nav-y,
+.yui-calcontainer .yui-cal-nav-m,
+.yui-calcontainer .yui-cal-nav-b {
+	padding:2px 5px 2px 5px;
+}
+
+.yui-calcontainer .yui-cal-nav-b {
+	text-align:center;
+}
+
+.yui-calcontainer .yui-cal-nav-e {
+	margin-top:2px;
+	padding:2px;
+	background-color:#EDF5FF;
+	border-top:1px solid black;
+	display:none;
+}
+
+.yui-calcontainer .yui-cal-nav label {
+	display:block;
+	font-weight:bold;
+}
+
+.yui-calcontainer .yui-cal-nav-mc {
+	width:100%;
+	_width:auto; /* IE6 doesn't like width 100% */
+}
+
+.yui-calcontainer .yui-cal-nav-y input.yui-invalid {
+	background-color:#FFEE69;
+	border: 1px solid #000;
+}
+
+.yui-calcontainer .yui-cal-nav-yc {
+	width:3em;
+}
+
+.yui-calcontainer .yui-cal-nav-b button {
+	font-size:93%;
+	text-decoration:none;
+	cursor: pointer;
+	background-color: #79b2ea;
+	border: 1px solid #003366;
+	border-top-color:#FFF;
+	border-left-color:#FFF;
+	margin:1px;
+}
+
+.yui-calcontainer .yui-cal-nav-b .yui-default button {
+	/* not implemented */
+}
+
 /* Specific changes for calendar running under fonts/reset */
 .yui-calendar .calbody a:hover {background:inherit;}
 p#clear {clear:left; padding-top:10px;}

Added: trunk/root/static/yui/calendar/assets/calgrad.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/calendar/assets/calgrad.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/root/static/yui/calendar/assets/skins/sam/calendar-skin.css
===================================================================
--- trunk/root/static/yui/calendar/assets/skins/sam/calendar-skin.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/calendar/assets/skins/sam/calendar-skin.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * SAM
@@ -228,4 +228,126 @@
 .yui-skin-sam .yui-calendar td.calcell.highlight1 { background-color:#ccff99; }
 .yui-skin-sam .yui-calendar td.calcell.highlight2 { background-color:#99ccff; }
 .yui-skin-sam .yui-calendar td.calcell.highlight3 { background-color:#ffcccc; }
-.yui-skin-sam .yui-calendar td.calcell.highlight4 { background-color:#ccff99; }
\ No newline at end of file
+.yui-skin-sam .yui-calendar td.calcell.highlight4 { background-color:#ccff99; }
+
+/* CalendarNavigator */
+
+/* MONTH/YEAR LABEL */
+.yui-skin-sam .yui-calendar a.calnav { 
+	border: 1px solid #f2f2f2;
+	padding:0 4px;
+	text-decoration:none;
+	color:#000;
+	zoom:1;
+}
+
+.yui-skin-sam .yui-calendar a.calnav:hover { 
+	background: url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;
+	border-color:#A0A0A0;
+	cursor:pointer;
+}
+
+/* NAVIGATOR MASK */
+.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask {
+	background-color:#000;
+	opacity:0.25;
+	*filter:alpha(opacity=25); /* IE */
+}
+
+/* NAVIGATOR BOUNDING BOX */
+.yui-skin-sam .yui-calcontainer .yui-cal-nav {
+	font-family:arial,helvetica,clean,sans-serif;
+	font-size:93%;
+	border:1px solid #808080;
+	left:50%;
+	margin-left:-7em;
+	width:14em;
+	padding:0;
+	top:2.5em;
+	background-color:#f2f2f2;
+}
+
+.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav {
+	top:4.5em;
+}
+
+/* NAVIGATOR BOUNDING BOX */
+.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav {
+	width:16em;
+	margin-left:-8em;
+}
+
+/* NAVIGATOR YEAR/MONTH/BUTTON/ERROR BOUNDING BLOCKS */
+.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,
+.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,
+.yui-skin-sam .yui-calcontainer .yui-cal-nav-b {
+	padding:5px 10px 5px 10px;
+}
+
+.yui-skin-sam .yui-calcontainer .yui-cal-nav-b {
+	text-align:center;
+}
+
+.yui-skin-sam .yui-calcontainer .yui-cal-nav-e {
+	margin-top:5px;
+	padding:5px;
+	background-color:#EDF5FF;
+	border-top:1px solid black;
+	display:none;
+}
+
+/* NAVIGATOR LABELS */
+.yui-skin-sam .yui-calcontainer .yui-cal-nav label {
+	display:block;
+	font-weight:bold;
+}
+
+/* NAVIGATOR MONTH CONTROL */
+.yui-skin-sam .yui-calcontainer .yui-cal-nav-mc {
+	width:100%;
+	_width:auto; /* IE6, IE7 Quirks don't handle 100% well */
+}
+
+/* NAVIGATOR MONTH CONTROL, VALIDATION ERROR */
+.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid {
+	background-color:#FFEE69;
+	border: 1px solid #000;
+}
+
+/* NAVIGATOR YEAR CONTROL */
+.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc {
+	width:4em;
+}
+
+/* NAVIGATOR BUTTONS */
+
+/* BUTTON WRAPPER */
+.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn {
+	border:1px solid #808080;
+	background: url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;
+	background-color:#ccc;
+	margin: auto .15em;
+}
+
+/* BUTTON (based on button-skin.css) */
+.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button {
+	padding:0 8px;
+	font-size:93%;
+	line-height: 2;  /* ~24px */
+	*line-height: 1.7; /* For IE */
+	min-height: 2em; /* For Gecko */
+	*min-height: auto; /* For IE */
+	color: #000;
+}
+
+/* DEFAULT BUTTONS */
+/* NOTE: IE6 will only pickup the yui-default specifier from the multiple class specifier */
+.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default {
+	border:1px solid #304369;
+	background-color: #426fd9;
+	background: url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1400px;
+}
+
+.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button {
+	color:#fff;
+}

Modified: trunk/root/static/yui/calendar/assets/skins/sam/calendar.css
===================================================================
--- trunk/root/static/yui/calendar/assets/skins/sam/calendar.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/calendar/assets/skins/sam/calendar.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-.yui-calcontainer{position:relative;float:left;_overflow:hidden;}.yui-calcontainer iframe{position:absolute;border:none;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0px;top:0px;}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px;}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative;}.yui-calcontainer .title{position:relative;z-index:1;}.yui-calcontainer .close-icon{position:absolute;z-index:1;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;}.yui-calendar .calnavright{position:absolute;z-index:1;}.yui-calendar .calheader{position:relative;width:100%;text-align:center;}.yui-calendar .calbody a:hover{background:inherit;}p#clear{clear:left;padding-top:10px;}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px;}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px;}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transpar!
 ent;border:none;padding:10px 5px 10px 5px;margin:0;}.yui-skin-sam .yui-calcontainer .title{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;border-bottom:1px solid #cccccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left;}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px;}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0;}.yui-skin-sam .yui-calcontainer .calclose{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:none;vertical-align:middle;}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center;}.yui-skin-sam .yui-calendar .calheader img{b!
 order:none;}.yui-skin-sam .yui-calendar .calnavleft{background!
 :url(../
../../../assets/skins/sam/sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calnavright{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em;}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em;}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2;}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding-right:2px;}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding-left:2px;}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #cccccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:c!
 enter;white-space:nowrap;}.yui-skin-sam .yui-calendar td.calcell a{color:#0066cc;display:block;height:100%;text-decoration:none;}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000;}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff;}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#cccccc;color:#a6a6a6;cursor:default;}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer;}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff;}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0;}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through;}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#ccff99;}.yui-skin-sam .yui-calendar td.calcell.h!
 ighlight2{background-color:#99ccff;}.yui-skin-sam .yui-calenda!
 r td.cal
cell.highlight3{background-color:#ffcccc;}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#ccff99;}
+.yui-calcontainer{position:relative;float:left;_overflow:hidden;}.yui-calcontainer iframe{position:absolute;border:none;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0px;top:0px;}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px;}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative;}.yui-calcontainer .title{position:relative;z-index:1;}.yui-calcontainer .close-icon{position:absolute;z-index:1;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;}.yui-calendar .calnavright{position:absolute;z-index:1;}.yui-calendar .calheader{position:relative;width:100%;text-align:center;}.yui-calcontainer .yui-cal-nav-mask{position:absolute;z-index:2;margin:0;padding:0;width:100%;height:100%;_width:0;_height:0;left:0;top:0;display:none;}.yui-calcontainer .yui-cal-nav{position:absolute;z-index:3;top:0;display:none;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{display:-moz-inline-box;display:inlin!
 e-block;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{display:block;*display:inline-block;*overflow:visible;border:none;background-color:transparent;cursor:pointer;}.yui-calendar .calbody a:hover{background:inherit;}p#clear{clear:left;padding-top:10px;}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px;}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px;}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:none;padding:10px 5px 10px 5px;margin:0;}.yui-skin-sam .yui-calcontainer .title{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;border-bottom:1px solid #cccccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left;}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px;}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0;}.yui-skin-sam .yui-calcontainer .calclose{backgroun!
 d:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -30!
 0px;widt
h:25px;height:15px;top:.4em;right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:none;vertical-align:middle;}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center;}.yui-skin-sam .yui-calendar .calheader img{border:none;}.yui-skin-sam .yui-calendar .calnavleft{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calnavright{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em;}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em;}.yu!
 i-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2;}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding-right:2px;}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding-left:2px;}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #cccccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap;}.yui-skin-sam .yui-calendar td.calcell a{color:#0066cc;display:block;height:100%;text-decoration:none;}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000;}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff;}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#cccccc;color:#a6a6a6;cursor:default;}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.selected a{!
 background-color:#b3d4ff;color:#000;}.yui-skin-sam .yui-calend!
 ar td.ca
lcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer;}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff;}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0;}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through;}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#ccff99;}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#99ccff;}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#ffcccc;}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#ccff99;}.yui-skin-sam .yui-calendar a.calnav{border:1px solid #f2f2f2;padding:0 4px;text-decoration:none;color:#000;zoom:1;}.yui-skin-sam .yui-calendar a.calnav:hover{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;border-color:#A0A0A0;cursor:pointer;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask{background-color:#000;opacity:0.25;*filter:alpha(opacity=25);}.yu!
 i-skin-sam .yui-calcontainer .yui-cal-nav{font-family:arial,helvetica,clean,sans-serif;font-size:93%;border:1px solid #808080;left:50%;margin-left:-7em;width:14em;padding:0;top:2.5em;background-color:#f2f2f2;}.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav{top:4.5em;}.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav{width:16em;margin-left:-8em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{padding:5px 10px 5px 10px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{text-align:center;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-e{margin-top:5px;padding:5px;background-color:#EDF5FF;border-top:1px solid black;display:none;}.yui-skin-sam .yui-calcontainer .yui-cal-nav label{display:block;font-weight:bold;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mc{width:100%;_width:auto;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid{background-color:#FFEE69;border:1px sol!
 id #000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc{width!
 :4em;}.y
ui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{border:1px solid #808080;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;background-color:#ccc;margin:auto .15em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{padding:0 8px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default{border:1px solid #304369;background-color:#426fd9;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1400px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button{color:#fff;}

Modified: trunk/root/static/yui/calendar/calendar-debug.js
===================================================================
--- trunk/root/static/yui/calendar/calendar-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/calendar/calendar-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 (function () {
 
@@ -18,27 +18,21 @@
     * @param {Object} owner The owner Object to which this Config Object belongs
     */
     YAHOO.util.Config = function (owner) {
-    
+
         if (owner) {
-    
             this.init(owner);
-    
         }
-    
-        if (!owner) { 
-        
-            YAHOO.log("No owner specified for Config object", "error"); 
-    
-        }
-    
+
+        if (!owner) {  YAHOO.log("No owner specified for Config object", "error", "Config"); }
+
     };
 
 
     var Lang = YAHOO.lang,
-        CustomEvent = YAHOO.util.CustomEvent,        
+        CustomEvent = YAHOO.util.CustomEvent,
         Config = YAHOO.util.Config;
-    
 
+
     /**
      * Constant representing the CustomEvent type for the config changed event.
      * @property YAHOO.util.Config.CONFIG_CHANGED_EVENT
@@ -157,7 +151,7 @@
         * @param {value} Object The value of the correct type for the property
         */ 
         fireEvent: function ( key, value ) {
-            YAHOO.log("Firing Config event: " + key + "=" + value, "info");
+            YAHOO.log("Firing Config event: " + key + "=" + value, "info", "Config");
             var property = this.config[key];
         
             if (property && property.event) {
@@ -174,7 +168,7 @@
         */
         addProperty: function ( key, propertyObject ) {
             key = key.toLowerCase();
-            YAHOO.log("Added property: " + key, "info");
+            YAHOO.log("Added property: " + key, "info", "Config");
         
             this.config[key] = propertyObject;
         
@@ -279,7 +273,7 @@
             var property;
         
             key = key.toLowerCase();
-            YAHOO.log("setProperty: " + key + "=" + value, "info");
+            YAHOO.log("setProperty: " + key + "=" + value, "info", "Config");
         
             if (this.queueInProgress && ! silent) {
                 // Currently running through a queue... 
@@ -318,7 +312,7 @@
         queueProperty: function (key, value) {
         
             key = key.toLowerCase();
-            YAHOO.log("queueProperty: " + key + "=" + value, "info");
+            YAHOO.log("queueProperty: " + key + "=" + value, "info", "Config");
         
             var property = this.config[key],
                 foundDuplicate = false,
@@ -358,7 +352,7 @@
                         if (queueItem) {
                             queueItemKey = queueItem[0];
                             queueItemValue = queueItem[1];
-                            
+
                             if (queueItemKey == key) {
     
                                 /*
@@ -386,38 +380,38 @@
                 }
         
                 if (property.supercedes) {
-        
+
                     sLen = property.supercedes.length;
-        
+
                     for (s = 0; s < sLen; s++) {
-        
+
                         supercedesCheck = property.supercedes[s];
                         qLen = this.eventQueue.length;
-        
+
                         for (q = 0; q < qLen; q++) {
                             queueItemCheck = this.eventQueue[q];
-        
+
                             if (queueItemCheck) {
                                 queueItemCheckKey = queueItemCheck[0];
                                 queueItemCheckValue = queueItemCheck[1];
-                                
+
                                 if (queueItemCheckKey == 
                                     supercedesCheck.toLowerCase() ) {
-    
+
                                     this.eventQueue.push([queueItemCheckKey, 
                                         queueItemCheckValue]);
-    
+
                                     this.eventQueue[q] = null;
                                     break;
-    
+
                                 }
                             }
                         }
                     }
                 }
 
-                YAHOO.log("Config event queue: " + this.outputEventQueue(), "info");
-        
+                YAHOO.log("Config event queue: " + this.outputEventQueue(), "info", "Config");
+
                 return true;
             } else {
                 return false;
@@ -466,37 +460,23 @@
         applyConfig: function (userConfig, init) {
         
             var sKey,
-                oValue,
                 oConfig;
 
             if (init) {
-
                 oConfig = {};
-
                 for (sKey in userConfig) {
-                
                     if (Lang.hasOwnProperty(userConfig, sKey)) {
-
                         oConfig[sKey.toLowerCase()] = userConfig[sKey];
-
                     }
-                
                 }
-
                 this.initialConfig = oConfig;
-
             }
 
             for (sKey in userConfig) {
-            
                 if (Lang.hasOwnProperty(userConfig, sKey)) {
-            
                     this.queueProperty(sKey, userConfig[sKey]);
-                
                 }
-
             }
-
         },
         
         /**
@@ -563,19 +543,12 @@
             var property = this.config[key.toLowerCase()];
     
             if (property && property.event) {
-    
                 if (!Config.alreadySubscribed(property.event, handler, obj)) {
-    
                     property.event.subscribe(handler, obj, override);
-    
                 }
-    
                 return true;
-    
             } else {
-    
                 return false;
-    
             }
     
         },
@@ -695,28 +668,20 @@
             i;
 
         if (nSubscribers > 0) {
-
             i = nSubscribers - 1;
-        
             do {
-
                 subsc = evt.subscribers[i];
-
                 if (subsc && subsc.obj == obj && subsc.fn == fn) {
-        
                     return true;
-        
-                }    
-            
+                }
             }
             while (i--);
-        
         }
-    
+
         return false;
-    
+
     };
-    
+
     YAHOO.lang.augmentProto(Config, YAHOO.util.EventProvider);
 
 }());
@@ -884,7 +849,7 @@
 	* @return {Date}	January 1 of the calendar year specified.
 	*/
 	getJan1 : function(calendarYear) {
-		return new Date(calendarYear,0,1); 
+		return this.getDate(calendarYear,0,1);
 	},
 
 	/**
@@ -920,7 +885,7 @@
 		date = this.clearTime(date);
 		var nearestThurs = new Date(date.getTime() + (4 * this.ONE_DAY_MS) - ((date.getDay()) * this.ONE_DAY_MS));
 
-		var jan1 = new Date(nearestThurs.getFullYear(),0,1);
+		var jan1 = this.getDate(nearestThurs.getFullYear(),0,1);
 		var dayOfYear = ((nearestThurs.getTime() - jan1.getTime()) / this.ONE_DAY_MS) - 1;
 
 		var weekNum = Math.ceil((dayOfYear)/ 7);
@@ -964,7 +929,7 @@
 	* @return {Date}		The JavaScript Date representing the first day of the month
 	*/
 	findMonthStart : function(date) {
-		var start = new Date(date.getFullYear(), date.getMonth(), 1);
+		var start = this.getDate(date.getFullYear(), date.getMonth(), 1);
 		return start;
 	},
 
@@ -990,14 +955,46 @@
 	clearTime : function(date) {
 		date.setHours(12,0,0,0);
 		return date;
+	},
+
+	/**
+	 * Returns a new JavaScript Date object, representing the given year, month and date. Time fields (hr, min, sec, ms) on the new Date object
+	 * are set to 0. The method allows Date instances to be created with the a year less than 100. "new Date(year, month, date)" implementations 
+	 * set the year to 19xx if a year (xx) which is less than 100 is provided.
+	 * <p>
+	 * <em>NOTE:</em>Validation on argument values is not performed. It is the caller's responsibility to ensure
+	 * arguments are valid as per the ECMAScript-262 Date object specification for the new Date(year, month[, date]) constructor.
+	 * </p>
+	 * @method getDate
+	 * @param {Number} y Year.
+	 * @param {Number} m Month index from 0 (Jan) to 11 (Dec).
+	 * @param {Number} d (optional) Date from 1 to 31. If not provided, defaults to 1.
+	 * @return {Date} The JavaScript date object with year, month, date set as provided.
+	 */
+	getDate : function(y, m, d) {
+		var dt = null;
+		if (YAHOO.lang.isUndefined(d)) {
+			d = 1;
+		}
+		if (y >= 100) {
+			dt = new Date(y, m, d);
+		} else {
+			dt = new Date();
+			dt.setFullYear(y);
+			dt.setMonth(m);
+			dt.setDate(d);
+			dt.setHours(0,0,0,0);
+		}
+		return dt;
 	}
 };
 
 /**
-* The Calendar component is a UI control that enables users to choose one or more dates from a graphical calendar presented in a one-month  or multi-month interface. Calendars are generated entirely via script and can be navigated without any page refreshes.
+* The Calendar component is a UI control that enables users to choose one or more dates from a graphical calendar presented in a one-month or
+* multi-month interface. Calendars are generated entirely via script and can be navigated without any page refreshes.
 * @module    calendar
-* @title     Calendar
-* @namespace YAHOO.widget
+* @title    Calendar
+* @namespace  YAHOO.widget
 * @requires  yahoo,dom,event
 */
 
@@ -1009,18 +1006,39 @@
 * <p>To construct the placeholder for the calendar widget, the code is as
 * follows:
 *	<xmp>
-*		<div id="cal1Container"></div>
+*		<div id="calContainer"></div>
 *	</xmp>
 * </p>
+* <p>
+* <strong>NOTE: As of 2.4.0, the constructor's ID argument is optional.</strong>
+* The Calendar can be constructed by simply providing a container ID string, 
+* or a reference to a container DIV HTMLElement (the element needs to exist 
+* in the document).
+* 
+* E.g.:
+*	<xmp>
+*		var c = new YAHOO.widget.Calendar("calContainer", configOptions);
+*	</xmp>
+* or:
+*   <xmp>
+*       var containerDiv = YAHOO.util.Dom.get("calContainer");
+*		var c = new YAHOO.widget.Calendar(containerDiv, configOptions);
+*	</xmp>
+* </p>
+* <p>
+* If not provided, the ID will be generated from the container DIV ID by adding an "_t" suffix.
+* For example if an ID is not provided, and the container's ID is "calContainer", the Calendar's ID will be set to "calContainer_t".
+* </p>
+* 
 * @namespace YAHOO.widget
 * @class Calendar
 * @constructor
-* @param {String}	id			The id of the table element that will represent the calendar widget
-* @param {String}	containerId	The id of the container div element that will wrap the calendar table
-* @param {Object}	config		The configuration object containing the Calendar's arguments
+* @param {String} id optional The id of the table element that will represent the Calendar widget. As of 2.4.0, this argument is optional.
+* @param {String | HTMLElement} container The id of the container div element that will wrap the Calendar table, or a reference to a DIV element which exists in the document.
+* @param {Object} config optional The configuration object containing the initial configuration values for the Calendar.
 */
 YAHOO.widget.Calendar = function(id, containerId, config) {
-	this.init(id, containerId, config);
+	this.init.apply(this, arguments);
 };
 
 /**
@@ -1177,7 +1195,8 @@
 	MY_LABEL_MONTH_POSITION:{key:"my_label_month_position", value:1},
 	MY_LABEL_YEAR_POSITION:{key:"my_label_year_position", value:2},
 	MY_LABEL_MONTH_SUFFIX:{key:"my_label_month_suffix", value:" "},
-	MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix", value:""}
+	MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix", value:""},
+	NAV: {key:"navigator", value: null}
 };
 
 /**
@@ -1197,7 +1216,17 @@
 	BEFORE_RENDER : "beforeRender",
 	RENDER : "render",
 	RESET : "reset",
-	CLEAR : "clear"
+	CLEAR : "clear",
+	BEFORE_HIDE : "beforeHide",
+	HIDE : "hide",
+	BEFORE_SHOW : "beforeShow",
+	SHOW : "show",
+	BEFORE_HIDE_NAV : "beforeHideNav",
+	HIDE_NAV : "hideNav",
+	BEFORE_SHOW_NAV : "beforeShowNav",
+	SHOW_NAV : "showNav",
+	BEFORE_RENDER_NAV : "beforeRenderNav",
+	RENDER_NAV : "renderNav"
 };
 
 /**
@@ -1230,6 +1259,7 @@
 	CSS_CONTAINER : "yui-calcontainer",
 	CSS_NAV_LEFT : "calnavleft",
 	CSS_NAV_RIGHT : "calnavright",
+	CSS_NAV : "calnav",
 	CSS_CLOSE : "calclose",
 	CSS_CELL_TOP : "calcelltop",
 	CSS_CELL_LEFT : "calcellleft",
@@ -1273,7 +1303,7 @@
 	* @type HTMLTableCellElement[]
 	*/
 	cells : null,
-	
+
 	/**
 	* The collection of calendar cell dates that is parallel to the cells collection. The array contains dates field arrays in the format of [YYYY, M, D].
 	* @property cellDates
@@ -1282,13 +1312,20 @@
 	cellDates : null,
 
 	/**
-	* The id that uniquely identifies this calendar. This id should match the id of the placeholder element on the page.
+	* The id that uniquely identifies this Calendar.
 	* @property id
 	* @type String
 	*/
 	id : null,
 
 	/**
+	* The unique id associated with the Calendar's container
+	* @property containerId
+	* @type String
+	*/
+	containerId: null,
+
+	/**
 	* The DOM element reference that points to this calendar's container element. The calendar will be inserted into this element when the shell is rendered.
 	* @property oDomContainer
 	* @type HTMLElement
@@ -1318,6 +1355,14 @@
 	_renderStack : null,
 
 	/**
+	* A reference to the CalendarNavigator instance created for this Calendar.
+	* Will be null if the "navigator" configuration property has not been set
+	* @property oNavigator
+	* @type CalendarNavigator
+	*/
+	oNavigator : null,
+
+	/**
 	* The private list of initially selected dates.
 	* @property _selectedDates
 	* @private
@@ -1330,3629 +1375,4083 @@
 	* @property domEventMap
 	* @type Object
 	*/
-	domEventMap : null
-};
+	domEventMap : null,
 
-/**
-* Initializes the Calendar widget.
-* @method init
-* @param {String}	id			The id of the table element that will represent the calendar widget
-* @param {String}	containerId	The id of the container div element that will wrap the calendar table
-* @param {Object}	config		The configuration object containing the Calendar's arguments
-*/
-YAHOO.widget.Calendar.prototype.init = function(id, containerId, config) {
-	this.logger = new YAHOO.widget.LogWriter("Calendar " + id);
-	this.initEvents();
-	this.today = new Date();
-	YAHOO.widget.DateMath.clearTime(this.today);
-
-	this.id = id;
-	this.oDomContainer = document.getElementById(containerId);
-	if (! this.oDomContainer) { this.logger.log("No valid container present.", "error"); }
-
 	/**
-	* The Config object used to hold the configuration variables for the Calendar
-	* @property cfg
-	* @type YAHOO.util.Config
-	*/
-	this.cfg = new YAHOO.util.Config(this);
-	
-	/**
-	* The local object which contains the Calendar's options
-	* @property Options
-	* @type Object
-	*/
-	this.Options = {};
+	 * Protected helper used to parse Calendar constructor/init arguments.
+	 *
+	 * As of 2.4.0, Calendar supports a simpler constructor 
+	 * signature. This method reconciles arguments
+	 * received in the pre 2.4.0 and 2.4.0 formats.
+	 * 
+	 * @protected
+	 * @method _parseArgs
+	 * @param {Array} Function "arguments" array
+	 * @return {Object} Object with id, container, config properties containing
+	 * the reconciled argument values.
+	 **/
+	_parseArgs : function(args) {
+		/*
+		   2.4.0 Constructors signatures
 
-	/**
-	* The local object which contains the Calendar's locale settings
-	* @property Locale
-	* @type Object
-	*/
-	this.Locale = {};
+		   new Calendar(String)
+		   new Calendar(HTMLElement)
+		   new Calendar(String, ConfigObject)
+		   new Calendar(HTMLElement, ConfigObject)
 
-	this.initStyles();
+		   Pre 2.4.0 Constructor signatures
 
-	YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_CONTAINER);	
-	YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_SINGLE);
-	
-	this.cellDates = [];
-	this.cells = [];
-	this.renderStack = [];
-	this._renderStack = [];
+		   new Calendar(String, String)
+		   new Calendar(String, HTMLElement)
+		   new Calendar(String, String, ConfigObject)
+		   new Calendar(String, HTMLElement, ConfigObject)
+		 */
+		var nArgs = {id:null, container:null, config:null};
 
-	this.setupConfig();
-	
-	if (config) {
-		this.cfg.applyConfig(config, true);
-	}
-	
-	this.cfg.fireQueue();
-};
-
-/**
-* Default Config listener for the iframe property. If the iframe config property is set to true, 
-* renders the built-in IFRAME shim if the container is relatively or absolutely positioned.
-* 
-* @method configIframe
-*/
-YAHOO.widget.Calendar.prototype.configIframe = function(type, args, obj) {
-	var useIframe = args[0];
-
-	if (!this.parent) {
-		if (YAHOO.util.Dom.inDocument(this.oDomContainer)) {
-			if (useIframe) {
-				var pos = YAHOO.util.Dom.getStyle(this.oDomContainer, "position");
-				
-				if (pos == "absolute" || pos == "relative") {
-					
-					if (!YAHOO.util.Dom.inDocument(this.iframe)) {
-						this.iframe = document.createElement("iframe");
-						this.iframe.src = "javascript:false;";
-
-						YAHOO.util.Dom.setStyle(this.iframe, "opacity", "0");
-
-						if (YAHOO.env.ua.ie && YAHOO.env.ua.ie <= 6) {
-							YAHOO.util.Dom.addClass(this.iframe, "fixedsize");
-						}
-
-						this.oDomContainer.insertBefore(this.iframe, this.oDomContainer.firstChild);
+		if (args && args.length && args.length > 0) {
+			switch (args.length) {
+				case 1:
+					nArgs.id = null;
+					nArgs.container = args[0];
+					nArgs.config = null;
+					break;
+				case 2:
+					if (YAHOO.lang.isObject(args[1]) && !args[1].tagName && !(args[1] instanceof String)) {
+						nArgs.id = null;
+						nArgs.container = args[0];
+						nArgs.config = args[1];
+					} else {
+						nArgs.id = args[0];
+						nArgs.container = args[1];
+						nArgs.config = null;
 					}
-				}
-			} else {
-				if (this.iframe) {
-					if (this.iframe.parentNode) {
-						this.iframe.parentNode.removeChild(this.iframe);
-					}
-					this.iframe = null;
-				}
+					break;
+				default: // 3+
+					nArgs.id = args[0];
+					nArgs.container = args[1];
+					nArgs.config = args[2];
+					break;
 			}
-		}
-	}
-};
-/**
-* Default handler for the "title" property
-* @method configTitle
-*/
-YAHOO.widget.Calendar.prototype.configTitle = function(type, args, obj) {
-	var title = args[0], tDiv;
-
-	// "" disables title bar
-	if (title) {
-		this.createTitleBar(title);
-	} else {
-		var close = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.CLOSE.key);
-		if (!close) {
-			this.removeTitleBar();
 		} else {
-			this.createTitleBar(" ");
+			this.logger.log("Invalid constructor/init arguments", "error");
 		}
-	}
-};
+		return nArgs;
+	},
 
-/**
-* Default handler for the "close" property
-* @method configClose
-*/
-YAHOO.widget.Calendar.prototype.configClose = function(type, args, obj) {
-	var close = args[0],
-		title = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.TITLE.key);
-
-	if (close) {
-		if (!title) {
-			this.createTitleBar(" ");
-		}
-		this.createCloseButton();
-	} else {
-		this.removeCloseButton();
-		if (!title) {
-			this.removeTitleBar();
-		}
-	}
-};
-
-/**
-* Initializes Calendar's built-in CustomEvents
-* @method initEvents
-*/
-YAHOO.widget.Calendar.prototype.initEvents = function() {
-
-	var defEvents = YAHOO.widget.Calendar._EVENT_TYPES;
-
 	/**
-	* Fired before a selection is made
-	* @event beforeSelectEvent
+	* Initializes the Calendar widget.
+	* @method init
+	*
+	* @param {String} id optional The id of the table element that will represent the Calendar widget. As of 2.4.0, this argument is optional.
+	* @param {String | HTMLElement} container The id of the container div element that will wrap the Calendar table, or a reference to a DIV element which exists in the document.
+	* @param {Object} config optional The configuration object containing the initial configuration values for the Calendar.
 	*/
-	this.beforeSelectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SELECT); 
+	init : function(id, container, config) {
+		// Normalize 2.4.0, pre 2.4.0 args
+		var nArgs = this._parseArgs(arguments);
 
-	/**
-	* Fired when a selection is made
-	* @event selectEvent
-	* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
-	*/
-	this.selectEvent = new YAHOO.util.CustomEvent(defEvents.SELECT);
+		id = nArgs.id;
+		container = nArgs.container;
+		config = nArgs.config;
 
-	/**
-	* Fired before a selection is made
-	* @event beforeDeselectEvent
-	*/
-	this.beforeDeselectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_DESELECT);
+		this.oDomContainer = YAHOO.util.Dom.get(container);
+		if (!this.oDomContainer) { this.logger.log("Container not found in document.", "error"); }
 
-	/**
-	* Fired when a selection is made
-	* @event deselectEvent
-	* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
-	*/
-	this.deselectEvent = new YAHOO.util.CustomEvent(defEvents.DESELECT);
-
-	/**
-	* Fired when the Calendar page is changed
-	* @event changePageEvent
-	*/
-	this.changePageEvent = new YAHOO.util.CustomEvent(defEvents.CHANGE_PAGE);
-
-	/**
-	* Fired before the Calendar is rendered
-	* @event beforeRenderEvent
-	*/
-	this.beforeRenderEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER);
-
-	/**
-	* Fired when the Calendar is rendered
-	* @event renderEvent
-	*/
-	this.renderEvent = new YAHOO.util.CustomEvent(defEvents.RENDER);
-
-	/**
-	* Fired when the Calendar is reset
-	* @event resetEvent
-	*/
-	this.resetEvent = new YAHOO.util.CustomEvent(defEvents.RESET);
-
-	/**
-	* Fired when the Calendar is cleared
-	* @event clearEvent
-	*/
-	this.clearEvent = new YAHOO.util.CustomEvent(defEvents.CLEAR);
-
-	this.beforeSelectEvent.subscribe(this.onBeforeSelect, this, true);
-	this.selectEvent.subscribe(this.onSelect, this, true);
-	this.beforeDeselectEvent.subscribe(this.onBeforeDeselect, this, true);
-	this.deselectEvent.subscribe(this.onDeselect, this, true);
-	this.changePageEvent.subscribe(this.onChangePage, this, true);
-	this.renderEvent.subscribe(this.onRender, this, true);
-	this.resetEvent.subscribe(this.onReset, this, true);
-	this.clearEvent.subscribe(this.onClear, this, true);
-};
-
-/**
-* The default event function that is attached to a date link within a calendar cell
-* when the calendar is rendered.
-* @method doSelectCell
-* @param {DOMEvent} e	The event
-* @param {Calendar} cal	A reference to the calendar passed by the Event utility
-*/
-YAHOO.widget.Calendar.prototype.doSelectCell = function(e, cal) {
-	var cell,index,d,date;
-
-	var target = YAHOO.util.Event.getTarget(e);
-	var tagName = target.tagName.toLowerCase();
-	var defSelector = false;
-
-	while (tagName != "td" && ! YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
-
-		if (!defSelector && tagName == "a" && YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTOR)) {
-			defSelector = true;	
+		if (!this.oDomContainer.id) {
+			this.oDomContainer.id = YAHOO.util.Dom.generateId();
 		}
-
-		target = target.parentNode;
-		tagName = target.tagName.toLowerCase(); 
-		if (tagName == "html") {
-			return;
+		if (!id) {
+			id = this.oDomContainer.id + "_t";
 		}
-	}
 
-	if (defSelector) {
-		// Stop link href navigation for default renderer
-		YAHOO.util.Event.preventDefault(e);
-	}
+		this.id = id;
+		this.containerId = this.oDomContainer.id;
 
-	cell = target;
+		this.logger = new YAHOO.widget.LogWriter("Calendar " + this.id);
+		this.initEvents();
 
-	if (YAHOO.util.Dom.hasClass(cell, cal.Style.CSS_CELL_SELECTABLE)) {
-		index = cell.id.split("cell")[1];
-		d = cal.cellDates[index];
-		date = new Date(d[0],d[1]-1,d[2]);
-	
-		var link;
+		this.today = new Date();
+		YAHOO.widget.DateMath.clearTime(this.today);
 
-		cal.logger.log("Selecting cell " + index + " via click", "info");
-		if (cal.Options.MULTI_SELECT) {
-			link = cell.getElementsByTagName("a")[0];
-			if (link) {
-				link.blur();
-			}
+		/**
+		* The Config object used to hold the configuration variables for the Calendar
+		* @property cfg
+		* @type YAHOO.util.Config
+		*/
+		this.cfg = new YAHOO.util.Config(this);
 
-			var cellDate = cal.cellDates[index];
-			var cellDateIndex = cal._indexOfSelectedFieldArray(cellDate);
+		/**
+		* The local object which contains the Calendar's options
+		* @property Options
+		* @type Object
+		*/
+		this.Options = {};
 
-			if (cellDateIndex > -1) {	
-				cal.deselectCell(index);
-			} else {
-				cal.selectCell(index);
-			}	
+		/**
+		* The local object which contains the Calendar's locale settings
+		* @property Locale
+		* @type Object
+		*/
+		this.Locale = {};
 
-		} else {
-			link = cell.getElementsByTagName("a")[0];
-			if (link) {
-				link.blur();
-			}
-			cal.selectCell(index);
-		}
-	}
-};
+		this.initStyles();
 
-/**
-* The event that is executed when the user hovers over a cell
-* @method doCellMouseOver
-* @param {DOMEvent} e	The event
-* @param {Calendar} cal	A reference to the calendar passed by the Event utility
-*/
-YAHOO.widget.Calendar.prototype.doCellMouseOver = function(e, cal) {
-	var target;
-	if (e) {
-		target = YAHOO.util.Event.getTarget(e);
-	} else {
-		target = this;
-	}
+		YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_CONTAINER);
+		YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_SINGLE);
 
-	while (target.tagName.toLowerCase() != "td") {
-		target = target.parentNode;
-		if (target.tagName.toLowerCase() == "html") {
-			return;
-		}
-	}
+		this.cellDates = [];
+		this.cells = [];
+		this.renderStack = [];
+		this._renderStack = [];
 
-	if (YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
-		YAHOO.util.Dom.addClass(target, cal.Style.CSS_CELL_HOVER);
-	}
-};
+		this.setupConfig();
 
-/**
-* The event that is executed when the user moves the mouse out of a cell
-* @method doCellMouseOut
-* @param {DOMEvent} e	The event
-* @param {Calendar} cal	A reference to the calendar passed by the Event utility
-*/
-YAHOO.widget.Calendar.prototype.doCellMouseOut = function(e, cal) {
-	var target;
-	if (e) {
-		target = YAHOO.util.Event.getTarget(e);
-	} else {
-		target = this;
-	}
-
-	while (target.tagName.toLowerCase() != "td") {
-		target = target.parentNode;
-		if (target.tagName.toLowerCase() == "html") {
-			return;
+		if (config) {
+			this.cfg.applyConfig(config, true);
 		}
-	}
 
-	if (YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
-		YAHOO.util.Dom.removeClass(target, cal.Style.CSS_CELL_HOVER);
-	}
-};
+		this.cfg.fireQueue();
+	},
 
-YAHOO.widget.Calendar.prototype.setupConfig = function() {
-
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-
 	/**
-	* The month/year representing the current visible Calendar date (mm/yyyy)
-	* @config pagedate
-	* @type String
-	* @default today's date
-	*/
-	this.cfg.addProperty(defCfg.PAGEDATE.key, { value:new Date(), handler:this.configPageDate } );
-
-	/**
-	* The date or range of dates representing the current Calendar selection
-	* @config selected
-	* @type String
-	* @default []
-	*/
-	this.cfg.addProperty(defCfg.SELECTED.key, { value:[], handler:this.configSelected } );
-
-	/**
-	* The title to display above the Calendar's month header
-	* @config title
-	* @type String
-	* @default ""
-	*/
-	this.cfg.addProperty(defCfg.TITLE.key, { value:defCfg.TITLE.value, handler:this.configTitle } );
-
-	/**
-	* Whether or not a close button should be displayed for this Calendar
-	* @config close
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty(defCfg.CLOSE.key, { value:defCfg.CLOSE.value, handler:this.configClose } );
-
-	/**
-	* Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below.
-	* This property is enabled by default for IE6 and below. It is disabled by default for other browsers for performance reasons, but can be 
-	* enabled if required.
+	* Default Config listener for the iframe property. If the iframe config property is set to true, 
+	* renders the built-in IFRAME shim if the container is relatively or absolutely positioned.
 	* 
-	* @config iframe
-	* @type Boolean
-	* @default true for IE6 and below, false for all other browsers
+	* @method configIframe
 	*/
-	this.cfg.addProperty(defCfg.IFRAME.key, { value:defCfg.IFRAME.value, handler:this.configIframe, validator:this.cfg.checkBoolean } );
+	configIframe : function(type, args, obj) {
+		var useIframe = args[0];
+	
+		if (!this.parent) {
+			if (YAHOO.util.Dom.inDocument(this.oDomContainer)) {
+				if (useIframe) {
+					var pos = YAHOO.util.Dom.getStyle(this.oDomContainer, "position");
+					
+					if (pos == "absolute" || pos == "relative") {
+						
+						if (!YAHOO.util.Dom.inDocument(this.iframe)) {
+							this.iframe = document.createElement("iframe");
+							this.iframe.src = "javascript:false;";
+	
+							YAHOO.util.Dom.setStyle(this.iframe, "opacity", "0");
+	
+							if (YAHOO.env.ua.ie && YAHOO.env.ua.ie <= 6) {
+								YAHOO.util.Dom.addClass(this.iframe, "fixedsize");
+							}
+	
+							this.oDomContainer.insertBefore(this.iframe, this.oDomContainer.firstChild);
+						}
+					}
+				} else {
+					if (this.iframe) {
+						if (this.iframe.parentNode) {
+							this.iframe.parentNode.removeChild(this.iframe);
+						}
+						this.iframe = null;
+					}
+				}
+			}
+		}
+	},
 
 	/**
-	* The minimum selectable date in the current Calendar (mm/dd/yyyy)
-	* @config mindate
-	* @type String
-	* @default null
+	* Default handler for the "title" property
+	* @method configTitle
 	*/
-	this.cfg.addProperty(defCfg.MINDATE.key, { value:defCfg.MINDATE.value, handler:this.configMinDate } );
+	configTitle : function(type, args, obj) {
+		var title = args[0];
 
+		// "" disables title bar
+		if (title) {
+			this.createTitleBar(title);
+		} else {
+			var close = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.CLOSE.key);
+			if (!close) {
+				this.removeTitleBar();
+			} else {
+				this.createTitleBar(" ");
+			}
+		}
+	},
+	
 	/**
-	* The maximum selectable date in the current Calendar (mm/dd/yyyy)
-	* @config maxdate
-	* @type String
-	* @default null
+	* Default handler for the "close" property
+	* @method configClose
 	*/
-	this.cfg.addProperty(defCfg.MAXDATE.key, { value:defCfg.MAXDATE.value, handler:this.configMaxDate } );
-
-
-	// Options properties
-
-	/**
-	* True if the Calendar should allow multiple selections. False by default.
-	* @config MULTI_SELECT
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty(defCfg.MULTI_SELECT.key,	{ value:defCfg.MULTI_SELECT.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
-
-	/**
-	* The weekday the week begins on. Default is 0 (Sunday).
-	* @config START_WEEKDAY
-	* @type number
-	* @default 0
-	*/
-	this.cfg.addProperty(defCfg.START_WEEKDAY.key,	{ value:defCfg.START_WEEKDAY.value, handler:this.configOptions, validator:this.cfg.checkNumber  } );
-
-	/**
-	* True if the Calendar should show weekday labels. True by default.
-	* @config SHOW_WEEKDAYS
-	* @type Boolean
-	* @default true
-	*/
-	this.cfg.addProperty(defCfg.SHOW_WEEKDAYS.key,	{ value:defCfg.SHOW_WEEKDAYS.value, handler:this.configOptions, validator:this.cfg.checkBoolean  } );
-
-	/**
-	* True if the Calendar should show week row headers. False by default.
-	* @config SHOW_WEEK_HEADER
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty(defCfg.SHOW_WEEK_HEADER.key, { value:defCfg.SHOW_WEEK_HEADER.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
-
-	/**
-	* True if the Calendar should show week row footers. False by default.
-	* @config SHOW_WEEK_FOOTER
-	* @type Boolean
-	* @default false
-	*/	
-	this.cfg.addProperty(defCfg.SHOW_WEEK_FOOTER.key,{ value:defCfg.SHOW_WEEK_FOOTER.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
-
-	/**
-	* True if the Calendar should suppress weeks that are not a part of the current month. False by default.
-	* @config HIDE_BLANK_WEEKS
-	* @type Boolean
-	* @default false
-	*/	
-	this.cfg.addProperty(defCfg.HIDE_BLANK_WEEKS.key, { value:defCfg.HIDE_BLANK_WEEKS.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+	configClose : function(type, args, obj) {
+		var close = args[0],
+			title = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.TITLE.key);
 	
+		if (close) {
+			if (!title) {
+				this.createTitleBar(" ");
+			}
+			this.createCloseButton();
+		} else {
+			this.removeCloseButton();
+			if (!title) {
+				this.removeTitleBar();
+			}
+		}
+	},
+	
 	/**
-	* The image that should be used for the left navigation arrow.
-	* @config NAV_ARROW_LEFT
-	* @type String
-	* @deprecated	You can customize the image by overriding the default CSS class for the left arrow - "calnavleft"  
-	* @default null
-	*/	
-	this.cfg.addProperty(defCfg.NAV_ARROW_LEFT.key,	{ value:defCfg.NAV_ARROW_LEFT.value, handler:this.configOptions } );
-
-	/**
-	* The image that should be used for the right navigation arrow.
-	* @config NAV_ARROW_RIGHT
-	* @type String
-	* @deprecated	You can customize the image by overriding the default CSS class for the right arrow - "calnavright"
-	* @default null
-	*/	
-	this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key, { value:defCfg.NAV_ARROW_RIGHT.value, handler:this.configOptions } );
-
-	// Locale properties
-
-	/**
-	* The short month labels for the current locale.
-	* @config MONTHS_SHORT
-	* @type String[]
-	* @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
+	* Initializes Calendar's built-in CustomEvents
+	* @method initEvents
 	*/
-	this.cfg.addProperty(defCfg.MONTHS_SHORT.key,	{ value:defCfg.MONTHS_SHORT.value, handler:this.configLocale } );
+	initEvents : function() {
 	
-	/**
-	* The long month labels for the current locale.
-	* @config MONTHS_LONG
-	* @type String[]
-	* @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
-	*/	
-	this.cfg.addProperty(defCfg.MONTHS_LONG.key,		{ value:defCfg.MONTHS_LONG.value, handler:this.configLocale } );
+		var defEvents = YAHOO.widget.Calendar._EVENT_TYPES;
 	
-	/**
-	* The 1-character weekday labels for the current locale.
-	* @config WEEKDAYS_1CHAR
-	* @type String[]
-	* @default ["S", "M", "T", "W", "T", "F", "S"]
-	*/	
-	this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key,	{ value:defCfg.WEEKDAYS_1CHAR.value, handler:this.configLocale } );
+		/**
+		* Fired before a selection is made
+		* @event beforeSelectEvent
+		*/
+		this.beforeSelectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SELECT); 
 	
-	/**
-	* The short weekday labels for the current locale.
-	* @config WEEKDAYS_SHORT
-	* @type String[]
-	* @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
-	*/	
-	this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key,	{ value:defCfg.WEEKDAYS_SHORT.value, handler:this.configLocale } );
+		/**
+		* Fired when a selection is made
+		* @event selectEvent
+		* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
+		*/
+		this.selectEvent = new YAHOO.util.CustomEvent(defEvents.SELECT);
 	
-	/**
-	* The medium weekday labels for the current locale.
-	* @config WEEKDAYS_MEDIUM
-	* @type String[]
-	* @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
-	*/	
-	this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key,	{ value:defCfg.WEEKDAYS_MEDIUM.value, handler:this.configLocale } );
+		/**
+		* Fired before a selection is made
+		* @event beforeDeselectEvent
+		*/
+		this.beforeDeselectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_DESELECT);
 	
-	/**
-	* The long weekday labels for the current locale.
-	* @config WEEKDAYS_LONG
-	* @type String[]
-	* @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
-	*/	
-	this.cfg.addProperty(defCfg.WEEKDAYS_LONG.key,	{ value:defCfg.WEEKDAYS_LONG.value, handler:this.configLocale } );
+		/**
+		* Fired when a selection is made
+		* @event deselectEvent
+		* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
+		*/
+		this.deselectEvent = new YAHOO.util.CustomEvent(defEvents.DESELECT);
+	
+		/**
+		* Fired when the Calendar page is changed
+		* @event changePageEvent
+		*/
+		this.changePageEvent = new YAHOO.util.CustomEvent(defEvents.CHANGE_PAGE);
+	
+		/**
+		* Fired before the Calendar is rendered
+		* @event beforeRenderEvent
+		*/
+		this.beforeRenderEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER);
+	
+		/**
+		* Fired when the Calendar is rendered
+		* @event renderEvent
+		*/
+		this.renderEvent = new YAHOO.util.CustomEvent(defEvents.RENDER);
+	
+		/**
+		* Fired when the Calendar is reset
+		* @event resetEvent
+		*/
+		this.resetEvent = new YAHOO.util.CustomEvent(defEvents.RESET);
+	
+		/**
+		* Fired when the Calendar is cleared
+		* @event clearEvent
+		*/
+		this.clearEvent = new YAHOO.util.CustomEvent(defEvents.CLEAR);
+	
+		/**
+		* Fired just before the Calendar is to be shown
+		* @event beforeShowEvent
+		*/
+		this.beforeShowEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SHOW);
+	
+		/**
+		* Fired after the Calendar is shown
+		* @event showEvent
+		*/
+		this.showEvent = new YAHOO.util.CustomEvent(defEvents.SHOW);
+	
+		/**
+		* Fired just before the Calendar is to be hidden
+		* @event beforeHideEvent
+		*/
+		this.beforeHideEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_HIDE);
+	
+		/**
+		* Fired after the Calendar is hidden
+		* @event hideEvent
+		*/
+		this.hideEvent = new YAHOO.util.CustomEvent(defEvents.HIDE);
 
-	/**
-	* Refreshes the locale values used to build the Calendar.
-	* @method refreshLocale
-	* @private
-	*/
-	var refreshLocale = function() {
-		this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key);
-		this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key);
-	};
-
-	this.cfg.subscribeToConfigEvent(defCfg.START_WEEKDAY.key, refreshLocale, this, true);
-	this.cfg.subscribeToConfigEvent(defCfg.MONTHS_SHORT.key, refreshLocale, this, true);
-	this.cfg.subscribeToConfigEvent(defCfg.MONTHS_LONG.key, refreshLocale, this, true);
-	this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_1CHAR.key, refreshLocale, this, true);
-	this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_SHORT.key, refreshLocale, this, true);
-	this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_MEDIUM.key, refreshLocale, this, true);
-	this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_LONG.key, refreshLocale, this, true);
+		/**
+		* Fired just before the CalendarNavigator is to be shown
+		* @event beforeShowNavEvent
+		*/
+		this.beforeShowNavEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SHOW_NAV);
 	
-	/**
-	* The setting that determines which length of month labels should be used. Possible values are "short" and "long".
-	* @config LOCALE_MONTHS
-	* @type String
-	* @default "long"
-	*/	
-	this.cfg.addProperty(defCfg.LOCALE_MONTHS.key,	{ value:defCfg.LOCALE_MONTHS.value, handler:this.configLocaleValues } );
+		/**
+		* Fired after the CalendarNavigator is shown
+		* @event showNavEvent
+		*/
+		this.showNavEvent = new YAHOO.util.CustomEvent(defEvents.SHOW_NAV);
 	
-	/**
-	* The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long".
-	* @config LOCALE_WEEKDAYS
-	* @type String
-	* @default "short"
-	*/	
-	this.cfg.addProperty(defCfg.LOCALE_WEEKDAYS.key,	{ value:defCfg.LOCALE_WEEKDAYS.value, handler:this.configLocaleValues } );
+		/**
+		* Fired just before the CalendarNavigator is to be hidden
+		* @event beforeHideNavEvent
+		*/
+		this.beforeHideNavEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_HIDE_NAV);
+	
+		/**
+		* Fired after the CalendarNavigator is hidden
+		* @event hideNavEvent
+		*/
+		this.hideNavEvent = new YAHOO.util.CustomEvent(defEvents.HIDE_NAV);
 
-	/**
-	* The value used to delimit individual dates in a date string passed to various Calendar functions.
-	* @config DATE_DELIMITER
-	* @type String
-	* @default ","
-	*/	
-	this.cfg.addProperty(defCfg.DATE_DELIMITER.key,		{ value:defCfg.DATE_DELIMITER.value, handler:this.configLocale } );
+		/**
+		* Fired just before the CalendarNavigator is to be rendered
+		* @event beforeRenderNavEvent
+		*/
+		this.beforeRenderNavEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER_NAV);
 
-	/**
-	* The value used to delimit date fields in a date string passed to various Calendar functions.
-	* @config DATE_FIELD_DELIMITER
-	* @type String
-	* @default "/"
-	*/	
-	this.cfg.addProperty(defCfg.DATE_FIELD_DELIMITER.key, { value:defCfg.DATE_FIELD_DELIMITER.value, handler:this.configLocale } );
+		/**
+		* Fired after the CalendarNavigator is rendered
+		* @event renderNavEvent
+		*/
+		this.renderNavEvent = new YAHOO.util.CustomEvent(defEvents.RENDER_NAV);
 
+		this.beforeSelectEvent.subscribe(this.onBeforeSelect, this, true);
+		this.selectEvent.subscribe(this.onSelect, this, true);
+		this.beforeDeselectEvent.subscribe(this.onBeforeDeselect, this, true);
+		this.deselectEvent.subscribe(this.onDeselect, this, true);
+		this.changePageEvent.subscribe(this.onChangePage, this, true);
+		this.renderEvent.subscribe(this.onRender, this, true);
+		this.resetEvent.subscribe(this.onReset, this, true);
+		this.clearEvent.subscribe(this.onClear, this, true);
+	},
+	
 	/**
-	* The value used to delimit date ranges in a date string passed to various Calendar functions.
-	* @config DATE_RANGE_DELIMITER
-	* @type String
-	* @default "-"
+	* The default event function that is attached to a date link within a calendar cell
+	* when the calendar is rendered.
+	* @method doSelectCell
+	* @param {DOMEvent} e	The event
+	* @param {Calendar} cal	A reference to the calendar passed by the Event utility
 	*/
-	this.cfg.addProperty(defCfg.DATE_RANGE_DELIMITER.key, { value:defCfg.DATE_RANGE_DELIMITER.value, handler:this.configLocale } );
+	doSelectCell : function(e, cal) {
+		var cell,index,d,date;
 
-	/**
-	* The position of the month in a month/year date string
-	* @config MY_MONTH_POSITION
-	* @type Number
-	* @default 1
-	*/
-	this.cfg.addProperty(defCfg.MY_MONTH_POSITION.key,	{ value:defCfg.MY_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+		var target = YAHOO.util.Event.getTarget(e);
+		var tagName = target.tagName.toLowerCase();
+		var defSelector = false;
 
-	/**
-	* The position of the year in a month/year date string
-	* @config MY_YEAR_POSITION
-	* @type Number
-	* @default 2
-	*/
-	this.cfg.addProperty(defCfg.MY_YEAR_POSITION.key,	{ value:defCfg.MY_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+		while (tagName != "td" && ! YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
 
-	/**
-	* The position of the month in a month/day date string
-	* @config MD_MONTH_POSITION
-	* @type Number
-	* @default 1
-	*/
-	this.cfg.addProperty(defCfg.MD_MONTH_POSITION.key,	{ value:defCfg.MD_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+			if (!defSelector && tagName == "a" && YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTOR)) {
+				defSelector = true;	
+			}
 
-	/**
-	* The position of the day in a month/year date string
-	* @config MD_DAY_POSITION
-	* @type Number
-	* @default 2
-	*/
-	this.cfg.addProperty(defCfg.MD_DAY_POSITION.key,		{ value:defCfg.MD_DAY_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+			target = target.parentNode;
+			tagName = target.tagName.toLowerCase();
+			// TODO: No need to go all the way up to html.
+			if (tagName == "html") {
+				return;
+			}
+		}
 
-	/**
-	* The position of the month in a month/day/year date string
-	* @config MDY_MONTH_POSITION
-	* @type Number
-	* @default 1
-	*/
-	this.cfg.addProperty(defCfg.MDY_MONTH_POSITION.key,	{ value:defCfg.MDY_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
-
-	/**
-	* The position of the day in a month/day/year date string
-	* @config MDY_DAY_POSITION
-	* @type Number
-	* @default 2
-	*/
-	this.cfg.addProperty(defCfg.MDY_DAY_POSITION.key,	{ value:defCfg.MDY_DAY_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
-
-	/**
-	* The position of the year in a month/day/year date string
-	* @config MDY_YEAR_POSITION
-	* @type Number
-	* @default 3
-	*/
-	this.cfg.addProperty(defCfg.MDY_YEAR_POSITION.key,	{ value:defCfg.MDY_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+		if (defSelector) {
+			// Stop link href navigation for default renderer
+			YAHOO.util.Event.preventDefault(e);
+		}
 	
-	/**
-	* The position of the month in the month year label string used as the Calendar header
-	* @config MY_LABEL_MONTH_POSITION
-	* @type Number
-	* @default 1
-	*/
-	this.cfg.addProperty(defCfg.MY_LABEL_MONTH_POSITION.key,	{ value:defCfg.MY_LABEL_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+		cell = target;
 
-	/**
-	* The position of the year in the month year label string used as the Calendar header
-	* @config MY_LABEL_YEAR_POSITION
-	* @type Number
-	* @default 2
-	*/
-	this.cfg.addProperty(defCfg.MY_LABEL_YEAR_POSITION.key,	{ value:defCfg.MY_LABEL_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
-	
-	/**
-	* The suffix used after the month when rendering the Calendar header
-	* @config MY_LABEL_MONTH_SUFFIX
-	* @type String
-	* @default " "
-	*/
-	this.cfg.addProperty(defCfg.MY_LABEL_MONTH_SUFFIX.key,	{ value:defCfg.MY_LABEL_MONTH_SUFFIX.value, handler:this.configLocale } );
-	
-	/**
-	* The suffix used after the year when rendering the Calendar header
-	* @config MY_LABEL_YEAR_SUFFIX
-	* @type String
-	* @default ""
-	*/
-	this.cfg.addProperty(defCfg.MY_LABEL_YEAR_SUFFIX.key, { value:defCfg.MY_LABEL_YEAR_SUFFIX.value, handler:this.configLocale } );
-};
+		if (YAHOO.util.Dom.hasClass(cell, cal.Style.CSS_CELL_SELECTABLE)) {
+			index = cell.id.split("cell")[1];
+			d = cal.cellDates[index];
+			date = YAHOO.widget.DateMath.getDate(d[0],d[1]-1,d[2]);
+		
+			var link;
 
-/**
-* The default handler for the "pagedate" property
-* @method configPageDate
-*/
-YAHOO.widget.Calendar.prototype.configPageDate = function(type, args, obj) {
-	this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key, this._parsePageDate(args[0]), true);
-};
+			cal.logger.log("Selecting cell " + index + " via click", "info");
+			if (cal.Options.MULTI_SELECT) {
+				link = cell.getElementsByTagName("a")[0];
+				if (link) {
+					link.blur();
+				}
 
-/**
-* The default handler for the "mindate" property
-* @method configMinDate
-*/
-YAHOO.widget.Calendar.prototype.configMinDate = function(type, args, obj) {
-	var val = args[0];
-	if (YAHOO.lang.isString(val)) {
-		val = this._parseDate(val);
-		this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MINDATE.key, new Date(val[0],(val[1]-1),val[2]));
-	}
-};
+				var cellDate = cal.cellDates[index];
+				var cellDateIndex = cal._indexOfSelectedFieldArray(cellDate);
 
-/**
-* The default handler for the "maxdate" property
-* @method configMaxDate
-*/
-YAHOO.widget.Calendar.prototype.configMaxDate = function(type, args, obj) {
-	var val = args[0];
-	if (YAHOO.lang.isString(val)) {
-		val = this._parseDate(val);
-		this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MAXDATE.key, new Date(val[0],(val[1]-1),val[2]));
-	}
-};
-
-/**
-* The default handler for the "selected" property
-* @method configSelected
-*/
-YAHOO.widget.Calendar.prototype.configSelected = function(type, args, obj) {
-	var selected = args[0];
-	var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+				if (cellDateIndex > -1) {	
+					cal.deselectCell(index);
+				} else {
+					cal.selectCell(index);
+				}	
 	
-	if (selected) {
-		if (YAHOO.lang.isString(selected)) {
-			this.cfg.setProperty(cfgSelected, this._parseDates(selected), true);
-		} 
-	}
-	if (! this._selectedDates) {
-		this._selectedDates = this.cfg.getProperty(cfgSelected);
-	}
-};
+			} else {
+				link = cell.getElementsByTagName("a")[0];
+				if (link) {
+					link.blur();
+				}
+				cal.selectCell(index);
+			}
+		}
+	},
 
-/**
-* The default handler for all configuration options properties
-* @method configOptions
-*/
-YAHOO.widget.Calendar.prototype.configOptions = function(type, args, obj) {
-	this.Options[type.toUpperCase()] = args[0];
-};
+	/**
+	* The event that is executed when the user hovers over a cell
+	* @method doCellMouseOver
+	* @param {DOMEvent} e	The event
+	* @param {Calendar} cal	A reference to the calendar passed by the Event utility
+	*/
+	doCellMouseOver : function(e, cal) {
+		var target;
+		if (e) {
+			target = YAHOO.util.Event.getTarget(e);
+		} else {
+			target = this;
+		}
 
-/**
-* The default handler for all configuration locale properties
-* @method configLocale
-*/
-YAHOO.widget.Calendar.prototype.configLocale = function(type, args, obj) {
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-	this.Locale[type.toUpperCase()] = args[0];
+		while (target.tagName && target.tagName.toLowerCase() != "td") {
+			target = target.parentNode;
+			if (!target.tagName || target.tagName.toLowerCase() == "html") {
+				return;
+			}
+		}
 
-	this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key);
-	this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key);
-};
+		if (YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
+			YAHOO.util.Dom.addClass(target, cal.Style.CSS_CELL_HOVER);
+		}
+	},
 
-/**
-* The default handler for all configuration locale field length properties
-* @method configLocaleValues
-*/
-YAHOO.widget.Calendar.prototype.configLocaleValues = function(type, args, obj) {
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG; 
+	/**
+	* The event that is executed when the user moves the mouse out of a cell
+	* @method doCellMouseOut
+	* @param {DOMEvent} e	The event
+	* @param {Calendar} cal	A reference to the calendar passed by the Event utility
+	*/
+	doCellMouseOut : function(e, cal) {
+		var target;
+		if (e) {
+			target = YAHOO.util.Event.getTarget(e);
+		} else {
+			target = this;
+		}
 
-	type = type.toLowerCase();
-	var val = args[0];
-
-	switch (type) {
-		case defCfg.LOCALE_MONTHS.key:
-			switch (val) {
-				case YAHOO.widget.Calendar.SHORT:
-					this.Locale.LOCALE_MONTHS = this.cfg.getProperty(defCfg.MONTHS_SHORT.key).concat();
-					break;
-				case YAHOO.widget.Calendar.LONG:
-					this.Locale.LOCALE_MONTHS = this.cfg.getProperty(defCfg.MONTHS_LONG.key).concat();
-					break;
+		while (target.tagName && target.tagName.toLowerCase() != "td") {
+			target = target.parentNode;
+			if (!target.tagName || target.tagName.toLowerCase() == "html") {
+				return;
 			}
-			break;
-		case defCfg.LOCALE_WEEKDAYS.key:
-			switch (val) {
-				case YAHOO.widget.Calendar.ONE_CHAR:
-					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_1CHAR.key).concat();
-					break;
-				case YAHOO.widget.Calendar.SHORT:
-					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_SHORT.key).concat();
-					break;
-				case YAHOO.widget.Calendar.MEDIUM:
-					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_MEDIUM.key).concat();
-					break;
-				case YAHOO.widget.Calendar.LONG:
-					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_LONG.key).concat();
-					break;
-			}
-			
-			var START_WEEKDAY = this.cfg.getProperty(defCfg.START_WEEKDAY.key);
+		}
 
-			if (START_WEEKDAY > 0) {
-				for (var w=0;w<START_WEEKDAY;++w) {
-					this.Locale.LOCALE_WEEKDAYS.push(this.Locale.LOCALE_WEEKDAYS.shift());
-				}
-			}
-			break;
-	}
-};
+		if (YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
+			YAHOO.util.Dom.removeClass(target, cal.Style.CSS_CELL_HOVER);
+		}
+	},
+	
+	setupConfig : function() {
+	
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
 
-/**
-* Defines the style constants for the Calendar
-* @method initStyles
-*/
-YAHOO.widget.Calendar.prototype.initStyles = function() {
-
-	var defStyle = YAHOO.widget.Calendar._STYLES;
-
-	this.Style = {
 		/**
-		* @property Style.CSS_ROW_HEADER
+		* The month/year representing the current visible Calendar date (mm/yyyy)
+		* @config pagedate
+		* @type String
+		* @default today's date
 		*/
-		CSS_ROW_HEADER: defStyle.CSS_ROW_HEADER,
+		this.cfg.addProperty(defCfg.PAGEDATE.key, { value:new Date(), handler:this.configPageDate } );
+
 		/**
-		* @property Style.CSS_ROW_FOOTER
+		* The date or range of dates representing the current Calendar selection
+		* @config selected
+		* @type String
+		* @default []
 		*/
-		CSS_ROW_FOOTER: defStyle.CSS_ROW_FOOTER,
+		this.cfg.addProperty(defCfg.SELECTED.key, { value:[], handler:this.configSelected } );
+
 		/**
-		* @property Style.CSS_CELL
+		* The title to display above the Calendar's month header
+		* @config title
+		* @type String
+		* @default ""
 		*/
-		CSS_CELL : defStyle.CSS_CELL,
+		this.cfg.addProperty(defCfg.TITLE.key, { value:defCfg.TITLE.value, handler:this.configTitle } );
+
 		/**
-		* @property Style.CSS_CELL_SELECTOR
+		* Whether or not a close button should be displayed for this Calendar
+		* @config close
+		* @type Boolean
+		* @default false
 		*/
-		CSS_CELL_SELECTOR : defStyle.CSS_CELL_SELECTOR,
+		this.cfg.addProperty(defCfg.CLOSE.key, { value:defCfg.CLOSE.value, handler:this.configClose } );
+
 		/**
-		* @property Style.CSS_CELL_SELECTED
+		* Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below.
+		* This property is enabled by default for IE6 and below. It is disabled by default for other browsers for performance reasons, but can be 
+		* enabled if required.
+		* 
+		* @config iframe
+		* @type Boolean
+		* @default true for IE6 and below, false for all other browsers
 		*/
-		CSS_CELL_SELECTED : defStyle.CSS_CELL_SELECTED,
+		this.cfg.addProperty(defCfg.IFRAME.key, { value:defCfg.IFRAME.value, handler:this.configIframe, validator:this.cfg.checkBoolean } );
+
 		/**
-		* @property Style.CSS_CELL_SELECTABLE
+		* The minimum selectable date in the current Calendar (mm/dd/yyyy)
+		* @config mindate
+		* @type String
+		* @default null
 		*/
-		CSS_CELL_SELECTABLE : defStyle.CSS_CELL_SELECTABLE,
+		this.cfg.addProperty(defCfg.MINDATE.key, { value:defCfg.MINDATE.value, handler:this.configMinDate } );
+
 		/**
-		* @property Style.CSS_CELL_RESTRICTED
+		* The maximum selectable date in the current Calendar (mm/dd/yyyy)
+		* @config maxdate
+		* @type String
+		* @default null
 		*/
-		CSS_CELL_RESTRICTED : defStyle.CSS_CELL_RESTRICTED,
+		this.cfg.addProperty(defCfg.MAXDATE.key, { value:defCfg.MAXDATE.value, handler:this.configMaxDate } );
+	
+	
+		// Options properties
+	
 		/**
-		* @property Style.CSS_CELL_TODAY
+		* True if the Calendar should allow multiple selections. False by default.
+		* @config MULTI_SELECT
+		* @type Boolean
+		* @default false
 		*/
-		CSS_CELL_TODAY : defStyle.CSS_CELL_TODAY,
+		this.cfg.addProperty(defCfg.MULTI_SELECT.key,	{ value:defCfg.MULTI_SELECT.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+	
 		/**
-		* @property Style.CSS_CELL_OOM
+		* The weekday the week begins on. Default is 0 (Sunday).
+		* @config START_WEEKDAY
+		* @type number
+		* @default 0
 		*/
-		CSS_CELL_OOM : defStyle.CSS_CELL_OOM,
+		this.cfg.addProperty(defCfg.START_WEEKDAY.key,	{ value:defCfg.START_WEEKDAY.value, handler:this.configOptions, validator:this.cfg.checkNumber  } );
+	
 		/**
-		* @property Style.CSS_CELL_OOB
+		* True if the Calendar should show weekday labels. True by default.
+		* @config SHOW_WEEKDAYS
+		* @type Boolean
+		* @default true
 		*/
-		CSS_CELL_OOB : defStyle.CSS_CELL_OOB,
+		this.cfg.addProperty(defCfg.SHOW_WEEKDAYS.key,	{ value:defCfg.SHOW_WEEKDAYS.value, handler:this.configOptions, validator:this.cfg.checkBoolean  } );
+	
 		/**
-		* @property Style.CSS_HEADER
+		* True if the Calendar should show week row headers. False by default.
+		* @config SHOW_WEEK_HEADER
+		* @type Boolean
+		* @default false
 		*/
-		CSS_HEADER : defStyle.CSS_HEADER,
+		this.cfg.addProperty(defCfg.SHOW_WEEK_HEADER.key, { value:defCfg.SHOW_WEEK_HEADER.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+	
 		/**
-		* @property Style.CSS_HEADER_TEXT
-		*/
-		CSS_HEADER_TEXT : defStyle.CSS_HEADER_TEXT,
+		* True if the Calendar should show week row footers. False by default.
+		* @config SHOW_WEEK_FOOTER
+		* @type Boolean
+		* @default false
+		*/	
+		this.cfg.addProperty(defCfg.SHOW_WEEK_FOOTER.key,{ value:defCfg.SHOW_WEEK_FOOTER.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+	
 		/**
-		* @property Style.CSS_BODY
-		*/
-		CSS_BODY : defStyle.CSS_BODY,
+		* True if the Calendar should suppress weeks that are not a part of the current month. False by default.
+		* @config HIDE_BLANK_WEEKS
+		* @type Boolean
+		* @default false
+		*/	
+		this.cfg.addProperty(defCfg.HIDE_BLANK_WEEKS.key, { value:defCfg.HIDE_BLANK_WEEKS.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+		
 		/**
-		* @property Style.CSS_WEEKDAY_CELL
-		*/
-		CSS_WEEKDAY_CELL : defStyle.CSS_WEEKDAY_CELL,
+		* The image that should be used for the left navigation arrow.
+		* @config NAV_ARROW_LEFT
+		* @type String
+		* @deprecated	You can customize the image by overriding the default CSS class for the left arrow - "calnavleft"  
+		* @default null
+		*/	
+		this.cfg.addProperty(defCfg.NAV_ARROW_LEFT.key,	{ value:defCfg.NAV_ARROW_LEFT.value, handler:this.configOptions } );
+	
 		/**
-		* @property Style.CSS_WEEKDAY_ROW
-		*/
-		CSS_WEEKDAY_ROW : defStyle.CSS_WEEKDAY_ROW,
+		* The image that should be used for the right navigation arrow.
+		* @config NAV_ARROW_RIGHT
+		* @type String
+		* @deprecated	You can customize the image by overriding the default CSS class for the right arrow - "calnavright"
+		* @default null
+		*/	
+		this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key, { value:defCfg.NAV_ARROW_RIGHT.value, handler:this.configOptions } );
+	
+		// Locale properties
+	
 		/**
-		* @property Style.CSS_FOOTER
+		* The short month labels for the current locale.
+		* @config MONTHS_SHORT
+		* @type String[]
+		* @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
 		*/
-		CSS_FOOTER : defStyle.CSS_FOOTER,
+		this.cfg.addProperty(defCfg.MONTHS_SHORT.key,	{ value:defCfg.MONTHS_SHORT.value, handler:this.configLocale } );
+		
 		/**
-		* @property Style.CSS_CALENDAR
-		*/
-		CSS_CALENDAR : defStyle.CSS_CALENDAR,
+		* The long month labels for the current locale.
+		* @config MONTHS_LONG
+		* @type String[]
+		* @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
+		*/	
+		this.cfg.addProperty(defCfg.MONTHS_LONG.key,		{ value:defCfg.MONTHS_LONG.value, handler:this.configLocale } );
+
 		/**
-		* @property Style.CSS_SINGLE
+		* The 1-character weekday labels for the current locale.
+		* @config WEEKDAYS_1CHAR
+		* @type String[]
+		* @default ["S", "M", "T", "W", "T", "F", "S"]
+		*/	
+		this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key,	{ value:defCfg.WEEKDAYS_1CHAR.value, handler:this.configLocale } );
+		
+		/**
+		* The short weekday labels for the current locale.
+		* @config WEEKDAYS_SHORT
+		* @type String[]
+		* @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
+		*/	
+		this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key,	{ value:defCfg.WEEKDAYS_SHORT.value, handler:this.configLocale } );
+		
+		/**
+		* The medium weekday labels for the current locale.
+		* @config WEEKDAYS_MEDIUM
+		* @type String[]
+		* @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
+		*/	
+		this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key,	{ value:defCfg.WEEKDAYS_MEDIUM.value, handler:this.configLocale } );
+		
+		/**
+		* The long weekday labels for the current locale.
+		* @config WEEKDAYS_LONG
+		* @type String[]
+		* @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
+		*/	
+		this.cfg.addProperty(defCfg.WEEKDAYS_LONG.key,	{ value:defCfg.WEEKDAYS_LONG.value, handler:this.configLocale } );
+	
+		/**
+		* Refreshes the locale values used to build the Calendar.
+		* @method refreshLocale
+		* @private
 		*/
-		CSS_SINGLE : defStyle.CSS_SINGLE,
+		var refreshLocale = function() {
+			this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key);
+			this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key);
+		};
+	
+		this.cfg.subscribeToConfigEvent(defCfg.START_WEEKDAY.key, refreshLocale, this, true);
+		this.cfg.subscribeToConfigEvent(defCfg.MONTHS_SHORT.key, refreshLocale, this, true);
+		this.cfg.subscribeToConfigEvent(defCfg.MONTHS_LONG.key, refreshLocale, this, true);
+		this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_1CHAR.key, refreshLocale, this, true);
+		this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_SHORT.key, refreshLocale, this, true);
+		this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_MEDIUM.key, refreshLocale, this, true);
+		this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_LONG.key, refreshLocale, this, true);
+		
 		/**
-		* @property Style.CSS_CONTAINER
+		* The setting that determines which length of month labels should be used. Possible values are "short" and "long".
+		* @config LOCALE_MONTHS
+		* @type String
+		* @default "long"
+		*/	
+		this.cfg.addProperty(defCfg.LOCALE_MONTHS.key,	{ value:defCfg.LOCALE_MONTHS.value, handler:this.configLocaleValues } );
+		
+		/**
+		* The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long".
+		* @config LOCALE_WEEKDAYS
+		* @type String
+		* @default "short"
+		*/	
+		this.cfg.addProperty(defCfg.LOCALE_WEEKDAYS.key,	{ value:defCfg.LOCALE_WEEKDAYS.value, handler:this.configLocaleValues } );
+	
+		/**
+		* The value used to delimit individual dates in a date string passed to various Calendar functions.
+		* @config DATE_DELIMITER
+		* @type String
+		* @default ","
+		*/	
+		this.cfg.addProperty(defCfg.DATE_DELIMITER.key,		{ value:defCfg.DATE_DELIMITER.value, handler:this.configLocale } );
+	
+		/**
+		* The value used to delimit date fields in a date string passed to various Calendar functions.
+		* @config DATE_FIELD_DELIMITER
+		* @type String
+		* @default "/"
+		*/	
+		this.cfg.addProperty(defCfg.DATE_FIELD_DELIMITER.key, { value:defCfg.DATE_FIELD_DELIMITER.value, handler:this.configLocale } );
+	
+		/**
+		* The value used to delimit date ranges in a date string passed to various Calendar functions.
+		* @config DATE_RANGE_DELIMITER
+		* @type String
+		* @default "-"
 		*/
-		CSS_CONTAINER : defStyle.CSS_CONTAINER,
+		this.cfg.addProperty(defCfg.DATE_RANGE_DELIMITER.key, { value:defCfg.DATE_RANGE_DELIMITER.value, handler:this.configLocale } );
+	
 		/**
-		* @property Style.CSS_NAV_LEFT
+		* The position of the month in a month/year date string
+		* @config MY_MONTH_POSITION
+		* @type Number
+		* @default 1
 		*/
-		CSS_NAV_LEFT : defStyle.CSS_NAV_LEFT,
+		this.cfg.addProperty(defCfg.MY_MONTH_POSITION.key,	{ value:defCfg.MY_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	
 		/**
-		* @property Style.CSS_NAV_RIGHT
+		* The position of the year in a month/year date string
+		* @config MY_YEAR_POSITION
+		* @type Number
+		* @default 2
 		*/
-		CSS_NAV_RIGHT : defStyle.CSS_NAV_RIGHT,
+		this.cfg.addProperty(defCfg.MY_YEAR_POSITION.key,	{ value:defCfg.MY_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	
 		/**
-		* @property Style.CSS_CLOSE
+		* The position of the month in a month/day date string
+		* @config MD_MONTH_POSITION
+		* @type Number
+		* @default 1
 		*/
-		CSS_CLOSE : defStyle.CSS_CLOSE,
+		this.cfg.addProperty(defCfg.MD_MONTH_POSITION.key,	{ value:defCfg.MD_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	
 		/**
-		* @property Style.CSS_CELL_TOP
+		* The position of the day in a month/year date string
+		* @config MD_DAY_POSITION
+		* @type Number
+		* @default 2
 		*/
-		CSS_CELL_TOP : defStyle.CSS_CELL_TOP,
+		this.cfg.addProperty(defCfg.MD_DAY_POSITION.key,		{ value:defCfg.MD_DAY_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	
 		/**
-		* @property Style.CSS_CELL_LEFT
+		* The position of the month in a month/day/year date string
+		* @config MDY_MONTH_POSITION
+		* @type Number
+		* @default 1
 		*/
-		CSS_CELL_LEFT : defStyle.CSS_CELL_LEFT,
+		this.cfg.addProperty(defCfg.MDY_MONTH_POSITION.key,	{ value:defCfg.MDY_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	
 		/**
-		* @property Style.CSS_CELL_RIGHT
+		* The position of the day in a month/day/year date string
+		* @config MDY_DAY_POSITION
+		* @type Number
+		* @default 2
 		*/
-		CSS_CELL_RIGHT : defStyle.CSS_CELL_RIGHT,
+		this.cfg.addProperty(defCfg.MDY_DAY_POSITION.key,	{ value:defCfg.MDY_DAY_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	
 		/**
-		* @property Style.CSS_CELL_BOTTOM
+		* The position of the year in a month/day/year date string
+		* @config MDY_YEAR_POSITION
+		* @type Number
+		* @default 3
 		*/
-		CSS_CELL_BOTTOM : defStyle.CSS_CELL_BOTTOM,
+		this.cfg.addProperty(defCfg.MDY_YEAR_POSITION.key,	{ value:defCfg.MDY_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+		
 		/**
-		* @property Style.CSS_CELL_HOVER
+		* The position of the month in the month year label string used as the Calendar header
+		* @config MY_LABEL_MONTH_POSITION
+		* @type Number
+		* @default 1
 		*/
-		CSS_CELL_HOVER : defStyle.CSS_CELL_HOVER,
+		this.cfg.addProperty(defCfg.MY_LABEL_MONTH_POSITION.key,	{ value:defCfg.MY_LABEL_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	
 		/**
-		* @property Style.CSS_CELL_HIGHLIGHT1
+		* The position of the year in the month year label string used as the Calendar header
+		* @config MY_LABEL_YEAR_POSITION
+		* @type Number
+		* @default 2
 		*/
-		CSS_CELL_HIGHLIGHT1 : defStyle.CSS_CELL_HIGHLIGHT1,
+		this.cfg.addProperty(defCfg.MY_LABEL_YEAR_POSITION.key,	{ value:defCfg.MY_LABEL_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+		
 		/**
-		* @property Style.CSS_CELL_HIGHLIGHT2
+		* The suffix used after the month when rendering the Calendar header
+		* @config MY_LABEL_MONTH_SUFFIX
+		* @type String
+		* @default " "
 		*/
-		CSS_CELL_HIGHLIGHT2 : defStyle.CSS_CELL_HIGHLIGHT2,
+		this.cfg.addProperty(defCfg.MY_LABEL_MONTH_SUFFIX.key,	{ value:defCfg.MY_LABEL_MONTH_SUFFIX.value, handler:this.configLocale } );
+		
 		/**
-		* @property Style.CSS_CELL_HIGHLIGHT3
+		* The suffix used after the year when rendering the Calendar header
+		* @config MY_LABEL_YEAR_SUFFIX
+		* @type String
+		* @default ""
 		*/
-		CSS_CELL_HIGHLIGHT3 : defStyle.CSS_CELL_HIGHLIGHT3,
+		this.cfg.addProperty(defCfg.MY_LABEL_YEAR_SUFFIX.key, { value:defCfg.MY_LABEL_YEAR_SUFFIX.value, handler:this.configLocale } );
+
 		/**
-		* @property Style.CSS_CELL_HIGHLIGHT4
+		* Configuration for the Month/Year CalendarNavigator UI which allows the user to jump directly to a 
+		* specific Month/Year without having to scroll sequentially through months.
+		* <p>
+		* Setting this property to null (default value) or false, will disable the CalendarNavigator UI.
+		* </p>
+		* <p>
+		* Setting this property to true will enable the CalendarNavigatior UI with the default CalendarNavigator configuration values.
+		* </p>
+		* <p>
+		* This property can also be set to an object literal containing configuration properties for the CalendarNavigator UI.
+		* The configuration object expects the the following case-sensitive properties, with the "strings" property being a nested object.
+		* Any properties which are not provided will use the default values (defined in the CalendarNavigator class).
+		* </p>
+		* <dl>
+		* <dt>strings</dt>
+		* <dd><em>Object</em> :  An object with the properties shown below, defining the string labels to use in the Navigator's UI
+		*     <dl>
+		*         <dt>month</dt><dd><em>String</em> : The string to use for the month label. Defaults to "Month".</dd>
+		*         <dt>year</dt><dd><em>String</em> : The string to use for the year label. Defaults to "Year".</dd>
+		*         <dt>submit</dt><dd><em>String</em> : The string to use for the submit button label. Defaults to "Okay".</dd>
+		*         <dt>cancel</dt><dd><em>String</em> : The string to use for the cancel button label. Defaults to "Cancel".</dd>
+		*         <dt>invalidYear</dt><dd><em>String</em> : The string to use for invalid year values. Defaults to "Year needs to be a number".</dd>
+		*     </dl>
+		* </dd>
+		* <dt>monthFormat</dt><dd><em>String</em> : The month format to use. Either YAHOO.widget.Calendar.LONG, or YAHOO.widget.Calendar.SHORT. Defaults to YAHOO.widget.Calendar.LONG</dd>
+		* <dt>initialFocus</dt><dd><em>String</em> : Either "year" or "month" specifying which input control should get initial focus. Defaults to "year"</dd>
+		* </dl>
+		* <p>E.g.</p>
+		* <pre>
+		* var navConfig = {
+		*	  strings: {
+		*		  month:"Calendar Month",
+		*		  year:"Calendar Year",
+		*		  submit: "Submit",
+		*		  cancel: "Cancel",
+		*		  invalidYear: "Please enter a valid year"
+		*	  },
+		*	  monthFormat: YAHOO.widget.Calendar.SHORT,
+		*	  initialFocus: "month"
+		* }
+		* </pre>
+		* @config navigator
+		* @type {Object|Boolean}
+		* @default null
 		*/
-		CSS_CELL_HIGHLIGHT4 : defStyle.CSS_CELL_HIGHLIGHT4
-	};
-};
+		this.cfg.addProperty(defCfg.NAV.key, { value:defCfg.NAV.value, handler:this.configNavigator } );
+	},
 
-/**
-* Builds the date label that will be displayed in the calendar header or
-* footer, depending on configuration.
-* @method buildMonthLabel
-* @return	{String}	The formatted calendar month label
-*/
-YAHOO.widget.Calendar.prototype.buildMonthLabel = function() {
-	var pageDate = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key);
+	/**
+	* The default handler for the "pagedate" property
+	* @method configPageDate
+	*/
+	configPageDate : function(type, args, obj) {
+		this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key, this._parsePageDate(args[0]), true);
+	},
 
-	var monthLabel  = this.Locale.LOCALE_MONTHS[pageDate.getMonth()] + this.Locale.MY_LABEL_MONTH_SUFFIX;
-	var yearLabel = pageDate.getFullYear() + this.Locale.MY_LABEL_YEAR_SUFFIX;
-
-	if (this.Locale.MY_LABEL_MONTH_POSITION == 2 || this.Locale.MY_LABEL_YEAR_POSITION == 1) {
-		return yearLabel + monthLabel;
-	} else {
-		return monthLabel + yearLabel;
-	}
-};
-
-/**
-* Builds the date digit that will be displayed in calendar cells
-* @method buildDayLabel
-* @param {Date}	workingDate	The current working date
-* @return	{String}	The formatted day label
-*/
-YAHOO.widget.Calendar.prototype.buildDayLabel = function(workingDate) {
-	return workingDate.getDate();
-};
-
-/**
- * Creates the title bar element and adds it to Calendar container DIV
- * 
- * @method createTitleBar
- * @param {String} strTitle The title to display in the title bar
- * @return The title bar element
- */
-YAHOO.widget.Calendar.prototype.createTitleBar = function(strTitle) {
-	var tDiv = YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || document.createElement("div");
-	tDiv.className = YAHOO.widget.CalendarGroup.CSS_2UPTITLE;
-	tDiv.innerHTML = strTitle;
-	this.oDomContainer.insertBefore(tDiv, this.oDomContainer.firstChild);
-
-	YAHOO.util.Dom.addClass(this.oDomContainer, "withtitle");
-
-	return tDiv;
-};
-
-/**
- * Removes the title bar element from the DOM
- * 
- * @method removeTitleBar
- */
-YAHOO.widget.Calendar.prototype.removeTitleBar = function() {
-	var tDiv = YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || null;
-	if (tDiv) {
-		YAHOO.util.Event.purgeElement(tDiv);
-		this.oDomContainer.removeChild(tDiv);
-	}
-	YAHOO.util.Dom.removeClass(this.oDomContainer, "withtitle");
-};
-
-/**
- * Creates the close button HTML element and adds it to Calendar container DIV
- * 
- * @method createCloseButton
- * @return The close HTML element created
- */
-YAHOO.widget.Calendar.prototype.createCloseButton = function() {
-	var Dom = YAHOO.util.Dom,
-		Event = YAHOO.util.Event,
-		cssClose = YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,
-		DEPR_CLOSE_PATH = "us/my/bn/x_d.gif";
-
-	var lnk = Dom.getElementsByClassName("link-close", "a", this.oDomContainer)[0];
-
-	if (!lnk) {
-		lnk = document.createElement("a");  
-		Event.addListener(lnk, "click", function(e, cal) {
-			cal.hide(); 
-			Event.preventDefault(e);
-		}, this);        
-	}
-
-	lnk.href = "#";
-	lnk.className = "link-close";
-
-	if (YAHOO.widget.Calendar.IMG_ROOT !== null) {
-		var img = Dom.getElementsByClassName(cssClose, "img", lnk)[0] || document.createElement("img");
-		img.src = YAHOO.widget.Calendar.IMG_ROOT + DEPR_CLOSE_PATH;
-		img.className = cssClose;
-		lnk.appendChild(img);
-	} else {
-		lnk.innerHTML = '<span class="' + cssClose + ' ' + this.Style.CSS_CLOSE + '"></span>';
-	}
-	this.oDomContainer.appendChild(lnk);
-
-	return lnk;
-};
-
-/**
- * Removes the close button HTML element from the DOM
- * 
- * @method removeCloseButton
- */
-YAHOO.widget.Calendar.prototype.removeCloseButton = function() {
-	var btn = YAHOO.util.Dom.getElementsByClassName("link-close", "a", this.oDomContainer)[0] || null;
-	if (btn) {
-		YAHOO.util.Event.purgeElement(btn);
-		this.oDomContainer.removeChild(btn);
-	}
-};
-
-/**
-* Renders the calendar header.
-* @method renderHeader
-* @param {Array}	html	The current working HTML array
-* @return {Array} The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.renderHeader = function(html) {
-	this.logger.log("Rendering header", "info");
-	var colSpan = 7;
-	
-	var DEPR_NAV_LEFT = "us/tr/callt.gif";
-	var DEPR_NAV_RIGHT = "us/tr/calrt.gif";	
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-	
-	if (this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key)) {
-		colSpan += 1;
-	}
-
-	if (this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key)) {
-		colSpan += 1;
-	}
-
-	html[html.length] = "<thead>";
-	html[html.length] =		"<tr>";
-	html[html.length] =			'<th colspan="' + colSpan + '" class="' + this.Style.CSS_HEADER_TEXT + '">';
-	html[html.length] =				'<div class="' + this.Style.CSS_HEADER + '">';
-
-	var renderLeft, renderRight = false;
-
-	if (this.parent) {
-		if (this.index === 0) {
-			renderLeft = true;
+	/**
+	* The default handler for the "mindate" property
+	* @method configMinDate
+	*/
+	configMinDate : function(type, args, obj) {
+		var val = args[0];
+		if (YAHOO.lang.isString(val)) {
+			val = this._parseDate(val);
+			this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MINDATE.key, YAHOO.widget.DateMath.getDate(val[0],(val[1]-1),val[2]));
 		}
-		if (this.index == (this.parent.cfg.getProperty("pages") -1)) {
-			renderRight = true;
-		}
-	} else {
-		renderLeft = true;
-		renderRight = true;
-	}
+	},
 
-	var cal = this.parent || this;
-	
-	if (renderLeft) {
-		var leftArrow = this.cfg.getProperty(defCfg.NAV_ARROW_LEFT.key);
-		// Check for deprecated customization - If someone set IMG_ROOT, but didn't set NAV_ARROW_LEFT, then set NAV_ARROW_LEFT to the old deprecated value
-		if (leftArrow === null && YAHOO.widget.Calendar.IMG_ROOT !== null) {
-			leftArrow = YAHOO.widget.Calendar.IMG_ROOT + DEPR_NAV_LEFT;
+	/**
+	* The default handler for the "maxdate" property
+	* @method configMaxDate
+	*/
+	configMaxDate : function(type, args, obj) {
+		var val = args[0];
+		if (YAHOO.lang.isString(val)) {
+			val = this._parseDate(val);
+			this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MAXDATE.key, YAHOO.widget.DateMath.getDate(val[0],(val[1]-1),val[2]));
 		}
-		var leftStyle = (leftArrow === null) ? "" : ' style="background-image:url(' + leftArrow + ')"';
-		html[html.length] = '<a class="' + this.Style.CSS_NAV_LEFT + '"' + leftStyle + ' > </a>';
-	}
+	},
 	
-	html[html.length] = this.buildMonthLabel();
-	
-	if (renderRight) {
-		var rightArrow = this.cfg.getProperty(defCfg.NAV_ARROW_RIGHT.key);
-		if (rightArrow === null && YAHOO.widget.Calendar.IMG_ROOT !== null) {
-			rightArrow = YAHOO.widget.Calendar.IMG_ROOT + DEPR_NAV_RIGHT;
+	/**
+	* The default handler for the "selected" property
+	* @method configSelected
+	*/
+	configSelected : function(type, args, obj) {
+		var selected = args[0];
+		var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+		
+		if (selected) {
+			if (YAHOO.lang.isString(selected)) {
+				this.cfg.setProperty(cfgSelected, this._parseDates(selected), true);
+			} 
 		}
-		var rightStyle = (rightArrow === null) ? "" : ' style="background-image:url(' + rightArrow + ')"';
-		html[html.length] = '<a class="' + this.Style.CSS_NAV_RIGHT + '"' + rightStyle + ' > </a>';
-	}
-
-	html[html.length] =	'</div>\n</th>\n</tr>';
-
-	if (this.cfg.getProperty(defCfg.SHOW_WEEKDAYS.key)) {
-		html = this.buildWeekdays(html);
-	}
+		if (! this._selectedDates) {
+			this._selectedDates = this.cfg.getProperty(cfgSelected);
+		}
+	},
 	
-	html[html.length] = '</thead>';
-
-	return html;
-};
-
-/**
-* Renders the Calendar's weekday headers.
-* @method buildWeekdays
-* @param {Array}	html	The current working HTML array
-* @return {Array} The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.buildWeekdays = function(html) {
-
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-
-	html[html.length] = '<tr class="' + this.Style.CSS_WEEKDAY_ROW + '">';
-
-	if (this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key)) {
-		html[html.length] = '<th> </th>';
-	}
-
-	for(var i=0;i<this.Locale.LOCALE_WEEKDAYS.length;++i) {
-		html[html.length] = '<th class="calweekdaycell">' + this.Locale.LOCALE_WEEKDAYS[i] + '</th>';
-	}
-
-	if (this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key)) {
-		html[html.length] = '<th> </th>';
-	}
-
-	html[html.length] = '</tr>';
-
-	return html;
-};
-
-/**
-* Renders the calendar body.
-* @method renderBody
-* @param {Date}	workingDate	The current working Date being used for the render process
-* @param {Array}	html	The current working HTML array
-* @return {Array} The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.renderBody = function(workingDate, html) {
-	this.logger.log("Rendering body", "info");
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-
-	var startDay = this.cfg.getProperty(defCfg.START_WEEKDAY.key);
-
-	this.preMonthDays = workingDate.getDay();
-	if (startDay > 0) {
-		this.preMonthDays -= startDay;
-	}
-	if (this.preMonthDays < 0) {
-		this.preMonthDays += 7;
-	}
+	/**
+	* The default handler for all configuration options properties
+	* @method configOptions
+	*/
+	configOptions : function(type, args, obj) {
+		this.Options[type.toUpperCase()] = args[0];
+	},
 	
-	this.monthDays = YAHOO.widget.DateMath.findMonthEnd(workingDate).getDate();
-	this.postMonthDays = YAHOO.widget.Calendar.DISPLAY_DAYS-this.preMonthDays-this.monthDays;
-	this.logger.log(this.preMonthDays + " preciding out-of-month days", "info");
-	this.logger.log(this.monthDays + " month days", "info");
-	this.logger.log(this.postMonthDays + " post-month days", "info");
+	/**
+	* The default handler for all configuration locale properties
+	* @method configLocale
+	*/
+	configLocale : function(type, args, obj) {
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+		this.Locale[type.toUpperCase()] = args[0];
 	
-	workingDate = YAHOO.widget.DateMath.subtract(workingDate, YAHOO.widget.DateMath.DAY, this.preMonthDays);
-	this.logger.log("Calendar page starts on " + workingDate, "info");
-
-	var weekNum,weekClass;
-	var weekPrefix = "w";
-	var cellPrefix = "_cell";
-	var workingDayPrefix = "wd";
-	var dayPrefix = "d";
+		this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key);
+		this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key);
+	},
 	
-	var cellRenderers;
-	var renderer;
+	/**
+	* The default handler for all configuration locale field length properties
+	* @method configLocaleValues
+	*/
+	configLocaleValues : function(type, args, obj) {
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG; 
 	
-	var todayYear = this.today.getFullYear();
-	var todayMonth = this.today.getMonth();
-	var todayDate = this.today.getDate();
+		type = type.toLowerCase();
+		var val = args[0];
 	
-	var useDate = this.cfg.getProperty(defCfg.PAGEDATE.key);
-	var hideBlankWeeks = this.cfg.getProperty(defCfg.HIDE_BLANK_WEEKS.key);
-	var showWeekFooter = this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key);
-	var showWeekHeader = this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key);
-	var mindate = this.cfg.getProperty(defCfg.MINDATE.key);
-	var maxdate = this.cfg.getProperty(defCfg.MAXDATE.key);
-
-	if (mindate) {
-		mindate = YAHOO.widget.DateMath.clearTime(mindate);
-	}
-	if (maxdate) {
-		maxdate = YAHOO.widget.DateMath.clearTime(maxdate);
-	}
-	
-	html[html.length] = '<tbody class="m' + (useDate.getMonth()+1) + ' ' + this.Style.CSS_BODY + '">';
-	
-	var i = 0;
-
-	var tempDiv = document.createElement("div");
-	var cell = document.createElement("td");
-	tempDiv.appendChild(cell);
-
-	var jan1 = new Date(useDate.getFullYear(),0,1);
-
-	var cal = this.parent || this;
-
-	for (var r=0;r<6;r++) {
-
-		weekNum = YAHOO.widget.DateMath.getWeekNumber(workingDate, useDate.getFullYear(), startDay);
-		weekClass = weekPrefix + weekNum;
-
-		// Local OOM check for performance, since we already have pagedate
-		if (r !== 0 && hideBlankWeeks === true && workingDate.getMonth() != useDate.getMonth()) {
-			break;
-		} else {
-
-			html[html.length] = '<tr class="' + weekClass + '">';
-			
-			if (showWeekHeader) { html = this.renderRowHeader(weekNum, html); }
-			
-			for (var d=0;d<7;d++){ // Render actual days
-
-				cellRenderers = [];
-				renderer = null;
-
-				this.clearElement(cell);
-				cell.className = this.Style.CSS_CELL;
-				cell.id = this.id + cellPrefix + i;
-				this.logger.log("Rendering cell " + cell.id + " (" + workingDate.getFullYear() + "-" + (workingDate.getMonth()+1) + "-" + workingDate.getDate() + ")", "cellrender");
-
-				if (workingDate.getDate()		== todayDate && 
-					workingDate.getMonth()		== todayMonth &&
-					workingDate.getFullYear()	== todayYear) {
-					cellRenderers[cellRenderers.length]=cal.renderCellStyleToday;
+		switch (type) {
+			case defCfg.LOCALE_MONTHS.key:
+				switch (val) {
+					case YAHOO.widget.Calendar.SHORT:
+						this.Locale.LOCALE_MONTHS = this.cfg.getProperty(defCfg.MONTHS_SHORT.key).concat();
+						break;
+					case YAHOO.widget.Calendar.LONG:
+						this.Locale.LOCALE_MONTHS = this.cfg.getProperty(defCfg.MONTHS_LONG.key).concat();
+						break;
 				}
-				
-				var workingArray = [workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()];
-				this.cellDates[this.cellDates.length] = workingArray; // Add this date to cellDates
-				
-				// Local OOM check for performance, since we already have pagedate
-				if (workingDate.getMonth() != useDate.getMonth()) {
-					cellRenderers[cellRenderers.length]=cal.renderCellNotThisMonth;
-				} else {
-					YAHOO.util.Dom.addClass(cell, workingDayPrefix + workingDate.getDay());
-					YAHOO.util.Dom.addClass(cell, dayPrefix + workingDate.getDate());
-				
-					for (var s=0;s<this.renderStack.length;++s) {
-
-						var rArray = this.renderStack[s];
-						var type = rArray[0];
-						
-						var month;
-						var day;
-						var year;
-						
-						switch (type) {
-							case YAHOO.widget.Calendar.DATE:
-								month = rArray[1][1];
-								day = rArray[1][2];
-								year = rArray[1][0];
-
-								if (workingDate.getMonth()+1 == month && workingDate.getDate() == day && workingDate.getFullYear() == year) {
-									renderer = rArray[2];
-									this.renderStack.splice(s,1);
-								}
-								break;
-							case YAHOO.widget.Calendar.MONTH_DAY:
-								month = rArray[1][0];
-								day = rArray[1][1];
-								
-								if (workingDate.getMonth()+1 == month && workingDate.getDate() == day) {
-									renderer = rArray[2];
-									this.renderStack.splice(s,1);
-								}
-								break;
-							case YAHOO.widget.Calendar.RANGE:
-								var date1 = rArray[1][0];
-								var date2 = rArray[1][1];
-
-								var d1month = date1[1];
-								var d1day = date1[2];
-								var d1year = date1[0];
-								
-								var d1 = new Date(d1year, d1month-1, d1day);
-
-								var d2month = date2[1];
-								var d2day = date2[2];
-								var d2year = date2[0];
-
-								var d2 = new Date(d2year, d2month-1, d2day);
-
-								if (workingDate.getTime() >= d1.getTime() && workingDate.getTime() <= d2.getTime()) {
-									renderer = rArray[2];
-
-									if (workingDate.getTime()==d2.getTime()) { 
-										this.renderStack.splice(s,1);
-									}
-								}
-								break;
-							case YAHOO.widget.Calendar.WEEKDAY:
-								
-								var weekday = rArray[1][0];
-								if (workingDate.getDay()+1 == weekday) {
-									renderer = rArray[2];
-								}
-								break;
-							case YAHOO.widget.Calendar.MONTH:
-								
-								month = rArray[1][0];
-								if (workingDate.getMonth()+1 == month) {
-									renderer = rArray[2];
-								}
-								break;
-						}
-						
-						if (renderer) {
-							cellRenderers[cellRenderers.length]=renderer;
-						}
-					}
-
+				break;
+			case defCfg.LOCALE_WEEKDAYS.key:
+				switch (val) {
+					case YAHOO.widget.Calendar.ONE_CHAR:
+						this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_1CHAR.key).concat();
+						break;
+					case YAHOO.widget.Calendar.SHORT:
+						this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_SHORT.key).concat();
+						break;
+					case YAHOO.widget.Calendar.MEDIUM:
+						this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_MEDIUM.key).concat();
+						break;
+					case YAHOO.widget.Calendar.LONG:
+						this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_LONG.key).concat();
+						break;
 				}
-
-				if (this._indexOfSelectedFieldArray(workingArray) > -1) {
-					cellRenderers[cellRenderers.length]=cal.renderCellStyleSelected; 
-				}
-
-				if ((mindate && (workingDate.getTime() < mindate.getTime())) ||
-					(maxdate && (workingDate.getTime() > maxdate.getTime()))
-				) {
-					cellRenderers[cellRenderers.length]=cal.renderOutOfBoundsDate;
-				} else {
-					cellRenderers[cellRenderers.length]=cal.styleCellDefault;
-					cellRenderers[cellRenderers.length]=cal.renderCellDefault;	
-				}
 				
-				for (var x=0; x < cellRenderers.length; ++x) {
-					this.logger.log("renderer[" + x + "] for (" + workingDate.getFullYear() + "-" + (workingDate.getMonth()+1) + "-" + workingDate.getDate() + ")", "cellrender");
-					if (cellRenderers[x].call(cal, workingDate, cell) == YAHOO.widget.Calendar.STOP_RENDER) {
-						break;
+				var START_WEEKDAY = this.cfg.getProperty(defCfg.START_WEEKDAY.key);
+	
+				if (START_WEEKDAY > 0) {
+					for (var w=0;w<START_WEEKDAY;++w) {
+						this.Locale.LOCALE_WEEKDAYS.push(this.Locale.LOCALE_WEEKDAYS.shift());
 					}
 				}
+				break;
+		}
+	},
 
-				workingDate.setTime(workingDate.getTime() + YAHOO.widget.DateMath.ONE_DAY_MS);
-
-				if (i >= 0 && i <= 6) {
-					YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_TOP);
-				}
-				if ((i % 7) === 0) {
-					YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_LEFT);
-				}
-				if (((i+1) % 7) === 0) {
-					YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_RIGHT);
-				}
-				
-				var postDays = this.postMonthDays; 
-				if (hideBlankWeeks && postDays >= 7) {
-					var blankWeeks = Math.floor(postDays/7);
-					for (var p=0;p<blankWeeks;++p) {
-						postDays -= 7;
+	/**
+	 * The default handler for the "navigator" property
+	 * @method configNavigator
+	 */
+	configNavigator : function(type, args, obj) {
+		var val = args[0];
+		if (YAHOO.widget.CalendarNavigator && (val === true || YAHOO.lang.isObject(val))) {
+			if (!this.oNavigator) {
+				this.oNavigator = new YAHOO.widget.CalendarNavigator(this);
+				// Cleanup DOM Refs/Events before innerHTML is removed.
+				function erase() {
+					if (!this.pages) {
+						this.oNavigator.erase();
 					}
 				}
-				
-				if (i >= ((this.preMonthDays+postDays+this.monthDays)-7)) {
-					YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_BOTTOM);
-				}
-
-				html[html.length] = tempDiv.innerHTML;
-				i++;
+				this.beforeRenderEvent.subscribe(erase, this, true);
 			}
-
-			if (showWeekFooter) { html = this.renderRowFooter(weekNum, html); }
-
-			html[html.length] = '</tr>';
+		} else {
+			if (this.oNavigator) {
+				this.oNavigator.destroy();
+				this.oNavigator = null;
+			}
 		}
-	}
+	},
 
-	html[html.length] = '</tbody>';
+	/**
+	* Defines the style constants for the Calendar
+	* @method initStyles
+	*/
+	initStyles : function() {
 
-	return html;
-};
+		var defStyle = YAHOO.widget.Calendar._STYLES;
 
-/**
-* Renders the calendar footer. In the default implementation, there is
-* no footer.
-* @method renderFooter
-* @param {Array}	html	The current working HTML array
-* @return {Array} The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.renderFooter = function(html) { return html; };
-
-/**
-* Renders the calendar after it has been configured. The render() method has a specific call chain that will execute
-* when the method is called: renderHeader, renderBody, renderFooter.
-* Refer to the documentation for those methods for information on 
-* individual render tasks.
-* @method render
-*/
-YAHOO.widget.Calendar.prototype.render = function() {
-	this.beforeRenderEvent.fire();
-
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-
-	// Find starting day of the current month
-	var workingDate = YAHOO.widget.DateMath.findMonthStart(this.cfg.getProperty(defCfg.PAGEDATE.key));
-
-	this.resetRenderers();
-	this.cellDates.length = 0;
-
-	YAHOO.util.Event.purgeElement(this.oDomContainer, true);
-
-	var html = [];
-
-	html[html.length] = '<table cellSpacing="0" class="' + this.Style.CSS_CALENDAR + ' y' + workingDate.getFullYear() + '" id="' + this.id + '">';
-	html = this.renderHeader(html);
-	html = this.renderBody(workingDate, html);
-	html = this.renderFooter(html);
-	html[html.length] = '</table>';
-
-	this.oDomContainer.innerHTML = html.join("\n");
-
-	this.applyListeners();
-	this.cells = this.oDomContainer.getElementsByTagName("td");
-
-	this.cfg.refireEvent(defCfg.TITLE.key);
-	this.cfg.refireEvent(defCfg.CLOSE.key);
-	this.cfg.refireEvent(defCfg.IFRAME.key);
-
-	this.renderEvent.fire();
-};
-
-/**
-* Applies the Calendar's DOM listeners to applicable elements.
-* @method applyListeners
-*/
-YAHOO.widget.Calendar.prototype.applyListeners = function() {
+		this.Style = {
+			/**
+			* @property Style.CSS_ROW_HEADER
+			*/
+			CSS_ROW_HEADER: defStyle.CSS_ROW_HEADER,
+			/**
+			* @property Style.CSS_ROW_FOOTER
+			*/
+			CSS_ROW_FOOTER: defStyle.CSS_ROW_FOOTER,
+			/**
+			* @property Style.CSS_CELL
+			*/
+			CSS_CELL : defStyle.CSS_CELL,
+			/**
+			* @property Style.CSS_CELL_SELECTOR
+			*/
+			CSS_CELL_SELECTOR : defStyle.CSS_CELL_SELECTOR,
+			/**
+			* @property Style.CSS_CELL_SELECTED
+			*/
+			CSS_CELL_SELECTED : defStyle.CSS_CELL_SELECTED,
+			/**
+			* @property Style.CSS_CELL_SELECTABLE
+			*/
+			CSS_CELL_SELECTABLE : defStyle.CSS_CELL_SELECTABLE,
+			/**
+			* @property Style.CSS_CELL_RESTRICTED
+			*/
+			CSS_CELL_RESTRICTED : defStyle.CSS_CELL_RESTRICTED,
+			/**
+			* @property Style.CSS_CELL_TODAY
+			*/
+			CSS_CELL_TODAY : defStyle.CSS_CELL_TODAY,
+			/**
+			* @property Style.CSS_CELL_OOM
+			*/
+			CSS_CELL_OOM : defStyle.CSS_CELL_OOM,
+			/**
+			* @property Style.CSS_CELL_OOB
+			*/
+			CSS_CELL_OOB : defStyle.CSS_CELL_OOB,
+			/**
+			* @property Style.CSS_HEADER
+			*/
+			CSS_HEADER : defStyle.CSS_HEADER,
+			/**
+			* @property Style.CSS_HEADER_TEXT
+			*/
+			CSS_HEADER_TEXT : defStyle.CSS_HEADER_TEXT,
+			/**
+			* @property Style.CSS_BODY
+			*/
+			CSS_BODY : defStyle.CSS_BODY,
+			/**
+			* @property Style.CSS_WEEKDAY_CELL
+			*/
+			CSS_WEEKDAY_CELL : defStyle.CSS_WEEKDAY_CELL,
+			/**
+			* @property Style.CSS_WEEKDAY_ROW
+			*/
+			CSS_WEEKDAY_ROW : defStyle.CSS_WEEKDAY_ROW,
+			/**
+			* @property Style.CSS_FOOTER
+			*/
+			CSS_FOOTER : defStyle.CSS_FOOTER,
+			/**
+			* @property Style.CSS_CALENDAR
+			*/
+			CSS_CALENDAR : defStyle.CSS_CALENDAR,
+			/**
+			* @property Style.CSS_SINGLE
+			*/
+			CSS_SINGLE : defStyle.CSS_SINGLE,
+			/**
+			* @property Style.CSS_CONTAINER
+			*/
+			CSS_CONTAINER : defStyle.CSS_CONTAINER,
+			/**
+			* @property Style.CSS_NAV_LEFT
+			*/
+			CSS_NAV_LEFT : defStyle.CSS_NAV_LEFT,
+			/**
+			* @property Style.CSS_NAV_RIGHT
+			*/
+			CSS_NAV_RIGHT : defStyle.CSS_NAV_RIGHT,
+			/**
+			* @property Style.CSS_NAV
+			*/
+			CSS_NAV : defStyle.CSS_NAV,
+			/**
+			* @property Style.CSS_CLOSE
+			*/
+			CSS_CLOSE : defStyle.CSS_CLOSE,
+			/**
+			* @property Style.CSS_CELL_TOP
+			*/
+			CSS_CELL_TOP : defStyle.CSS_CELL_TOP,
+			/**
+			* @property Style.CSS_CELL_LEFT
+			*/
+			CSS_CELL_LEFT : defStyle.CSS_CELL_LEFT,
+			/**
+			* @property Style.CSS_CELL_RIGHT
+			*/
+			CSS_CELL_RIGHT : defStyle.CSS_CELL_RIGHT,
+			/**
+			* @property Style.CSS_CELL_BOTTOM
+			*/
+			CSS_CELL_BOTTOM : defStyle.CSS_CELL_BOTTOM,
+			/**
+			* @property Style.CSS_CELL_HOVER
+			*/
+			CSS_CELL_HOVER : defStyle.CSS_CELL_HOVER,
+			/**
+			* @property Style.CSS_CELL_HIGHLIGHT1
+			*/
+			CSS_CELL_HIGHLIGHT1 : defStyle.CSS_CELL_HIGHLIGHT1,
+			/**
+			* @property Style.CSS_CELL_HIGHLIGHT2
+			*/
+			CSS_CELL_HIGHLIGHT2 : defStyle.CSS_CELL_HIGHLIGHT2,
+			/**
+			* @property Style.CSS_CELL_HIGHLIGHT3
+			*/
+			CSS_CELL_HIGHLIGHT3 : defStyle.CSS_CELL_HIGHLIGHT3,
+			/**
+			* @property Style.CSS_CELL_HIGHLIGHT4
+			*/
+			CSS_CELL_HIGHLIGHT4 : defStyle.CSS_CELL_HIGHLIGHT4
+		};
+	},
 	
-	var root = this.oDomContainer;
-	var cal = this.parent || this;
+	/**
+	* Builds the date label that will be displayed in the calendar header or
+	* footer, depending on configuration.
+	* @method buildMonthLabel
+	* @return	{String}	The formatted calendar month label
+	*/
+	buildMonthLabel : function() {
+		var pageDate = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key);
 	
-	var anchor = "a";
-	var mousedown = "mousedown";
+		var monthLabel  = this.Locale.LOCALE_MONTHS[pageDate.getMonth()] + this.Locale.MY_LABEL_MONTH_SUFFIX;
+		var yearLabel = pageDate.getFullYear() + this.Locale.MY_LABEL_YEAR_SUFFIX;
 
-	var linkLeft = YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT, anchor, root);
-	var linkRight = YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT, anchor, root);
-
-	if (linkLeft && linkLeft.length > 0) {
-		this.linkLeft = linkLeft[0];
-		YAHOO.util.Event.addListener(this.linkLeft, mousedown, cal.previousMonth, cal, true);
-	}
-
-	if (linkRight && linkRight.length > 0) {
-		this.linkRight = linkRight[0];
-		YAHOO.util.Event.addListener(this.linkRight, mousedown, cal.nextMonth, cal, true);
-	}
-
-	if (this.domEventMap) {
-		var el,elements;
-		for (var cls in this.domEventMap) {	
-			if (YAHOO.lang.hasOwnProperty(this.domEventMap, cls)) {
-				var items = this.domEventMap[cls];
-
-				if (! (items instanceof Array)) {
-					items = [items];
-				}
-
-				for (var i=0;i<items.length;i++)	{
-					var item = items[i];
-					elements = YAHOO.util.Dom.getElementsByClassName(cls, item.tag, this.oDomContainer);
-
-					for (var c=0;c<elements.length;c++) {
-						el = elements[c];
-						 YAHOO.util.Event.addListener(el, item.event, item.handler, item.scope, item.correct );
-					}
-				}
-			}
+		if (this.Locale.MY_LABEL_MONTH_POSITION == 2 || this.Locale.MY_LABEL_YEAR_POSITION == 1) {
+			return yearLabel + monthLabel;
+		} else {
+			return monthLabel + yearLabel;
 		}
-	}
-
-	YAHOO.util.Event.addListener(this.oDomContainer, "click", this.doSelectCell, this);
-	YAHOO.util.Event.addListener(this.oDomContainer, "mouseover", this.doCellMouseOver, this);
-	YAHOO.util.Event.addListener(this.oDomContainer, "mouseout", this.doCellMouseOut, this);
-};
-
-/**
-* Retrieves the Date object for the specified Calendar cell
-* @method getDateByCellId
-* @param {String}	id	The id of the cell
-* @return {Date} The Date object for the specified Calendar cell
-*/
-YAHOO.widget.Calendar.prototype.getDateByCellId = function(id) {
-	var date = this.getDateFieldsByCellId(id);
-	return new Date(date[0],date[1]-1,date[2]);
-};
-
-/**
-* Retrieves the Date object for the specified Calendar cell
-* @method getDateFieldsByCellId
-* @param {String}	id	The id of the cell
-* @return {Array}	The array of Date fields for the specified Calendar cell
-*/
-YAHOO.widget.Calendar.prototype.getDateFieldsByCellId = function(id) {
-	id = id.toLowerCase().split("_cell")[1];
-	id = parseInt(id, 10);
-	return this.cellDates[id];
-};
-
-// BEGIN BUILT-IN TABLE CELL RENDERERS
-
-/**
-* Renders a cell that falls before the minimum date or after the maximum date.
-* widget class.
-* @method renderOutOfBoundsDate
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
-*			should not be terminated
-*/
-YAHOO.widget.Calendar.prototype.renderOutOfBoundsDate = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_OOB);
-	cell.innerHTML = workingDate.getDate();
-	return YAHOO.widget.Calendar.STOP_RENDER;
-};
-
-/**
-* Renders the row header for a week.
-* @method renderRowHeader
-* @param {Number}	weekNum	The week number of the current row
-* @param {Array}	cell	The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.renderRowHeader = function(weekNum, html) {
-	html[html.length] = '<th class="calrowhead">' + weekNum + '</th>';
-	return html;
-};
-
-/**
-* Renders the row footer for a week.
-* @method renderRowFooter
-* @param {Number}	weekNum	The week number of the current row
-* @param {Array}	cell	The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.renderRowFooter = function(weekNum, html) {
-	html[html.length] = '<th class="calrowfoot">' + weekNum + '</th>';
-	return html;
-};
-
-/**
-* Renders a single standard calendar cell in the calendar widget table.
-* All logic for determining how a standard default cell will be rendered is 
-* encapsulated in this method, and must be accounted for when extending the
-* widget class.
-* @method renderCellDefault
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellDefault = function(workingDate, cell) {
-	cell.innerHTML = '<a href="#" class="' + this.Style.CSS_CELL_SELECTOR + '">' + this.buildDayLabel(workingDate) + "</a>";
-};
-
-/**
-* Styles a selectable cell.
-* @method styleCellDefault
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.styleCellDefault = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_SELECTABLE);
-};
-
-
-/**
-* Renders a single standard calendar cell using the CSS hightlight1 style
-* @method renderCellStyleHighlight1
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleHighlight1 = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT1);
-};
-
-/**
-* Renders a single standard calendar cell using the CSS hightlight2 style
-* @method renderCellStyleHighlight2
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleHighlight2 = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT2);
-};
-
-/**
-* Renders a single standard calendar cell using the CSS hightlight3 style
-* @method renderCellStyleHighlight3
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleHighlight3 = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT3);
-};
-
-/**
-* Renders a single standard calendar cell using the CSS hightlight4 style
-* @method renderCellStyleHighlight4
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleHighlight4 = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT4);
-};
-
-/**
-* Applies the default style used for rendering today's date to the current calendar cell
-* @method renderCellStyleToday
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleToday = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_TODAY);
-};
-
-/**
-* Applies the default style used for rendering selected dates to the current calendar cell
-* @method renderCellStyleSelected
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
-*			should not be terminated
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleSelected = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_SELECTED);
-};
-
-/**
-* Applies the default style used for rendering dates that are not a part of the current
-* month (preceding or trailing the cells for the current month)
-* @method renderCellNotThisMonth
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
-*			should not be terminated
-*/
-YAHOO.widget.Calendar.prototype.renderCellNotThisMonth = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_OOM);
-	cell.innerHTML=workingDate.getDate();
-	return YAHOO.widget.Calendar.STOP_RENDER;
-};
-
-/**
-* Renders the current calendar cell as a non-selectable "black-out" date using the default
-* restricted style.
-* @method renderBodyCellRestricted
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
-*			should not be terminated
-*/
-YAHOO.widget.Calendar.prototype.renderBodyCellRestricted = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL);
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_RESTRICTED);
-	cell.innerHTML=workingDate.getDate();
-	return YAHOO.widget.Calendar.STOP_RENDER;
-};
-
-// END BUILT-IN TABLE CELL RENDERERS
-
-// BEGIN MONTH NAVIGATION METHODS
-
-/**
-* Adds the designated number of months to the current calendar month, and sets the current
-* calendar page date to the new month.
-* @method addMonths
-* @param {Number}	count	The number of months to add to the current calendar
-*/
-YAHOO.widget.Calendar.prototype.addMonths = function(count) {
-	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
-	this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.add(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.MONTH, count));
-	this.resetRenderers();
-	this.changePageEvent.fire();
-};
-
-/**
-* Subtracts the designated number of months from the current calendar month, and sets the current
-* calendar page date to the new month.
-* @method subtractMonths
-* @param {Number}	count	The number of months to subtract from the current calendar
-*/
-YAHOO.widget.Calendar.prototype.subtractMonths = function(count) {
-	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
-	this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.subtract(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.MONTH, count));
-	this.resetRenderers();
-	this.changePageEvent.fire();
-};
-
-/**
-* Adds the designated number of years to the current calendar, and sets the current
-* calendar page date to the new month.
-* @method addYears
-* @param {Number}	count	The number of years to add to the current calendar
-*/
-YAHOO.widget.Calendar.prototype.addYears = function(count) {
-	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
-	this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.add(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.YEAR, count));
-	this.resetRenderers();
-	this.changePageEvent.fire();
-};
-
-/**
-* Subtcats the designated number of years from the current calendar, and sets the current
-* calendar page date to the new month.
-* @method subtractYears
-* @param {Number}	count	The number of years to subtract from the current calendar
-*/
-YAHOO.widget.Calendar.prototype.subtractYears = function(count) {
-	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
-	this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.subtract(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.YEAR, count));
-	this.resetRenderers();
-	this.changePageEvent.fire();
-};
-
-/**
-* Navigates to the next month page in the calendar widget.
-* @method nextMonth
-*/
-YAHOO.widget.Calendar.prototype.nextMonth = function() {
-	this.addMonths(1);
-};
-
-/**
-* Navigates to the previous month page in the calendar widget.
-* @method previousMonth
-*/
-YAHOO.widget.Calendar.prototype.previousMonth = function() {
-	this.subtractMonths(1);
-};
-
-/**
-* Navigates to the next year in the currently selected month in the calendar widget.
-* @method nextYear
-*/
-YAHOO.widget.Calendar.prototype.nextYear = function() {
-	this.addYears(1);
-};
-
-/**
-* Navigates to the previous year in the currently selected month in the calendar widget.
-* @method previousYear
-*/
-YAHOO.widget.Calendar.prototype.previousYear = function() {
-	this.subtractYears(1);
-};
-
-// END MONTH NAVIGATION METHODS
-
-// BEGIN SELECTION METHODS
-
-/**
-* Resets the calendar widget to the originally selected month and year, and 
-* sets the calendar to the initial selection(s).
-* @method reset
-*/
-YAHOO.widget.Calendar.prototype.reset = function() {
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-	this.cfg.resetProperty(defCfg.SELECTED.key);
-	this.cfg.resetProperty(defCfg.PAGEDATE.key);
-	this.resetEvent.fire();
-};
-
-/**
-* Clears the selected dates in the current calendar widget and sets the calendar
-* to the current month and year.
-* @method clear
-*/
-YAHOO.widget.Calendar.prototype.clear = function() {
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-	this.cfg.setProperty(defCfg.SELECTED.key, []);
-	this.cfg.setProperty(defCfg.PAGEDATE.key, new Date(this.today.getTime()));
-	this.clearEvent.fire();
-};
-
-/**
-* Selects a date or a collection of dates on the current calendar. This method, by default,
-* does not call the render method explicitly. Once selection has completed, render must be 
-* called for the changes to be reflected visually.
-*
-* Any dates which are OOB (out of bounds, not selectable) will not be selected and the array of 
-* selected dates passed to the selectEvent will not contain OOB dates.
-* 
-* If all dates are OOB, the no state change will occur; beforeSelect and select events will not be fired.
-*
-* @method select
-* @param	{String/Date/Date[]}	date	The date string of dates to select in the current calendar. Valid formats are
-*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
-*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
-*								This method can also take a JavaScript Date object or an array of Date objects.
-* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.Calendar.prototype.select = function(date) {
-	this.logger.log("Select: " + date, "info");
-
-	var aToBeSelected = this._toFieldArray(date);
-	this.logger.log("Selection field array: " + aToBeSelected, "info");
-
-	// Filtered array of valid dates
-	var validDates = [];
-	var selected = [];
-	var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+	},
 	
-	for (var a=0; a < aToBeSelected.length; ++a) {
-		var toSelect = aToBeSelected[a];
-
-		if (!this.isDateOOB(this._toDate(toSelect))) {
-			
-			if (validDates.length === 0) {
-				this.beforeSelectEvent.fire();
-				selected = this.cfg.getProperty(cfgSelected);
-			}
-
-			validDates.push(toSelect);
-			
-			if (this._indexOfSelectedFieldArray(toSelect) == -1) { 
-				selected[selected.length] = toSelect;
-			}
+	/**
+	* Builds the date digit that will be displayed in calendar cells
+	* @method buildDayLabel
+	* @param {Date}	workingDate	The current working date
+	* @return	{String}	The formatted day label
+	*/
+	buildDayLabel : function(workingDate) {
+		return workingDate.getDate();
+	},
+	
+	/**
+	 * Creates the title bar element and adds it to Calendar container DIV
+	 * 
+	 * @method createTitleBar
+	 * @param {String} strTitle The title to display in the title bar
+	 * @return The title bar element
+	 */
+	createTitleBar : function(strTitle) {
+		var tDiv = YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || document.createElement("div");
+		tDiv.className = YAHOO.widget.CalendarGroup.CSS_2UPTITLE;
+		tDiv.innerHTML = strTitle;
+		this.oDomContainer.insertBefore(tDiv, this.oDomContainer.firstChild);
+	
+		YAHOO.util.Dom.addClass(this.oDomContainer, "withtitle");
+	
+		return tDiv;
+	},
+	
+	/**
+	 * Removes the title bar element from the DOM
+	 * 
+	 * @method removeTitleBar
+	 */
+	removeTitleBar : function() {
+		var tDiv = YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || null;
+		if (tDiv) {
+			YAHOO.util.Event.purgeElement(tDiv);
+			this.oDomContainer.removeChild(tDiv);
 		}
-	}
+		YAHOO.util.Dom.removeClass(this.oDomContainer, "withtitle");
+	},
 	
-	if (validDates.length === 0) { this.logger.log("All provided dates were OOB. beforeSelect and select events not fired", "info"); }
-
-	if (validDates.length > 0) {
-		if (this.parent) {
-			this.parent.cfg.setProperty(cfgSelected, selected);
+	/**
+	 * Creates the close button HTML element and adds it to Calendar container DIV
+	 * 
+	 * @method createCloseButton
+	 * @return The close HTML element created
+	 */
+	createCloseButton : function() {
+		var Dom = YAHOO.util.Dom,
+			Event = YAHOO.util.Event,
+			cssClose = YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,
+			DEPR_CLOSE_PATH = "us/my/bn/x_d.gif";
+	
+		var lnk = Dom.getElementsByClassName("link-close", "a", this.oDomContainer)[0];
+	
+		if (!lnk) {
+			lnk = document.createElement("a");  
+			Event.addListener(lnk, "click", function(e, cal) {
+				cal.hide(); 
+				Event.preventDefault(e);
+			}, this);        
+		}
+	
+		lnk.href = "#";
+		lnk.className = "link-close";
+	
+		if (YAHOO.widget.Calendar.IMG_ROOT !== null) {
+			var img = Dom.getElementsByClassName(cssClose, "img", lnk)[0] || document.createElement("img");
+			img.src = YAHOO.widget.Calendar.IMG_ROOT + DEPR_CLOSE_PATH;
+			img.className = cssClose;
+			lnk.appendChild(img);
 		} else {
-			this.cfg.setProperty(cfgSelected, selected);
+			lnk.innerHTML = '<span class="' + cssClose + ' ' + this.Style.CSS_CLOSE + '"></span>';
 		}
-		this.selectEvent.fire(validDates);
-	}
-
-	return this.getSelectedDates();
-};
-
-/**
-* Selects a date on the current calendar by referencing the index of the cell that should be selected.
-* This method is used to easily select a single cell (usually with a mouse click) without having to do
-* a full render. The selected style is applied to the cell directly.
-*
-* If the cell is not marked with the CSS_CELL_SELECTABLE class (as is the case by default for out of month 
-* or out of bounds cells), it will not be selected and in such a case beforeSelect and select events will not be fired.
-* 
-* @method selectCell
-* @param	{Number}	cellIndex	The index of the cell to select in the current calendar. 
-* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.Calendar.prototype.selectCell = function(cellIndex) {
-
-	var cell = this.cells[cellIndex];
-	var cellDate = this.cellDates[cellIndex];
-	var dCellDate = this._toDate(cellDate);
-	this.logger.log("Select: " + dCellDate, "info");
+		this.oDomContainer.appendChild(lnk);
 	
-	var selectable = YAHOO.util.Dom.hasClass(cell, this.Style.CSS_CELL_SELECTABLE);
-	if (!selectable) {this.logger.log("The cell at cellIndex:" + cellIndex + " is not a selectable cell. beforeSelect, select events not fired", "info"); }
+		return lnk;
+	},
+	
+	/**
+	 * Removes the close button HTML element from the DOM
+	 * 
+	 * @method removeCloseButton
+	 */
+	removeCloseButton : function() {
+		var btn = YAHOO.util.Dom.getElementsByClassName("link-close", "a", this.oDomContainer)[0] || null;
+		if (btn) {
+			YAHOO.util.Event.purgeElement(btn);
+			this.oDomContainer.removeChild(btn);
+		}
+	},
 
-	if (selectable) {
-
-		this.beforeSelectEvent.fire();
-
-		var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
-		var selected = this.cfg.getProperty(cfgSelected);
-
-		var selectDate = cellDate.concat();
-
-		if (this._indexOfSelectedFieldArray(selectDate) == -1) {
-			selected[selected.length] = selectDate;
+	/**
+	* Renders the calendar header.
+	* @method renderHeader
+	* @param {Array}	html	The current working HTML array
+	* @return {Array} The current working HTML array
+	*/
+	renderHeader : function(html) {
+		this.logger.log("Rendering header", "render");
+		var colSpan = 7;
+		
+		var DEPR_NAV_LEFT = "us/tr/callt.gif";
+		var DEPR_NAV_RIGHT = "us/tr/calrt.gif";	
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+		
+		if (this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key)) {
+			colSpan += 1;
 		}
+	
+		if (this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key)) {
+			colSpan += 1;
+		}
+	
+		html[html.length] = "<thead>";
+		html[html.length] =		"<tr>";
+		html[html.length] =			'<th colspan="' + colSpan + '" class="' + this.Style.CSS_HEADER_TEXT + '">';
+		html[html.length] =				'<div class="' + this.Style.CSS_HEADER + '">';
+	
+		var renderLeft, renderRight = false;
+	
 		if (this.parent) {
-			this.parent.cfg.setProperty(cfgSelected, selected);
+			if (this.index === 0) {
+				renderLeft = true;
+			}
+			if (this.index == (this.parent.cfg.getProperty("pages") -1)) {
+				renderRight = true;
+			}
 		} else {
-			this.cfg.setProperty(cfgSelected, selected);
+			renderLeft = true;
+			renderRight = true;
 		}
-		this.renderCellStyleSelected(dCellDate,cell);
-		this.selectEvent.fire([selectDate]);
-
-		this.doCellMouseOut.call(cell, null, this);		
-	}
-
-	return this.getSelectedDates();
-};
-
-/**
-* Deselects a date or a collection of dates on the current calendar. This method, by default,
-* does not call the render method explicitly. Once deselection has completed, render must be 
-* called for the changes to be reflected visually.
-* 
-* The method will not attempt to deselect any dates which are OOB (out of bounds, and hence not selectable) 
-* and the array of deselected dates passed to the deselectEvent will not contain any OOB dates.
-* 
-* If all dates are OOB, beforeDeselect and deselect events will not be fired.
-* 
-* @method deselect
-* @param	{String/Date/Date[]}	date	The date string of dates to deselect in the current calendar. Valid formats are
-*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
-*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
-*								This method can also take a JavaScript Date object or an array of Date objects.	
-* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.Calendar.prototype.deselect = function(date) {
-	this.logger.log("Deselect: " + date, "info");
-
-	var aToBeDeselected = this._toFieldArray(date);
-	this.logger.log("Deselection field array: " + aToBeDeselected, "info");
-
-	var validDates = [];
-	var selected = [];
-	var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
-
-	for (var a=0; a < aToBeDeselected.length; ++a) {
-		var toDeselect = aToBeDeselected[a];
-
-		if (!this.isDateOOB(this._toDate(toDeselect))) {
-
-			if (validDates.length === 0) {
-				this.beforeDeselectEvent.fire();
-				selected = this.cfg.getProperty(cfgSelected);
+	
+		if (renderLeft) {
+			var leftArrow = this.cfg.getProperty(defCfg.NAV_ARROW_LEFT.key);
+			// Check for deprecated customization - If someone set IMG_ROOT, but didn't set NAV_ARROW_LEFT, then set NAV_ARROW_LEFT to the old deprecated value
+			if (leftArrow === null && YAHOO.widget.Calendar.IMG_ROOT !== null) {
+				leftArrow = YAHOO.widget.Calendar.IMG_ROOT + DEPR_NAV_LEFT;
 			}
+			var leftStyle = (leftArrow === null) ? "" : ' style="background-image:url(' + leftArrow + ')"';
+			html[html.length] = '<a class="' + this.Style.CSS_NAV_LEFT + '"' + leftStyle + ' > </a>';
+		}
 
-			validDates.push(toDeselect);
+		var lbl = this.buildMonthLabel();
+		var cal = this.parent || this;
+		if (cal.cfg.getProperty("navigator")) {
+			lbl = "<a class=\"" + this.Style.CSS_NAV + "\" href=\"#\">" + lbl + "</a>";
+		}
+		html[html.length] = lbl;
 
-			var index = this._indexOfSelectedFieldArray(toDeselect);
-			if (index != -1) {	
-				selected.splice(index,1);
+		if (renderRight) {
+			var rightArrow = this.cfg.getProperty(defCfg.NAV_ARROW_RIGHT.key);
+			if (rightArrow === null && YAHOO.widget.Calendar.IMG_ROOT !== null) {
+				rightArrow = YAHOO.widget.Calendar.IMG_ROOT + DEPR_NAV_RIGHT;
 			}
+			var rightStyle = (rightArrow === null) ? "" : ' style="background-image:url(' + rightArrow + ')"';
+			html[html.length] = '<a class="' + this.Style.CSS_NAV_RIGHT + '"' + rightStyle + ' > </a>';
 		}
-	}
 
-	if (validDates.length === 0) { this.logger.log("All provided dates were OOB. beforeDeselect and deselect events not fired");}
+		html[html.length] =	'</div>\n</th>\n</tr>';
 
-	if (validDates.length > 0) {
-		if (this.parent) {
-			this.parent.cfg.setProperty(cfgSelected, selected);
-		} else {
-			this.cfg.setProperty(cfgSelected, selected);
+		if (this.cfg.getProperty(defCfg.SHOW_WEEKDAYS.key)) {
+			html = this.buildWeekdays(html);
 		}
-		this.deselectEvent.fire(validDates);
-	}
-
-	return this.getSelectedDates();
-};
-
-/**
-* Deselects a date on the current calendar by referencing the index of the cell that should be deselected.
-* This method is used to easily deselect a single cell (usually with a mouse click) without having to do
-* a full render. The selected style is removed from the cell directly.
-* 
-* If the cell is not marked with the CSS_CELL_SELECTABLE class (as is the case by default for out of month 
-* or out of bounds cells), the method will not attempt to deselect it and in such a case, beforeDeselect and 
-* deselect events will not be fired.
-* 
-* @method deselectCell
-* @param	{Number}	cellIndex	The index of the cell to deselect in the current calendar. 
-* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.Calendar.prototype.deselectCell = function(cellIndex) {
-	var cell = this.cells[cellIndex];
-	var cellDate = this.cellDates[cellIndex];
-	var cellDateIndex = this._indexOfSelectedFieldArray(cellDate);
+		
+		html[html.length] = '</thead>';
 	
-	var selectable = YAHOO.util.Dom.hasClass(cell, this.Style.CSS_CELL_SELECTABLE);
-	if (!selectable) { this.logger.log("The cell at cellIndex:" + cellIndex + " is not a selectable/deselectable cell", "info"); }
-
-	if (selectable) {
-
-		this.beforeDeselectEvent.fire();
-
+		return html;
+	},
+	
+	/**
+	* Renders the Calendar's weekday headers.
+	* @method buildWeekdays
+	* @param {Array}	html	The current working HTML array
+	* @return {Array} The current working HTML array
+	*/
+	buildWeekdays : function(html) {
+	
 		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-		var selected = this.cfg.getProperty(defCfg.SELECTED.key);
-
-		var dCellDate = this._toDate(cellDate);
-		var selectDate = cellDate.concat();
-
-		if (cellDateIndex > -1) {
-			if (this.cfg.getProperty(defCfg.PAGEDATE.key).getMonth() == dCellDate.getMonth() &&
-				this.cfg.getProperty(defCfg.PAGEDATE.key).getFullYear() == dCellDate.getFullYear()) {
-				YAHOO.util.Dom.removeClass(cell, this.Style.CSS_CELL_SELECTED);
-			}
-			selected.splice(cellDateIndex, 1);
+	
+		html[html.length] = '<tr class="' + this.Style.CSS_WEEKDAY_ROW + '">';
+	
+		if (this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key)) {
+			html[html.length] = '<th> </th>';
 		}
-
-		if (this.parent) {
-			this.parent.cfg.setProperty(defCfg.SELECTED.key, selected);
-		} else {
-			this.cfg.setProperty(defCfg.SELECTED.key, selected);
+	
+		for(var i=0;i<this.Locale.LOCALE_WEEKDAYS.length;++i) {
+			html[html.length] = '<th class="calweekdaycell">' + this.Locale.LOCALE_WEEKDAYS[i] + '</th>';
 		}
-
-		this.deselectEvent.fire(selectDate);
-	}
-
-	return this.getSelectedDates();
-};
-
-/**
-* Deselects all dates on the current calendar.
-* @method deselectAll
-* @return {Date[]}		Array of JavaScript Date objects representing all individual dates that are currently selected.
-*						Assuming that this function executes properly, the return value should be an empty array.
-*						However, the empty array is returned for the sake of being able to check the selection status
-*						of the calendar.
-*/
-YAHOO.widget.Calendar.prototype.deselectAll = function() {
-	this.beforeDeselectEvent.fire();
 	
-	var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
-
-	var selected = this.cfg.getProperty(cfgSelected);
-	var count = selected.length;
-	var sel = selected.concat();
-
-	if (this.parent) {
-		this.parent.cfg.setProperty(cfgSelected, []);
-	} else {
-		this.cfg.setProperty(cfgSelected, []);
-	}
+		if (this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key)) {
+			html[html.length] = '<th> </th>';
+		}
 	
-	if (count > 0) {
-		this.deselectEvent.fire(sel);
-	}
-
-	return this.getSelectedDates();
-};
-
-// END SELECTION METHODS
-
-// BEGIN TYPE CONVERSION METHODS
-
-/**
-* Converts a date (either a JavaScript Date object, or a date string) to the internal data structure
-* used to represent dates: [[yyyy,mm,dd],[yyyy,mm,dd]].
-* @method _toFieldArray
-* @private
-* @param	{String/Date/Date[]}	date	The date string of dates to deselect in the current calendar. Valid formats are
-*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
-*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
-*								This method can also take a JavaScript Date object or an array of Date objects.	
-* @return {Array[](Number[])}	Array of date field arrays
-*/
-YAHOO.widget.Calendar.prototype._toFieldArray = function(date) {
-	var returnDate = [];
-
-	if (date instanceof Date) {
-		returnDate = [[date.getFullYear(), date.getMonth()+1, date.getDate()]];
-	} else if (YAHOO.lang.isString(date)) {
-		returnDate = this._parseDates(date);
-	} else if (YAHOO.lang.isArray(date)) {
-		for (var i=0;i<date.length;++i) {
-			var d = date[i];
-			returnDate[returnDate.length] = [d.getFullYear(),d.getMonth()+1,d.getDate()];
+		html[html.length] = '</tr>';
+	
+		return html;
+	},
+	
+	/**
+	* Renders the calendar body.
+	* @method renderBody
+	* @param {Date}	workingDate	The current working Date being used for the render process
+	* @param {Array}	html	The current working HTML array
+	* @return {Array} The current working HTML array
+	*/
+	renderBody : function(workingDate, html) {
+		this.logger.log("Rendering body", "render");
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+	
+		var startDay = this.cfg.getProperty(defCfg.START_WEEKDAY.key);
+	
+		this.preMonthDays = workingDate.getDay();
+		if (startDay > 0) {
+			this.preMonthDays -= startDay;
 		}
-	}
+		if (this.preMonthDays < 0) {
+			this.preMonthDays += 7;
+		}
+		
+		this.monthDays = YAHOO.widget.DateMath.findMonthEnd(workingDate).getDate();
+		this.postMonthDays = YAHOO.widget.Calendar.DISPLAY_DAYS-this.preMonthDays-this.monthDays;
+		this.logger.log(this.preMonthDays + " preciding out-of-month days", "render");
+		this.logger.log(this.monthDays + " month days", "render");
+		this.logger.log(this.postMonthDays + " post-month days", "render");
+		
+		workingDate = YAHOO.widget.DateMath.subtract(workingDate, YAHOO.widget.DateMath.DAY, this.preMonthDays);
+		this.logger.log("Calendar page starts on " + workingDate, "render");
 	
-	return returnDate;
-};
-
-/**
-* Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
-* @method _toDate
-* @private
-* @param	{Number[]}		dateFieldArray	The date field array to convert to a JavaScript Date.
-* @return	{Date}	JavaScript Date object representing the date field array
-*/
-YAHOO.widget.Calendar.prototype._toDate = function(dateFieldArray) {
-	if (dateFieldArray instanceof Date) {
-		return dateFieldArray;
-	} else {
-		return new Date(dateFieldArray[0],dateFieldArray[1]-1,dateFieldArray[2]);
-	}
-};
-
-// END TYPE CONVERSION METHODS 
-
-// BEGIN UTILITY METHODS
-
-/**
-* Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
-* @method _fieldArraysAreEqual
-* @private
-* @param	{Number[]}	array1	The first date field array to compare
-* @param	{Number[]}	array2	The first date field array to compare
-* @return	{Boolean}	The boolean that represents the equality of the two arrays
-*/
-YAHOO.widget.Calendar.prototype._fieldArraysAreEqual = function(array1, array2) {
-	var match = false;
-
-	if (array1[0]==array2[0]&&array1[1]==array2[1]&&array1[2]==array2[2]) {
-		match=true;	
-	}
-
-	return match;
-};
-
-/**
-* Gets the index of a date field array [yyyy,mm,dd] in the current list of selected dates.
-* @method	_indexOfSelectedFieldArray
-* @private
-* @param	{Number[]}		find	The date field array to search for
-* @return	{Number}			The index of the date field array within the collection of selected dates.
-*								-1 will be returned if the date is not found.
-*/
-YAHOO.widget.Calendar.prototype._indexOfSelectedFieldArray = function(find) {
-	var selected = -1;
-	var seldates = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);
-
-	for (var s=0;s<seldates.length;++s) {
-		var sArray = seldates[s];
-		if (find[0]==sArray[0]&&find[1]==sArray[1]&&find[2]==sArray[2]) {
-			selected = s;
-			break;
+		var weekNum,weekClass;
+		var weekPrefix = "w";
+		var cellPrefix = "_cell";
+		var workingDayPrefix = "wd";
+		var dayPrefix = "d";
+		
+		var cellRenderers;
+		var renderer;
+		
+		var todayYear = this.today.getFullYear();
+		var todayMonth = this.today.getMonth();
+		var todayDate = this.today.getDate();
+		
+		var useDate = this.cfg.getProperty(defCfg.PAGEDATE.key);
+		var hideBlankWeeks = this.cfg.getProperty(defCfg.HIDE_BLANK_WEEKS.key);
+		var showWeekFooter = this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key);
+		var showWeekHeader = this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key);
+		var mindate = this.cfg.getProperty(defCfg.MINDATE.key);
+		var maxdate = this.cfg.getProperty(defCfg.MAXDATE.key);
+	
+		if (mindate) {
+			mindate = YAHOO.widget.DateMath.clearTime(mindate);
 		}
-	}
-
-	return selected;
-};
-
-/**
-* Determines whether a given date is OOM (out of month).
-* @method	isDateOOM
-* @param	{Date}	date	The JavaScript Date object for which to check the OOM status
-* @return	{Boolean}	true if the date is OOM
-*/
-YAHOO.widget.Calendar.prototype.isDateOOM = function(date) {
-	return (date.getMonth() != this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key).getMonth());
-};
-
-/**
-* Determines whether a given date is OOB (out of bounds - less than the mindate or more than the maxdate).
-*
-* @method	isDateOOB
-* @param	{Date}	date	The JavaScript Date object for which to check the OOB status
-* @return	{Boolean}	true if the date is OOB
-*/
-YAHOO.widget.Calendar.prototype.isDateOOB = function(date) {
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+		if (maxdate) {
+			maxdate = YAHOO.widget.DateMath.clearTime(maxdate);
+		}
+		
+		html[html.length] = '<tbody class="m' + (useDate.getMonth()+1) + ' ' + this.Style.CSS_BODY + '">';
+		
+		var i = 0;
 	
-	var minDate = this.cfg.getProperty(defCfg.MINDATE.key);
-	var maxDate = this.cfg.getProperty(defCfg.MAXDATE.key);
-	var dm = YAHOO.widget.DateMath;
+		var tempDiv = document.createElement("div");
+		var cell = document.createElement("td");
+		tempDiv.appendChild(cell);
 	
-	if (minDate) {
-		minDate = dm.clearTime(minDate);
-	} 
-	if (maxDate) {
-		maxDate = dm.clearTime(maxDate);
-	}
+		var cal = this.parent || this;
+	
+		for (var r=0;r<6;r++) {
+	
+			weekNum = YAHOO.widget.DateMath.getWeekNumber(workingDate, useDate.getFullYear(), startDay);
+			weekClass = weekPrefix + weekNum;
+	
+			// Local OOM check for performance, since we already have pagedate
+			if (r !== 0 && hideBlankWeeks === true && workingDate.getMonth() != useDate.getMonth()) {
+				break;
+			} else {
+	
+				html[html.length] = '<tr class="' + weekClass + '">';
+				
+				if (showWeekHeader) { html = this.renderRowHeader(weekNum, html); }
+				
+				for (var d=0;d<7;d++){ // Render actual days
+	
+					cellRenderers = [];
+	
+					this.clearElement(cell);
+					cell.className = this.Style.CSS_CELL;
+					cell.id = this.id + cellPrefix + i;
+					this.logger.log("Rendering cell " + cell.id + " (" + workingDate.getFullYear() + "-" + (workingDate.getMonth()+1) + "-" + workingDate.getDate() + ")", "cellrender");
 
-	var clearedDate = new Date(date.getTime());
-	clearedDate = dm.clearTime(clearedDate);
-
-	return ((minDate && clearedDate.getTime() < minDate.getTime()) || (maxDate && clearedDate.getTime() > maxDate.getTime()));
-};
-
-/**
- * Parses a pagedate configuration property value. The value can either be specified as a string of form "mm/yyyy" or a Date object 
- * and is parsed into a Date object normalized to the first day of the month. If no value is passed in, the month and year from today's date are used to create the Date object 
- * @method	_parsePageDate
- * @private
- * @param {Date|String}	date	Pagedate value which needs to be parsed
- * @return {Date}	The Date object representing the pagedate
- */
-YAHOO.widget.Calendar.prototype._parsePageDate = function(date) {
-	var parsedDate;
+					if (workingDate.getDate()		== todayDate && 
+						workingDate.getMonth()		== todayMonth &&
+						workingDate.getFullYear()	== todayYear) {
+						cellRenderers[cellRenderers.length]=cal.renderCellStyleToday;
+					}
+					
+					var workingArray = [workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()];
+					this.cellDates[this.cellDates.length] = workingArray; // Add this date to cellDates
+					
+					// Local OOM check for performance, since we already have pagedate
+					if (workingDate.getMonth() != useDate.getMonth()) {
+						cellRenderers[cellRenderers.length]=cal.renderCellNotThisMonth;
+					} else {
+						YAHOO.util.Dom.addClass(cell, workingDayPrefix + workingDate.getDay());
+						YAHOO.util.Dom.addClass(cell, dayPrefix + workingDate.getDate());
+					
+						for (var s=0;s<this.renderStack.length;++s) {
 	
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-
-	if (date) {
-		if (date instanceof Date) {
-			parsedDate = YAHOO.widget.DateMath.findMonthStart(date);
-		} else {
-			var month, year, aMonthYear;
-			aMonthYear = date.split(this.cfg.getProperty(defCfg.DATE_FIELD_DELIMITER.key));
-			month = parseInt(aMonthYear[this.cfg.getProperty(defCfg.MY_MONTH_POSITION.key)-1], 10)-1;
-			year = parseInt(aMonthYear[this.cfg.getProperty(defCfg.MY_YEAR_POSITION.key)-1], 10);
-			
-			parsedDate = new Date(year, month, 1);
+							renderer = null;
+	
+							var rArray = this.renderStack[s];
+							var type = rArray[0];
+							
+							var month;
+							var day;
+							var year;
+							
+							switch (type) {
+								case YAHOO.widget.Calendar.DATE:
+									month = rArray[1][1];
+									day = rArray[1][2];
+									year = rArray[1][0];
+	
+									if (workingDate.getMonth()+1 == month && workingDate.getDate() == day && workingDate.getFullYear() == year) {
+										renderer = rArray[2];
+										this.renderStack.splice(s,1);
+									}
+									break;
+								case YAHOO.widget.Calendar.MONTH_DAY:
+									month = rArray[1][0];
+									day = rArray[1][1];
+									
+									if (workingDate.getMonth()+1 == month && workingDate.getDate() == day) {
+										renderer = rArray[2];
+										this.renderStack.splice(s,1);
+									}
+									break;
+								case YAHOO.widget.Calendar.RANGE:
+									var date1 = rArray[1][0];
+									var date2 = rArray[1][1];
+	
+									var d1month = date1[1];
+									var d1day = date1[2];
+									var d1year = date1[0];
+									
+									var d1 = YAHOO.widget.DateMath.getDate(d1year, d1month-1, d1day);
+	
+									var d2month = date2[1];
+									var d2day = date2[2];
+									var d2year = date2[0];
+	
+									var d2 = YAHOO.widget.DateMath.getDate(d2year, d2month-1, d2day);
+	
+									if (workingDate.getTime() >= d1.getTime() && workingDate.getTime() <= d2.getTime()) {
+										renderer = rArray[2];
+	
+										if (workingDate.getTime()==d2.getTime()) { 
+											this.renderStack.splice(s,1);
+										}
+									}
+									break;
+								case YAHOO.widget.Calendar.WEEKDAY:
+									
+									var weekday = rArray[1][0];
+									if (workingDate.getDay()+1 == weekday) {
+										renderer = rArray[2];
+									}
+									break;
+								case YAHOO.widget.Calendar.MONTH:
+									
+									month = rArray[1][0];
+									if (workingDate.getMonth()+1 == month) {
+										renderer = rArray[2];
+									}
+									break;
+							}
+							
+							if (renderer) {
+								cellRenderers[cellRenderers.length]=renderer;
+							}
+						}
+	
+					}
+	
+					if (this._indexOfSelectedFieldArray(workingArray) > -1) {
+						cellRenderers[cellRenderers.length]=cal.renderCellStyleSelected; 
+					}
+	
+					if ((mindate && (workingDate.getTime() < mindate.getTime())) ||
+						(maxdate && (workingDate.getTime() > maxdate.getTime()))
+					) {
+						cellRenderers[cellRenderers.length]=cal.renderOutOfBoundsDate;
+					} else {
+						cellRenderers[cellRenderers.length]=cal.styleCellDefault;
+						cellRenderers[cellRenderers.length]=cal.renderCellDefault;	
+					}
+					
+					for (var x=0; x < cellRenderers.length; ++x) {
+						this.logger.log("renderer[" + x + "] for (" + workingDate.getFullYear() + "-" + (workingDate.getMonth()+1) + "-" + workingDate.getDate() + ")", "cellrender");
+						if (cellRenderers[x].call(cal, workingDate, cell) == YAHOO.widget.Calendar.STOP_RENDER) {
+							break;
+						}
+					}
+	
+					workingDate.setTime(workingDate.getTime() + YAHOO.widget.DateMath.ONE_DAY_MS);
+	
+					if (i >= 0 && i <= 6) {
+						YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_TOP);
+					}
+					if ((i % 7) === 0) {
+						YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_LEFT);
+					}
+					if (((i+1) % 7) === 0) {
+						YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_RIGHT);
+					}
+					
+					var postDays = this.postMonthDays; 
+					if (hideBlankWeeks && postDays >= 7) {
+						var blankWeeks = Math.floor(postDays/7);
+						for (var p=0;p<blankWeeks;++p) {
+							postDays -= 7;
+						}
+					}
+					
+					if (i >= ((this.preMonthDays+postDays+this.monthDays)-7)) {
+						YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_BOTTOM);
+					}
+	
+					html[html.length] = tempDiv.innerHTML;
+					i++;
+				}
+	
+				if (showWeekFooter) { html = this.renderRowFooter(weekNum, html); }
+	
+				html[html.length] = '</tr>';
+			}
 		}
-	} else {
-		parsedDate = new Date(this.today.getFullYear(), this.today.getMonth(), 1);
-	}
-	return parsedDate;
-};
+	
+		html[html.length] = '</tbody>';
+	
+		return html;
+	},
+	
+	/**
+	* Renders the calendar footer. In the default implementation, there is
+	* no footer.
+	* @method renderFooter
+	* @param {Array}	html	The current working HTML array
+	* @return {Array} The current working HTML array
+	*/
+	renderFooter : function(html) { return html; },
+	
+	/**
+	* Renders the calendar after it has been configured. The render() method has a specific call chain that will execute
+	* when the method is called: renderHeader, renderBody, renderFooter.
+	* Refer to the documentation for those methods for information on 
+	* individual render tasks.
+	* @method render
+	*/
+	render : function() {
+		this.beforeRenderEvent.fire();
+	
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+	
+		// Find starting day of the current month
+		var workingDate = YAHOO.widget.DateMath.findMonthStart(this.cfg.getProperty(defCfg.PAGEDATE.key));
+	
+		this.resetRenderers();
+		this.cellDates.length = 0;
 
-// END UTILITY METHODS
+		YAHOO.util.Event.purgeElement(this.oDomContainer, true);
 
-// BEGIN EVENT HANDLERS
+		var html = [];
+	
+		html[html.length] = '<table cellSpacing="0" class="' + this.Style.CSS_CALENDAR + ' y' + workingDate.getFullYear() + '" id="' + this.id + '">';
+		html = this.renderHeader(html);
+		html = this.renderBody(workingDate, html);
+		html = this.renderFooter(html);
+		html[html.length] = '</table>';
 
-/**
-* Event executed before a date is selected in the calendar widget.
-* @deprecated Event handlers for this event should be susbcribed to beforeSelectEvent.
-*/
-YAHOO.widget.Calendar.prototype.onBeforeSelect = function() {
-	if (this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MULTI_SELECT.key) === false) {
-		if (this.parent) {
-			this.parent.callChildFunction("clearAllBodyCellStyles", this.Style.CSS_CELL_SELECTED);
-			this.parent.deselectAll();
-		} else {
-			this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);
-			this.deselectAll();
-		}
-	}
-};
+		this.oDomContainer.innerHTML = html.join("\n");
 
-/**
-* Event executed when a date is selected in the calendar widget.
-* @param	{Array}	selected	An array of date field arrays representing which date or dates were selected. Example: [ [2006,8,6],[2006,8,7],[2006,8,8] ]
-* @deprecated Event handlers for this event should be susbcribed to selectEvent.
-*/
-YAHOO.widget.Calendar.prototype.onSelect = function(selected) { };
+		this.applyListeners();
+		this.cells = this.oDomContainer.getElementsByTagName("td");
+	
+		this.cfg.refireEvent(defCfg.TITLE.key);
+		this.cfg.refireEvent(defCfg.CLOSE.key);
+		this.cfg.refireEvent(defCfg.IFRAME.key);
+	
+		this.renderEvent.fire();
+	},
 
-/**
-* Event executed before a date is deselected in the calendar widget.
-* @deprecated Event handlers for this event should be susbcribed to beforeDeselectEvent.
-*/
-YAHOO.widget.Calendar.prototype.onBeforeDeselect = function() { };
+	/**
+	* Applies the Calendar's DOM listeners to applicable elements.
+	* @method applyListeners
+	*/
+	applyListeners : function() {
+		var root = this.oDomContainer;
+		var cal = this.parent || this;
+		var anchor = "a";
+		var mousedown = "mousedown";
 
-/**
-* Event executed when a date is deselected in the calendar widget.
-* @param	{Array}	selected	An array of date field arrays representing which date or dates were deselected. Example: [ [2006,8,6],[2006,8,7],[2006,8,8] ]
-* @deprecated Event handlers for this event should be susbcribed to deselectEvent.
-*/
-YAHOO.widget.Calendar.prototype.onDeselect = function(deselected) { };
-
-/**
-* Event executed when the user navigates to a different calendar page.
-* @deprecated Event handlers for this event should be susbcribed to changePageEvent.
-*/
-YAHOO.widget.Calendar.prototype.onChangePage = function() {
-	this.render();
-};
-
-/**
-* Event executed when the calendar widget is rendered.
-* @deprecated Event handlers for this event should be susbcribed to renderEvent.
-*/
-YAHOO.widget.Calendar.prototype.onRender = function() { };
-
-/**
-* Event executed when the calendar widget is reset to its original state.
-* @deprecated Event handlers for this event should be susbcribed to resetEvemt.
-*/
-YAHOO.widget.Calendar.prototype.onReset = function() { this.render(); };
-
-/**
-* Event executed when the calendar widget is completely cleared to the current month with no selections.
-* @deprecated Event handlers for this event should be susbcribed to clearEvent.
-*/
-YAHOO.widget.Calendar.prototype.onClear = function() { this.render(); };
-
-/**
-* Validates the calendar widget. This method has no default implementation
-* and must be extended by subclassing the widget.
-* @return	Should return true if the widget validates, and false if
-* it doesn't.
-* @type Boolean
-*/
-YAHOO.widget.Calendar.prototype.validate = function() { return true; };
-
-// END EVENT HANDLERS
-
-// BEGIN DATE PARSE METHODS
-
-/**
-* Converts a date string to a date field array
-* @private
-* @param	{String}	sDate			Date string. Valid formats are mm/dd and mm/dd/yyyy.
-* @return				A date field array representing the string passed to the method
-* @type Array[](Number[])
-*/
-YAHOO.widget.Calendar.prototype._parseDate = function(sDate) {
-	var aDate = sDate.split(this.Locale.DATE_FIELD_DELIMITER);
-	var rArray;
-
-	if (aDate.length == 2) {
-		rArray = [aDate[this.Locale.MD_MONTH_POSITION-1],aDate[this.Locale.MD_DAY_POSITION-1]];
-		rArray.type = YAHOO.widget.Calendar.MONTH_DAY;
-	} else {
-		rArray = [aDate[this.Locale.MDY_YEAR_POSITION-1],aDate[this.Locale.MDY_MONTH_POSITION-1],aDate[this.Locale.MDY_DAY_POSITION-1]];
-		rArray.type = YAHOO.widget.Calendar.DATE;
-	}
-
-	for (var i=0;i<rArray.length;i++) {
-		rArray[i] = parseInt(rArray[i], 10);
-	}
-
-	return rArray;
-};
-
-/**
-* Converts a multi or single-date string to an array of date field arrays
-* @private
-* @param	{String}	sDates		Date string with one or more comma-delimited dates. Valid formats are mm/dd, mm/dd/yyyy, mm/dd/yyyy-mm/dd/yyyy
-* @return							An array of date field arrays
-* @type Array[](Number[])
-*/
-YAHOO.widget.Calendar.prototype._parseDates = function(sDates) {
-	var aReturn = [];
-
-	var aDates = sDates.split(this.Locale.DATE_DELIMITER);
+		var linkLeft = YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT, anchor, root);
+		var linkRight = YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT, anchor, root);
 	
-	for (var d=0;d<aDates.length;++d) {
-		var sDate = aDates[d];
+		if (linkLeft && linkLeft.length > 0) {
+			this.linkLeft = linkLeft[0];
+			YAHOO.util.Event.addListener(this.linkLeft, mousedown, cal.previousMonth, cal, true);
+		}
 
-		if (sDate.indexOf(this.Locale.DATE_RANGE_DELIMITER) != -1) {
-			// This is a range
-			var aRange = sDate.split(this.Locale.DATE_RANGE_DELIMITER);
+		if (linkRight && linkRight.length > 0) {
+			this.linkRight = linkRight[0];
+			YAHOO.util.Event.addListener(this.linkRight, mousedown, cal.nextMonth, cal, true);
+		}
 
-			var dateStart = this._parseDate(aRange[0]);
-			var dateEnd = this._parseDate(aRange[1]);
-
-			var fullRange = this._parseRange(dateStart, dateEnd);
-			aReturn = aReturn.concat(fullRange);
-		} else {
-			// This is not a range
-			var aDate = this._parseDate(sDate);
-			aReturn.push(aDate);
+		if (cal.cfg.getProperty("navigator") !== null) {
+			this.applyNavListeners();
 		}
-	}
-	return aReturn;
-};
 
-/**
-* Converts a date range to the full list of included dates
-* @private
-* @param	{Number[]}	startDate	Date field array representing the first date in the range
-* @param	{Number[]}	endDate		Date field array representing the last date in the range
-* @return							An array of date field arrays
-* @type Array[](Number[])
-*/
-YAHOO.widget.Calendar.prototype._parseRange = function(startDate, endDate) {
-	var dStart   = new Date(startDate[0],startDate[1]-1,startDate[2]);
-	var dCurrent = YAHOO.widget.DateMath.add(new Date(startDate[0],startDate[1]-1,startDate[2]),YAHOO.widget.DateMath.DAY,1);
-	var dEnd     = new Date(endDate[0],  endDate[1]-1,  endDate[2]);
-
-	var results = [];
-	results.push(startDate);
-	while (dCurrent.getTime() <= dEnd.getTime()) {
-		results.push([dCurrent.getFullYear(),dCurrent.getMonth()+1,dCurrent.getDate()]);
-		dCurrent = YAHOO.widget.DateMath.add(dCurrent,YAHOO.widget.DateMath.DAY,1);
-	}
-	return results;
-};
-
-// END DATE PARSE METHODS
-
-// BEGIN RENDERER METHODS
-
-/**
-* Resets the render stack of the current calendar to its original pre-render value.
-*/
-YAHOO.widget.Calendar.prototype.resetRenderers = function() {
-	this.renderStack = this._renderStack.concat();
-};
-
-/**
-* Clears the inner HTML, CSS class and style information from the specified cell.
-* @method clearElement
-* @param	{HTMLTableCellElement}	The cell to clear
-*/ 
-YAHOO.widget.Calendar.prototype.clearElement = function(cell) {
-	cell.innerHTML = " ";
-	cell.className="";
-};
-
-/**
-* Adds a renderer to the render stack. The function reference passed to this method will be executed
-* when a date cell matches the conditions specified in the date string for this renderer.
-* @method addRenderer
-* @param	{String}	sDates		A date string to associate with the specified renderer. Valid formats
-*									include date (12/24/2005), month/day (12/24), and range (12/1/2004-1/1/2005)
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.Calendar.prototype.addRenderer = function(sDates, fnRender) {
-	var aDates = this._parseDates(sDates);
-	for (var i=0;i<aDates.length;++i) {
-		var aDate = aDates[i];
+		if (this.domEventMap) {
+			var el,elements;
+			for (var cls in this.domEventMap) {	
+				if (YAHOO.lang.hasOwnProperty(this.domEventMap, cls)) {
+					var items = this.domEventMap[cls];
 	
-		if (aDate.length == 2) { // this is either a range or a month/day combo
-			if (aDate[0] instanceof Array) { // this is a range
-				this._addRenderer(YAHOO.widget.Calendar.RANGE,aDate,fnRender);
-			} else { // this is a month/day combo
-				this._addRenderer(YAHOO.widget.Calendar.MONTH_DAY,aDate,fnRender);
+					if (! (items instanceof Array)) {
+						items = [items];
+					}
+	
+					for (var i=0;i<items.length;i++)	{
+						var item = items[i];
+						elements = YAHOO.util.Dom.getElementsByClassName(cls, item.tag, this.oDomContainer);
+	
+						for (var c=0;c<elements.length;c++) {
+							el = elements[c];
+							 YAHOO.util.Event.addListener(el, item.event, item.handler, item.scope, item.correct );
+						}
+					}
+				}
 			}
-		} else if (aDate.length == 3) {
-			this._addRenderer(YAHOO.widget.Calendar.DATE,aDate,fnRender);
 		}
-	}
-};
+	
+		YAHOO.util.Event.addListener(this.oDomContainer, "click", this.doSelectCell, this);
+		YAHOO.util.Event.addListener(this.oDomContainer, "mouseover", this.doCellMouseOver, this);
+		YAHOO.util.Event.addListener(this.oDomContainer, "mouseout", this.doCellMouseOut, this);
+	},
 
-/**
-* The private method used for adding cell renderers to the local render stack.
-* This method is called by other methods that set the renderer type prior to the method call.
-* @method _addRenderer
-* @private
-* @param	{String}	type		The type string that indicates the type of date renderer being added.
-*									Values are YAHOO.widget.Calendar.DATE, YAHOO.widget.Calendar.MONTH_DAY, YAHOO.widget.Calendar.WEEKDAY,
-*									YAHOO.widget.Calendar.RANGE, YAHOO.widget.Calendar.MONTH
-* @param	{Array}		aDates		An array of dates used to construct the renderer. The format varies based
-*									on the renderer type
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.Calendar.prototype._addRenderer = function(type, aDates, fnRender) {
-	var add = [type,aDates,fnRender];
-	this.renderStack.unshift(add);	
-	this._renderStack = this.renderStack.concat();
-};
+	applyNavListeners : function() {
 
-/**
-* Adds a month to the render stack. The function reference passed to this method will be executed
-* when a date cell matches the month passed to this method.
-* @method addMonthRenderer
-* @param	{Number}	month		The month (1-12) to associate with this renderer
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.Calendar.prototype.addMonthRenderer = function(month, fnRender) {
-	this._addRenderer(YAHOO.widget.Calendar.MONTH,[month],fnRender);
-};
+		var E = YAHOO.util.Event;
 
-/**
-* Adds a weekday to the render stack. The function reference passed to this method will be executed
-* when a date cell matches the weekday passed to this method.
-* @method addWeekdayRenderer
-* @param	{Number}	weekday		The weekday (0-6) to associate with this renderer
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.Calendar.prototype.addWeekdayRenderer = function(weekday, fnRender) {
-	this._addRenderer(YAHOO.widget.Calendar.WEEKDAY,[weekday],fnRender);
-};
+		var calParent = this.parent || this;
+		var cal = this;
 
-// END RENDERER METHODS
+		var navBtns = YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV, "a", this.oDomContainer);
 
-// BEGIN CSS METHODS
+		if (navBtns.length > 0) {
 
-/**
-* Removes all styles from all body cells in the current calendar table.
-* @method clearAllBodyCellStyles
-* @param	{style}		The CSS class name to remove from all calendar body cells
-*/
-YAHOO.widget.Calendar.prototype.clearAllBodyCellStyles = function(style) {
-	for (var c=0;c<this.cells.length;++c) {
-		YAHOO.util.Dom.removeClass(this.cells[c],style);
-	}
-};
+			function show(e, obj) {
+				var target = E.getTarget(e);
+				// this == navBtn
+				if (this === target || YAHOO.util.Dom.isAncestor(this, target)) {
+					E.preventDefault(e);
+				}
+				var navigator = calParent.oNavigator;
+				if (navigator) {
+					var pgdate = cal.cfg.getProperty("pagedate");
+					navigator.setYear(pgdate.getFullYear());
+					navigator.setMonth(pgdate.getMonth());
+					navigator.show();
+				}
+			}
+			E.addListener(navBtns, "click", show);
+		}
+	},
 
-// END CSS METHODS
-
-// BEGIN GETTER/SETTER METHODS
-/**
-* Sets the calendar's month explicitly
-* @method setMonth
-* @param {Number}	month		The numeric month, from 0 (January) to 11 (December)
-*/
-YAHOO.widget.Calendar.prototype.setMonth = function(month) {
-	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
-	var current = this.cfg.getProperty(cfgPageDate);
-	current.setMonth(parseInt(month, 10));
-	this.cfg.setProperty(cfgPageDate, current);
-};
-
-/**
-* Sets the calendar's year explicitly.
-* @method setYear
-* @param {Number}	year		The numeric 4-digit year
-*/
-YAHOO.widget.Calendar.prototype.setYear = function(year) {
-	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
-	var current = this.cfg.getProperty(cfgPageDate);
-	current.setFullYear(parseInt(year, 10));
-	this.cfg.setProperty(cfgPageDate, current);
-};
-
-/**
-* Gets the list of currently selected dates from the calendar.
-* @method getSelectedDates
-* @return {Date[]} An array of currently selected JavaScript Date objects.
-*/
-YAHOO.widget.Calendar.prototype.getSelectedDates = function() {
-	var returnDates = [];
-	var selected = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);
-
-	for (var d=0;d<selected.length;++d) {
-		var dateArray = selected[d];
-
-		var date = new Date(dateArray[0],dateArray[1]-1,dateArray[2]);
-		returnDates.push(date);
-	}
-
-	returnDates.sort( function(a,b) { return a-b; } );
-	return returnDates;
-};
-
-/// END GETTER/SETTER METHODS ///
-
-/**
-* Hides the Calendar's outer container from view.
-* @method hide
-*/
-YAHOO.widget.Calendar.prototype.hide = function() {
-	this.oDomContainer.style.display = "none";
-};
-
-/**
-* Shows the Calendar's outer container.
-* @method show
-*/
-YAHOO.widget.Calendar.prototype.show = function() {
-	this.oDomContainer.style.display = "block";
-};
-
-/**
-* Returns a string representing the current browser.
-* @deprecated As of 2.3.0, environment information is available in YAHOO.env.ua
-* @see YAHOO.env.ua
-* @property browser
-* @type String
-*/
-YAHOO.widget.Calendar.prototype.browser = function() {
-			var ua = navigator.userAgent.toLowerCase();
-				  if (ua.indexOf('opera')!=-1) { // Opera (check first in case of spoof)
-					 return 'opera';
-				  } else if (ua.indexOf('msie 7')!=-1) { // IE7
-					 return 'ie7';
-				  } else if (ua.indexOf('msie') !=-1) { // IE
-					 return 'ie';
-				  } else if (ua.indexOf('safari')!=-1) { // Safari (check before Gecko because it includes "like Gecko")
-					 return 'safari';
-				  } else if (ua.indexOf('gecko') != -1) { // Gecko
-					 return 'gecko';
-				  } else {
-					 return false;
-				  }
-			}();
-/**
-* Returns a string representation of the object.
-* @method toString
-* @return {String}	A string representation of the Calendar object.
-*/
-YAHOO.widget.Calendar.prototype.toString = function() {
-	return "Calendar " + this.id;
-};
-
-/**
-* @namespace YAHOO.widget
-* @class Calendar_Core
-* @extends YAHOO.widget.Calendar
-* @deprecated The old Calendar_Core class is no longer necessary.
-*/
-YAHOO.widget.Calendar_Core = YAHOO.widget.Calendar;
-
-YAHOO.widget.Cal_Core = YAHOO.widget.Calendar;
-
-/**
-* YAHOO.widget.CalendarGroup is a special container class for YAHOO.widget.Calendar. This class facilitates
-* the ability to have multi-page calendar views that share a single dataset and are
-* dependent on each other.
-* 
-* The calendar group instance will refer to each of its elements using a 0-based index.
-* For example, to construct the placeholder for a calendar group widget with id "cal1" and
-* containerId of "cal1Container", the markup would be as follows:
-*	<xmp>
-*		<div id="cal1Container_0"></div>
-*		<div id="cal1Container_1"></div>
-*	</xmp>
-* The tables for the calendars ("cal1_0" and "cal1_1") will be inserted into those containers.
-* @namespace YAHOO.widget
-* @class CalendarGroup
-* @constructor
-* @param {String}	id			The id of the table element that will represent the calendar widget
-* @param {String}	containerId	The id of the container div element that will wrap the calendar table
-* @param {Object}	config		The configuration object containing the Calendar's arguments
-*/
-YAHOO.widget.CalendarGroup = function(id, containerId, config) {
-	if (arguments.length > 0) {
-		this.init(id, containerId, config);
-	}
-};
-
-/**
-* Initializes the calendar group. All subclasses must call this method in order for the
-* group to be initialized properly.
-* @method init
-* @param {String}	id			The id of the table element that will represent the calendar widget
-* @param {String}	containerId	The id of the container div element that will wrap the calendar table
-* @param {Object}	config		The configuration object containing the Calendar's arguments
-*/
-YAHOO.widget.CalendarGroup.prototype.init = function(id, containerId, config) {
-	this.logger = new YAHOO.widget.LogWriter("CalendarGroup " + id);
-	this.initEvents();
-	this.initStyles();
-
 	/**
-	* The collection of Calendar pages contained within the CalendarGroup
-	* @property pages
-	* @type YAHOO.widget.Calendar[]
+	* Retrieves the Date object for the specified Calendar cell
+	* @method getDateByCellId
+	* @param {String}	id	The id of the cell
+	* @return {Date} The Date object for the specified Calendar cell
 	*/
-	this.pages = [];
+	getDateByCellId : function(id) {
+		var date = this.getDateFieldsByCellId(id);
+		return YAHOO.widget.DateMath.getDate(date[0],date[1]-1,date[2]);
+	},
 	
 	/**
-	* The unique id associated with the CalendarGroup
-	* @property id
-	* @type String
+	* Retrieves the Date object for the specified Calendar cell
+	* @method getDateFieldsByCellId
+	* @param {String}	id	The id of the cell
+	* @return {Array}	The array of Date fields for the specified Calendar cell
 	*/
-	this.id = id;
+	getDateFieldsByCellId : function(id) {
+		id = id.toLowerCase().split("_cell")[1];
+		id = parseInt(id, 10);
+		return this.cellDates[id];
+	},
+	
+	/**
+	 * Find the Calendar's cell index for a given date.
+	 * If the date is not found, the method returns -1.
+	 * <p>
+	 * The returned index can be used to lookup the cell HTMLElement  
+	 * using the Calendar's cells array or passed to selectCell to select 
+	 * cells by index. 
+	 * </p>
+	 *
+	 * See <a href="#cells">cells</a>, <a href="#selectCell">selectCell</a>.
+	 *
+	 * @method getCellIndex
+	 * @param {Date} date JavaScript Date object, for which to find a cell index.
+	 * @return {Number} The index of the date in Calendars cellDates/cells arrays, or -1 if the date 
+	 * is not on the curently rendered Calendar page.
+	 */
+	getCellIndex : function(date) {
+		var idx = -1;
+		if (date) {
+			var m = date.getMonth(),
+				y = date.getFullYear(),
+				d = date.getDate(),
+				dates = this.cellDates;
 
+			for (var i = 0; i < dates.length; ++i) {
+				var cellDate = dates[i];
+				if (cellDate[0] === y && cellDate[1] === m+1 && cellDate[2] === d) {
+					idx = i;
+					break;
+				}
+			}
+		}
+		return idx;
+	},
+	
+	// BEGIN BUILT-IN TABLE CELL RENDERERS
+	
 	/**
-	* The unique id associated with the CalendarGroup container
-	* @property containerId
-	* @type String
+	* Renders a cell that falls before the minimum date or after the maximum date.
+	* widget class.
+	* @method renderOutOfBoundsDate
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+	* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
+	*			should not be terminated
 	*/
-	this.containerId = containerId;
-
+	renderOutOfBoundsDate : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_OOB);
+		cell.innerHTML = workingDate.getDate();
+		return YAHOO.widget.Calendar.STOP_RENDER;
+	},
+	
 	/**
-	* The outer containing element for the CalendarGroup
-	* @property oDomContainer
-	* @type HTMLElement
+	* Renders the row header for a week.
+	* @method renderRowHeader
+	* @param {Number}	weekNum	The week number of the current row
+	* @param {Array}	cell	The current working HTML array
 	*/
-	this.oDomContainer = document.getElementById(containerId);
-
-	YAHOO.util.Dom.addClass(this.oDomContainer, YAHOO.widget.CalendarGroup.CSS_CONTAINER);
-	YAHOO.util.Dom.addClass(this.oDomContainer, YAHOO.widget.CalendarGroup.CSS_MULTI_UP);
-
+	renderRowHeader : function(weekNum, html) {
+		html[html.length] = '<th class="calrowhead">' + weekNum + '</th>';
+		return html;
+	},
+	
 	/**
-	* The Config object used to hold the configuration variables for the CalendarGroup
-	* @property cfg
-	* @type YAHOO.util.Config
+	* Renders the row footer for a week.
+	* @method renderRowFooter
+	* @param {Number}	weekNum	The week number of the current row
+	* @param {Array}	cell	The current working HTML array
 	*/
-	this.cfg = new YAHOO.util.Config(this);
-
+	renderRowFooter : function(weekNum, html) {
+		html[html.length] = '<th class="calrowfoot">' + weekNum + '</th>';
+		return html;
+	},
+	
 	/**
-	* The local object which contains the CalendarGroup's options
-	* @property Options
-	* @type Object
+	* Renders a single standard calendar cell in the calendar widget table.
+	* All logic for determining how a standard default cell will be rendered is 
+	* encapsulated in this method, and must be accounted for when extending the
+	* widget class.
+	* @method renderCellDefault
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
 	*/
-	this.Options = {};
-
+	renderCellDefault : function(workingDate, cell) {
+		cell.innerHTML = '<a href="#" class="' + this.Style.CSS_CELL_SELECTOR + '">' + this.buildDayLabel(workingDate) + "</a>";
+	},
+	
 	/**
-	* The local object which contains the CalendarGroup's locale settings
-	* @property Locale
-	* @type Object
+	* Styles a selectable cell.
+	* @method styleCellDefault
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
 	*/
-	this.Locale = {};
-
-	this.setupConfig();
-
-	if (config) {
-		this.cfg.applyConfig(config, true);
-	}
-
-	this.cfg.fireQueue();
-
-	// OPERA HACK FOR MISWRAPPED FLOATS
-	if (YAHOO.env.ua.opera){
-		this.renderEvent.subscribe(this._fixWidth, this, true);
-	}
-	this.logger.log("Initialized " + this.pages.length + "-page CalendarGroup", "info");
-};
-
-
-YAHOO.widget.CalendarGroup.prototype.setupConfig = function() {
+	styleCellDefault : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_SELECTABLE);
+	},
 	
-	var defCfg = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG;
 	
 	/**
-	* The number of pages to include in the CalendarGroup. This value can only be set once, in the CalendarGroup's constructor arguments.
-	* @config pages
-	* @type Number
-	* @default 2
+	* Renders a single standard calendar cell using the CSS hightlight1 style
+	* @method renderCellStyleHighlight1
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
 	*/
-	this.cfg.addProperty(defCfg.PAGES.key, { value:defCfg.PAGES.value, validator:this.cfg.checkNumber, handler:this.configPages } );
-
+	renderCellStyleHighlight1 : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT1);
+	},
+	
 	/**
-	* The month/year representing the current visible Calendar date (mm/yyyy)
-	* @config pagedate
-	* @type String
-	* @default today's date
+	* Renders a single standard calendar cell using the CSS hightlight2 style
+	* @method renderCellStyleHighlight2
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
 	*/
-	this.cfg.addProperty(defCfg.PAGEDATE.key, { value:new Date(), handler:this.configPageDate } );
-
+	renderCellStyleHighlight2 : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT2);
+	},
+	
 	/**
-	* The date or range of dates representing the current Calendar selection
-	* @config selected
-	* @type String
-	* @default []
+	* Renders a single standard calendar cell using the CSS hightlight3 style
+	* @method renderCellStyleHighlight3
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
 	*/
-	this.cfg.addProperty(defCfg.SELECTED.key, { value:[], handler:this.configSelected } );
-
+	renderCellStyleHighlight3 : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT3);
+	},
+	
 	/**
-	* The title to display above the CalendarGroup's month header
-	* @config title
-	* @type String
-	* @default ""
+	* Renders a single standard calendar cell using the CSS hightlight4 style
+	* @method renderCellStyleHighlight4
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
 	*/
-	this.cfg.addProperty(defCfg.TITLE.key, { value:defCfg.TITLE.value, handler:this.configTitle } );
-
+	renderCellStyleHighlight4 : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT4);
+	},
+	
 	/**
-	* Whether or not a close button should be displayed for this CalendarGroup
-	* @config close
-	* @type Boolean
-	* @default false
+	* Applies the default style used for rendering today's date to the current calendar cell
+	* @method renderCellStyleToday
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
 	*/
-	this.cfg.addProperty(defCfg.CLOSE.key, { value:defCfg.CLOSE.value, handler:this.configClose } );
-
+	renderCellStyleToday : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_TODAY);
+	},
+	
 	/**
-	* Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below.
-	* This property is enabled by default for IE6 and below. It is disabled by default for other browsers for performance reasons, but can be 
-	* enabled if required.
-	* 
-	* @config iframe
-	* @type Boolean
-	* @default true for IE6 and below, false for all other browsers
+	* Applies the default style used for rendering selected dates to the current calendar cell
+	* @method renderCellStyleSelected
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+	* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
+	*			should not be terminated
 	*/
-	this.cfg.addProperty(defCfg.IFRAME.key, { value:defCfg.IFRAME.value, handler:this.configIframe, validator:this.cfg.checkBoolean } );
-
+	renderCellStyleSelected : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_SELECTED);
+	},
+	
 	/**
-	* The minimum selectable date in the current Calendar (mm/dd/yyyy)
-	* @config mindate
-	* @type String
-	* @default null
+	* Applies the default style used for rendering dates that are not a part of the current
+	* month (preceding or trailing the cells for the current month)
+	* @method renderCellNotThisMonth
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+	* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
+	*			should not be terminated
 	*/
-	this.cfg.addProperty(defCfg.MINDATE.key, { value:defCfg.MINDATE.value, handler:this.delegateConfig } );
-
+	renderCellNotThisMonth : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_OOM);
+		cell.innerHTML=workingDate.getDate();
+		return YAHOO.widget.Calendar.STOP_RENDER;
+	},
+	
 	/**
-	* The maximum selectable date in the current Calendar (mm/dd/yyyy)
-	* @config maxdate
-	* @type String
-	* @default null
-	*/	
-	this.cfg.addProperty(defCfg.MAXDATE.key, { value:defCfg.MAXDATE.value, handler:this.delegateConfig  } );
-
-	// Options properties
-
+	* Renders the current calendar cell as a non-selectable "black-out" date using the default
+	* restricted style.
+	* @method renderBodyCellRestricted
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+	* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
+	*			should not be terminated
+	*/
+	renderBodyCellRestricted : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL);
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_RESTRICTED);
+		cell.innerHTML=workingDate.getDate();
+		return YAHOO.widget.Calendar.STOP_RENDER;
+	},
+	
+	// END BUILT-IN TABLE CELL RENDERERS
+	
+	// BEGIN MONTH NAVIGATION METHODS
+	
 	/**
-	* True if the Calendar should allow multiple selections. False by default.
-	* @config MULTI_SELECT
-	* @type Boolean
-	* @default false
+	* Adds the designated number of months to the current calendar month, and sets the current
+	* calendar page date to the new month.
+	* @method addMonths
+	* @param {Number}	count	The number of months to add to the current calendar
 	*/
-	this.cfg.addProperty(defCfg.MULTI_SELECT.key,	{ value:defCfg.MULTI_SELECT.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
-
+	addMonths : function(count) {
+		var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+		this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.add(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.MONTH, count));
+		this.resetRenderers();
+		this.changePageEvent.fire();
+	},
+	
 	/**
-	* The weekday the week begins on. Default is 0 (Sunday).
-	* @config START_WEEKDAY
-	* @type number
-	* @default 0
-	*/	
-	this.cfg.addProperty(defCfg.START_WEEKDAY.key,	{ value:defCfg.START_WEEKDAY.value, handler:this.delegateConfig, validator:this.cfg.checkNumber  } );
+	* Subtracts the designated number of months from the current calendar month, and sets the current
+	* calendar page date to the new month.
+	* @method subtractMonths
+	* @param {Number}	count	The number of months to subtract from the current calendar
+	*/
+	subtractMonths : function(count) {
+		var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+		this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.subtract(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.MONTH, count));
+		this.resetRenderers();
+		this.changePageEvent.fire();
+	},
 	
 	/**
-	* True if the Calendar should show weekday labels. True by default.
-	* @config SHOW_WEEKDAYS
-	* @type Boolean
-	* @default true
-	*/	
-	this.cfg.addProperty(defCfg.SHOW_WEEKDAYS.key,	{ value:defCfg.SHOW_WEEKDAYS.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	* Adds the designated number of years to the current calendar, and sets the current
+	* calendar page date to the new month.
+	* @method addYears
+	* @param {Number}	count	The number of years to add to the current calendar
+	*/
+	addYears : function(count) {
+		var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+		this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.add(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.YEAR, count));
+		this.resetRenderers();
+		this.changePageEvent.fire();
+	},
 	
 	/**
-	* True if the Calendar should show week row headers. False by default.
-	* @config SHOW_WEEK_HEADER
-	* @type Boolean
-	* @default false
-	*/	
-	this.cfg.addProperty(defCfg.SHOW_WEEK_HEADER.key,{ value:defCfg.SHOW_WEEK_HEADER.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	* Subtcats the designated number of years from the current calendar, and sets the current
+	* calendar page date to the new month.
+	* @method subtractYears
+	* @param {Number}	count	The number of years to subtract from the current calendar
+	*/
+	subtractYears : function(count) {
+		var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+		this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.subtract(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.YEAR, count));
+		this.resetRenderers();
+		this.changePageEvent.fire();
+	},
 	
 	/**
-	* True if the Calendar should show week row footers. False by default.
-	* @config SHOW_WEEK_FOOTER
-	* @type Boolean
-	* @default false
+	* Navigates to the next month page in the calendar widget.
+	* @method nextMonth
 	*/
-	this.cfg.addProperty(defCfg.SHOW_WEEK_FOOTER.key,{ value:defCfg.SHOW_WEEK_FOOTER.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	nextMonth : function() {
+		this.addMonths(1);
+	},
 	
 	/**
-	* True if the Calendar should suppress weeks that are not a part of the current month. False by default.
-	* @config HIDE_BLANK_WEEKS
-	* @type Boolean
-	* @default false
-	*/		
-	this.cfg.addProperty(defCfg.HIDE_BLANK_WEEKS.key,{ value:defCfg.HIDE_BLANK_WEEKS.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	* Navigates to the previous month page in the calendar widget.
+	* @method previousMonth
+	*/
+	previousMonth : function() {
+		this.subtractMonths(1);
+	},
 	
 	/**
-	* The image that should be used for the left navigation arrow.
-	* @config NAV_ARROW_LEFT
-	* @type String
-	* @deprecated	You can customize the image by overriding the default CSS class for the left arrow - "calnavleft"
-	* @default null
-	*/		
-	this.cfg.addProperty(defCfg.NAV_ARROW_LEFT.key,	{ value:defCfg.NAV_ARROW_LEFT.value, handler:this.delegateConfig } );
+	* Navigates to the next year in the currently selected month in the calendar widget.
+	* @method nextYear
+	*/
+	nextYear : function() {
+		this.addYears(1);
+	},
 	
 	/**
-	* The image that should be used for the right navigation arrow.
-	* @config NAV_ARROW_RIGHT
-	* @type String
-	* @deprecated	You can customize the image by overriding the default CSS class for the right arrow - "calnavright"
-	* @default null
-	*/		
-	this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key,	{ value:defCfg.NAV_ARROW_RIGHT.value, handler:this.delegateConfig } );
-
-	// Locale properties
+	* Navigates to the previous year in the currently selected month in the calendar widget.
+	* @method previousYear
+	*/
+	previousYear : function() {
+		this.subtractYears(1);
+	},
 	
+	// END MONTH NAVIGATION METHODS
+	
+	// BEGIN SELECTION METHODS
+	
 	/**
-	* The short month labels for the current locale.
-	* @config MONTHS_SHORT
-	* @type String[]
-	* @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
+	* Resets the calendar widget to the originally selected month and year, and 
+	* sets the calendar to the initial selection(s).
+	* @method reset
 	*/
-	this.cfg.addProperty(defCfg.MONTHS_SHORT.key,	{ value:defCfg.MONTHS_SHORT.value, handler:this.delegateConfig } );
+	reset : function() {
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+		this.cfg.resetProperty(defCfg.SELECTED.key);
+		this.cfg.resetProperty(defCfg.PAGEDATE.key);
+		this.resetEvent.fire();
+	},
 	
 	/**
-	* The long month labels for the current locale.
-	* @config MONTHS_LONG
-	* @type String[]
-	* @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
-	*/		
-	this.cfg.addProperty(defCfg.MONTHS_LONG.key,		{ value:defCfg.MONTHS_LONG.value, handler:this.delegateConfig } );
+	* Clears the selected dates in the current calendar widget and sets the calendar
+	* to the current month and year.
+	* @method clear
+	*/
+	clear : function() {
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+		this.cfg.setProperty(defCfg.SELECTED.key, []);
+		this.cfg.setProperty(defCfg.PAGEDATE.key, new Date(this.today.getTime()));
+		this.clearEvent.fire();
+	},
 	
 	/**
-	* The 1-character weekday labels for the current locale.
-	* @config WEEKDAYS_1CHAR
-	* @type String[]
-	* @default ["S", "M", "T", "W", "T", "F", "S"]
-	*/		
-	this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key,	{ value:defCfg.WEEKDAYS_1CHAR.value, handler:this.delegateConfig } );
+	* Selects a date or a collection of dates on the current calendar. This method, by default,
+	* does not call the render method explicitly. Once selection has completed, render must be 
+	* called for the changes to be reflected visually.
+	*
+	* Any dates which are OOB (out of bounds, not selectable) will not be selected and the array of 
+	* selected dates passed to the selectEvent will not contain OOB dates.
+	* 
+	* If all dates are OOB, the no state change will occur; beforeSelect and select events will not be fired.
+	*
+	* @method select
+	* @param	{String/Date/Date[]}	date	The date string of dates to select in the current calendar. Valid formats are
+	*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
+	*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
+	*								This method can also take a JavaScript Date object or an array of Date objects.
+	* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*/
+	select : function(date) {
+		this.logger.log("Select: " + date, "info");
 	
+		var aToBeSelected = this._toFieldArray(date);
+		this.logger.log("Selection field array: " + aToBeSelected, "info");
+	
+		// Filtered array of valid dates
+		var validDates = [];
+		var selected = [];
+		var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+		
+		for (var a=0; a < aToBeSelected.length; ++a) {
+			var toSelect = aToBeSelected[a];
+	
+			if (!this.isDateOOB(this._toDate(toSelect))) {
+				
+				if (validDates.length === 0) {
+					this.beforeSelectEvent.fire();
+					selected = this.cfg.getProperty(cfgSelected);
+				}
+	
+				validDates.push(toSelect);
+				
+				if (this._indexOfSelectedFieldArray(toSelect) == -1) { 
+					selected[selected.length] = toSelect;
+				}
+			}
+		}
+		
+		if (validDates.length === 0) { this.logger.log("All provided dates were OOB. beforeSelect and select events not fired", "info"); }
+	
+		if (validDates.length > 0) {
+			if (this.parent) {
+				this.parent.cfg.setProperty(cfgSelected, selected);
+			} else {
+				this.cfg.setProperty(cfgSelected, selected);
+			}
+			this.selectEvent.fire(validDates);
+		}
+	
+		return this.getSelectedDates();
+	},
+	
 	/**
-	* The short weekday labels for the current locale.
-	* @config WEEKDAYS_SHORT
-	* @type String[]
-	* @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
-	*/		
-	this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key,	{ value:defCfg.WEEKDAYS_SHORT.value, handler:this.delegateConfig } );
+	* Selects a date on the current calendar by referencing the index of the cell that should be selected.
+	* This method is used to easily select a single cell (usually with a mouse click) without having to do
+	* a full render. The selected style is applied to the cell directly.
+	*
+	* If the cell is not marked with the CSS_CELL_SELECTABLE class (as is the case by default for out of month 
+	* or out of bounds cells), it will not be selected and in such a case beforeSelect and select events will not be fired.
+	* 
+	* @method selectCell
+	* @param	{Number}	cellIndex	The index of the cell to select in the current calendar. 
+	* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*/
+	selectCell : function(cellIndex) {
 	
+		var cell = this.cells[cellIndex];
+		var cellDate = this.cellDates[cellIndex];
+		var dCellDate = this._toDate(cellDate);
+		this.logger.log("Select: " + dCellDate, "info");
+		
+		var selectable = YAHOO.util.Dom.hasClass(cell, this.Style.CSS_CELL_SELECTABLE);
+		if (!selectable) {this.logger.log("The cell at cellIndex:" + cellIndex + " is not a selectable cell. beforeSelect, select events not fired", "info"); }
+	
+		if (selectable) {
+	
+			this.beforeSelectEvent.fire();
+	
+			var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+			var selected = this.cfg.getProperty(cfgSelected);
+	
+			var selectDate = cellDate.concat();
+	
+			if (this._indexOfSelectedFieldArray(selectDate) == -1) {
+				selected[selected.length] = selectDate;
+			}
+			if (this.parent) {
+				this.parent.cfg.setProperty(cfgSelected, selected);
+			} else {
+				this.cfg.setProperty(cfgSelected, selected);
+			}
+			this.renderCellStyleSelected(dCellDate,cell);
+			this.selectEvent.fire([selectDate]);
+	
+			this.doCellMouseOut.call(cell, null, this);		
+		}
+	
+		return this.getSelectedDates();
+	},
+	
 	/**
-	* The medium weekday labels for the current locale.
-	* @config WEEKDAYS_MEDIUM
-	* @type String[]
-	* @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
-	*/		
-	this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key,	{ value:defCfg.WEEKDAYS_MEDIUM.value, handler:this.delegateConfig } );
+	* Deselects a date or a collection of dates on the current calendar. This method, by default,
+	* does not call the render method explicitly. Once deselection has completed, render must be 
+	* called for the changes to be reflected visually.
+	* 
+	* The method will not attempt to deselect any dates which are OOB (out of bounds, and hence not selectable) 
+	* and the array of deselected dates passed to the deselectEvent will not contain any OOB dates.
+	* 
+	* If all dates are OOB, beforeDeselect and deselect events will not be fired.
+	* 
+	* @method deselect
+	* @param	{String/Date/Date[]}	date	The date string of dates to deselect in the current calendar. Valid formats are
+	*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
+	*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
+	*								This method can also take a JavaScript Date object or an array of Date objects.	
+	* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*/
+	deselect : function(date) {
+		this.logger.log("Deselect: " + date, "info");
 	
+		var aToBeDeselected = this._toFieldArray(date);
+		this.logger.log("Deselection field array: " + aToBeDeselected, "info");
+	
+		var validDates = [];
+		var selected = [];
+		var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+	
+		for (var a=0; a < aToBeDeselected.length; ++a) {
+			var toDeselect = aToBeDeselected[a];
+	
+			if (!this.isDateOOB(this._toDate(toDeselect))) {
+	
+				if (validDates.length === 0) {
+					this.beforeDeselectEvent.fire();
+					selected = this.cfg.getProperty(cfgSelected);
+				}
+	
+				validDates.push(toDeselect);
+	
+				var index = this._indexOfSelectedFieldArray(toDeselect);
+				if (index != -1) {	
+					selected.splice(index,1);
+				}
+			}
+		}
+	
+		if (validDates.length === 0) { this.logger.log("All provided dates were OOB. beforeDeselect and deselect events not fired");}
+	
+		if (validDates.length > 0) {
+			if (this.parent) {
+				this.parent.cfg.setProperty(cfgSelected, selected);
+			} else {
+				this.cfg.setProperty(cfgSelected, selected);
+			}
+			this.deselectEvent.fire(validDates);
+		}
+	
+		return this.getSelectedDates();
+	},
+	
 	/**
-	* The long weekday labels for the current locale.
-	* @config WEEKDAYS_LONG
-	* @type String[]
-	* @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
-	*/		
-	this.cfg.addProperty(defCfg.WEEKDAYS_LONG.key,	{ value:defCfg.WEEKDAYS_LONG.value, handler:this.delegateConfig } );
-
+	* Deselects a date on the current calendar by referencing the index of the cell that should be deselected.
+	* This method is used to easily deselect a single cell (usually with a mouse click) without having to do
+	* a full render. The selected style is removed from the cell directly.
+	* 
+	* If the cell is not marked with the CSS_CELL_SELECTABLE class (as is the case by default for out of month 
+	* or out of bounds cells), the method will not attempt to deselect it and in such a case, beforeDeselect and 
+	* deselect events will not be fired.
+	* 
+	* @method deselectCell
+	* @param	{Number}	cellIndex	The index of the cell to deselect in the current calendar. 
+	* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*/
+	deselectCell : function(cellIndex) {
+		var cell = this.cells[cellIndex];
+		var cellDate = this.cellDates[cellIndex];
+		var cellDateIndex = this._indexOfSelectedFieldArray(cellDate);
+		
+		var selectable = YAHOO.util.Dom.hasClass(cell, this.Style.CSS_CELL_SELECTABLE);
+		if (!selectable) { this.logger.log("The cell at cellIndex:" + cellIndex + " is not a selectable/deselectable cell", "info"); }
+	
+		if (selectable) {
+	
+			this.beforeDeselectEvent.fire();
+	
+			var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+			var selected = this.cfg.getProperty(defCfg.SELECTED.key);
+	
+			var dCellDate = this._toDate(cellDate);
+			var selectDate = cellDate.concat();
+	
+			if (cellDateIndex > -1) {
+				if (this.cfg.getProperty(defCfg.PAGEDATE.key).getMonth() == dCellDate.getMonth() &&
+					this.cfg.getProperty(defCfg.PAGEDATE.key).getFullYear() == dCellDate.getFullYear()) {
+					YAHOO.util.Dom.removeClass(cell, this.Style.CSS_CELL_SELECTED);
+				}
+				selected.splice(cellDateIndex, 1);
+			}
+	
+			if (this.parent) {
+				this.parent.cfg.setProperty(defCfg.SELECTED.key, selected);
+			} else {
+				this.cfg.setProperty(defCfg.SELECTED.key, selected);
+			}
+	
+			this.deselectEvent.fire(selectDate);
+		}
+	
+		return this.getSelectedDates();
+	},
+	
 	/**
-	* The setting that determines which length of month labels should be used. Possible values are "short" and "long".
-	* @config LOCALE_MONTHS
-	* @type String
-	* @default "long"
+	* Deselects all dates on the current calendar.
+	* @method deselectAll
+	* @return {Date[]}		Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*						Assuming that this function executes properly, the return value should be an empty array.
+	*						However, the empty array is returned for the sake of being able to check the selection status
+	*						of the calendar.
 	*/
-	this.cfg.addProperty(defCfg.LOCALE_MONTHS.key,	{ value:defCfg.LOCALE_MONTHS.value, handler:this.delegateConfig } );
-
+	deselectAll : function() {
+		this.beforeDeselectEvent.fire();
+		
+		var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+	
+		var selected = this.cfg.getProperty(cfgSelected);
+		var count = selected.length;
+		var sel = selected.concat();
+	
+		if (this.parent) {
+			this.parent.cfg.setProperty(cfgSelected, []);
+		} else {
+			this.cfg.setProperty(cfgSelected, []);
+		}
+		
+		if (count > 0) {
+			this.deselectEvent.fire(sel);
+		}
+	
+		return this.getSelectedDates();
+	},
+	
+	// END SELECTION METHODS
+	
+	// BEGIN TYPE CONVERSION METHODS
+	
 	/**
-	* The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long".
-	* @config LOCALE_WEEKDAYS
-	* @type String
-	* @default "short"
-	*/	
-	this.cfg.addProperty(defCfg.LOCALE_WEEKDAYS.key,	{ value:defCfg.LOCALE_WEEKDAYS.value, handler:this.delegateConfig } );
-
+	* Converts a date (either a JavaScript Date object, or a date string) to the internal data structure
+	* used to represent dates: [[yyyy,mm,dd],[yyyy,mm,dd]].
+	* @method _toFieldArray
+	* @private
+	* @param	{String/Date/Date[]}	date	The date string of dates to deselect in the current calendar. Valid formats are
+	*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
+	*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
+	*								This method can also take a JavaScript Date object or an array of Date objects.	
+	* @return {Array[](Number[])}	Array of date field arrays
+	*/
+	_toFieldArray : function(date) {
+		var returnDate = [];
+	
+		if (date instanceof Date) {
+			returnDate = [[date.getFullYear(), date.getMonth()+1, date.getDate()]];
+		} else if (YAHOO.lang.isString(date)) {
+			returnDate = this._parseDates(date);
+		} else if (YAHOO.lang.isArray(date)) {
+			for (var i=0;i<date.length;++i) {
+				var d = date[i];
+				returnDate[returnDate.length] = [d.getFullYear(),d.getMonth()+1,d.getDate()];
+			}
+		}
+		
+		return returnDate;
+	},
+	
 	/**
-	* The value used to delimit individual dates in a date string passed to various Calendar functions.
-	* @config DATE_DELIMITER
-	* @type String
-	* @default ","
+	* Converts a date field array [yyyy,mm,dd] to a JavaScript Date object. The date field array
+	* is the format in which dates are as provided as arguments to selectEvent and deselectEvent listeners.
+	* 
+	* @method toDate
+	* @param	{Number[]}	dateFieldArray	The date field array to convert to a JavaScript Date.
+	* @return	{Date}	JavaScript Date object representing the date field array.
 	*/
-	this.cfg.addProperty(defCfg.DATE_DELIMITER.key,		{ value:defCfg.DATE_DELIMITER.value, handler:this.delegateConfig } );
-
+	toDate : function(dateFieldArray) {
+		return this._toDate(dateFieldArray);
+	},
+	
 	/**
-	* The value used to delimit date fields in a date string passed to various Calendar functions.
-	* @config DATE_FIELD_DELIMITER
-	* @type String
-	* @default "/"
-	*/	
-	this.cfg.addProperty(defCfg.DATE_FIELD_DELIMITER.key,{ value:defCfg.DATE_FIELD_DELIMITER.value, handler:this.delegateConfig } );
-
+	* Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
+	* @method _toDate
+	* @private
+	* @deprecated Made public, toDate 
+	* @param	{Number[]}		dateFieldArray	The date field array to convert to a JavaScript Date.
+	* @return	{Date}	JavaScript Date object representing the date field array
+	*/
+	_toDate : function(dateFieldArray) {
+		if (dateFieldArray instanceof Date) {
+			return dateFieldArray;
+		} else {
+			return YAHOO.widget.DateMath.getDate(dateFieldArray[0],dateFieldArray[1]-1,dateFieldArray[2]);
+		}
+	},
+	
+	// END TYPE CONVERSION METHODS 
+	
+	// BEGIN UTILITY METHODS
+	
 	/**
-	* The value used to delimit date ranges in a date string passed to various Calendar functions.
-	* @config DATE_RANGE_DELIMITER
-	* @type String
-	* @default "-"
+	* Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
+	* @method _fieldArraysAreEqual
+	* @private
+	* @param	{Number[]}	array1	The first date field array to compare
+	* @param	{Number[]}	array2	The first date field array to compare
+	* @return	{Boolean}	The boolean that represents the equality of the two arrays
 	*/
-	this.cfg.addProperty(defCfg.DATE_RANGE_DELIMITER.key,{ value:defCfg.DATE_RANGE_DELIMITER.value, handler:this.delegateConfig } );
-
+	_fieldArraysAreEqual : function(array1, array2) {
+		var match = false;
+	
+		if (array1[0]==array2[0]&&array1[1]==array2[1]&&array1[2]==array2[2]) {
+			match=true;	
+		}
+	
+		return match;
+	},
+	
 	/**
-	* The position of the month in a month/year date string
-	* @config MY_MONTH_POSITION
-	* @type Number
-	* @default 1
+	* Gets the index of a date field array [yyyy,mm,dd] in the current list of selected dates.
+	* @method	_indexOfSelectedFieldArray
+	* @private
+	* @param	{Number[]}		find	The date field array to search for
+	* @return	{Number}			The index of the date field array within the collection of selected dates.
+	*								-1 will be returned if the date is not found.
 	*/
-	this.cfg.addProperty(defCfg.MY_MONTH_POSITION.key,	{ value:defCfg.MY_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	_indexOfSelectedFieldArray : function(find) {
+		var selected = -1;
+		var seldates = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);
 	
+		for (var s=0;s<seldates.length;++s) {
+			var sArray = seldates[s];
+			if (find[0]==sArray[0]&&find[1]==sArray[1]&&find[2]==sArray[2]) {
+				selected = s;
+				break;
+			}
+		}
+	
+		return selected;
+	},
+	
 	/**
-	* The position of the year in a month/year date string
-	* @config MY_YEAR_POSITION
-	* @type Number
-	* @default 2
-	*/	
-	this.cfg.addProperty(defCfg.MY_YEAR_POSITION.key,	{ value:defCfg.MY_YEAR_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	* Determines whether a given date is OOM (out of month).
+	* @method	isDateOOM
+	* @param	{Date}	date	The JavaScript Date object for which to check the OOM status
+	* @return	{Boolean}	true if the date is OOM
+	*/
+	isDateOOM : function(date) {
+		return (date.getMonth() != this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key).getMonth());
+	},
 	
 	/**
-	* The position of the month in a month/day date string
-	* @config MD_MONTH_POSITION
-	* @type Number
-	* @default 1
-	*/	
-	this.cfg.addProperty(defCfg.MD_MONTH_POSITION.key,	{ value:defCfg.MD_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	* Determines whether a given date is OOB (out of bounds - less than the mindate or more than the maxdate).
+	*
+	* @method	isDateOOB
+	* @param	{Date}	date	The JavaScript Date object for which to check the OOB status
+	* @return	{Boolean}	true if the date is OOB
+	*/
+	isDateOOB : function(date) {
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+		
+		var minDate = this.cfg.getProperty(defCfg.MINDATE.key);
+		var maxDate = this.cfg.getProperty(defCfg.MAXDATE.key);
+		var dm = YAHOO.widget.DateMath;
+		
+		if (minDate) {
+			minDate = dm.clearTime(minDate);
+		} 
+		if (maxDate) {
+			maxDate = dm.clearTime(maxDate);
+		}
 	
+		var clearedDate = new Date(date.getTime());
+		clearedDate = dm.clearTime(clearedDate);
+	
+		return ((minDate && clearedDate.getTime() < minDate.getTime()) || (maxDate && clearedDate.getTime() > maxDate.getTime()));
+	},
+	
 	/**
-	* The position of the day in a month/year date string
-	* @config MD_DAY_POSITION
-	* @type Number
-	* @default 2
-	*/	
-	this.cfg.addProperty(defCfg.MD_DAY_POSITION.key,		{ value:defCfg.MD_DAY_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	 * Parses a pagedate configuration property value. The value can either be specified as a string of form "mm/yyyy" or a Date object 
+	 * and is parsed into a Date object normalized to the first day of the month. If no value is passed in, the month and year from today's date are used to create the Date object 
+	 * @method	_parsePageDate
+	 * @private
+	 * @param {Date|String}	date	Pagedate value which needs to be parsed
+	 * @return {Date}	The Date object representing the pagedate
+	 */
+	_parsePageDate : function(date) {
+		var parsedDate;
+		
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
 	
+		if (date) {
+			if (date instanceof Date) {
+				parsedDate = YAHOO.widget.DateMath.findMonthStart(date);
+			} else {
+				var month, year, aMonthYear;
+				aMonthYear = date.split(this.cfg.getProperty(defCfg.DATE_FIELD_DELIMITER.key));
+				month = parseInt(aMonthYear[this.cfg.getProperty(defCfg.MY_MONTH_POSITION.key)-1], 10)-1;
+				year = parseInt(aMonthYear[this.cfg.getProperty(defCfg.MY_YEAR_POSITION.key)-1], 10);
+
+				parsedDate = YAHOO.widget.DateMath.getDate(year, month, 1);
+			}
+		} else {
+			parsedDate = YAHOO.widget.DateMath.getDate(this.today.getFullYear(), this.today.getMonth(), 1);
+		}
+		return parsedDate;
+	},
+	
+	// END UTILITY METHODS
+	
+	// BEGIN EVENT HANDLERS
+	
 	/**
-	* The position of the month in a month/day/year date string
-	* @config MDY_MONTH_POSITION
-	* @type Number
-	* @default 1
-	*/	
-	this.cfg.addProperty(defCfg.MDY_MONTH_POSITION.key,	{ value:defCfg.MDY_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	* Event executed before a date is selected in the calendar widget.
+	* @deprecated Event handlers for this event should be susbcribed to beforeSelectEvent.
+	*/
+	onBeforeSelect : function() {
+		if (this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MULTI_SELECT.key) === false) {
+			if (this.parent) {
+				this.parent.callChildFunction("clearAllBodyCellStyles", this.Style.CSS_CELL_SELECTED);
+				this.parent.deselectAll();
+			} else {
+				this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);
+				this.deselectAll();
+			}
+		}
+	},
 	
 	/**
-	* The position of the day in a month/day/year date string
-	* @config MDY_DAY_POSITION
-	* @type Number
-	* @default 2
-	*/	
-	this.cfg.addProperty(defCfg.MDY_DAY_POSITION.key,	{ value:defCfg.MDY_DAY_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	* Event executed when a date is selected in the calendar widget.
+	* @param	{Array}	selected	An array of date field arrays representing which date or dates were selected. Example: [ [2006,8,6],[2006,8,7],[2006,8,8] ]
+	* @deprecated Event handlers for this event should be susbcribed to selectEvent.
+	*/
+	onSelect : function(selected) { },
 	
 	/**
-	* The position of the year in a month/day/year date string
-	* @config MDY_YEAR_POSITION
-	* @type Number
-	* @default 3
-	*/	
-	this.cfg.addProperty(defCfg.MDY_YEAR_POSITION.key,	{ value:defCfg.MDY_YEAR_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
+	* Event executed before a date is deselected in the calendar widget.
+	* @deprecated Event handlers for this event should be susbcribed to beforeDeselectEvent.
+	*/
+	onBeforeDeselect : function() { },
+	
 	/**
-	* The position of the month in the month year label string used as the Calendar header
-	* @config MY_LABEL_MONTH_POSITION
-	* @type Number
-	* @default 1
+	* Event executed when a date is deselected in the calendar widget.
+	* @param	{Array}	selected	An array of date field arrays representing which date or dates were deselected. Example: [ [2006,8,6],[2006,8,7],[2006,8,8] ]
+	* @deprecated Event handlers for this event should be susbcribed to deselectEvent.
 	*/
-	this.cfg.addProperty(defCfg.MY_LABEL_MONTH_POSITION.key,	{ value:defCfg.MY_LABEL_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
+	onDeselect : function(deselected) { },
+	
 	/**
-	* The position of the year in the month year label string used as the Calendar header
-	* @config MY_LABEL_YEAR_POSITION
-	* @type Number
-	* @default 2
+	* Event executed when the user navigates to a different calendar page.
+	* @deprecated Event handlers for this event should be susbcribed to changePageEvent.
 	*/
-	this.cfg.addProperty(defCfg.MY_LABEL_YEAR_POSITION.key,	{ value:defCfg.MY_LABEL_YEAR_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	onChangePage : function() {
+		this.render();
+	},
 	
 	/**
-	* The suffix used after the month when rendering the Calendar header
-	* @config MY_LABEL_MONTH_SUFFIX
-	* @type String
-	* @default " "
+	* Event executed when the calendar widget is rendered.
+	* @deprecated Event handlers for this event should be susbcribed to renderEvent.
 	*/
-	this.cfg.addProperty(defCfg.MY_LABEL_MONTH_SUFFIX.key,	{ value:defCfg.MY_LABEL_MONTH_SUFFIX.value, handler:this.delegateConfig } );
+	onRender : function() { },
 	
 	/**
-	* The suffix used after the year when rendering the Calendar header
-	* @config MY_LABEL_YEAR_SUFFIX
-	* @type String
-	* @default ""
+	* Event executed when the calendar widget is reset to its original state.
+	* @deprecated Event handlers for this event should be susbcribed to resetEvemt.
 	*/
-	this.cfg.addProperty(defCfg.MY_LABEL_YEAR_SUFFIX.key, { value:defCfg.MY_LABEL_YEAR_SUFFIX.value, handler:this.delegateConfig } );
-};
-
-/**
-* Initializes CalendarGroup's built-in CustomEvents
-* @method initEvents
-*/
-YAHOO.widget.CalendarGroup.prototype.initEvents = function() {
-	var me = this;
-	var strEvent = "Event";
-
+	onReset : function() { this.render(); },
+	
 	/**
-	* Proxy subscriber to subscribe to the CalendarGroup's child Calendars' CustomEvents
-	* @method sub
+	* Event executed when the calendar widget is completely cleared to the current month with no selections.
+	* @deprecated Event handlers for this event should be susbcribed to clearEvent.
+	*/
+	onClear : function() { this.render(); },
+	
+	/**
+	* Validates the calendar widget. This method has no default implementation
+	* and must be extended by subclassing the widget.
+	* @return	Should return true if the widget validates, and false if
+	* it doesn't.
+	* @type Boolean
+	*/
+	validate : function() { return true; },
+	
+	// END EVENT HANDLERS
+	
+	// BEGIN DATE PARSE METHODS
+	
+	/**
+	* Converts a date string to a date field array
 	* @private
-	* @param {Function} fn	The function to subscribe to this CustomEvent
-	* @param {Object}	obj	The CustomEvent's scope object
-	* @param {Boolean}	bOverride	Whether or not to apply scope correction
+	* @param	{String}	sDate			Date string. Valid formats are mm/dd and mm/dd/yyyy.
+	* @return				A date field array representing the string passed to the method
+	* @type Array[](Number[])
 	*/
-	var sub = function(fn, obj, bOverride) {
-		for (var p=0;p<me.pages.length;++p) {
-			var cal = me.pages[p];
-			cal[this.type + strEvent].subscribe(fn, obj, bOverride);
+	_parseDate : function(sDate) {
+		var aDate = sDate.split(this.Locale.DATE_FIELD_DELIMITER);
+		var rArray;
+	
+		if (aDate.length == 2) {
+			rArray = [aDate[this.Locale.MD_MONTH_POSITION-1],aDate[this.Locale.MD_DAY_POSITION-1]];
+			rArray.type = YAHOO.widget.Calendar.MONTH_DAY;
+		} else {
+			rArray = [aDate[this.Locale.MDY_YEAR_POSITION-1],aDate[this.Locale.MDY_MONTH_POSITION-1],aDate[this.Locale.MDY_DAY_POSITION-1]];
+			rArray.type = YAHOO.widget.Calendar.DATE;
 		}
-	};
-
+	
+		for (var i=0;i<rArray.length;i++) {
+			rArray[i] = parseInt(rArray[i], 10);
+		}
+	
+		return rArray;
+	},
+	
 	/**
-	* Proxy unsubscriber to unsubscribe from the CalendarGroup's child Calendars' CustomEvents
-	* @method unsub
+	* Converts a multi or single-date string to an array of date field arrays
 	* @private
-	* @param {Function} fn	The function to subscribe to this CustomEvent
-	* @param {Object}	obj	The CustomEvent's scope object
+	* @param	{String}	sDates		Date string with one or more comma-delimited dates. Valid formats are mm/dd, mm/dd/yyyy, mm/dd/yyyy-mm/dd/yyyy
+	* @return							An array of date field arrays
+	* @type Array[](Number[])
 	*/
-	var unsub = function(fn, obj) {
-		for (var p=0;p<me.pages.length;++p) {
-			var cal = me.pages[p];
-			cal[this.type + strEvent].unsubscribe(fn, obj);
+	_parseDates : function(sDates) {
+		var aReturn = [];
+	
+		var aDates = sDates.split(this.Locale.DATE_DELIMITER);
+		
+		for (var d=0;d<aDates.length;++d) {
+			var sDate = aDates[d];
+	
+			if (sDate.indexOf(this.Locale.DATE_RANGE_DELIMITER) != -1) {
+				// This is a range
+				var aRange = sDate.split(this.Locale.DATE_RANGE_DELIMITER);
+	
+				var dateStart = this._parseDate(aRange[0]);
+				var dateEnd = this._parseDate(aRange[1]);
+	
+				var fullRange = this._parseRange(dateStart, dateEnd);
+				aReturn = aReturn.concat(fullRange);
+			} else {
+				// This is not a range
+				var aDate = this._parseDate(sDate);
+				aReturn.push(aDate);
+			}
 		}
-	};
+		return aReturn;
+	},
 	
-	var defEvents = YAHOO.widget.Calendar._EVENT_TYPES;
-
 	/**
-	* Fired before a selection is made
-	* @event beforeSelectEvent
+	* Converts a date range to the full list of included dates
+	* @private
+	* @param	{Number[]}	startDate	Date field array representing the first date in the range
+	* @param	{Number[]}	endDate		Date field array representing the last date in the range
+	* @return							An array of date field arrays
+	* @type Array[](Number[])
 	*/
-	this.beforeSelectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SELECT);
-	this.beforeSelectEvent.subscribe = sub; this.beforeSelectEvent.unsubscribe = unsub;
+	_parseRange : function(startDate, endDate) {
+		var dCurrent = YAHOO.widget.DateMath.add(YAHOO.widget.DateMath.getDate(startDate[0],startDate[1]-1,startDate[2]),YAHOO.widget.DateMath.DAY,1);
+		var dEnd     = YAHOO.widget.DateMath.getDate(endDate[0],  endDate[1]-1,  endDate[2]);
+	
+		var results = [];
+		results.push(startDate);
+		while (dCurrent.getTime() <= dEnd.getTime()) {
+			results.push([dCurrent.getFullYear(),dCurrent.getMonth()+1,dCurrent.getDate()]);
+			dCurrent = YAHOO.widget.DateMath.add(dCurrent,YAHOO.widget.DateMath.DAY,1);
+		}
+		return results;
+	},
+	
+	// END DATE PARSE METHODS
+	
+	// BEGIN RENDERER METHODS
+	
+	/**
+	* Resets the render stack of the current calendar to its original pre-render value.
+	*/
+	resetRenderers : function() {
+		this.renderStack = this._renderStack.concat();
+	},
+	
+	/**
+	 * Removes all custom renderers added to the Calendar through the addRenderer, addMonthRenderer and 
+	 * addWeekdayRenderer methods. Calendar's render method needs to be called after removing renderers 
+	 * to re-render the Calendar without custom renderers applied.
+	 */
+	removeRenderers : function() {
+		this._renderStack = [];
+		this.renderStack = [];
+	},
 
 	/**
-	* Fired when a selection is made
-	* @event selectEvent
-	* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
+	* Clears the inner HTML, CSS class and style information from the specified cell.
+	* @method clearElement
+	* @param	{HTMLTableCellElement} cell The cell to clear
+	*/ 
+	clearElement : function(cell) {
+		cell.innerHTML = " ";
+		cell.className="";
+	},
+	
+	/**
+	* Adds a renderer to the render stack. The function reference passed to this method will be executed
+	* when a date cell matches the conditions specified in the date string for this renderer.
+	* @method addRenderer
+	* @param	{String}	sDates		A date string to associate with the specified renderer. Valid formats
+	*									include date (12/24/2005), month/day (12/24), and range (12/1/2004-1/1/2005)
+	* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
 	*/
-	this.selectEvent = new YAHOO.util.CustomEvent(defEvents.SELECT); 
-	this.selectEvent.subscribe = sub; this.selectEvent.unsubscribe = unsub;
+	addRenderer : function(sDates, fnRender) {
+		var aDates = this._parseDates(sDates);
+		for (var i=0;i<aDates.length;++i) {
+			var aDate = aDates[i];
+		
+			if (aDate.length == 2) { // this is either a range or a month/day combo
+				if (aDate[0] instanceof Array) { // this is a range
+					this._addRenderer(YAHOO.widget.Calendar.RANGE,aDate,fnRender);
+				} else { // this is a month/day combo
+					this._addRenderer(YAHOO.widget.Calendar.MONTH_DAY,aDate,fnRender);
+				}
+			} else if (aDate.length == 3) {
+				this._addRenderer(YAHOO.widget.Calendar.DATE,aDate,fnRender);
+			}
+		}
+	},
+	
+	/**
+	* The private method used for adding cell renderers to the local render stack.
+	* This method is called by other methods that set the renderer type prior to the method call.
+	* @method _addRenderer
+	* @private
+	* @param	{String}	type		The type string that indicates the type of date renderer being added.
+	*									Values are YAHOO.widget.Calendar.DATE, YAHOO.widget.Calendar.MONTH_DAY, YAHOO.widget.Calendar.WEEKDAY,
+	*									YAHOO.widget.Calendar.RANGE, YAHOO.widget.Calendar.MONTH
+	* @param	{Array}		aDates		An array of dates used to construct the renderer. The format varies based
+	*									on the renderer type
+	* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
+	*/
+	_addRenderer : function(type, aDates, fnRender) {
+		var add = [type,aDates,fnRender];
+		this.renderStack.unshift(add);	
+		this._renderStack = this.renderStack.concat();
+	},
 
 	/**
-	* Fired before a selection is made
-	* @event beforeDeselectEvent
+	* Adds a month to the render stack. The function reference passed to this method will be executed
+	* when a date cell matches the month passed to this method.
+	* @method addMonthRenderer
+	* @param	{Number}	month		The month (1-12) to associate with this renderer
+	* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
 	*/
-	this.beforeDeselectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_DESELECT); 
-	this.beforeDeselectEvent.subscribe = sub; this.beforeDeselectEvent.unsubscribe = unsub;
+	addMonthRenderer : function(month, fnRender) {
+		this._addRenderer(YAHOO.widget.Calendar.MONTH,[month],fnRender);
+	},
 
 	/**
-	* Fired when a selection is made
-	* @event deselectEvent
-	* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
+	* Adds a weekday to the render stack. The function reference passed to this method will be executed
+	* when a date cell matches the weekday passed to this method.
+	* @method addWeekdayRenderer
+	* @param	{Number}	weekday		The weekday (0-6) to associate with this renderer
+	* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
 	*/
-	this.deselectEvent = new YAHOO.util.CustomEvent(defEvents.DESELECT); 
-	this.deselectEvent.subscribe = sub; this.deselectEvent.unsubscribe = unsub;
+	addWeekdayRenderer : function(weekday, fnRender) {
+		this._addRenderer(YAHOO.widget.Calendar.WEEKDAY,[weekday],fnRender);
+	},
 	
+	// END RENDERER METHODS
+	
+	// BEGIN CSS METHODS
+	
 	/**
-	* Fired when the Calendar page is changed
-	* @event changePageEvent
+	* Removes all styles from all body cells in the current calendar table.
+	* @method clearAllBodyCellStyles
+	* @param	{style}	style The CSS class name to remove from all calendar body cells
 	*/
-	this.changePageEvent = new YAHOO.util.CustomEvent(defEvents.CHANGE_PAGE); 
-	this.changePageEvent.subscribe = sub; this.changePageEvent.unsubscribe = unsub;
+	clearAllBodyCellStyles : function(style) {
+		for (var c=0;c<this.cells.length;++c) {
+			YAHOO.util.Dom.removeClass(this.cells[c],style);
+		}
+	},
+	
+	// END CSS METHODS
+	
+	// BEGIN GETTER/SETTER METHODS
+	/**
+	* Sets the calendar's month explicitly
+	* @method setMonth
+	* @param {Number}	month		The numeric month, from 0 (January) to 11 (December)
+	*/
+	setMonth : function(month) {
+		var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+		var current = this.cfg.getProperty(cfgPageDate);
+		current.setMonth(parseInt(month, 10));
+		this.cfg.setProperty(cfgPageDate, current);
+	},
 
 	/**
-	* Fired before the Calendar is rendered
-	* @event beforeRenderEvent
+	* Sets the calendar's year explicitly.
+	* @method setYear
+	* @param {Number}	year		The numeric 4-digit year
 	*/
-	this.beforeRenderEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER);
-	this.beforeRenderEvent.subscribe = sub; this.beforeRenderEvent.unsubscribe = unsub;
+	setYear : function(year) {
+		var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+		var current = this.cfg.getProperty(cfgPageDate);
+		current.setFullYear(parseInt(year, 10));
+		this.cfg.setProperty(cfgPageDate, current);
+	},
 
 	/**
-	* Fired when the Calendar is rendered
-	* @event renderEvent
+	* Gets the list of currently selected dates from the calendar.
+	* @method getSelectedDates
+	* @return {Date[]} An array of currently selected JavaScript Date objects.
 	*/
-	this.renderEvent = new YAHOO.util.CustomEvent(defEvents.RENDER);
-	this.renderEvent.subscribe = sub; this.renderEvent.unsubscribe = unsub;
+	getSelectedDates : function() {
+		var returnDates = [];
+		var selected = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);
 
+		for (var d=0;d<selected.length;++d) {
+			var dateArray = selected[d];
+
+			var date = YAHOO.widget.DateMath.getDate(dateArray[0],dateArray[1]-1,dateArray[2]);
+			returnDates.push(date);
+		}
+
+		returnDates.sort( function(a,b) { return a-b; } );
+		return returnDates;
+	},
+
+	/// END GETTER/SETTER METHODS ///
+	
 	/**
-	* Fired when the Calendar is reset
-	* @event resetEvent
+	* Hides the Calendar's outer container from view.
+	* @method hide
 	*/
-	this.resetEvent = new YAHOO.util.CustomEvent(defEvents.RESET); 
-	this.resetEvent.subscribe = sub; this.resetEvent.unsubscribe = unsub;
+	hide : function() {
+		if (this.beforeHideEvent.fire()) {
+			this.oDomContainer.style.display = "none";
+			this.hideEvent.fire();
+		}
+	},
 
 	/**
-	* Fired when the Calendar is cleared
-	* @event clearEvent
+	* Shows the Calendar's outer container.
+	* @method show
 	*/
-	this.clearEvent = new YAHOO.util.CustomEvent(defEvents.CLEAR);
-	this.clearEvent.subscribe = sub; this.clearEvent.unsubscribe = unsub;
+	show : function() {
+		if (this.beforeShowEvent.fire()) {
+			this.oDomContainer.style.display = "block";
+			this.showEvent.fire();
+		}
+	},
 
+	/**
+	* Returns a string representing the current browser.
+	* @deprecated As of 2.3.0, environment information is available in YAHOO.env.ua
+	* @see YAHOO.env.ua
+	* @property browser
+	* @type String
+	*/
+	browser : (function() {
+				var ua = navigator.userAgent.toLowerCase();
+					  if (ua.indexOf('opera')!=-1) { // Opera (check first in case of spoof)
+						 return 'opera';
+					  } else if (ua.indexOf('msie 7')!=-1) { // IE7
+						 return 'ie7';
+					  } else if (ua.indexOf('msie') !=-1) { // IE
+						 return 'ie';
+					  } else if (ua.indexOf('safari')!=-1) { // Safari (check before Gecko because it includes "like Gecko")
+						 return 'safari';
+					  } else if (ua.indexOf('gecko') != -1) { // Gecko
+						 return 'gecko';
+					  } else {
+						 return false;
+					  }
+				})(),
+	/**
+	* Returns a string representation of the object.
+	* @method toString
+	* @return {String}	A string representation of the Calendar object.
+	*/
+	toString : function() {
+		return "Calendar " + this.id;
+	}
 };
 
 /**
-* The default Config handler for the "pages" property
-* @method configPages
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+* @namespace YAHOO.widget
+* @class Calendar_Core
+* @extends YAHOO.widget.Calendar
+* @deprecated The old Calendar_Core class is no longer necessary.
 */
-YAHOO.widget.CalendarGroup.prototype.configPages = function(type, args, obj) {
-	var pageCount = args[0];
+YAHOO.widget.Calendar_Core = YAHOO.widget.Calendar;
 
-	var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
+YAHOO.widget.Cal_Core = YAHOO.widget.Calendar;
 
-	// Define literals outside loop	
-	var sep = "_";
-	var groupCalClass = "groupcal";
+/**
+* YAHOO.widget.CalendarGroup is a special container class for YAHOO.widget.Calendar. This class facilitates
+* the ability to have multi-page calendar views that share a single dataset and are
+* dependent on each other.
+*
+* The calendar group instance will refer to each of its elements using a 0-based index.
+* For example, to construct the placeholder for a calendar group widget with id "cal1" and
+* containerId of "cal1Container", the markup would be as follows:
+*	<xmp>
+*		<div id="cal1Container_0"></div>
+*		<div id="cal1Container_1"></div>
+*	</xmp>
+* The tables for the calendars ("cal1_0" and "cal1_1") will be inserted into those containers.
+* 
+* <p>
+* <strong>NOTE: As of 2.4.0, the constructor's ID argument is optional.</strong>
+* The CalendarGroup can be constructed by simply providing a container ID string, 
+* or a reference to a container DIV HTMLElement (the element needs to exist 
+* in the document).
+* 
+* E.g.:
+*	<xmp>
+*		var c = new YAHOO.widget.CalendarGroup("calContainer", configOptions);
+*	</xmp>
+* or:
+*   <xmp>
+*       var containerDiv = YAHOO.util.Dom.get("calContainer");
+*		var c = new YAHOO.widget.CalendarGroup(containerDiv, configOptions);
+*	</xmp>
+* </p>
+* <p>
+* If not provided, the ID will be generated from the container DIV ID by adding an "_t" suffix.
+* For example if an ID is not provided, and the container's ID is "calContainer", the CalendarGroup's ID will be set to "calContainer_t".
+* </p>
+* 
+* @namespace YAHOO.widget
+* @class CalendarGroup
+* @constructor
+* @param {String} id optional The id of the table element that will represent the CalendarGroup widget. As of 2.4.0, this argument is optional.
+* @param {String | HTMLElement} container The id of the container div element that will wrap the CalendarGroup table, or a reference to a DIV element which exists in the document.
+* @param {Object} config optional The configuration object containing the initial configuration values for the CalendarGroup.
+*/
+YAHOO.widget.CalendarGroup = function(id, containerId, config) {
+	if (arguments.length > 0) {
+		this.init.apply(this, arguments);
+	}
+};
 
-	var firstClass = "first-of-type";
-	var lastClass = "last-of-type";
+YAHOO.widget.CalendarGroup.prototype = {
 
-	for (var p=0;p<pageCount;++p) {
-		var calId = this.id + sep + p;
-		var calContainerId = this.containerId + sep + p;
+	/**
+	* Initializes the calendar group. All subclasses must call this method in order for the
+	* group to be initialized properly.
+	* @method init
+	* @param {String} id optional The id of the table element that will represent the CalendarGroup widget. As of 2.4.0, this argument is optional.
+	* @param {String | HTMLElement} container The id of the container div element that will wrap the CalendarGroup table, or a reference to a DIV element which exists in the document.
+	* @param {Object} config optional The configuration object containing the initial configuration values for the CalendarGroup.
+	*/
+	init : function(id, container, config) {
 
-		var childConfig = this.cfg.getConfig();
-		childConfig.close = false;
-		childConfig.title = false;
+		// Normalize 2.4.0, pre 2.4.0 args
+		var nArgs = this._parseArgs(arguments);
 
-		var cal = this.constructChild(calId, calContainerId, childConfig);
-		var caldate = cal.cfg.getProperty(cfgPageDate);
-		this._setMonthOnDate(caldate, caldate.getMonth() + p);
-		cal.cfg.setProperty(cfgPageDate, caldate);
+		id = nArgs.id;
+		container = nArgs.container;
+		config = nArgs.config;
 
-		YAHOO.util.Dom.removeClass(cal.oDomContainer, this.Style.CSS_SINGLE);
-		YAHOO.util.Dom.addClass(cal.oDomContainer, groupCalClass);
+		this.oDomContainer = YAHOO.util.Dom.get(container);
+		if (!this.oDomContainer) { this.logger.log("Container not found in document.", "error"); }
 
-		if (p===0) {
-			YAHOO.util.Dom.addClass(cal.oDomContainer, firstClass);
+		if (!this.oDomContainer.id) {
+			this.oDomContainer.id = YAHOO.util.Dom.generateId();
 		}
-
-		if (p==(pageCount-1)) {
-			YAHOO.util.Dom.addClass(cal.oDomContainer, lastClass);
+		if (!id) {
+			id = this.oDomContainer.id + "_t";
 		}
 
-		cal.parent = this;
-		cal.index = p; 
+		/**
+		* The unique id associated with the CalendarGroup
+		* @property id
+		* @type String
+		*/
+		this.id = id;
 
-		this.pages[this.pages.length] = cal;
-	}
-};
+		/**
+		* The unique id associated with the CalendarGroup container
+		* @property containerId
+		* @type String
+		*/
+		this.containerId = this.oDomContainer.id;
 
-/**
-* The default Config handler for the "pagedate" property
-* @method configPageDate
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.CalendarGroup.prototype.configPageDate = function(type, args, obj) {
-	var val = args[0];
-	var firstPageDate;
-	
-	var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
-	
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		if (p === 0) {
-			firstPageDate = cal._parsePageDate(val);
-			cal.cfg.setProperty(cfgPageDate, firstPageDate);
-		} else {
-			var pageDate = new Date(firstPageDate);
-			this._setMonthOnDate(pageDate, pageDate.getMonth() + p);
-			cal.cfg.setProperty(cfgPageDate, pageDate);
-		}
-	}
-};
+		this.logger = new YAHOO.widget.LogWriter("CalendarGroup " + this.id);
+		this.initEvents();
+		this.initStyles();
 
-/**
-* The default Config handler for the CalendarGroup "selected" property
-* @method configSelected
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.CalendarGroup.prototype.configSelected = function(type, args, obj) {
-	var cfgSelected = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key;
-	this.delegateConfig(type, args, obj);
-	var selected = (this.pages.length > 0) ? this.pages[0].cfg.getProperty(cfgSelected) : []; 
-	this.cfg.setProperty(cfgSelected, selected, true);
-};
+		/**
+		* The collection of Calendar pages contained within the CalendarGroup
+		* @property pages
+		* @type YAHOO.widget.Calendar[]
+		*/
+		this.pages = [];
 
+		YAHOO.util.Dom.addClass(this.oDomContainer, YAHOO.widget.CalendarGroup.CSS_CONTAINER);
+		YAHOO.util.Dom.addClass(this.oDomContainer, YAHOO.widget.CalendarGroup.CSS_MULTI_UP);
 
-/**
-* Delegates a configuration property to the CustomEvents associated with the CalendarGroup's children
-* @method delegateConfig
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.CalendarGroup.prototype.delegateConfig = function(type, args, obj) {
-	var val = args[0];
-	var cal;
+		/**
+		* The Config object used to hold the configuration variables for the CalendarGroup
+		* @property cfg
+		* @type YAHOO.util.Config
+		*/
+		this.cfg = new YAHOO.util.Config(this);
 
-	for (var p=0;p<this.pages.length;p++) {
-		cal = this.pages[p];
-		cal.cfg.setProperty(type, val);
-	}
-};
+		/**
+		* The local object which contains the CalendarGroup's options
+		* @property Options
+		* @type Object
+		*/
+		this.Options = {};
 
+		/**
+		* The local object which contains the CalendarGroup's locale settings
+		* @property Locale
+		* @type Object
+		*/
+		this.Locale = {};
 
-/**
-* Adds a function to all child Calendars within this CalendarGroup.
-* @method setChildFunction
-* @param {String}		fnName		The name of the function
-* @param {Function}		fn			The function to apply to each Calendar page object
-*/
-YAHOO.widget.CalendarGroup.prototype.setChildFunction = function(fnName, fn) {
-	var pageCount = this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);
+		this.setupConfig();
 
-	for (var p=0;p<pageCount;++p) {
-		this.pages[p][fnName] = fn;
-	}
-};
+		if (config) {
+			this.cfg.applyConfig(config, true);
+		}
 
-/**
-* Calls a function within all child Calendars within this CalendarGroup.
-* @method callChildFunction
-* @param {String}		fnName		The name of the function
-* @param {Array}		args		The arguments to pass to the function
-*/
-YAHOO.widget.CalendarGroup.prototype.callChildFunction = function(fnName, args) {
-	var pageCount = this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);
+		this.cfg.fireQueue();
 
-	for (var p=0;p<pageCount;++p) {
-		var page = this.pages[p];
-		if (page[fnName]) {
-			var fn = page[fnName];
-			fn.call(page, args);
+		// OPERA HACK FOR MISWRAPPED FLOATS
+		if (YAHOO.env.ua.opera){
+			this.renderEvent.subscribe(this._fixWidth, this, true);
+			this.showEvent.subscribe(this._fixWidth, this, true);
 		}
-	}	
-};
 
-/**
-* Constructs a child calendar. This method can be overridden if a subclassed version of the default
-* calendar is to be used.
-* @method constructChild
-* @param {String}	id			The id of the table element that will represent the calendar widget
-* @param {String}	containerId	The id of the container div element that will wrap the calendar table
-* @param {Object}	config		The configuration object containing the Calendar's arguments
-* @return {YAHOO.widget.Calendar}	The YAHOO.widget.Calendar instance that is constructed
-*/
-YAHOO.widget.CalendarGroup.prototype.constructChild = function(id,containerId,config) {
-	var container = document.getElementById(containerId);
-	if (! container) {
-		container = document.createElement("div");
-		container.id = containerId;
-		this.oDomContainer.appendChild(container);
-	}
-	return new YAHOO.widget.Calendar(id,containerId,config);
-};
+		this.logger.log("Initialized " + this.pages.length + "-page CalendarGroup", "info");
+	},
 
+	setupConfig : function() {
 
-/**
-* Sets the calendar group's month explicitly. This month will be set into the first
-* page of the multi-page calendar, and all other months will be iterated appropriately.
-* @method setMonth
-* @param {Number}	month		The numeric month, from 0 (January) to 11 (December)
-*/
-YAHOO.widget.CalendarGroup.prototype.setMonth = function(month) {
-	month = parseInt(month, 10);
-	var currYear;
+		var defCfg = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG;
+
+		/**
+		* The number of pages to include in the CalendarGroup. This value can only be set once, in the CalendarGroup's constructor arguments.
+		* @config pages
+		* @type Number
+		* @default 2
+		*/
+		this.cfg.addProperty(defCfg.PAGES.key, { value:defCfg.PAGES.value, validator:this.cfg.checkNumber, handler:this.configPages } );
+
+		/**
+		* The month/year representing the current visible Calendar date (mm/yyyy)
+		* @config pagedate
+		* @type String
+		* @default today's date
+		*/
+		this.cfg.addProperty(defCfg.PAGEDATE.key, { value:new Date(), handler:this.configPageDate } );
+
+		/**
+		* The date or range of dates representing the current Calendar selection
+		* @config selected
+		* @type String
+		* @default []
+		*/
+		this.cfg.addProperty(defCfg.SELECTED.key, { value:[], handler:this.configSelected } );
+
+		/**
+		* The title to display above the CalendarGroup's month header
+		* @config title
+		* @type String
+		* @default ""
+		*/
+		this.cfg.addProperty(defCfg.TITLE.key, { value:defCfg.TITLE.value, handler:this.configTitle } );
+
+		/**
+		* Whether or not a close button should be displayed for this CalendarGroup
+		* @config close
+		* @type Boolean
+		* @default false
+		*/
+		this.cfg.addProperty(defCfg.CLOSE.key, { value:defCfg.CLOSE.value, handler:this.configClose } );
+
+		/**
+		* Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below.
+		* This property is enabled by default for IE6 and below. It is disabled by default for other browsers for performance reasons, but can be 
+		* enabled if required.
+		* 
+		* @config iframe
+		* @type Boolean
+		* @default true for IE6 and below, false for all other browsers
+		*/
+		this.cfg.addProperty(defCfg.IFRAME.key, { value:defCfg.IFRAME.value, handler:this.configIframe, validator:this.cfg.checkBoolean } );
 	
-	var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
+		/**
+		* The minimum selectable date in the current Calendar (mm/dd/yyyy)
+		* @config mindate
+		* @type String
+		* @default null
+		*/
+		this.cfg.addProperty(defCfg.MINDATE.key, { value:defCfg.MINDATE.value, handler:this.delegateConfig } );
 	
-	for (var p=0; p<this.pages.length; ++p) {
-		var cal = this.pages[p];
-		var pageDate = cal.cfg.getProperty(cfgPageDate);
-		if (p === 0) {
-			currYear = pageDate.getFullYear();
-		} else {
-			pageDate.setYear(currYear);
-		}
-		this._setMonthOnDate(pageDate, month+p); 
-		cal.cfg.setProperty(cfgPageDate, pageDate);
-	}
-};
+		/**
+		* The maximum selectable date in the current Calendar (mm/dd/yyyy)
+		* @config maxdate
+		* @type String
+		* @default null
+		*/	
+		this.cfg.addProperty(defCfg.MAXDATE.key, { value:defCfg.MAXDATE.value, handler:this.delegateConfig  } );
+	
+		// Options properties
+	
+		/**
+		* True if the Calendar should allow multiple selections. False by default.
+		* @config MULTI_SELECT
+		* @type Boolean
+		* @default false
+		*/
+		this.cfg.addProperty(defCfg.MULTI_SELECT.key,	{ value:defCfg.MULTI_SELECT.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	
+		/**
+		* The weekday the week begins on. Default is 0 (Sunday).
+		* @config START_WEEKDAY
+		* @type number
+		* @default 0
+		*/	
+		this.cfg.addProperty(defCfg.START_WEEKDAY.key,	{ value:defCfg.START_WEEKDAY.value, handler:this.delegateConfig, validator:this.cfg.checkNumber  } );
+		
+		/**
+		* True if the Calendar should show weekday labels. True by default.
+		* @config SHOW_WEEKDAYS
+		* @type Boolean
+		* @default true
+		*/	
+		this.cfg.addProperty(defCfg.SHOW_WEEKDAYS.key,	{ value:defCfg.SHOW_WEEKDAYS.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+		
+		/**
+		* True if the Calendar should show week row headers. False by default.
+		* @config SHOW_WEEK_HEADER
+		* @type Boolean
+		* @default false
+		*/	
+		this.cfg.addProperty(defCfg.SHOW_WEEK_HEADER.key,{ value:defCfg.SHOW_WEEK_HEADER.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+		
+		/**
+		* True if the Calendar should show week row footers. False by default.
+		* @config SHOW_WEEK_FOOTER
+		* @type Boolean
+		* @default false
+		*/
+		this.cfg.addProperty(defCfg.SHOW_WEEK_FOOTER.key,{ value:defCfg.SHOW_WEEK_FOOTER.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+		
+		/**
+		* True if the Calendar should suppress weeks that are not a part of the current month. False by default.
+		* @config HIDE_BLANK_WEEKS
+		* @type Boolean
+		* @default false
+		*/		
+		this.cfg.addProperty(defCfg.HIDE_BLANK_WEEKS.key,{ value:defCfg.HIDE_BLANK_WEEKS.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+		
+		/**
+		* The image that should be used for the left navigation arrow.
+		* @config NAV_ARROW_LEFT
+		* @type String
+		* @deprecated	You can customize the image by overriding the default CSS class for the left arrow - "calnavleft"
+		* @default null
+		*/		
+		this.cfg.addProperty(defCfg.NAV_ARROW_LEFT.key,	{ value:defCfg.NAV_ARROW_LEFT.value, handler:this.delegateConfig } );
+		
+		/**
+		* The image that should be used for the right navigation arrow.
+		* @config NAV_ARROW_RIGHT
+		* @type String
+		* @deprecated	You can customize the image by overriding the default CSS class for the right arrow - "calnavright"
+		* @default null
+		*/		
+		this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key,	{ value:defCfg.NAV_ARROW_RIGHT.value, handler:this.delegateConfig } );
+	
+		// Locale properties
+		
+		/**
+		* The short month labels for the current locale.
+		* @config MONTHS_SHORT
+		* @type String[]
+		* @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
+		*/
+		this.cfg.addProperty(defCfg.MONTHS_SHORT.key,	{ value:defCfg.MONTHS_SHORT.value, handler:this.delegateConfig } );
+		
+		/**
+		* The long month labels for the current locale.
+		* @config MONTHS_LONG
+		* @type String[]
+		* @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
+		*/		
+		this.cfg.addProperty(defCfg.MONTHS_LONG.key,		{ value:defCfg.MONTHS_LONG.value, handler:this.delegateConfig } );
+		
+		/**
+		* The 1-character weekday labels for the current locale.
+		* @config WEEKDAYS_1CHAR
+		* @type String[]
+		* @default ["S", "M", "T", "W", "T", "F", "S"]
+		*/		
+		this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key,	{ value:defCfg.WEEKDAYS_1CHAR.value, handler:this.delegateConfig } );
+		
+		/**
+		* The short weekday labels for the current locale.
+		* @config WEEKDAYS_SHORT
+		* @type String[]
+		* @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
+		*/		
+		this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key,	{ value:defCfg.WEEKDAYS_SHORT.value, handler:this.delegateConfig } );
+		
+		/**
+		* The medium weekday labels for the current locale.
+		* @config WEEKDAYS_MEDIUM
+		* @type String[]
+		* @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
+		*/		
+		this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key,	{ value:defCfg.WEEKDAYS_MEDIUM.value, handler:this.delegateConfig } );
+		
+		/**
+		* The long weekday labels for the current locale.
+		* @config WEEKDAYS_LONG
+		* @type String[]
+		* @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
+		*/		
+		this.cfg.addProperty(defCfg.WEEKDAYS_LONG.key,	{ value:defCfg.WEEKDAYS_LONG.value, handler:this.delegateConfig } );
+	
+		/**
+		* The setting that determines which length of month labels should be used. Possible values are "short" and "long".
+		* @config LOCALE_MONTHS
+		* @type String
+		* @default "long"
+		*/
+		this.cfg.addProperty(defCfg.LOCALE_MONTHS.key,	{ value:defCfg.LOCALE_MONTHS.value, handler:this.delegateConfig } );
+	
+		/**
+		* The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long".
+		* @config LOCALE_WEEKDAYS
+		* @type String
+		* @default "short"
+		*/	
+		this.cfg.addProperty(defCfg.LOCALE_WEEKDAYS.key,	{ value:defCfg.LOCALE_WEEKDAYS.value, handler:this.delegateConfig } );
+	
+		/**
+		* The value used to delimit individual dates in a date string passed to various Calendar functions.
+		* @config DATE_DELIMITER
+		* @type String
+		* @default ","
+		*/
+		this.cfg.addProperty(defCfg.DATE_DELIMITER.key,		{ value:defCfg.DATE_DELIMITER.value, handler:this.delegateConfig } );
+	
+		/**
+		* The value used to delimit date fields in a date string passed to various Calendar functions.
+		* @config DATE_FIELD_DELIMITER
+		* @type String
+		* @default "/"
+		*/	
+		this.cfg.addProperty(defCfg.DATE_FIELD_DELIMITER.key,{ value:defCfg.DATE_FIELD_DELIMITER.value, handler:this.delegateConfig } );
+	
+		/**
+		* The value used to delimit date ranges in a date string passed to various Calendar functions.
+		* @config DATE_RANGE_DELIMITER
+		* @type String
+		* @default "-"
+		*/
+		this.cfg.addProperty(defCfg.DATE_RANGE_DELIMITER.key,{ value:defCfg.DATE_RANGE_DELIMITER.value, handler:this.delegateConfig } );
+	
+		/**
+		* The position of the month in a month/year date string
+		* @config MY_MONTH_POSITION
+		* @type Number
+		* @default 1
+		*/
+		this.cfg.addProperty(defCfg.MY_MONTH_POSITION.key,	{ value:defCfg.MY_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+		
+		/**
+		* The position of the year in a month/year date string
+		* @config MY_YEAR_POSITION
+		* @type Number
+		* @default 2
+		*/	
+		this.cfg.addProperty(defCfg.MY_YEAR_POSITION.key,	{ value:defCfg.MY_YEAR_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+		
+		/**
+		* The position of the month in a month/day date string
+		* @config MD_MONTH_POSITION
+		* @type Number
+		* @default 1
+		*/	
+		this.cfg.addProperty(defCfg.MD_MONTH_POSITION.key,	{ value:defCfg.MD_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+		
+		/**
+		* The position of the day in a month/year date string
+		* @config MD_DAY_POSITION
+		* @type Number
+		* @default 2
+		*/	
+		this.cfg.addProperty(defCfg.MD_DAY_POSITION.key,		{ value:defCfg.MD_DAY_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+		
+		/**
+		* The position of the month in a month/day/year date string
+		* @config MDY_MONTH_POSITION
+		* @type Number
+		* @default 1
+		*/	
+		this.cfg.addProperty(defCfg.MDY_MONTH_POSITION.key,	{ value:defCfg.MDY_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+		
+		/**
+		* The position of the day in a month/day/year date string
+		* @config MDY_DAY_POSITION
+		* @type Number
+		* @default 2
+		*/	
+		this.cfg.addProperty(defCfg.MDY_DAY_POSITION.key,	{ value:defCfg.MDY_DAY_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+		
+		/**
+		* The position of the year in a month/day/year date string
+		* @config MDY_YEAR_POSITION
+		* @type Number
+		* @default 3
+		*/	
+		this.cfg.addProperty(defCfg.MDY_YEAR_POSITION.key,	{ value:defCfg.MDY_YEAR_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	
+		/**
+		* The position of the month in the month year label string used as the Calendar header
+		* @config MY_LABEL_MONTH_POSITION
+		* @type Number
+		* @default 1
+		*/
+		this.cfg.addProperty(defCfg.MY_LABEL_MONTH_POSITION.key,	{ value:defCfg.MY_LABEL_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	
+		/**
+		* The position of the year in the month year label string used as the Calendar header
+		* @config MY_LABEL_YEAR_POSITION
+		* @type Number
+		* @default 2
+		*/
+		this.cfg.addProperty(defCfg.MY_LABEL_YEAR_POSITION.key,	{ value:defCfg.MY_LABEL_YEAR_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+		
+		/**
+		* The suffix used after the month when rendering the Calendar header
+		* @config MY_LABEL_MONTH_SUFFIX
+		* @type String
+		* @default " "
+		*/
+		this.cfg.addProperty(defCfg.MY_LABEL_MONTH_SUFFIX.key,	{ value:defCfg.MY_LABEL_MONTH_SUFFIX.value, handler:this.delegateConfig } );
+		
+		/**
+		* The suffix used after the year when rendering the Calendar header
+		* @config MY_LABEL_YEAR_SUFFIX
+		* @type String
+		* @default ""
+		*/
+		this.cfg.addProperty(defCfg.MY_LABEL_YEAR_SUFFIX.key, { value:defCfg.MY_LABEL_YEAR_SUFFIX.value, handler:this.delegateConfig } );
 
-/**
-* Sets the calendar group's year explicitly. This year will be set into the first
-* page of the multi-page calendar, and all other months will be iterated appropriately.
-* @method setYear
-* @param {Number}	year		The numeric 4-digit year
-*/
-YAHOO.widget.CalendarGroup.prototype.setYear = function(year) {
+		/**
+		* Configuration for the Month Year Navigation UI. By default it is disabled
+		* @config NAV
+		* @type Object
+		* @default null
+		*/
+		this.cfg.addProperty(defCfg.NAV.key, { value:defCfg.NAV.value, handler:this.configNavigator } );
+	},
 
-	var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
+	/**
+	* Initializes CalendarGroup's built-in CustomEvents
+	* @method initEvents
+	*/
+	initEvents : function() {
+		var me = this;
+		var strEvent = "Event";
 
-	year = parseInt(year, 10);
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		var pageDate = cal.cfg.getProperty(cfgPageDate);
+		/**
+		* Proxy subscriber to subscribe to the CalendarGroup's child Calendars' CustomEvents
+		* @method sub
+		* @private
+		* @param {Function} fn	The function to subscribe to this CustomEvent
+		* @param {Object}	obj	The CustomEvent's scope object
+		* @param {Boolean}	bOverride	Whether or not to apply scope correction
+		*/
+		var sub = function(fn, obj, bOverride) {
+			for (var p=0;p<me.pages.length;++p) {
+				var cal = me.pages[p];
+				cal[this.type + strEvent].subscribe(fn, obj, bOverride);
+			}
+		};
 
-		if ((pageDate.getMonth()+1) == 1 && p>0) {
-			year+=1;
-		}
-		cal.setYear(year);
-	}
-};
-/**
-* Calls the render function of all child calendars within the group.
-* @method render
-*/
-YAHOO.widget.CalendarGroup.prototype.render = function() {
-	this.renderHeader();
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.render();
-	}
-	this.renderFooter();
-};
+		/**
+		* Proxy unsubscriber to unsubscribe from the CalendarGroup's child Calendars' CustomEvents
+		* @method unsub
+		* @private
+		* @param {Function} fn	The function to subscribe to this CustomEvent
+		* @param {Object}	obj	The CustomEvent's scope object
+		*/
+		var unsub = function(fn, obj) {
+			for (var p=0;p<me.pages.length;++p) {
+				var cal = me.pages[p];
+				cal[this.type + strEvent].unsubscribe(fn, obj);
+			}
+		};
+		
+		var defEvents = YAHOO.widget.Calendar._EVENT_TYPES;
+	
+		/**
+		* Fired before a selection is made
+		* @event beforeSelectEvent
+		*/
+		this.beforeSelectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SELECT);
+		this.beforeSelectEvent.subscribe = sub; this.beforeSelectEvent.unsubscribe = unsub;
+	
+		/**
+		* Fired when a selection is made
+		* @event selectEvent
+		* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
+		*/
+		this.selectEvent = new YAHOO.util.CustomEvent(defEvents.SELECT); 
+		this.selectEvent.subscribe = sub; this.selectEvent.unsubscribe = unsub;
+	
+		/**
+		* Fired before a selection is made
+		* @event beforeDeselectEvent
+		*/
+		this.beforeDeselectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_DESELECT); 
+		this.beforeDeselectEvent.subscribe = sub; this.beforeDeselectEvent.unsubscribe = unsub;
+	
+		/**
+		* Fired when a selection is made
+		* @event deselectEvent
+		* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
+		*/
+		this.deselectEvent = new YAHOO.util.CustomEvent(defEvents.DESELECT); 
+		this.deselectEvent.subscribe = sub; this.deselectEvent.unsubscribe = unsub;
+		
+		/**
+		* Fired when the Calendar page is changed
+		* @event changePageEvent
+		*/
+		this.changePageEvent = new YAHOO.util.CustomEvent(defEvents.CHANGE_PAGE); 
+		this.changePageEvent.subscribe = sub; this.changePageEvent.unsubscribe = unsub;
+	
+		/**
+		* Fired before the Calendar is rendered
+		* @event beforeRenderEvent
+		*/
+		this.beforeRenderEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER);
+		this.beforeRenderEvent.subscribe = sub; this.beforeRenderEvent.unsubscribe = unsub;
+	
+		/**
+		* Fired when the Calendar is rendered
+		* @event renderEvent
+		*/
+		this.renderEvent = new YAHOO.util.CustomEvent(defEvents.RENDER);
+		this.renderEvent.subscribe = sub; this.renderEvent.unsubscribe = unsub;
+	
+		/**
+		* Fired when the Calendar is reset
+		* @event resetEvent
+		*/
+		this.resetEvent = new YAHOO.util.CustomEvent(defEvents.RESET); 
+		this.resetEvent.subscribe = sub; this.resetEvent.unsubscribe = unsub;
+	
+		/**
+		* Fired when the Calendar is cleared
+		* @event clearEvent
+		*/
+		this.clearEvent = new YAHOO.util.CustomEvent(defEvents.CLEAR);
+		this.clearEvent.subscribe = sub; this.clearEvent.unsubscribe = unsub;
+	
+		/**
+		* Fired just before the CalendarGroup is to be shown
+		* @event beforeShowEvent
+		*/
+		this.beforeShowEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SHOW);
+	
+		/**
+		* Fired after the CalendarGroup is shown
+		* @event showEvent
+		*/
+		this.showEvent = new YAHOO.util.CustomEvent(defEvents.SHOW);
+	
+		/**
+		* Fired just before the CalendarGroup is to be hidden
+		* @event beforeHideEvent
+		*/
+		this.beforeHideEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_HIDE);
+	
+		/**
+		* Fired after the CalendarGroup is hidden
+		* @event hideEvent
+		*/
+		this.hideEvent = new YAHOO.util.CustomEvent(defEvents.HIDE);
 
-/**
-* Selects a date or a collection of dates on the current calendar. This method, by default,
-* does not call the render method explicitly. Once selection has completed, render must be 
-* called for the changes to be reflected visually.
-* @method select
-* @param	{String/Date/Date[]}	date	The date string of dates to select in the current calendar. Valid formats are
-*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
-*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
-*								This method can also take a JavaScript Date object or an array of Date objects.
-* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.CalendarGroup.prototype.select = function(date) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.select(date);
-	}
-	return this.getSelectedDates();
-};
+		/**
+		* Fired just before the CalendarNavigator is to be shown
+		* @event beforeShowNavEvent
+		*/
+		this.beforeShowNavEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SHOW_NAV);
+	
+		/**
+		* Fired after the CalendarNavigator is shown
+		* @event showNavEvent
+		*/
+		this.showNavEvent = new YAHOO.util.CustomEvent(defEvents.SHOW_NAV);
+	
+		/**
+		* Fired just before the CalendarNavigator is to be hidden
+		* @event beforeHideNavEvent
+		*/
+		this.beforeHideNavEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_HIDE_NAV);
+	
+		/**
+		* Fired after the CalendarNavigator is hidden
+		* @event hideNavEvent
+		*/
+		this.hideNavEvent = new YAHOO.util.CustomEvent(defEvents.HIDE_NAV);
 
-/**
-* Selects dates in the CalendarGroup based on the cell index provided. This method is used to select cells without having to do a full render. The selected style is applied to the cells directly.
-* The value of the MULTI_SELECT Configuration attribute will determine the set of dates which get selected. 
-* <ul>
-*    <li>If MULTI_SELECT is false, selectCell will select the cell at the specified index for only the last displayed Calendar page.</li>
-*    <li>If MULTI_SELECT is true, selectCell will select the cell at the specified index, on each displayed Calendar page.</li>
-* </ul>
-* @method selectCell
-* @param	{Number}	cellIndex	The index of the cell to be selected. 
-* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.CalendarGroup.prototype.selectCell = function(cellIndex) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.selectCell(cellIndex);
-	}
-	return this.getSelectedDates();
-};
+		/**
+		* Fired just before the CalendarNavigator is to be rendered
+		* @event beforeRenderNavEvent
+		*/
+		this.beforeRenderNavEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER_NAV);
 
-/**
-* Deselects a date or a collection of dates on the current calendar. This method, by default,
-* does not call the render method explicitly. Once deselection has completed, render must be 
-* called for the changes to be reflected visually.
-* @method deselect
-* @param	{String/Date/Date[]}	date	The date string of dates to deselect in the current calendar. Valid formats are
-*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
-*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
-*								This method can also take a JavaScript Date object or an array of Date objects.	
-* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.CalendarGroup.prototype.deselect = function(date) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.deselect(date);
-	}
-	return this.getSelectedDates();
-};
+		/**
+		* Fired after the CalendarNavigator is rendered
+		* @event renderNavEvent
+		*/
+		this.renderNavEvent = new YAHOO.util.CustomEvent(defEvents.RENDER_NAV);
+	},
+	
+	/**
+	* The default Config handler for the "pages" property
+	* @method configPages
+	* @param {String} type	The CustomEvent type (usually the property name)
+	* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+	* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+	*/
+	configPages : function(type, args, obj) {
+		var pageCount = args[0];
+	
+		var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
+	
+		// Define literals outside loop	
+		var sep = "_";
+		var groupCalClass = "groupcal";
+	
+		var firstClass = "first-of-type";
+		var lastClass = "last-of-type";
+	
+		for (var p=0;p<pageCount;++p) {
+			var calId = this.id + sep + p;
+			var calContainerId = this.containerId + sep + p;
+	
+			var childConfig = this.cfg.getConfig();
+			childConfig.close = false;
+			childConfig.title = false;
+			childConfig.navigator = null;
 
-/**
-* Deselects all dates on the current calendar.
-* @method deselectAll
-* @return {Date[]}		Array of JavaScript Date objects representing all individual dates that are currently selected.
-*						Assuming that this function executes properly, the return value should be an empty array.
-*						However, the empty array is returned for the sake of being able to check the selection status
-*						of the calendar.
-*/
-YAHOO.widget.CalendarGroup.prototype.deselectAll = function() {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.deselectAll();
-	}
-	return this.getSelectedDates();
-};
+			var cal = this.constructChild(calId, calContainerId, childConfig);
+			var caldate = cal.cfg.getProperty(cfgPageDate);
+			this._setMonthOnDate(caldate, caldate.getMonth() + p);
+			cal.cfg.setProperty(cfgPageDate, caldate);
+	
+			YAHOO.util.Dom.removeClass(cal.oDomContainer, this.Style.CSS_SINGLE);
+			YAHOO.util.Dom.addClass(cal.oDomContainer, groupCalClass);
 
-/**
-* Deselects dates in the CalendarGroup based on the cell index provided. This method is used to select cells without having to do a full render. The selected style is applied to the cells directly.
-* deselectCell will deselect the cell at the specified index on each displayed Calendar page.
-*
-* @method deselectCell
-* @param	{Number}	cellIndex	The index of the cell to deselect. 
-* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.CalendarGroup.prototype.deselectCell = function(cellIndex) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.deselectCell(cellIndex);
-	}
-	return this.getSelectedDates();
-};
+			if (p===0) {
+				YAHOO.util.Dom.addClass(cal.oDomContainer, firstClass);
+			}
+	
+			if (p==(pageCount-1)) {
+				YAHOO.util.Dom.addClass(cal.oDomContainer, lastClass);
+			}
+	
+			cal.parent = this;
+			cal.index = p; 
+	
+			this.pages[this.pages.length] = cal;
+		}
+	},
+	
+	/**
+	* The default Config handler for the "pagedate" property
+	* @method configPageDate
+	* @param {String} type	The CustomEvent type (usually the property name)
+	* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+	* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+	*/
+	configPageDate : function(type, args, obj) {
+		var val = args[0];
+		var firstPageDate;
+		
+		var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
+		
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			if (p === 0) {
+				firstPageDate = cal._parsePageDate(val);
+				cal.cfg.setProperty(cfgPageDate, firstPageDate);
+			} else {
+				var pageDate = new Date(firstPageDate);
+				this._setMonthOnDate(pageDate, pageDate.getMonth() + p);
+				cal.cfg.setProperty(cfgPageDate, pageDate);
+			}
+		}
+	},
+	
+	/**
+	* The default Config handler for the CalendarGroup "selected" property
+	* @method configSelected
+	* @param {String} type	The CustomEvent type (usually the property name)
+	* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+	* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+	*/
+	configSelected : function(type, args, obj) {
+		var cfgSelected = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key;
+		this.delegateConfig(type, args, obj);
+		var selected = (this.pages.length > 0) ? this.pages[0].cfg.getProperty(cfgSelected) : []; 
+		this.cfg.setProperty(cfgSelected, selected, true);
+	},
 
-/**
-* Resets the calendar widget to the originally selected month and year, and 
-* sets the calendar to the initial selection(s).
-* @method reset
-*/
-YAHOO.widget.CalendarGroup.prototype.reset = function() {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.reset();
-	}
-};
+	
+	/**
+	* Delegates a configuration property to the CustomEvents associated with the CalendarGroup's children
+	* @method delegateConfig
+	* @param {String} type	The CustomEvent type (usually the property name)
+	* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+	* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+	*/
+	delegateConfig : function(type, args, obj) {
+		var val = args[0];
+		var cal;
+	
+		for (var p=0;p<this.pages.length;p++) {
+			cal = this.pages[p];
+			cal.cfg.setProperty(type, val);
+		}
+	},
 
-/**
-* Clears the selected dates in the current calendar widget and sets the calendar
-* to the current month and year.
-* @method clear
-*/
-YAHOO.widget.CalendarGroup.prototype.clear = function() {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.clear();
-	}
-};
+	/**
+	* Adds a function to all child Calendars within this CalendarGroup.
+	* @method setChildFunction
+	* @param {String}		fnName		The name of the function
+	* @param {Function}		fn			The function to apply to each Calendar page object
+	*/
+	setChildFunction : function(fnName, fn) {
+		var pageCount = this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);
+	
+		for (var p=0;p<pageCount;++p) {
+			this.pages[p][fnName] = fn;
+		}
+	},
 
-/**
-* Navigates to the next month page in the calendar widget.
-* @method nextMonth
-*/
-YAHOO.widget.CalendarGroup.prototype.nextMonth = function() {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.nextMonth();
-	}
-};
+	/**
+	* Calls a function within all child Calendars within this CalendarGroup.
+	* @method callChildFunction
+	* @param {String}		fnName		The name of the function
+	* @param {Array}		args		The arguments to pass to the function
+	*/
+	callChildFunction : function(fnName, args) {
+		var pageCount = this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);
+	
+		for (var p=0;p<pageCount;++p) {
+			var page = this.pages[p];
+			if (page[fnName]) {
+				var fn = page[fnName];
+				fn.call(page, args);
+			}
+		}	
+	},
 
-/**
-* Navigates to the previous month page in the calendar widget.
-* @method previousMonth
-*/
-YAHOO.widget.CalendarGroup.prototype.previousMonth = function() {
-	for (var p=this.pages.length-1;p>=0;--p) {
-		var cal = this.pages[p];
-		cal.previousMonth();
-	}
-};
+	/**
+	* Constructs a child calendar. This method can be overridden if a subclassed version of the default
+	* calendar is to be used.
+	* @method constructChild
+	* @param {String}	id			The id of the table element that will represent the calendar widget
+	* @param {String}	containerId	The id of the container div element that will wrap the calendar table
+	* @param {Object}	config		The configuration object containing the Calendar's arguments
+	* @return {YAHOO.widget.Calendar}	The YAHOO.widget.Calendar instance that is constructed
+	*/
+	constructChild : function(id,containerId,config) {
+		var container = document.getElementById(containerId);
+		if (! container) {
+			container = document.createElement("div");
+			container.id = containerId;
+			this.oDomContainer.appendChild(container);
+		}
+		return new YAHOO.widget.Calendar(id,containerId,config);
+	},
+	
+	/**
+	* Sets the calendar group's month explicitly. This month will be set into the first
+	* page of the multi-page calendar, and all other months will be iterated appropriately.
+	* @method setMonth
+	* @param {Number}	month		The numeric month, from 0 (January) to 11 (December)
+	*/
+	setMonth : function(month) {
+		month = parseInt(month, 10);
+		var currYear;
 
-/**
-* Navigates to the next year in the currently selected month in the calendar widget.
-* @method nextYear
-*/
-YAHOO.widget.CalendarGroup.prototype.nextYear = function() {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.nextYear();
-	}
-};
+		var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
 
-/**
-* Navigates to the previous year in the currently selected month in the calendar widget.
-* @method previousYear
-*/
-YAHOO.widget.CalendarGroup.prototype.previousYear = function() {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.previousYear();
-	}
-};
+		for (var p=0; p<this.pages.length; ++p) {
+			var cal = this.pages[p];
+			var pageDate = cal.cfg.getProperty(cfgPageDate);
+			if (p === 0) {
+				currYear = pageDate.getFullYear();
+			} else {
+				pageDate.setFullYear(currYear);
+			}
+			this._setMonthOnDate(pageDate, month+p); 
+			cal.cfg.setProperty(cfgPageDate, pageDate);
+		}
+	},
 
+	/**
+	* Sets the calendar group's year explicitly. This year will be set into the first
+	* page of the multi-page calendar, and all other months will be iterated appropriately.
+	* @method setYear
+	* @param {Number}	year		The numeric 4-digit year
+	*/
+	setYear : function(year) {
+	
+		var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
+	
+		year = parseInt(year, 10);
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			var pageDate = cal.cfg.getProperty(cfgPageDate);
+	
+			if ((pageDate.getMonth()+1) == 1 && p>0) {
+				year+=1;
+			}
+			cal.setYear(year);
+		}
+	},
 
-/**
-* Gets the list of currently selected dates from the calendar.
-* @return			An array of currently selected JavaScript Date objects.
-* @type Date[]
-*/
-YAHOO.widget.CalendarGroup.prototype.getSelectedDates = function() { 
-	var returnDates = [];
-	var selected = this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key);
-	for (var d=0;d<selected.length;++d) {
-		var dateArray = selected[d];
+	/**
+	* Calls the render function of all child calendars within the group.
+	* @method render
+	*/
+	render : function() {
+		this.renderHeader();
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.render();
+		}
+		this.renderFooter();
+	},
 
-		var date = new Date(dateArray[0],dateArray[1]-1,dateArray[2]);
-		returnDates.push(date);
-	}
+	/**
+	* Selects a date or a collection of dates on the current calendar. This method, by default,
+	* does not call the render method explicitly. Once selection has completed, render must be 
+	* called for the changes to be reflected visually.
+	* @method select
+	* @param	{String/Date/Date[]}	date	The date string of dates to select in the current calendar. Valid formats are
+	*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
+	*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
+	*								This method can also take a JavaScript Date object or an array of Date objects.
+	* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*/
+	select : function(date) {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.select(date);
+		}
+		return this.getSelectedDates();
+	},
 
-	returnDates.sort( function(a,b) { return a-b; } );
-	return returnDates;
-};
+	/**
+	* Selects dates in the CalendarGroup based on the cell index provided. This method is used to select cells without having to do a full render. The selected style is applied to the cells directly.
+	* The value of the MULTI_SELECT Configuration attribute will determine the set of dates which get selected. 
+	* <ul>
+	*    <li>If MULTI_SELECT is false, selectCell will select the cell at the specified index for only the last displayed Calendar page.</li>
+	*    <li>If MULTI_SELECT is true, selectCell will select the cell at the specified index, on each displayed Calendar page.</li>
+	* </ul>
+	* @method selectCell
+	* @param	{Number}	cellIndex	The index of the cell to be selected. 
+	* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*/
+	selectCell : function(cellIndex) {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.selectCell(cellIndex);
+		}
+		return this.getSelectedDates();
+	},
+	
+	/**
+	* Deselects a date or a collection of dates on the current calendar. This method, by default,
+	* does not call the render method explicitly. Once deselection has completed, render must be 
+	* called for the changes to be reflected visually.
+	* @method deselect
+	* @param	{String/Date/Date[]}	date	The date string of dates to deselect in the current calendar. Valid formats are
+	*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
+	*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
+	*								This method can also take a JavaScript Date object or an array of Date objects.	
+	* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*/
+	deselect : function(date) {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.deselect(date);
+		}
+		return this.getSelectedDates();
+	},
+	
+	/**
+	* Deselects all dates on the current calendar.
+	* @method deselectAll
+	* @return {Date[]}		Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*						Assuming that this function executes properly, the return value should be an empty array.
+	*						However, the empty array is returned for the sake of being able to check the selection status
+	*						of the calendar.
+	*/
+	deselectAll : function() {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.deselectAll();
+		}
+		return this.getSelectedDates();
+	},
+	
+	/**
+	* Deselects dates in the CalendarGroup based on the cell index provided. This method is used to select cells without having to do a full render. The selected style is applied to the cells directly.
+	* deselectCell will deselect the cell at the specified index on each displayed Calendar page.
+	*
+	* @method deselectCell
+	* @param	{Number}	cellIndex	The index of the cell to deselect. 
+	* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*/
+	deselectCell : function(cellIndex) {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.deselectCell(cellIndex);
+		}
+		return this.getSelectedDates();
+	},
+	
+	/**
+	* Resets the calendar widget to the originally selected month and year, and 
+	* sets the calendar to the initial selection(s).
+	* @method reset
+	*/
+	reset : function() {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.reset();
+		}
+	},
+	
+	/**
+	* Clears the selected dates in the current calendar widget and sets the calendar
+	* to the current month and year.
+	* @method clear
+	*/
+	clear : function() {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.clear();
+		}
+	},
+	
+	/**
+	* Navigates to the next month page in the calendar widget.
+	* @method nextMonth
+	*/
+	nextMonth : function() {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.nextMonth();
+		}
+	},
+	
+	/**
+	* Navigates to the previous month page in the calendar widget.
+	* @method previousMonth
+	*/
+	previousMonth : function() {
+		for (var p=this.pages.length-1;p>=0;--p) {
+			var cal = this.pages[p];
+			cal.previousMonth();
+		}
+	},
+	
+	/**
+	* Navigates to the next year in the currently selected month in the calendar widget.
+	* @method nextYear
+	*/
+	nextYear : function() {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.nextYear();
+		}
+	},
 
-/**
-* Adds a renderer to the render stack. The function reference passed to this method will be executed
-* when a date cell matches the conditions specified in the date string for this renderer.
-* @method addRenderer
-* @param	{String}	sDates		A date string to associate with the specified renderer. Valid formats
-*									include date (12/24/2005), month/day (12/24), and range (12/1/2004-1/1/2005)
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.CalendarGroup.prototype.addRenderer = function(sDates, fnRender) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.addRenderer(sDates, fnRender);
-	}
-};
+	/**
+	* Navigates to the previous year in the currently selected month in the calendar widget.
+	* @method previousYear
+	*/
+	previousYear : function() {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.previousYear();
+		}
+	},
 
-/**
-* Adds a month to the render stack. The function reference passed to this method will be executed
-* when a date cell matches the month passed to this method.
-* @method addMonthRenderer
-* @param	{Number}	month		The month (1-12) to associate with this renderer
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.CalendarGroup.prototype.addMonthRenderer = function(month, fnRender) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.addMonthRenderer(month, fnRender);
-	}
-};
+	/**
+	* Gets the list of currently selected dates from the calendar.
+	* @return			An array of currently selected JavaScript Date objects.
+	* @type Date[]
+	*/
+	getSelectedDates : function() { 
+		var returnDates = [];
+		var selected = this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key);
+		for (var d=0;d<selected.length;++d) {
+			var dateArray = selected[d];
 
-/**
-* Adds a weekday to the render stack. The function reference passed to this method will be executed
-* when a date cell matches the weekday passed to this method.
-* @method addWeekdayRenderer
-* @param	{Number}	weekday		The weekday (1-7) to associate with this renderer. 1=Sunday, 2=Monday etc.
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.CalendarGroup.prototype.addWeekdayRenderer = function(weekday, fnRender) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.addWeekdayRenderer(weekday, fnRender);
-	}
-};
+			var date = YAHOO.widget.DateMath.getDate(dateArray[0],dateArray[1]-1,dateArray[2]);
+			returnDates.push(date);
+		}
 
-/**
-* Renders the header for the CalendarGroup.
-* @method renderHeader
-*/
-YAHOO.widget.CalendarGroup.prototype.renderHeader = function() {};
+		returnDates.sort( function(a,b) { return a-b; } );
+		return returnDates;
+	},
 
-/**
-* Renders a footer for the 2-up calendar container. By default, this method is
-* unimplemented.
-* @method renderFooter
-*/
-YAHOO.widget.CalendarGroup.prototype.renderFooter = function() {};
+	/**
+	* Adds a renderer to the render stack. The function reference passed to this method will be executed
+	* when a date cell matches the conditions specified in the date string for this renderer.
+	* @method addRenderer
+	* @param	{String}	sDates		A date string to associate with the specified renderer. Valid formats
+	*									include date (12/24/2005), month/day (12/24), and range (12/1/2004-1/1/2005)
+	* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
+	*/
+	addRenderer : function(sDates, fnRender) {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.addRenderer(sDates, fnRender);
+		}
+	},
 
-/**
-* Adds the designated number of months to the current calendar month, and sets the current
-* calendar page date to the new month.
-* @method addMonths
-* @param {Number}	count	The number of months to add to the current calendar
-*/
-YAHOO.widget.CalendarGroup.prototype.addMonths = function(count) {
-	this.callChildFunction("addMonths", count);
-};
+	/**
+	* Adds a month to the render stack. The function reference passed to this method will be executed
+	* when a date cell matches the month passed to this method.
+	* @method addMonthRenderer
+	* @param	{Number}	month		The month (1-12) to associate with this renderer
+	* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
+	*/
+	addMonthRenderer : function(month, fnRender) {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.addMonthRenderer(month, fnRender);
+		}
+	},
 
+	/**
+	* Adds a weekday to the render stack. The function reference passed to this method will be executed
+	* when a date cell matches the weekday passed to this method.
+	* @method addWeekdayRenderer
+	* @param	{Number}	weekday		The weekday (1-7) to associate with this renderer. 1=Sunday, 2=Monday etc.
+	* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
+	*/
+	addWeekdayRenderer : function(weekday, fnRender) {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.addWeekdayRenderer(weekday, fnRender);
+		}
+	},
 
-/**
-* Subtracts the designated number of months from the current calendar month, and sets the current
-* calendar page date to the new month.
-* @method subtractMonths
-* @param {Number}	count	The number of months to subtract from the current calendar
-*/
-YAHOO.widget.CalendarGroup.prototype.subtractMonths = function(count) {
-	this.callChildFunction("subtractMonths", count);
-};
+	/**
+	 * Removes all custom renderers added to the CalendarGroup through the addRenderer, addMonthRenderer and 
+	 * addWeekRenderer methods. CalendarGroup's render method needs to be called to after removing renderers 
+	 * to see the changes applied.
+	 * 
+	 * @method removeRenderers
+	 */
+	removeRenderers : function() {
+		this.callChildFunction("removeRenderers");
+	},
 
-/**
-* Adds the designated number of years to the current calendar, and sets the current
-* calendar page date to the new month.
-* @method addYears
-* @param {Number}	count	The number of years to add to the current calendar
-*/
-YAHOO.widget.CalendarGroup.prototype.addYears = function(count) {
-	this.callChildFunction("addYears", count);
-};
+	/**
+	* Renders the header for the CalendarGroup.
+	* @method renderHeader
+	*/
+	renderHeader : function() {
+		// EMPTY DEFAULT IMPL
+	},
 
-/**
-* Subtcats the designated number of years from the current calendar, and sets the current
-* calendar page date to the new month.
-* @method subtractYears
-* @param {Number}	count	The number of years to subtract from the current calendar
-*/
-YAHOO.widget.CalendarGroup.prototype.subtractYears = function(count) {
-	this.callChildFunction("subtractYears", count);
-};
+	/**
+	* Renders a footer for the 2-up calendar container. By default, this method is
+	* unimplemented.
+	* @method renderFooter
+	*/
+	renderFooter : function() {
+		// EMPTY DEFAULT IMPL
+	},
 
-/**
-* Shows the CalendarGroup's outer container.
-* @method show
-*/
-YAHOO.widget.CalendarGroup.prototype.show = function() {
-	this.oDomContainer.style.display = "block";
-	if (YAHOO.env.ua.opera) {
-		this._fixWidth();
-	}
-};
+	/**
+	* Adds the designated number of months to the current calendar month, and sets the current
+	* calendar page date to the new month.
+	* @method addMonths
+	* @param {Number}	count	The number of months to add to the current calendar
+	*/
+	addMonths : function(count) {
+		this.callChildFunction("addMonths", count);
+	},
+	
+	/**
+	* Subtracts the designated number of months from the current calendar month, and sets the current
+	* calendar page date to the new month.
+	* @method subtractMonths
+	* @param {Number}	count	The number of months to subtract from the current calendar
+	*/
+	subtractMonths : function(count) {
+		this.callChildFunction("subtractMonths", count);
+	},
 
-/**
-* Sets the month on a Date object, taking into account year rollover if the month is less than 0 or greater than 11.
-* The Date object passed in is modified. It should be cloned before passing it into this method if the original value needs to be maintained
-* @method	_setMonthOnDate
-* @private
-* @param	{Date}	date	The Date object on which to set the month index
-* @param	{Number}	iMonth	The month index to set
-*/
-YAHOO.widget.CalendarGroup.prototype._setMonthOnDate = function(date, iMonth) {
-	// Bug in Safari 1.3, 2.0 (WebKit build < 420), Date.setMonth does not work consistently if iMonth is not 0-11
-	if (YAHOO.env.ua.webkit && YAHOO.env.ua.webkit < 420 && (iMonth < 0 || iMonth > 11)) {
-		var DM = YAHOO.widget.DateMath;
-		var newDate = DM.add(date, DM.MONTH, iMonth-date.getMonth());
-		date.setTime(newDate.getTime());
-	} else {
-		date.setMonth(iMonth);
-	}
-};
+	/**
+	* Adds the designated number of years to the current calendar, and sets the current
+	* calendar page date to the new month.
+	* @method addYears
+	* @param {Number}	count	The number of years to add to the current calendar
+	*/
+	addYears : function(count) {
+		this.callChildFunction("addYears", count);
+	},
 
-/**
- * Fixes the width of the CalendarGroup container element, to account for miswrapped floats
- * @method _fixWidth
- * @private
- */
-YAHOO.widget.CalendarGroup.prototype._fixWidth = function() {
-	var startW = this.oDomContainer.offsetWidth;
-	var w = 0;
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		w += cal.oDomContainer.offsetWidth;
+	/**
+	* Subtcats the designated number of years from the current calendar, and sets the current
+	* calendar page date to the new month.
+	* @method subtractYears
+	* @param {Number}	count	The number of years to subtract from the current calendar
+	*/
+	subtractYears : function(count) {
+		this.callChildFunction("subtractYears", count);
+	},
+
+	/**
+	 * Returns the Calendar page instance which has a pagedate (month/year) matching the given date. 
+	 * Returns null if no match is found.
+	 * 
+	 * @method getCalendarPage
+	 * @param {Date} date The JavaScript Date object for which a Calendar page is to be found.
+	 * @return {Calendar} The Calendar page instance representing the month to which the date 
+	 * belongs.
+	 */
+	getCalendarPage : function(date) {
+		var cal = null;
+		if (date) {
+			var y = date.getFullYear(),
+				m = date.getMonth();
+
+			var pages = this.pages;
+			for (var i = 0; i < pages.length; ++i) {
+				var pageDate = pages[i].cfg.getProperty("pagedate");
+				if (pageDate.getFullYear() === y && pageDate.getMonth() === m) {
+					cal = pages[i];
+					break;
+				}
+			}
+		}
+		return cal;
+	},
+
+	/**
+	* Sets the month on a Date object, taking into account year rollover if the month is less than 0 or greater than 11.
+	* The Date object passed in is modified. It should be cloned before passing it into this method if the original value needs to be maintained
+	* @method	_setMonthOnDate
+	* @private
+	* @param	{Date}	date	The Date object on which to set the month index
+	* @param	{Number}	iMonth	The month index to set
+	*/
+	_setMonthOnDate : function(date, iMonth) {
+		// Bug in Safari 1.3, 2.0 (WebKit build < 420), Date.setMonth does not work consistently if iMonth is not 0-11
+		if (YAHOO.env.ua.webkit && YAHOO.env.ua.webkit < 420 && (iMonth < 0 || iMonth > 11)) {
+			var DM = YAHOO.widget.DateMath;
+			var newDate = DM.add(date, DM.MONTH, iMonth-date.getMonth());
+			date.setTime(newDate.getTime());
+		} else {
+			date.setMonth(iMonth);
+		}
+	},
+	
+	/**
+	 * Fixes the width of the CalendarGroup container element, to account for miswrapped floats
+	 * @method _fixWidth
+	 * @private
+	 */
+	_fixWidth : function() {
+		var w = 0;
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			w += cal.oDomContainer.offsetWidth;
+		}
+		if (w > 0) {
+			this.oDomContainer.style.width = w + "px";
+		}
+	},
+	
+	/**
+	* Returns a string representation of the object.
+	* @method toString
+	* @return {String}	A string representation of the CalendarGroup object.
+	*/
+	toString : function() {
+		return "CalendarGroup " + this.id;
 	}
-	if (w > 0) {
-		this.oDomContainer.style.width = w + "px";
-	}
 };
 
-
 /**
 * CSS class representing the container for the calendar
 * @property YAHOO.widget.CalendarGroup.CSS_CONTAINER
@@ -5010,11 +5509,15 @@
 																 "configTitle",
 																 "configClose",
 																 "configIframe",
+																 "configNavigator",
 																 "createTitleBar",
 																 "createCloseButton",
 																 "removeTitleBar",
 																 "removeCloseButton",
 																 "hide",
+																 "show",
+																 "toDate",
+																 "_parseArgs",
 																 "browser");
 
 /**
@@ -5028,15 +5531,6 @@
 YAHOO.widget.CalendarGroup._DEFAULT_CONFIG = YAHOO.widget.Calendar._DEFAULT_CONFIG;
 YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES = {key:"pages", value:2};
 
-/**
-* Returns a string representation of the object.
-* @method toString
-* @return {String}	A string representation of the CalendarGroup object.
-*/
-YAHOO.widget.CalendarGroup.prototype.toString = function() {
-	return "CalendarGroup " + this.id;
-};
-
 YAHOO.widget.CalGrp = YAHOO.widget.CalendarGroup;
 
 /**
@@ -5055,4 +5549,1241 @@
 */
 YAHOO.widget.Cal2up = YAHOO.widget.Calendar2up;
 
-YAHOO.register("calendar", YAHOO.widget.Calendar, {version: "2.3.1", build: "541"});
+/**
+ * The CalendarNavigator is used along with a Calendar/CalendarGroup to 
+ * provide a Month/Year popup navigation control, allowing the user to navigate 
+ * to a specific month/year in the Calendar/CalendarGroup without having to 
+ * scroll through months sequentially
+ *
+ * @namespace YAHOO.widget
+ * @class CalendarNavigator
+ * @constructor
+ * @param {Calendar|CalendarGroup} cal The instance of the Calendar or CalendarGroup to which this CalendarNavigator should be attached.
+ */
+YAHOO.widget.CalendarNavigator = function(cal) {
+	this.init(cal);
+};
+
+(function() {
+	// Setup static properties (inside anon fn, so that we can use shortcuts)
+	var CN = YAHOO.widget.CalendarNavigator;
+
+	/**
+	 * YAHOO.widget.CalendarNavigator.CLASSES contains constants
+	 * for the class values applied to the CalendarNaviatgator's 
+	 * DOM elements
+	 * @property YAHOO.widget.CalendarNavigator.CLASSES
+	 * @type Object
+	 * @static
+	 */
+	CN.CLASSES = {
+		/**
+		 * Class applied to the Calendar Navigator's bounding box
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.NAV
+		 * @type String
+		 * @static
+		 */
+		NAV :"yui-cal-nav",
+		/**
+		 * Class applied to the Calendar/CalendarGroup's bounding box to indicate
+		 * the Navigator is currently visible
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.NAV_VISIBLE
+		 * @type String
+		 * @static
+		 */
+		NAV_VISIBLE: "yui-cal-nav-visible",
+		/**
+		 * Class applied to the Navigator mask's bounding box
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.MASK
+		 * @type String
+		 * @static
+		 */
+		MASK : "yui-cal-nav-mask",
+		/**
+		 * Class applied to the year label/control bounding box
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.YEAR
+		 * @type String
+		 * @static
+		 */
+		YEAR : "yui-cal-nav-y",
+		/**
+		 * Class applied to the month label/control bounding box
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.MONTH
+		 * @type String
+		 * @static
+		 */
+		MONTH : "yui-cal-nav-m",
+		/**
+		 * Class applied to the submit/cancel button's bounding box
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.BUTTONS
+		 * @type String
+		 * @static
+		 */
+		BUTTONS : "yui-cal-nav-b",
+		/**
+		 * Class applied to buttons wrapping element
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.BUTTON
+		 * @type String
+		 * @static
+		 */
+		BUTTON : "yui-cal-nav-btn",
+		/**
+		 * Class applied to the validation error area's bounding box
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.ERROR
+		 * @type String
+		 * @static
+		 */
+		ERROR : "yui-cal-nav-e",
+		/**
+		 * Class applied to the year input control
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.YEAR_CTRL
+		 * @type String
+		 * @static
+		 */
+		YEAR_CTRL : "yui-cal-nav-yc",
+		/**
+		 * Class applied to the month input control
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.MONTH_CTRL
+		 * @type String
+		 * @static
+		 */
+		MONTH_CTRL : "yui-cal-nav-mc",
+		/**
+		 * Class applied to controls with invalid data (e.g. a year input field with invalid an year)
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.INVALID
+		 * @type String
+		 * @static
+		 */
+		INVALID : "yui-invalid",
+		/**
+		 * Class applied to default controls
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.DEFAULT
+		 * @type String
+		 * @static
+		 */
+		DEFAULT : "yui-default"
+	};
+
+	/**
+	 * Object literal containing the default configuration values for the CalendarNavigator
+	 * The configuration object is expected to follow the format below, with the properties being
+	 * case sensitive.
+	 * <dl>
+	 * <dt>strings</dt>
+	 * <dd><em>Object</em> :  An object with the properties shown below, defining the string labels to use in the Navigator's UI
+	 *     <dl>
+	 *         <dt>month</dt><dd><em>String</em> : The string to use for the month label. Defaults to "Month".</dd>
+	 *         <dt>year</dt><dd><em>String</em> : The string to use for the year label. Defaults to "Year".</dd>
+	 *         <dt>submit</dt><dd><em>String</em> : The string to use for the submit button label. Defaults to "Okay".</dd>
+	 *         <dt>cancel</dt><dd><em>String</em> : The string to use for the cancel button label. Defaults to "Cancel".</dd>
+	 *         <dt>invalidYear</dt><dd><em>String</em> : The string to use for invalid year values. Defaults to "Year needs to be a number".</dd>
+	 *     </dl>
+	 * </dd>
+	 * <dt>monthFormat</dt><dd><em>String</em> : The month format to use. Either YAHOO.widget.Calendar.LONG, or YAHOO.widget.Calendar.SHORT. Defaults to YAHOO.widget.Calendar.LONG</dd>
+	 * <dt>initialFocus</dt><dd><em>String</em> : Either "year" or "month" specifying which input control should get initial focus. Defaults to "year"</dd>
+	 * </dl>
+	 * @property _DEFAULT_CFG
+	 * @protected
+	 * @type Object
+	 * @static
+	 */
+	CN._DEFAULT_CFG = {
+		strings : {
+			month: "Month",
+			year: "Year",
+			submit: "Okay",
+			cancel: "Cancel",
+			invalidYear : "Year needs to be a number"
+		},
+		monthFormat: YAHOO.widget.Calendar.LONG,
+		initialFocus: "year"
+	};
+
+	/**
+	 * The suffix added to the Calendar/CalendarGroup's ID, to generate
+	 * a unique ID for the Navigator and it's bounding box.
+	 * @property YAHOO.widget.CalendarNavigator.ID_SUFFIX
+	 * @static
+	 * @type String
+	 * @final
+	 */
+	CN.ID_SUFFIX = "_nav";
+	/**
+	 * The suffix added to the Navigator's ID, to generate
+	 * a unique ID for the month control.
+	 * @property YAHOO.widget.CalendarNavigator.MONTH_SUFFIX
+	 * @static
+	 * @type String 
+	 * @final
+	 */
+	CN.MONTH_SUFFIX = "_month";
+	/**
+	 * The suffix added to the Navigator's ID, to generate
+	 * a unique ID for the year control.
+	 * @property YAHOO.widget.CalendarNavigator.YEAR_SUFFIX
+	 * @static
+	 * @type String
+	 * @final
+	 */
+	CN.YEAR_SUFFIX = "_year";
+	/**
+	 * The suffix added to the Navigator's ID, to generate
+	 * a unique ID for the error bounding box.
+	 * @property YAHOO.widget.CalendarNavigator.ERROR_SUFFIX
+	 * @static
+	 * @type String
+	 * @final
+	 */
+	CN.ERROR_SUFFIX = "_error";
+	/**
+	 * The suffix added to the Navigator's ID, to generate
+	 * a unique ID for the "Cancel" button.
+	 * @property YAHOO.widget.CalendarNavigator.CANCEL_SUFFIX
+	 * @static
+	 * @type String
+	 * @final
+	 */
+	CN.CANCEL_SUFFIX = "_cancel";
+	/**
+	 * The suffix added to the Navigator's ID, to generate
+	 * a unique ID for the "Submit" button.
+	 * @property YAHOO.widget.CalendarNavigator.SUBMIT_SUFFIX
+	 * @static
+	 * @type String
+	 * @final
+	 */
+	CN.SUBMIT_SUFFIX = "_submit";
+
+	/**
+	 * The number of digits to which the year input control is to be limited.
+	 * @property YAHOO.widget.CalendarNavigator.YR_MAX_DIGITS
+	 * @static
+	 * @type Number
+	 */
+	CN.YR_MAX_DIGITS = 4;
+
+	/**
+	 * The amount by which to increment the current year value,
+	 * when the arrow up/down key is pressed on the year control
+	 * @property YAHOO.widget.CalendarNavigator.YR_MINOR_INC
+	 * @static
+	 * @type Number
+	 */
+	CN.YR_MINOR_INC = 1;
+
+	/**
+	 * The amount by which to increment the current year value,
+	 * when the page up/down key is pressed on the year control
+	 * @property YAHOO.widget.CalendarNavigator.YR_MAJOR_INC
+	 * @static
+	 * @type Number
+	 */
+	CN.YR_MAJOR_INC = 10;
+
+	/**
+	 * Artificial delay (in ms) between the time the Navigator is hidden
+	 * and the Calendar/CalendarGroup state is updated. Allows the user
+	 * the see the Calendar/CalendarGroup page changing. If set to 0
+	 * the Calendar/CalendarGroup page will be updated instantly
+	 * @property YAHOO.widget.CalendarNavigator.UPDATE_DELAY
+	 * @static
+	 * @type Number
+	 */
+	CN.UPDATE_DELAY = 50;
+
+	/**
+	 * Regular expression used to validate the year input
+	 * @property YAHOO.widget.CalendarNavigator.YR_PATTERN
+	 * @static
+	 * @type RegExp
+	 */
+	CN.YR_PATTERN = /^\d+$/;
+	/**
+	 * Regular expression used to trim strings
+	 * @property YAHOO.widget.CalendarNavigator.TRIM
+	 * @static
+	 * @type RegExp
+	 */
+	CN.TRIM = /^\s*(.*?)\s*$/;
+})();
+
+YAHOO.widget.CalendarNavigator.prototype = {
+
+	/**
+	 * The unique ID for this CalendarNavigator instance
+	 * @property id
+	 * @type String
+	 */
+	id : null,
+
+	/**
+	 * The Calendar/CalendarGroup instance to which the navigator belongs
+	 * @property cal
+	 * @type {Calendar|CalendarGroup}
+	 */
+	cal : null,
+
+	/**
+	 * Reference to the HTMLElement used to render the navigator's bounding box
+	 * @property navEl
+	 * @type HTMLElement
+	 */
+	navEl : null,
+
+	/**
+	 * Reference to the HTMLElement used to render the navigator's mask
+	 * @property maskEl
+	 * @type HTMLElement
+	 */
+	maskEl : null,
+
+	/**
+	 * Reference to the HTMLElement used to input the year
+	 * @property yearEl
+	 * @type HTMLElement
+	 */
+	yearEl : null,
+
+	/**
+	 * Reference to the HTMLElement used to input the month
+	 * @property monthEl
+	 * @type HTMLElement
+	 */
+	monthEl : null,
+
+	/**
+	 * Reference to the HTMLElement used to display validation errors
+	 * @property errorEl
+	 * @type HTMLElement
+	 */
+	errorEl : null,
+
+	/**
+	 * Reference to the HTMLElement used to update the Calendar/Calendar group
+	 * with the month/year values
+	 * @property submitEl
+	 * @type HTMLElement
+	 */
+	submitEl : null,
+	
+	/**
+	 * Reference to the HTMLElement used to hide the navigator without updating the 
+	 * Calendar/Calendar group
+	 * @property cancelEl
+	 * @type HTMLElement
+	 */
+	cancelEl : null,
+
+	/** 
+	 * Reference to the first focusable control in the navigator (by default monthEl)
+	 * @property firstCtrl
+	 * @type HTMLElement
+	 */
+	firstCtrl : null,
+	
+	/** 
+	 * Reference to the last focusable control in the navigator (by default cancelEl)
+	 * @property lastCtrl
+	 * @type HTMLElement
+	 */
+	lastCtrl : null,
+
+	/**
+	 * The document containing the Calendar/Calendar group instance
+	 * @protected
+	 * @property _doc
+	 * @type HTMLDocument
+	 */
+	_doc : null,
+
+	/**
+	 * Internal state property for the current year displayed in the navigator
+	 * @protected
+	 * @property _year
+	 * @type Number
+	 */
+	_year: null,
+	
+	/**
+	 * Internal state property for the current month index displayed in the navigator
+	 * @protected
+	 * @property _month
+	 * @type Number
+	 */
+	_month: 0,
+
+	/**
+	 * Private internal state property which indicates whether or not the 
+	 * Navigator has been rendered.
+	 * @private
+	 * @property __rendered
+	 * @type Boolean
+	 */
+	__rendered: false,
+
+	/**
+	 * Init lifecycle method called as part of construction
+	 * 
+	 * @method init
+	 * @param {Calendar} cal The instance of the Calendar or CalendarGroup to which this CalendarNavigator should be attached
+	 */
+	init : function(cal) {
+		var calBox = cal.oDomContainer;
+
+		this.cal = cal;
+		this.id = calBox.id + YAHOO.widget.CalendarNavigator.ID_SUFFIX;
+		this._doc = calBox.ownerDocument;
+
+		/**
+		 * Private flag, to identify IE6/IE7 Quirks
+		 * @private
+		 * @property __isIEQuirks
+		 */
+		var ie = YAHOO.env.ua.ie;
+		this.__isIEQuirks = (ie && ((ie <= 6) || (ie === 7 && this._doc.compatMode == "BackCompat")));
+	},
+
+	/**
+	 * Displays the navigator and mask, updating the input controls to reflect the 
+	 * currently set month and year. The show method will invoke the render method
+	 * if the navigator has not been renderered already, allowing for lazy rendering
+	 * of the control.
+	 * 
+	 * The show method will fire the Calendar/CalendarGroup's beforeShowNav and showNav events
+	 * 
+	 * @method show
+	 */
+	show : function() {
+		var CLASSES = YAHOO.widget.CalendarNavigator.CLASSES;
+
+		if (this.cal.beforeShowNavEvent.fire()) {
+			if (!this.__rendered) {
+				this.render();
+			}
+			this.clearErrors();
+
+			this._updateMonthUI();
+			this._updateYearUI();
+			this._show(this.navEl, true);
+
+			this.setInitialFocus();
+			this.showMask();
+
+			YAHOO.util.Dom.addClass(this.cal.oDomContainer, CLASSES.NAV_VISIBLE);
+			this.cal.showNavEvent.fire();
+		}
+	},
+
+	/**
+	 * Hides the navigator and mask
+	 * 
+	 * The show method will fire the Calendar/CalendarGroup's beforeHideNav event and hideNav events
+	 * @method hide
+	 */
+	hide : function() {
+		var CLASSES = YAHOO.widget.CalendarNavigator.CLASSES;
+
+		if (this.cal.beforeHideNavEvent.fire()) {
+			this._show(this.navEl, false);
+			this.hideMask();
+			YAHOO.util.Dom.removeClass(this.cal.oDomContainer, CLASSES.NAV_VISIBLE);
+			this.cal.hideNavEvent.fire();
+		}
+	},
+	
+
+	/**
+	 * Displays the navigator's mask element
+	 * 
+	 * @method showMask
+	 */
+	showMask : function() {
+		this._show(this.maskEl, true);
+		if (this.__isIEQuirks) {
+			this._syncMask();
+		}
+	},
+
+	/**
+	 * Hides the navigator's mask element
+	 * 
+	 * @method hideMask
+	 */
+	hideMask : function() {
+		this._show(this.maskEl, false);
+	},
+
+	/**
+	 * Returns the current month set on the navigator
+	 * 
+	 * Note: This may not be the month set in the UI, if 
+	 * the UI contains an invalid value.
+	 * 
+	 * @method getMonth
+	 * @return {Number} The Navigator's current month index
+	 */
+	getMonth: function() {
+		return this._month;
+	},
+
+	/**
+	 * Returns the current year set on the navigator
+	 * 
+	 * Note: This may not be the year set in the UI, if 
+	 * the UI contains an invalid value.
+	 * 
+	 * @method getYear
+	 * @return {Number} The Navigator's current year value
+	 */
+	getYear: function() {
+		return this._year;
+	},
+
+	/**
+	 * Sets the current month on the Navigator, and updates the UI
+	 * 
+	 * @method setMonth
+	 * @param {Number} nMonth The month index, from 0 (Jan) through 11 (Dec).
+	 */
+	setMonth : function(nMonth) {
+		if (nMonth >= 0 && nMonth < 12) {
+			this._month = nMonth;
+		}
+		this._updateMonthUI();
+	},
+
+	/**
+	 * Sets the current year on the Navigator, and updates the UI. If the 
+	 * provided year is invalid, it will not be set.
+	 * 
+	 * @method setYear
+	 * @param {Number} nYear The full year value to set the Navigator to.
+	 */
+	setYear : function(nYear) {
+		var yrPattern = YAHOO.widget.CalendarNavigator.YR_PATTERN;
+		if (YAHOO.lang.isNumber(nYear) && yrPattern.test(nYear+"")) {
+			this._year = nYear;
+		}
+		this._updateYearUI();
+	},
+
+	/**
+	 * Renders the HTML for the navigator, adding it to the 
+	 * document and attaches event listeners if it has not 
+	 * already been rendered.
+	 * 
+	 * @method render
+	 */
+	render: function() {
+		this.cal.beforeRenderNavEvent.fire();
+		if (!this.__rendered) {
+			this.createNav();
+			this.createMask();
+			this.applyListeners();
+			this.__rendered = true;
+		}
+		this.cal.renderNavEvent.fire();
+	},
+
+	/**
+	 * Creates the navigator's containing HTMLElement, it's contents, and appends 
+	 * the containg element to the Calendar/CalendarGroup's container.
+	 * 
+	 * @method createNav
+	 */
+	createNav : function() {
+		var NAV = YAHOO.widget.CalendarNavigator;
+		var doc = this._doc;
+
+		var d = doc.createElement("div");
+		d.className = NAV.CLASSES.NAV;
+
+		var htmlBuf = this.renderNavContents([]);
+
+		d.innerHTML = htmlBuf.join('');
+		this.cal.oDomContainer.appendChild(d);
+
+		this.navEl = d;
+
+		this.yearEl = doc.getElementById(this.id + NAV.YEAR_SUFFIX);
+		this.monthEl = doc.getElementById(this.id + NAV.MONTH_SUFFIX);
+		this.errorEl = doc.getElementById(this.id + NAV.ERROR_SUFFIX);
+		this.submitEl = doc.getElementById(this.id + NAV.SUBMIT_SUFFIX);
+		this.cancelEl = doc.getElementById(this.id + NAV.CANCEL_SUFFIX);
+
+		if (YAHOO.env.ua.gecko && this.yearEl && this.yearEl.type == "text") {
+			// Avoid XUL error on focus, select [ https://bugzilla.mozilla.org/show_bug.cgi?id=236791, 
+			// supposedly fixed in 1.8.1, but there are reports of it still being around for methods other than blur ]
+			this.yearEl.setAttribute("autocomplete", "off");
+		}
+
+		this._setFirstLastElements();
+	},
+
+	/**
+	 * Creates the Mask HTMLElement and appends it to the Calendar/CalendarGroups
+	 * container.
+	 * 
+	 * @method createMask
+	 */
+	createMask : function() {
+		var C = YAHOO.widget.CalendarNavigator.CLASSES;
+
+		var d = this._doc.createElement("div");
+		d.className = C.MASK;
+
+		this.cal.oDomContainer.appendChild(d);
+		this.maskEl = d;
+	},
+
+	/**
+	 * Used to set the width/height of the mask in pixels to match the Calendar Container.
+	 * Currently only used for IE6 and IE7 quirks mode. The other A-Grade browser are handled using CSS (width/height 100%).
+	 * <p>
+	 * The method is also registered as an HTMLElement resize listener on the Calendars container element.
+	 * </p>
+	 * @protected
+	 * @method _syncMask
+	 */
+	_syncMask : function() {
+		var c = this.cal.oDomContainer;
+		if (c && this.maskEl) {
+			var r = YAHOO.util.Dom.getRegion(c);
+			YAHOO.util.Dom.setStyle(this.maskEl, "width", r.right - r.left + "px");
+			YAHOO.util.Dom.setStyle(this.maskEl, "height", r.bottom - r.top + "px");
+		}
+	},
+
+	/**
+	 * Renders the contents of the navigator
+	 * 
+	 * @method renderNavContents
+	 * 
+	 * @param {Array} html The HTML buffer to append the HTML to.
+	 * @return {Array} A reference to the buffer passed in.
+	 */
+	renderNavContents : function(html) {
+		var NAV = YAHOO.widget.CalendarNavigator,
+			C = NAV.CLASSES,
+			h = html; // just to use a shorter name
+
+		h[h.length] = '<div class="' + C.MONTH + '">';
+		this.renderMonth(h);
+		h[h.length] = '</div>';
+		h[h.length] = '<div class="' + C.YEAR + '">';
+		this.renderYear(h);
+		h[h.length] = '</div>';
+		h[h.length] = '<div class="' + C.BUTTONS + '">';
+		this.renderButtons(h);
+		h[h.length] = '</div>';
+		h[h.length] = '<div class="' + C.ERROR + '" id="' + this.id + NAV.ERROR_SUFFIX + '"></div>';
+
+		return h;
+	},
+
+	/**
+	 * Renders the month label and control for the navigator
+	 * 
+	 * @method renderNavContents
+	 * @param {Array} html The HTML buffer to append the HTML to.
+	 * @return {Array} A reference to the buffer passed in.
+	 */
+	renderMonth : function(html) {
+		var NAV = YAHOO.widget.CalendarNavigator,
+			C = NAV.CLASSES;
+
+		var id = this.id + NAV.MONTH_SUFFIX,
+			mf = this.__getCfg("monthFormat"),
+			months = this.cal.cfg.getProperty((mf == YAHOO.widget.Calendar.SHORT) ? "MONTHS_SHORT" : "MONTHS_LONG"),
+			h = html;
+
+		if (months && months.length > 0) {
+			h[h.length] = '<label for="' + id + '">';
+			h[h.length] = this.__getCfg("month", true);
+			h[h.length] = '</label>';
+			h[h.length] = '<select name="' + id + '" id="' + id + '" class="' + C.MONTH_CTRL + '">';
+			for (var i = 0; i < months.length; i++) {
+				h[h.length] = '<option value="' + i + '">';
+				h[h.length] = months[i];
+				h[h.length] = '</option>';
+			}
+			h[h.length] = '</select>';
+		}
+		return h;
+	},
+
+	/**
+	 * Renders the year label and control for the navigator
+	 * 
+	 * @method renderYear
+	 * @param {Array} html The HTML buffer to append the HTML to.
+	 * @return {Array} A reference to the buffer passed in.
+	 */
+	renderYear : function(html) {
+		var NAV = YAHOO.widget.CalendarNavigator,
+			C = NAV.CLASSES;
+
+		var id = this.id + NAV.YEAR_SUFFIX,
+			size = NAV.YR_MAX_DIGITS,
+			h = html;
+
+		h[h.length] = '<label for="' + id + '">';
+		h[h.length] = this.__getCfg("year", true);
+		h[h.length] = '</label>';
+		h[h.length] = '<input type="text" name="' + id + '" id="' + id + '" class="' + C.YEAR_CTRL + '" maxlength="' + size + '"/>';
+		return h;
+	},
+
+	/**
+	 * Renders the submit/cancel buttons for the navigator
+	 * 
+	 * @method renderButton
+	 * @return {String} The HTML created for the Button UI
+	 */
+	renderButtons : function(html) {
+		var C = YAHOO.widget.CalendarNavigator.CLASSES;
+		var h = html;
+
+		h[h.length] = '<span class="' + C.BUTTON + ' ' + C.DEFAULT + '">';
+		h[h.length] = '<button type="button" id="' + this.id + '_submit' + '">';
+		h[h.length] = this.__getCfg("submit", true);
+		h[h.length] = '</button>';
+		h[h.length] = '</span>';
+		h[h.length] = '<span class="' + C.BUTTON +'">';
+		h[h.length] = '<button type="button" id="' + this.id + '_cancel' + '">';
+		h[h.length] = this.__getCfg("cancel", true);
+		h[h.length] = '</button>';
+		h[h.length] = '</span>';
+
+		return h;
+	},
+
+	/**
+	 * Attaches DOM event listeners to the rendered elements
+	 * <p>
+	 * The method will call applyKeyListeners, to setup keyboard specific 
+	 * listeners
+	 * </p>
+	 * @method applyListeners
+	 */
+	applyListeners : function() {
+		var E = YAHOO.util.Event;
+
+		function yearUpdateHandler() {
+			if (this.validate()) {
+				this.setYear(this._getYearFromUI());
+			}
+		}
+
+		function monthUpdateHandler() {
+			this.setMonth(this._getMonthFromUI());
+		}
+
+		E.on(this.submitEl, "click", this.submit, this, true);
+		E.on(this.cancelEl, "click", this.cancel, this, true);
+		E.on(this.yearEl, "blur", yearUpdateHandler, this, true);
+		E.on(this.monthEl, "change", monthUpdateHandler, this, true);
+
+		if (this.__isIEQuirks) {
+			YAHOO.util.Event.on(this.cal.oDomContainer, "resize", this._syncMask, this, true);
+		}
+
+		this.applyKeyListeners();
+	},
+
+	/**
+	 * Removes/purges DOM event listeners from the rendered elements
+	 * 
+	 * @method purgeListeners
+	 */
+	purgeListeners : function() {
+		var E = YAHOO.util.Event;
+		E.removeListener(this.submitEl, "click", this.submit);
+		E.removeListener(this.cancelEl, "click", this.cancel);
+		E.removeListener(this.yearEl, "blur");
+		E.removeListener(this.monthEl, "change");
+		if (this.__isIEQuirks) {
+			E.removeListener(this.cal.oDomContainer, "resize", this._syncMask);
+		}
+
+		this.purgeKeyListeners();
+	},
+
+	/**
+	 * Attaches DOM listeners for keyboard support. 
+	 * Tab/Shift-Tab looping, Enter Key Submit on Year element,
+	 * Up/Down/PgUp/PgDown year increment on Year element
+	 * <p>
+	 * NOTE: MacOSX Safari 2.x doesn't let you tab to buttons and 
+	 * MacOSX Gecko does not let you tab to buttons or select controls,
+	 * so for these browsers, Tab/Shift-Tab looping is limited to the 
+	 * elements which can be reached using the tab key.
+	 * </p>
+	 * @method applyKeyListeners
+	 */
+	applyKeyListeners : function() {
+		var E = YAHOO.util.Event;
+
+		// IE doesn't fire keypress for arrow/pg keys (non-char keys)
+		var ua = YAHOO.env.ua;
+		var arrowEvt = (ua.ie) ? "keydown" : "keypress";
+
+		// - IE doesn't fire keypress for non-char keys
+		// - Opera doesn't allow us to cancel keydown or keypress for tab, but 
+		//   changes focus successfully on keydown (keypress is too late to change focus - opera's already moved on).
+		var tabEvt = (ua.ie || ua.opera) ? "keydown" : "keypress";
+
+		// Everyone likes keypress for Enter (char keys) - whoo hoo!
+		E.on(this.yearEl, "keypress", this._handleEnterKey, this, true);
+
+		E.on(this.yearEl, arrowEvt, this._handleDirectionKeys, this, true);
+		E.on(this.lastCtrl, tabEvt, this._handleTabKey, this, true);
+		E.on(this.firstCtrl, tabEvt, this._handleShiftTabKey, this, true);
+	},
+
+	/**
+	 * Removes/purges DOM listeners for keyboard support
+	 *
+	 * @method purgeKeyListeners
+	 */
+	purgeKeyListeners : function() {
+		var E = YAHOO.util.Event;
+
+		var arrowEvt = (YAHOO.env.ua.ie) ? "keydown" : "keypress";
+		var tabEvt = (YAHOO.env.ua.ie || YAHOO.env.ua.opera) ? "keydown" : "keypress";
+
+		E.removeListener(this.yearEl, "keypress", this._handleEnterKey);
+		E.removeListener(this.yearEl, arrowEvt, this._handleDirectionKeys);
+		E.removeListener(this.lastCtrl, tabEvt, this._handleTabKey);
+		E.removeListener(this.firstCtrl, tabEvt, this._handleShiftTabKey);
+	},
+
+	/**
+	 * Updates the Calendar/CalendarGroup's pagedate with the currently set month and year if valid.
+	 * <p>
+	 * If the currently set month/year is invalid, a validation error will be displayed and the 
+	 * Calendar/CalendarGroup's pagedate will not be updated.
+	 * </p>
+	 * @method submit
+	 */
+	submit : function() {
+		if (this.validate()) {
+			this.hide();
+
+			this.setMonth(this._getMonthFromUI());
+			this.setYear(this._getYearFromUI());
+
+			var cal = this.cal;
+			var nav = this;
+			
+			function update() {
+				cal.setYear(nav.getYear());
+				cal.setMonth(nav.getMonth());
+				cal.render();
+			}
+			// Artificial delay, just to help the user see something changed
+			var delay = YAHOO.widget.CalendarNavigator.UPDATE_DELAY;
+			if (delay > 0) {
+				window.setTimeout(update, delay);
+			} else {
+				update();
+			}
+		}
+	},
+
+	/**
+	 * Hides the navigator and mask, without updating the Calendar/CalendarGroup's state
+	 * 
+	 * @method cancel
+	 */
+	cancel : function() {
+		this.hide();
+	},
+
+	/**
+	 * Validates the current state of the UI controls
+	 * 
+	 * @method validate
+	 * @return {Boolean} true, if the current UI state contains valid values, false if not
+	 */
+	validate : function() {
+		if (this._getYearFromUI() !== null) {
+			this.clearErrors();
+			return true;
+		} else {
+			this.setYearError();
+			this.setError(this.__getCfg("invalidYear", true));
+			return false;
+		}
+	},
+
+	/**
+	 * Displays an error message in the Navigator's error panel
+	 * @method setError
+	 * @param {String} msg The error message to display
+	 */
+	setError : function(msg) {
+		if (this.errorEl) {
+			this.errorEl.innerHTML = msg;
+			this._show(this.errorEl, true);
+		}
+	},
+
+	/**
+	 * Clears the navigator's error message and hides the error panel
+	 * @method clearError 
+	 */
+	clearError : function() {
+		if (this.errorEl) {
+			this.errorEl.innerHTML = "";
+			this._show(this.errorEl, false);
+		}
+	},
+
+	/**
+	 * Displays the validation error UI for the year control
+	 * @method setYearError
+	 */
+	setYearError : function() {
+		YAHOO.util.Dom.addClass(this.yearEl, YAHOO.widget.CalendarNavigator.CLASSES.INVALID);
+	},
+
+	/**
+	 * Removes the validation error UI for the year control
+	 * @method clearYearError
+	 */
+	clearYearError : function() {
+		YAHOO.util.Dom.removeClass(this.yearEl, YAHOO.widget.CalendarNavigator.CLASSES.INVALID);
+	},
+
+	/**
+	 * Clears all validation and error messages in the UI
+	 * @method clearErrors
+	 */
+	clearErrors : function() {
+		this.clearError();
+		this.clearYearError();
+	},
+
+	/**
+	 * Sets the initial focus, based on the configured value
+	 * @method setInitialFocus
+	 */
+	setInitialFocus : function() {
+		var el = this.submitEl;
+		var f = this.__getCfg("initialFocus");
+
+		if (f && f.toLowerCase) {
+			f = f.toLowerCase();
+			if (f == "year") {
+				el = this.yearEl;
+				try {
+					this.yearEl.select();
+				} catch (e) {
+					// Ignore;
+				}
+			} else if (f == "month") {
+				el = this.monthEl;
+			}
+		}
+
+		if (el && YAHOO.lang.isFunction(el.focus)) {
+			try {
+				el.focus();
+			} catch (e) {
+				// TODO: Fall back if focus fails?
+			}
+		}
+	},
+
+	/**
+	 * Removes all renderered HTML elements for the Navigator from
+	 * the DOM, purges event listeners and clears (nulls) any property
+	 * references to HTML references
+	 * @method erase
+	 */
+	erase : function() {
+		if (this.__rendered) {
+			this.purgeListeners();
+
+			// Clear out innerHTML references
+			this.yearEl = null;
+			this.monthEl = null;
+			this.errorEl = null;
+			this.submitEl = null;
+			this.cancelEl = null;
+			this.firstCtrl = null;
+			this.lastCtrl = null;
+			if (this.navEl) {
+				this.navEl.innerHTML = "";
+			}
+
+			var p = this.navEl.parentNode;
+			if (p) {
+				p.removeChild(this.navEl);
+			}
+			this.navEl = null;
+
+			var pm = this.maskEl.parentNode;
+			if (pm) {
+				pm.removeChild(this.maskEl);
+			}
+			this.maskEl = null;
+			this.__rendered = false;
+		}
+	},
+
+	/**
+	 * Destroys the Navigator object and any HTML references
+	 * @method destroy
+	 */
+	destroy : function() {
+		this.erase();
+		this._doc = null;
+		this.cal = null;
+		this.id = null;
+	},
+
+	/**
+	 * Protected implementation to handle how UI elements are 
+	 * hidden/shown.
+	 *
+	 * @method _show
+	 * @protected
+	 */
+	_show : function(el, bShow) {
+		if (el) {
+			YAHOO.util.Dom.setStyle(el, "display", (bShow) ? "block" : "none");
+		}
+	},
+
+	/**
+	 * Returns the month value (index), from the month UI element
+	 * @protected
+	 * @method _getMonthFromUI
+	 * @return {Number} The month index, or 0 if a UI element for the month
+	 * is not found
+	 */
+	_getMonthFromUI : function() {
+		if (this.monthEl) {
+			return this.monthEl.selectedIndex;
+		} else {
+			return 0; // Default to Jan
+		}
+	},
+
+	/**
+	 * Returns the year value, from the Navitator's year UI element
+	 * @protected
+	 * @method _getYearFromUI
+	 * @return {Number} The year value set in the UI, if valid. null is returned if 
+	 * the UI does not contain a valid year value.
+	 */
+	_getYearFromUI : function() {
+		var NAV = YAHOO.widget.CalendarNavigator;
+
+		var yr = null;
+		if (this.yearEl) {
+			var value = this.yearEl.value;
+			value = value.replace(NAV.TRIM, "$1");
+
+			if (NAV.YR_PATTERN.test(value)) {
+				yr = parseInt(value, 10);
+			}
+		}
+		return yr;
+	},
+
+	/**
+	 * Updates the Navigator's year UI, based on the year value set on the Navigator object
+	 * @protected
+	 * @method _updateYearUI
+	 */
+	_updateYearUI : function() {
+		if (this.yearEl && this._year !== null) {
+			this.yearEl.value = this._year;
+		}
+	},
+
+	/**
+	 * Updates the Navigator's month UI, based on the month value set on the Navigator object
+	 * @protected
+	 * @method _updateMonthUI
+	 */
+	_updateMonthUI : function() {
+		if (this.monthEl) {
+			this.monthEl.selectedIndex = this._month;
+		}
+	},
+
+	/**
+	 * Sets up references to the first and last focusable element in the Navigator's UI
+	 * in terms of tab order (Naviagator's firstEl and lastEl properties). The references
+	 * are used to control modality by looping around from the first to the last control
+	 * and visa versa for tab/shift-tab navigation.
+	 * <p>
+	 * See <a href="#applyKeyListeners">applyKeyListeners</a>
+	 * </p>
+	 * @protected
+	 * @method _setFirstLastElements
+	 */
+	_setFirstLastElements : function() {
+		this.firstCtrl = this.monthEl;
+		this.lastCtrl = this.cancelEl;
+
+		// Special handling for MacOSX.
+		// - Safari 2.x can't focus on buttons
+		// - Gecko can't focus on select boxes or buttons
+		if (this.__isMac) {
+			if (YAHOO.env.ua.webkit && YAHOO.env.ua.webkit < 420){
+				this.firstCtrl = this.monthEl;
+				this.lastCtrl = this.yearEl;
+			}
+			if (YAHOO.env.ua.gecko) {
+				this.firstCtrl = this.yearEl;
+				this.lastCtrl = this.yearEl;
+			}
+		}
+	},
+
+	/**
+	 * Default Keyboard event handler to capture Enter 
+	 * on the Navigator's year control (yearEl)
+	 * 
+	 * @method _handleEnterKey
+	 * @protected
+	 * @param {Event} e The DOM event being handled
+	 */
+	_handleEnterKey : function(e) {
+		var KEYS = YAHOO.util.KeyListener.KEY;
+
+		if (YAHOO.util.Event.getCharCode(e) == KEYS.ENTER) {
+			this.submit();
+		}
+	},
+
+	/**
+	 * Default Keyboard event handler to capture up/down/pgup/pgdown
+	 * on the Navigator's year control (yearEl).
+	 * 
+	 * @method _handleDirectionKeys
+	 * @protected
+	 * @param {Event} e The DOM event being handled
+	 */
+	_handleDirectionKeys : function(e) {
+		var E = YAHOO.util.Event;
+		var KEYS = YAHOO.util.KeyListener.KEY;
+		var NAV = YAHOO.widget.CalendarNavigator;
+
+		var value = (this.yearEl.value) ? parseInt(this.yearEl.value, 10) : null;
+		if (isFinite(value)) {
+			var dir = false;
+			switch(E.getCharCode(e)) {
+				case KEYS.UP:
+					this.yearEl.value = value + NAV.YR_MINOR_INC;
+					dir = true;
+					break;
+				case KEYS.DOWN:
+					this.yearEl.value = Math.max(value - NAV.YR_MINOR_INC, 0);
+					dir = true;
+					break;
+				case KEYS.PAGE_UP:
+					this.yearEl.value = value + NAV.YR_MAJOR_INC;
+					dir = true;
+					break;
+				case KEYS.PAGE_DOWN:
+					this.yearEl.value = Math.max(value - NAV.YR_MAJOR_INC, 0);
+					dir = true;
+					break;
+				default:
+					break;
+			}
+			if (dir) {
+				E.preventDefault(e);
+				try {
+					this.yearEl.select();
+				} catch(e) {
+					// Ignore
+				}
+			}
+		}
+	},
+
+	/**
+	 * Default Keyboard event handler to capture Tab 
+	 * on the last control (lastCtrl) in the Navigator.
+	 * 
+	 * @method _handleTabKey
+	 * @protected
+	 * @param {Event} e The DOM event being handled
+	 */
+	_handleTabKey : function(e) {
+		var E = YAHOO.util.Event;
+		var KEYS = YAHOO.util.KeyListener.KEY;
+
+		if (E.getCharCode(e) == KEYS.TAB && !e.shiftKey) {
+			try {
+				E.preventDefault(e);
+				this.firstCtrl.focus();
+			} catch (e) {
+				// Ignore - mainly for focus edge cases
+			}
+		}
+	},
+
+	/**
+	 * Default Keyboard event handler to capture Shift-Tab 
+	 * on the first control (firstCtrl) in the Navigator.
+	 * 
+	 * @method _handleShiftTabKey
+	 * @protected
+	 * @param {Event} e The DOM event being handled
+	 */
+	_handleShiftTabKey : function(e) {
+		var E = YAHOO.util.Event;
+		var KEYS = YAHOO.util.KeyListener.KEY;
+
+		if (e.shiftKey && E.getCharCode(e) == KEYS.TAB) {
+			try {
+				E.preventDefault(e);
+				this.lastCtrl.focus();
+			} catch (e) {
+				// Ignore - mainly for focus edge cases
+			}
+		}
+	},
+
+	/**
+	 * Retrieve Navigator configuration values from 
+	 * the parent Calendar/CalendarGroup's config value.
+	 * <p>
+	 * If it has not been set in the user provided configuration, the method will 
+	 * return the default value of the configuration property, as set in _DEFAULT_CFG
+	 * </p>
+	 * @private
+	 * @method __getCfg
+	 * @param {String} Case sensitive property name.
+	 * @param {Boolean} true, if the property is a string property, false if not.
+	 * @return The value of the configuration property
+	 */
+	__getCfg : function(prop, bIsStr) {
+		var DEF_CFG = YAHOO.widget.CalendarNavigator._DEFAULT_CFG;
+		var cfg = this.cal.cfg.getProperty("navigator");
+
+		if (bIsStr) {
+			return (cfg !== true && cfg.strings && cfg.strings[prop]) ? cfg.strings[prop] : DEF_CFG.strings[prop];
+		} else {
+			return (cfg !== true && cfg[prop]) ? cfg[prop] : DEF_CFG[prop];
+		}
+	},
+
+	/**
+	 * Private flag, to identify MacOS
+	 * @private
+	 * @property __isMac
+	 */
+	__isMac : (navigator.userAgent.toLowerCase().indexOf("macintosh") != -1)
+
+};
+
+YAHOO.register("calendar", YAHOO.widget.Calendar, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/calendar/calendar-min.js
===================================================================
--- trunk/root/static/yui/calendar/calendar-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/calendar/calendar-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,15 +2,17 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-(function(){YAHOO.util.Config=function(D){if(D){this.init(D);}if(!D){}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE);},checkNumber:function(D){return(!isNaN(D));},fireEvent:function(D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F);}},addProperty:function(E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handler,this.owner);}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queueProperty(!
 E,D.value);}},getConfig:function(){var D={},F,E;for(F in this.config){E=this.config[F];if(E&&E.event){D[F]=E.value;}}return D;},getProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E.value;}else{return undefined;}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true;}}else{return false;}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E,G);return true;}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validator(G)){return false;}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChangedEvent.fire([E,G]);}return true;}}else{return false;}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false;}else{if(!B.isUndefined(P!
 )){R.value=P;}else{P=R.value;}K=false;J=this.eventQueue.length!
 ;for(L=0
;L<J;L++){G=this.eventQueue[L];if(G){H=G[0];I=G[1];if(H==S){this.eventQueue[L]=null;this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]);K=true;break;}}}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P]);}}if(R.supercedes){O=R.supercedes.length;for(T=0;T<O;T++){Q=R.supercedes[T];F=this.eventQueue.length;for(E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M[0];D=M[1];if(N==Q.toLowerCase()){this.eventQueue.push([N,D]);this.eventQueue[E]=null;break;}}}}}return true;}else{return false;}},refireEvent:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queueProperty(D);}else{this.fireEvent(D,E.value);}}},applyConfig:function(E,H){var G,D,F;if(H){F={};for(G in E){if(B.hasOwnProperty(E,G)){F[G.toLowerCase()]=E[G];}}this.initialConfig=F;}for(G in E){if(B.hasOwnProperty(E,G)){this.queueProperty(G,E[G]);}}},refresh:function(){var D;for(D in this.config){this.refireEvent(D);}},fireQueue:function(){var E,H,D,G,F;this.queueInP!
 rogress=true;for(E=0;E<this.eventQueue.length;E++){H=this.eventQueue[E];if(H){D=H[0];G=H[1];F=this.config[D];F.value=G;this.fireEvent(D,G);}}this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()];if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D);}return true;}else{return false;}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F&&F.event){return F.event.unsubscribe(E,G);}else{return false;}},toString:function(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]";}return D;},outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length;for(E=0;E<F;E++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G[1]+", ";}}return D;},destroy:function(){var E=this.config,D,F;for(D in E){if(B.hasOwnProperty(E,D)){F=E[D];F.event.unsubscribeAll();F.event=null;}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.confi!
 g=null;this.initialConfig=null;this.eventQueue=null;}};A.alrea!
 dySubscr
ibed=function(E,H,I){var F=E.subscribers.length,D,G;if(F>0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true;}}while(G--);}return false;};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);}());YAHOO.widget.DateMath={DAY:"D",WEEK:"W",YEAR:"Y",MONTH:"M",ONE_DAY_MS:1000*60*60*24,add:function(A,D,C){var F=new Date(A.getTime());switch(D){case this.MONTH:var E=A.getMonth()+C;var B=0;if(E<0){while(E<0){E+=12;B-=1;}}else{if(E>11){while(E>11){E-=12;B+=1;}}}F.setMonth(E);F.setFullYear(A.getFullYear()+B);break;case this.DAY:F.setDate(A.getDate()+C);break;case this.YEAR:F.setFullYear(A.getFullYear()+C);break;case this.WEEK:F.setDate(A.getDate()+(C*7));break;}return F;},subtract:function(A,C,B){return this.add(A,C,(B*-1));},before:function(C,B){var A=B.getTime();if(C.getTime()<A){return true;}else{return false;}},after:function(C,B){var A=B.getTime();if(C.getTime()>A){return true;}else{return false;}},between:function(B,A,C){if(this.after(B,A)&&this.before(B,C)){return !
 true;}else{return false;}},getJan1:function(A){return new Date(A,0,1);},getDayOffset:function(B,D){var C=this.getJan1(D);var A=Math.ceil((B.getTime()-C.getTime())/this.ONE_DAY_MS);return A;},getWeekNumber:function(C,F){C=this.clearTime(C);var E=new Date(C.getTime()+(4*this.ONE_DAY_MS)-((C.getDay())*this.ONE_DAY_MS));var B=new Date(E.getFullYear(),0,1);var A=((E.getTime()-B.getTime())/this.ONE_DAY_MS)-1;var D=Math.ceil((A)/7);return D;},isYearOverlapWeek:function(A){var C=false;var B=this.add(A,this.DAY,6);if(B.getFullYear()!=A.getFullYear()){C=true;}return C;},isMonthOverlapWeek:function(A){var C=false;var B=this.add(A,this.DAY,6);if(B.getMonth()!=A.getMonth()){C=true;}return C;},findMonthStart:function(A){var B=new Date(A.getFullYear(),A.getMonth(),1);return B;},findMonthEnd:function(B){var D=this.findMonthStart(B);var C=this.add(D,this.MONTH,1);var A=this.subtract(C,this.DAY,1);return A;},clearTime:function(A){A.setHours(12,0,0,0);
-return A;}};YAHOO.widget.Calendar=function(C,A,B){this.init(C,A,B);};YAHOO.widget.Calendar.IMG_ROOT=null;YAHOO.widget.Calendar.DATE="D";YAHOO.widget.Calendar.MONTH_DAY="MD";YAHOO.widget.Calendar.WEEKDAY="WD";YAHOO.widget.Calendar.RANGE="R";YAHOO.widget.Calendar.MONTH="M";YAHOO.widget.Calendar.DISPLAY_DAYS=42;YAHOO.widget.Calendar.STOP_RENDER="S";YAHOO.widget.Calendar.SHORT="short";YAHOO.widget.Calendar.LONG="long";YAHOO.widget.Calendar.MEDIUM="medium";YAHOO.widget.Calendar.ONE_CHAR="1char";YAHOO.widget.Calendar._DEFAULT_CONFIG={PAGEDATE:{key:"pagedate",value:null},SELECTED:{key:"selected",value:null},TITLE:{key:"title",value:""},CLOSE:{key:"close",value:false},IFRAME:{key:"iframe",value:(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6)?true:false},MINDATE:{key:"mindate",value:null},MAXDATE:{key:"maxdate",value:null},MULTI_SELECT:{key:"multi_select",value:false},START_WEEKDAY:{key:"start_weekday",value:0},SHOW_WEEKDAYS:{key:"show_weekdays",value:true},SHOW_WEEK_HEADER:{key:"show_week_he!
 ader",value:false},SHOW_WEEK_FOOTER:{key:"show_week_footer",value:false},HIDE_BLANK_WEEKS:{key:"hide_blank_weeks",value:false},NAV_ARROW_LEFT:{key:"nav_arrow_left",value:null},NAV_ARROW_RIGHT:{key:"nav_arrow_right",value:null},MONTHS_SHORT:{key:"months_short",value:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},MONTHS_LONG:{key:"months_long",value:["January","February","March","April","May","June","July","August","September","October","November","December"]},WEEKDAYS_1CHAR:{key:"weekdays_1char",value:["S","M","T","W","T","F","S"]},WEEKDAYS_SHORT:{key:"weekdays_short",value:["Su","Mo","Tu","We","Th","Fr","Sa"]},WEEKDAYS_MEDIUM:{key:"weekdays_medium",value:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},WEEKDAYS_LONG:{key:"weekdays_long",value:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},LOCALE_MONTHS:{key:"locale_months",value:"long"},LOCALE_WEEKDAYS:{key:"locale_weekdays",value:"short"},DATE_DELIMITER:{key:"date_delimite!
 r",value:","},DATE_FIELD_DELIMITER:{key:"date_field_delimiter"!
 ,value:"
/"},DATE_RANGE_DELIMITER:{key:"date_range_delimiter",value:"-"},MY_MONTH_POSITION:{key:"my_month_position",value:1},MY_YEAR_POSITION:{key:"my_year_position",value:2},MD_MONTH_POSITION:{key:"md_month_position",value:1},MD_DAY_POSITION:{key:"md_day_position",value:2},MDY_MONTH_POSITION:{key:"mdy_month_position",value:1},MDY_DAY_POSITION:{key:"mdy_day_position",value:2},MDY_YEAR_POSITION:{key:"mdy_year_position",value:3},MY_LABEL_MONTH_POSITION:{key:"my_label_month_position",value:1},MY_LABEL_YEAR_POSITION:{key:"my_label_year_position",value:2},MY_LABEL_MONTH_SUFFIX:{key:"my_label_month_suffix",value:" "},MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix",value:""}};YAHOO.widget.Calendar._EVENT_TYPES={BEFORE_SELECT:"beforeSelect",SELECT:"select",BEFORE_DESELECT:"beforeDeselect",DESELECT:"deselect",CHANGE_PAGE:"changePage",BEFORE_RENDER:"beforeRender",RENDER:"render",RESET:"reset",CLEAR:"clear"};YAHOO.widget.Calendar._STYLES={CSS_ROW_HEADER:"calrowhead",CSS_ROW_FOOTER:"calrowfoot"!
 ,CSS_CELL:"calcell",CSS_CELL_SELECTOR:"selector",CSS_CELL_SELECTED:"selected",CSS_CELL_SELECTABLE:"selectable",CSS_CELL_RESTRICTED:"restricted",CSS_CELL_TODAY:"today",CSS_CELL_OOM:"oom",CSS_CELL_OOB:"previous",CSS_HEADER:"calheader",CSS_HEADER_TEXT:"calhead",CSS_BODY:"calbody",CSS_WEEKDAY_CELL:"calweekdaycell",CSS_WEEKDAY_ROW:"calweekdayrow",CSS_FOOTER:"calfoot",CSS_CALENDAR:"yui-calendar",CSS_SINGLE:"single",CSS_CONTAINER:"yui-calcontainer",CSS_NAV_LEFT:"calnavleft",CSS_NAV_RIGHT:"calnavright",CSS_CLOSE:"calclose",CSS_CELL_TOP:"calcelltop",CSS_CELL_LEFT:"calcellleft",CSS_CELL_RIGHT:"calcellright",CSS_CELL_BOTTOM:"calcellbottom",CSS_CELL_HOVER:"calcellhover",CSS_CELL_HIGHLIGHT1:"highlight1",CSS_CELL_HIGHLIGHT2:"highlight2",CSS_CELL_HIGHLIGHT3:"highlight3",CSS_CELL_HIGHLIGHT4:"highlight4"};YAHOO.widget.Calendar.prototype={Config:null,parent:null,index:-1,cells:null,cellDates:null,id:null,oDomContainer:null,today:null,renderStack:null,_renderStack:null,_selectedDates:null,dom!
 EventMap:null};YAHOO.widget.Calendar.prototype.init=function(C!
 ,A,B){th
is.initEvents();this.today=new Date();YAHOO.widget.DateMath.clearTime(this.today);this.id=C;this.oDomContainer=document.getElementById(A);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.initStyles();YAHOO.util.Dom.addClass(this.oDomContainer,this.Style.CSS_CONTAINER);YAHOO.util.Dom.addClass(this.oDomContainer,this.Style.CSS_SINGLE);this.cellDates=[];this.cells=[];this.renderStack=[];this._renderStack=[];this.setupConfig();if(B){this.cfg.applyConfig(B,true);}this.cfg.fireQueue();};YAHOO.widget.Calendar.prototype.configIframe=function(C,B,D){var A=B[0];if(!this.parent){if(YAHOO.util.Dom.inDocument(this.oDomContainer)){if(A){var E=YAHOO.util.Dom.getStyle(this.oDomContainer,"position");if(E=="absolute"||E=="relative"){if(!YAHOO.util.Dom.inDocument(this.iframe)){this.iframe=document.createElement("iframe");this.iframe.src="javascript:false;";YAHOO.util.Dom.setStyle(this.iframe,"opacity","0");if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6){YAHOO.util.Dom.addClass(!
 this.iframe,"fixedsize");}this.oDomContainer.insertBefore(this.iframe,this.oDomContainer.firstChild);}}}else{if(this.iframe){if(this.iframe.parentNode){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;}}}}};YAHOO.widget.Calendar.prototype.configTitle=function(B,A,C){var E=A[0],F;if(E){this.createTitleBar(E);}else{var D=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.CLOSE.key);if(!D){this.removeTitleBar();}else{this.createTitleBar(" ");}}};YAHOO.widget.Calendar.prototype.configClose=function(B,A,C){var E=A[0],D=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.TITLE.key);if(E){if(!D){this.createTitleBar(" ");}this.createCloseButton();}else{this.removeCloseButton();if(!D){this.removeTitleBar();}}};YAHOO.widget.Calendar.prototype.initEvents=function(){var A=YAHOO.widget.Calendar._EVENT_TYPES;this.beforeSelectEvent=new YAHOO.util.CustomEvent(A.BEFORE_SELECT);this.selectEvent=new YAHOO.util.CustomEvent(A.SELECT);
-this.beforeDeselectEvent=new YAHOO.util.CustomEvent(A.BEFORE_DESELECT);this.deselectEvent=new YAHOO.util.CustomEvent(A.DESELECT);this.changePageEvent=new YAHOO.util.CustomEvent(A.CHANGE_PAGE);this.beforeRenderEvent=new YAHOO.util.CustomEvent(A.BEFORE_RENDER);this.renderEvent=new YAHOO.util.CustomEvent(A.RENDER);this.resetEvent=new YAHOO.util.CustomEvent(A.RESET);this.clearEvent=new YAHOO.util.CustomEvent(A.CLEAR);this.beforeSelectEvent.subscribe(this.onBeforeSelect,this,true);this.selectEvent.subscribe(this.onSelect,this,true);this.beforeDeselectEvent.subscribe(this.onBeforeDeselect,this,true);this.deselectEvent.subscribe(this.onDeselect,this,true);this.changePageEvent.subscribe(this.onChangePage,this,true);this.renderEvent.subscribe(this.onRender,this,true);this.resetEvent.subscribe(this.onReset,this,true);this.clearEvent.subscribe(this.onClear,this,true);};YAHOO.widget.Calendar.prototype.doSelectCell=function(G,A){var L,F,I,C;var H=YAHOO.util.Event.getTarget(G);var B=H.ta!
 gName.toLowerCase();var E=false;while(B!="td"&&!YAHOO.util.Dom.hasClass(H,A.Style.CSS_CELL_SELECTABLE)){if(!E&&B=="a"&&YAHOO.util.Dom.hasClass(H,A.Style.CSS_CELL_SELECTOR)){E=true;}H=H.parentNode;B=H.tagName.toLowerCase();if(B=="html"){return ;}}if(E){YAHOO.util.Event.preventDefault(G);}L=H;if(YAHOO.util.Dom.hasClass(L,A.Style.CSS_CELL_SELECTABLE)){F=L.id.split("cell")[1];I=A.cellDates[F];C=new Date(I[0],I[1]-1,I[2]);var K;if(A.Options.MULTI_SELECT){K=L.getElementsByTagName("a")[0];if(K){K.blur();}var D=A.cellDates[F];var J=A._indexOfSelectedFieldArray(D);if(J>-1){A.deselectCell(F);}else{A.selectCell(F);}}else{K=L.getElementsByTagName("a")[0];if(K){K.blur();}A.selectCell(F);}}};YAHOO.widget.Calendar.prototype.doCellMouseOver=function(C,B){var A;if(C){A=YAHOO.util.Event.getTarget(C);}else{A=this;}while(A.tagName.toLowerCase()!="td"){A=A.parentNode;if(A.tagName.toLowerCase()=="html"){return ;}}if(YAHOO.util.Dom.hasClass(A,B.Style.CSS_CELL_SELECTABLE)){YAHOO.util.Dom.addClass(!
 A,B.Style.CSS_CELL_HOVER);}};YAHOO.widget.Calendar.prototype.d!
 oCellMou
seOut=function(C,B){var A;if(C){A=YAHOO.util.Event.getTarget(C);}else{A=this;}while(A.tagName.toLowerCase()!="td"){A=A.parentNode;if(A.tagName.toLowerCase()=="html"){return ;}}if(YAHOO.util.Dom.hasClass(A,B.Style.CSS_CELL_SELECTABLE)){YAHOO.util.Dom.removeClass(A,B.Style.CSS_CELL_HOVER);}};YAHOO.widget.Calendar.prototype.setupConfig=function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.addProperty(A.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});this.cfg.addProperty(A.SELECTED.key,{value:[],handler:this.configSelected});this.cfg.addProperty(A.TITLE.key,{value:A.TITLE.value,handler:this.configTitle});this.cfg.addProperty(A.CLOSE.key,{value:A.CLOSE.value,handler:this.configClose});this.cfg.addProperty(A.IFRAME.key,{value:A.IFRAME.value,handler:this.configIframe,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.MINDATE.key,{value:A.MINDATE.value,handler:this.configMinDate});this.cfg.addProperty(A.MAXDATE.key,{value:A.MAXDATE.value,handler:this.con!
 figMaxDate});this.cfg.addProperty(A.MULTI_SELECT.key,{value:A.MULTI_SELECT.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.START_WEEKDAY.key,{value:A.START_WEEKDAY.value,handler:this.configOptions,validator:this.cfg.checkNumber});this.cfg.addProperty(A.SHOW_WEEKDAYS.key,{value:A.SHOW_WEEKDAYS.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_HEADER.key,{value:A.SHOW_WEEK_HEADER.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_FOOTER.key,{value:A.SHOW_WEEK_FOOTER.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.HIDE_BLANK_WEEKS.key,{value:A.HIDE_BLANK_WEEKS.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.NAV_ARROW_LEFT.key,{value:A.NAV_ARROW_LEFT.value,handler:this.configOptions});this.cfg.addProperty(A.NAV_ARROW_RIGHT.key,{value:A.NAV_ARROW_RIGHT.value!
 ,handler:this.configOptions});this.cfg.addProperty(A.MONTHS_SH!
 ORT.key,
{value:A.MONTHS_SHORT.value,handler:this.configLocale});this.cfg.addProperty(A.MONTHS_LONG.key,{value:A.MONTHS_LONG.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_1CHAR.key,{value:A.WEEKDAYS_1CHAR.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_SHORT.key,{value:A.WEEKDAYS_SHORT.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_MEDIUM.key,{value:A.WEEKDAYS_MEDIUM.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_LONG.key,{value:A.WEEKDAYS_LONG.value,handler:this.configLocale});var B=function(){this.cfg.refireEvent(A.LOCALE_MONTHS.key);this.cfg.refireEvent(A.LOCALE_WEEKDAYS.key);};this.cfg.subscribeToConfigEvent(A.START_WEEKDAY.key,B,this,true);this.cfg.subscribeToConfigEvent(A.MONTHS_SHORT.key,B,this,true);this.cfg.subscribeToConfigEvent(A.MONTHS_LONG.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_1CHAR.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_SHORT.key,B,this,true);this.cfg.s!
 ubscribeToConfigEvent(A.WEEKDAYS_MEDIUM.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_LONG.key,B,this,true);this.cfg.addProperty(A.LOCALE_MONTHS.key,{value:A.LOCALE_MONTHS.value,handler:this.configLocaleValues});this.cfg.addProperty(A.LOCALE_WEEKDAYS.key,{value:A.LOCALE_WEEKDAYS.value,handler:this.configLocaleValues});this.cfg.addProperty(A.DATE_DELIMITER.key,{value:A.DATE_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(A.DATE_FIELD_DELIMITER.key,{value:A.DATE_FIELD_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(A.DATE_RANGE_DELIMITER.key,{value:A.DATE_RANGE_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(A.MY_MONTH_POSITION.key,{value:A.MY_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_YEAR_POSITION.key,{value:A.MY_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});
-this.cfg.addProperty(A.MD_MONTH_POSITION.key,{value:A.MD_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_DAY_POSITION.key,{value:A.MD_DAY_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_MONTH_POSITION.key,{value:A.MDY_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_DAY_POSITION.key,{value:A.MDY_DAY_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_YEAR_POSITION.key,{value:A.MDY_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_POSITION.key,{value:A.MY_LABEL_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_YEAR_POSITION.key,{value:A.MY_LABEL_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.ad!
 dProperty(A.MY_LABEL_MONTH_SUFFIX.key,{value:A.MY_LABEL_MONTH_SUFFIX.value,handler:this.configLocale});this.cfg.addProperty(A.MY_LABEL_YEAR_SUFFIX.key,{value:A.MY_LABEL_YEAR_SUFFIX.value,handler:this.configLocale});};YAHOO.widget.Calendar.prototype.configPageDate=function(B,A,C){this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key,this._parsePageDate(A[0]),true);};YAHOO.widget.Calendar.prototype.configMinDate=function(B,A,C){var D=A[0];if(YAHOO.lang.isString(D)){D=this._parseDate(D);this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MINDATE.key,new Date(D[0],(D[1]-1),D[2]));}};YAHOO.widget.Calendar.prototype.configMaxDate=function(B,A,C){var D=A[0];if(YAHOO.lang.isString(D)){D=this._parseDate(D);this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MAXDATE.key,new Date(D[0],(D[1]-1),D[2]));}};YAHOO.widget.Calendar.prototype.configSelected=function(C,A,E){var B=A[0];var D=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;if(B){if(YAHOO.lang.i!
 sString(B)){this.cfg.setProperty(D,this._parseDates(B),true);}!
 }if(!thi
s._selectedDates){this._selectedDates=this.cfg.getProperty(D);}};YAHOO.widget.Calendar.prototype.configOptions=function(B,A,C){this.Options[B.toUpperCase()]=A[0];};YAHOO.widget.Calendar.prototype.configLocale=function(C,B,D){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.Locale[C.toUpperCase()]=B[0];this.cfg.refireEvent(A.LOCALE_MONTHS.key);this.cfg.refireEvent(A.LOCALE_WEEKDAYS.key);};YAHOO.widget.Calendar.prototype.configLocaleValues=function(D,C,E){var B=YAHOO.widget.Calendar._DEFAULT_CONFIG;D=D.toLowerCase();var G=C[0];switch(D){case B.LOCALE_MONTHS.key:switch(G){case YAHOO.widget.Calendar.SHORT:this.Locale.LOCALE_MONTHS=this.cfg.getProperty(B.MONTHS_SHORT.key).concat();break;case YAHOO.widget.Calendar.LONG:this.Locale.LOCALE_MONTHS=this.cfg.getProperty(B.MONTHS_LONG.key).concat();break;}break;case B.LOCALE_WEEKDAYS.key:switch(G){case YAHOO.widget.Calendar.ONE_CHAR:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_1CHAR.key).concat();break;case YAHOO.widget.C!
 alendar.SHORT:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_SHORT.key).concat();break;case YAHOO.widget.Calendar.MEDIUM:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_MEDIUM.key).concat();break;case YAHOO.widget.Calendar.LONG:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_LONG.key).concat();break;}var F=this.cfg.getProperty(B.START_WEEKDAY.key);if(F>0){for(var A=0;A<F;++A){this.Locale.LOCALE_WEEKDAYS.push(this.Locale.LOCALE_WEEKDAYS.shift());}}break;}};YAHOO.widget.Calendar.prototype.initStyles=function(){var A=YAHOO.widget.Calendar._STYLES;this.Style={CSS_ROW_HEADER:A.CSS_ROW_HEADER,CSS_ROW_FOOTER:A.CSS_ROW_FOOTER,CSS_CELL:A.CSS_CELL,CSS_CELL_SELECTOR:A.CSS_CELL_SELECTOR,CSS_CELL_SELECTED:A.CSS_CELL_SELECTED,CSS_CELL_SELECTABLE:A.CSS_CELL_SELECTABLE,CSS_CELL_RESTRICTED:A.CSS_CELL_RESTRICTED,CSS_CELL_TODAY:A.CSS_CELL_TODAY,CSS_CELL_OOM:A.CSS_CELL_OOM,CSS_CELL_OOB:A.CSS_CELL_OOB,CSS_HEADER:A.CSS_HEADER,CSS_HEADER_TEXT:A.CSS_HEADER_TEXT!
 ,CSS_BODY:A.CSS_BODY,CSS_WEEKDAY_CELL:A.CSS_WEEKDAY_CELL,CSS_W!
 EEKDAY_R
OW:A.CSS_WEEKDAY_ROW,CSS_FOOTER:A.CSS_FOOTER,CSS_CALENDAR:A.CSS_CALENDAR,CSS_SINGLE:A.CSS_SINGLE,CSS_CONTAINER:A.CSS_CONTAINER,CSS_NAV_LEFT:A.CSS_NAV_LEFT,CSS_NAV_RIGHT:A.CSS_NAV_RIGHT,CSS_CLOSE:A.CSS_CLOSE,CSS_CELL_TOP:A.CSS_CELL_TOP,CSS_CELL_LEFT:A.CSS_CELL_LEFT,CSS_CELL_RIGHT:A.CSS_CELL_RIGHT,CSS_CELL_BOTTOM:A.CSS_CELL_BOTTOM,CSS_CELL_HOVER:A.CSS_CELL_HOVER,CSS_CELL_HIGHLIGHT1:A.CSS_CELL_HIGHLIGHT1,CSS_CELL_HIGHLIGHT2:A.CSS_CELL_HIGHLIGHT2,CSS_CELL_HIGHLIGHT3:A.CSS_CELL_HIGHLIGHT3,CSS_CELL_HIGHLIGHT4:A.CSS_CELL_HIGHLIGHT4};};YAHOO.widget.Calendar.prototype.buildMonthLabel=function(){var A=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key);var C=this.Locale.LOCALE_MONTHS[A.getMonth()]+this.Locale.MY_LABEL_MONTH_SUFFIX;var B=A.getFullYear()+this.Locale.MY_LABEL_YEAR_SUFFIX;if(this.Locale.MY_LABEL_MONTH_POSITION==2||this.Locale.MY_LABEL_YEAR_POSITION==1){return B+C;}else{return C+B;}};YAHOO.widget.Calendar.prototype.buildDayLabel=function(A){return A.ge!
 tDate();};YAHOO.widget.Calendar.prototype.createTitleBar=function(A){var B=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||document.createElement("div");B.className=YAHOO.widget.CalendarGroup.CSS_2UPTITLE;B.innerHTML=A;this.oDomContainer.insertBefore(B,this.oDomContainer.firstChild);YAHOO.util.Dom.addClass(this.oDomContainer,"withtitle");return B;};YAHOO.widget.Calendar.prototype.removeTitleBar=function(){var A=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||null;if(A){YAHOO.util.Event.purgeElement(A);this.oDomContainer.removeChild(A);}YAHOO.util.Dom.removeClass(this.oDomContainer,"withtitle");};YAHOO.widget.Calendar.prototype.createCloseButton=function(){var D=YAHOO.util.Dom,A=YAHOO.util.Event,C=YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,F="us/my/bn/x_d.gif";var E=D.getElementsByClassName("link-close","a",this.oDomContainer)[0];
-if(!E){E=document.createElement("a");A.addListener(E,"click",function(H,G){G.hide();A.preventDefault(H);},this);}E.href="#";E.className="link-close";if(YAHOO.widget.Calendar.IMG_ROOT!==null){var B=D.getElementsByClassName(C,"img",E)[0]||document.createElement("img");B.src=YAHOO.widget.Calendar.IMG_ROOT+F;B.className=C;E.appendChild(B);}else{E.innerHTML="<span class=\""+C+" "+this.Style.CSS_CLOSE+"\"></span>";}this.oDomContainer.appendChild(E);return E;};YAHOO.widget.Calendar.prototype.removeCloseButton=function(){var A=YAHOO.util.Dom.getElementsByClassName("link-close","a",this.oDomContainer)[0]||null;if(A){YAHOO.util.Event.purgeElement(A);this.oDomContainer.removeChild(A);}};YAHOO.widget.Calendar.prototype.renderHeader=function(E){var H=7;var F="us/tr/callt.gif";var G="us/tr/calrt.gif";var L=YAHOO.widget.Calendar._DEFAULT_CONFIG;if(this.cfg.getProperty(L.SHOW_WEEK_HEADER.key)){H+=1;}if(this.cfg.getProperty(L.SHOW_WEEK_FOOTER.key)){H+=1;}E[E.length]="<thead>";E[E.length]="<!
 tr>";E[E.length]="<th colspan=\""+H+"\" class=\""+this.Style.CSS_HEADER_TEXT+"\">";E[E.length]="<div class=\""+this.Style.CSS_HEADER+"\">";var J,K=false;if(this.parent){if(this.index===0){J=true;}if(this.index==(this.parent.cfg.getProperty("pages")-1)){K=true;}}else{J=true;K=true;}var B=this.parent||this;if(J){var A=this.cfg.getProperty(L.NAV_ARROW_LEFT.key);if(A===null&&YAHOO.widget.Calendar.IMG_ROOT!==null){A=YAHOO.widget.Calendar.IMG_ROOT+F;}var C=(A===null)?"":" style=\"background-image:url("+A+")\"";E[E.length]="<a class=\""+this.Style.CSS_NAV_LEFT+"\""+C+" > </a>";}E[E.length]=this.buildMonthLabel();if(K){var D=this.cfg.getProperty(L.NAV_ARROW_RIGHT.key);if(D===null&&YAHOO.widget.Calendar.IMG_ROOT!==null){D=YAHOO.widget.Calendar.IMG_ROOT+G;}var I=(D===null)?"":" style=\"background-image:url("+D+")\"";E[E.length]="<a class=\""+this.Style.CSS_NAV_RIGHT+"\""+I+" > </a>";}E[E.length]="</div>\n</th>\n</tr>";if(this.cfg.getProperty(L.SHOW_WEEKDAYS.key)){E=this.bui!
 ldWeekdays(E);}E[E.length]="</thead>";return E;};YAHOO.widget.!
 Calendar
.prototype.buildWeekdays=function(C){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;C[C.length]="<tr class=\""+this.Style.CSS_WEEKDAY_ROW+"\">";if(this.cfg.getProperty(A.SHOW_WEEK_HEADER.key)){C[C.length]="<th> </th>";}for(var B=0;B<this.Locale.LOCALE_WEEKDAYS.length;++B){C[C.length]="<th class=\"calweekdaycell\">"+this.Locale.LOCALE_WEEKDAYS[B]+"</th>";}if(this.cfg.getProperty(A.SHOW_WEEK_FOOTER.key)){C[C.length]="<th> </th>";}C[C.length]="</tr>";return C;};YAHOO.widget.Calendar.prototype.renderBody=function(c,a){var m=YAHOO.widget.Calendar._DEFAULT_CONFIG;var AC=this.cfg.getProperty(m.START_WEEKDAY.key);this.preMonthDays=c.getDay();if(AC>0){this.preMonthDays-=AC;}if(this.preMonthDays<0){this.preMonthDays+=7;}this.monthDays=YAHOO.widget.DateMath.findMonthEnd(c).getDate();this.postMonthDays=YAHOO.widget.Calendar.DISPLAY_DAYS-this.preMonthDays-this.monthDays;c=YAHOO.widget.DateMath.subtract(c,YAHOO.widget.DateMath.DAY,this.preMonthDays);var Q,H;var G="w";var W="_cell";!
 var U="wd";var k="d";var I;var h;var O=this.today.getFullYear();var j=this.today.getMonth();var D=this.today.getDate();var q=this.cfg.getProperty(m.PAGEDATE.key);var C=this.cfg.getProperty(m.HIDE_BLANK_WEEKS.key);var Z=this.cfg.getProperty(m.SHOW_WEEK_FOOTER.key);var T=this.cfg.getProperty(m.SHOW_WEEK_HEADER.key);var M=this.cfg.getProperty(m.MINDATE.key);var S=this.cfg.getProperty(m.MAXDATE.key);if(M){M=YAHOO.widget.DateMath.clearTime(M);}if(S){S=YAHOO.widget.DateMath.clearTime(S);}a[a.length]="<tbody class=\"m"+(q.getMonth()+1)+" "+this.Style.CSS_BODY+"\">";var AA=0;var J=document.createElement("div");var b=document.createElement("td");J.appendChild(b);var z=new Date(q.getFullYear(),0,1);var o=this.parent||this;for(var u=0;u<6;u++){Q=YAHOO.widget.DateMath.getWeekNumber(c,q.getFullYear(),AC);H=G+Q;if(u!==0&&C===true&&c.getMonth()!=q.getMonth()){break;}else{a[a.length]="<tr class=\""+H+"\">";if(T){a=this.renderRowHeader(Q,a);}for(var AB=0;AB<7;AB++){I=[];h=null;this.clearEle!
 ment(b);b.className=this.Style.CSS_CELL;b.id=this.id+W+AA;if(c!
 .getDate
()==D&&c.getMonth()==j&&c.getFullYear()==O){I[I.length]=o.renderCellStyleToday;}var R=[c.getFullYear(),c.getMonth()+1,c.getDate()];this.cellDates[this.cellDates.length]=R;if(c.getMonth()!=q.getMonth()){I[I.length]=o.renderCellNotThisMonth;}else{YAHOO.util.Dom.addClass(b,U+c.getDay());YAHOO.util.Dom.addClass(b,k+c.getDate());for(var t=0;t<this.renderStack.length;++t){var l=this.renderStack[t];var AD=l[0];var B;var V;var F;switch(AD){case YAHOO.widget.Calendar.DATE:B=l[1][1];V=l[1][2];F=l[1][0];if(c.getMonth()+1==B&&c.getDate()==V&&c.getFullYear()==F){h=l[2];this.renderStack.splice(t,1);}break;case YAHOO.widget.Calendar.MONTH_DAY:B=l[1][0];V=l[1][1];if(c.getMonth()+1==B&&c.getDate()==V){h=l[2];this.renderStack.splice(t,1);}break;case YAHOO.widget.Calendar.RANGE:var Y=l[1][0];var X=l[1][1];var e=Y[1];var L=Y[2];var P=Y[0];var y=new Date(P,e-1,L);var E=X[1];var g=X[2];var A=X[0];var w=new Date(A,E-1,g);if(c.getTime()>=y.getTime()&&c.getTime()<=w.getTime()){h=l[2];if(c.getTime()=!
 =w.getTime()){this.renderStack.splice(t,1);}}break;case YAHOO.widget.Calendar.WEEKDAY:var K=l[1][0];if(c.getDay()+1==K){h=l[2];}break;case YAHOO.widget.Calendar.MONTH:B=l[1][0];if(c.getMonth()+1==B){h=l[2];}break;}if(h){I[I.length]=h;}}}if(this._indexOfSelectedFieldArray(R)>-1){I[I.length]=o.renderCellStyleSelected;}if((M&&(c.getTime()<M.getTime()))||(S&&(c.getTime()>S.getTime()))){I[I.length]=o.renderOutOfBoundsDate;}else{I[I.length]=o.styleCellDefault;I[I.length]=o.renderCellDefault;}for(var n=0;n<I.length;++n){if(I[n].call(o,c,b)==YAHOO.widget.Calendar.STOP_RENDER){break;}}c.setTime(c.getTime()+YAHOO.widget.DateMath.ONE_DAY_MS);if(AA>=0&&AA<=6){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_TOP);}if((AA%7)===0){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_LEFT);}if(((AA+1)%7)===0){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_RIGHT);}var f=this.postMonthDays;if(C&&f>=7){var N=Math.floor(f/7);for(var v=0;
-v<N;++v){f-=7;}}if(AA>=((this.preMonthDays+f+this.monthDays)-7)){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_BOTTOM);}a[a.length]=J.innerHTML;AA++;}if(Z){a=this.renderRowFooter(Q,a);}a[a.length]="</tr>";}}a[a.length]="</tbody>";return a;};YAHOO.widget.Calendar.prototype.renderFooter=function(A){return A;};YAHOO.widget.Calendar.prototype.render=function(){this.beforeRenderEvent.fire();var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;var C=YAHOO.widget.DateMath.findMonthStart(this.cfg.getProperty(A.PAGEDATE.key));this.resetRenderers();this.cellDates.length=0;YAHOO.util.Event.purgeElement(this.oDomContainer,true);var B=[];B[B.length]="<table cellSpacing=\"0\" class=\""+this.Style.CSS_CALENDAR+" y"+C.getFullYear()+"\" id=\""+this.id+"\">";B=this.renderHeader(B);B=this.renderBody(C,B);B=this.renderFooter(B);B[B.length]="</table>";this.oDomContainer.innerHTML=B.join("\n");this.applyListeners();this.cells=this.oDomContainer.getElementsByTagName("td");this.cfg.refireEvent(A.TITLE.key)!
 ;this.cfg.refireEvent(A.CLOSE.key);this.cfg.refireEvent(A.IFRAME.key);this.renderEvent.fire();};YAHOO.widget.Calendar.prototype.applyListeners=function(){var K=this.oDomContainer;var B=this.parent||this;var G="a";var D="mousedown";var H=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT,G,K);var C=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT,G,K);if(H&&H.length>0){this.linkLeft=H[0];YAHOO.util.Event.addListener(this.linkLeft,D,B.previousMonth,B,true);}if(C&&C.length>0){this.linkRight=C[0];YAHOO.util.Event.addListener(this.linkRight,D,B.nextMonth,B,true);}if(this.domEventMap){var E,A;for(var M in this.domEventMap){if(YAHOO.lang.hasOwnProperty(this.domEventMap,M)){var I=this.domEventMap[M];if(!(I instanceof Array)){I=[I];}for(var F=0;F<I.length;F++){var L=I[F];A=YAHOO.util.Dom.getElementsByClassName(M,L.tag,this.oDomContainer);for(var J=0;J<A.length;J++){E=A[J];YAHOO.util.Event.addListener(E,L.event,L.handler,L.scope,L.correct);}}}}}YAHOO.util.Eve!
 nt.addListener(this.oDomContainer,"click",this.doSelectCell,th!
 is);YAHO
O.util.Event.addListener(this.oDomContainer,"mouseover",this.doCellMouseOver,this);YAHOO.util.Event.addListener(this.oDomContainer,"mouseout",this.doCellMouseOut,this);};YAHOO.widget.Calendar.prototype.getDateByCellId=function(B){var A=this.getDateFieldsByCellId(B);return new Date(A[0],A[1]-1,A[2]);};YAHOO.widget.Calendar.prototype.getDateFieldsByCellId=function(A){A=A.toLowerCase().split("_cell")[1];A=parseInt(A,10);return this.cellDates[A];};YAHOO.widget.Calendar.prototype.renderOutOfBoundsDate=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_OOB);A.innerHTML=B.getDate();return YAHOO.widget.Calendar.STOP_RENDER;};YAHOO.widget.Calendar.prototype.renderRowHeader=function(B,A){A[A.length]="<th class=\"calrowhead\">"+B+"</th>";return A;};YAHOO.widget.Calendar.prototype.renderRowFooter=function(B,A){A[A.length]="<th class=\"calrowfoot\">"+B+"</th>";return A;};YAHOO.widget.Calendar.prototype.renderCellDefault=function(B,A){A.innerHTML="<a href=\"#\" class=\""+this.Sty!
 le.CSS_CELL_SELECTOR+"\">"+this.buildDayLabel(B)+"</a>";};YAHOO.widget.Calendar.prototype.styleCellDefault=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_SELECTABLE);};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight1=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT1);};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight2=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT2);};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight3=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT3);};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight4=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT4);};YAHOO.widget.Calendar.prototype.renderCellStyleToday=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_TODAY);};YAHOO.widget.Calendar.prototype.renderCellStyleSelected=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_SELECTED);};YAHOO.widget.Calendar.prototy!
 pe.renderCellNotThisMonth=function(B,A){YAHOO.util.Dom.addClas!
 s(A,this
.Style.CSS_CELL_OOM);A.innerHTML=B.getDate();return YAHOO.widget.Calendar.STOP_RENDER;};YAHOO.widget.Calendar.prototype.renderBodyCellRestricted=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL);YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_RESTRICTED);A.innerHTML=B.getDate();return YAHOO.widget.Calendar.STOP_RENDER;};YAHOO.widget.Calendar.prototype.addMonths=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.add(this.cfg.getProperty(A),YAHOO.widget.DateMath.MONTH,B));this.resetRenderers();this.changePageEvent.fire();};YAHOO.widget.Calendar.prototype.subtractMonths=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.subtract(this.cfg.getProperty(A),YAHOO.widget.DateMath.MONTH,B));this.resetRenderers();this.changePageEvent.fire();};YAHOO.widget.Calendar.prototype.addYears=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;th!
 is.cfg.setProperty(A,YAHOO.widget.DateMath.add(this.cfg.getProperty(A),YAHOO.widget.DateMath.YEAR,B));this.resetRenderers();this.changePageEvent.fire();};YAHOO.widget.Calendar.prototype.subtractYears=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.subtract(this.cfg.getProperty(A),YAHOO.widget.DateMath.YEAR,B));this.resetRenderers();this.changePageEvent.fire();};YAHOO.widget.Calendar.prototype.nextMonth=function(){this.addMonths(1);};YAHOO.widget.Calendar.prototype.previousMonth=function(){this.subtractMonths(1);};YAHOO.widget.Calendar.prototype.nextYear=function(){this.addYears(1);};YAHOO.widget.Calendar.prototype.previousYear=function(){this.subtractYears(1);};YAHOO.widget.Calendar.prototype.reset=function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.resetProperty(A.SELECTED.key);this.cfg.resetProperty(A.PAGEDATE.key);this.resetEvent.fire();
-};YAHOO.widget.Calendar.prototype.clear=function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.setProperty(A.SELECTED.key,[]);this.cfg.setProperty(A.PAGEDATE.key,new Date(this.today.getTime()));this.clearEvent.fire();};YAHOO.widget.Calendar.prototype.select=function(C){var F=this._toFieldArray(C);var B=[];var E=[];var G=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;for(var A=0;A<F.length;++A){var D=F[A];if(!this.isDateOOB(this._toDate(D))){if(B.length===0){this.beforeSelectEvent.fire();E=this.cfg.getProperty(G);}B.push(D);if(this._indexOfSelectedFieldArray(D)==-1){E[E.length]=D;}}}if(B.length>0){if(this.parent){this.parent.cfg.setProperty(G,E);}else{this.cfg.setProperty(G,E);}this.selectEvent.fire(B);}return this.getSelectedDates();};YAHOO.widget.Calendar.prototype.selectCell=function(D){var B=this.cells[D];var H=this.cellDates[D];var G=this._toDate(H);var C=YAHOO.util.Dom.hasClass(B,this.Style.CSS_CELL_SELECTABLE);if(C){this.beforeSelectEvent.fire();var F=YAH!
 OO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;var E=this.cfg.getProperty(F);var A=H.concat();if(this._indexOfSelectedFieldArray(A)==-1){E[E.length]=A;}if(this.parent){this.parent.cfg.setProperty(F,E);}else{this.cfg.setProperty(F,E);}this.renderCellStyleSelected(G,B);this.selectEvent.fire([A]);this.doCellMouseOut.call(B,null,this);}return this.getSelectedDates();};YAHOO.widget.Calendar.prototype.deselect=function(E){var A=this._toFieldArray(E);var D=[];var G=[];var H=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;for(var B=0;B<A.length;++B){var F=A[B];if(!this.isDateOOB(this._toDate(F))){if(D.length===0){this.beforeDeselectEvent.fire();G=this.cfg.getProperty(H);}D.push(F);var C=this._indexOfSelectedFieldArray(F);if(C!=-1){G.splice(C,1);}}}if(D.length>0){if(this.parent){this.parent.cfg.setProperty(H,G);}else{this.cfg.setProperty(H,G);}this.deselectEvent.fire(D);}return this.getSelectedDates();};YAHOO.widget.Calendar.prototype.deselectCell=function(E){var H=this.cells[E]!
 ;var B=this.cellDates[E];var F=this._indexOfSelectedFieldArray!
 (B);var 
G=YAHOO.util.Dom.hasClass(H,this.Style.CSS_CELL_SELECTABLE);if(G){this.beforeDeselectEvent.fire();var I=YAHOO.widget.Calendar._DEFAULT_CONFIG;var D=this.cfg.getProperty(I.SELECTED.key);var C=this._toDate(B);var A=B.concat();if(F>-1){if(this.cfg.getProperty(I.PAGEDATE.key).getMonth()==C.getMonth()&&this.cfg.getProperty(I.PAGEDATE.key).getFullYear()==C.getFullYear()){YAHOO.util.Dom.removeClass(H,this.Style.CSS_CELL_SELECTED);}D.splice(F,1);}if(this.parent){this.parent.cfg.setProperty(I.SELECTED.key,D);}else{this.cfg.setProperty(I.SELECTED.key,D);}this.deselectEvent.fire(A);}return this.getSelectedDates();};YAHOO.widget.Calendar.prototype.deselectAll=function(){this.beforeDeselectEvent.fire();var D=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;var A=this.cfg.getProperty(D);var B=A.length;var C=A.concat();if(this.parent){this.parent.cfg.setProperty(D,[]);}else{this.cfg.setProperty(D,[]);}if(B>0){this.deselectEvent.fire(C);}return this.getSelectedDates();};YAHOO.widget.Calen!
 dar.prototype._toFieldArray=function(B){var A=[];if(B instanceof Date){A=[[B.getFullYear(),B.getMonth()+1,B.getDate()]];}else{if(YAHOO.lang.isString(B)){A=this._parseDates(B);}else{if(YAHOO.lang.isArray(B)){for(var C=0;C<B.length;++C){var D=B[C];A[A.length]=[D.getFullYear(),D.getMonth()+1,D.getDate()];}}}}return A;};YAHOO.widget.Calendar.prototype._toDate=function(A){if(A instanceof Date){return A;}else{return new Date(A[0],A[1]-1,A[2]);}};YAHOO.widget.Calendar.prototype._fieldArraysAreEqual=function(C,B){var A=false;if(C[0]==B[0]&&C[1]==B[1]&&C[2]==B[2]){A=true;}return A;};YAHOO.widget.Calendar.prototype._indexOfSelectedFieldArray=function(E){var D=-1;var A=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);for(var C=0;C<A.length;++C){var B=A[C];if(E[0]==B[0]&&E[1]==B[1]&&E[2]==B[2]){D=C;break;}}return D;};YAHOO.widget.Calendar.prototype.isDateOOM=function(A){return(A.getMonth()!=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key)!
 .getMonth());};YAHOO.widget.Calendar.prototype.isDateOOB=funct!
 ion(D){v
ar A=YAHOO.widget.Calendar._DEFAULT_CONFIG;var E=this.cfg.getProperty(A.MINDATE.key);var F=this.cfg.getProperty(A.MAXDATE.key);var C=YAHOO.widget.DateMath;if(E){E=C.clearTime(E);}if(F){F=C.clearTime(F);}var B=new Date(D.getTime());B=C.clearTime(B);return((E&&B.getTime()<E.getTime())||(F&&B.getTime()>F.getTime()));};YAHOO.widget.Calendar.prototype._parsePageDate=function(B){var E;var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;if(B){if(B instanceof Date){E=YAHOO.widget.DateMath.findMonthStart(B);}else{var F,D,C;C=B.split(this.cfg.getProperty(A.DATE_FIELD_DELIMITER.key));F=parseInt(C[this.cfg.getProperty(A.MY_MONTH_POSITION.key)-1],10)-1;D=parseInt(C[this.cfg.getProperty(A.MY_YEAR_POSITION.key)-1],10);E=new Date(D,F,1);}}else{E=new Date(this.today.getFullYear(),this.today.getMonth(),1);}return E;};YAHOO.widget.Calendar.prototype.onBeforeSelect=function(){if(this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MULTI_SELECT.key)===false){if(this.parent){this.parent.callChildFu!
 nction("clearAllBodyCellStyles",this.Style.CSS_CELL_SELECTED);this.parent.deselectAll();}else{this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);this.deselectAll();}}};YAHOO.widget.Calendar.prototype.onSelect=function(A){};YAHOO.widget.Calendar.prototype.onBeforeDeselect=function(){};YAHOO.widget.Calendar.prototype.onDeselect=function(A){};YAHOO.widget.Calendar.prototype.onChangePage=function(){this.render();};YAHOO.widget.Calendar.prototype.onRender=function(){};YAHOO.widget.Calendar.prototype.onReset=function(){this.render();};YAHOO.widget.Calendar.prototype.onClear=function(){this.render();};YAHOO.widget.Calendar.prototype.validate=function(){return true;};YAHOO.widget.Calendar.prototype._parseDate=function(C){var D=C.split(this.Locale.DATE_FIELD_DELIMITER);var A;if(D.length==2){A=[D[this.Locale.MD_MONTH_POSITION-1],D[this.Locale.MD_DAY_POSITION-1]];A.type=YAHOO.widget.Calendar.MONTH_DAY;}else{A=[D[this.Locale.MDY_YEAR_POSITION-1],D[this.Locale.MDY_MONTH_POSITION-!
 1],D[this.Locale.MDY_DAY_POSITION-1]];
-A.type=YAHOO.widget.Calendar.DATE;}for(var B=0;B<A.length;B++){A[B]=parseInt(A[B],10);}return A;};YAHOO.widget.Calendar.prototype._parseDates=function(B){var I=[];var H=B.split(this.Locale.DATE_DELIMITER);for(var G=0;G<H.length;++G){var F=H[G];if(F.indexOf(this.Locale.DATE_RANGE_DELIMITER)!=-1){var A=F.split(this.Locale.DATE_RANGE_DELIMITER);var E=this._parseDate(A[0]);var J=this._parseDate(A[1]);var D=this._parseRange(E,J);I=I.concat(D);}else{var C=this._parseDate(F);I.push(C);}}return I;};YAHOO.widget.Calendar.prototype._parseRange=function(A,F){var E=new Date(A[0],A[1]-1,A[2]);var B=YAHOO.widget.DateMath.add(new Date(A[0],A[1]-1,A[2]),YAHOO.widget.DateMath.DAY,1);var D=new Date(F[0],F[1]-1,F[2]);var C=[];C.push(A);while(B.getTime()<=D.getTime()){C.push([B.getFullYear(),B.getMonth()+1,B.getDate()]);B=YAHOO.widget.DateMath.add(B,YAHOO.widget.DateMath.DAY,1);}return C;};YAHOO.widget.Calendar.prototype.resetRenderers=function(){this.renderStack=this._renderStack.concat();};Y!
 AHOO.widget.Calendar.prototype.clearElement=function(A){A.innerHTML=" ";A.className="";};YAHOO.widget.Calendar.prototype.addRenderer=function(A,B){var D=this._parseDates(A);for(var C=0;C<D.length;++C){var E=D[C];if(E.length==2){if(E[0] instanceof Array){this._addRenderer(YAHOO.widget.Calendar.RANGE,E,B);}else{this._addRenderer(YAHOO.widget.Calendar.MONTH_DAY,E,B);}}else{if(E.length==3){this._addRenderer(YAHOO.widget.Calendar.DATE,E,B);}}}};YAHOO.widget.Calendar.prototype._addRenderer=function(B,C,A){var D=[B,C,A];this.renderStack.unshift(D);this._renderStack=this.renderStack.concat();};YAHOO.widget.Calendar.prototype.addMonthRenderer=function(B,A){this._addRenderer(YAHOO.widget.Calendar.MONTH,[B],A);};YAHOO.widget.Calendar.prototype.addWeekdayRenderer=function(B,A){this._addRenderer(YAHOO.widget.Calendar.WEEKDAY,[B],A);};YAHOO.widget.Calendar.prototype.clearAllBodyCellStyles=function(A){for(var B=0;B<this.cells.length;++B){YAHOO.util.Dom.removeClass(this.cells[B],A);}}!
 ;YAHOO.widget.Calendar.prototype.setMonth=function(C){var A=YA!
 HOO.widg
et.Calendar._DEFAULT_CONFIG.PAGEDATE.key;var B=this.cfg.getProperty(A);B.setMonth(parseInt(C,10));this.cfg.setProperty(A,B);};YAHOO.widget.Calendar.prototype.setYear=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;var C=this.cfg.getProperty(A);C.setFullYear(parseInt(B,10));this.cfg.setProperty(A,C);};YAHOO.widget.Calendar.prototype.getSelectedDates=function(){var C=[];var B=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);for(var E=0;E<B.length;++E){var D=B[E];var A=new Date(D[0],D[1]-1,D[2]);C.push(A);}C.sort(function(G,F){return G-F;});return C;};YAHOO.widget.Calendar.prototype.hide=function(){this.oDomContainer.style.display="none";};YAHOO.widget.Calendar.prototype.show=function(){this.oDomContainer.style.display="block";};YAHOO.widget.Calendar.prototype.browser=function(){var A=navigator.userAgent.toLowerCase();if(A.indexOf("opera")!=-1){return"opera";}else{if(A.indexOf("msie 7")!=-1){return"ie7";}else{if(A.indexOf("msie")!=-1!
 ){return"ie";}else{if(A.indexOf("safari")!=-1){return"safari";}else{if(A.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}}();YAHOO.widget.Calendar.prototype.toString=function(){return"Calendar "+this.id;};YAHOO.widget.Calendar_Core=YAHOO.widget.Calendar;YAHOO.widget.Cal_Core=YAHOO.widget.Calendar;YAHOO.widget.CalendarGroup=function(C,A,B){if(arguments.length>0){this.init(C,A,B);}};YAHOO.widget.CalendarGroup.prototype.init=function(C,A,B){this.initEvents();this.initStyles();this.pages=[];this.id=C;this.containerId=A;this.oDomContainer=document.getElementById(A);YAHOO.util.Dom.addClass(this.oDomContainer,YAHOO.widget.CalendarGroup.CSS_CONTAINER);YAHOO.util.Dom.addClass(this.oDomContainer,YAHOO.widget.CalendarGroup.CSS_MULTI_UP);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.setupConfig();if(B){this.cfg.applyConfig(B,true);}this.cfg.fireQueue();if(YAHOO.env.ua.opera){this.renderEvent.subscribe(this._fixWidth,this,true);}};YAHOO.widget.Cale!
 ndarGroup.prototype.setupConfig=function(){var A=YAHOO.widget.!
 Calendar
Group._DEFAULT_CONFIG;this.cfg.addProperty(A.PAGES.key,{value:A.PAGES.value,validator:this.cfg.checkNumber,handler:this.configPages});this.cfg.addProperty(A.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});this.cfg.addProperty(A.SELECTED.key,{value:[],handler:this.configSelected});this.cfg.addProperty(A.TITLE.key,{value:A.TITLE.value,handler:this.configTitle});this.cfg.addProperty(A.CLOSE.key,{value:A.CLOSE.value,handler:this.configClose});this.cfg.addProperty(A.IFRAME.key,{value:A.IFRAME.value,handler:this.configIframe,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.MINDATE.key,{value:A.MINDATE.value,handler:this.delegateConfig});this.cfg.addProperty(A.MAXDATE.key,{value:A.MAXDATE.value,handler:this.delegateConfig});this.cfg.addProperty(A.MULTI_SELECT.key,{value:A.MULTI_SELECT.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.START_WEEKDAY.key,{value:A.START_WEEKDAY.value,handler:this.delegateConfig,validator:thi!
 s.cfg.checkNumber});this.cfg.addProperty(A.SHOW_WEEKDAYS.key,{value:A.SHOW_WEEKDAYS.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_HEADER.key,{value:A.SHOW_WEEK_HEADER.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_FOOTER.key,{value:A.SHOW_WEEK_FOOTER.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.HIDE_BLANK_WEEKS.key,{value:A.HIDE_BLANK_WEEKS.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.NAV_ARROW_LEFT.key,{value:A.NAV_ARROW_LEFT.value,handler:this.delegateConfig});this.cfg.addProperty(A.NAV_ARROW_RIGHT.key,{value:A.NAV_ARROW_RIGHT.value,handler:this.delegateConfig});this.cfg.addProperty(A.MONTHS_SHORT.key,{value:A.MONTHS_SHORT.value,handler:this.delegateConfig});this.cfg.addProperty(A.MONTHS_LONG.key,{value:A.MONTHS_LONG.value,handler:this.delegateConfig});
-this.cfg.addProperty(A.WEEKDAYS_1CHAR.key,{value:A.WEEKDAYS_1CHAR.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_SHORT.key,{value:A.WEEKDAYS_SHORT.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_MEDIUM.key,{value:A.WEEKDAYS_MEDIUM.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_LONG.key,{value:A.WEEKDAYS_LONG.value,handler:this.delegateConfig});this.cfg.addProperty(A.LOCALE_MONTHS.key,{value:A.LOCALE_MONTHS.value,handler:this.delegateConfig});this.cfg.addProperty(A.LOCALE_WEEKDAYS.key,{value:A.LOCALE_WEEKDAYS.value,handler:this.delegateConfig});this.cfg.addProperty(A.DATE_DELIMITER.key,{value:A.DATE_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(A.DATE_FIELD_DELIMITER.key,{value:A.DATE_FIELD_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(A.DATE_RANGE_DELIMITER.key,{value:A.DATE_RANGE_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(A.MY_MONTH_POSITION.key,{!
 value:A.MY_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_YEAR_POSITION.key,{value:A.MY_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_MONTH_POSITION.key,{value:A.MD_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_DAY_POSITION.key,{value:A.MD_DAY_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_MONTH_POSITION.key,{value:A.MDY_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_DAY_POSITION.key,{value:A.MDY_DAY_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_YEAR_POSITION.key,{value:A.MDY_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_POSITION.key,{value:A.MY_LABE!
 L_MONTH_POSITION.value,handler:this.delegateConfig,validator:t!
 his.cfg.
checkNumber});this.cfg.addProperty(A.MY_LABEL_YEAR_POSITION.key,{value:A.MY_LABEL_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_SUFFIX.key,{value:A.MY_LABEL_MONTH_SUFFIX.value,handler:this.delegateConfig});this.cfg.addProperty(A.MY_LABEL_YEAR_SUFFIX.key,{value:A.MY_LABEL_YEAR_SUFFIX.value,handler:this.delegateConfig});};YAHOO.widget.CalendarGroup.prototype.initEvents=function(){var C=this;var E="Event";var B=function(G,J,F){for(var I=0;I<C.pages.length;++I){var H=C.pages[I];H[this.type+E].subscribe(G,J,F);}};var A=function(F,I){for(var H=0;H<C.pages.length;++H){var G=C.pages[H];G[this.type+E].unsubscribe(F,I);}};var D=YAHOO.widget.Calendar._EVENT_TYPES;this.beforeSelectEvent=new YAHOO.util.CustomEvent(D.BEFORE_SELECT);this.beforeSelectEvent.subscribe=B;this.beforeSelectEvent.unsubscribe=A;this.selectEvent=new YAHOO.util.CustomEvent(D.SELECT);this.selectEvent.subscribe=B;this.selectEvent.unsubscribe=A;th!
 is.beforeDeselectEvent=new YAHOO.util.CustomEvent(D.BEFORE_DESELECT);this.beforeDeselectEvent.subscribe=B;this.beforeDeselectEvent.unsubscribe=A;this.deselectEvent=new YAHOO.util.CustomEvent(D.DESELECT);this.deselectEvent.subscribe=B;this.deselectEvent.unsubscribe=A;this.changePageEvent=new YAHOO.util.CustomEvent(D.CHANGE_PAGE);this.changePageEvent.subscribe=B;this.changePageEvent.unsubscribe=A;this.beforeRenderEvent=new YAHOO.util.CustomEvent(D.BEFORE_RENDER);this.beforeRenderEvent.subscribe=B;this.beforeRenderEvent.unsubscribe=A;this.renderEvent=new YAHOO.util.CustomEvent(D.RENDER);this.renderEvent.subscribe=B;this.renderEvent.unsubscribe=A;this.resetEvent=new YAHOO.util.CustomEvent(D.RESET);this.resetEvent.subscribe=B;this.resetEvent.unsubscribe=A;this.clearEvent=new YAHOO.util.CustomEvent(D.CLEAR);this.clearEvent.subscribe=B;this.clearEvent.unsubscribe=A;};YAHOO.widget.CalendarGroup.prototype.configPages=function(K,J,G){var E=J[0];var C=YAHOO.widget.CalendarGroup._DEFAU!
 LT_CONFIG.PAGEDATE.key;var O="_";var L="groupcal";var N="first!
 -of-type
";var D="last-of-type";for(var B=0;B<E;++B){var M=this.id+O+B;var I=this.containerId+O+B;var H=this.cfg.getConfig();H.close=false;H.title=false;var A=this.constructChild(M,I,H);var F=A.cfg.getProperty(C);this._setMonthOnDate(F,F.getMonth()+B);A.cfg.setProperty(C,F);YAHOO.util.Dom.removeClass(A.oDomContainer,this.Style.CSS_SINGLE);YAHOO.util.Dom.addClass(A.oDomContainer,L);if(B===0){YAHOO.util.Dom.addClass(A.oDomContainer,N);}if(B==(E-1)){YAHOO.util.Dom.addClass(A.oDomContainer,D);}A.parent=this;A.index=B;this.pages[this.pages.length]=A;}};YAHOO.widget.CalendarGroup.prototype.configPageDate=function(H,G,E){var C=G[0];var F;var D=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;for(var B=0;B<this.pages.length;++B){var A=this.pages[B];if(B===0){F=A._parsePageDate(C);A.cfg.setProperty(D,F);}else{var I=new Date(F);this._setMonthOnDate(I,I.getMonth()+B);A.cfg.setProperty(D,I);}}};YAHOO.widget.CalendarGroup.prototype.configSelected=function(C,A,E){var D=YAHOO.widget.Calendar!
 Group._DEFAULT_CONFIG.SELECTED.key;this.delegateConfig(C,A,E);var B=(this.pages.length>0)?this.pages[0].cfg.getProperty(D):[];this.cfg.setProperty(D,B,true);};YAHOO.widget.CalendarGroup.prototype.delegateConfig=function(B,A,E){var F=A[0];var D;for(var C=0;C<this.pages.length;C++){D=this.pages[C];D.cfg.setProperty(B,F);}};YAHOO.widget.CalendarGroup.prototype.setChildFunction=function(D,B){var A=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);for(var C=0;C<A;++C){this.pages[C][D]=B;}};YAHOO.widget.CalendarGroup.prototype.callChildFunction=function(F,B){var A=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);for(var E=0;E<A;++E){var D=this.pages[E];if(D[F]){var C=D[F];C.call(D,B);}}};YAHOO.widget.CalendarGroup.prototype.constructChild=function(D,B,C){var A=document.getElementById(B);if(!A){A=document.createElement("div");A.id=B;this.oDomContainer.appendChild(A);
-}return new YAHOO.widget.Calendar(D,B,C);};YAHOO.widget.CalendarGroup.prototype.setMonth=function(E){E=parseInt(E,10);var F;var B=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;for(var D=0;D<this.pages.length;++D){var C=this.pages[D];var A=C.cfg.getProperty(B);if(D===0){F=A.getFullYear();}else{A.setYear(F);}this._setMonthOnDate(A,E+D);C.cfg.setProperty(B,A);}};YAHOO.widget.CalendarGroup.prototype.setYear=function(C){var B=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;C=parseInt(C,10);for(var E=0;E<this.pages.length;++E){var D=this.pages[E];var A=D.cfg.getProperty(B);if((A.getMonth()+1)==1&&E>0){C+=1;}D.setYear(C);}};YAHOO.widget.CalendarGroup.prototype.render=function(){this.renderHeader();for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.render();}this.renderFooter();};YAHOO.widget.CalendarGroup.prototype.select=function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.select(A);}return this.getSelectedDates();};YAHOO.widget.Calenda!
 rGroup.prototype.selectCell=function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.selectCell(A);}return this.getSelectedDates();};YAHOO.widget.CalendarGroup.prototype.deselect=function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.deselect(A);}return this.getSelectedDates();};YAHOO.widget.CalendarGroup.prototype.deselectAll=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.deselectAll();}return this.getSelectedDates();};YAHOO.widget.CalendarGroup.prototype.deselectCell=function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.deselectCell(A);}return this.getSelectedDates();};YAHOO.widget.CalendarGroup.prototype.reset=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.reset();}};YAHOO.widget.CalendarGroup.prototype.clear=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.clear();}};YAHOO.widget.CalendarGroup.prototype.nextMonth=function(){for(var B=0;B<this.pages.length;++!
 B){var A=this.pages[B];A.nextMonth();}};YAHOO.widget.CalendarG!
 roup.pro
totype.previousMonth=function(){for(var B=this.pages.length-1;B>=0;--B){var A=this.pages[B];A.previousMonth();}};YAHOO.widget.CalendarGroup.prototype.nextYear=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.nextYear();}};YAHOO.widget.CalendarGroup.prototype.previousYear=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.previousYear();}};YAHOO.widget.CalendarGroup.prototype.getSelectedDates=function(){var C=[];var B=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key);for(var E=0;E<B.length;++E){var D=B[E];var A=new Date(D[0],D[1]-1,D[2]);C.push(A);}C.sort(function(G,F){return G-F;});return C;};YAHOO.widget.CalendarGroup.prototype.addRenderer=function(A,B){for(var D=0;D<this.pages.length;++D){var C=this.pages[D];C.addRenderer(A,B);}};YAHOO.widget.CalendarGroup.prototype.addMonthRenderer=function(D,A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.addMonthRenderer(D,A);}};YAHOO.widget.CalendarGroup.!
 prototype.addWeekdayRenderer=function(B,A){for(var D=0;D<this.pages.length;++D){var C=this.pages[D];C.addWeekdayRenderer(B,A);}};YAHOO.widget.CalendarGroup.prototype.renderHeader=function(){};YAHOO.widget.CalendarGroup.prototype.renderFooter=function(){};YAHOO.widget.CalendarGroup.prototype.addMonths=function(A){this.callChildFunction("addMonths",A);};YAHOO.widget.CalendarGroup.prototype.subtractMonths=function(A){this.callChildFunction("subtractMonths",A);};YAHOO.widget.CalendarGroup.prototype.addYears=function(A){this.callChildFunction("addYears",A);};YAHOO.widget.CalendarGroup.prototype.subtractYears=function(A){this.callChildFunction("subtractYears",A);};YAHOO.widget.CalendarGroup.prototype.show=function(){this.oDomContainer.style.display="block";if(YAHOO.env.ua.opera){this._fixWidth();}};YAHOO.widget.CalendarGroup.prototype._setMonthOnDate=function(C,D){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420&&(D<0||D>11)){var B=YAHOO.widget.DateMath;var A=B.add(C,B.MONTH,D-C.g!
 etMonth());C.setTime(A.getTime());}else{C.setMonth(D);}};YAHOO!
 .widget.
CalendarGroup.prototype._fixWidth=function(){var B=this.oDomContainer.offsetWidth;var A=0;for(var D=0;D<this.pages.length;++D){var C=this.pages[D];A+=C.oDomContainer.offsetWidth;}if(A>0){this.oDomContainer.style.width=A+"px";}};YAHOO.widget.CalendarGroup.CSS_CONTAINER="yui-calcontainer";YAHOO.widget.CalendarGroup.CSS_MULTI_UP="multi";YAHOO.widget.CalendarGroup.CSS_2UPTITLE="title";YAHOO.widget.CalendarGroup.CSS_2UPCLOSE="close-icon";YAHOO.lang.augmentProto(YAHOO.widget.CalendarGroup,YAHOO.widget.Calendar,"buildDayLabel","buildMonthLabel","renderOutOfBoundsDate","renderRowHeader","renderRowFooter","renderCellDefault","styleCellDefault","renderCellStyleHighlight1","renderCellStyleHighlight2","renderCellStyleHighlight3","renderCellStyleHighlight4","renderCellStyleToday","renderCellStyleSelected","renderCellNotThisMonth","renderBodyCellRestricted","initStyles","configTitle","configClose","configIframe","createTitleBar","createCloseButton","removeTitleBar","removeCloseButton","hi!
 de","browser");YAHOO.widget.CalendarGroup._DEFAULT_CONFIG=YAHOO.widget.Calendar._DEFAULT_CONFIG;YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES={key:"pages",value:2};YAHOO.widget.CalendarGroup.prototype.toString=function(){return"CalendarGroup "+this.id;};YAHOO.widget.CalGrp=YAHOO.widget.CalendarGroup;YAHOO.widget.Calendar2up=function(C,A,B){this.init(C,A,B);};YAHOO.extend(YAHOO.widget.Calendar2up,YAHOO.widget.CalendarGroup);YAHOO.widget.Cal2up=YAHOO.widget.Calendar2up;YAHOO.register("calendar",YAHOO.widget.Calendar,{version:"2.3.1",build:"541"});
\ No newline at end of file
+(function(){YAHOO.util.Config=function(D){if(D){this.init(D);}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE);},checkNumber:function(D){return(!isNaN(D));},fireEvent:function(D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F);}},addProperty:function(E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handler,this.owner);}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queueProperty(E,D.valu!
 e);}},getConfig:function(){var D={},F,E;for(F in this.config){E=this.config[F];if(E&&E.event){D[F]=E.value;}}return D;},getProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E.value;}else{return undefined;}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true;}}else{return false;}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E,G);return true;}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validator(G)){return false;}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChangedEvent.fire([E,G]);}return true;}}else{return false;}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false;}else{if(!B.isUndefined(P)){R.val!
 ue=P;}else{P=R.value;}K=false;J=this.eventQueue.length;for(L=0!
 ;L<J;L++
){G=this.eventQueue[L];if(G){H=G[0];I=G[1];if(H==S){this.eventQueue[L]=null;this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]);K=true;break;}}}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P]);}}if(R.supercedes){O=R.supercedes.length;for(T=0;T<O;T++){Q=R.supercedes[T];F=this.eventQueue.length;for(E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M[0];D=M[1];if(N==Q.toLowerCase()){this.eventQueue.push([N,D]);this.eventQueue[E]=null;break;}}}}}return true;}else{return false;}},refireEvent:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queueProperty(D);}else{this.fireEvent(D,E.value);}}},applyConfig:function(D,G){var F,E;if(G){E={};for(F in D){if(B.hasOwnProperty(D,F)){E[F.toLowerCase()]=D[F];}}this.initialConfig=E;}for(F in D){if(B.hasOwnProperty(D,F)){this.queueProperty(F,D[F]);}}},refresh:function(){var D;for(D in this.config){this.refireEvent(D);}},fireQueue:function(){var E,H,D,G,F;this.queueInProgress=tr!
 ue;for(E=0;E<this.eventQueue.length;E++){H=this.eventQueue[E];if(H){D=H[0];G=H[1];F=this.config[D];F.value=G;this.fireEvent(D,G);}}this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()];if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D);}return true;}else{return false;}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F&&F.event){return F.event.unsubscribe(E,G);}else{return false;}},toString:function(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]";}return D;},outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length;for(E=0;E<F;E++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G[1]+", ";}}return D;},destroy:function(){var E=this.config,D,F;for(D in E){if(B.hasOwnProperty(E,D)){F=E[D];F.event.unsubscribeAll();F.event=null;}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;thi!
 s.initialConfig=null;this.eventQueue=null;}};A.alreadySubscrib!
 ed=funct
ion(E,H,I){var F=E.subscribers.length,D,G;if(F>0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true;}}while(G--);}return false;};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);}());YAHOO.widget.DateMath={DAY:"D",WEEK:"W",YEAR:"Y",MONTH:"M",ONE_DAY_MS:1000*60*60*24,add:function(A,D,C){var F=new Date(A.getTime());switch(D){case this.MONTH:var E=A.getMonth()+C;var B=0;if(E<0){while(E<0){E+=12;B-=1;}}else{if(E>11){while(E>11){E-=12;B+=1;}}}F.setMonth(E);F.setFullYear(A.getFullYear()+B);break;case this.DAY:F.setDate(A.getDate()+C);break;case this.YEAR:F.setFullYear(A.getFullYear()+C);break;case this.WEEK:F.setDate(A.getDate()+(C*7));break;}return F;},subtract:function(A,C,B){return this.add(A,C,(B*-1));},before:function(C,B){var A=B.getTime();if(C.getTime()<A){return true;}else{return false;}},after:function(C,B){var A=B.getTime();if(C.getTime()>A){return true;}else{return false;}},between:function(B,A,C){if(this.after(B,A)&&this.before(B,C)){return true;}else!
 {return false;}},getJan1:function(A){return this.getDate(A,0,1);},getDayOffset:function(B,D){var C=this.getJan1(D);var A=Math.ceil((B.getTime()-C.getTime())/this.ONE_DAY_MS);return A;},getWeekNumber:function(C,F){C=this.clearTime(C);var E=new Date(C.getTime()+(4*this.ONE_DAY_MS)-((C.getDay())*this.ONE_DAY_MS));var B=this.getDate(E.getFullYear(),0,1);var A=((E.getTime()-B.getTime())/this.ONE_DAY_MS)-1;var D=Math.ceil((A)/7);return D;},isYearOverlapWeek:function(A){var C=false;var B=this.add(A,this.DAY,6);if(B.getFullYear()!=A.getFullYear()){C=true;}return C;},isMonthOverlapWeek:function(A){var C=false;var B=this.add(A,this.DAY,6);if(B.getMonth()!=A.getMonth()){C=true;}return C;},findMonthStart:function(A){var B=this.getDate(A.getFullYear(),A.getMonth(),1);return B;},findMonthEnd:function(B){var D=this.findMonthStart(B);var C=this.add(D,this.MONTH,1);var A=this.subtract(C,this.DAY,1);return A;},clearTime:function(A){A.setHours(12,0,0,0);
+return A;},getDate:function(D,A,C){var B=null;if(YAHOO.lang.isUndefined(C)){C=1;}if(D>=100){B=new Date(D,A,C);}else{B=new Date();B.setFullYear(D);B.setMonth(A);B.setDate(C);B.setHours(0,0,0,0);}return B;}};YAHOO.widget.Calendar=function(C,A,B){this.init.apply(this,arguments);};YAHOO.widget.Calendar.IMG_ROOT=null;YAHOO.widget.Calendar.DATE="D";YAHOO.widget.Calendar.MONTH_DAY="MD";YAHOO.widget.Calendar.WEEKDAY="WD";YAHOO.widget.Calendar.RANGE="R";YAHOO.widget.Calendar.MONTH="M";YAHOO.widget.Calendar.DISPLAY_DAYS=42;YAHOO.widget.Calendar.STOP_RENDER="S";YAHOO.widget.Calendar.SHORT="short";YAHOO.widget.Calendar.LONG="long";YAHOO.widget.Calendar.MEDIUM="medium";YAHOO.widget.Calendar.ONE_CHAR="1char";YAHOO.widget.Calendar._DEFAULT_CONFIG={PAGEDATE:{key:"pagedate",value:null},SELECTED:{key:"selected",value:null},TITLE:{key:"title",value:""},CLOSE:{key:"close",value:false},IFRAME:{key:"iframe",value:(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6)?true:false},MINDATE:{key:"mindate",value:null!
 },MAXDATE:{key:"maxdate",value:null},MULTI_SELECT:{key:"multi_select",value:false},START_WEEKDAY:{key:"start_weekday",value:0},SHOW_WEEKDAYS:{key:"show_weekdays",value:true},SHOW_WEEK_HEADER:{key:"show_week_header",value:false},SHOW_WEEK_FOOTER:{key:"show_week_footer",value:false},HIDE_BLANK_WEEKS:{key:"hide_blank_weeks",value:false},NAV_ARROW_LEFT:{key:"nav_arrow_left",value:null},NAV_ARROW_RIGHT:{key:"nav_arrow_right",value:null},MONTHS_SHORT:{key:"months_short",value:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},MONTHS_LONG:{key:"months_long",value:["January","February","March","April","May","June","July","August","September","October","November","December"]},WEEKDAYS_1CHAR:{key:"weekdays_1char",value:["S","M","T","W","T","F","S"]},WEEKDAYS_SHORT:{key:"weekdays_short",value:["Su","Mo","Tu","We","Th","Fr","Sa"]},WEEKDAYS_MEDIUM:{key:"weekdays_medium",value:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},WEEKDAYS_LONG:{key:"weekdays_long",value:["!
 Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Sa!
 turday"]
},LOCALE_MONTHS:{key:"locale_months",value:"long"},LOCALE_WEEKDAYS:{key:"locale_weekdays",value:"short"},DATE_DELIMITER:{key:"date_delimiter",value:","},DATE_FIELD_DELIMITER:{key:"date_field_delimiter",value:"/"},DATE_RANGE_DELIMITER:{key:"date_range_delimiter",value:"-"},MY_MONTH_POSITION:{key:"my_month_position",value:1},MY_YEAR_POSITION:{key:"my_year_position",value:2},MD_MONTH_POSITION:{key:"md_month_position",value:1},MD_DAY_POSITION:{key:"md_day_position",value:2},MDY_MONTH_POSITION:{key:"mdy_month_position",value:1},MDY_DAY_POSITION:{key:"mdy_day_position",value:2},MDY_YEAR_POSITION:{key:"mdy_year_position",value:3},MY_LABEL_MONTH_POSITION:{key:"my_label_month_position",value:1},MY_LABEL_YEAR_POSITION:{key:"my_label_year_position",value:2},MY_LABEL_MONTH_SUFFIX:{key:"my_label_month_suffix",value:" "},MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix",value:""},NAV:{key:"navigator",value:null}};YAHOO.widget.Calendar._EVENT_TYPES={BEFORE_SELECT:"beforeSelect",SELECT:"sele!
 ct",BEFORE_DESELECT:"beforeDeselect",DESELECT:"deselect",CHANGE_PAGE:"changePage",BEFORE_RENDER:"beforeRender",RENDER:"render",RESET:"reset",CLEAR:"clear",BEFORE_HIDE:"beforeHide",HIDE:"hide",BEFORE_SHOW:"beforeShow",SHOW:"show",BEFORE_HIDE_NAV:"beforeHideNav",HIDE_NAV:"hideNav",BEFORE_SHOW_NAV:"beforeShowNav",SHOW_NAV:"showNav",BEFORE_RENDER_NAV:"beforeRenderNav",RENDER_NAV:"renderNav"};YAHOO.widget.Calendar._STYLES={CSS_ROW_HEADER:"calrowhead",CSS_ROW_FOOTER:"calrowfoot",CSS_CELL:"calcell",CSS_CELL_SELECTOR:"selector",CSS_CELL_SELECTED:"selected",CSS_CELL_SELECTABLE:"selectable",CSS_CELL_RESTRICTED:"restricted",CSS_CELL_TODAY:"today",CSS_CELL_OOM:"oom",CSS_CELL_OOB:"previous",CSS_HEADER:"calheader",CSS_HEADER_TEXT:"calhead",CSS_BODY:"calbody",CSS_WEEKDAY_CELL:"calweekdaycell",CSS_WEEKDAY_ROW:"calweekdayrow",CSS_FOOTER:"calfoot",CSS_CALENDAR:"yui-calendar",CSS_SINGLE:"single",CSS_CONTAINER:"yui-calcontainer",CSS_NAV_LEFT:"calnavleft",CSS_NAV_RIGHT:"calnavright",CSS_NAV:"ca!
 lnav",CSS_CLOSE:"calclose",CSS_CELL_TOP:"calcelltop",CSS_CELL_!
 LEFT:"ca
lcellleft",CSS_CELL_RIGHT:"calcellright",CSS_CELL_BOTTOM:"calcellbottom",CSS_CELL_HOVER:"calcellhover",CSS_CELL_HIGHLIGHT1:"highlight1",CSS_CELL_HIGHLIGHT2:"highlight2",CSS_CELL_HIGHLIGHT3:"highlight3",CSS_CELL_HIGHLIGHT4:"highlight4"};YAHOO.widget.Calendar.prototype={Config:null,parent:null,index:-1,cells:null,cellDates:null,id:null,containerId:null,oDomContainer:null,today:null,renderStack:null,_renderStack:null,oNavigator:null,_selectedDates:null,domEventMap:null,_parseArgs:function(B){var A={id:null,container:null,config:null};if(B&&B.length&&B.length>0){switch(B.length){case 1:A.id=null;A.container=B[0];A.config=null;break;case 2:if(YAHOO.lang.isObject(B[1])&&!B[1].tagName&&!(B[1] instanceof String)){A.id=null;A.container=B[0];A.config=B[1];}else{A.id=B[0];A.container=B[1];A.config=null;}break;default:A.id=B[0];A.container=B[1];A.config=B[2];break;}}else{}return A;},init:function(D,B,C){var A=this._parseArgs(arguments);D=A.id;B=A.container;C=A.config;this.oDomContainer=!
 YAHOO.util.Dom.get(B);if(!this.oDomContainer.id){this.oDomContainer.id=YAHOO.util.Dom.generateId();}if(!D){D=this.oDomContainer.id+"_t";}this.id=D;this.containerId=this.oDomContainer.id;this.initEvents();this.today=new Date();YAHOO.widget.DateMath.clearTime(this.today);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.initStyles();YAHOO.util.Dom.addClass(this.oDomContainer,this.Style.CSS_CONTAINER);YAHOO.util.Dom.addClass(this.oDomContainer,this.Style.CSS_SINGLE);this.cellDates=[];this.cells=[];this.renderStack=[];this._renderStack=[];this.setupConfig();if(C){this.cfg.applyConfig(C,true);}this.cfg.fireQueue();},configIframe:function(C,B,D){var A=B[0];if(!this.parent){if(YAHOO.util.Dom.inDocument(this.oDomContainer)){if(A){var E=YAHOO.util.Dom.getStyle(this.oDomContainer,"position");if(E=="absolute"||E=="relative"){if(!YAHOO.util.Dom.inDocument(this.iframe)){this.iframe=document.createElement("iframe");
+this.iframe.src="javascript:false;";YAHOO.util.Dom.setStyle(this.iframe,"opacity","0");if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6){YAHOO.util.Dom.addClass(this.iframe,"fixedsize");}this.oDomContainer.insertBefore(this.iframe,this.oDomContainer.firstChild);}}}else{if(this.iframe){if(this.iframe.parentNode){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;}}}}},configTitle:function(B,A,C){var E=A[0];if(E){this.createTitleBar(E);}else{var D=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.CLOSE.key);if(!D){this.removeTitleBar();}else{this.createTitleBar(" ");}}},configClose:function(B,A,C){var E=A[0],D=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.TITLE.key);if(E){if(!D){this.createTitleBar(" ");}this.createCloseButton();}else{this.removeCloseButton();if(!D){this.removeTitleBar();}}},initEvents:function(){var A=YAHOO.widget.Calendar._EVENT_TYPES;this.beforeSelectEvent=new YAHOO.util.CustomEvent(A.BEFORE_SELECT);this.selectEvent=new!
  YAHOO.util.CustomEvent(A.SELECT);this.beforeDeselectEvent=new YAHOO.util.CustomEvent(A.BEFORE_DESELECT);this.deselectEvent=new YAHOO.util.CustomEvent(A.DESELECT);this.changePageEvent=new YAHOO.util.CustomEvent(A.CHANGE_PAGE);this.beforeRenderEvent=new YAHOO.util.CustomEvent(A.BEFORE_RENDER);this.renderEvent=new YAHOO.util.CustomEvent(A.RENDER);this.resetEvent=new YAHOO.util.CustomEvent(A.RESET);this.clearEvent=new YAHOO.util.CustomEvent(A.CLEAR);this.beforeShowEvent=new YAHOO.util.CustomEvent(A.BEFORE_SHOW);this.showEvent=new YAHOO.util.CustomEvent(A.SHOW);this.beforeHideEvent=new YAHOO.util.CustomEvent(A.BEFORE_HIDE);this.hideEvent=new YAHOO.util.CustomEvent(A.HIDE);this.beforeShowNavEvent=new YAHOO.util.CustomEvent(A.BEFORE_SHOW_NAV);this.showNavEvent=new YAHOO.util.CustomEvent(A.SHOW_NAV);this.beforeHideNavEvent=new YAHOO.util.CustomEvent(A.BEFORE_HIDE_NAV);this.hideNavEvent=new YAHOO.util.CustomEvent(A.HIDE_NAV);this.beforeRenderNavEvent=new YAHOO.util.CustomEvent(A.BE!
 FORE_RENDER_NAV);this.renderNavEvent=new YAHOO.util.CustomEven!
 t(A.REND
ER_NAV);this.beforeSelectEvent.subscribe(this.onBeforeSelect,this,true);this.selectEvent.subscribe(this.onSelect,this,true);this.beforeDeselectEvent.subscribe(this.onBeforeDeselect,this,true);this.deselectEvent.subscribe(this.onDeselect,this,true);this.changePageEvent.subscribe(this.onChangePage,this,true);this.renderEvent.subscribe(this.onRender,this,true);this.resetEvent.subscribe(this.onReset,this,true);this.clearEvent.subscribe(this.onClear,this,true);},doSelectCell:function(G,A){var L,F,I,C;var H=YAHOO.util.Event.getTarget(G);var B=H.tagName.toLowerCase();var E=false;while(B!="td"&&!YAHOO.util.Dom.hasClass(H,A.Style.CSS_CELL_SELECTABLE)){if(!E&&B=="a"&&YAHOO.util.Dom.hasClass(H,A.Style.CSS_CELL_SELECTOR)){E=true;}H=H.parentNode;B=H.tagName.toLowerCase();if(B=="html"){return ;}}if(E){YAHOO.util.Event.preventDefault(G);}L=H;if(YAHOO.util.Dom.hasClass(L,A.Style.CSS_CELL_SELECTABLE)){F=L.id.split("cell")[1];I=A.cellDates[F];C=YAHOO.widget.DateMath.getDate(I[0],I[1]-1,I[2]);!
 var K;if(A.Options.MULTI_SELECT){K=L.getElementsByTagName("a")[0];if(K){K.blur();}var D=A.cellDates[F];var J=A._indexOfSelectedFieldArray(D);if(J>-1){A.deselectCell(F);}else{A.selectCell(F);}}else{K=L.getElementsByTagName("a")[0];if(K){K.blur();}A.selectCell(F);}}},doCellMouseOver:function(C,B){var A;if(C){A=YAHOO.util.Event.getTarget(C);}else{A=this;}while(A.tagName&&A.tagName.toLowerCase()!="td"){A=A.parentNode;if(!A.tagName||A.tagName.toLowerCase()=="html"){return ;}}if(YAHOO.util.Dom.hasClass(A,B.Style.CSS_CELL_SELECTABLE)){YAHOO.util.Dom.addClass(A,B.Style.CSS_CELL_HOVER);}},doCellMouseOut:function(C,B){var A;if(C){A=YAHOO.util.Event.getTarget(C);}else{A=this;}while(A.tagName&&A.tagName.toLowerCase()!="td"){A=A.parentNode;if(!A.tagName||A.tagName.toLowerCase()=="html"){return ;}}if(YAHOO.util.Dom.hasClass(A,B.Style.CSS_CELL_SELECTABLE)){YAHOO.util.Dom.removeClass(A,B.Style.CSS_CELL_HOVER);}},setupConfig:function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.ad!
 dProperty(A.PAGEDATE.key,{value:new Date(),handler:this.config!
 PageDate
});this.cfg.addProperty(A.SELECTED.key,{value:[],handler:this.configSelected});this.cfg.addProperty(A.TITLE.key,{value:A.TITLE.value,handler:this.configTitle});this.cfg.addProperty(A.CLOSE.key,{value:A.CLOSE.value,handler:this.configClose});this.cfg.addProperty(A.IFRAME.key,{value:A.IFRAME.value,handler:this.configIframe,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.MINDATE.key,{value:A.MINDATE.value,handler:this.configMinDate});this.cfg.addProperty(A.MAXDATE.key,{value:A.MAXDATE.value,handler:this.configMaxDate});this.cfg.addProperty(A.MULTI_SELECT.key,{value:A.MULTI_SELECT.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.START_WEEKDAY.key,{value:A.START_WEEKDAY.value,handler:this.configOptions,validator:this.cfg.checkNumber});this.cfg.addProperty(A.SHOW_WEEKDAYS.key,{value:A.SHOW_WEEKDAYS.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_HEADER.key,{value:A.SHOW_WEEK_HEADE!
 R.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_FOOTER.key,{value:A.SHOW_WEEK_FOOTER.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.HIDE_BLANK_WEEKS.key,{value:A.HIDE_BLANK_WEEKS.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.NAV_ARROW_LEFT.key,{value:A.NAV_ARROW_LEFT.value,handler:this.configOptions});this.cfg.addProperty(A.NAV_ARROW_RIGHT.key,{value:A.NAV_ARROW_RIGHT.value,handler:this.configOptions});this.cfg.addProperty(A.MONTHS_SHORT.key,{value:A.MONTHS_SHORT.value,handler:this.configLocale});this.cfg.addProperty(A.MONTHS_LONG.key,{value:A.MONTHS_LONG.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_1CHAR.key,{value:A.WEEKDAYS_1CHAR.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_SHORT.key,{value:A.WEEKDAYS_SHORT.value,handler:this.configLocale});
+this.cfg.addProperty(A.WEEKDAYS_MEDIUM.key,{value:A.WEEKDAYS_MEDIUM.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_LONG.key,{value:A.WEEKDAYS_LONG.value,handler:this.configLocale});var B=function(){this.cfg.refireEvent(A.LOCALE_MONTHS.key);this.cfg.refireEvent(A.LOCALE_WEEKDAYS.key);};this.cfg.subscribeToConfigEvent(A.START_WEEKDAY.key,B,this,true);this.cfg.subscribeToConfigEvent(A.MONTHS_SHORT.key,B,this,true);this.cfg.subscribeToConfigEvent(A.MONTHS_LONG.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_1CHAR.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_SHORT.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_MEDIUM.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_LONG.key,B,this,true);this.cfg.addProperty(A.LOCALE_MONTHS.key,{value:A.LOCALE_MONTHS.value,handler:this.configLocaleValues});this.cfg.addProperty(A.LOCALE_WEEKDAYS.key,{value:A.LOCALE_WEEKDAYS.value,handler:this.configLocaleValues});this.cfg.addPro!
 perty(A.DATE_DELIMITER.key,{value:A.DATE_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(A.DATE_FIELD_DELIMITER.key,{value:A.DATE_FIELD_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(A.DATE_RANGE_DELIMITER.key,{value:A.DATE_RANGE_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(A.MY_MONTH_POSITION.key,{value:A.MY_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_YEAR_POSITION.key,{value:A.MY_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_MONTH_POSITION.key,{value:A.MD_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_DAY_POSITION.key,{value:A.MD_DAY_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_MONTH_POSITION.key,{value:A.MDY_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber}!
 );this.cfg.addProperty(A.MDY_DAY_POSITION.key,{value:A.MDY_DAY!
 _POSITIO
N.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_YEAR_POSITION.key,{value:A.MDY_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_POSITION.key,{value:A.MY_LABEL_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_YEAR_POSITION.key,{value:A.MY_LABEL_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_SUFFIX.key,{value:A.MY_LABEL_MONTH_SUFFIX.value,handler:this.configLocale});this.cfg.addProperty(A.MY_LABEL_YEAR_SUFFIX.key,{value:A.MY_LABEL_YEAR_SUFFIX.value,handler:this.configLocale});this.cfg.addProperty(A.NAV.key,{value:A.NAV.value,handler:this.configNavigator});},configPageDate:function(B,A,C){this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key,this._parsePageDate(A[0]),true);},configMinDate:function(B,A,C){var D=A[0];if!
 (YAHOO.lang.isString(D)){D=this._parseDate(D);this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MINDATE.key,YAHOO.widget.DateMath.getDate(D[0],(D[1]-1),D[2]));}},configMaxDate:function(B,A,C){var D=A[0];if(YAHOO.lang.isString(D)){D=this._parseDate(D);this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MAXDATE.key,YAHOO.widget.DateMath.getDate(D[0],(D[1]-1),D[2]));}},configSelected:function(C,A,E){var B=A[0];var D=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;if(B){if(YAHOO.lang.isString(B)){this.cfg.setProperty(D,this._parseDates(B),true);}}if(!this._selectedDates){this._selectedDates=this.cfg.getProperty(D);}},configOptions:function(B,A,C){this.Options[B.toUpperCase()]=A[0];},configLocale:function(C,B,D){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.Locale[C.toUpperCase()]=B[0];this.cfg.refireEvent(A.LOCALE_MONTHS.key);this.cfg.refireEvent(A.LOCALE_WEEKDAYS.key);},configLocaleValues:function(D,C,E){var B=YAHOO.widget.Calendar._DEFAULT_CONFIG;D=D.toL!
 owerCase();var G=C[0];switch(D){case B.LOCALE_MONTHS.key:switc!
 h(G){cas
e YAHOO.widget.Calendar.SHORT:this.Locale.LOCALE_MONTHS=this.cfg.getProperty(B.MONTHS_SHORT.key).concat();break;case YAHOO.widget.Calendar.LONG:this.Locale.LOCALE_MONTHS=this.cfg.getProperty(B.MONTHS_LONG.key).concat();break;}break;case B.LOCALE_WEEKDAYS.key:switch(G){case YAHOO.widget.Calendar.ONE_CHAR:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_1CHAR.key).concat();break;case YAHOO.widget.Calendar.SHORT:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_SHORT.key).concat();break;case YAHOO.widget.Calendar.MEDIUM:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_MEDIUM.key).concat();break;case YAHOO.widget.Calendar.LONG:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_LONG.key).concat();break;}var F=this.cfg.getProperty(B.START_WEEKDAY.key);if(F>0){for(var A=0;A<F;++A){this.Locale.LOCALE_WEEKDAYS.push(this.Locale.LOCALE_WEEKDAYS.shift());}}break;}},configNavigator:function(C,A,D){var E=A[0];if(YAHOO.widget.CalendarNavigator&&(E==!
 =true||YAHOO.lang.isObject(E))){if(!this.oNavigator){this.oNavigator=new YAHOO.widget.CalendarNavigator(this);function B(){if(!this.pages){this.oNavigator.erase();}}this.beforeRenderEvent.subscribe(B,this,true);}}else{if(this.oNavigator){this.oNavigator.destroy();this.oNavigator=null;}}},initStyles:function(){var A=YAHOO.widget.Calendar._STYLES;this.Style={CSS_ROW_HEADER:A.CSS_ROW_HEADER,CSS_ROW_FOOTER:A.CSS_ROW_FOOTER,CSS_CELL:A.CSS_CELL,CSS_CELL_SELECTOR:A.CSS_CELL_SELECTOR,CSS_CELL_SELECTED:A.CSS_CELL_SELECTED,CSS_CELL_SELECTABLE:A.CSS_CELL_SELECTABLE,CSS_CELL_RESTRICTED:A.CSS_CELL_RESTRICTED,CSS_CELL_TODAY:A.CSS_CELL_TODAY,CSS_CELL_OOM:A.CSS_CELL_OOM,CSS_CELL_OOB:A.CSS_CELL_OOB,CSS_HEADER:A.CSS_HEADER,CSS_HEADER_TEXT:A.CSS_HEADER_TEXT,CSS_BODY:A.CSS_BODY,CSS_WEEKDAY_CELL:A.CSS_WEEKDAY_CELL,CSS_WEEKDAY_ROW:A.CSS_WEEKDAY_ROW,CSS_FOOTER:A.CSS_FOOTER,CSS_CALENDAR:A.CSS_CALENDAR,CSS_SINGLE:A.CSS_SINGLE,CSS_CONTAINER:A.CSS_CONTAINER,CSS_NAV_LEFT:A.CSS_NAV_LEFT,CSS_NAV_RIGHT:A!
 .CSS_NAV_RIGHT,CSS_NAV:A.CSS_NAV,CSS_CLOSE:A.CSS_CLOSE,CSS_CEL!
 L_TOP:A.
CSS_CELL_TOP,CSS_CELL_LEFT:A.CSS_CELL_LEFT,CSS_CELL_RIGHT:A.CSS_CELL_RIGHT,CSS_CELL_BOTTOM:A.CSS_CELL_BOTTOM,CSS_CELL_HOVER:A.CSS_CELL_HOVER,CSS_CELL_HIGHLIGHT1:A.CSS_CELL_HIGHLIGHT1,CSS_CELL_HIGHLIGHT2:A.CSS_CELL_HIGHLIGHT2,CSS_CELL_HIGHLIGHT3:A.CSS_CELL_HIGHLIGHT3,CSS_CELL_HIGHLIGHT4:A.CSS_CELL_HIGHLIGHT4};
+},buildMonthLabel:function(){var A=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key);var C=this.Locale.LOCALE_MONTHS[A.getMonth()]+this.Locale.MY_LABEL_MONTH_SUFFIX;var B=A.getFullYear()+this.Locale.MY_LABEL_YEAR_SUFFIX;if(this.Locale.MY_LABEL_MONTH_POSITION==2||this.Locale.MY_LABEL_YEAR_POSITION==1){return B+C;}else{return C+B;}},buildDayLabel:function(A){return A.getDate();},createTitleBar:function(A){var B=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||document.createElement("div");B.className=YAHOO.widget.CalendarGroup.CSS_2UPTITLE;B.innerHTML=A;this.oDomContainer.insertBefore(B,this.oDomContainer.firstChild);YAHOO.util.Dom.addClass(this.oDomContainer,"withtitle");return B;},removeTitleBar:function(){var A=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||null;if(A){YAHOO.util.Event.purgeElement(A);this.oDomContainer.removeChild(A!
 );}YAHOO.util.Dom.removeClass(this.oDomContainer,"withtitle");},createCloseButton:function(){var D=YAHOO.util.Dom,A=YAHOO.util.Event,C=YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,F="us/my/bn/x_d.gif";var E=D.getElementsByClassName("link-close","a",this.oDomContainer)[0];if(!E){E=document.createElement("a");A.addListener(E,"click",function(H,G){G.hide();A.preventDefault(H);},this);}E.href="#";E.className="link-close";if(YAHOO.widget.Calendar.IMG_ROOT!==null){var B=D.getElementsByClassName(C,"img",E)[0]||document.createElement("img");B.src=YAHOO.widget.Calendar.IMG_ROOT+F;B.className=C;E.appendChild(B);}else{E.innerHTML="<span class=\""+C+" "+this.Style.CSS_CLOSE+"\"></span>";}this.oDomContainer.appendChild(E);return E;},removeCloseButton:function(){var A=YAHOO.util.Dom.getElementsByClassName("link-close","a",this.oDomContainer)[0]||null;if(A){YAHOO.util.Event.purgeElement(A);this.oDomContainer.removeChild(A);}},renderHeader:function(E){var H=7;var F="us/tr/callt.gif";var G="us/t!
 r/calrt.gif";var M=YAHOO.widget.Calendar._DEFAULT_CONFIG;if(th!
 is.cfg.g
etProperty(M.SHOW_WEEK_HEADER.key)){H+=1;}if(this.cfg.getProperty(M.SHOW_WEEK_FOOTER.key)){H+=1;}E[E.length]="<thead>";E[E.length]="<tr>";E[E.length]="<th colspan=\""+H+"\" class=\""+this.Style.CSS_HEADER_TEXT+"\">";E[E.length]="<div class=\""+this.Style.CSS_HEADER+"\">";var K,L=false;if(this.parent){if(this.index===0){K=true;}if(this.index==(this.parent.cfg.getProperty("pages")-1)){L=true;}}else{K=true;L=true;}if(K){var A=this.cfg.getProperty(M.NAV_ARROW_LEFT.key);if(A===null&&YAHOO.widget.Calendar.IMG_ROOT!==null){A=YAHOO.widget.Calendar.IMG_ROOT+F;}var C=(A===null)?"":" style=\"background-image:url("+A+")\"";E[E.length]="<a class=\""+this.Style.CSS_NAV_LEFT+"\""+C+" > </a>";}var J=this.buildMonthLabel();var B=this.parent||this;if(B.cfg.getProperty("navigator")){J="<a class=\""+this.Style.CSS_NAV+"\" href=\"#\">"+J+"</a>";}E[E.length]=J;if(L){var D=this.cfg.getProperty(M.NAV_ARROW_RIGHT.key);if(D===null&&YAHOO.widget.Calendar.IMG_ROOT!==null){D=YAHOO.widget.Calendar.I!
 MG_ROOT+G;}var I=(D===null)?"":" style=\"background-image:url("+D+")\"";E[E.length]="<a class=\""+this.Style.CSS_NAV_RIGHT+"\""+I+" > </a>";}E[E.length]="</div>\n</th>\n</tr>";if(this.cfg.getProperty(M.SHOW_WEEKDAYS.key)){E=this.buildWeekdays(E);}E[E.length]="</thead>";return E;},buildWeekdays:function(C){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;C[C.length]="<tr class=\""+this.Style.CSS_WEEKDAY_ROW+"\">";if(this.cfg.getProperty(A.SHOW_WEEK_HEADER.key)){C[C.length]="<th> </th>";}for(var B=0;B<this.Locale.LOCALE_WEEKDAYS.length;++B){C[C.length]="<th class=\"calweekdaycell\">"+this.Locale.LOCALE_WEEKDAYS[B]+"</th>";}if(this.cfg.getProperty(A.SHOW_WEEK_FOOTER.key)){C[C.length]="<th> </th>";}C[C.length]="</tr>";return C;},renderBody:function(c,a){var m=YAHOO.widget.Calendar._DEFAULT_CONFIG;var AB=this.cfg.getProperty(m.START_WEEKDAY.key);this.preMonthDays=c.getDay();if(AB>0){this.preMonthDays-=AB;}if(this.preMonthDays<0){this.preMonthDays+=7;}this.monthDays=YAH!
 OO.widget.DateMath.findMonthEnd(c).getDate();this.postMonthDay!
 s=YAHOO.
widget.Calendar.DISPLAY_DAYS-this.preMonthDays-this.monthDays;c=YAHOO.widget.DateMath.subtract(c,YAHOO.widget.DateMath.DAY,this.preMonthDays);var Q,H;var G="w";var W="_cell";var U="wd";var k="d";var I;var h;var O=this.today.getFullYear();var j=this.today.getMonth();var D=this.today.getDate();var q=this.cfg.getProperty(m.PAGEDATE.key);var C=this.cfg.getProperty(m.HIDE_BLANK_WEEKS.key);var Z=this.cfg.getProperty(m.SHOW_WEEK_FOOTER.key);var T=this.cfg.getProperty(m.SHOW_WEEK_HEADER.key);var M=this.cfg.getProperty(m.MINDATE.key);var S=this.cfg.getProperty(m.MAXDATE.key);if(M){M=YAHOO.widget.DateMath.clearTime(M);}if(S){S=YAHOO.widget.DateMath.clearTime(S);}a[a.length]="<tbody class=\"m"+(q.getMonth()+1)+" "+this.Style.CSS_BODY+"\">";var z=0;var J=document.createElement("div");var b=document.createElement("td");J.appendChild(b);var o=this.parent||this;for(var u=0;u<6;u++){Q=YAHOO.widget.DateMath.getWeekNumber(c,q.getFullYear(),AB);H=G+Q;if(u!==0&&C===true&&c.getMonth()!=q.getMont!
 h()){break;}else{a[a.length]="<tr class=\""+H+"\">";if(T){a=this.renderRowHeader(Q,a);}for(var AA=0;AA<7;AA++){I=[];this.clearElement(b);b.className=this.Style.CSS_CELL;b.id=this.id+W+z;if(c.getDate()==D&&c.getMonth()==j&&c.getFullYear()==O){I[I.length]=o.renderCellStyleToday;}var R=[c.getFullYear(),c.getMonth()+1,c.getDate()];this.cellDates[this.cellDates.length]=R;if(c.getMonth()!=q.getMonth()){I[I.length]=o.renderCellNotThisMonth;}else{YAHOO.util.Dom.addClass(b,U+c.getDay());YAHOO.util.Dom.addClass(b,k+c.getDate());for(var t=0;t<this.renderStack.length;++t){h=null;var l=this.renderStack[t];var AC=l[0];var B;var V;var F;switch(AC){case YAHOO.widget.Calendar.DATE:B=l[1][1];V=l[1][2];F=l[1][0];if(c.getMonth()+1==B&&c.getDate()==V&&c.getFullYear()==F){h=l[2];this.renderStack.splice(t,1);}break;case YAHOO.widget.Calendar.MONTH_DAY:B=l[1][0];V=l[1][1];if(c.getMonth()+1==B&&c.getDate()==V){h=l[2];this.renderStack.splice(t,1);
+}break;case YAHOO.widget.Calendar.RANGE:var Y=l[1][0];var X=l[1][1];var e=Y[1];var L=Y[2];var P=Y[0];var y=YAHOO.widget.DateMath.getDate(P,e-1,L);var E=X[1];var g=X[2];var A=X[0];var w=YAHOO.widget.DateMath.getDate(A,E-1,g);if(c.getTime()>=y.getTime()&&c.getTime()<=w.getTime()){h=l[2];if(c.getTime()==w.getTime()){this.renderStack.splice(t,1);}}break;case YAHOO.widget.Calendar.WEEKDAY:var K=l[1][0];if(c.getDay()+1==K){h=l[2];}break;case YAHOO.widget.Calendar.MONTH:B=l[1][0];if(c.getMonth()+1==B){h=l[2];}break;}if(h){I[I.length]=h;}}}if(this._indexOfSelectedFieldArray(R)>-1){I[I.length]=o.renderCellStyleSelected;}if((M&&(c.getTime()<M.getTime()))||(S&&(c.getTime()>S.getTime()))){I[I.length]=o.renderOutOfBoundsDate;}else{I[I.length]=o.styleCellDefault;I[I.length]=o.renderCellDefault;}for(var n=0;n<I.length;++n){if(I[n].call(o,c,b)==YAHOO.widget.Calendar.STOP_RENDER){break;}}c.setTime(c.getTime()+YAHOO.widget.DateMath.ONE_DAY_MS);if(z>=0&&z<=6){YAHOO.util.Dom.addClass(b,this.St!
 yle.CSS_CELL_TOP);}if((z%7)===0){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_LEFT);}if(((z+1)%7)===0){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_RIGHT);}var f=this.postMonthDays;if(C&&f>=7){var N=Math.floor(f/7);for(var v=0;v<N;++v){f-=7;}}if(z>=((this.preMonthDays+f+this.monthDays)-7)){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_BOTTOM);}a[a.length]=J.innerHTML;z++;}if(Z){a=this.renderRowFooter(Q,a);}a[a.length]="</tr>";}}a[a.length]="</tbody>";return a;},renderFooter:function(A){return A;},render:function(){this.beforeRenderEvent.fire();var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;var C=YAHOO.widget.DateMath.findMonthStart(this.cfg.getProperty(A.PAGEDATE.key));this.resetRenderers();this.cellDates.length=0;YAHOO.util.Event.purgeElement(this.oDomContainer,true);var B=[];B[B.length]="<table cellSpacing=\"0\" class=\""+this.Style.CSS_CALENDAR+" y"+C.getFullYear()+"\" id=\""+this.id+"\">";B=this.renderHeader(B);B=this.renderBody(C,B);B=this.renderFooter(B);B[B.length]="<!
 /table>";this.oDomContainer.innerHTML=B.join("\n");this.applyL!
 isteners
();this.cells=this.oDomContainer.getElementsByTagName("td");this.cfg.refireEvent(A.TITLE.key);this.cfg.refireEvent(A.CLOSE.key);this.cfg.refireEvent(A.IFRAME.key);this.renderEvent.fire();},applyListeners:function(){var K=this.oDomContainer;var B=this.parent||this;var G="a";var D="mousedown";var H=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT,G,K);var C=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT,G,K);if(H&&H.length>0){this.linkLeft=H[0];YAHOO.util.Event.addListener(this.linkLeft,D,B.previousMonth,B,true);}if(C&&C.length>0){this.linkRight=C[0];YAHOO.util.Event.addListener(this.linkRight,D,B.nextMonth,B,true);}if(B.cfg.getProperty("navigator")!==null){this.applyNavListeners();}if(this.domEventMap){var E,A;for(var M in this.domEventMap){if(YAHOO.lang.hasOwnProperty(this.domEventMap,M)){var I=this.domEventMap[M];if(!(I instanceof Array)){I=[I];}for(var F=0;F<I.length;F++){var L=I[F];A=YAHOO.util.Dom.getElementsByClassName(M,L.tag,this.oDomConta!
 iner);for(var J=0;J<A.length;J++){E=A[J];YAHOO.util.Event.addListener(E,L.event,L.handler,L.scope,L.correct);}}}}}YAHOO.util.Event.addListener(this.oDomContainer,"click",this.doSelectCell,this);YAHOO.util.Event.addListener(this.oDomContainer,"mouseover",this.doCellMouseOver,this);YAHOO.util.Event.addListener(this.oDomContainer,"mouseout",this.doCellMouseOut,this);},applyNavListeners:function(){var D=YAHOO.util.Event;var C=this.parent||this;var F=this;var B=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV,"a",this.oDomContainer);if(B.length>0){function A(J,I){var H=D.getTarget(J);if(this===H||YAHOO.util.Dom.isAncestor(this,H)){D.preventDefault(J);}var E=C.oNavigator;if(E){var G=F.cfg.getProperty("pagedate");E.setYear(G.getFullYear());E.setMonth(G.getMonth());E.show();}}D.addListener(B,"click",A);}},getDateByCellId:function(B){var A=this.getDateFieldsByCellId(B);return YAHOO.widget.DateMath.getDate(A[0],A[1]-1,A[2]);},getDateFieldsByCellId:function(A){A=A.toLowerCase(!
 ).split("_cell")[1];A=parseInt(A,10);return this.cellDates[A];!
 },getCel
lIndex:function(C){var B=-1;if(C){var A=C.getMonth(),H=C.getFullYear(),G=C.getDate(),E=this.cellDates;for(var D=0;D<E.length;++D){var F=E[D];if(F[0]===H&&F[1]===A+1&&F[2]===G){B=D;break;}}}return B;},renderOutOfBoundsDate:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_OOB);A.innerHTML=B.getDate();return YAHOO.widget.Calendar.STOP_RENDER;},renderRowHeader:function(B,A){A[A.length]="<th class=\"calrowhead\">"+B+"</th>";return A;},renderRowFooter:function(B,A){A[A.length]="<th class=\"calrowfoot\">"+B+"</th>";return A;},renderCellDefault:function(B,A){A.innerHTML="<a href=\"#\" class=\""+this.Style.CSS_CELL_SELECTOR+"\">"+this.buildDayLabel(B)+"</a>";},styleCellDefault:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_SELECTABLE);},renderCellStyleHighlight1:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT1);},renderCellStyleHighlight2:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT2);},renderCellStyleHighlight3:f!
 unction(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT3);},renderCellStyleHighlight4:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT4);},renderCellStyleToday:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_TODAY);},renderCellStyleSelected:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_SELECTED);},renderCellNotThisMonth:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_OOM);A.innerHTML=B.getDate();return YAHOO.widget.Calendar.STOP_RENDER;},renderBodyCellRestricted:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL);YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_RESTRICTED);A.innerHTML=B.getDate();return YAHOO.widget.Calendar.STOP_RENDER;},addMonths:function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.add(this.cfg.getProperty(A),YAHOO.widget.DateMath.MONTH,B));this.resetRenderers();
+this.changePageEvent.fire();},subtractMonths:function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.subtract(this.cfg.getProperty(A),YAHOO.widget.DateMath.MONTH,B));this.resetRenderers();this.changePageEvent.fire();},addYears:function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.add(this.cfg.getProperty(A),YAHOO.widget.DateMath.YEAR,B));this.resetRenderers();this.changePageEvent.fire();},subtractYears:function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.subtract(this.cfg.getProperty(A),YAHOO.widget.DateMath.YEAR,B));this.resetRenderers();this.changePageEvent.fire();},nextMonth:function(){this.addMonths(1);},previousMonth:function(){this.subtractMonths(1);},nextYear:function(){this.addYears(1);},previousYear:function(){this.subtractYears(1);},reset:function(){var A=YAHOO.widget.Calendar._DEFAULT_CO!
 NFIG;this.cfg.resetProperty(A.SELECTED.key);this.cfg.resetProperty(A.PAGEDATE.key);this.resetEvent.fire();},clear:function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.setProperty(A.SELECTED.key,[]);this.cfg.setProperty(A.PAGEDATE.key,new Date(this.today.getTime()));this.clearEvent.fire();},select:function(C){var F=this._toFieldArray(C);var B=[];var E=[];var G=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;for(var A=0;A<F.length;++A){var D=F[A];if(!this.isDateOOB(this._toDate(D))){if(B.length===0){this.beforeSelectEvent.fire();E=this.cfg.getProperty(G);}B.push(D);if(this._indexOfSelectedFieldArray(D)==-1){E[E.length]=D;}}}if(B.length>0){if(this.parent){this.parent.cfg.setProperty(G,E);}else{this.cfg.setProperty(G,E);}this.selectEvent.fire(B);}return this.getSelectedDates();},selectCell:function(D){var B=this.cells[D];var H=this.cellDates[D];var G=this._toDate(H);var C=YAHOO.util.Dom.hasClass(B,this.Style.CSS_CELL_SELECTABLE);if(C){this.beforeSelectEvent.fire()!
 ;var F=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;var !
 E=this.c
fg.getProperty(F);var A=H.concat();if(this._indexOfSelectedFieldArray(A)==-1){E[E.length]=A;}if(this.parent){this.parent.cfg.setProperty(F,E);}else{this.cfg.setProperty(F,E);}this.renderCellStyleSelected(G,B);this.selectEvent.fire([A]);this.doCellMouseOut.call(B,null,this);}return this.getSelectedDates();},deselect:function(E){var A=this._toFieldArray(E);var D=[];var G=[];var H=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;for(var B=0;B<A.length;++B){var F=A[B];if(!this.isDateOOB(this._toDate(F))){if(D.length===0){this.beforeDeselectEvent.fire();G=this.cfg.getProperty(H);}D.push(F);var C=this._indexOfSelectedFieldArray(F);if(C!=-1){G.splice(C,1);}}}if(D.length>0){if(this.parent){this.parent.cfg.setProperty(H,G);}else{this.cfg.setProperty(H,G);}this.deselectEvent.fire(D);}return this.getSelectedDates();},deselectCell:function(E){var H=this.cells[E];var B=this.cellDates[E];var F=this._indexOfSelectedFieldArray(B);var G=YAHOO.util.Dom.hasClass(H,this.Style.CSS_CELL_SELECTA!
 BLE);if(G){this.beforeDeselectEvent.fire();var I=YAHOO.widget.Calendar._DEFAULT_CONFIG;var D=this.cfg.getProperty(I.SELECTED.key);var C=this._toDate(B);var A=B.concat();if(F>-1){if(this.cfg.getProperty(I.PAGEDATE.key).getMonth()==C.getMonth()&&this.cfg.getProperty(I.PAGEDATE.key).getFullYear()==C.getFullYear()){YAHOO.util.Dom.removeClass(H,this.Style.CSS_CELL_SELECTED);}D.splice(F,1);}if(this.parent){this.parent.cfg.setProperty(I.SELECTED.key,D);}else{this.cfg.setProperty(I.SELECTED.key,D);}this.deselectEvent.fire(A);}return this.getSelectedDates();},deselectAll:function(){this.beforeDeselectEvent.fire();var D=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;var A=this.cfg.getProperty(D);var B=A.length;var C=A.concat();if(this.parent){this.parent.cfg.setProperty(D,[]);}else{this.cfg.setProperty(D,[]);}if(B>0){this.deselectEvent.fire(C);}return this.getSelectedDates();},_toFieldArray:function(B){var A=[];if(B instanceof Date){A=[[B.getFullYear(),B.getMonth()+1,B.getDate()]!
 ];}else{if(YAHOO.lang.isString(B)){A=this._parseDates(B);}else!
 {if(YAHO
O.lang.isArray(B)){for(var C=0;C<B.length;++C){var D=B[C];A[A.length]=[D.getFullYear(),D.getMonth()+1,D.getDate()];}}}}return A;},toDate:function(A){return this._toDate(A);},_toDate:function(A){if(A instanceof Date){return A;}else{return YAHOO.widget.DateMath.getDate(A[0],A[1]-1,A[2]);}},_fieldArraysAreEqual:function(C,B){var A=false;if(C[0]==B[0]&&C[1]==B[1]&&C[2]==B[2]){A=true;}return A;},_indexOfSelectedFieldArray:function(E){var D=-1;var A=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);for(var C=0;C<A.length;++C){var B=A[C];if(E[0]==B[0]&&E[1]==B[1]&&E[2]==B[2]){D=C;break;}}return D;},isDateOOM:function(A){return(A.getMonth()!=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key).getMonth());},isDateOOB:function(D){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;var E=this.cfg.getProperty(A.MINDATE.key);var F=this.cfg.getProperty(A.MAXDATE.key);var C=YAHOO.widget.DateMath;if(E){E=C.clearTime(E);}if(F){F=C.clearTime(F);}var B=new D!
 ate(D.getTime());B=C.clearTime(B);return((E&&B.getTime()<E.getTime())||(F&&B.getTime()>F.getTime()));},_parsePageDate:function(B){var E;var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;if(B){if(B instanceof Date){E=YAHOO.widget.DateMath.findMonthStart(B);}else{var F,D,C;C=B.split(this.cfg.getProperty(A.DATE_FIELD_DELIMITER.key));F=parseInt(C[this.cfg.getProperty(A.MY_MONTH_POSITION.key)-1],10)-1;D=parseInt(C[this.cfg.getProperty(A.MY_YEAR_POSITION.key)-1],10);E=YAHOO.widget.DateMath.getDate(D,F,1);}}else{E=YAHOO.widget.DateMath.getDate(this.today.getFullYear(),this.today.getMonth(),1);}return E;},onBeforeSelect:function(){if(this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MULTI_SELECT.key)===false){if(this.parent){this.parent.callChildFunction("clearAllBodyCellStyles",this.Style.CSS_CELL_SELECTED);this.parent.deselectAll();}else{this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);this.deselectAll();
+}}},onSelect:function(A){},onBeforeDeselect:function(){},onDeselect:function(A){},onChangePage:function(){this.render();},onRender:function(){},onReset:function(){this.render();},onClear:function(){this.render();},validate:function(){return true;},_parseDate:function(C){var D=C.split(this.Locale.DATE_FIELD_DELIMITER);var A;if(D.length==2){A=[D[this.Locale.MD_MONTH_POSITION-1],D[this.Locale.MD_DAY_POSITION-1]];A.type=YAHOO.widget.Calendar.MONTH_DAY;}else{A=[D[this.Locale.MDY_YEAR_POSITION-1],D[this.Locale.MDY_MONTH_POSITION-1],D[this.Locale.MDY_DAY_POSITION-1]];A.type=YAHOO.widget.Calendar.DATE;}for(var B=0;B<A.length;B++){A[B]=parseInt(A[B],10);}return A;},_parseDates:function(B){var I=[];var H=B.split(this.Locale.DATE_DELIMITER);for(var G=0;G<H.length;++G){var F=H[G];if(F.indexOf(this.Locale.DATE_RANGE_DELIMITER)!=-1){var A=F.split(this.Locale.DATE_RANGE_DELIMITER);var E=this._parseDate(A[0]);var J=this._parseDate(A[1]);var D=this._parseRange(E,J);I=I.concat(D);}else{var C!
 =this._parseDate(F);I.push(C);}}return I;},_parseRange:function(A,E){var B=YAHOO.widget.DateMath.add(YAHOO.widget.DateMath.getDate(A[0],A[1]-1,A[2]),YAHOO.widget.DateMath.DAY,1);var D=YAHOO.widget.DateMath.getDate(E[0],E[1]-1,E[2]);var C=[];C.push(A);while(B.getTime()<=D.getTime()){C.push([B.getFullYear(),B.getMonth()+1,B.getDate()]);B=YAHOO.widget.DateMath.add(B,YAHOO.widget.DateMath.DAY,1);}return C;},resetRenderers:function(){this.renderStack=this._renderStack.concat();},removeRenderers:function(){this._renderStack=[];this.renderStack=[];},clearElement:function(A){A.innerHTML=" ";A.className="";},addRenderer:function(A,B){var D=this._parseDates(A);for(var C=0;C<D.length;++C){var E=D[C];if(E.length==2){if(E[0] instanceof Array){this._addRenderer(YAHOO.widget.Calendar.RANGE,E,B);}else{this._addRenderer(YAHOO.widget.Calendar.MONTH_DAY,E,B);}}else{if(E.length==3){this._addRenderer(YAHOO.widget.Calendar.DATE,E,B);}}}},_addRenderer:function(B,C,A){var D=[B,C,A];this.rende!
 rStack.unshift(D);this._renderStack=this.renderStack.concat();!
 },addMon
thRenderer:function(B,A){this._addRenderer(YAHOO.widget.Calendar.MONTH,[B],A);},addWeekdayRenderer:function(B,A){this._addRenderer(YAHOO.widget.Calendar.WEEKDAY,[B],A);},clearAllBodyCellStyles:function(A){for(var B=0;B<this.cells.length;++B){YAHOO.util.Dom.removeClass(this.cells[B],A);}},setMonth:function(C){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;var B=this.cfg.getProperty(A);B.setMonth(parseInt(C,10));this.cfg.setProperty(A,B);},setYear:function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;var C=this.cfg.getProperty(A);C.setFullYear(parseInt(B,10));this.cfg.setProperty(A,C);},getSelectedDates:function(){var C=[];var B=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);for(var E=0;E<B.length;++E){var D=B[E];var A=YAHOO.widget.DateMath.getDate(D[0],D[1]-1,D[2]);C.push(A);}C.sort(function(G,F){return G-F;});return C;},hide:function(){if(this.beforeHideEvent.fire()){this.oDomContainer.style.display="none";this.hideEvent.fir!
 e();}},show:function(){if(this.beforeShowEvent.fire()){this.oDomContainer.style.display="block";this.showEvent.fire();}},browser:(function(){var A=navigator.userAgent.toLowerCase();if(A.indexOf("opera")!=-1){return"opera";}else{if(A.indexOf("msie 7")!=-1){return"ie7";}else{if(A.indexOf("msie")!=-1){return"ie";}else{if(A.indexOf("safari")!=-1){return"safari";}else{if(A.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}})(),toString:function(){return"Calendar "+this.id;}};YAHOO.widget.Calendar_Core=YAHOO.widget.Calendar;YAHOO.widget.Cal_Core=YAHOO.widget.Calendar;YAHOO.widget.CalendarGroup=function(C,A,B){if(arguments.length>0){this.init.apply(this,arguments);}};YAHOO.widget.CalendarGroup.prototype={init:function(D,B,C){var A=this._parseArgs(arguments);D=A.id;B=A.container;C=A.config;this.oDomContainer=YAHOO.util.Dom.get(B);if(!this.oDomContainer.id){this.oDomContainer.id=YAHOO.util.Dom.generateId();}if(!D){D=this.oDomContainer.id+"_t";}this.id=D;this.containerId=th!
 is.oDomContainer.id;this.initEvents();this.initStyles();this.p!
 ages=[];
YAHOO.util.Dom.addClass(this.oDomContainer,YAHOO.widget.CalendarGroup.CSS_CONTAINER);YAHOO.util.Dom.addClass(this.oDomContainer,YAHOO.widget.CalendarGroup.CSS_MULTI_UP);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.setupConfig();if(C){this.cfg.applyConfig(C,true);}this.cfg.fireQueue();if(YAHOO.env.ua.opera){this.renderEvent.subscribe(this._fixWidth,this,true);this.showEvent.subscribe(this._fixWidth,this,true);}},setupConfig:function(){var A=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG;this.cfg.addProperty(A.PAGES.key,{value:A.PAGES.value,validator:this.cfg.checkNumber,handler:this.configPages});this.cfg.addProperty(A.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});this.cfg.addProperty(A.SELECTED.key,{value:[],handler:this.configSelected});this.cfg.addProperty(A.TITLE.key,{value:A.TITLE.value,handler:this.configTitle});this.cfg.addProperty(A.CLOSE.key,{value:A.CLOSE.value,handler:this.configClose});this.cfg.addProperty(A.IFRAME.key,{value!
 :A.IFRAME.value,handler:this.configIframe,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.MINDATE.key,{value:A.MINDATE.value,handler:this.delegateConfig});this.cfg.addProperty(A.MAXDATE.key,{value:A.MAXDATE.value,handler:this.delegateConfig});this.cfg.addProperty(A.MULTI_SELECT.key,{value:A.MULTI_SELECT.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.START_WEEKDAY.key,{value:A.START_WEEKDAY.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.SHOW_WEEKDAYS.key,{value:A.SHOW_WEEKDAYS.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_HEADER.key,{value:A.SHOW_WEEK_HEADER.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_FOOTER.key,{value:A.SHOW_WEEK_FOOTER.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});
+this.cfg.addProperty(A.HIDE_BLANK_WEEKS.key,{value:A.HIDE_BLANK_WEEKS.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.NAV_ARROW_LEFT.key,{value:A.NAV_ARROW_LEFT.value,handler:this.delegateConfig});this.cfg.addProperty(A.NAV_ARROW_RIGHT.key,{value:A.NAV_ARROW_RIGHT.value,handler:this.delegateConfig});this.cfg.addProperty(A.MONTHS_SHORT.key,{value:A.MONTHS_SHORT.value,handler:this.delegateConfig});this.cfg.addProperty(A.MONTHS_LONG.key,{value:A.MONTHS_LONG.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_1CHAR.key,{value:A.WEEKDAYS_1CHAR.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_SHORT.key,{value:A.WEEKDAYS_SHORT.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_MEDIUM.key,{value:A.WEEKDAYS_MEDIUM.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_LONG.key,{value:A.WEEKDAYS_LONG.value,handler:this.delegateConfig});this.cfg.addProperty(A.LOCALE_MONTHS.key,{!
 value:A.LOCALE_MONTHS.value,handler:this.delegateConfig});this.cfg.addProperty(A.LOCALE_WEEKDAYS.key,{value:A.LOCALE_WEEKDAYS.value,handler:this.delegateConfig});this.cfg.addProperty(A.DATE_DELIMITER.key,{value:A.DATE_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(A.DATE_FIELD_DELIMITER.key,{value:A.DATE_FIELD_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(A.DATE_RANGE_DELIMITER.key,{value:A.DATE_RANGE_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(A.MY_MONTH_POSITION.key,{value:A.MY_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_YEAR_POSITION.key,{value:A.MY_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_MONTH_POSITION.key,{value:A.MD_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_DAY_POSITION.key,{value:A.MD_DAY_POSITION.value,handler!
 :this.delegateConfig,validator:this.cfg.checkNumber});this.cfg!
 .addProp
erty(A.MDY_MONTH_POSITION.key,{value:A.MDY_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_DAY_POSITION.key,{value:A.MDY_DAY_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_YEAR_POSITION.key,{value:A.MDY_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_POSITION.key,{value:A.MY_LABEL_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_YEAR_POSITION.key,{value:A.MY_LABEL_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_SUFFIX.key,{value:A.MY_LABEL_MONTH_SUFFIX.value,handler:this.delegateConfig});this.cfg.addProperty(A.MY_LABEL_YEAR_SUFFIX.key,{value:A.MY_LABEL_YEAR_SUFFIX.value,handler:this.delegateConfig});this.cfg.addProperty(A.NAV.key,{value:A.NAV.value,handler:!
 this.configNavigator});},initEvents:function(){var C=this;var E="Event";var B=function(G,J,F){for(var I=0;I<C.pages.length;++I){var H=C.pages[I];H[this.type+E].subscribe(G,J,F);}};var A=function(F,I){for(var H=0;H<C.pages.length;++H){var G=C.pages[H];G[this.type+E].unsubscribe(F,I);}};var D=YAHOO.widget.Calendar._EVENT_TYPES;this.beforeSelectEvent=new YAHOO.util.CustomEvent(D.BEFORE_SELECT);this.beforeSelectEvent.subscribe=B;this.beforeSelectEvent.unsubscribe=A;this.selectEvent=new YAHOO.util.CustomEvent(D.SELECT);this.selectEvent.subscribe=B;this.selectEvent.unsubscribe=A;this.beforeDeselectEvent=new YAHOO.util.CustomEvent(D.BEFORE_DESELECT);this.beforeDeselectEvent.subscribe=B;this.beforeDeselectEvent.unsubscribe=A;this.deselectEvent=new YAHOO.util.CustomEvent(D.DESELECT);this.deselectEvent.subscribe=B;this.deselectEvent.unsubscribe=A;this.changePageEvent=new YAHOO.util.CustomEvent(D.CHANGE_PAGE);this.changePageEvent.subscribe=B;this.changePageEvent.unsubscribe=A;this.bef!
 oreRenderEvent=new YAHOO.util.CustomEvent(D.BEFORE_RENDER);thi!
 s.before
RenderEvent.subscribe=B;this.beforeRenderEvent.unsubscribe=A;this.renderEvent=new YAHOO.util.CustomEvent(D.RENDER);this.renderEvent.subscribe=B;this.renderEvent.unsubscribe=A;this.resetEvent=new YAHOO.util.CustomEvent(D.RESET);this.resetEvent.subscribe=B;this.resetEvent.unsubscribe=A;this.clearEvent=new YAHOO.util.CustomEvent(D.CLEAR);this.clearEvent.subscribe=B;this.clearEvent.unsubscribe=A;this.beforeShowEvent=new YAHOO.util.CustomEvent(D.BEFORE_SHOW);this.showEvent=new YAHOO.util.CustomEvent(D.SHOW);this.beforeHideEvent=new YAHOO.util.CustomEvent(D.BEFORE_HIDE);this.hideEvent=new YAHOO.util.CustomEvent(D.HIDE);this.beforeShowNavEvent=new YAHOO.util.CustomEvent(D.BEFORE_SHOW_NAV);this.showNavEvent=new YAHOO.util.CustomEvent(D.SHOW_NAV);this.beforeHideNavEvent=new YAHOO.util.CustomEvent(D.BEFORE_HIDE_NAV);this.hideNavEvent=new YAHOO.util.CustomEvent(D.HIDE_NAV);this.beforeRenderNavEvent=new YAHOO.util.CustomEvent(D.BEFORE_RENDER_NAV);this.renderNavEvent=new YAHOO.util.Custo!
 mEvent(D.RENDER_NAV);},configPages:function(K,J,G){var E=J[0];var C=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;var O="_";var L="groupcal";var N="first-of-type";var D="last-of-type";for(var B=0;B<E;++B){var M=this.id+O+B;var I=this.containerId+O+B;var H=this.cfg.getConfig();H.close=false;H.title=false;H.navigator=null;var A=this.constructChild(M,I,H);var F=A.cfg.getProperty(C);this._setMonthOnDate(F,F.getMonth()+B);A.cfg.setProperty(C,F);YAHOO.util.Dom.removeClass(A.oDomContainer,this.Style.CSS_SINGLE);YAHOO.util.Dom.addClass(A.oDomContainer,L);if(B===0){YAHOO.util.Dom.addClass(A.oDomContainer,N);}if(B==(E-1)){YAHOO.util.Dom.addClass(A.oDomContainer,D);}A.parent=this;A.index=B;this.pages[this.pages.length]=A;}},configPageDate:function(H,G,E){var C=G[0];var F;var D=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;for(var B=0;B<this.pages.length;++B){var A=this.pages[B];if(B===0){F=A._parsePageDate(C);
+A.cfg.setProperty(D,F);}else{var I=new Date(F);this._setMonthOnDate(I,I.getMonth()+B);A.cfg.setProperty(D,I);}}},configSelected:function(C,A,E){var D=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key;this.delegateConfig(C,A,E);var B=(this.pages.length>0)?this.pages[0].cfg.getProperty(D):[];this.cfg.setProperty(D,B,true);},delegateConfig:function(B,A,E){var F=A[0];var D;for(var C=0;C<this.pages.length;C++){D=this.pages[C];D.cfg.setProperty(B,F);}},setChildFunction:function(D,B){var A=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);for(var C=0;C<A;++C){this.pages[C][D]=B;}},callChildFunction:function(F,B){var A=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);for(var E=0;E<A;++E){var D=this.pages[E];if(D[F]){var C=D[F];C.call(D,B);}}},constructChild:function(D,B,C){var A=document.getElementById(B);if(!A){A=document.createElement("div");A.id=B;this.oDomContainer.appendChild(A);}return new YAHOO.widget.Calendar(D,B,C);}!
 ,setMonth:function(E){E=parseInt(E,10);var F;var B=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;for(var D=0;D<this.pages.length;++D){var C=this.pages[D];var A=C.cfg.getProperty(B);if(D===0){F=A.getFullYear();}else{A.setFullYear(F);}this._setMonthOnDate(A,E+D);C.cfg.setProperty(B,A);}},setYear:function(C){var B=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;C=parseInt(C,10);for(var E=0;E<this.pages.length;++E){var D=this.pages[E];var A=D.cfg.getProperty(B);if((A.getMonth()+1)==1&&E>0){C+=1;}D.setYear(C);}},render:function(){this.renderHeader();for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.render();}this.renderFooter();},select:function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.select(A);}return this.getSelectedDates();},selectCell:function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.selectCell(A);}return this.getSelectedDates();},deselect:function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C!
 ];B.deselect(A);}return this.getSelectedDates();},deselectAll:!
 function
(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.deselectAll();}return this.getSelectedDates();},deselectCell:function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.deselectCell(A);}return this.getSelectedDates();},reset:function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.reset();}},clear:function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.clear();}},nextMonth:function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.nextMonth();}},previousMonth:function(){for(var B=this.pages.length-1;B>=0;--B){var A=this.pages[B];A.previousMonth();}},nextYear:function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.nextYear();}},previousYear:function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.previousYear();}},getSelectedDates:function(){var C=[];var B=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key);for(var E=0;E<B.length;++E){var D=B[E];var A=YAHOO.widg!
 et.DateMath.getDate(D[0],D[1]-1,D[2]);C.push(A);}C.sort(function(G,F){return G-F;});return C;},addRenderer:function(A,B){for(var D=0;D<this.pages.length;++D){var C=this.pages[D];C.addRenderer(A,B);}},addMonthRenderer:function(D,A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.addMonthRenderer(D,A);}},addWeekdayRenderer:function(B,A){for(var D=0;D<this.pages.length;++D){var C=this.pages[D];C.addWeekdayRenderer(B,A);}},removeRenderers:function(){this.callChildFunction("removeRenderers");},renderHeader:function(){},renderFooter:function(){},addMonths:function(A){this.callChildFunction("addMonths",A);},subtractMonths:function(A){this.callChildFunction("subtractMonths",A);},addYears:function(A){this.callChildFunction("addYears",A);},subtractYears:function(A){this.callChildFunction("subtractYears",A);},getCalendarPage:function(D){var F=null;if(D){var G=D.getFullYear(),C=D.getMonth();var B=this.pages;for(var E=0;E<B.length;++E){var A=B[E].cfg.getProperty("pagedate");i!
 f(A.getFullYear()===G&&A.getMonth()===C){F=B[E];break;}}}retur!
 n F;},_s
etMonthOnDate:function(C,D){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420&&(D<0||D>11)){var B=YAHOO.widget.DateMath;var A=B.add(C,B.MONTH,D-C.getMonth());C.setTime(A.getTime());}else{C.setMonth(D);}},_fixWidth:function(){var A=0;for(var C=0;C<this.pages.length;++C){var B=this.pages[C];A+=B.oDomContainer.offsetWidth;}if(A>0){this.oDomContainer.style.width=A+"px";}},toString:function(){return"CalendarGroup "+this.id;}};YAHOO.widget.CalendarGroup.CSS_CONTAINER="yui-calcontainer";YAHOO.widget.CalendarGroup.CSS_MULTI_UP="multi";YAHOO.widget.CalendarGroup.CSS_2UPTITLE="title";YAHOO.widget.CalendarGroup.CSS_2UPCLOSE="close-icon";YAHOO.lang.augmentProto(YAHOO.widget.CalendarGroup,YAHOO.widget.Calendar,"buildDayLabel","buildMonthLabel","renderOutOfBoundsDate","renderRowHeader","renderRowFooter","renderCellDefault","styleCellDefault","renderCellStyleHighlight1","renderCellStyleHighlight2","renderCellStyleHighlight3","renderCellStyleHighlight4","renderCellStyleToday","renderCellStyle!
 Selected","renderCellNotThisMonth","renderBodyCellRestricted","initStyles","configTitle","configClose","configIframe","configNavigator","createTitleBar","createCloseButton","removeTitleBar","removeCloseButton","hide","show","toDate","_parseArgs","browser");YAHOO.widget.CalendarGroup._DEFAULT_CONFIG=YAHOO.widget.Calendar._DEFAULT_CONFIG;YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES={key:"pages",value:2};YAHOO.widget.CalGrp=YAHOO.widget.CalendarGroup;YAHOO.widget.Calendar2up=function(C,A,B){this.init(C,A,B);};YAHOO.extend(YAHOO.widget.Calendar2up,YAHOO.widget.CalendarGroup);YAHOO.widget.Cal2up=YAHOO.widget.Calendar2up;YAHOO.widget.CalendarNavigator=function(A){this.init(A);};(function(){var A=YAHOO.widget.CalendarNavigator;A.CLASSES={NAV:"yui-cal-nav",NAV_VISIBLE:"yui-cal-nav-visible",MASK:"yui-cal-nav-mask",YEAR:"yui-cal-nav-y",MONTH:"yui-cal-nav-m",BUTTONS:"yui-cal-nav-b",BUTTON:"yui-cal-nav-btn",ERROR:"yui-cal-nav-e",YEAR_CTRL:"yui-cal-nav-yc",MONTH_CTRL:"yui-cal-nav-mc!
 ",INVALID:"yui-invalid",DEFAULT:"yui-default"};
+A._DEFAULT_CFG={strings:{month:"Month",year:"Year",submit:"Okay",cancel:"Cancel",invalidYear:"Year needs to be a number"},monthFormat:YAHOO.widget.Calendar.LONG,initialFocus:"year"};A.ID_SUFFIX="_nav";A.MONTH_SUFFIX="_month";A.YEAR_SUFFIX="_year";A.ERROR_SUFFIX="_error";A.CANCEL_SUFFIX="_cancel";A.SUBMIT_SUFFIX="_submit";A.YR_MAX_DIGITS=4;A.YR_MINOR_INC=1;A.YR_MAJOR_INC=10;A.UPDATE_DELAY=50;A.YR_PATTERN=/^\d+$/;A.TRIM=/^\s*(.*?)\s*$/;})();YAHOO.widget.CalendarNavigator.prototype={id:null,cal:null,navEl:null,maskEl:null,yearEl:null,monthEl:null,errorEl:null,submitEl:null,cancelEl:null,firstCtrl:null,lastCtrl:null,_doc:null,_year:null,_month:0,__rendered:false,init:function(A){var C=A.oDomContainer;this.cal=A;this.id=C.id+YAHOO.widget.CalendarNavigator.ID_SUFFIX;this._doc=C.ownerDocument;var B=YAHOO.env.ua.ie;this.__isIEQuirks=(B&&((B<=6)||(B===7&&this._doc.compatMode=="BackCompat")));},show:function(){var A=YAHOO.widget.CalendarNavigator.CLASSES;if(this.cal.beforeShowNavEven!
 t.fire()){if(!this.__rendered){this.render();}this.clearErrors();this._updateMonthUI();this._updateYearUI();this._show(this.navEl,true);this.setInitialFocus();this.showMask();YAHOO.util.Dom.addClass(this.cal.oDomContainer,A.NAV_VISIBLE);this.cal.showNavEvent.fire();}},hide:function(){var A=YAHOO.widget.CalendarNavigator.CLASSES;if(this.cal.beforeHideNavEvent.fire()){this._show(this.navEl,false);this.hideMask();YAHOO.util.Dom.removeClass(this.cal.oDomContainer,A.NAV_VISIBLE);this.cal.hideNavEvent.fire();}},showMask:function(){this._show(this.maskEl,true);if(this.__isIEQuirks){this._syncMask();}},hideMask:function(){this._show(this.maskEl,false);},getMonth:function(){return this._month;},getYear:function(){return this._year;},setMonth:function(A){if(A>=0&&A<12){this._month=A;}this._updateMonthUI();},setYear:function(B){var A=YAHOO.widget.CalendarNavigator.YR_PATTERN;if(YAHOO.lang.isNumber(B)&&A.test(B+"")){this._year=B;}this._updateYearUI();},render:function(){this.cal.before!
 RenderNavEvent.fire();if(!this.__rendered){this.createNav();th!
 is.creat
eMask();this.applyListeners();this.__rendered=true;}this.cal.renderNavEvent.fire();},createNav:function(){var B=YAHOO.widget.CalendarNavigator;var C=this._doc;var D=C.createElement("div");D.className=B.CLASSES.NAV;var A=this.renderNavContents([]);D.innerHTML=A.join("");this.cal.oDomContainer.appendChild(D);this.navEl=D;this.yearEl=C.getElementById(this.id+B.YEAR_SUFFIX);this.monthEl=C.getElementById(this.id+B.MONTH_SUFFIX);this.errorEl=C.getElementById(this.id+B.ERROR_SUFFIX);this.submitEl=C.getElementById(this.id+B.SUBMIT_SUFFIX);this.cancelEl=C.getElementById(this.id+B.CANCEL_SUFFIX);if(YAHOO.env.ua.gecko&&this.yearEl&&this.yearEl.type=="text"){this.yearEl.setAttribute("autocomplete","off");}this._setFirstLastElements();},createMask:function(){var B=YAHOO.widget.CalendarNavigator.CLASSES;var A=this._doc.createElement("div");A.className=B.MASK;this.cal.oDomContainer.appendChild(A);this.maskEl=A;},_syncMask:function(){var B=this.cal.oDomContainer;if(B&&this.maskEl){var A=YAH!
 OO.util.Dom.getRegion(B);YAHOO.util.Dom.setStyle(this.maskEl,"width",A.right-A.left+"px");YAHOO.util.Dom.setStyle(this.maskEl,"height",A.bottom-A.top+"px");}},renderNavContents:function(A){var D=YAHOO.widget.CalendarNavigator,E=D.CLASSES,B=A;B[B.length]="<div class=\""+E.MONTH+"\">";this.renderMonth(B);B[B.length]="</div>";B[B.length]="<div class=\""+E.YEAR+"\">";this.renderYear(B);B[B.length]="</div>";B[B.length]="<div class=\""+E.BUTTONS+"\">";this.renderButtons(B);B[B.length]="</div>";B[B.length]="<div class=\""+E.ERROR+"\" id=\""+this.id+D.ERROR_SUFFIX+"\"></div>";return B;},renderMonth:function(D){var G=YAHOO.widget.CalendarNavigator,H=G.CLASSES;var I=this.id+G.MONTH_SUFFIX,F=this.__getCfg("monthFormat"),A=this.cal.cfg.getProperty((F==YAHOO.widget.Calendar.SHORT)?"MONTHS_SHORT":"MONTHS_LONG"),E=D;if(A&&A.length>0){E[E.length]="<label for=\""+I+"\">";E[E.length]=this.__getCfg("month",true);E[E.length]="</label>";E[E.length]="<select name=\""+I+"\" id=\""+I+"\" class=\""!
 +H.MONTH_CTRL+"\">";for(var B=0;B<A.length;B++){E[E.length]="<!
 option v
alue=\""+B+"\">";E[E.length]=A[B];E[E.length]="</option>";}E[E.length]="</select>";}return E;},renderYear:function(B){var E=YAHOO.widget.CalendarNavigator,F=E.CLASSES;var G=this.id+E.YEAR_SUFFIX,A=E.YR_MAX_DIGITS,D=B;D[D.length]="<label for=\""+G+"\">";D[D.length]=this.__getCfg("year",true);D[D.length]="</label>";D[D.length]="<input type=\"text\" name=\""+G+"\" id=\""+G+"\" class=\""+F.YEAR_CTRL+"\" maxlength=\""+A+"\"/>";return D;},renderButtons:function(A){var D=YAHOO.widget.CalendarNavigator.CLASSES;var B=A;B[B.length]="<span class=\""+D.BUTTON+" "+D.DEFAULT+"\">";B[B.length]="<button type=\"button\" id=\""+this.id+"_submit\">";B[B.length]=this.__getCfg("submit",true);B[B.length]="</button>";B[B.length]="</span>";B[B.length]="<span class=\""+D.BUTTON+"\">";B[B.length]="<button type=\"button\" id=\""+this.id+"_cancel\">";B[B.length]=this.__getCfg("cancel",true);B[B.length]="</button>";B[B.length]="</span>";return B;},applyListeners:function(){var B=YAHOO.util.Event;functio!
 n A(){if(this.validate()){this.setYear(this._getYearFromUI());}}function C(){this.setMonth(this._getMonthFromUI());}B.on(this.submitEl,"click",this.submit,this,true);B.on(this.cancelEl,"click",this.cancel,this,true);B.on(this.yearEl,"blur",A,this,true);B.on(this.monthEl,"change",C,this,true);if(this.__isIEQuirks){YAHOO.util.Event.on(this.cal.oDomContainer,"resize",this._syncMask,this,true);}this.applyKeyListeners();},purgeListeners:function(){var A=YAHOO.util.Event;A.removeListener(this.submitEl,"click",this.submit);A.removeListener(this.cancelEl,"click",this.cancel);A.removeListener(this.yearEl,"blur");A.removeListener(this.monthEl,"change");if(this.__isIEQuirks){A.removeListener(this.cal.oDomContainer,"resize",this._syncMask);}this.purgeKeyListeners();},applyKeyListeners:function(){var D=YAHOO.util.Event;var A=YAHOO.env.ua;var C=(A.ie)?"keydown":"keypress";var B=(A.ie||A.opera)?"keydown":"keypress";D.on(this.yearEl,"keypress",this._handleEnterKey,this,true);
+D.on(this.yearEl,C,this._handleDirectionKeys,this,true);D.on(this.lastCtrl,B,this._handleTabKey,this,true);D.on(this.firstCtrl,B,this._handleShiftTabKey,this,true);},purgeKeyListeners:function(){var C=YAHOO.util.Event;var B=(YAHOO.env.ua.ie)?"keydown":"keypress";var A=(YAHOO.env.ua.ie||YAHOO.env.ua.opera)?"keydown":"keypress";C.removeListener(this.yearEl,"keypress",this._handleEnterKey);C.removeListener(this.yearEl,B,this._handleDirectionKeys);C.removeListener(this.lastCtrl,A,this._handleTabKey);C.removeListener(this.firstCtrl,A,this._handleShiftTabKey);},submit:function(){if(this.validate()){this.hide();this.setMonth(this._getMonthFromUI());this.setYear(this._getYearFromUI());var B=this.cal;var C=this;function D(){B.setYear(C.getYear());B.setMonth(C.getMonth());B.render();}var A=YAHOO.widget.CalendarNavigator.UPDATE_DELAY;if(A>0){window.setTimeout(D,A);}else{D();}}},cancel:function(){this.hide();},validate:function(){if(this._getYearFromUI()!==null){this.clearErrors();retu!
 rn true;}else{this.setYearError();this.setError(this.__getCfg("invalidYear",true));return false;}},setError:function(A){if(this.errorEl){this.errorEl.innerHTML=A;this._show(this.errorEl,true);}},clearError:function(){if(this.errorEl){this.errorEl.innerHTML="";this._show(this.errorEl,false);}},setYearError:function(){YAHOO.util.Dom.addClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID);},clearYearError:function(){YAHOO.util.Dom.removeClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID);},clearErrors:function(){this.clearError();this.clearYearError();},setInitialFocus:function(){var A=this.submitEl;var B=this.__getCfg("initialFocus");if(B&&B.toLowerCase){B=B.toLowerCase();if(B=="year"){A=this.yearEl;try{this.yearEl.select();}catch(C){}}else{if(B=="month"){A=this.monthEl;}}}if(A&&YAHOO.lang.isFunction(A.focus)){try{A.focus();}catch(C){}}},erase:function(){if(this.__rendered){this.purgeListeners();this.yearEl=null;this.monthEl=null;this.errorEl=null;t!
 his.submitEl=null;this.cancelEl=null;this.firstCtrl=null;this.!
 lastCtrl
=null;if(this.navEl){this.navEl.innerHTML="";}var B=this.navEl.parentNode;if(B){B.removeChild(this.navEl);}this.navEl=null;var A=this.maskEl.parentNode;if(A){A.removeChild(this.maskEl);}this.maskEl=null;this.__rendered=false;}},destroy:function(){this.erase();this._doc=null;this.cal=null;this.id=null;},_show:function(B,A){if(B){YAHOO.util.Dom.setStyle(B,"display",(A)?"block":"none");}},_getMonthFromUI:function(){if(this.monthEl){return this.monthEl.selectedIndex;}else{return 0;}},_getYearFromUI:function(){var B=YAHOO.widget.CalendarNavigator;var A=null;if(this.yearEl){var C=this.yearEl.value;C=C.replace(B.TRIM,"$1");if(B.YR_PATTERN.test(C)){A=parseInt(C,10);}}return A;},_updateYearUI:function(){if(this.yearEl&&this._year!==null){this.yearEl.value=this._year;}},_updateMonthUI:function(){if(this.monthEl){this.monthEl.selectedIndex=this._month;}},_setFirstLastElements:function(){this.firstCtrl=this.monthEl;this.lastCtrl=this.cancelEl;if(this.__isMac){if(YAHOO.env.ua.webkit&&YAH!
 OO.env.ua.webkit<420){this.firstCtrl=this.monthEl;this.lastCtrl=this.yearEl;}if(YAHOO.env.ua.gecko){this.firstCtrl=this.yearEl;this.lastCtrl=this.yearEl;}}},_handleEnterKey:function(B){var A=YAHOO.util.KeyListener.KEY;if(YAHOO.util.Event.getCharCode(B)==A.ENTER){this.submit();}},_handleDirectionKeys:function(G){var F=YAHOO.util.Event;var A=YAHOO.util.KeyListener.KEY;var C=YAHOO.widget.CalendarNavigator;var D=(this.yearEl.value)?parseInt(this.yearEl.value,10):null;if(isFinite(D)){var B=false;switch(F.getCharCode(G)){case A.UP:this.yearEl.value=D+C.YR_MINOR_INC;B=true;break;case A.DOWN:this.yearEl.value=Math.max(D-C.YR_MINOR_INC,0);B=true;break;case A.PAGE_UP:this.yearEl.value=D+C.YR_MAJOR_INC;B=true;break;case A.PAGE_DOWN:this.yearEl.value=Math.max(D-C.YR_MAJOR_INC,0);B=true;break;default:break;}if(B){F.preventDefault(G);try{this.yearEl.select();}catch(G){}}}},_handleTabKey:function(C){var B=YAHOO.util.Event;var A=YAHOO.util.KeyListener.KEY;if(B.getCharCode(C)==A.TAB&&!C.shi!
 ftKey){try{B.preventDefault(C);this.firstCtrl.focus();}catch(C!
 ){}}},_h
andleShiftTabKey:function(C){var B=YAHOO.util.Event;var A=YAHOO.util.KeyListener.KEY;if(C.shiftKey&&B.getCharCode(C)==A.TAB){try{B.preventDefault(C);this.lastCtrl.focus();}catch(C){}}},__getCfg:function(D,B){var C=YAHOO.widget.CalendarNavigator._DEFAULT_CFG;var A=this.cal.cfg.getProperty("navigator");if(B){return(A!==true&&A.strings&&A.strings[D])?A.strings[D]:C.strings[D];}else{return(A!==true&&A[D])?A[D]:C[D];}},__isMac:(navigator.userAgent.toLowerCase().indexOf("macintosh")!=-1)};YAHOO.register("calendar",YAHOO.widget.Calendar,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/calendar/calendar.js
===================================================================
--- trunk/root/static/yui/calendar/calendar.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/calendar/calendar.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 (function () {
 
@@ -18,26 +18,20 @@
     * @param {Object} owner The owner Object to which this Config Object belongs
     */
     YAHOO.util.Config = function (owner) {
-    
+
         if (owner) {
-    
             this.init(owner);
-    
         }
-    
-        if (!owner) { 
-        
-    
-        }
-    
+
+
     };
 
 
     var Lang = YAHOO.lang,
-        CustomEvent = YAHOO.util.CustomEvent,        
+        CustomEvent = YAHOO.util.CustomEvent,
         Config = YAHOO.util.Config;
-    
 
+
     /**
      * Constant representing the CustomEvent type for the config changed event.
      * @property YAHOO.util.Config.CONFIG_CHANGED_EVENT
@@ -353,7 +347,7 @@
                         if (queueItem) {
                             queueItemKey = queueItem[0];
                             queueItemValue = queueItem[1];
-                            
+
                             if (queueItemKey == key) {
     
                                 /*
@@ -381,37 +375,37 @@
                 }
         
                 if (property.supercedes) {
-        
+
                     sLen = property.supercedes.length;
-        
+
                     for (s = 0; s < sLen; s++) {
-        
+
                         supercedesCheck = property.supercedes[s];
                         qLen = this.eventQueue.length;
-        
+
                         for (q = 0; q < qLen; q++) {
                             queueItemCheck = this.eventQueue[q];
-        
+
                             if (queueItemCheck) {
                                 queueItemCheckKey = queueItemCheck[0];
                                 queueItemCheckValue = queueItemCheck[1];
-                                
+
                                 if (queueItemCheckKey == 
                                     supercedesCheck.toLowerCase() ) {
-    
+
                                     this.eventQueue.push([queueItemCheckKey, 
                                         queueItemCheckValue]);
-    
+
                                     this.eventQueue[q] = null;
                                     break;
-    
+
                                 }
                             }
                         }
                     }
                 }
 
-        
+
                 return true;
             } else {
                 return false;
@@ -460,37 +454,23 @@
         applyConfig: function (userConfig, init) {
         
             var sKey,
-                oValue,
                 oConfig;
 
             if (init) {
-
                 oConfig = {};
-
                 for (sKey in userConfig) {
-                
                     if (Lang.hasOwnProperty(userConfig, sKey)) {
-
                         oConfig[sKey.toLowerCase()] = userConfig[sKey];
-
                     }
-                
                 }
-
                 this.initialConfig = oConfig;
-
             }
 
             for (sKey in userConfig) {
-            
                 if (Lang.hasOwnProperty(userConfig, sKey)) {
-            
                     this.queueProperty(sKey, userConfig[sKey]);
-                
                 }
-
             }
-
         },
         
         /**
@@ -557,19 +537,12 @@
             var property = this.config[key.toLowerCase()];
     
             if (property && property.event) {
-    
                 if (!Config.alreadySubscribed(property.event, handler, obj)) {
-    
                     property.event.subscribe(handler, obj, override);
-    
                 }
-    
                 return true;
-    
             } else {
-    
                 return false;
-    
             }
     
         },
@@ -689,28 +662,20 @@
             i;
 
         if (nSubscribers > 0) {
-
             i = nSubscribers - 1;
-        
             do {
-
                 subsc = evt.subscribers[i];
-
                 if (subsc && subsc.obj == obj && subsc.fn == fn) {
-        
                     return true;
-        
-                }    
-            
+                }
             }
             while (i--);
-        
         }
-    
+
         return false;
-    
+
     };
-    
+
     YAHOO.lang.augmentProto(Config, YAHOO.util.EventProvider);
 
 }());
@@ -878,7 +843,7 @@
 	* @return {Date}	January 1 of the calendar year specified.
 	*/
 	getJan1 : function(calendarYear) {
-		return new Date(calendarYear,0,1); 
+		return this.getDate(calendarYear,0,1);
 	},
 
 	/**
@@ -914,7 +879,7 @@
 		date = this.clearTime(date);
 		var nearestThurs = new Date(date.getTime() + (4 * this.ONE_DAY_MS) - ((date.getDay()) * this.ONE_DAY_MS));
 
-		var jan1 = new Date(nearestThurs.getFullYear(),0,1);
+		var jan1 = this.getDate(nearestThurs.getFullYear(),0,1);
 		var dayOfYear = ((nearestThurs.getTime() - jan1.getTime()) / this.ONE_DAY_MS) - 1;
 
 		var weekNum = Math.ceil((dayOfYear)/ 7);
@@ -958,7 +923,7 @@
 	* @return {Date}		The JavaScript Date representing the first day of the month
 	*/
 	findMonthStart : function(date) {
-		var start = new Date(date.getFullYear(), date.getMonth(), 1);
+		var start = this.getDate(date.getFullYear(), date.getMonth(), 1);
 		return start;
 	},
 
@@ -984,14 +949,46 @@
 	clearTime : function(date) {
 		date.setHours(12,0,0,0);
 		return date;
+	},
+
+	/**
+	 * Returns a new JavaScript Date object, representing the given year, month and date. Time fields (hr, min, sec, ms) on the new Date object
+	 * are set to 0. The method allows Date instances to be created with the a year less than 100. "new Date(year, month, date)" implementations 
+	 * set the year to 19xx if a year (xx) which is less than 100 is provided.
+	 * <p>
+	 * <em>NOTE:</em>Validation on argument values is not performed. It is the caller's responsibility to ensure
+	 * arguments are valid as per the ECMAScript-262 Date object specification for the new Date(year, month[, date]) constructor.
+	 * </p>
+	 * @method getDate
+	 * @param {Number} y Year.
+	 * @param {Number} m Month index from 0 (Jan) to 11 (Dec).
+	 * @param {Number} d (optional) Date from 1 to 31. If not provided, defaults to 1.
+	 * @return {Date} The JavaScript date object with year, month, date set as provided.
+	 */
+	getDate : function(y, m, d) {
+		var dt = null;
+		if (YAHOO.lang.isUndefined(d)) {
+			d = 1;
+		}
+		if (y >= 100) {
+			dt = new Date(y, m, d);
+		} else {
+			dt = new Date();
+			dt.setFullYear(y);
+			dt.setMonth(m);
+			dt.setDate(d);
+			dt.setHours(0,0,0,0);
+		}
+		return dt;
 	}
 };
 
 /**
-* The Calendar component is a UI control that enables users to choose one or more dates from a graphical calendar presented in a one-month  or multi-month interface. Calendars are generated entirely via script and can be navigated without any page refreshes.
+* The Calendar component is a UI control that enables users to choose one or more dates from a graphical calendar presented in a one-month or
+* multi-month interface. Calendars are generated entirely via script and can be navigated without any page refreshes.
 * @module    calendar
-* @title     Calendar
-* @namespace YAHOO.widget
+* @title    Calendar
+* @namespace  YAHOO.widget
 * @requires  yahoo,dom,event
 */
 
@@ -1003,18 +1000,39 @@
 * <p>To construct the placeholder for the calendar widget, the code is as
 * follows:
 *	<xmp>
-*		<div id="cal1Container"></div>
+*		<div id="calContainer"></div>
 *	</xmp>
 * </p>
+* <p>
+* <strong>NOTE: As of 2.4.0, the constructor's ID argument is optional.</strong>
+* The Calendar can be constructed by simply providing a container ID string, 
+* or a reference to a container DIV HTMLElement (the element needs to exist 
+* in the document).
+* 
+* E.g.:
+*	<xmp>
+*		var c = new YAHOO.widget.Calendar("calContainer", configOptions);
+*	</xmp>
+* or:
+*   <xmp>
+*       var containerDiv = YAHOO.util.Dom.get("calContainer");
+*		var c = new YAHOO.widget.Calendar(containerDiv, configOptions);
+*	</xmp>
+* </p>
+* <p>
+* If not provided, the ID will be generated from the container DIV ID by adding an "_t" suffix.
+* For example if an ID is not provided, and the container's ID is "calContainer", the Calendar's ID will be set to "calContainer_t".
+* </p>
+* 
 * @namespace YAHOO.widget
 * @class Calendar
 * @constructor
-* @param {String}	id			The id of the table element that will represent the calendar widget
-* @param {String}	containerId	The id of the container div element that will wrap the calendar table
-* @param {Object}	config		The configuration object containing the Calendar's arguments
+* @param {String} id optional The id of the table element that will represent the Calendar widget. As of 2.4.0, this argument is optional.
+* @param {String | HTMLElement} container The id of the container div element that will wrap the Calendar table, or a reference to a DIV element which exists in the document.
+* @param {Object} config optional The configuration object containing the initial configuration values for the Calendar.
 */
 YAHOO.widget.Calendar = function(id, containerId, config) {
-	this.init(id, containerId, config);
+	this.init.apply(this, arguments);
 };
 
 /**
@@ -1171,7 +1189,8 @@
 	MY_LABEL_MONTH_POSITION:{key:"my_label_month_position", value:1},
 	MY_LABEL_YEAR_POSITION:{key:"my_label_year_position", value:2},
 	MY_LABEL_MONTH_SUFFIX:{key:"my_label_month_suffix", value:" "},
-	MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix", value:""}
+	MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix", value:""},
+	NAV: {key:"navigator", value: null}
 };
 
 /**
@@ -1191,7 +1210,17 @@
 	BEFORE_RENDER : "beforeRender",
 	RENDER : "render",
 	RESET : "reset",
-	CLEAR : "clear"
+	CLEAR : "clear",
+	BEFORE_HIDE : "beforeHide",
+	HIDE : "hide",
+	BEFORE_SHOW : "beforeShow",
+	SHOW : "show",
+	BEFORE_HIDE_NAV : "beforeHideNav",
+	HIDE_NAV : "hideNav",
+	BEFORE_SHOW_NAV : "beforeShowNav",
+	SHOW_NAV : "showNav",
+	BEFORE_RENDER_NAV : "beforeRenderNav",
+	RENDER_NAV : "renderNav"
 };
 
 /**
@@ -1224,6 +1253,7 @@
 	CSS_CONTAINER : "yui-calcontainer",
 	CSS_NAV_LEFT : "calnavleft",
 	CSS_NAV_RIGHT : "calnavright",
+	CSS_NAV : "calnav",
 	CSS_CLOSE : "calclose",
 	CSS_CELL_TOP : "calcelltop",
 	CSS_CELL_LEFT : "calcellleft",
@@ -1267,7 +1297,7 @@
 	* @type HTMLTableCellElement[]
 	*/
 	cells : null,
-	
+
 	/**
 	* The collection of calendar cell dates that is parallel to the cells collection. The array contains dates field arrays in the format of [YYYY, M, D].
 	* @property cellDates
@@ -1276,13 +1306,20 @@
 	cellDates : null,
 
 	/**
-	* The id that uniquely identifies this calendar. This id should match the id of the placeholder element on the page.
+	* The id that uniquely identifies this Calendar.
 	* @property id
 	* @type String
 	*/
 	id : null,
 
 	/**
+	* The unique id associated with the Calendar's container
+	* @property containerId
+	* @type String
+	*/
+	containerId: null,
+
+	/**
 	* The DOM element reference that points to this calendar's container element. The calendar will be inserted into this element when the shell is rendered.
 	* @property oDomContainer
 	* @type HTMLElement
@@ -1312,6 +1349,14 @@
 	_renderStack : null,
 
 	/**
+	* A reference to the CalendarNavigator instance created for this Calendar.
+	* Will be null if the "navigator" configuration property has not been set
+	* @property oNavigator
+	* @type CalendarNavigator
+	*/
+	oNavigator : null,
+
+	/**
 	* The private list of initially selected dates.
 	* @property _selectedDates
 	* @private
@@ -1324,3607 +1369,4059 @@
 	* @property domEventMap
 	* @type Object
 	*/
-	domEventMap : null
-};
+	domEventMap : null,
 
-/**
-* Initializes the Calendar widget.
-* @method init
-* @param {String}	id			The id of the table element that will represent the calendar widget
-* @param {String}	containerId	The id of the container div element that will wrap the calendar table
-* @param {Object}	config		The configuration object containing the Calendar's arguments
-*/
-YAHOO.widget.Calendar.prototype.init = function(id, containerId, config) {
-	this.initEvents();
-	this.today = new Date();
-	YAHOO.widget.DateMath.clearTime(this.today);
-
-	this.id = id;
-	this.oDomContainer = document.getElementById(containerId);
-
 	/**
-	* The Config object used to hold the configuration variables for the Calendar
-	* @property cfg
-	* @type YAHOO.util.Config
-	*/
-	this.cfg = new YAHOO.util.Config(this);
-	
-	/**
-	* The local object which contains the Calendar's options
-	* @property Options
-	* @type Object
-	*/
-	this.Options = {};
+	 * Protected helper used to parse Calendar constructor/init arguments.
+	 *
+	 * As of 2.4.0, Calendar supports a simpler constructor 
+	 * signature. This method reconciles arguments
+	 * received in the pre 2.4.0 and 2.4.0 formats.
+	 * 
+	 * @protected
+	 * @method _parseArgs
+	 * @param {Array} Function "arguments" array
+	 * @return {Object} Object with id, container, config properties containing
+	 * the reconciled argument values.
+	 **/
+	_parseArgs : function(args) {
+		/*
+		   2.4.0 Constructors signatures
 
-	/**
-	* The local object which contains the Calendar's locale settings
-	* @property Locale
-	* @type Object
-	*/
-	this.Locale = {};
+		   new Calendar(String)
+		   new Calendar(HTMLElement)
+		   new Calendar(String, ConfigObject)
+		   new Calendar(HTMLElement, ConfigObject)
 
-	this.initStyles();
+		   Pre 2.4.0 Constructor signatures
 
-	YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_CONTAINER);	
-	YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_SINGLE);
-	
-	this.cellDates = [];
-	this.cells = [];
-	this.renderStack = [];
-	this._renderStack = [];
+		   new Calendar(String, String)
+		   new Calendar(String, HTMLElement)
+		   new Calendar(String, String, ConfigObject)
+		   new Calendar(String, HTMLElement, ConfigObject)
+		 */
+		var nArgs = {id:null, container:null, config:null};
 
-	this.setupConfig();
-	
-	if (config) {
-		this.cfg.applyConfig(config, true);
-	}
-	
-	this.cfg.fireQueue();
-};
-
-/**
-* Default Config listener for the iframe property. If the iframe config property is set to true, 
-* renders the built-in IFRAME shim if the container is relatively or absolutely positioned.
-* 
-* @method configIframe
-*/
-YAHOO.widget.Calendar.prototype.configIframe = function(type, args, obj) {
-	var useIframe = args[0];
-
-	if (!this.parent) {
-		if (YAHOO.util.Dom.inDocument(this.oDomContainer)) {
-			if (useIframe) {
-				var pos = YAHOO.util.Dom.getStyle(this.oDomContainer, "position");
-				
-				if (pos == "absolute" || pos == "relative") {
-					
-					if (!YAHOO.util.Dom.inDocument(this.iframe)) {
-						this.iframe = document.createElement("iframe");
-						this.iframe.src = "javascript:false;";
-
-						YAHOO.util.Dom.setStyle(this.iframe, "opacity", "0");
-
-						if (YAHOO.env.ua.ie && YAHOO.env.ua.ie <= 6) {
-							YAHOO.util.Dom.addClass(this.iframe, "fixedsize");
-						}
-
-						this.oDomContainer.insertBefore(this.iframe, this.oDomContainer.firstChild);
+		if (args && args.length && args.length > 0) {
+			switch (args.length) {
+				case 1:
+					nArgs.id = null;
+					nArgs.container = args[0];
+					nArgs.config = null;
+					break;
+				case 2:
+					if (YAHOO.lang.isObject(args[1]) && !args[1].tagName && !(args[1] instanceof String)) {
+						nArgs.id = null;
+						nArgs.container = args[0];
+						nArgs.config = args[1];
+					} else {
+						nArgs.id = args[0];
+						nArgs.container = args[1];
+						nArgs.config = null;
 					}
-				}
-			} else {
-				if (this.iframe) {
-					if (this.iframe.parentNode) {
-						this.iframe.parentNode.removeChild(this.iframe);
-					}
-					this.iframe = null;
-				}
+					break;
+				default: // 3+
+					nArgs.id = args[0];
+					nArgs.container = args[1];
+					nArgs.config = args[2];
+					break;
 			}
-		}
-	}
-};
-/**
-* Default handler for the "title" property
-* @method configTitle
-*/
-YAHOO.widget.Calendar.prototype.configTitle = function(type, args, obj) {
-	var title = args[0], tDiv;
-
-	// "" disables title bar
-	if (title) {
-		this.createTitleBar(title);
-	} else {
-		var close = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.CLOSE.key);
-		if (!close) {
-			this.removeTitleBar();
 		} else {
-			this.createTitleBar(" ");
 		}
-	}
-};
+		return nArgs;
+	},
 
-/**
-* Default handler for the "close" property
-* @method configClose
-*/
-YAHOO.widget.Calendar.prototype.configClose = function(type, args, obj) {
-	var close = args[0],
-		title = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.TITLE.key);
-
-	if (close) {
-		if (!title) {
-			this.createTitleBar(" ");
-		}
-		this.createCloseButton();
-	} else {
-		this.removeCloseButton();
-		if (!title) {
-			this.removeTitleBar();
-		}
-	}
-};
-
-/**
-* Initializes Calendar's built-in CustomEvents
-* @method initEvents
-*/
-YAHOO.widget.Calendar.prototype.initEvents = function() {
-
-	var defEvents = YAHOO.widget.Calendar._EVENT_TYPES;
-
 	/**
-	* Fired before a selection is made
-	* @event beforeSelectEvent
+	* Initializes the Calendar widget.
+	* @method init
+	*
+	* @param {String} id optional The id of the table element that will represent the Calendar widget. As of 2.4.0, this argument is optional.
+	* @param {String | HTMLElement} container The id of the container div element that will wrap the Calendar table, or a reference to a DIV element which exists in the document.
+	* @param {Object} config optional The configuration object containing the initial configuration values for the Calendar.
 	*/
-	this.beforeSelectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SELECT); 
+	init : function(id, container, config) {
+		// Normalize 2.4.0, pre 2.4.0 args
+		var nArgs = this._parseArgs(arguments);
 
-	/**
-	* Fired when a selection is made
-	* @event selectEvent
-	* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
-	*/
-	this.selectEvent = new YAHOO.util.CustomEvent(defEvents.SELECT);
+		id = nArgs.id;
+		container = nArgs.container;
+		config = nArgs.config;
 
-	/**
-	* Fired before a selection is made
-	* @event beforeDeselectEvent
-	*/
-	this.beforeDeselectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_DESELECT);
+		this.oDomContainer = YAHOO.util.Dom.get(container);
 
-	/**
-	* Fired when a selection is made
-	* @event deselectEvent
-	* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
-	*/
-	this.deselectEvent = new YAHOO.util.CustomEvent(defEvents.DESELECT);
-
-	/**
-	* Fired when the Calendar page is changed
-	* @event changePageEvent
-	*/
-	this.changePageEvent = new YAHOO.util.CustomEvent(defEvents.CHANGE_PAGE);
-
-	/**
-	* Fired before the Calendar is rendered
-	* @event beforeRenderEvent
-	*/
-	this.beforeRenderEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER);
-
-	/**
-	* Fired when the Calendar is rendered
-	* @event renderEvent
-	*/
-	this.renderEvent = new YAHOO.util.CustomEvent(defEvents.RENDER);
-
-	/**
-	* Fired when the Calendar is reset
-	* @event resetEvent
-	*/
-	this.resetEvent = new YAHOO.util.CustomEvent(defEvents.RESET);
-
-	/**
-	* Fired when the Calendar is cleared
-	* @event clearEvent
-	*/
-	this.clearEvent = new YAHOO.util.CustomEvent(defEvents.CLEAR);
-
-	this.beforeSelectEvent.subscribe(this.onBeforeSelect, this, true);
-	this.selectEvent.subscribe(this.onSelect, this, true);
-	this.beforeDeselectEvent.subscribe(this.onBeforeDeselect, this, true);
-	this.deselectEvent.subscribe(this.onDeselect, this, true);
-	this.changePageEvent.subscribe(this.onChangePage, this, true);
-	this.renderEvent.subscribe(this.onRender, this, true);
-	this.resetEvent.subscribe(this.onReset, this, true);
-	this.clearEvent.subscribe(this.onClear, this, true);
-};
-
-/**
-* The default event function that is attached to a date link within a calendar cell
-* when the calendar is rendered.
-* @method doSelectCell
-* @param {DOMEvent} e	The event
-* @param {Calendar} cal	A reference to the calendar passed by the Event utility
-*/
-YAHOO.widget.Calendar.prototype.doSelectCell = function(e, cal) {
-	var cell,index,d,date;
-
-	var target = YAHOO.util.Event.getTarget(e);
-	var tagName = target.tagName.toLowerCase();
-	var defSelector = false;
-
-	while (tagName != "td" && ! YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
-
-		if (!defSelector && tagName == "a" && YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTOR)) {
-			defSelector = true;	
+		if (!this.oDomContainer.id) {
+			this.oDomContainer.id = YAHOO.util.Dom.generateId();
 		}
-
-		target = target.parentNode;
-		tagName = target.tagName.toLowerCase(); 
-		if (tagName == "html") {
-			return;
+		if (!id) {
+			id = this.oDomContainer.id + "_t";
 		}
-	}
 
-	if (defSelector) {
-		// Stop link href navigation for default renderer
-		YAHOO.util.Event.preventDefault(e);
-	}
+		this.id = id;
+		this.containerId = this.oDomContainer.id;
 
-	cell = target;
+		this.initEvents();
 
-	if (YAHOO.util.Dom.hasClass(cell, cal.Style.CSS_CELL_SELECTABLE)) {
-		index = cell.id.split("cell")[1];
-		d = cal.cellDates[index];
-		date = new Date(d[0],d[1]-1,d[2]);
-	
-		var link;
+		this.today = new Date();
+		YAHOO.widget.DateMath.clearTime(this.today);
 
-		if (cal.Options.MULTI_SELECT) {
-			link = cell.getElementsByTagName("a")[0];
-			if (link) {
-				link.blur();
-			}
+		/**
+		* The Config object used to hold the configuration variables for the Calendar
+		* @property cfg
+		* @type YAHOO.util.Config
+		*/
+		this.cfg = new YAHOO.util.Config(this);
 
-			var cellDate = cal.cellDates[index];
-			var cellDateIndex = cal._indexOfSelectedFieldArray(cellDate);
+		/**
+		* The local object which contains the Calendar's options
+		* @property Options
+		* @type Object
+		*/
+		this.Options = {};
 
-			if (cellDateIndex > -1) {	
-				cal.deselectCell(index);
-			} else {
-				cal.selectCell(index);
-			}	
+		/**
+		* The local object which contains the Calendar's locale settings
+		* @property Locale
+		* @type Object
+		*/
+		this.Locale = {};
 
-		} else {
-			link = cell.getElementsByTagName("a")[0];
-			if (link) {
-				link.blur();
-			}
-			cal.selectCell(index);
-		}
-	}
-};
+		this.initStyles();
 
-/**
-* The event that is executed when the user hovers over a cell
-* @method doCellMouseOver
-* @param {DOMEvent} e	The event
-* @param {Calendar} cal	A reference to the calendar passed by the Event utility
-*/
-YAHOO.widget.Calendar.prototype.doCellMouseOver = function(e, cal) {
-	var target;
-	if (e) {
-		target = YAHOO.util.Event.getTarget(e);
-	} else {
-		target = this;
-	}
+		YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_CONTAINER);
+		YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_SINGLE);
 
-	while (target.tagName.toLowerCase() != "td") {
-		target = target.parentNode;
-		if (target.tagName.toLowerCase() == "html") {
-			return;
-		}
-	}
+		this.cellDates = [];
+		this.cells = [];
+		this.renderStack = [];
+		this._renderStack = [];
 
-	if (YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
-		YAHOO.util.Dom.addClass(target, cal.Style.CSS_CELL_HOVER);
-	}
-};
+		this.setupConfig();
 
-/**
-* The event that is executed when the user moves the mouse out of a cell
-* @method doCellMouseOut
-* @param {DOMEvent} e	The event
-* @param {Calendar} cal	A reference to the calendar passed by the Event utility
-*/
-YAHOO.widget.Calendar.prototype.doCellMouseOut = function(e, cal) {
-	var target;
-	if (e) {
-		target = YAHOO.util.Event.getTarget(e);
-	} else {
-		target = this;
-	}
-
-	while (target.tagName.toLowerCase() != "td") {
-		target = target.parentNode;
-		if (target.tagName.toLowerCase() == "html") {
-			return;
+		if (config) {
+			this.cfg.applyConfig(config, true);
 		}
-	}
 
-	if (YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
-		YAHOO.util.Dom.removeClass(target, cal.Style.CSS_CELL_HOVER);
-	}
-};
+		this.cfg.fireQueue();
+	},
 
-YAHOO.widget.Calendar.prototype.setupConfig = function() {
-
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-
 	/**
-	* The month/year representing the current visible Calendar date (mm/yyyy)
-	* @config pagedate
-	* @type String
-	* @default today's date
-	*/
-	this.cfg.addProperty(defCfg.PAGEDATE.key, { value:new Date(), handler:this.configPageDate } );
-
-	/**
-	* The date or range of dates representing the current Calendar selection
-	* @config selected
-	* @type String
-	* @default []
-	*/
-	this.cfg.addProperty(defCfg.SELECTED.key, { value:[], handler:this.configSelected } );
-
-	/**
-	* The title to display above the Calendar's month header
-	* @config title
-	* @type String
-	* @default ""
-	*/
-	this.cfg.addProperty(defCfg.TITLE.key, { value:defCfg.TITLE.value, handler:this.configTitle } );
-
-	/**
-	* Whether or not a close button should be displayed for this Calendar
-	* @config close
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty(defCfg.CLOSE.key, { value:defCfg.CLOSE.value, handler:this.configClose } );
-
-	/**
-	* Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below.
-	* This property is enabled by default for IE6 and below. It is disabled by default for other browsers for performance reasons, but can be 
-	* enabled if required.
+	* Default Config listener for the iframe property. If the iframe config property is set to true, 
+	* renders the built-in IFRAME shim if the container is relatively or absolutely positioned.
 	* 
-	* @config iframe
-	* @type Boolean
-	* @default true for IE6 and below, false for all other browsers
+	* @method configIframe
 	*/
-	this.cfg.addProperty(defCfg.IFRAME.key, { value:defCfg.IFRAME.value, handler:this.configIframe, validator:this.cfg.checkBoolean } );
+	configIframe : function(type, args, obj) {
+		var useIframe = args[0];
+	
+		if (!this.parent) {
+			if (YAHOO.util.Dom.inDocument(this.oDomContainer)) {
+				if (useIframe) {
+					var pos = YAHOO.util.Dom.getStyle(this.oDomContainer, "position");
+					
+					if (pos == "absolute" || pos == "relative") {
+						
+						if (!YAHOO.util.Dom.inDocument(this.iframe)) {
+							this.iframe = document.createElement("iframe");
+							this.iframe.src = "javascript:false;";
+	
+							YAHOO.util.Dom.setStyle(this.iframe, "opacity", "0");
+	
+							if (YAHOO.env.ua.ie && YAHOO.env.ua.ie <= 6) {
+								YAHOO.util.Dom.addClass(this.iframe, "fixedsize");
+							}
+	
+							this.oDomContainer.insertBefore(this.iframe, this.oDomContainer.firstChild);
+						}
+					}
+				} else {
+					if (this.iframe) {
+						if (this.iframe.parentNode) {
+							this.iframe.parentNode.removeChild(this.iframe);
+						}
+						this.iframe = null;
+					}
+				}
+			}
+		}
+	},
 
 	/**
-	* The minimum selectable date in the current Calendar (mm/dd/yyyy)
-	* @config mindate
-	* @type String
-	* @default null
+	* Default handler for the "title" property
+	* @method configTitle
 	*/
-	this.cfg.addProperty(defCfg.MINDATE.key, { value:defCfg.MINDATE.value, handler:this.configMinDate } );
+	configTitle : function(type, args, obj) {
+		var title = args[0];
 
+		// "" disables title bar
+		if (title) {
+			this.createTitleBar(title);
+		} else {
+			var close = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.CLOSE.key);
+			if (!close) {
+				this.removeTitleBar();
+			} else {
+				this.createTitleBar(" ");
+			}
+		}
+	},
+	
 	/**
-	* The maximum selectable date in the current Calendar (mm/dd/yyyy)
-	* @config maxdate
-	* @type String
-	* @default null
+	* Default handler for the "close" property
+	* @method configClose
 	*/
-	this.cfg.addProperty(defCfg.MAXDATE.key, { value:defCfg.MAXDATE.value, handler:this.configMaxDate } );
-
-
-	// Options properties
-
-	/**
-	* True if the Calendar should allow multiple selections. False by default.
-	* @config MULTI_SELECT
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty(defCfg.MULTI_SELECT.key,	{ value:defCfg.MULTI_SELECT.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
-
-	/**
-	* The weekday the week begins on. Default is 0 (Sunday).
-	* @config START_WEEKDAY
-	* @type number
-	* @default 0
-	*/
-	this.cfg.addProperty(defCfg.START_WEEKDAY.key,	{ value:defCfg.START_WEEKDAY.value, handler:this.configOptions, validator:this.cfg.checkNumber  } );
-
-	/**
-	* True if the Calendar should show weekday labels. True by default.
-	* @config SHOW_WEEKDAYS
-	* @type Boolean
-	* @default true
-	*/
-	this.cfg.addProperty(defCfg.SHOW_WEEKDAYS.key,	{ value:defCfg.SHOW_WEEKDAYS.value, handler:this.configOptions, validator:this.cfg.checkBoolean  } );
-
-	/**
-	* True if the Calendar should show week row headers. False by default.
-	* @config SHOW_WEEK_HEADER
-	* @type Boolean
-	* @default false
-	*/
-	this.cfg.addProperty(defCfg.SHOW_WEEK_HEADER.key, { value:defCfg.SHOW_WEEK_HEADER.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
-
-	/**
-	* True if the Calendar should show week row footers. False by default.
-	* @config SHOW_WEEK_FOOTER
-	* @type Boolean
-	* @default false
-	*/	
-	this.cfg.addProperty(defCfg.SHOW_WEEK_FOOTER.key,{ value:defCfg.SHOW_WEEK_FOOTER.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
-
-	/**
-	* True if the Calendar should suppress weeks that are not a part of the current month. False by default.
-	* @config HIDE_BLANK_WEEKS
-	* @type Boolean
-	* @default false
-	*/	
-	this.cfg.addProperty(defCfg.HIDE_BLANK_WEEKS.key, { value:defCfg.HIDE_BLANK_WEEKS.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+	configClose : function(type, args, obj) {
+		var close = args[0],
+			title = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.TITLE.key);
 	
+		if (close) {
+			if (!title) {
+				this.createTitleBar(" ");
+			}
+			this.createCloseButton();
+		} else {
+			this.removeCloseButton();
+			if (!title) {
+				this.removeTitleBar();
+			}
+		}
+	},
+	
 	/**
-	* The image that should be used for the left navigation arrow.
-	* @config NAV_ARROW_LEFT
-	* @type String
-	* @deprecated	You can customize the image by overriding the default CSS class for the left arrow - "calnavleft"  
-	* @default null
-	*/	
-	this.cfg.addProperty(defCfg.NAV_ARROW_LEFT.key,	{ value:defCfg.NAV_ARROW_LEFT.value, handler:this.configOptions } );
-
-	/**
-	* The image that should be used for the right navigation arrow.
-	* @config NAV_ARROW_RIGHT
-	* @type String
-	* @deprecated	You can customize the image by overriding the default CSS class for the right arrow - "calnavright"
-	* @default null
-	*/	
-	this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key, { value:defCfg.NAV_ARROW_RIGHT.value, handler:this.configOptions } );
-
-	// Locale properties
-
-	/**
-	* The short month labels for the current locale.
-	* @config MONTHS_SHORT
-	* @type String[]
-	* @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
+	* Initializes Calendar's built-in CustomEvents
+	* @method initEvents
 	*/
-	this.cfg.addProperty(defCfg.MONTHS_SHORT.key,	{ value:defCfg.MONTHS_SHORT.value, handler:this.configLocale } );
+	initEvents : function() {
 	
-	/**
-	* The long month labels for the current locale.
-	* @config MONTHS_LONG
-	* @type String[]
-	* @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
-	*/	
-	this.cfg.addProperty(defCfg.MONTHS_LONG.key,		{ value:defCfg.MONTHS_LONG.value, handler:this.configLocale } );
+		var defEvents = YAHOO.widget.Calendar._EVENT_TYPES;
 	
-	/**
-	* The 1-character weekday labels for the current locale.
-	* @config WEEKDAYS_1CHAR
-	* @type String[]
-	* @default ["S", "M", "T", "W", "T", "F", "S"]
-	*/	
-	this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key,	{ value:defCfg.WEEKDAYS_1CHAR.value, handler:this.configLocale } );
+		/**
+		* Fired before a selection is made
+		* @event beforeSelectEvent
+		*/
+		this.beforeSelectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SELECT); 
 	
-	/**
-	* The short weekday labels for the current locale.
-	* @config WEEKDAYS_SHORT
-	* @type String[]
-	* @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
-	*/	
-	this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key,	{ value:defCfg.WEEKDAYS_SHORT.value, handler:this.configLocale } );
+		/**
+		* Fired when a selection is made
+		* @event selectEvent
+		* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
+		*/
+		this.selectEvent = new YAHOO.util.CustomEvent(defEvents.SELECT);
 	
-	/**
-	* The medium weekday labels for the current locale.
-	* @config WEEKDAYS_MEDIUM
-	* @type String[]
-	* @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
-	*/	
-	this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key,	{ value:defCfg.WEEKDAYS_MEDIUM.value, handler:this.configLocale } );
+		/**
+		* Fired before a selection is made
+		* @event beforeDeselectEvent
+		*/
+		this.beforeDeselectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_DESELECT);
 	
-	/**
-	* The long weekday labels for the current locale.
-	* @config WEEKDAYS_LONG
-	* @type String[]
-	* @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
-	*/	
-	this.cfg.addProperty(defCfg.WEEKDAYS_LONG.key,	{ value:defCfg.WEEKDAYS_LONG.value, handler:this.configLocale } );
+		/**
+		* Fired when a selection is made
+		* @event deselectEvent
+		* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
+		*/
+		this.deselectEvent = new YAHOO.util.CustomEvent(defEvents.DESELECT);
+	
+		/**
+		* Fired when the Calendar page is changed
+		* @event changePageEvent
+		*/
+		this.changePageEvent = new YAHOO.util.CustomEvent(defEvents.CHANGE_PAGE);
+	
+		/**
+		* Fired before the Calendar is rendered
+		* @event beforeRenderEvent
+		*/
+		this.beforeRenderEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER);
+	
+		/**
+		* Fired when the Calendar is rendered
+		* @event renderEvent
+		*/
+		this.renderEvent = new YAHOO.util.CustomEvent(defEvents.RENDER);
+	
+		/**
+		* Fired when the Calendar is reset
+		* @event resetEvent
+		*/
+		this.resetEvent = new YAHOO.util.CustomEvent(defEvents.RESET);
+	
+		/**
+		* Fired when the Calendar is cleared
+		* @event clearEvent
+		*/
+		this.clearEvent = new YAHOO.util.CustomEvent(defEvents.CLEAR);
+	
+		/**
+		* Fired just before the Calendar is to be shown
+		* @event beforeShowEvent
+		*/
+		this.beforeShowEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SHOW);
+	
+		/**
+		* Fired after the Calendar is shown
+		* @event showEvent
+		*/
+		this.showEvent = new YAHOO.util.CustomEvent(defEvents.SHOW);
+	
+		/**
+		* Fired just before the Calendar is to be hidden
+		* @event beforeHideEvent
+		*/
+		this.beforeHideEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_HIDE);
+	
+		/**
+		* Fired after the Calendar is hidden
+		* @event hideEvent
+		*/
+		this.hideEvent = new YAHOO.util.CustomEvent(defEvents.HIDE);
 
-	/**
-	* Refreshes the locale values used to build the Calendar.
-	* @method refreshLocale
-	* @private
-	*/
-	var refreshLocale = function() {
-		this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key);
-		this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key);
-	};
-
-	this.cfg.subscribeToConfigEvent(defCfg.START_WEEKDAY.key, refreshLocale, this, true);
-	this.cfg.subscribeToConfigEvent(defCfg.MONTHS_SHORT.key, refreshLocale, this, true);
-	this.cfg.subscribeToConfigEvent(defCfg.MONTHS_LONG.key, refreshLocale, this, true);
-	this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_1CHAR.key, refreshLocale, this, true);
-	this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_SHORT.key, refreshLocale, this, true);
-	this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_MEDIUM.key, refreshLocale, this, true);
-	this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_LONG.key, refreshLocale, this, true);
+		/**
+		* Fired just before the CalendarNavigator is to be shown
+		* @event beforeShowNavEvent
+		*/
+		this.beforeShowNavEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SHOW_NAV);
 	
-	/**
-	* The setting that determines which length of month labels should be used. Possible values are "short" and "long".
-	* @config LOCALE_MONTHS
-	* @type String
-	* @default "long"
-	*/	
-	this.cfg.addProperty(defCfg.LOCALE_MONTHS.key,	{ value:defCfg.LOCALE_MONTHS.value, handler:this.configLocaleValues } );
+		/**
+		* Fired after the CalendarNavigator is shown
+		* @event showNavEvent
+		*/
+		this.showNavEvent = new YAHOO.util.CustomEvent(defEvents.SHOW_NAV);
 	
-	/**
-	* The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long".
-	* @config LOCALE_WEEKDAYS
-	* @type String
-	* @default "short"
-	*/	
-	this.cfg.addProperty(defCfg.LOCALE_WEEKDAYS.key,	{ value:defCfg.LOCALE_WEEKDAYS.value, handler:this.configLocaleValues } );
+		/**
+		* Fired just before the CalendarNavigator is to be hidden
+		* @event beforeHideNavEvent
+		*/
+		this.beforeHideNavEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_HIDE_NAV);
+	
+		/**
+		* Fired after the CalendarNavigator is hidden
+		* @event hideNavEvent
+		*/
+		this.hideNavEvent = new YAHOO.util.CustomEvent(defEvents.HIDE_NAV);
 
-	/**
-	* The value used to delimit individual dates in a date string passed to various Calendar functions.
-	* @config DATE_DELIMITER
-	* @type String
-	* @default ","
-	*/	
-	this.cfg.addProperty(defCfg.DATE_DELIMITER.key,		{ value:defCfg.DATE_DELIMITER.value, handler:this.configLocale } );
+		/**
+		* Fired just before the CalendarNavigator is to be rendered
+		* @event beforeRenderNavEvent
+		*/
+		this.beforeRenderNavEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER_NAV);
 
-	/**
-	* The value used to delimit date fields in a date string passed to various Calendar functions.
-	* @config DATE_FIELD_DELIMITER
-	* @type String
-	* @default "/"
-	*/	
-	this.cfg.addProperty(defCfg.DATE_FIELD_DELIMITER.key, { value:defCfg.DATE_FIELD_DELIMITER.value, handler:this.configLocale } );
+		/**
+		* Fired after the CalendarNavigator is rendered
+		* @event renderNavEvent
+		*/
+		this.renderNavEvent = new YAHOO.util.CustomEvent(defEvents.RENDER_NAV);
 
+		this.beforeSelectEvent.subscribe(this.onBeforeSelect, this, true);
+		this.selectEvent.subscribe(this.onSelect, this, true);
+		this.beforeDeselectEvent.subscribe(this.onBeforeDeselect, this, true);
+		this.deselectEvent.subscribe(this.onDeselect, this, true);
+		this.changePageEvent.subscribe(this.onChangePage, this, true);
+		this.renderEvent.subscribe(this.onRender, this, true);
+		this.resetEvent.subscribe(this.onReset, this, true);
+		this.clearEvent.subscribe(this.onClear, this, true);
+	},
+	
 	/**
-	* The value used to delimit date ranges in a date string passed to various Calendar functions.
-	* @config DATE_RANGE_DELIMITER
-	* @type String
-	* @default "-"
+	* The default event function that is attached to a date link within a calendar cell
+	* when the calendar is rendered.
+	* @method doSelectCell
+	* @param {DOMEvent} e	The event
+	* @param {Calendar} cal	A reference to the calendar passed by the Event utility
 	*/
-	this.cfg.addProperty(defCfg.DATE_RANGE_DELIMITER.key, { value:defCfg.DATE_RANGE_DELIMITER.value, handler:this.configLocale } );
+	doSelectCell : function(e, cal) {
+		var cell,index,d,date;
 
-	/**
-	* The position of the month in a month/year date string
-	* @config MY_MONTH_POSITION
-	* @type Number
-	* @default 1
-	*/
-	this.cfg.addProperty(defCfg.MY_MONTH_POSITION.key,	{ value:defCfg.MY_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+		var target = YAHOO.util.Event.getTarget(e);
+		var tagName = target.tagName.toLowerCase();
+		var defSelector = false;
 
-	/**
-	* The position of the year in a month/year date string
-	* @config MY_YEAR_POSITION
-	* @type Number
-	* @default 2
-	*/
-	this.cfg.addProperty(defCfg.MY_YEAR_POSITION.key,	{ value:defCfg.MY_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+		while (tagName != "td" && ! YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
 
-	/**
-	* The position of the month in a month/day date string
-	* @config MD_MONTH_POSITION
-	* @type Number
-	* @default 1
-	*/
-	this.cfg.addProperty(defCfg.MD_MONTH_POSITION.key,	{ value:defCfg.MD_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+			if (!defSelector && tagName == "a" && YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTOR)) {
+				defSelector = true;	
+			}
 
-	/**
-	* The position of the day in a month/year date string
-	* @config MD_DAY_POSITION
-	* @type Number
-	* @default 2
-	*/
-	this.cfg.addProperty(defCfg.MD_DAY_POSITION.key,		{ value:defCfg.MD_DAY_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+			target = target.parentNode;
+			tagName = target.tagName.toLowerCase();
+			// TODO: No need to go all the way up to html.
+			if (tagName == "html") {
+				return;
+			}
+		}
 
-	/**
-	* The position of the month in a month/day/year date string
-	* @config MDY_MONTH_POSITION
-	* @type Number
-	* @default 1
-	*/
-	this.cfg.addProperty(defCfg.MDY_MONTH_POSITION.key,	{ value:defCfg.MDY_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
-
-	/**
-	* The position of the day in a month/day/year date string
-	* @config MDY_DAY_POSITION
-	* @type Number
-	* @default 2
-	*/
-	this.cfg.addProperty(defCfg.MDY_DAY_POSITION.key,	{ value:defCfg.MDY_DAY_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
-
-	/**
-	* The position of the year in a month/day/year date string
-	* @config MDY_YEAR_POSITION
-	* @type Number
-	* @default 3
-	*/
-	this.cfg.addProperty(defCfg.MDY_YEAR_POSITION.key,	{ value:defCfg.MDY_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+		if (defSelector) {
+			// Stop link href navigation for default renderer
+			YAHOO.util.Event.preventDefault(e);
+		}
 	
-	/**
-	* The position of the month in the month year label string used as the Calendar header
-	* @config MY_LABEL_MONTH_POSITION
-	* @type Number
-	* @default 1
-	*/
-	this.cfg.addProperty(defCfg.MY_LABEL_MONTH_POSITION.key,	{ value:defCfg.MY_LABEL_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+		cell = target;
 
-	/**
-	* The position of the year in the month year label string used as the Calendar header
-	* @config MY_LABEL_YEAR_POSITION
-	* @type Number
-	* @default 2
-	*/
-	this.cfg.addProperty(defCfg.MY_LABEL_YEAR_POSITION.key,	{ value:defCfg.MY_LABEL_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
-	
-	/**
-	* The suffix used after the month when rendering the Calendar header
-	* @config MY_LABEL_MONTH_SUFFIX
-	* @type String
-	* @default " "
-	*/
-	this.cfg.addProperty(defCfg.MY_LABEL_MONTH_SUFFIX.key,	{ value:defCfg.MY_LABEL_MONTH_SUFFIX.value, handler:this.configLocale } );
-	
-	/**
-	* The suffix used after the year when rendering the Calendar header
-	* @config MY_LABEL_YEAR_SUFFIX
-	* @type String
-	* @default ""
-	*/
-	this.cfg.addProperty(defCfg.MY_LABEL_YEAR_SUFFIX.key, { value:defCfg.MY_LABEL_YEAR_SUFFIX.value, handler:this.configLocale } );
-};
+		if (YAHOO.util.Dom.hasClass(cell, cal.Style.CSS_CELL_SELECTABLE)) {
+			index = cell.id.split("cell")[1];
+			d = cal.cellDates[index];
+			date = YAHOO.widget.DateMath.getDate(d[0],d[1]-1,d[2]);
+		
+			var link;
 
-/**
-* The default handler for the "pagedate" property
-* @method configPageDate
-*/
-YAHOO.widget.Calendar.prototype.configPageDate = function(type, args, obj) {
-	this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key, this._parsePageDate(args[0]), true);
-};
+			if (cal.Options.MULTI_SELECT) {
+				link = cell.getElementsByTagName("a")[0];
+				if (link) {
+					link.blur();
+				}
 
-/**
-* The default handler for the "mindate" property
-* @method configMinDate
-*/
-YAHOO.widget.Calendar.prototype.configMinDate = function(type, args, obj) {
-	var val = args[0];
-	if (YAHOO.lang.isString(val)) {
-		val = this._parseDate(val);
-		this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MINDATE.key, new Date(val[0],(val[1]-1),val[2]));
-	}
-};
+				var cellDate = cal.cellDates[index];
+				var cellDateIndex = cal._indexOfSelectedFieldArray(cellDate);
 
-/**
-* The default handler for the "maxdate" property
-* @method configMaxDate
-*/
-YAHOO.widget.Calendar.prototype.configMaxDate = function(type, args, obj) {
-	var val = args[0];
-	if (YAHOO.lang.isString(val)) {
-		val = this._parseDate(val);
-		this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MAXDATE.key, new Date(val[0],(val[1]-1),val[2]));
-	}
-};
-
-/**
-* The default handler for the "selected" property
-* @method configSelected
-*/
-YAHOO.widget.Calendar.prototype.configSelected = function(type, args, obj) {
-	var selected = args[0];
-	var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+				if (cellDateIndex > -1) {	
+					cal.deselectCell(index);
+				} else {
+					cal.selectCell(index);
+				}	
 	
-	if (selected) {
-		if (YAHOO.lang.isString(selected)) {
-			this.cfg.setProperty(cfgSelected, this._parseDates(selected), true);
-		} 
-	}
-	if (! this._selectedDates) {
-		this._selectedDates = this.cfg.getProperty(cfgSelected);
-	}
-};
+			} else {
+				link = cell.getElementsByTagName("a")[0];
+				if (link) {
+					link.blur();
+				}
+				cal.selectCell(index);
+			}
+		}
+	},
 
-/**
-* The default handler for all configuration options properties
-* @method configOptions
-*/
-YAHOO.widget.Calendar.prototype.configOptions = function(type, args, obj) {
-	this.Options[type.toUpperCase()] = args[0];
-};
+	/**
+	* The event that is executed when the user hovers over a cell
+	* @method doCellMouseOver
+	* @param {DOMEvent} e	The event
+	* @param {Calendar} cal	A reference to the calendar passed by the Event utility
+	*/
+	doCellMouseOver : function(e, cal) {
+		var target;
+		if (e) {
+			target = YAHOO.util.Event.getTarget(e);
+		} else {
+			target = this;
+		}
 
-/**
-* The default handler for all configuration locale properties
-* @method configLocale
-*/
-YAHOO.widget.Calendar.prototype.configLocale = function(type, args, obj) {
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-	this.Locale[type.toUpperCase()] = args[0];
+		while (target.tagName && target.tagName.toLowerCase() != "td") {
+			target = target.parentNode;
+			if (!target.tagName || target.tagName.toLowerCase() == "html") {
+				return;
+			}
+		}
 
-	this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key);
-	this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key);
-};
+		if (YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
+			YAHOO.util.Dom.addClass(target, cal.Style.CSS_CELL_HOVER);
+		}
+	},
 
-/**
-* The default handler for all configuration locale field length properties
-* @method configLocaleValues
-*/
-YAHOO.widget.Calendar.prototype.configLocaleValues = function(type, args, obj) {
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG; 
+	/**
+	* The event that is executed when the user moves the mouse out of a cell
+	* @method doCellMouseOut
+	* @param {DOMEvent} e	The event
+	* @param {Calendar} cal	A reference to the calendar passed by the Event utility
+	*/
+	doCellMouseOut : function(e, cal) {
+		var target;
+		if (e) {
+			target = YAHOO.util.Event.getTarget(e);
+		} else {
+			target = this;
+		}
 
-	type = type.toLowerCase();
-	var val = args[0];
-
-	switch (type) {
-		case defCfg.LOCALE_MONTHS.key:
-			switch (val) {
-				case YAHOO.widget.Calendar.SHORT:
-					this.Locale.LOCALE_MONTHS = this.cfg.getProperty(defCfg.MONTHS_SHORT.key).concat();
-					break;
-				case YAHOO.widget.Calendar.LONG:
-					this.Locale.LOCALE_MONTHS = this.cfg.getProperty(defCfg.MONTHS_LONG.key).concat();
-					break;
+		while (target.tagName && target.tagName.toLowerCase() != "td") {
+			target = target.parentNode;
+			if (!target.tagName || target.tagName.toLowerCase() == "html") {
+				return;
 			}
-			break;
-		case defCfg.LOCALE_WEEKDAYS.key:
-			switch (val) {
-				case YAHOO.widget.Calendar.ONE_CHAR:
-					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_1CHAR.key).concat();
-					break;
-				case YAHOO.widget.Calendar.SHORT:
-					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_SHORT.key).concat();
-					break;
-				case YAHOO.widget.Calendar.MEDIUM:
-					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_MEDIUM.key).concat();
-					break;
-				case YAHOO.widget.Calendar.LONG:
-					this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_LONG.key).concat();
-					break;
-			}
-			
-			var START_WEEKDAY = this.cfg.getProperty(defCfg.START_WEEKDAY.key);
+		}
 
-			if (START_WEEKDAY > 0) {
-				for (var w=0;w<START_WEEKDAY;++w) {
-					this.Locale.LOCALE_WEEKDAYS.push(this.Locale.LOCALE_WEEKDAYS.shift());
-				}
-			}
-			break;
-	}
-};
+		if (YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
+			YAHOO.util.Dom.removeClass(target, cal.Style.CSS_CELL_HOVER);
+		}
+	},
+	
+	setupConfig : function() {
+	
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
 
-/**
-* Defines the style constants for the Calendar
-* @method initStyles
-*/
-YAHOO.widget.Calendar.prototype.initStyles = function() {
-
-	var defStyle = YAHOO.widget.Calendar._STYLES;
-
-	this.Style = {
 		/**
-		* @property Style.CSS_ROW_HEADER
+		* The month/year representing the current visible Calendar date (mm/yyyy)
+		* @config pagedate
+		* @type String
+		* @default today's date
 		*/
-		CSS_ROW_HEADER: defStyle.CSS_ROW_HEADER,
+		this.cfg.addProperty(defCfg.PAGEDATE.key, { value:new Date(), handler:this.configPageDate } );
+
 		/**
-		* @property Style.CSS_ROW_FOOTER
+		* The date or range of dates representing the current Calendar selection
+		* @config selected
+		* @type String
+		* @default []
 		*/
-		CSS_ROW_FOOTER: defStyle.CSS_ROW_FOOTER,
+		this.cfg.addProperty(defCfg.SELECTED.key, { value:[], handler:this.configSelected } );
+
 		/**
-		* @property Style.CSS_CELL
+		* The title to display above the Calendar's month header
+		* @config title
+		* @type String
+		* @default ""
 		*/
-		CSS_CELL : defStyle.CSS_CELL,
+		this.cfg.addProperty(defCfg.TITLE.key, { value:defCfg.TITLE.value, handler:this.configTitle } );
+
 		/**
-		* @property Style.CSS_CELL_SELECTOR
+		* Whether or not a close button should be displayed for this Calendar
+		* @config close
+		* @type Boolean
+		* @default false
 		*/
-		CSS_CELL_SELECTOR : defStyle.CSS_CELL_SELECTOR,
+		this.cfg.addProperty(defCfg.CLOSE.key, { value:defCfg.CLOSE.value, handler:this.configClose } );
+
 		/**
-		* @property Style.CSS_CELL_SELECTED
+		* Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below.
+		* This property is enabled by default for IE6 and below. It is disabled by default for other browsers for performance reasons, but can be 
+		* enabled if required.
+		* 
+		* @config iframe
+		* @type Boolean
+		* @default true for IE6 and below, false for all other browsers
 		*/
-		CSS_CELL_SELECTED : defStyle.CSS_CELL_SELECTED,
+		this.cfg.addProperty(defCfg.IFRAME.key, { value:defCfg.IFRAME.value, handler:this.configIframe, validator:this.cfg.checkBoolean } );
+
 		/**
-		* @property Style.CSS_CELL_SELECTABLE
+		* The minimum selectable date in the current Calendar (mm/dd/yyyy)
+		* @config mindate
+		* @type String
+		* @default null
 		*/
-		CSS_CELL_SELECTABLE : defStyle.CSS_CELL_SELECTABLE,
+		this.cfg.addProperty(defCfg.MINDATE.key, { value:defCfg.MINDATE.value, handler:this.configMinDate } );
+
 		/**
-		* @property Style.CSS_CELL_RESTRICTED
+		* The maximum selectable date in the current Calendar (mm/dd/yyyy)
+		* @config maxdate
+		* @type String
+		* @default null
 		*/
-		CSS_CELL_RESTRICTED : defStyle.CSS_CELL_RESTRICTED,
+		this.cfg.addProperty(defCfg.MAXDATE.key, { value:defCfg.MAXDATE.value, handler:this.configMaxDate } );
+	
+	
+		// Options properties
+	
 		/**
-		* @property Style.CSS_CELL_TODAY
+		* True if the Calendar should allow multiple selections. False by default.
+		* @config MULTI_SELECT
+		* @type Boolean
+		* @default false
 		*/
-		CSS_CELL_TODAY : defStyle.CSS_CELL_TODAY,
+		this.cfg.addProperty(defCfg.MULTI_SELECT.key,	{ value:defCfg.MULTI_SELECT.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+	
 		/**
-		* @property Style.CSS_CELL_OOM
+		* The weekday the week begins on. Default is 0 (Sunday).
+		* @config START_WEEKDAY
+		* @type number
+		* @default 0
 		*/
-		CSS_CELL_OOM : defStyle.CSS_CELL_OOM,
+		this.cfg.addProperty(defCfg.START_WEEKDAY.key,	{ value:defCfg.START_WEEKDAY.value, handler:this.configOptions, validator:this.cfg.checkNumber  } );
+	
 		/**
-		* @property Style.CSS_CELL_OOB
+		* True if the Calendar should show weekday labels. True by default.
+		* @config SHOW_WEEKDAYS
+		* @type Boolean
+		* @default true
 		*/
-		CSS_CELL_OOB : defStyle.CSS_CELL_OOB,
+		this.cfg.addProperty(defCfg.SHOW_WEEKDAYS.key,	{ value:defCfg.SHOW_WEEKDAYS.value, handler:this.configOptions, validator:this.cfg.checkBoolean  } );
+	
 		/**
-		* @property Style.CSS_HEADER
+		* True if the Calendar should show week row headers. False by default.
+		* @config SHOW_WEEK_HEADER
+		* @type Boolean
+		* @default false
 		*/
-		CSS_HEADER : defStyle.CSS_HEADER,
+		this.cfg.addProperty(defCfg.SHOW_WEEK_HEADER.key, { value:defCfg.SHOW_WEEK_HEADER.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+	
 		/**
-		* @property Style.CSS_HEADER_TEXT
-		*/
-		CSS_HEADER_TEXT : defStyle.CSS_HEADER_TEXT,
+		* True if the Calendar should show week row footers. False by default.
+		* @config SHOW_WEEK_FOOTER
+		* @type Boolean
+		* @default false
+		*/	
+		this.cfg.addProperty(defCfg.SHOW_WEEK_FOOTER.key,{ value:defCfg.SHOW_WEEK_FOOTER.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+	
 		/**
-		* @property Style.CSS_BODY
-		*/
-		CSS_BODY : defStyle.CSS_BODY,
+		* True if the Calendar should suppress weeks that are not a part of the current month. False by default.
+		* @config HIDE_BLANK_WEEKS
+		* @type Boolean
+		* @default false
+		*/	
+		this.cfg.addProperty(defCfg.HIDE_BLANK_WEEKS.key, { value:defCfg.HIDE_BLANK_WEEKS.value, handler:this.configOptions, validator:this.cfg.checkBoolean } );
+		
 		/**
-		* @property Style.CSS_WEEKDAY_CELL
-		*/
-		CSS_WEEKDAY_CELL : defStyle.CSS_WEEKDAY_CELL,
+		* The image that should be used for the left navigation arrow.
+		* @config NAV_ARROW_LEFT
+		* @type String
+		* @deprecated	You can customize the image by overriding the default CSS class for the left arrow - "calnavleft"  
+		* @default null
+		*/	
+		this.cfg.addProperty(defCfg.NAV_ARROW_LEFT.key,	{ value:defCfg.NAV_ARROW_LEFT.value, handler:this.configOptions } );
+	
 		/**
-		* @property Style.CSS_WEEKDAY_ROW
-		*/
-		CSS_WEEKDAY_ROW : defStyle.CSS_WEEKDAY_ROW,
+		* The image that should be used for the right navigation arrow.
+		* @config NAV_ARROW_RIGHT
+		* @type String
+		* @deprecated	You can customize the image by overriding the default CSS class for the right arrow - "calnavright"
+		* @default null
+		*/	
+		this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key, { value:defCfg.NAV_ARROW_RIGHT.value, handler:this.configOptions } );
+	
+		// Locale properties
+	
 		/**
-		* @property Style.CSS_FOOTER
+		* The short month labels for the current locale.
+		* @config MONTHS_SHORT
+		* @type String[]
+		* @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
 		*/
-		CSS_FOOTER : defStyle.CSS_FOOTER,
+		this.cfg.addProperty(defCfg.MONTHS_SHORT.key,	{ value:defCfg.MONTHS_SHORT.value, handler:this.configLocale } );
+		
 		/**
-		* @property Style.CSS_CALENDAR
-		*/
-		CSS_CALENDAR : defStyle.CSS_CALENDAR,
+		* The long month labels for the current locale.
+		* @config MONTHS_LONG
+		* @type String[]
+		* @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
+		*/	
+		this.cfg.addProperty(defCfg.MONTHS_LONG.key,		{ value:defCfg.MONTHS_LONG.value, handler:this.configLocale } );
+
 		/**
-		* @property Style.CSS_SINGLE
+		* The 1-character weekday labels for the current locale.
+		* @config WEEKDAYS_1CHAR
+		* @type String[]
+		* @default ["S", "M", "T", "W", "T", "F", "S"]
+		*/	
+		this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key,	{ value:defCfg.WEEKDAYS_1CHAR.value, handler:this.configLocale } );
+		
+		/**
+		* The short weekday labels for the current locale.
+		* @config WEEKDAYS_SHORT
+		* @type String[]
+		* @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
+		*/	
+		this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key,	{ value:defCfg.WEEKDAYS_SHORT.value, handler:this.configLocale } );
+		
+		/**
+		* The medium weekday labels for the current locale.
+		* @config WEEKDAYS_MEDIUM
+		* @type String[]
+		* @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
+		*/	
+		this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key,	{ value:defCfg.WEEKDAYS_MEDIUM.value, handler:this.configLocale } );
+		
+		/**
+		* The long weekday labels for the current locale.
+		* @config WEEKDAYS_LONG
+		* @type String[]
+		* @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
+		*/	
+		this.cfg.addProperty(defCfg.WEEKDAYS_LONG.key,	{ value:defCfg.WEEKDAYS_LONG.value, handler:this.configLocale } );
+	
+		/**
+		* Refreshes the locale values used to build the Calendar.
+		* @method refreshLocale
+		* @private
 		*/
-		CSS_SINGLE : defStyle.CSS_SINGLE,
+		var refreshLocale = function() {
+			this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key);
+			this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key);
+		};
+	
+		this.cfg.subscribeToConfigEvent(defCfg.START_WEEKDAY.key, refreshLocale, this, true);
+		this.cfg.subscribeToConfigEvent(defCfg.MONTHS_SHORT.key, refreshLocale, this, true);
+		this.cfg.subscribeToConfigEvent(defCfg.MONTHS_LONG.key, refreshLocale, this, true);
+		this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_1CHAR.key, refreshLocale, this, true);
+		this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_SHORT.key, refreshLocale, this, true);
+		this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_MEDIUM.key, refreshLocale, this, true);
+		this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_LONG.key, refreshLocale, this, true);
+		
 		/**
-		* @property Style.CSS_CONTAINER
+		* The setting that determines which length of month labels should be used. Possible values are "short" and "long".
+		* @config LOCALE_MONTHS
+		* @type String
+		* @default "long"
+		*/	
+		this.cfg.addProperty(defCfg.LOCALE_MONTHS.key,	{ value:defCfg.LOCALE_MONTHS.value, handler:this.configLocaleValues } );
+		
+		/**
+		* The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long".
+		* @config LOCALE_WEEKDAYS
+		* @type String
+		* @default "short"
+		*/	
+		this.cfg.addProperty(defCfg.LOCALE_WEEKDAYS.key,	{ value:defCfg.LOCALE_WEEKDAYS.value, handler:this.configLocaleValues } );
+	
+		/**
+		* The value used to delimit individual dates in a date string passed to various Calendar functions.
+		* @config DATE_DELIMITER
+		* @type String
+		* @default ","
+		*/	
+		this.cfg.addProperty(defCfg.DATE_DELIMITER.key,		{ value:defCfg.DATE_DELIMITER.value, handler:this.configLocale } );
+	
+		/**
+		* The value used to delimit date fields in a date string passed to various Calendar functions.
+		* @config DATE_FIELD_DELIMITER
+		* @type String
+		* @default "/"
+		*/	
+		this.cfg.addProperty(defCfg.DATE_FIELD_DELIMITER.key, { value:defCfg.DATE_FIELD_DELIMITER.value, handler:this.configLocale } );
+	
+		/**
+		* The value used to delimit date ranges in a date string passed to various Calendar functions.
+		* @config DATE_RANGE_DELIMITER
+		* @type String
+		* @default "-"
 		*/
-		CSS_CONTAINER : defStyle.CSS_CONTAINER,
+		this.cfg.addProperty(defCfg.DATE_RANGE_DELIMITER.key, { value:defCfg.DATE_RANGE_DELIMITER.value, handler:this.configLocale } );
+	
 		/**
-		* @property Style.CSS_NAV_LEFT
+		* The position of the month in a month/year date string
+		* @config MY_MONTH_POSITION
+		* @type Number
+		* @default 1
 		*/
-		CSS_NAV_LEFT : defStyle.CSS_NAV_LEFT,
+		this.cfg.addProperty(defCfg.MY_MONTH_POSITION.key,	{ value:defCfg.MY_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	
 		/**
-		* @property Style.CSS_NAV_RIGHT
+		* The position of the year in a month/year date string
+		* @config MY_YEAR_POSITION
+		* @type Number
+		* @default 2
 		*/
-		CSS_NAV_RIGHT : defStyle.CSS_NAV_RIGHT,
+		this.cfg.addProperty(defCfg.MY_YEAR_POSITION.key,	{ value:defCfg.MY_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	
 		/**
-		* @property Style.CSS_CLOSE
+		* The position of the month in a month/day date string
+		* @config MD_MONTH_POSITION
+		* @type Number
+		* @default 1
 		*/
-		CSS_CLOSE : defStyle.CSS_CLOSE,
+		this.cfg.addProperty(defCfg.MD_MONTH_POSITION.key,	{ value:defCfg.MD_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	
 		/**
-		* @property Style.CSS_CELL_TOP
+		* The position of the day in a month/year date string
+		* @config MD_DAY_POSITION
+		* @type Number
+		* @default 2
 		*/
-		CSS_CELL_TOP : defStyle.CSS_CELL_TOP,
+		this.cfg.addProperty(defCfg.MD_DAY_POSITION.key,		{ value:defCfg.MD_DAY_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	
 		/**
-		* @property Style.CSS_CELL_LEFT
+		* The position of the month in a month/day/year date string
+		* @config MDY_MONTH_POSITION
+		* @type Number
+		* @default 1
 		*/
-		CSS_CELL_LEFT : defStyle.CSS_CELL_LEFT,
+		this.cfg.addProperty(defCfg.MDY_MONTH_POSITION.key,	{ value:defCfg.MDY_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	
 		/**
-		* @property Style.CSS_CELL_RIGHT
+		* The position of the day in a month/day/year date string
+		* @config MDY_DAY_POSITION
+		* @type Number
+		* @default 2
 		*/
-		CSS_CELL_RIGHT : defStyle.CSS_CELL_RIGHT,
+		this.cfg.addProperty(defCfg.MDY_DAY_POSITION.key,	{ value:defCfg.MDY_DAY_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	
 		/**
-		* @property Style.CSS_CELL_BOTTOM
+		* The position of the year in a month/day/year date string
+		* @config MDY_YEAR_POSITION
+		* @type Number
+		* @default 3
 		*/
-		CSS_CELL_BOTTOM : defStyle.CSS_CELL_BOTTOM,
+		this.cfg.addProperty(defCfg.MDY_YEAR_POSITION.key,	{ value:defCfg.MDY_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+		
 		/**
-		* @property Style.CSS_CELL_HOVER
+		* The position of the month in the month year label string used as the Calendar header
+		* @config MY_LABEL_MONTH_POSITION
+		* @type Number
+		* @default 1
 		*/
-		CSS_CELL_HOVER : defStyle.CSS_CELL_HOVER,
+		this.cfg.addProperty(defCfg.MY_LABEL_MONTH_POSITION.key,	{ value:defCfg.MY_LABEL_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+	
 		/**
-		* @property Style.CSS_CELL_HIGHLIGHT1
+		* The position of the year in the month year label string used as the Calendar header
+		* @config MY_LABEL_YEAR_POSITION
+		* @type Number
+		* @default 2
 		*/
-		CSS_CELL_HIGHLIGHT1 : defStyle.CSS_CELL_HIGHLIGHT1,
+		this.cfg.addProperty(defCfg.MY_LABEL_YEAR_POSITION.key,	{ value:defCfg.MY_LABEL_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } );
+		
 		/**
-		* @property Style.CSS_CELL_HIGHLIGHT2
+		* The suffix used after the month when rendering the Calendar header
+		* @config MY_LABEL_MONTH_SUFFIX
+		* @type String
+		* @default " "
 		*/
-		CSS_CELL_HIGHLIGHT2 : defStyle.CSS_CELL_HIGHLIGHT2,
+		this.cfg.addProperty(defCfg.MY_LABEL_MONTH_SUFFIX.key,	{ value:defCfg.MY_LABEL_MONTH_SUFFIX.value, handler:this.configLocale } );
+		
 		/**
-		* @property Style.CSS_CELL_HIGHLIGHT3
+		* The suffix used after the year when rendering the Calendar header
+		* @config MY_LABEL_YEAR_SUFFIX
+		* @type String
+		* @default ""
 		*/
-		CSS_CELL_HIGHLIGHT3 : defStyle.CSS_CELL_HIGHLIGHT3,
+		this.cfg.addProperty(defCfg.MY_LABEL_YEAR_SUFFIX.key, { value:defCfg.MY_LABEL_YEAR_SUFFIX.value, handler:this.configLocale } );
+
 		/**
-		* @property Style.CSS_CELL_HIGHLIGHT4
+		* Configuration for the Month/Year CalendarNavigator UI which allows the user to jump directly to a 
+		* specific Month/Year without having to scroll sequentially through months.
+		* <p>
+		* Setting this property to null (default value) or false, will disable the CalendarNavigator UI.
+		* </p>
+		* <p>
+		* Setting this property to true will enable the CalendarNavigatior UI with the default CalendarNavigator configuration values.
+		* </p>
+		* <p>
+		* This property can also be set to an object literal containing configuration properties for the CalendarNavigator UI.
+		* The configuration object expects the the following case-sensitive properties, with the "strings" property being a nested object.
+		* Any properties which are not provided will use the default values (defined in the CalendarNavigator class).
+		* </p>
+		* <dl>
+		* <dt>strings</dt>
+		* <dd><em>Object</em> :  An object with the properties shown below, defining the string labels to use in the Navigator's UI
+		*     <dl>
+		*         <dt>month</dt><dd><em>String</em> : The string to use for the month label. Defaults to "Month".</dd>
+		*         <dt>year</dt><dd><em>String</em> : The string to use for the year label. Defaults to "Year".</dd>
+		*         <dt>submit</dt><dd><em>String</em> : The string to use for the submit button label. Defaults to "Okay".</dd>
+		*         <dt>cancel</dt><dd><em>String</em> : The string to use for the cancel button label. Defaults to "Cancel".</dd>
+		*         <dt>invalidYear</dt><dd><em>String</em> : The string to use for invalid year values. Defaults to "Year needs to be a number".</dd>
+		*     </dl>
+		* </dd>
+		* <dt>monthFormat</dt><dd><em>String</em> : The month format to use. Either YAHOO.widget.Calendar.LONG, or YAHOO.widget.Calendar.SHORT. Defaults to YAHOO.widget.Calendar.LONG</dd>
+		* <dt>initialFocus</dt><dd><em>String</em> : Either "year" or "month" specifying which input control should get initial focus. Defaults to "year"</dd>
+		* </dl>
+		* <p>E.g.</p>
+		* <pre>
+		* var navConfig = {
+		*	  strings: {
+		*		  month:"Calendar Month",
+		*		  year:"Calendar Year",
+		*		  submit: "Submit",
+		*		  cancel: "Cancel",
+		*		  invalidYear: "Please enter a valid year"
+		*	  },
+		*	  monthFormat: YAHOO.widget.Calendar.SHORT,
+		*	  initialFocus: "month"
+		* }
+		* </pre>
+		* @config navigator
+		* @type {Object|Boolean}
+		* @default null
 		*/
-		CSS_CELL_HIGHLIGHT4 : defStyle.CSS_CELL_HIGHLIGHT4
-	};
-};
+		this.cfg.addProperty(defCfg.NAV.key, { value:defCfg.NAV.value, handler:this.configNavigator } );
+	},
 
-/**
-* Builds the date label that will be displayed in the calendar header or
-* footer, depending on configuration.
-* @method buildMonthLabel
-* @return	{String}	The formatted calendar month label
-*/
-YAHOO.widget.Calendar.prototype.buildMonthLabel = function() {
-	var pageDate = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key);
+	/**
+	* The default handler for the "pagedate" property
+	* @method configPageDate
+	*/
+	configPageDate : function(type, args, obj) {
+		this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key, this._parsePageDate(args[0]), true);
+	},
 
-	var monthLabel  = this.Locale.LOCALE_MONTHS[pageDate.getMonth()] + this.Locale.MY_LABEL_MONTH_SUFFIX;
-	var yearLabel = pageDate.getFullYear() + this.Locale.MY_LABEL_YEAR_SUFFIX;
-
-	if (this.Locale.MY_LABEL_MONTH_POSITION == 2 || this.Locale.MY_LABEL_YEAR_POSITION == 1) {
-		return yearLabel + monthLabel;
-	} else {
-		return monthLabel + yearLabel;
-	}
-};
-
-/**
-* Builds the date digit that will be displayed in calendar cells
-* @method buildDayLabel
-* @param {Date}	workingDate	The current working date
-* @return	{String}	The formatted day label
-*/
-YAHOO.widget.Calendar.prototype.buildDayLabel = function(workingDate) {
-	return workingDate.getDate();
-};
-
-/**
- * Creates the title bar element and adds it to Calendar container DIV
- * 
- * @method createTitleBar
- * @param {String} strTitle The title to display in the title bar
- * @return The title bar element
- */
-YAHOO.widget.Calendar.prototype.createTitleBar = function(strTitle) {
-	var tDiv = YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || document.createElement("div");
-	tDiv.className = YAHOO.widget.CalendarGroup.CSS_2UPTITLE;
-	tDiv.innerHTML = strTitle;
-	this.oDomContainer.insertBefore(tDiv, this.oDomContainer.firstChild);
-
-	YAHOO.util.Dom.addClass(this.oDomContainer, "withtitle");
-
-	return tDiv;
-};
-
-/**
- * Removes the title bar element from the DOM
- * 
- * @method removeTitleBar
- */
-YAHOO.widget.Calendar.prototype.removeTitleBar = function() {
-	var tDiv = YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || null;
-	if (tDiv) {
-		YAHOO.util.Event.purgeElement(tDiv);
-		this.oDomContainer.removeChild(tDiv);
-	}
-	YAHOO.util.Dom.removeClass(this.oDomContainer, "withtitle");
-};
-
-/**
- * Creates the close button HTML element and adds it to Calendar container DIV
- * 
- * @method createCloseButton
- * @return The close HTML element created
- */
-YAHOO.widget.Calendar.prototype.createCloseButton = function() {
-	var Dom = YAHOO.util.Dom,
-		Event = YAHOO.util.Event,
-		cssClose = YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,
-		DEPR_CLOSE_PATH = "us/my/bn/x_d.gif";
-
-	var lnk = Dom.getElementsByClassName("link-close", "a", this.oDomContainer)[0];
-
-	if (!lnk) {
-		lnk = document.createElement("a");  
-		Event.addListener(lnk, "click", function(e, cal) {
-			cal.hide(); 
-			Event.preventDefault(e);
-		}, this);        
-	}
-
-	lnk.href = "#";
-	lnk.className = "link-close";
-
-	if (YAHOO.widget.Calendar.IMG_ROOT !== null) {
-		var img = Dom.getElementsByClassName(cssClose, "img", lnk)[0] || document.createElement("img");
-		img.src = YAHOO.widget.Calendar.IMG_ROOT + DEPR_CLOSE_PATH;
-		img.className = cssClose;
-		lnk.appendChild(img);
-	} else {
-		lnk.innerHTML = '<span class="' + cssClose + ' ' + this.Style.CSS_CLOSE + '"></span>';
-	}
-	this.oDomContainer.appendChild(lnk);
-
-	return lnk;
-};
-
-/**
- * Removes the close button HTML element from the DOM
- * 
- * @method removeCloseButton
- */
-YAHOO.widget.Calendar.prototype.removeCloseButton = function() {
-	var btn = YAHOO.util.Dom.getElementsByClassName("link-close", "a", this.oDomContainer)[0] || null;
-	if (btn) {
-		YAHOO.util.Event.purgeElement(btn);
-		this.oDomContainer.removeChild(btn);
-	}
-};
-
-/**
-* Renders the calendar header.
-* @method renderHeader
-* @param {Array}	html	The current working HTML array
-* @return {Array} The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.renderHeader = function(html) {
-	var colSpan = 7;
-	
-	var DEPR_NAV_LEFT = "us/tr/callt.gif";
-	var DEPR_NAV_RIGHT = "us/tr/calrt.gif";	
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-	
-	if (this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key)) {
-		colSpan += 1;
-	}
-
-	if (this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key)) {
-		colSpan += 1;
-	}
-
-	html[html.length] = "<thead>";
-	html[html.length] =		"<tr>";
-	html[html.length] =			'<th colspan="' + colSpan + '" class="' + this.Style.CSS_HEADER_TEXT + '">';
-	html[html.length] =				'<div class="' + this.Style.CSS_HEADER + '">';
-
-	var renderLeft, renderRight = false;
-
-	if (this.parent) {
-		if (this.index === 0) {
-			renderLeft = true;
+	/**
+	* The default handler for the "mindate" property
+	* @method configMinDate
+	*/
+	configMinDate : function(type, args, obj) {
+		var val = args[0];
+		if (YAHOO.lang.isString(val)) {
+			val = this._parseDate(val);
+			this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MINDATE.key, YAHOO.widget.DateMath.getDate(val[0],(val[1]-1),val[2]));
 		}
-		if (this.index == (this.parent.cfg.getProperty("pages") -1)) {
-			renderRight = true;
-		}
-	} else {
-		renderLeft = true;
-		renderRight = true;
-	}
+	},
 
-	var cal = this.parent || this;
-	
-	if (renderLeft) {
-		var leftArrow = this.cfg.getProperty(defCfg.NAV_ARROW_LEFT.key);
-		// Check for deprecated customization - If someone set IMG_ROOT, but didn't set NAV_ARROW_LEFT, then set NAV_ARROW_LEFT to the old deprecated value
-		if (leftArrow === null && YAHOO.widget.Calendar.IMG_ROOT !== null) {
-			leftArrow = YAHOO.widget.Calendar.IMG_ROOT + DEPR_NAV_LEFT;
+	/**
+	* The default handler for the "maxdate" property
+	* @method configMaxDate
+	*/
+	configMaxDate : function(type, args, obj) {
+		var val = args[0];
+		if (YAHOO.lang.isString(val)) {
+			val = this._parseDate(val);
+			this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MAXDATE.key, YAHOO.widget.DateMath.getDate(val[0],(val[1]-1),val[2]));
 		}
-		var leftStyle = (leftArrow === null) ? "" : ' style="background-image:url(' + leftArrow + ')"';
-		html[html.length] = '<a class="' + this.Style.CSS_NAV_LEFT + '"' + leftStyle + ' > </a>';
-	}
+	},
 	
-	html[html.length] = this.buildMonthLabel();
-	
-	if (renderRight) {
-		var rightArrow = this.cfg.getProperty(defCfg.NAV_ARROW_RIGHT.key);
-		if (rightArrow === null && YAHOO.widget.Calendar.IMG_ROOT !== null) {
-			rightArrow = YAHOO.widget.Calendar.IMG_ROOT + DEPR_NAV_RIGHT;
+	/**
+	* The default handler for the "selected" property
+	* @method configSelected
+	*/
+	configSelected : function(type, args, obj) {
+		var selected = args[0];
+		var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+		
+		if (selected) {
+			if (YAHOO.lang.isString(selected)) {
+				this.cfg.setProperty(cfgSelected, this._parseDates(selected), true);
+			} 
 		}
-		var rightStyle = (rightArrow === null) ? "" : ' style="background-image:url(' + rightArrow + ')"';
-		html[html.length] = '<a class="' + this.Style.CSS_NAV_RIGHT + '"' + rightStyle + ' > </a>';
-	}
-
-	html[html.length] =	'</div>\n</th>\n</tr>';
-
-	if (this.cfg.getProperty(defCfg.SHOW_WEEKDAYS.key)) {
-		html = this.buildWeekdays(html);
-	}
+		if (! this._selectedDates) {
+			this._selectedDates = this.cfg.getProperty(cfgSelected);
+		}
+	},
 	
-	html[html.length] = '</thead>';
-
-	return html;
-};
-
-/**
-* Renders the Calendar's weekday headers.
-* @method buildWeekdays
-* @param {Array}	html	The current working HTML array
-* @return {Array} The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.buildWeekdays = function(html) {
-
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-
-	html[html.length] = '<tr class="' + this.Style.CSS_WEEKDAY_ROW + '">';
-
-	if (this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key)) {
-		html[html.length] = '<th> </th>';
-	}
-
-	for(var i=0;i<this.Locale.LOCALE_WEEKDAYS.length;++i) {
-		html[html.length] = '<th class="calweekdaycell">' + this.Locale.LOCALE_WEEKDAYS[i] + '</th>';
-	}
-
-	if (this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key)) {
-		html[html.length] = '<th> </th>';
-	}
-
-	html[html.length] = '</tr>';
-
-	return html;
-};
-
-/**
-* Renders the calendar body.
-* @method renderBody
-* @param {Date}	workingDate	The current working Date being used for the render process
-* @param {Array}	html	The current working HTML array
-* @return {Array} The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.renderBody = function(workingDate, html) {
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-
-	var startDay = this.cfg.getProperty(defCfg.START_WEEKDAY.key);
-
-	this.preMonthDays = workingDate.getDay();
-	if (startDay > 0) {
-		this.preMonthDays -= startDay;
-	}
-	if (this.preMonthDays < 0) {
-		this.preMonthDays += 7;
-	}
+	/**
+	* The default handler for all configuration options properties
+	* @method configOptions
+	*/
+	configOptions : function(type, args, obj) {
+		this.Options[type.toUpperCase()] = args[0];
+	},
 	
-	this.monthDays = YAHOO.widget.DateMath.findMonthEnd(workingDate).getDate();
-	this.postMonthDays = YAHOO.widget.Calendar.DISPLAY_DAYS-this.preMonthDays-this.monthDays;
+	/**
+	* The default handler for all configuration locale properties
+	* @method configLocale
+	*/
+	configLocale : function(type, args, obj) {
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+		this.Locale[type.toUpperCase()] = args[0];
 	
-	workingDate = YAHOO.widget.DateMath.subtract(workingDate, YAHOO.widget.DateMath.DAY, this.preMonthDays);
-
-	var weekNum,weekClass;
-	var weekPrefix = "w";
-	var cellPrefix = "_cell";
-	var workingDayPrefix = "wd";
-	var dayPrefix = "d";
+		this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key);
+		this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key);
+	},
 	
-	var cellRenderers;
-	var renderer;
+	/**
+	* The default handler for all configuration locale field length properties
+	* @method configLocaleValues
+	*/
+	configLocaleValues : function(type, args, obj) {
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG; 
 	
-	var todayYear = this.today.getFullYear();
-	var todayMonth = this.today.getMonth();
-	var todayDate = this.today.getDate();
+		type = type.toLowerCase();
+		var val = args[0];
 	
-	var useDate = this.cfg.getProperty(defCfg.PAGEDATE.key);
-	var hideBlankWeeks = this.cfg.getProperty(defCfg.HIDE_BLANK_WEEKS.key);
-	var showWeekFooter = this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key);
-	var showWeekHeader = this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key);
-	var mindate = this.cfg.getProperty(defCfg.MINDATE.key);
-	var maxdate = this.cfg.getProperty(defCfg.MAXDATE.key);
-
-	if (mindate) {
-		mindate = YAHOO.widget.DateMath.clearTime(mindate);
-	}
-	if (maxdate) {
-		maxdate = YAHOO.widget.DateMath.clearTime(maxdate);
-	}
-	
-	html[html.length] = '<tbody class="m' + (useDate.getMonth()+1) + ' ' + this.Style.CSS_BODY + '">';
-	
-	var i = 0;
-
-	var tempDiv = document.createElement("div");
-	var cell = document.createElement("td");
-	tempDiv.appendChild(cell);
-
-	var jan1 = new Date(useDate.getFullYear(),0,1);
-
-	var cal = this.parent || this;
-
-	for (var r=0;r<6;r++) {
-
-		weekNum = YAHOO.widget.DateMath.getWeekNumber(workingDate, useDate.getFullYear(), startDay);
-		weekClass = weekPrefix + weekNum;
-
-		// Local OOM check for performance, since we already have pagedate
-		if (r !== 0 && hideBlankWeeks === true && workingDate.getMonth() != useDate.getMonth()) {
-			break;
-		} else {
-
-			html[html.length] = '<tr class="' + weekClass + '">';
-			
-			if (showWeekHeader) { html = this.renderRowHeader(weekNum, html); }
-			
-			for (var d=0;d<7;d++){ // Render actual days
-
-				cellRenderers = [];
-				renderer = null;
-
-				this.clearElement(cell);
-				cell.className = this.Style.CSS_CELL;
-				cell.id = this.id + cellPrefix + i;
-
-				if (workingDate.getDate()		== todayDate && 
-					workingDate.getMonth()		== todayMonth &&
-					workingDate.getFullYear()	== todayYear) {
-					cellRenderers[cellRenderers.length]=cal.renderCellStyleToday;
+		switch (type) {
+			case defCfg.LOCALE_MONTHS.key:
+				switch (val) {
+					case YAHOO.widget.Calendar.SHORT:
+						this.Locale.LOCALE_MONTHS = this.cfg.getProperty(defCfg.MONTHS_SHORT.key).concat();
+						break;
+					case YAHOO.widget.Calendar.LONG:
+						this.Locale.LOCALE_MONTHS = this.cfg.getProperty(defCfg.MONTHS_LONG.key).concat();
+						break;
 				}
-				
-				var workingArray = [workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()];
-				this.cellDates[this.cellDates.length] = workingArray; // Add this date to cellDates
-				
-				// Local OOM check for performance, since we already have pagedate
-				if (workingDate.getMonth() != useDate.getMonth()) {
-					cellRenderers[cellRenderers.length]=cal.renderCellNotThisMonth;
-				} else {
-					YAHOO.util.Dom.addClass(cell, workingDayPrefix + workingDate.getDay());
-					YAHOO.util.Dom.addClass(cell, dayPrefix + workingDate.getDate());
-				
-					for (var s=0;s<this.renderStack.length;++s) {
-
-						var rArray = this.renderStack[s];
-						var type = rArray[0];
-						
-						var month;
-						var day;
-						var year;
-						
-						switch (type) {
-							case YAHOO.widget.Calendar.DATE:
-								month = rArray[1][1];
-								day = rArray[1][2];
-								year = rArray[1][0];
-
-								if (workingDate.getMonth()+1 == month && workingDate.getDate() == day && workingDate.getFullYear() == year) {
-									renderer = rArray[2];
-									this.renderStack.splice(s,1);
-								}
-								break;
-							case YAHOO.widget.Calendar.MONTH_DAY:
-								month = rArray[1][0];
-								day = rArray[1][1];
-								
-								if (workingDate.getMonth()+1 == month && workingDate.getDate() == day) {
-									renderer = rArray[2];
-									this.renderStack.splice(s,1);
-								}
-								break;
-							case YAHOO.widget.Calendar.RANGE:
-								var date1 = rArray[1][0];
-								var date2 = rArray[1][1];
-
-								var d1month = date1[1];
-								var d1day = date1[2];
-								var d1year = date1[0];
-								
-								var d1 = new Date(d1year, d1month-1, d1day);
-
-								var d2month = date2[1];
-								var d2day = date2[2];
-								var d2year = date2[0];
-
-								var d2 = new Date(d2year, d2month-1, d2day);
-
-								if (workingDate.getTime() >= d1.getTime() && workingDate.getTime() <= d2.getTime()) {
-									renderer = rArray[2];
-
-									if (workingDate.getTime()==d2.getTime()) { 
-										this.renderStack.splice(s,1);
-									}
-								}
-								break;
-							case YAHOO.widget.Calendar.WEEKDAY:
-								
-								var weekday = rArray[1][0];
-								if (workingDate.getDay()+1 == weekday) {
-									renderer = rArray[2];
-								}
-								break;
-							case YAHOO.widget.Calendar.MONTH:
-								
-								month = rArray[1][0];
-								if (workingDate.getMonth()+1 == month) {
-									renderer = rArray[2];
-								}
-								break;
-						}
-						
-						if (renderer) {
-							cellRenderers[cellRenderers.length]=renderer;
-						}
-					}
-
+				break;
+			case defCfg.LOCALE_WEEKDAYS.key:
+				switch (val) {
+					case YAHOO.widget.Calendar.ONE_CHAR:
+						this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_1CHAR.key).concat();
+						break;
+					case YAHOO.widget.Calendar.SHORT:
+						this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_SHORT.key).concat();
+						break;
+					case YAHOO.widget.Calendar.MEDIUM:
+						this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_MEDIUM.key).concat();
+						break;
+					case YAHOO.widget.Calendar.LONG:
+						this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_LONG.key).concat();
+						break;
 				}
-
-				if (this._indexOfSelectedFieldArray(workingArray) > -1) {
-					cellRenderers[cellRenderers.length]=cal.renderCellStyleSelected; 
-				}
-
-				if ((mindate && (workingDate.getTime() < mindate.getTime())) ||
-					(maxdate && (workingDate.getTime() > maxdate.getTime()))
-				) {
-					cellRenderers[cellRenderers.length]=cal.renderOutOfBoundsDate;
-				} else {
-					cellRenderers[cellRenderers.length]=cal.styleCellDefault;
-					cellRenderers[cellRenderers.length]=cal.renderCellDefault;	
-				}
 				
-				for (var x=0; x < cellRenderers.length; ++x) {
-					if (cellRenderers[x].call(cal, workingDate, cell) == YAHOO.widget.Calendar.STOP_RENDER) {
-						break;
+				var START_WEEKDAY = this.cfg.getProperty(defCfg.START_WEEKDAY.key);
+	
+				if (START_WEEKDAY > 0) {
+					for (var w=0;w<START_WEEKDAY;++w) {
+						this.Locale.LOCALE_WEEKDAYS.push(this.Locale.LOCALE_WEEKDAYS.shift());
 					}
 				}
+				break;
+		}
+	},
 
-				workingDate.setTime(workingDate.getTime() + YAHOO.widget.DateMath.ONE_DAY_MS);
-
-				if (i >= 0 && i <= 6) {
-					YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_TOP);
-				}
-				if ((i % 7) === 0) {
-					YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_LEFT);
-				}
-				if (((i+1) % 7) === 0) {
-					YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_RIGHT);
-				}
-				
-				var postDays = this.postMonthDays; 
-				if (hideBlankWeeks && postDays >= 7) {
-					var blankWeeks = Math.floor(postDays/7);
-					for (var p=0;p<blankWeeks;++p) {
-						postDays -= 7;
+	/**
+	 * The default handler for the "navigator" property
+	 * @method configNavigator
+	 */
+	configNavigator : function(type, args, obj) {
+		var val = args[0];
+		if (YAHOO.widget.CalendarNavigator && (val === true || YAHOO.lang.isObject(val))) {
+			if (!this.oNavigator) {
+				this.oNavigator = new YAHOO.widget.CalendarNavigator(this);
+				// Cleanup DOM Refs/Events before innerHTML is removed.
+				function erase() {
+					if (!this.pages) {
+						this.oNavigator.erase();
 					}
 				}
-				
-				if (i >= ((this.preMonthDays+postDays+this.monthDays)-7)) {
-					YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_BOTTOM);
-				}
-
-				html[html.length] = tempDiv.innerHTML;
-				i++;
+				this.beforeRenderEvent.subscribe(erase, this, true);
 			}
-
-			if (showWeekFooter) { html = this.renderRowFooter(weekNum, html); }
-
-			html[html.length] = '</tr>';
+		} else {
+			if (this.oNavigator) {
+				this.oNavigator.destroy();
+				this.oNavigator = null;
+			}
 		}
-	}
+	},
 
-	html[html.length] = '</tbody>';
+	/**
+	* Defines the style constants for the Calendar
+	* @method initStyles
+	*/
+	initStyles : function() {
 
-	return html;
-};
+		var defStyle = YAHOO.widget.Calendar._STYLES;
 
-/**
-* Renders the calendar footer. In the default implementation, there is
-* no footer.
-* @method renderFooter
-* @param {Array}	html	The current working HTML array
-* @return {Array} The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.renderFooter = function(html) { return html; };
-
-/**
-* Renders the calendar after it has been configured. The render() method has a specific call chain that will execute
-* when the method is called: renderHeader, renderBody, renderFooter.
-* Refer to the documentation for those methods for information on 
-* individual render tasks.
-* @method render
-*/
-YAHOO.widget.Calendar.prototype.render = function() {
-	this.beforeRenderEvent.fire();
-
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-
-	// Find starting day of the current month
-	var workingDate = YAHOO.widget.DateMath.findMonthStart(this.cfg.getProperty(defCfg.PAGEDATE.key));
-
-	this.resetRenderers();
-	this.cellDates.length = 0;
-
-	YAHOO.util.Event.purgeElement(this.oDomContainer, true);
-
-	var html = [];
-
-	html[html.length] = '<table cellSpacing="0" class="' + this.Style.CSS_CALENDAR + ' y' + workingDate.getFullYear() + '" id="' + this.id + '">';
-	html = this.renderHeader(html);
-	html = this.renderBody(workingDate, html);
-	html = this.renderFooter(html);
-	html[html.length] = '</table>';
-
-	this.oDomContainer.innerHTML = html.join("\n");
-
-	this.applyListeners();
-	this.cells = this.oDomContainer.getElementsByTagName("td");
-
-	this.cfg.refireEvent(defCfg.TITLE.key);
-	this.cfg.refireEvent(defCfg.CLOSE.key);
-	this.cfg.refireEvent(defCfg.IFRAME.key);
-
-	this.renderEvent.fire();
-};
-
-/**
-* Applies the Calendar's DOM listeners to applicable elements.
-* @method applyListeners
-*/
-YAHOO.widget.Calendar.prototype.applyListeners = function() {
+		this.Style = {
+			/**
+			* @property Style.CSS_ROW_HEADER
+			*/
+			CSS_ROW_HEADER: defStyle.CSS_ROW_HEADER,
+			/**
+			* @property Style.CSS_ROW_FOOTER
+			*/
+			CSS_ROW_FOOTER: defStyle.CSS_ROW_FOOTER,
+			/**
+			* @property Style.CSS_CELL
+			*/
+			CSS_CELL : defStyle.CSS_CELL,
+			/**
+			* @property Style.CSS_CELL_SELECTOR
+			*/
+			CSS_CELL_SELECTOR : defStyle.CSS_CELL_SELECTOR,
+			/**
+			* @property Style.CSS_CELL_SELECTED
+			*/
+			CSS_CELL_SELECTED : defStyle.CSS_CELL_SELECTED,
+			/**
+			* @property Style.CSS_CELL_SELECTABLE
+			*/
+			CSS_CELL_SELECTABLE : defStyle.CSS_CELL_SELECTABLE,
+			/**
+			* @property Style.CSS_CELL_RESTRICTED
+			*/
+			CSS_CELL_RESTRICTED : defStyle.CSS_CELL_RESTRICTED,
+			/**
+			* @property Style.CSS_CELL_TODAY
+			*/
+			CSS_CELL_TODAY : defStyle.CSS_CELL_TODAY,
+			/**
+			* @property Style.CSS_CELL_OOM
+			*/
+			CSS_CELL_OOM : defStyle.CSS_CELL_OOM,
+			/**
+			* @property Style.CSS_CELL_OOB
+			*/
+			CSS_CELL_OOB : defStyle.CSS_CELL_OOB,
+			/**
+			* @property Style.CSS_HEADER
+			*/
+			CSS_HEADER : defStyle.CSS_HEADER,
+			/**
+			* @property Style.CSS_HEADER_TEXT
+			*/
+			CSS_HEADER_TEXT : defStyle.CSS_HEADER_TEXT,
+			/**
+			* @property Style.CSS_BODY
+			*/
+			CSS_BODY : defStyle.CSS_BODY,
+			/**
+			* @property Style.CSS_WEEKDAY_CELL
+			*/
+			CSS_WEEKDAY_CELL : defStyle.CSS_WEEKDAY_CELL,
+			/**
+			* @property Style.CSS_WEEKDAY_ROW
+			*/
+			CSS_WEEKDAY_ROW : defStyle.CSS_WEEKDAY_ROW,
+			/**
+			* @property Style.CSS_FOOTER
+			*/
+			CSS_FOOTER : defStyle.CSS_FOOTER,
+			/**
+			* @property Style.CSS_CALENDAR
+			*/
+			CSS_CALENDAR : defStyle.CSS_CALENDAR,
+			/**
+			* @property Style.CSS_SINGLE
+			*/
+			CSS_SINGLE : defStyle.CSS_SINGLE,
+			/**
+			* @property Style.CSS_CONTAINER
+			*/
+			CSS_CONTAINER : defStyle.CSS_CONTAINER,
+			/**
+			* @property Style.CSS_NAV_LEFT
+			*/
+			CSS_NAV_LEFT : defStyle.CSS_NAV_LEFT,
+			/**
+			* @property Style.CSS_NAV_RIGHT
+			*/
+			CSS_NAV_RIGHT : defStyle.CSS_NAV_RIGHT,
+			/**
+			* @property Style.CSS_NAV
+			*/
+			CSS_NAV : defStyle.CSS_NAV,
+			/**
+			* @property Style.CSS_CLOSE
+			*/
+			CSS_CLOSE : defStyle.CSS_CLOSE,
+			/**
+			* @property Style.CSS_CELL_TOP
+			*/
+			CSS_CELL_TOP : defStyle.CSS_CELL_TOP,
+			/**
+			* @property Style.CSS_CELL_LEFT
+			*/
+			CSS_CELL_LEFT : defStyle.CSS_CELL_LEFT,
+			/**
+			* @property Style.CSS_CELL_RIGHT
+			*/
+			CSS_CELL_RIGHT : defStyle.CSS_CELL_RIGHT,
+			/**
+			* @property Style.CSS_CELL_BOTTOM
+			*/
+			CSS_CELL_BOTTOM : defStyle.CSS_CELL_BOTTOM,
+			/**
+			* @property Style.CSS_CELL_HOVER
+			*/
+			CSS_CELL_HOVER : defStyle.CSS_CELL_HOVER,
+			/**
+			* @property Style.CSS_CELL_HIGHLIGHT1
+			*/
+			CSS_CELL_HIGHLIGHT1 : defStyle.CSS_CELL_HIGHLIGHT1,
+			/**
+			* @property Style.CSS_CELL_HIGHLIGHT2
+			*/
+			CSS_CELL_HIGHLIGHT2 : defStyle.CSS_CELL_HIGHLIGHT2,
+			/**
+			* @property Style.CSS_CELL_HIGHLIGHT3
+			*/
+			CSS_CELL_HIGHLIGHT3 : defStyle.CSS_CELL_HIGHLIGHT3,
+			/**
+			* @property Style.CSS_CELL_HIGHLIGHT4
+			*/
+			CSS_CELL_HIGHLIGHT4 : defStyle.CSS_CELL_HIGHLIGHT4
+		};
+	},
 	
-	var root = this.oDomContainer;
-	var cal = this.parent || this;
+	/**
+	* Builds the date label that will be displayed in the calendar header or
+	* footer, depending on configuration.
+	* @method buildMonthLabel
+	* @return	{String}	The formatted calendar month label
+	*/
+	buildMonthLabel : function() {
+		var pageDate = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key);
 	
-	var anchor = "a";
-	var mousedown = "mousedown";
+		var monthLabel  = this.Locale.LOCALE_MONTHS[pageDate.getMonth()] + this.Locale.MY_LABEL_MONTH_SUFFIX;
+		var yearLabel = pageDate.getFullYear() + this.Locale.MY_LABEL_YEAR_SUFFIX;
 
-	var linkLeft = YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT, anchor, root);
-	var linkRight = YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT, anchor, root);
-
-	if (linkLeft && linkLeft.length > 0) {
-		this.linkLeft = linkLeft[0];
-		YAHOO.util.Event.addListener(this.linkLeft, mousedown, cal.previousMonth, cal, true);
-	}
-
-	if (linkRight && linkRight.length > 0) {
-		this.linkRight = linkRight[0];
-		YAHOO.util.Event.addListener(this.linkRight, mousedown, cal.nextMonth, cal, true);
-	}
-
-	if (this.domEventMap) {
-		var el,elements;
-		for (var cls in this.domEventMap) {	
-			if (YAHOO.lang.hasOwnProperty(this.domEventMap, cls)) {
-				var items = this.domEventMap[cls];
-
-				if (! (items instanceof Array)) {
-					items = [items];
-				}
-
-				for (var i=0;i<items.length;i++)	{
-					var item = items[i];
-					elements = YAHOO.util.Dom.getElementsByClassName(cls, item.tag, this.oDomContainer);
-
-					for (var c=0;c<elements.length;c++) {
-						el = elements[c];
-						 YAHOO.util.Event.addListener(el, item.event, item.handler, item.scope, item.correct );
-					}
-				}
-			}
+		if (this.Locale.MY_LABEL_MONTH_POSITION == 2 || this.Locale.MY_LABEL_YEAR_POSITION == 1) {
+			return yearLabel + monthLabel;
+		} else {
+			return monthLabel + yearLabel;
 		}
-	}
-
-	YAHOO.util.Event.addListener(this.oDomContainer, "click", this.doSelectCell, this);
-	YAHOO.util.Event.addListener(this.oDomContainer, "mouseover", this.doCellMouseOver, this);
-	YAHOO.util.Event.addListener(this.oDomContainer, "mouseout", this.doCellMouseOut, this);
-};
-
-/**
-* Retrieves the Date object for the specified Calendar cell
-* @method getDateByCellId
-* @param {String}	id	The id of the cell
-* @return {Date} The Date object for the specified Calendar cell
-*/
-YAHOO.widget.Calendar.prototype.getDateByCellId = function(id) {
-	var date = this.getDateFieldsByCellId(id);
-	return new Date(date[0],date[1]-1,date[2]);
-};
-
-/**
-* Retrieves the Date object for the specified Calendar cell
-* @method getDateFieldsByCellId
-* @param {String}	id	The id of the cell
-* @return {Array}	The array of Date fields for the specified Calendar cell
-*/
-YAHOO.widget.Calendar.prototype.getDateFieldsByCellId = function(id) {
-	id = id.toLowerCase().split("_cell")[1];
-	id = parseInt(id, 10);
-	return this.cellDates[id];
-};
-
-// BEGIN BUILT-IN TABLE CELL RENDERERS
-
-/**
-* Renders a cell that falls before the minimum date or after the maximum date.
-* widget class.
-* @method renderOutOfBoundsDate
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
-*			should not be terminated
-*/
-YAHOO.widget.Calendar.prototype.renderOutOfBoundsDate = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_OOB);
-	cell.innerHTML = workingDate.getDate();
-	return YAHOO.widget.Calendar.STOP_RENDER;
-};
-
-/**
-* Renders the row header for a week.
-* @method renderRowHeader
-* @param {Number}	weekNum	The week number of the current row
-* @param {Array}	cell	The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.renderRowHeader = function(weekNum, html) {
-	html[html.length] = '<th class="calrowhead">' + weekNum + '</th>';
-	return html;
-};
-
-/**
-* Renders the row footer for a week.
-* @method renderRowFooter
-* @param {Number}	weekNum	The week number of the current row
-* @param {Array}	cell	The current working HTML array
-*/
-YAHOO.widget.Calendar.prototype.renderRowFooter = function(weekNum, html) {
-	html[html.length] = '<th class="calrowfoot">' + weekNum + '</th>';
-	return html;
-};
-
-/**
-* Renders a single standard calendar cell in the calendar widget table.
-* All logic for determining how a standard default cell will be rendered is 
-* encapsulated in this method, and must be accounted for when extending the
-* widget class.
-* @method renderCellDefault
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellDefault = function(workingDate, cell) {
-	cell.innerHTML = '<a href="#" class="' + this.Style.CSS_CELL_SELECTOR + '">' + this.buildDayLabel(workingDate) + "</a>";
-};
-
-/**
-* Styles a selectable cell.
-* @method styleCellDefault
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.styleCellDefault = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_SELECTABLE);
-};
-
-
-/**
-* Renders a single standard calendar cell using the CSS hightlight1 style
-* @method renderCellStyleHighlight1
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleHighlight1 = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT1);
-};
-
-/**
-* Renders a single standard calendar cell using the CSS hightlight2 style
-* @method renderCellStyleHighlight2
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleHighlight2 = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT2);
-};
-
-/**
-* Renders a single standard calendar cell using the CSS hightlight3 style
-* @method renderCellStyleHighlight3
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleHighlight3 = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT3);
-};
-
-/**
-* Renders a single standard calendar cell using the CSS hightlight4 style
-* @method renderCellStyleHighlight4
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleHighlight4 = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT4);
-};
-
-/**
-* Applies the default style used for rendering today's date to the current calendar cell
-* @method renderCellStyleToday
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleToday = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_TODAY);
-};
-
-/**
-* Applies the default style used for rendering selected dates to the current calendar cell
-* @method renderCellStyleSelected
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
-*			should not be terminated
-*/
-YAHOO.widget.Calendar.prototype.renderCellStyleSelected = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_SELECTED);
-};
-
-/**
-* Applies the default style used for rendering dates that are not a part of the current
-* month (preceding or trailing the cells for the current month)
-* @method renderCellNotThisMonth
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
-*			should not be terminated
-*/
-YAHOO.widget.Calendar.prototype.renderCellNotThisMonth = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_OOM);
-	cell.innerHTML=workingDate.getDate();
-	return YAHOO.widget.Calendar.STOP_RENDER;
-};
-
-/**
-* Renders the current calendar cell as a non-selectable "black-out" date using the default
-* restricted style.
-* @method renderBodyCellRestricted
-* @param {Date}					workingDate		The current working Date object being used to generate the calendar
-* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
-* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
-*			should not be terminated
-*/
-YAHOO.widget.Calendar.prototype.renderBodyCellRestricted = function(workingDate, cell) {
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL);
-	YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_RESTRICTED);
-	cell.innerHTML=workingDate.getDate();
-	return YAHOO.widget.Calendar.STOP_RENDER;
-};
-
-// END BUILT-IN TABLE CELL RENDERERS
-
-// BEGIN MONTH NAVIGATION METHODS
-
-/**
-* Adds the designated number of months to the current calendar month, and sets the current
-* calendar page date to the new month.
-* @method addMonths
-* @param {Number}	count	The number of months to add to the current calendar
-*/
-YAHOO.widget.Calendar.prototype.addMonths = function(count) {
-	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
-	this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.add(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.MONTH, count));
-	this.resetRenderers();
-	this.changePageEvent.fire();
-};
-
-/**
-* Subtracts the designated number of months from the current calendar month, and sets the current
-* calendar page date to the new month.
-* @method subtractMonths
-* @param {Number}	count	The number of months to subtract from the current calendar
-*/
-YAHOO.widget.Calendar.prototype.subtractMonths = function(count) {
-	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
-	this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.subtract(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.MONTH, count));
-	this.resetRenderers();
-	this.changePageEvent.fire();
-};
-
-/**
-* Adds the designated number of years to the current calendar, and sets the current
-* calendar page date to the new month.
-* @method addYears
-* @param {Number}	count	The number of years to add to the current calendar
-*/
-YAHOO.widget.Calendar.prototype.addYears = function(count) {
-	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
-	this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.add(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.YEAR, count));
-	this.resetRenderers();
-	this.changePageEvent.fire();
-};
-
-/**
-* Subtcats the designated number of years from the current calendar, and sets the current
-* calendar page date to the new month.
-* @method subtractYears
-* @param {Number}	count	The number of years to subtract from the current calendar
-*/
-YAHOO.widget.Calendar.prototype.subtractYears = function(count) {
-	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
-	this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.subtract(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.YEAR, count));
-	this.resetRenderers();
-	this.changePageEvent.fire();
-};
-
-/**
-* Navigates to the next month page in the calendar widget.
-* @method nextMonth
-*/
-YAHOO.widget.Calendar.prototype.nextMonth = function() {
-	this.addMonths(1);
-};
-
-/**
-* Navigates to the previous month page in the calendar widget.
-* @method previousMonth
-*/
-YAHOO.widget.Calendar.prototype.previousMonth = function() {
-	this.subtractMonths(1);
-};
-
-/**
-* Navigates to the next year in the currently selected month in the calendar widget.
-* @method nextYear
-*/
-YAHOO.widget.Calendar.prototype.nextYear = function() {
-	this.addYears(1);
-};
-
-/**
-* Navigates to the previous year in the currently selected month in the calendar widget.
-* @method previousYear
-*/
-YAHOO.widget.Calendar.prototype.previousYear = function() {
-	this.subtractYears(1);
-};
-
-// END MONTH NAVIGATION METHODS
-
-// BEGIN SELECTION METHODS
-
-/**
-* Resets the calendar widget to the originally selected month and year, and 
-* sets the calendar to the initial selection(s).
-* @method reset
-*/
-YAHOO.widget.Calendar.prototype.reset = function() {
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-	this.cfg.resetProperty(defCfg.SELECTED.key);
-	this.cfg.resetProperty(defCfg.PAGEDATE.key);
-	this.resetEvent.fire();
-};
-
-/**
-* Clears the selected dates in the current calendar widget and sets the calendar
-* to the current month and year.
-* @method clear
-*/
-YAHOO.widget.Calendar.prototype.clear = function() {
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-	this.cfg.setProperty(defCfg.SELECTED.key, []);
-	this.cfg.setProperty(defCfg.PAGEDATE.key, new Date(this.today.getTime()));
-	this.clearEvent.fire();
-};
-
-/**
-* Selects a date or a collection of dates on the current calendar. This method, by default,
-* does not call the render method explicitly. Once selection has completed, render must be 
-* called for the changes to be reflected visually.
-*
-* Any dates which are OOB (out of bounds, not selectable) will not be selected and the array of 
-* selected dates passed to the selectEvent will not contain OOB dates.
-* 
-* If all dates are OOB, the no state change will occur; beforeSelect and select events will not be fired.
-*
-* @method select
-* @param	{String/Date/Date[]}	date	The date string of dates to select in the current calendar. Valid formats are
-*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
-*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
-*								This method can also take a JavaScript Date object or an array of Date objects.
-* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.Calendar.prototype.select = function(date) {
-
-	var aToBeSelected = this._toFieldArray(date);
-
-	// Filtered array of valid dates
-	var validDates = [];
-	var selected = [];
-	var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+	},
 	
-	for (var a=0; a < aToBeSelected.length; ++a) {
-		var toSelect = aToBeSelected[a];
-
-		if (!this.isDateOOB(this._toDate(toSelect))) {
-			
-			if (validDates.length === 0) {
-				this.beforeSelectEvent.fire();
-				selected = this.cfg.getProperty(cfgSelected);
-			}
-
-			validDates.push(toSelect);
-			
-			if (this._indexOfSelectedFieldArray(toSelect) == -1) { 
-				selected[selected.length] = toSelect;
-			}
+	/**
+	* Builds the date digit that will be displayed in calendar cells
+	* @method buildDayLabel
+	* @param {Date}	workingDate	The current working date
+	* @return	{String}	The formatted day label
+	*/
+	buildDayLabel : function(workingDate) {
+		return workingDate.getDate();
+	},
+	
+	/**
+	 * Creates the title bar element and adds it to Calendar container DIV
+	 * 
+	 * @method createTitleBar
+	 * @param {String} strTitle The title to display in the title bar
+	 * @return The title bar element
+	 */
+	createTitleBar : function(strTitle) {
+		var tDiv = YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || document.createElement("div");
+		tDiv.className = YAHOO.widget.CalendarGroup.CSS_2UPTITLE;
+		tDiv.innerHTML = strTitle;
+		this.oDomContainer.insertBefore(tDiv, this.oDomContainer.firstChild);
+	
+		YAHOO.util.Dom.addClass(this.oDomContainer, "withtitle");
+	
+		return tDiv;
+	},
+	
+	/**
+	 * Removes the title bar element from the DOM
+	 * 
+	 * @method removeTitleBar
+	 */
+	removeTitleBar : function() {
+		var tDiv = YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || null;
+		if (tDiv) {
+			YAHOO.util.Event.purgeElement(tDiv);
+			this.oDomContainer.removeChild(tDiv);
 		}
-	}
+		YAHOO.util.Dom.removeClass(this.oDomContainer, "withtitle");
+	},
 	
-
-	if (validDates.length > 0) {
-		if (this.parent) {
-			this.parent.cfg.setProperty(cfgSelected, selected);
+	/**
+	 * Creates the close button HTML element and adds it to Calendar container DIV
+	 * 
+	 * @method createCloseButton
+	 * @return The close HTML element created
+	 */
+	createCloseButton : function() {
+		var Dom = YAHOO.util.Dom,
+			Event = YAHOO.util.Event,
+			cssClose = YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,
+			DEPR_CLOSE_PATH = "us/my/bn/x_d.gif";
+	
+		var lnk = Dom.getElementsByClassName("link-close", "a", this.oDomContainer)[0];
+	
+		if (!lnk) {
+			lnk = document.createElement("a");  
+			Event.addListener(lnk, "click", function(e, cal) {
+				cal.hide(); 
+				Event.preventDefault(e);
+			}, this);        
+		}
+	
+		lnk.href = "#";
+		lnk.className = "link-close";
+	
+		if (YAHOO.widget.Calendar.IMG_ROOT !== null) {
+			var img = Dom.getElementsByClassName(cssClose, "img", lnk)[0] || document.createElement("img");
+			img.src = YAHOO.widget.Calendar.IMG_ROOT + DEPR_CLOSE_PATH;
+			img.className = cssClose;
+			lnk.appendChild(img);
 		} else {
-			this.cfg.setProperty(cfgSelected, selected);
+			lnk.innerHTML = '<span class="' + cssClose + ' ' + this.Style.CSS_CLOSE + '"></span>';
 		}
-		this.selectEvent.fire(validDates);
-	}
-
-	return this.getSelectedDates();
-};
-
-/**
-* Selects a date on the current calendar by referencing the index of the cell that should be selected.
-* This method is used to easily select a single cell (usually with a mouse click) without having to do
-* a full render. The selected style is applied to the cell directly.
-*
-* If the cell is not marked with the CSS_CELL_SELECTABLE class (as is the case by default for out of month 
-* or out of bounds cells), it will not be selected and in such a case beforeSelect and select events will not be fired.
-* 
-* @method selectCell
-* @param	{Number}	cellIndex	The index of the cell to select in the current calendar. 
-* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.Calendar.prototype.selectCell = function(cellIndex) {
-
-	var cell = this.cells[cellIndex];
-	var cellDate = this.cellDates[cellIndex];
-	var dCellDate = this._toDate(cellDate);
+		this.oDomContainer.appendChild(lnk);
 	
-	var selectable = YAHOO.util.Dom.hasClass(cell, this.Style.CSS_CELL_SELECTABLE);
+		return lnk;
+	},
+	
+	/**
+	 * Removes the close button HTML element from the DOM
+	 * 
+	 * @method removeCloseButton
+	 */
+	removeCloseButton : function() {
+		var btn = YAHOO.util.Dom.getElementsByClassName("link-close", "a", this.oDomContainer)[0] || null;
+		if (btn) {
+			YAHOO.util.Event.purgeElement(btn);
+			this.oDomContainer.removeChild(btn);
+		}
+	},
 
-	if (selectable) {
-
-		this.beforeSelectEvent.fire();
-
-		var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
-		var selected = this.cfg.getProperty(cfgSelected);
-
-		var selectDate = cellDate.concat();
-
-		if (this._indexOfSelectedFieldArray(selectDate) == -1) {
-			selected[selected.length] = selectDate;
+	/**
+	* Renders the calendar header.
+	* @method renderHeader
+	* @param {Array}	html	The current working HTML array
+	* @return {Array} The current working HTML array
+	*/
+	renderHeader : function(html) {
+		var colSpan = 7;
+		
+		var DEPR_NAV_LEFT = "us/tr/callt.gif";
+		var DEPR_NAV_RIGHT = "us/tr/calrt.gif";	
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+		
+		if (this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key)) {
+			colSpan += 1;
 		}
+	
+		if (this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key)) {
+			colSpan += 1;
+		}
+	
+		html[html.length] = "<thead>";
+		html[html.length] =		"<tr>";
+		html[html.length] =			'<th colspan="' + colSpan + '" class="' + this.Style.CSS_HEADER_TEXT + '">';
+		html[html.length] =				'<div class="' + this.Style.CSS_HEADER + '">';
+	
+		var renderLeft, renderRight = false;
+	
 		if (this.parent) {
-			this.parent.cfg.setProperty(cfgSelected, selected);
+			if (this.index === 0) {
+				renderLeft = true;
+			}
+			if (this.index == (this.parent.cfg.getProperty("pages") -1)) {
+				renderRight = true;
+			}
 		} else {
-			this.cfg.setProperty(cfgSelected, selected);
+			renderLeft = true;
+			renderRight = true;
 		}
-		this.renderCellStyleSelected(dCellDate,cell);
-		this.selectEvent.fire([selectDate]);
-
-		this.doCellMouseOut.call(cell, null, this);		
-	}
-
-	return this.getSelectedDates();
-};
-
-/**
-* Deselects a date or a collection of dates on the current calendar. This method, by default,
-* does not call the render method explicitly. Once deselection has completed, render must be 
-* called for the changes to be reflected visually.
-* 
-* The method will not attempt to deselect any dates which are OOB (out of bounds, and hence not selectable) 
-* and the array of deselected dates passed to the deselectEvent will not contain any OOB dates.
-* 
-* If all dates are OOB, beforeDeselect and deselect events will not be fired.
-* 
-* @method deselect
-* @param	{String/Date/Date[]}	date	The date string of dates to deselect in the current calendar. Valid formats are
-*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
-*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
-*								This method can also take a JavaScript Date object or an array of Date objects.	
-* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.Calendar.prototype.deselect = function(date) {
-
-	var aToBeDeselected = this._toFieldArray(date);
-
-	var validDates = [];
-	var selected = [];
-	var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
-
-	for (var a=0; a < aToBeDeselected.length; ++a) {
-		var toDeselect = aToBeDeselected[a];
-
-		if (!this.isDateOOB(this._toDate(toDeselect))) {
-
-			if (validDates.length === 0) {
-				this.beforeDeselectEvent.fire();
-				selected = this.cfg.getProperty(cfgSelected);
+	
+		if (renderLeft) {
+			var leftArrow = this.cfg.getProperty(defCfg.NAV_ARROW_LEFT.key);
+			// Check for deprecated customization - If someone set IMG_ROOT, but didn't set NAV_ARROW_LEFT, then set NAV_ARROW_LEFT to the old deprecated value
+			if (leftArrow === null && YAHOO.widget.Calendar.IMG_ROOT !== null) {
+				leftArrow = YAHOO.widget.Calendar.IMG_ROOT + DEPR_NAV_LEFT;
 			}
+			var leftStyle = (leftArrow === null) ? "" : ' style="background-image:url(' + leftArrow + ')"';
+			html[html.length] = '<a class="' + this.Style.CSS_NAV_LEFT + '"' + leftStyle + ' > </a>';
+		}
 
-			validDates.push(toDeselect);
+		var lbl = this.buildMonthLabel();
+		var cal = this.parent || this;
+		if (cal.cfg.getProperty("navigator")) {
+			lbl = "<a class=\"" + this.Style.CSS_NAV + "\" href=\"#\">" + lbl + "</a>";
+		}
+		html[html.length] = lbl;
 
-			var index = this._indexOfSelectedFieldArray(toDeselect);
-			if (index != -1) {	
-				selected.splice(index,1);
+		if (renderRight) {
+			var rightArrow = this.cfg.getProperty(defCfg.NAV_ARROW_RIGHT.key);
+			if (rightArrow === null && YAHOO.widget.Calendar.IMG_ROOT !== null) {
+				rightArrow = YAHOO.widget.Calendar.IMG_ROOT + DEPR_NAV_RIGHT;
 			}
+			var rightStyle = (rightArrow === null) ? "" : ' style="background-image:url(' + rightArrow + ')"';
+			html[html.length] = '<a class="' + this.Style.CSS_NAV_RIGHT + '"' + rightStyle + ' > </a>';
 		}
-	}
 
+		html[html.length] =	'</div>\n</th>\n</tr>';
 
-	if (validDates.length > 0) {
-		if (this.parent) {
-			this.parent.cfg.setProperty(cfgSelected, selected);
-		} else {
-			this.cfg.setProperty(cfgSelected, selected);
+		if (this.cfg.getProperty(defCfg.SHOW_WEEKDAYS.key)) {
+			html = this.buildWeekdays(html);
 		}
-		this.deselectEvent.fire(validDates);
-	}
-
-	return this.getSelectedDates();
-};
-
-/**
-* Deselects a date on the current calendar by referencing the index of the cell that should be deselected.
-* This method is used to easily deselect a single cell (usually with a mouse click) without having to do
-* a full render. The selected style is removed from the cell directly.
-* 
-* If the cell is not marked with the CSS_CELL_SELECTABLE class (as is the case by default for out of month 
-* or out of bounds cells), the method will not attempt to deselect it and in such a case, beforeDeselect and 
-* deselect events will not be fired.
-* 
-* @method deselectCell
-* @param	{Number}	cellIndex	The index of the cell to deselect in the current calendar. 
-* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.Calendar.prototype.deselectCell = function(cellIndex) {
-	var cell = this.cells[cellIndex];
-	var cellDate = this.cellDates[cellIndex];
-	var cellDateIndex = this._indexOfSelectedFieldArray(cellDate);
+		
+		html[html.length] = '</thead>';
 	
-	var selectable = YAHOO.util.Dom.hasClass(cell, this.Style.CSS_CELL_SELECTABLE);
-
-	if (selectable) {
-
-		this.beforeDeselectEvent.fire();
-
+		return html;
+	},
+	
+	/**
+	* Renders the Calendar's weekday headers.
+	* @method buildWeekdays
+	* @param {Array}	html	The current working HTML array
+	* @return {Array} The current working HTML array
+	*/
+	buildWeekdays : function(html) {
+	
 		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-		var selected = this.cfg.getProperty(defCfg.SELECTED.key);
-
-		var dCellDate = this._toDate(cellDate);
-		var selectDate = cellDate.concat();
-
-		if (cellDateIndex > -1) {
-			if (this.cfg.getProperty(defCfg.PAGEDATE.key).getMonth() == dCellDate.getMonth() &&
-				this.cfg.getProperty(defCfg.PAGEDATE.key).getFullYear() == dCellDate.getFullYear()) {
-				YAHOO.util.Dom.removeClass(cell, this.Style.CSS_CELL_SELECTED);
-			}
-			selected.splice(cellDateIndex, 1);
+	
+		html[html.length] = '<tr class="' + this.Style.CSS_WEEKDAY_ROW + '">';
+	
+		if (this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key)) {
+			html[html.length] = '<th> </th>';
 		}
-
-		if (this.parent) {
-			this.parent.cfg.setProperty(defCfg.SELECTED.key, selected);
-		} else {
-			this.cfg.setProperty(defCfg.SELECTED.key, selected);
+	
+		for(var i=0;i<this.Locale.LOCALE_WEEKDAYS.length;++i) {
+			html[html.length] = '<th class="calweekdaycell">' + this.Locale.LOCALE_WEEKDAYS[i] + '</th>';
 		}
-
-		this.deselectEvent.fire(selectDate);
-	}
-
-	return this.getSelectedDates();
-};
-
-/**
-* Deselects all dates on the current calendar.
-* @method deselectAll
-* @return {Date[]}		Array of JavaScript Date objects representing all individual dates that are currently selected.
-*						Assuming that this function executes properly, the return value should be an empty array.
-*						However, the empty array is returned for the sake of being able to check the selection status
-*						of the calendar.
-*/
-YAHOO.widget.Calendar.prototype.deselectAll = function() {
-	this.beforeDeselectEvent.fire();
 	
-	var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
-
-	var selected = this.cfg.getProperty(cfgSelected);
-	var count = selected.length;
-	var sel = selected.concat();
-
-	if (this.parent) {
-		this.parent.cfg.setProperty(cfgSelected, []);
-	} else {
-		this.cfg.setProperty(cfgSelected, []);
-	}
+		if (this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key)) {
+			html[html.length] = '<th> </th>';
+		}
 	
-	if (count > 0) {
-		this.deselectEvent.fire(sel);
-	}
-
-	return this.getSelectedDates();
-};
-
-// END SELECTION METHODS
-
-// BEGIN TYPE CONVERSION METHODS
-
-/**
-* Converts a date (either a JavaScript Date object, or a date string) to the internal data structure
-* used to represent dates: [[yyyy,mm,dd],[yyyy,mm,dd]].
-* @method _toFieldArray
-* @private
-* @param	{String/Date/Date[]}	date	The date string of dates to deselect in the current calendar. Valid formats are
-*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
-*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
-*								This method can also take a JavaScript Date object or an array of Date objects.	
-* @return {Array[](Number[])}	Array of date field arrays
-*/
-YAHOO.widget.Calendar.prototype._toFieldArray = function(date) {
-	var returnDate = [];
-
-	if (date instanceof Date) {
-		returnDate = [[date.getFullYear(), date.getMonth()+1, date.getDate()]];
-	} else if (YAHOO.lang.isString(date)) {
-		returnDate = this._parseDates(date);
-	} else if (YAHOO.lang.isArray(date)) {
-		for (var i=0;i<date.length;++i) {
-			var d = date[i];
-			returnDate[returnDate.length] = [d.getFullYear(),d.getMonth()+1,d.getDate()];
+		html[html.length] = '</tr>';
+	
+		return html;
+	},
+	
+	/**
+	* Renders the calendar body.
+	* @method renderBody
+	* @param {Date}	workingDate	The current working Date being used for the render process
+	* @param {Array}	html	The current working HTML array
+	* @return {Array} The current working HTML array
+	*/
+	renderBody : function(workingDate, html) {
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+	
+		var startDay = this.cfg.getProperty(defCfg.START_WEEKDAY.key);
+	
+		this.preMonthDays = workingDate.getDay();
+		if (startDay > 0) {
+			this.preMonthDays -= startDay;
 		}
-	}
+		if (this.preMonthDays < 0) {
+			this.preMonthDays += 7;
+		}
+		
+		this.monthDays = YAHOO.widget.DateMath.findMonthEnd(workingDate).getDate();
+		this.postMonthDays = YAHOO.widget.Calendar.DISPLAY_DAYS-this.preMonthDays-this.monthDays;
+		
+		workingDate = YAHOO.widget.DateMath.subtract(workingDate, YAHOO.widget.DateMath.DAY, this.preMonthDays);
 	
-	return returnDate;
-};
-
-/**
-* Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
-* @method _toDate
-* @private
-* @param	{Number[]}		dateFieldArray	The date field array to convert to a JavaScript Date.
-* @return	{Date}	JavaScript Date object representing the date field array
-*/
-YAHOO.widget.Calendar.prototype._toDate = function(dateFieldArray) {
-	if (dateFieldArray instanceof Date) {
-		return dateFieldArray;
-	} else {
-		return new Date(dateFieldArray[0],dateFieldArray[1]-1,dateFieldArray[2]);
-	}
-};
-
-// END TYPE CONVERSION METHODS 
-
-// BEGIN UTILITY METHODS
-
-/**
-* Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
-* @method _fieldArraysAreEqual
-* @private
-* @param	{Number[]}	array1	The first date field array to compare
-* @param	{Number[]}	array2	The first date field array to compare
-* @return	{Boolean}	The boolean that represents the equality of the two arrays
-*/
-YAHOO.widget.Calendar.prototype._fieldArraysAreEqual = function(array1, array2) {
-	var match = false;
-
-	if (array1[0]==array2[0]&&array1[1]==array2[1]&&array1[2]==array2[2]) {
-		match=true;	
-	}
-
-	return match;
-};
-
-/**
-* Gets the index of a date field array [yyyy,mm,dd] in the current list of selected dates.
-* @method	_indexOfSelectedFieldArray
-* @private
-* @param	{Number[]}		find	The date field array to search for
-* @return	{Number}			The index of the date field array within the collection of selected dates.
-*								-1 will be returned if the date is not found.
-*/
-YAHOO.widget.Calendar.prototype._indexOfSelectedFieldArray = function(find) {
-	var selected = -1;
-	var seldates = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);
-
-	for (var s=0;s<seldates.length;++s) {
-		var sArray = seldates[s];
-		if (find[0]==sArray[0]&&find[1]==sArray[1]&&find[2]==sArray[2]) {
-			selected = s;
-			break;
+		var weekNum,weekClass;
+		var weekPrefix = "w";
+		var cellPrefix = "_cell";
+		var workingDayPrefix = "wd";
+		var dayPrefix = "d";
+		
+		var cellRenderers;
+		var renderer;
+		
+		var todayYear = this.today.getFullYear();
+		var todayMonth = this.today.getMonth();
+		var todayDate = this.today.getDate();
+		
+		var useDate = this.cfg.getProperty(defCfg.PAGEDATE.key);
+		var hideBlankWeeks = this.cfg.getProperty(defCfg.HIDE_BLANK_WEEKS.key);
+		var showWeekFooter = this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key);
+		var showWeekHeader = this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key);
+		var mindate = this.cfg.getProperty(defCfg.MINDATE.key);
+		var maxdate = this.cfg.getProperty(defCfg.MAXDATE.key);
+	
+		if (mindate) {
+			mindate = YAHOO.widget.DateMath.clearTime(mindate);
 		}
-	}
-
-	return selected;
-};
-
-/**
-* Determines whether a given date is OOM (out of month).
-* @method	isDateOOM
-* @param	{Date}	date	The JavaScript Date object for which to check the OOM status
-* @return	{Boolean}	true if the date is OOM
-*/
-YAHOO.widget.Calendar.prototype.isDateOOM = function(date) {
-	return (date.getMonth() != this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key).getMonth());
-};
-
-/**
-* Determines whether a given date is OOB (out of bounds - less than the mindate or more than the maxdate).
-*
-* @method	isDateOOB
-* @param	{Date}	date	The JavaScript Date object for which to check the OOB status
-* @return	{Boolean}	true if the date is OOB
-*/
-YAHOO.widget.Calendar.prototype.isDateOOB = function(date) {
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+		if (maxdate) {
+			maxdate = YAHOO.widget.DateMath.clearTime(maxdate);
+		}
+		
+		html[html.length] = '<tbody class="m' + (useDate.getMonth()+1) + ' ' + this.Style.CSS_BODY + '">';
+		
+		var i = 0;
 	
-	var minDate = this.cfg.getProperty(defCfg.MINDATE.key);
-	var maxDate = this.cfg.getProperty(defCfg.MAXDATE.key);
-	var dm = YAHOO.widget.DateMath;
+		var tempDiv = document.createElement("div");
+		var cell = document.createElement("td");
+		tempDiv.appendChild(cell);
 	
-	if (minDate) {
-		minDate = dm.clearTime(minDate);
-	} 
-	if (maxDate) {
-		maxDate = dm.clearTime(maxDate);
-	}
+		var cal = this.parent || this;
+	
+		for (var r=0;r<6;r++) {
+	
+			weekNum = YAHOO.widget.DateMath.getWeekNumber(workingDate, useDate.getFullYear(), startDay);
+			weekClass = weekPrefix + weekNum;
+	
+			// Local OOM check for performance, since we already have pagedate
+			if (r !== 0 && hideBlankWeeks === true && workingDate.getMonth() != useDate.getMonth()) {
+				break;
+			} else {
+	
+				html[html.length] = '<tr class="' + weekClass + '">';
+				
+				if (showWeekHeader) { html = this.renderRowHeader(weekNum, html); }
+				
+				for (var d=0;d<7;d++){ // Render actual days
+	
+					cellRenderers = [];
+	
+					this.clearElement(cell);
+					cell.className = this.Style.CSS_CELL;
+					cell.id = this.id + cellPrefix + i;
 
-	var clearedDate = new Date(date.getTime());
-	clearedDate = dm.clearTime(clearedDate);
-
-	return ((minDate && clearedDate.getTime() < minDate.getTime()) || (maxDate && clearedDate.getTime() > maxDate.getTime()));
-};
-
-/**
- * Parses a pagedate configuration property value. The value can either be specified as a string of form "mm/yyyy" or a Date object 
- * and is parsed into a Date object normalized to the first day of the month. If no value is passed in, the month and year from today's date are used to create the Date object 
- * @method	_parsePageDate
- * @private
- * @param {Date|String}	date	Pagedate value which needs to be parsed
- * @return {Date}	The Date object representing the pagedate
- */
-YAHOO.widget.Calendar.prototype._parsePageDate = function(date) {
-	var parsedDate;
+					if (workingDate.getDate()		== todayDate && 
+						workingDate.getMonth()		== todayMonth &&
+						workingDate.getFullYear()	== todayYear) {
+						cellRenderers[cellRenderers.length]=cal.renderCellStyleToday;
+					}
+					
+					var workingArray = [workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()];
+					this.cellDates[this.cellDates.length] = workingArray; // Add this date to cellDates
+					
+					// Local OOM check for performance, since we already have pagedate
+					if (workingDate.getMonth() != useDate.getMonth()) {
+						cellRenderers[cellRenderers.length]=cal.renderCellNotThisMonth;
+					} else {
+						YAHOO.util.Dom.addClass(cell, workingDayPrefix + workingDate.getDay());
+						YAHOO.util.Dom.addClass(cell, dayPrefix + workingDate.getDate());
+					
+						for (var s=0;s<this.renderStack.length;++s) {
 	
-	var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
-
-	if (date) {
-		if (date instanceof Date) {
-			parsedDate = YAHOO.widget.DateMath.findMonthStart(date);
-		} else {
-			var month, year, aMonthYear;
-			aMonthYear = date.split(this.cfg.getProperty(defCfg.DATE_FIELD_DELIMITER.key));
-			month = parseInt(aMonthYear[this.cfg.getProperty(defCfg.MY_MONTH_POSITION.key)-1], 10)-1;
-			year = parseInt(aMonthYear[this.cfg.getProperty(defCfg.MY_YEAR_POSITION.key)-1], 10);
-			
-			parsedDate = new Date(year, month, 1);
+							renderer = null;
+	
+							var rArray = this.renderStack[s];
+							var type = rArray[0];
+							
+							var month;
+							var day;
+							var year;
+							
+							switch (type) {
+								case YAHOO.widget.Calendar.DATE:
+									month = rArray[1][1];
+									day = rArray[1][2];
+									year = rArray[1][0];
+	
+									if (workingDate.getMonth()+1 == month && workingDate.getDate() == day && workingDate.getFullYear() == year) {
+										renderer = rArray[2];
+										this.renderStack.splice(s,1);
+									}
+									break;
+								case YAHOO.widget.Calendar.MONTH_DAY:
+									month = rArray[1][0];
+									day = rArray[1][1];
+									
+									if (workingDate.getMonth()+1 == month && workingDate.getDate() == day) {
+										renderer = rArray[2];
+										this.renderStack.splice(s,1);
+									}
+									break;
+								case YAHOO.widget.Calendar.RANGE:
+									var date1 = rArray[1][0];
+									var date2 = rArray[1][1];
+	
+									var d1month = date1[1];
+									var d1day = date1[2];
+									var d1year = date1[0];
+									
+									var d1 = YAHOO.widget.DateMath.getDate(d1year, d1month-1, d1day);
+	
+									var d2month = date2[1];
+									var d2day = date2[2];
+									var d2year = date2[0];
+	
+									var d2 = YAHOO.widget.DateMath.getDate(d2year, d2month-1, d2day);
+	
+									if (workingDate.getTime() >= d1.getTime() && workingDate.getTime() <= d2.getTime()) {
+										renderer = rArray[2];
+	
+										if (workingDate.getTime()==d2.getTime()) { 
+											this.renderStack.splice(s,1);
+										}
+									}
+									break;
+								case YAHOO.widget.Calendar.WEEKDAY:
+									
+									var weekday = rArray[1][0];
+									if (workingDate.getDay()+1 == weekday) {
+										renderer = rArray[2];
+									}
+									break;
+								case YAHOO.widget.Calendar.MONTH:
+									
+									month = rArray[1][0];
+									if (workingDate.getMonth()+1 == month) {
+										renderer = rArray[2];
+									}
+									break;
+							}
+							
+							if (renderer) {
+								cellRenderers[cellRenderers.length]=renderer;
+							}
+						}
+	
+					}
+	
+					if (this._indexOfSelectedFieldArray(workingArray) > -1) {
+						cellRenderers[cellRenderers.length]=cal.renderCellStyleSelected; 
+					}
+	
+					if ((mindate && (workingDate.getTime() < mindate.getTime())) ||
+						(maxdate && (workingDate.getTime() > maxdate.getTime()))
+					) {
+						cellRenderers[cellRenderers.length]=cal.renderOutOfBoundsDate;
+					} else {
+						cellRenderers[cellRenderers.length]=cal.styleCellDefault;
+						cellRenderers[cellRenderers.length]=cal.renderCellDefault;	
+					}
+					
+					for (var x=0; x < cellRenderers.length; ++x) {
+						if (cellRenderers[x].call(cal, workingDate, cell) == YAHOO.widget.Calendar.STOP_RENDER) {
+							break;
+						}
+					}
+	
+					workingDate.setTime(workingDate.getTime() + YAHOO.widget.DateMath.ONE_DAY_MS);
+	
+					if (i >= 0 && i <= 6) {
+						YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_TOP);
+					}
+					if ((i % 7) === 0) {
+						YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_LEFT);
+					}
+					if (((i+1) % 7) === 0) {
+						YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_RIGHT);
+					}
+					
+					var postDays = this.postMonthDays; 
+					if (hideBlankWeeks && postDays >= 7) {
+						var blankWeeks = Math.floor(postDays/7);
+						for (var p=0;p<blankWeeks;++p) {
+							postDays -= 7;
+						}
+					}
+					
+					if (i >= ((this.preMonthDays+postDays+this.monthDays)-7)) {
+						YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_BOTTOM);
+					}
+	
+					html[html.length] = tempDiv.innerHTML;
+					i++;
+				}
+	
+				if (showWeekFooter) { html = this.renderRowFooter(weekNum, html); }
+	
+				html[html.length] = '</tr>';
+			}
 		}
-	} else {
-		parsedDate = new Date(this.today.getFullYear(), this.today.getMonth(), 1);
-	}
-	return parsedDate;
-};
+	
+		html[html.length] = '</tbody>';
+	
+		return html;
+	},
+	
+	/**
+	* Renders the calendar footer. In the default implementation, there is
+	* no footer.
+	* @method renderFooter
+	* @param {Array}	html	The current working HTML array
+	* @return {Array} The current working HTML array
+	*/
+	renderFooter : function(html) { return html; },
+	
+	/**
+	* Renders the calendar after it has been configured. The render() method has a specific call chain that will execute
+	* when the method is called: renderHeader, renderBody, renderFooter.
+	* Refer to the documentation for those methods for information on 
+	* individual render tasks.
+	* @method render
+	*/
+	render : function() {
+		this.beforeRenderEvent.fire();
+	
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+	
+		// Find starting day of the current month
+		var workingDate = YAHOO.widget.DateMath.findMonthStart(this.cfg.getProperty(defCfg.PAGEDATE.key));
+	
+		this.resetRenderers();
+		this.cellDates.length = 0;
 
-// END UTILITY METHODS
+		YAHOO.util.Event.purgeElement(this.oDomContainer, true);
 
-// BEGIN EVENT HANDLERS
+		var html = [];
+	
+		html[html.length] = '<table cellSpacing="0" class="' + this.Style.CSS_CALENDAR + ' y' + workingDate.getFullYear() + '" id="' + this.id + '">';
+		html = this.renderHeader(html);
+		html = this.renderBody(workingDate, html);
+		html = this.renderFooter(html);
+		html[html.length] = '</table>';
 
-/**
-* Event executed before a date is selected in the calendar widget.
-* @deprecated Event handlers for this event should be susbcribed to beforeSelectEvent.
-*/
-YAHOO.widget.Calendar.prototype.onBeforeSelect = function() {
-	if (this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MULTI_SELECT.key) === false) {
-		if (this.parent) {
-			this.parent.callChildFunction("clearAllBodyCellStyles", this.Style.CSS_CELL_SELECTED);
-			this.parent.deselectAll();
-		} else {
-			this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);
-			this.deselectAll();
-		}
-	}
-};
+		this.oDomContainer.innerHTML = html.join("\n");
 
-/**
-* Event executed when a date is selected in the calendar widget.
-* @param	{Array}	selected	An array of date field arrays representing which date or dates were selected. Example: [ [2006,8,6],[2006,8,7],[2006,8,8] ]
-* @deprecated Event handlers for this event should be susbcribed to selectEvent.
-*/
-YAHOO.widget.Calendar.prototype.onSelect = function(selected) { };
+		this.applyListeners();
+		this.cells = this.oDomContainer.getElementsByTagName("td");
+	
+		this.cfg.refireEvent(defCfg.TITLE.key);
+		this.cfg.refireEvent(defCfg.CLOSE.key);
+		this.cfg.refireEvent(defCfg.IFRAME.key);
+	
+		this.renderEvent.fire();
+	},
 
-/**
-* Event executed before a date is deselected in the calendar widget.
-* @deprecated Event handlers for this event should be susbcribed to beforeDeselectEvent.
-*/
-YAHOO.widget.Calendar.prototype.onBeforeDeselect = function() { };
+	/**
+	* Applies the Calendar's DOM listeners to applicable elements.
+	* @method applyListeners
+	*/
+	applyListeners : function() {
+		var root = this.oDomContainer;
+		var cal = this.parent || this;
+		var anchor = "a";
+		var mousedown = "mousedown";
 
-/**
-* Event executed when a date is deselected in the calendar widget.
-* @param	{Array}	selected	An array of date field arrays representing which date or dates were deselected. Example: [ [2006,8,6],[2006,8,7],[2006,8,8] ]
-* @deprecated Event handlers for this event should be susbcribed to deselectEvent.
-*/
-YAHOO.widget.Calendar.prototype.onDeselect = function(deselected) { };
-
-/**
-* Event executed when the user navigates to a different calendar page.
-* @deprecated Event handlers for this event should be susbcribed to changePageEvent.
-*/
-YAHOO.widget.Calendar.prototype.onChangePage = function() {
-	this.render();
-};
-
-/**
-* Event executed when the calendar widget is rendered.
-* @deprecated Event handlers for this event should be susbcribed to renderEvent.
-*/
-YAHOO.widget.Calendar.prototype.onRender = function() { };
-
-/**
-* Event executed when the calendar widget is reset to its original state.
-* @deprecated Event handlers for this event should be susbcribed to resetEvemt.
-*/
-YAHOO.widget.Calendar.prototype.onReset = function() { this.render(); };
-
-/**
-* Event executed when the calendar widget is completely cleared to the current month with no selections.
-* @deprecated Event handlers for this event should be susbcribed to clearEvent.
-*/
-YAHOO.widget.Calendar.prototype.onClear = function() { this.render(); };
-
-/**
-* Validates the calendar widget. This method has no default implementation
-* and must be extended by subclassing the widget.
-* @return	Should return true if the widget validates, and false if
-* it doesn't.
-* @type Boolean
-*/
-YAHOO.widget.Calendar.prototype.validate = function() { return true; };
-
-// END EVENT HANDLERS
-
-// BEGIN DATE PARSE METHODS
-
-/**
-* Converts a date string to a date field array
-* @private
-* @param	{String}	sDate			Date string. Valid formats are mm/dd and mm/dd/yyyy.
-* @return				A date field array representing the string passed to the method
-* @type Array[](Number[])
-*/
-YAHOO.widget.Calendar.prototype._parseDate = function(sDate) {
-	var aDate = sDate.split(this.Locale.DATE_FIELD_DELIMITER);
-	var rArray;
-
-	if (aDate.length == 2) {
-		rArray = [aDate[this.Locale.MD_MONTH_POSITION-1],aDate[this.Locale.MD_DAY_POSITION-1]];
-		rArray.type = YAHOO.widget.Calendar.MONTH_DAY;
-	} else {
-		rArray = [aDate[this.Locale.MDY_YEAR_POSITION-1],aDate[this.Locale.MDY_MONTH_POSITION-1],aDate[this.Locale.MDY_DAY_POSITION-1]];
-		rArray.type = YAHOO.widget.Calendar.DATE;
-	}
-
-	for (var i=0;i<rArray.length;i++) {
-		rArray[i] = parseInt(rArray[i], 10);
-	}
-
-	return rArray;
-};
-
-/**
-* Converts a multi or single-date string to an array of date field arrays
-* @private
-* @param	{String}	sDates		Date string with one or more comma-delimited dates. Valid formats are mm/dd, mm/dd/yyyy, mm/dd/yyyy-mm/dd/yyyy
-* @return							An array of date field arrays
-* @type Array[](Number[])
-*/
-YAHOO.widget.Calendar.prototype._parseDates = function(sDates) {
-	var aReturn = [];
-
-	var aDates = sDates.split(this.Locale.DATE_DELIMITER);
+		var linkLeft = YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT, anchor, root);
+		var linkRight = YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT, anchor, root);
 	
-	for (var d=0;d<aDates.length;++d) {
-		var sDate = aDates[d];
+		if (linkLeft && linkLeft.length > 0) {
+			this.linkLeft = linkLeft[0];
+			YAHOO.util.Event.addListener(this.linkLeft, mousedown, cal.previousMonth, cal, true);
+		}
 
-		if (sDate.indexOf(this.Locale.DATE_RANGE_DELIMITER) != -1) {
-			// This is a range
-			var aRange = sDate.split(this.Locale.DATE_RANGE_DELIMITER);
+		if (linkRight && linkRight.length > 0) {
+			this.linkRight = linkRight[0];
+			YAHOO.util.Event.addListener(this.linkRight, mousedown, cal.nextMonth, cal, true);
+		}
 
-			var dateStart = this._parseDate(aRange[0]);
-			var dateEnd = this._parseDate(aRange[1]);
-
-			var fullRange = this._parseRange(dateStart, dateEnd);
-			aReturn = aReturn.concat(fullRange);
-		} else {
-			// This is not a range
-			var aDate = this._parseDate(sDate);
-			aReturn.push(aDate);
+		if (cal.cfg.getProperty("navigator") !== null) {
+			this.applyNavListeners();
 		}
-	}
-	return aReturn;
-};
 
-/**
-* Converts a date range to the full list of included dates
-* @private
-* @param	{Number[]}	startDate	Date field array representing the first date in the range
-* @param	{Number[]}	endDate		Date field array representing the last date in the range
-* @return							An array of date field arrays
-* @type Array[](Number[])
-*/
-YAHOO.widget.Calendar.prototype._parseRange = function(startDate, endDate) {
-	var dStart   = new Date(startDate[0],startDate[1]-1,startDate[2]);
-	var dCurrent = YAHOO.widget.DateMath.add(new Date(startDate[0],startDate[1]-1,startDate[2]),YAHOO.widget.DateMath.DAY,1);
-	var dEnd     = new Date(endDate[0],  endDate[1]-1,  endDate[2]);
-
-	var results = [];
-	results.push(startDate);
-	while (dCurrent.getTime() <= dEnd.getTime()) {
-		results.push([dCurrent.getFullYear(),dCurrent.getMonth()+1,dCurrent.getDate()]);
-		dCurrent = YAHOO.widget.DateMath.add(dCurrent,YAHOO.widget.DateMath.DAY,1);
-	}
-	return results;
-};
-
-// END DATE PARSE METHODS
-
-// BEGIN RENDERER METHODS
-
-/**
-* Resets the render stack of the current calendar to its original pre-render value.
-*/
-YAHOO.widget.Calendar.prototype.resetRenderers = function() {
-	this.renderStack = this._renderStack.concat();
-};
-
-/**
-* Clears the inner HTML, CSS class and style information from the specified cell.
-* @method clearElement
-* @param	{HTMLTableCellElement}	The cell to clear
-*/ 
-YAHOO.widget.Calendar.prototype.clearElement = function(cell) {
-	cell.innerHTML = " ";
-	cell.className="";
-};
-
-/**
-* Adds a renderer to the render stack. The function reference passed to this method will be executed
-* when a date cell matches the conditions specified in the date string for this renderer.
-* @method addRenderer
-* @param	{String}	sDates		A date string to associate with the specified renderer. Valid formats
-*									include date (12/24/2005), month/day (12/24), and range (12/1/2004-1/1/2005)
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.Calendar.prototype.addRenderer = function(sDates, fnRender) {
-	var aDates = this._parseDates(sDates);
-	for (var i=0;i<aDates.length;++i) {
-		var aDate = aDates[i];
+		if (this.domEventMap) {
+			var el,elements;
+			for (var cls in this.domEventMap) {	
+				if (YAHOO.lang.hasOwnProperty(this.domEventMap, cls)) {
+					var items = this.domEventMap[cls];
 	
-		if (aDate.length == 2) { // this is either a range or a month/day combo
-			if (aDate[0] instanceof Array) { // this is a range
-				this._addRenderer(YAHOO.widget.Calendar.RANGE,aDate,fnRender);
-			} else { // this is a month/day combo
-				this._addRenderer(YAHOO.widget.Calendar.MONTH_DAY,aDate,fnRender);
+					if (! (items instanceof Array)) {
+						items = [items];
+					}
+	
+					for (var i=0;i<items.length;i++)	{
+						var item = items[i];
+						elements = YAHOO.util.Dom.getElementsByClassName(cls, item.tag, this.oDomContainer);
+	
+						for (var c=0;c<elements.length;c++) {
+							el = elements[c];
+							 YAHOO.util.Event.addListener(el, item.event, item.handler, item.scope, item.correct );
+						}
+					}
+				}
 			}
-		} else if (aDate.length == 3) {
-			this._addRenderer(YAHOO.widget.Calendar.DATE,aDate,fnRender);
 		}
-	}
-};
+	
+		YAHOO.util.Event.addListener(this.oDomContainer, "click", this.doSelectCell, this);
+		YAHOO.util.Event.addListener(this.oDomContainer, "mouseover", this.doCellMouseOver, this);
+		YAHOO.util.Event.addListener(this.oDomContainer, "mouseout", this.doCellMouseOut, this);
+	},
 
-/**
-* The private method used for adding cell renderers to the local render stack.
-* This method is called by other methods that set the renderer type prior to the method call.
-* @method _addRenderer
-* @private
-* @param	{String}	type		The type string that indicates the type of date renderer being added.
-*									Values are YAHOO.widget.Calendar.DATE, YAHOO.widget.Calendar.MONTH_DAY, YAHOO.widget.Calendar.WEEKDAY,
-*									YAHOO.widget.Calendar.RANGE, YAHOO.widget.Calendar.MONTH
-* @param	{Array}		aDates		An array of dates used to construct the renderer. The format varies based
-*									on the renderer type
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.Calendar.prototype._addRenderer = function(type, aDates, fnRender) {
-	var add = [type,aDates,fnRender];
-	this.renderStack.unshift(add);	
-	this._renderStack = this.renderStack.concat();
-};
+	applyNavListeners : function() {
 
-/**
-* Adds a month to the render stack. The function reference passed to this method will be executed
-* when a date cell matches the month passed to this method.
-* @method addMonthRenderer
-* @param	{Number}	month		The month (1-12) to associate with this renderer
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.Calendar.prototype.addMonthRenderer = function(month, fnRender) {
-	this._addRenderer(YAHOO.widget.Calendar.MONTH,[month],fnRender);
-};
+		var E = YAHOO.util.Event;
 
-/**
-* Adds a weekday to the render stack. The function reference passed to this method will be executed
-* when a date cell matches the weekday passed to this method.
-* @method addWeekdayRenderer
-* @param	{Number}	weekday		The weekday (0-6) to associate with this renderer
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.Calendar.prototype.addWeekdayRenderer = function(weekday, fnRender) {
-	this._addRenderer(YAHOO.widget.Calendar.WEEKDAY,[weekday],fnRender);
-};
+		var calParent = this.parent || this;
+		var cal = this;
 
-// END RENDERER METHODS
+		var navBtns = YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV, "a", this.oDomContainer);
 
-// BEGIN CSS METHODS
+		if (navBtns.length > 0) {
 
-/**
-* Removes all styles from all body cells in the current calendar table.
-* @method clearAllBodyCellStyles
-* @param	{style}		The CSS class name to remove from all calendar body cells
-*/
-YAHOO.widget.Calendar.prototype.clearAllBodyCellStyles = function(style) {
-	for (var c=0;c<this.cells.length;++c) {
-		YAHOO.util.Dom.removeClass(this.cells[c],style);
-	}
-};
+			function show(e, obj) {
+				var target = E.getTarget(e);
+				// this == navBtn
+				if (this === target || YAHOO.util.Dom.isAncestor(this, target)) {
+					E.preventDefault(e);
+				}
+				var navigator = calParent.oNavigator;
+				if (navigator) {
+					var pgdate = cal.cfg.getProperty("pagedate");
+					navigator.setYear(pgdate.getFullYear());
+					navigator.setMonth(pgdate.getMonth());
+					navigator.show();
+				}
+			}
+			E.addListener(navBtns, "click", show);
+		}
+	},
 
-// END CSS METHODS
-
-// BEGIN GETTER/SETTER METHODS
-/**
-* Sets the calendar's month explicitly
-* @method setMonth
-* @param {Number}	month		The numeric month, from 0 (January) to 11 (December)
-*/
-YAHOO.widget.Calendar.prototype.setMonth = function(month) {
-	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
-	var current = this.cfg.getProperty(cfgPageDate);
-	current.setMonth(parseInt(month, 10));
-	this.cfg.setProperty(cfgPageDate, current);
-};
-
-/**
-* Sets the calendar's year explicitly.
-* @method setYear
-* @param {Number}	year		The numeric 4-digit year
-*/
-YAHOO.widget.Calendar.prototype.setYear = function(year) {
-	var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
-	var current = this.cfg.getProperty(cfgPageDate);
-	current.setFullYear(parseInt(year, 10));
-	this.cfg.setProperty(cfgPageDate, current);
-};
-
-/**
-* Gets the list of currently selected dates from the calendar.
-* @method getSelectedDates
-* @return {Date[]} An array of currently selected JavaScript Date objects.
-*/
-YAHOO.widget.Calendar.prototype.getSelectedDates = function() {
-	var returnDates = [];
-	var selected = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);
-
-	for (var d=0;d<selected.length;++d) {
-		var dateArray = selected[d];
-
-		var date = new Date(dateArray[0],dateArray[1]-1,dateArray[2]);
-		returnDates.push(date);
-	}
-
-	returnDates.sort( function(a,b) { return a-b; } );
-	return returnDates;
-};
-
-/// END GETTER/SETTER METHODS ///
-
-/**
-* Hides the Calendar's outer container from view.
-* @method hide
-*/
-YAHOO.widget.Calendar.prototype.hide = function() {
-	this.oDomContainer.style.display = "none";
-};
-
-/**
-* Shows the Calendar's outer container.
-* @method show
-*/
-YAHOO.widget.Calendar.prototype.show = function() {
-	this.oDomContainer.style.display = "block";
-};
-
-/**
-* Returns a string representing the current browser.
-* @deprecated As of 2.3.0, environment information is available in YAHOO.env.ua
-* @see YAHOO.env.ua
-* @property browser
-* @type String
-*/
-YAHOO.widget.Calendar.prototype.browser = function() {
-			var ua = navigator.userAgent.toLowerCase();
-				  if (ua.indexOf('opera')!=-1) { // Opera (check first in case of spoof)
-					 return 'opera';
-				  } else if (ua.indexOf('msie 7')!=-1) { // IE7
-					 return 'ie7';
-				  } else if (ua.indexOf('msie') !=-1) { // IE
-					 return 'ie';
-				  } else if (ua.indexOf('safari')!=-1) { // Safari (check before Gecko because it includes "like Gecko")
-					 return 'safari';
-				  } else if (ua.indexOf('gecko') != -1) { // Gecko
-					 return 'gecko';
-				  } else {
-					 return false;
-				  }
-			}();
-/**
-* Returns a string representation of the object.
-* @method toString
-* @return {String}	A string representation of the Calendar object.
-*/
-YAHOO.widget.Calendar.prototype.toString = function() {
-	return "Calendar " + this.id;
-};
-
-/**
-* @namespace YAHOO.widget
-* @class Calendar_Core
-* @extends YAHOO.widget.Calendar
-* @deprecated The old Calendar_Core class is no longer necessary.
-*/
-YAHOO.widget.Calendar_Core = YAHOO.widget.Calendar;
-
-YAHOO.widget.Cal_Core = YAHOO.widget.Calendar;
-
-/**
-* YAHOO.widget.CalendarGroup is a special container class for YAHOO.widget.Calendar. This class facilitates
-* the ability to have multi-page calendar views that share a single dataset and are
-* dependent on each other.
-* 
-* The calendar group instance will refer to each of its elements using a 0-based index.
-* For example, to construct the placeholder for a calendar group widget with id "cal1" and
-* containerId of "cal1Container", the markup would be as follows:
-*	<xmp>
-*		<div id="cal1Container_0"></div>
-*		<div id="cal1Container_1"></div>
-*	</xmp>
-* The tables for the calendars ("cal1_0" and "cal1_1") will be inserted into those containers.
-* @namespace YAHOO.widget
-* @class CalendarGroup
-* @constructor
-* @param {String}	id			The id of the table element that will represent the calendar widget
-* @param {String}	containerId	The id of the container div element that will wrap the calendar table
-* @param {Object}	config		The configuration object containing the Calendar's arguments
-*/
-YAHOO.widget.CalendarGroup = function(id, containerId, config) {
-	if (arguments.length > 0) {
-		this.init(id, containerId, config);
-	}
-};
-
-/**
-* Initializes the calendar group. All subclasses must call this method in order for the
-* group to be initialized properly.
-* @method init
-* @param {String}	id			The id of the table element that will represent the calendar widget
-* @param {String}	containerId	The id of the container div element that will wrap the calendar table
-* @param {Object}	config		The configuration object containing the Calendar's arguments
-*/
-YAHOO.widget.CalendarGroup.prototype.init = function(id, containerId, config) {
-	this.initEvents();
-	this.initStyles();
-
 	/**
-	* The collection of Calendar pages contained within the CalendarGroup
-	* @property pages
-	* @type YAHOO.widget.Calendar[]
+	* Retrieves the Date object for the specified Calendar cell
+	* @method getDateByCellId
+	* @param {String}	id	The id of the cell
+	* @return {Date} The Date object for the specified Calendar cell
 	*/
-	this.pages = [];
+	getDateByCellId : function(id) {
+		var date = this.getDateFieldsByCellId(id);
+		return YAHOO.widget.DateMath.getDate(date[0],date[1]-1,date[2]);
+	},
 	
 	/**
-	* The unique id associated with the CalendarGroup
-	* @property id
-	* @type String
+	* Retrieves the Date object for the specified Calendar cell
+	* @method getDateFieldsByCellId
+	* @param {String}	id	The id of the cell
+	* @return {Array}	The array of Date fields for the specified Calendar cell
 	*/
-	this.id = id;
+	getDateFieldsByCellId : function(id) {
+		id = id.toLowerCase().split("_cell")[1];
+		id = parseInt(id, 10);
+		return this.cellDates[id];
+	},
+	
+	/**
+	 * Find the Calendar's cell index for a given date.
+	 * If the date is not found, the method returns -1.
+	 * <p>
+	 * The returned index can be used to lookup the cell HTMLElement  
+	 * using the Calendar's cells array or passed to selectCell to select 
+	 * cells by index. 
+	 * </p>
+	 *
+	 * See <a href="#cells">cells</a>, <a href="#selectCell">selectCell</a>.
+	 *
+	 * @method getCellIndex
+	 * @param {Date} date JavaScript Date object, for which to find a cell index.
+	 * @return {Number} The index of the date in Calendars cellDates/cells arrays, or -1 if the date 
+	 * is not on the curently rendered Calendar page.
+	 */
+	getCellIndex : function(date) {
+		var idx = -1;
+		if (date) {
+			var m = date.getMonth(),
+				y = date.getFullYear(),
+				d = date.getDate(),
+				dates = this.cellDates;
 
+			for (var i = 0; i < dates.length; ++i) {
+				var cellDate = dates[i];
+				if (cellDate[0] === y && cellDate[1] === m+1 && cellDate[2] === d) {
+					idx = i;
+					break;
+				}
+			}
+		}
+		return idx;
+	},
+	
+	// BEGIN BUILT-IN TABLE CELL RENDERERS
+	
 	/**
-	* The unique id associated with the CalendarGroup container
-	* @property containerId
-	* @type String
+	* Renders a cell that falls before the minimum date or after the maximum date.
+	* widget class.
+	* @method renderOutOfBoundsDate
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+	* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
+	*			should not be terminated
 	*/
-	this.containerId = containerId;
-
+	renderOutOfBoundsDate : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_OOB);
+		cell.innerHTML = workingDate.getDate();
+		return YAHOO.widget.Calendar.STOP_RENDER;
+	},
+	
 	/**
-	* The outer containing element for the CalendarGroup
-	* @property oDomContainer
-	* @type HTMLElement
+	* Renders the row header for a week.
+	* @method renderRowHeader
+	* @param {Number}	weekNum	The week number of the current row
+	* @param {Array}	cell	The current working HTML array
 	*/
-	this.oDomContainer = document.getElementById(containerId);
-
-	YAHOO.util.Dom.addClass(this.oDomContainer, YAHOO.widget.CalendarGroup.CSS_CONTAINER);
-	YAHOO.util.Dom.addClass(this.oDomContainer, YAHOO.widget.CalendarGroup.CSS_MULTI_UP);
-
+	renderRowHeader : function(weekNum, html) {
+		html[html.length] = '<th class="calrowhead">' + weekNum + '</th>';
+		return html;
+	},
+	
 	/**
-	* The Config object used to hold the configuration variables for the CalendarGroup
-	* @property cfg
-	* @type YAHOO.util.Config
+	* Renders the row footer for a week.
+	* @method renderRowFooter
+	* @param {Number}	weekNum	The week number of the current row
+	* @param {Array}	cell	The current working HTML array
 	*/
-	this.cfg = new YAHOO.util.Config(this);
-
+	renderRowFooter : function(weekNum, html) {
+		html[html.length] = '<th class="calrowfoot">' + weekNum + '</th>';
+		return html;
+	},
+	
 	/**
-	* The local object which contains the CalendarGroup's options
-	* @property Options
-	* @type Object
+	* Renders a single standard calendar cell in the calendar widget table.
+	* All logic for determining how a standard default cell will be rendered is 
+	* encapsulated in this method, and must be accounted for when extending the
+	* widget class.
+	* @method renderCellDefault
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
 	*/
-	this.Options = {};
-
+	renderCellDefault : function(workingDate, cell) {
+		cell.innerHTML = '<a href="#" class="' + this.Style.CSS_CELL_SELECTOR + '">' + this.buildDayLabel(workingDate) + "</a>";
+	},
+	
 	/**
-	* The local object which contains the CalendarGroup's locale settings
-	* @property Locale
-	* @type Object
+	* Styles a selectable cell.
+	* @method styleCellDefault
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
 	*/
-	this.Locale = {};
-
-	this.setupConfig();
-
-	if (config) {
-		this.cfg.applyConfig(config, true);
-	}
-
-	this.cfg.fireQueue();
-
-	// OPERA HACK FOR MISWRAPPED FLOATS
-	if (YAHOO.env.ua.opera){
-		this.renderEvent.subscribe(this._fixWidth, this, true);
-	}
-};
-
-
-YAHOO.widget.CalendarGroup.prototype.setupConfig = function() {
+	styleCellDefault : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_SELECTABLE);
+	},
 	
-	var defCfg = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG;
 	
 	/**
-	* The number of pages to include in the CalendarGroup. This value can only be set once, in the CalendarGroup's constructor arguments.
-	* @config pages
-	* @type Number
-	* @default 2
+	* Renders a single standard calendar cell using the CSS hightlight1 style
+	* @method renderCellStyleHighlight1
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
 	*/
-	this.cfg.addProperty(defCfg.PAGES.key, { value:defCfg.PAGES.value, validator:this.cfg.checkNumber, handler:this.configPages } );
-
+	renderCellStyleHighlight1 : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT1);
+	},
+	
 	/**
-	* The month/year representing the current visible Calendar date (mm/yyyy)
-	* @config pagedate
-	* @type String
-	* @default today's date
+	* Renders a single standard calendar cell using the CSS hightlight2 style
+	* @method renderCellStyleHighlight2
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
 	*/
-	this.cfg.addProperty(defCfg.PAGEDATE.key, { value:new Date(), handler:this.configPageDate } );
-
+	renderCellStyleHighlight2 : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT2);
+	},
+	
 	/**
-	* The date or range of dates representing the current Calendar selection
-	* @config selected
-	* @type String
-	* @default []
+	* Renders a single standard calendar cell using the CSS hightlight3 style
+	* @method renderCellStyleHighlight3
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
 	*/
-	this.cfg.addProperty(defCfg.SELECTED.key, { value:[], handler:this.configSelected } );
-
+	renderCellStyleHighlight3 : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT3);
+	},
+	
 	/**
-	* The title to display above the CalendarGroup's month header
-	* @config title
-	* @type String
-	* @default ""
+	* Renders a single standard calendar cell using the CSS hightlight4 style
+	* @method renderCellStyleHighlight4
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
 	*/
-	this.cfg.addProperty(defCfg.TITLE.key, { value:defCfg.TITLE.value, handler:this.configTitle } );
-
+	renderCellStyleHighlight4 : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT4);
+	},
+	
 	/**
-	* Whether or not a close button should be displayed for this CalendarGroup
-	* @config close
-	* @type Boolean
-	* @default false
+	* Applies the default style used for rendering today's date to the current calendar cell
+	* @method renderCellStyleToday
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
 	*/
-	this.cfg.addProperty(defCfg.CLOSE.key, { value:defCfg.CLOSE.value, handler:this.configClose } );
-
+	renderCellStyleToday : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_TODAY);
+	},
+	
 	/**
-	* Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below.
-	* This property is enabled by default for IE6 and below. It is disabled by default for other browsers for performance reasons, but can be 
-	* enabled if required.
-	* 
-	* @config iframe
-	* @type Boolean
-	* @default true for IE6 and below, false for all other browsers
+	* Applies the default style used for rendering selected dates to the current calendar cell
+	* @method renderCellStyleSelected
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+	* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
+	*			should not be terminated
 	*/
-	this.cfg.addProperty(defCfg.IFRAME.key, { value:defCfg.IFRAME.value, handler:this.configIframe, validator:this.cfg.checkBoolean } );
-
+	renderCellStyleSelected : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_SELECTED);
+	},
+	
 	/**
-	* The minimum selectable date in the current Calendar (mm/dd/yyyy)
-	* @config mindate
-	* @type String
-	* @default null
+	* Applies the default style used for rendering dates that are not a part of the current
+	* month (preceding or trailing the cells for the current month)
+	* @method renderCellNotThisMonth
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+	* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
+	*			should not be terminated
 	*/
-	this.cfg.addProperty(defCfg.MINDATE.key, { value:defCfg.MINDATE.value, handler:this.delegateConfig } );
-
+	renderCellNotThisMonth : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_OOM);
+		cell.innerHTML=workingDate.getDate();
+		return YAHOO.widget.Calendar.STOP_RENDER;
+	},
+	
 	/**
-	* The maximum selectable date in the current Calendar (mm/dd/yyyy)
-	* @config maxdate
-	* @type String
-	* @default null
-	*/	
-	this.cfg.addProperty(defCfg.MAXDATE.key, { value:defCfg.MAXDATE.value, handler:this.delegateConfig  } );
-
-	// Options properties
-
+	* Renders the current calendar cell as a non-selectable "black-out" date using the default
+	* restricted style.
+	* @method renderBodyCellRestricted
+	* @param {Date}					workingDate		The current working Date object being used to generate the calendar
+	* @param {HTMLTableCellElement}	cell			The current working cell in the calendar
+	* @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
+	*			should not be terminated
+	*/
+	renderBodyCellRestricted : function(workingDate, cell) {
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL);
+		YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_RESTRICTED);
+		cell.innerHTML=workingDate.getDate();
+		return YAHOO.widget.Calendar.STOP_RENDER;
+	},
+	
+	// END BUILT-IN TABLE CELL RENDERERS
+	
+	// BEGIN MONTH NAVIGATION METHODS
+	
 	/**
-	* True if the Calendar should allow multiple selections. False by default.
-	* @config MULTI_SELECT
-	* @type Boolean
-	* @default false
+	* Adds the designated number of months to the current calendar month, and sets the current
+	* calendar page date to the new month.
+	* @method addMonths
+	* @param {Number}	count	The number of months to add to the current calendar
 	*/
-	this.cfg.addProperty(defCfg.MULTI_SELECT.key,	{ value:defCfg.MULTI_SELECT.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
-
+	addMonths : function(count) {
+		var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+		this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.add(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.MONTH, count));
+		this.resetRenderers();
+		this.changePageEvent.fire();
+	},
+	
 	/**
-	* The weekday the week begins on. Default is 0 (Sunday).
-	* @config START_WEEKDAY
-	* @type number
-	* @default 0
-	*/	
-	this.cfg.addProperty(defCfg.START_WEEKDAY.key,	{ value:defCfg.START_WEEKDAY.value, handler:this.delegateConfig, validator:this.cfg.checkNumber  } );
+	* Subtracts the designated number of months from the current calendar month, and sets the current
+	* calendar page date to the new month.
+	* @method subtractMonths
+	* @param {Number}	count	The number of months to subtract from the current calendar
+	*/
+	subtractMonths : function(count) {
+		var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+		this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.subtract(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.MONTH, count));
+		this.resetRenderers();
+		this.changePageEvent.fire();
+	},
 	
 	/**
-	* True if the Calendar should show weekday labels. True by default.
-	* @config SHOW_WEEKDAYS
-	* @type Boolean
-	* @default true
-	*/	
-	this.cfg.addProperty(defCfg.SHOW_WEEKDAYS.key,	{ value:defCfg.SHOW_WEEKDAYS.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	* Adds the designated number of years to the current calendar, and sets the current
+	* calendar page date to the new month.
+	* @method addYears
+	* @param {Number}	count	The number of years to add to the current calendar
+	*/
+	addYears : function(count) {
+		var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+		this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.add(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.YEAR, count));
+		this.resetRenderers();
+		this.changePageEvent.fire();
+	},
 	
 	/**
-	* True if the Calendar should show week row headers. False by default.
-	* @config SHOW_WEEK_HEADER
-	* @type Boolean
-	* @default false
-	*/	
-	this.cfg.addProperty(defCfg.SHOW_WEEK_HEADER.key,{ value:defCfg.SHOW_WEEK_HEADER.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	* Subtcats the designated number of years from the current calendar, and sets the current
+	* calendar page date to the new month.
+	* @method subtractYears
+	* @param {Number}	count	The number of years to subtract from the current calendar
+	*/
+	subtractYears : function(count) {
+		var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+		this.cfg.setProperty(cfgPageDate, YAHOO.widget.DateMath.subtract(this.cfg.getProperty(cfgPageDate), YAHOO.widget.DateMath.YEAR, count));
+		this.resetRenderers();
+		this.changePageEvent.fire();
+	},
 	
 	/**
-	* True if the Calendar should show week row footers. False by default.
-	* @config SHOW_WEEK_FOOTER
-	* @type Boolean
-	* @default false
+	* Navigates to the next month page in the calendar widget.
+	* @method nextMonth
 	*/
-	this.cfg.addProperty(defCfg.SHOW_WEEK_FOOTER.key,{ value:defCfg.SHOW_WEEK_FOOTER.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	nextMonth : function() {
+		this.addMonths(1);
+	},
 	
 	/**
-	* True if the Calendar should suppress weeks that are not a part of the current month. False by default.
-	* @config HIDE_BLANK_WEEKS
-	* @type Boolean
-	* @default false
-	*/		
-	this.cfg.addProperty(defCfg.HIDE_BLANK_WEEKS.key,{ value:defCfg.HIDE_BLANK_WEEKS.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	* Navigates to the previous month page in the calendar widget.
+	* @method previousMonth
+	*/
+	previousMonth : function() {
+		this.subtractMonths(1);
+	},
 	
 	/**
-	* The image that should be used for the left navigation arrow.
-	* @config NAV_ARROW_LEFT
-	* @type String
-	* @deprecated	You can customize the image by overriding the default CSS class for the left arrow - "calnavleft"
-	* @default null
-	*/		
-	this.cfg.addProperty(defCfg.NAV_ARROW_LEFT.key,	{ value:defCfg.NAV_ARROW_LEFT.value, handler:this.delegateConfig } );
+	* Navigates to the next year in the currently selected month in the calendar widget.
+	* @method nextYear
+	*/
+	nextYear : function() {
+		this.addYears(1);
+	},
 	
 	/**
-	* The image that should be used for the right navigation arrow.
-	* @config NAV_ARROW_RIGHT
-	* @type String
-	* @deprecated	You can customize the image by overriding the default CSS class for the right arrow - "calnavright"
-	* @default null
-	*/		
-	this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key,	{ value:defCfg.NAV_ARROW_RIGHT.value, handler:this.delegateConfig } );
-
-	// Locale properties
+	* Navigates to the previous year in the currently selected month in the calendar widget.
+	* @method previousYear
+	*/
+	previousYear : function() {
+		this.subtractYears(1);
+	},
 	
+	// END MONTH NAVIGATION METHODS
+	
+	// BEGIN SELECTION METHODS
+	
 	/**
-	* The short month labels for the current locale.
-	* @config MONTHS_SHORT
-	* @type String[]
-	* @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
+	* Resets the calendar widget to the originally selected month and year, and 
+	* sets the calendar to the initial selection(s).
+	* @method reset
 	*/
-	this.cfg.addProperty(defCfg.MONTHS_SHORT.key,	{ value:defCfg.MONTHS_SHORT.value, handler:this.delegateConfig } );
+	reset : function() {
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+		this.cfg.resetProperty(defCfg.SELECTED.key);
+		this.cfg.resetProperty(defCfg.PAGEDATE.key);
+		this.resetEvent.fire();
+	},
 	
 	/**
-	* The long month labels for the current locale.
-	* @config MONTHS_LONG
-	* @type String[]
-	* @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
-	*/		
-	this.cfg.addProperty(defCfg.MONTHS_LONG.key,		{ value:defCfg.MONTHS_LONG.value, handler:this.delegateConfig } );
+	* Clears the selected dates in the current calendar widget and sets the calendar
+	* to the current month and year.
+	* @method clear
+	*/
+	clear : function() {
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+		this.cfg.setProperty(defCfg.SELECTED.key, []);
+		this.cfg.setProperty(defCfg.PAGEDATE.key, new Date(this.today.getTime()));
+		this.clearEvent.fire();
+	},
 	
 	/**
-	* The 1-character weekday labels for the current locale.
-	* @config WEEKDAYS_1CHAR
-	* @type String[]
-	* @default ["S", "M", "T", "W", "T", "F", "S"]
-	*/		
-	this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key,	{ value:defCfg.WEEKDAYS_1CHAR.value, handler:this.delegateConfig } );
+	* Selects a date or a collection of dates on the current calendar. This method, by default,
+	* does not call the render method explicitly. Once selection has completed, render must be 
+	* called for the changes to be reflected visually.
+	*
+	* Any dates which are OOB (out of bounds, not selectable) will not be selected and the array of 
+	* selected dates passed to the selectEvent will not contain OOB dates.
+	* 
+	* If all dates are OOB, the no state change will occur; beforeSelect and select events will not be fired.
+	*
+	* @method select
+	* @param	{String/Date/Date[]}	date	The date string of dates to select in the current calendar. Valid formats are
+	*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
+	*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
+	*								This method can also take a JavaScript Date object or an array of Date objects.
+	* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*/
+	select : function(date) {
 	
+		var aToBeSelected = this._toFieldArray(date);
+	
+		// Filtered array of valid dates
+		var validDates = [];
+		var selected = [];
+		var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+		
+		for (var a=0; a < aToBeSelected.length; ++a) {
+			var toSelect = aToBeSelected[a];
+	
+			if (!this.isDateOOB(this._toDate(toSelect))) {
+				
+				if (validDates.length === 0) {
+					this.beforeSelectEvent.fire();
+					selected = this.cfg.getProperty(cfgSelected);
+				}
+	
+				validDates.push(toSelect);
+				
+				if (this._indexOfSelectedFieldArray(toSelect) == -1) { 
+					selected[selected.length] = toSelect;
+				}
+			}
+		}
+		
+	
+		if (validDates.length > 0) {
+			if (this.parent) {
+				this.parent.cfg.setProperty(cfgSelected, selected);
+			} else {
+				this.cfg.setProperty(cfgSelected, selected);
+			}
+			this.selectEvent.fire(validDates);
+		}
+	
+		return this.getSelectedDates();
+	},
+	
 	/**
-	* The short weekday labels for the current locale.
-	* @config WEEKDAYS_SHORT
-	* @type String[]
-	* @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
-	*/		
-	this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key,	{ value:defCfg.WEEKDAYS_SHORT.value, handler:this.delegateConfig } );
+	* Selects a date on the current calendar by referencing the index of the cell that should be selected.
+	* This method is used to easily select a single cell (usually with a mouse click) without having to do
+	* a full render. The selected style is applied to the cell directly.
+	*
+	* If the cell is not marked with the CSS_CELL_SELECTABLE class (as is the case by default for out of month 
+	* or out of bounds cells), it will not be selected and in such a case beforeSelect and select events will not be fired.
+	* 
+	* @method selectCell
+	* @param	{Number}	cellIndex	The index of the cell to select in the current calendar. 
+	* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*/
+	selectCell : function(cellIndex) {
 	
+		var cell = this.cells[cellIndex];
+		var cellDate = this.cellDates[cellIndex];
+		var dCellDate = this._toDate(cellDate);
+		
+		var selectable = YAHOO.util.Dom.hasClass(cell, this.Style.CSS_CELL_SELECTABLE);
+	
+		if (selectable) {
+	
+			this.beforeSelectEvent.fire();
+	
+			var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+			var selected = this.cfg.getProperty(cfgSelected);
+	
+			var selectDate = cellDate.concat();
+	
+			if (this._indexOfSelectedFieldArray(selectDate) == -1) {
+				selected[selected.length] = selectDate;
+			}
+			if (this.parent) {
+				this.parent.cfg.setProperty(cfgSelected, selected);
+			} else {
+				this.cfg.setProperty(cfgSelected, selected);
+			}
+			this.renderCellStyleSelected(dCellDate,cell);
+			this.selectEvent.fire([selectDate]);
+	
+			this.doCellMouseOut.call(cell, null, this);		
+		}
+	
+		return this.getSelectedDates();
+	},
+	
 	/**
-	* The medium weekday labels for the current locale.
-	* @config WEEKDAYS_MEDIUM
-	* @type String[]
-	* @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
-	*/		
-	this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key,	{ value:defCfg.WEEKDAYS_MEDIUM.value, handler:this.delegateConfig } );
+	* Deselects a date or a collection of dates on the current calendar. This method, by default,
+	* does not call the render method explicitly. Once deselection has completed, render must be 
+	* called for the changes to be reflected visually.
+	* 
+	* The method will not attempt to deselect any dates which are OOB (out of bounds, and hence not selectable) 
+	* and the array of deselected dates passed to the deselectEvent will not contain any OOB dates.
+	* 
+	* If all dates are OOB, beforeDeselect and deselect events will not be fired.
+	* 
+	* @method deselect
+	* @param	{String/Date/Date[]}	date	The date string of dates to deselect in the current calendar. Valid formats are
+	*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
+	*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
+	*								This method can also take a JavaScript Date object or an array of Date objects.	
+	* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*/
+	deselect : function(date) {
 	
+		var aToBeDeselected = this._toFieldArray(date);
+	
+		var validDates = [];
+		var selected = [];
+		var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+	
+		for (var a=0; a < aToBeDeselected.length; ++a) {
+			var toDeselect = aToBeDeselected[a];
+	
+			if (!this.isDateOOB(this._toDate(toDeselect))) {
+	
+				if (validDates.length === 0) {
+					this.beforeDeselectEvent.fire();
+					selected = this.cfg.getProperty(cfgSelected);
+				}
+	
+				validDates.push(toDeselect);
+	
+				var index = this._indexOfSelectedFieldArray(toDeselect);
+				if (index != -1) {	
+					selected.splice(index,1);
+				}
+			}
+		}
+	
+	
+		if (validDates.length > 0) {
+			if (this.parent) {
+				this.parent.cfg.setProperty(cfgSelected, selected);
+			} else {
+				this.cfg.setProperty(cfgSelected, selected);
+			}
+			this.deselectEvent.fire(validDates);
+		}
+	
+		return this.getSelectedDates();
+	},
+	
 	/**
-	* The long weekday labels for the current locale.
-	* @config WEEKDAYS_LONG
-	* @type String[]
-	* @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
-	*/		
-	this.cfg.addProperty(defCfg.WEEKDAYS_LONG.key,	{ value:defCfg.WEEKDAYS_LONG.value, handler:this.delegateConfig } );
-
+	* Deselects a date on the current calendar by referencing the index of the cell that should be deselected.
+	* This method is used to easily deselect a single cell (usually with a mouse click) without having to do
+	* a full render. The selected style is removed from the cell directly.
+	* 
+	* If the cell is not marked with the CSS_CELL_SELECTABLE class (as is the case by default for out of month 
+	* or out of bounds cells), the method will not attempt to deselect it and in such a case, beforeDeselect and 
+	* deselect events will not be fired.
+	* 
+	* @method deselectCell
+	* @param	{Number}	cellIndex	The index of the cell to deselect in the current calendar. 
+	* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*/
+	deselectCell : function(cellIndex) {
+		var cell = this.cells[cellIndex];
+		var cellDate = this.cellDates[cellIndex];
+		var cellDateIndex = this._indexOfSelectedFieldArray(cellDate);
+		
+		var selectable = YAHOO.util.Dom.hasClass(cell, this.Style.CSS_CELL_SELECTABLE);
+	
+		if (selectable) {
+	
+			this.beforeDeselectEvent.fire();
+	
+			var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+			var selected = this.cfg.getProperty(defCfg.SELECTED.key);
+	
+			var dCellDate = this._toDate(cellDate);
+			var selectDate = cellDate.concat();
+	
+			if (cellDateIndex > -1) {
+				if (this.cfg.getProperty(defCfg.PAGEDATE.key).getMonth() == dCellDate.getMonth() &&
+					this.cfg.getProperty(defCfg.PAGEDATE.key).getFullYear() == dCellDate.getFullYear()) {
+					YAHOO.util.Dom.removeClass(cell, this.Style.CSS_CELL_SELECTED);
+				}
+				selected.splice(cellDateIndex, 1);
+			}
+	
+			if (this.parent) {
+				this.parent.cfg.setProperty(defCfg.SELECTED.key, selected);
+			} else {
+				this.cfg.setProperty(defCfg.SELECTED.key, selected);
+			}
+	
+			this.deselectEvent.fire(selectDate);
+		}
+	
+		return this.getSelectedDates();
+	},
+	
 	/**
-	* The setting that determines which length of month labels should be used. Possible values are "short" and "long".
-	* @config LOCALE_MONTHS
-	* @type String
-	* @default "long"
+	* Deselects all dates on the current calendar.
+	* @method deselectAll
+	* @return {Date[]}		Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*						Assuming that this function executes properly, the return value should be an empty array.
+	*						However, the empty array is returned for the sake of being able to check the selection status
+	*						of the calendar.
 	*/
-	this.cfg.addProperty(defCfg.LOCALE_MONTHS.key,	{ value:defCfg.LOCALE_MONTHS.value, handler:this.delegateConfig } );
-
+	deselectAll : function() {
+		this.beforeDeselectEvent.fire();
+		
+		var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
+	
+		var selected = this.cfg.getProperty(cfgSelected);
+		var count = selected.length;
+		var sel = selected.concat();
+	
+		if (this.parent) {
+			this.parent.cfg.setProperty(cfgSelected, []);
+		} else {
+			this.cfg.setProperty(cfgSelected, []);
+		}
+		
+		if (count > 0) {
+			this.deselectEvent.fire(sel);
+		}
+	
+		return this.getSelectedDates();
+	},
+	
+	// END SELECTION METHODS
+	
+	// BEGIN TYPE CONVERSION METHODS
+	
 	/**
-	* The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long".
-	* @config LOCALE_WEEKDAYS
-	* @type String
-	* @default "short"
-	*/	
-	this.cfg.addProperty(defCfg.LOCALE_WEEKDAYS.key,	{ value:defCfg.LOCALE_WEEKDAYS.value, handler:this.delegateConfig } );
-
+	* Converts a date (either a JavaScript Date object, or a date string) to the internal data structure
+	* used to represent dates: [[yyyy,mm,dd],[yyyy,mm,dd]].
+	* @method _toFieldArray
+	* @private
+	* @param	{String/Date/Date[]}	date	The date string of dates to deselect in the current calendar. Valid formats are
+	*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
+	*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
+	*								This method can also take a JavaScript Date object or an array of Date objects.	
+	* @return {Array[](Number[])}	Array of date field arrays
+	*/
+	_toFieldArray : function(date) {
+		var returnDate = [];
+	
+		if (date instanceof Date) {
+			returnDate = [[date.getFullYear(), date.getMonth()+1, date.getDate()]];
+		} else if (YAHOO.lang.isString(date)) {
+			returnDate = this._parseDates(date);
+		} else if (YAHOO.lang.isArray(date)) {
+			for (var i=0;i<date.length;++i) {
+				var d = date[i];
+				returnDate[returnDate.length] = [d.getFullYear(),d.getMonth()+1,d.getDate()];
+			}
+		}
+		
+		return returnDate;
+	},
+	
 	/**
-	* The value used to delimit individual dates in a date string passed to various Calendar functions.
-	* @config DATE_DELIMITER
-	* @type String
-	* @default ","
+	* Converts a date field array [yyyy,mm,dd] to a JavaScript Date object. The date field array
+	* is the format in which dates are as provided as arguments to selectEvent and deselectEvent listeners.
+	* 
+	* @method toDate
+	* @param	{Number[]}	dateFieldArray	The date field array to convert to a JavaScript Date.
+	* @return	{Date}	JavaScript Date object representing the date field array.
 	*/
-	this.cfg.addProperty(defCfg.DATE_DELIMITER.key,		{ value:defCfg.DATE_DELIMITER.value, handler:this.delegateConfig } );
-
+	toDate : function(dateFieldArray) {
+		return this._toDate(dateFieldArray);
+	},
+	
 	/**
-	* The value used to delimit date fields in a date string passed to various Calendar functions.
-	* @config DATE_FIELD_DELIMITER
-	* @type String
-	* @default "/"
-	*/	
-	this.cfg.addProperty(defCfg.DATE_FIELD_DELIMITER.key,{ value:defCfg.DATE_FIELD_DELIMITER.value, handler:this.delegateConfig } );
-
+	* Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
+	* @method _toDate
+	* @private
+	* @deprecated Made public, toDate 
+	* @param	{Number[]}		dateFieldArray	The date field array to convert to a JavaScript Date.
+	* @return	{Date}	JavaScript Date object representing the date field array
+	*/
+	_toDate : function(dateFieldArray) {
+		if (dateFieldArray instanceof Date) {
+			return dateFieldArray;
+		} else {
+			return YAHOO.widget.DateMath.getDate(dateFieldArray[0],dateFieldArray[1]-1,dateFieldArray[2]);
+		}
+	},
+	
+	// END TYPE CONVERSION METHODS 
+	
+	// BEGIN UTILITY METHODS
+	
 	/**
-	* The value used to delimit date ranges in a date string passed to various Calendar functions.
-	* @config DATE_RANGE_DELIMITER
-	* @type String
-	* @default "-"
+	* Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
+	* @method _fieldArraysAreEqual
+	* @private
+	* @param	{Number[]}	array1	The first date field array to compare
+	* @param	{Number[]}	array2	The first date field array to compare
+	* @return	{Boolean}	The boolean that represents the equality of the two arrays
 	*/
-	this.cfg.addProperty(defCfg.DATE_RANGE_DELIMITER.key,{ value:defCfg.DATE_RANGE_DELIMITER.value, handler:this.delegateConfig } );
-
+	_fieldArraysAreEqual : function(array1, array2) {
+		var match = false;
+	
+		if (array1[0]==array2[0]&&array1[1]==array2[1]&&array1[2]==array2[2]) {
+			match=true;	
+		}
+	
+		return match;
+	},
+	
 	/**
-	* The position of the month in a month/year date string
-	* @config MY_MONTH_POSITION
-	* @type Number
-	* @default 1
+	* Gets the index of a date field array [yyyy,mm,dd] in the current list of selected dates.
+	* @method	_indexOfSelectedFieldArray
+	* @private
+	* @param	{Number[]}		find	The date field array to search for
+	* @return	{Number}			The index of the date field array within the collection of selected dates.
+	*								-1 will be returned if the date is not found.
 	*/
-	this.cfg.addProperty(defCfg.MY_MONTH_POSITION.key,	{ value:defCfg.MY_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	_indexOfSelectedFieldArray : function(find) {
+		var selected = -1;
+		var seldates = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);
 	
+		for (var s=0;s<seldates.length;++s) {
+			var sArray = seldates[s];
+			if (find[0]==sArray[0]&&find[1]==sArray[1]&&find[2]==sArray[2]) {
+				selected = s;
+				break;
+			}
+		}
+	
+		return selected;
+	},
+	
 	/**
-	* The position of the year in a month/year date string
-	* @config MY_YEAR_POSITION
-	* @type Number
-	* @default 2
-	*/	
-	this.cfg.addProperty(defCfg.MY_YEAR_POSITION.key,	{ value:defCfg.MY_YEAR_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	* Determines whether a given date is OOM (out of month).
+	* @method	isDateOOM
+	* @param	{Date}	date	The JavaScript Date object for which to check the OOM status
+	* @return	{Boolean}	true if the date is OOM
+	*/
+	isDateOOM : function(date) {
+		return (date.getMonth() != this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key).getMonth());
+	},
 	
 	/**
-	* The position of the month in a month/day date string
-	* @config MD_MONTH_POSITION
-	* @type Number
-	* @default 1
-	*/	
-	this.cfg.addProperty(defCfg.MD_MONTH_POSITION.key,	{ value:defCfg.MD_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	* Determines whether a given date is OOB (out of bounds - less than the mindate or more than the maxdate).
+	*
+	* @method	isDateOOB
+	* @param	{Date}	date	The JavaScript Date object for which to check the OOB status
+	* @return	{Boolean}	true if the date is OOB
+	*/
+	isDateOOB : function(date) {
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
+		
+		var minDate = this.cfg.getProperty(defCfg.MINDATE.key);
+		var maxDate = this.cfg.getProperty(defCfg.MAXDATE.key);
+		var dm = YAHOO.widget.DateMath;
+		
+		if (minDate) {
+			minDate = dm.clearTime(minDate);
+		} 
+		if (maxDate) {
+			maxDate = dm.clearTime(maxDate);
+		}
 	
+		var clearedDate = new Date(date.getTime());
+		clearedDate = dm.clearTime(clearedDate);
+	
+		return ((minDate && clearedDate.getTime() < minDate.getTime()) || (maxDate && clearedDate.getTime() > maxDate.getTime()));
+	},
+	
 	/**
-	* The position of the day in a month/year date string
-	* @config MD_DAY_POSITION
-	* @type Number
-	* @default 2
-	*/	
-	this.cfg.addProperty(defCfg.MD_DAY_POSITION.key,		{ value:defCfg.MD_DAY_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	 * Parses a pagedate configuration property value. The value can either be specified as a string of form "mm/yyyy" or a Date object 
+	 * and is parsed into a Date object normalized to the first day of the month. If no value is passed in, the month and year from today's date are used to create the Date object 
+	 * @method	_parsePageDate
+	 * @private
+	 * @param {Date|String}	date	Pagedate value which needs to be parsed
+	 * @return {Date}	The Date object representing the pagedate
+	 */
+	_parsePageDate : function(date) {
+		var parsedDate;
+		
+		var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG;
 	
+		if (date) {
+			if (date instanceof Date) {
+				parsedDate = YAHOO.widget.DateMath.findMonthStart(date);
+			} else {
+				var month, year, aMonthYear;
+				aMonthYear = date.split(this.cfg.getProperty(defCfg.DATE_FIELD_DELIMITER.key));
+				month = parseInt(aMonthYear[this.cfg.getProperty(defCfg.MY_MONTH_POSITION.key)-1], 10)-1;
+				year = parseInt(aMonthYear[this.cfg.getProperty(defCfg.MY_YEAR_POSITION.key)-1], 10);
+
+				parsedDate = YAHOO.widget.DateMath.getDate(year, month, 1);
+			}
+		} else {
+			parsedDate = YAHOO.widget.DateMath.getDate(this.today.getFullYear(), this.today.getMonth(), 1);
+		}
+		return parsedDate;
+	},
+	
+	// END UTILITY METHODS
+	
+	// BEGIN EVENT HANDLERS
+	
 	/**
-	* The position of the month in a month/day/year date string
-	* @config MDY_MONTH_POSITION
-	* @type Number
-	* @default 1
-	*/	
-	this.cfg.addProperty(defCfg.MDY_MONTH_POSITION.key,	{ value:defCfg.MDY_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	* Event executed before a date is selected in the calendar widget.
+	* @deprecated Event handlers for this event should be susbcribed to beforeSelectEvent.
+	*/
+	onBeforeSelect : function() {
+		if (this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MULTI_SELECT.key) === false) {
+			if (this.parent) {
+				this.parent.callChildFunction("clearAllBodyCellStyles", this.Style.CSS_CELL_SELECTED);
+				this.parent.deselectAll();
+			} else {
+				this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);
+				this.deselectAll();
+			}
+		}
+	},
 	
 	/**
-	* The position of the day in a month/day/year date string
-	* @config MDY_DAY_POSITION
-	* @type Number
-	* @default 2
-	*/	
-	this.cfg.addProperty(defCfg.MDY_DAY_POSITION.key,	{ value:defCfg.MDY_DAY_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	* Event executed when a date is selected in the calendar widget.
+	* @param	{Array}	selected	An array of date field arrays representing which date or dates were selected. Example: [ [2006,8,6],[2006,8,7],[2006,8,8] ]
+	* @deprecated Event handlers for this event should be susbcribed to selectEvent.
+	*/
+	onSelect : function(selected) { },
 	
 	/**
-	* The position of the year in a month/day/year date string
-	* @config MDY_YEAR_POSITION
-	* @type Number
-	* @default 3
-	*/	
-	this.cfg.addProperty(defCfg.MDY_YEAR_POSITION.key,	{ value:defCfg.MDY_YEAR_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
+	* Event executed before a date is deselected in the calendar widget.
+	* @deprecated Event handlers for this event should be susbcribed to beforeDeselectEvent.
+	*/
+	onBeforeDeselect : function() { },
+	
 	/**
-	* The position of the month in the month year label string used as the Calendar header
-	* @config MY_LABEL_MONTH_POSITION
-	* @type Number
-	* @default 1
+	* Event executed when a date is deselected in the calendar widget.
+	* @param	{Array}	selected	An array of date field arrays representing which date or dates were deselected. Example: [ [2006,8,6],[2006,8,7],[2006,8,8] ]
+	* @deprecated Event handlers for this event should be susbcribed to deselectEvent.
 	*/
-	this.cfg.addProperty(defCfg.MY_LABEL_MONTH_POSITION.key,	{ value:defCfg.MY_LABEL_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
-
+	onDeselect : function(deselected) { },
+	
 	/**
-	* The position of the year in the month year label string used as the Calendar header
-	* @config MY_LABEL_YEAR_POSITION
-	* @type Number
-	* @default 2
+	* Event executed when the user navigates to a different calendar page.
+	* @deprecated Event handlers for this event should be susbcribed to changePageEvent.
 	*/
-	this.cfg.addProperty(defCfg.MY_LABEL_YEAR_POSITION.key,	{ value:defCfg.MY_LABEL_YEAR_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	onChangePage : function() {
+		this.render();
+	},
 	
 	/**
-	* The suffix used after the month when rendering the Calendar header
-	* @config MY_LABEL_MONTH_SUFFIX
-	* @type String
-	* @default " "
+	* Event executed when the calendar widget is rendered.
+	* @deprecated Event handlers for this event should be susbcribed to renderEvent.
 	*/
-	this.cfg.addProperty(defCfg.MY_LABEL_MONTH_SUFFIX.key,	{ value:defCfg.MY_LABEL_MONTH_SUFFIX.value, handler:this.delegateConfig } );
+	onRender : function() { },
 	
 	/**
-	* The suffix used after the year when rendering the Calendar header
-	* @config MY_LABEL_YEAR_SUFFIX
-	* @type String
-	* @default ""
+	* Event executed when the calendar widget is reset to its original state.
+	* @deprecated Event handlers for this event should be susbcribed to resetEvemt.
 	*/
-	this.cfg.addProperty(defCfg.MY_LABEL_YEAR_SUFFIX.key, { value:defCfg.MY_LABEL_YEAR_SUFFIX.value, handler:this.delegateConfig } );
-};
-
-/**
-* Initializes CalendarGroup's built-in CustomEvents
-* @method initEvents
-*/
-YAHOO.widget.CalendarGroup.prototype.initEvents = function() {
-	var me = this;
-	var strEvent = "Event";
-
+	onReset : function() { this.render(); },
+	
 	/**
-	* Proxy subscriber to subscribe to the CalendarGroup's child Calendars' CustomEvents
-	* @method sub
+	* Event executed when the calendar widget is completely cleared to the current month with no selections.
+	* @deprecated Event handlers for this event should be susbcribed to clearEvent.
+	*/
+	onClear : function() { this.render(); },
+	
+	/**
+	* Validates the calendar widget. This method has no default implementation
+	* and must be extended by subclassing the widget.
+	* @return	Should return true if the widget validates, and false if
+	* it doesn't.
+	* @type Boolean
+	*/
+	validate : function() { return true; },
+	
+	// END EVENT HANDLERS
+	
+	// BEGIN DATE PARSE METHODS
+	
+	/**
+	* Converts a date string to a date field array
 	* @private
-	* @param {Function} fn	The function to subscribe to this CustomEvent
-	* @param {Object}	obj	The CustomEvent's scope object
-	* @param {Boolean}	bOverride	Whether or not to apply scope correction
+	* @param	{String}	sDate			Date string. Valid formats are mm/dd and mm/dd/yyyy.
+	* @return				A date field array representing the string passed to the method
+	* @type Array[](Number[])
 	*/
-	var sub = function(fn, obj, bOverride) {
-		for (var p=0;p<me.pages.length;++p) {
-			var cal = me.pages[p];
-			cal[this.type + strEvent].subscribe(fn, obj, bOverride);
+	_parseDate : function(sDate) {
+		var aDate = sDate.split(this.Locale.DATE_FIELD_DELIMITER);
+		var rArray;
+	
+		if (aDate.length == 2) {
+			rArray = [aDate[this.Locale.MD_MONTH_POSITION-1],aDate[this.Locale.MD_DAY_POSITION-1]];
+			rArray.type = YAHOO.widget.Calendar.MONTH_DAY;
+		} else {
+			rArray = [aDate[this.Locale.MDY_YEAR_POSITION-1],aDate[this.Locale.MDY_MONTH_POSITION-1],aDate[this.Locale.MDY_DAY_POSITION-1]];
+			rArray.type = YAHOO.widget.Calendar.DATE;
 		}
-	};
-
+	
+		for (var i=0;i<rArray.length;i++) {
+			rArray[i] = parseInt(rArray[i], 10);
+		}
+	
+		return rArray;
+	},
+	
 	/**
-	* Proxy unsubscriber to unsubscribe from the CalendarGroup's child Calendars' CustomEvents
-	* @method unsub
+	* Converts a multi or single-date string to an array of date field arrays
 	* @private
-	* @param {Function} fn	The function to subscribe to this CustomEvent
-	* @param {Object}	obj	The CustomEvent's scope object
+	* @param	{String}	sDates		Date string with one or more comma-delimited dates. Valid formats are mm/dd, mm/dd/yyyy, mm/dd/yyyy-mm/dd/yyyy
+	* @return							An array of date field arrays
+	* @type Array[](Number[])
 	*/
-	var unsub = function(fn, obj) {
-		for (var p=0;p<me.pages.length;++p) {
-			var cal = me.pages[p];
-			cal[this.type + strEvent].unsubscribe(fn, obj);
+	_parseDates : function(sDates) {
+		var aReturn = [];
+	
+		var aDates = sDates.split(this.Locale.DATE_DELIMITER);
+		
+		for (var d=0;d<aDates.length;++d) {
+			var sDate = aDates[d];
+	
+			if (sDate.indexOf(this.Locale.DATE_RANGE_DELIMITER) != -1) {
+				// This is a range
+				var aRange = sDate.split(this.Locale.DATE_RANGE_DELIMITER);
+	
+				var dateStart = this._parseDate(aRange[0]);
+				var dateEnd = this._parseDate(aRange[1]);
+	
+				var fullRange = this._parseRange(dateStart, dateEnd);
+				aReturn = aReturn.concat(fullRange);
+			} else {
+				// This is not a range
+				var aDate = this._parseDate(sDate);
+				aReturn.push(aDate);
+			}
 		}
-	};
+		return aReturn;
+	},
 	
-	var defEvents = YAHOO.widget.Calendar._EVENT_TYPES;
-
 	/**
-	* Fired before a selection is made
-	* @event beforeSelectEvent
+	* Converts a date range to the full list of included dates
+	* @private
+	* @param	{Number[]}	startDate	Date field array representing the first date in the range
+	* @param	{Number[]}	endDate		Date field array representing the last date in the range
+	* @return							An array of date field arrays
+	* @type Array[](Number[])
 	*/
-	this.beforeSelectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SELECT);
-	this.beforeSelectEvent.subscribe = sub; this.beforeSelectEvent.unsubscribe = unsub;
+	_parseRange : function(startDate, endDate) {
+		var dCurrent = YAHOO.widget.DateMath.add(YAHOO.widget.DateMath.getDate(startDate[0],startDate[1]-1,startDate[2]),YAHOO.widget.DateMath.DAY,1);
+		var dEnd     = YAHOO.widget.DateMath.getDate(endDate[0],  endDate[1]-1,  endDate[2]);
+	
+		var results = [];
+		results.push(startDate);
+		while (dCurrent.getTime() <= dEnd.getTime()) {
+			results.push([dCurrent.getFullYear(),dCurrent.getMonth()+1,dCurrent.getDate()]);
+			dCurrent = YAHOO.widget.DateMath.add(dCurrent,YAHOO.widget.DateMath.DAY,1);
+		}
+		return results;
+	},
+	
+	// END DATE PARSE METHODS
+	
+	// BEGIN RENDERER METHODS
+	
+	/**
+	* Resets the render stack of the current calendar to its original pre-render value.
+	*/
+	resetRenderers : function() {
+		this.renderStack = this._renderStack.concat();
+	},
+	
+	/**
+	 * Removes all custom renderers added to the Calendar through the addRenderer, addMonthRenderer and 
+	 * addWeekdayRenderer methods. Calendar's render method needs to be called after removing renderers 
+	 * to re-render the Calendar without custom renderers applied.
+	 */
+	removeRenderers : function() {
+		this._renderStack = [];
+		this.renderStack = [];
+	},
 
 	/**
-	* Fired when a selection is made
-	* @event selectEvent
-	* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
+	* Clears the inner HTML, CSS class and style information from the specified cell.
+	* @method clearElement
+	* @param	{HTMLTableCellElement} cell The cell to clear
+	*/ 
+	clearElement : function(cell) {
+		cell.innerHTML = " ";
+		cell.className="";
+	},
+	
+	/**
+	* Adds a renderer to the render stack. The function reference passed to this method will be executed
+	* when a date cell matches the conditions specified in the date string for this renderer.
+	* @method addRenderer
+	* @param	{String}	sDates		A date string to associate with the specified renderer. Valid formats
+	*									include date (12/24/2005), month/day (12/24), and range (12/1/2004-1/1/2005)
+	* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
 	*/
-	this.selectEvent = new YAHOO.util.CustomEvent(defEvents.SELECT); 
-	this.selectEvent.subscribe = sub; this.selectEvent.unsubscribe = unsub;
+	addRenderer : function(sDates, fnRender) {
+		var aDates = this._parseDates(sDates);
+		for (var i=0;i<aDates.length;++i) {
+			var aDate = aDates[i];
+		
+			if (aDate.length == 2) { // this is either a range or a month/day combo
+				if (aDate[0] instanceof Array) { // this is a range
+					this._addRenderer(YAHOO.widget.Calendar.RANGE,aDate,fnRender);
+				} else { // this is a month/day combo
+					this._addRenderer(YAHOO.widget.Calendar.MONTH_DAY,aDate,fnRender);
+				}
+			} else if (aDate.length == 3) {
+				this._addRenderer(YAHOO.widget.Calendar.DATE,aDate,fnRender);
+			}
+		}
+	},
+	
+	/**
+	* The private method used for adding cell renderers to the local render stack.
+	* This method is called by other methods that set the renderer type prior to the method call.
+	* @method _addRenderer
+	* @private
+	* @param	{String}	type		The type string that indicates the type of date renderer being added.
+	*									Values are YAHOO.widget.Calendar.DATE, YAHOO.widget.Calendar.MONTH_DAY, YAHOO.widget.Calendar.WEEKDAY,
+	*									YAHOO.widget.Calendar.RANGE, YAHOO.widget.Calendar.MONTH
+	* @param	{Array}		aDates		An array of dates used to construct the renderer. The format varies based
+	*									on the renderer type
+	* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
+	*/
+	_addRenderer : function(type, aDates, fnRender) {
+		var add = [type,aDates,fnRender];
+		this.renderStack.unshift(add);	
+		this._renderStack = this.renderStack.concat();
+	},
 
 	/**
-	* Fired before a selection is made
-	* @event beforeDeselectEvent
+	* Adds a month to the render stack. The function reference passed to this method will be executed
+	* when a date cell matches the month passed to this method.
+	* @method addMonthRenderer
+	* @param	{Number}	month		The month (1-12) to associate with this renderer
+	* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
 	*/
-	this.beforeDeselectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_DESELECT); 
-	this.beforeDeselectEvent.subscribe = sub; this.beforeDeselectEvent.unsubscribe = unsub;
+	addMonthRenderer : function(month, fnRender) {
+		this._addRenderer(YAHOO.widget.Calendar.MONTH,[month],fnRender);
+	},
 
 	/**
-	* Fired when a selection is made
-	* @event deselectEvent
-	* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
+	* Adds a weekday to the render stack. The function reference passed to this method will be executed
+	* when a date cell matches the weekday passed to this method.
+	* @method addWeekdayRenderer
+	* @param	{Number}	weekday		The weekday (0-6) to associate with this renderer
+	* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
 	*/
-	this.deselectEvent = new YAHOO.util.CustomEvent(defEvents.DESELECT); 
-	this.deselectEvent.subscribe = sub; this.deselectEvent.unsubscribe = unsub;
+	addWeekdayRenderer : function(weekday, fnRender) {
+		this._addRenderer(YAHOO.widget.Calendar.WEEKDAY,[weekday],fnRender);
+	},
 	
+	// END RENDERER METHODS
+	
+	// BEGIN CSS METHODS
+	
 	/**
-	* Fired when the Calendar page is changed
-	* @event changePageEvent
+	* Removes all styles from all body cells in the current calendar table.
+	* @method clearAllBodyCellStyles
+	* @param	{style}	style The CSS class name to remove from all calendar body cells
 	*/
-	this.changePageEvent = new YAHOO.util.CustomEvent(defEvents.CHANGE_PAGE); 
-	this.changePageEvent.subscribe = sub; this.changePageEvent.unsubscribe = unsub;
+	clearAllBodyCellStyles : function(style) {
+		for (var c=0;c<this.cells.length;++c) {
+			YAHOO.util.Dom.removeClass(this.cells[c],style);
+		}
+	},
+	
+	// END CSS METHODS
+	
+	// BEGIN GETTER/SETTER METHODS
+	/**
+	* Sets the calendar's month explicitly
+	* @method setMonth
+	* @param {Number}	month		The numeric month, from 0 (January) to 11 (December)
+	*/
+	setMonth : function(month) {
+		var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+		var current = this.cfg.getProperty(cfgPageDate);
+		current.setMonth(parseInt(month, 10));
+		this.cfg.setProperty(cfgPageDate, current);
+	},
 
 	/**
-	* Fired before the Calendar is rendered
-	* @event beforeRenderEvent
+	* Sets the calendar's year explicitly.
+	* @method setYear
+	* @param {Number}	year		The numeric 4-digit year
 	*/
-	this.beforeRenderEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER);
-	this.beforeRenderEvent.subscribe = sub; this.beforeRenderEvent.unsubscribe = unsub;
+	setYear : function(year) {
+		var cfgPageDate = YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
+		var current = this.cfg.getProperty(cfgPageDate);
+		current.setFullYear(parseInt(year, 10));
+		this.cfg.setProperty(cfgPageDate, current);
+	},
 
 	/**
-	* Fired when the Calendar is rendered
-	* @event renderEvent
+	* Gets the list of currently selected dates from the calendar.
+	* @method getSelectedDates
+	* @return {Date[]} An array of currently selected JavaScript Date objects.
 	*/
-	this.renderEvent = new YAHOO.util.CustomEvent(defEvents.RENDER);
-	this.renderEvent.subscribe = sub; this.renderEvent.unsubscribe = unsub;
+	getSelectedDates : function() {
+		var returnDates = [];
+		var selected = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);
 
+		for (var d=0;d<selected.length;++d) {
+			var dateArray = selected[d];
+
+			var date = YAHOO.widget.DateMath.getDate(dateArray[0],dateArray[1]-1,dateArray[2]);
+			returnDates.push(date);
+		}
+
+		returnDates.sort( function(a,b) { return a-b; } );
+		return returnDates;
+	},
+
+	/// END GETTER/SETTER METHODS ///
+	
 	/**
-	* Fired when the Calendar is reset
-	* @event resetEvent
+	* Hides the Calendar's outer container from view.
+	* @method hide
 	*/
-	this.resetEvent = new YAHOO.util.CustomEvent(defEvents.RESET); 
-	this.resetEvent.subscribe = sub; this.resetEvent.unsubscribe = unsub;
+	hide : function() {
+		if (this.beforeHideEvent.fire()) {
+			this.oDomContainer.style.display = "none";
+			this.hideEvent.fire();
+		}
+	},
 
 	/**
-	* Fired when the Calendar is cleared
-	* @event clearEvent
+	* Shows the Calendar's outer container.
+	* @method show
 	*/
-	this.clearEvent = new YAHOO.util.CustomEvent(defEvents.CLEAR);
-	this.clearEvent.subscribe = sub; this.clearEvent.unsubscribe = unsub;
+	show : function() {
+		if (this.beforeShowEvent.fire()) {
+			this.oDomContainer.style.display = "block";
+			this.showEvent.fire();
+		}
+	},
 
+	/**
+	* Returns a string representing the current browser.
+	* @deprecated As of 2.3.0, environment information is available in YAHOO.env.ua
+	* @see YAHOO.env.ua
+	* @property browser
+	* @type String
+	*/
+	browser : (function() {
+				var ua = navigator.userAgent.toLowerCase();
+					  if (ua.indexOf('opera')!=-1) { // Opera (check first in case of spoof)
+						 return 'opera';
+					  } else if (ua.indexOf('msie 7')!=-1) { // IE7
+						 return 'ie7';
+					  } else if (ua.indexOf('msie') !=-1) { // IE
+						 return 'ie';
+					  } else if (ua.indexOf('safari')!=-1) { // Safari (check before Gecko because it includes "like Gecko")
+						 return 'safari';
+					  } else if (ua.indexOf('gecko') != -1) { // Gecko
+						 return 'gecko';
+					  } else {
+						 return false;
+					  }
+				})(),
+	/**
+	* Returns a string representation of the object.
+	* @method toString
+	* @return {String}	A string representation of the Calendar object.
+	*/
+	toString : function() {
+		return "Calendar " + this.id;
+	}
 };
 
 /**
-* The default Config handler for the "pages" property
-* @method configPages
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+* @namespace YAHOO.widget
+* @class Calendar_Core
+* @extends YAHOO.widget.Calendar
+* @deprecated The old Calendar_Core class is no longer necessary.
 */
-YAHOO.widget.CalendarGroup.prototype.configPages = function(type, args, obj) {
-	var pageCount = args[0];
+YAHOO.widget.Calendar_Core = YAHOO.widget.Calendar;
 
-	var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
+YAHOO.widget.Cal_Core = YAHOO.widget.Calendar;
 
-	// Define literals outside loop	
-	var sep = "_";
-	var groupCalClass = "groupcal";
+/**
+* YAHOO.widget.CalendarGroup is a special container class for YAHOO.widget.Calendar. This class facilitates
+* the ability to have multi-page calendar views that share a single dataset and are
+* dependent on each other.
+*
+* The calendar group instance will refer to each of its elements using a 0-based index.
+* For example, to construct the placeholder for a calendar group widget with id "cal1" and
+* containerId of "cal1Container", the markup would be as follows:
+*	<xmp>
+*		<div id="cal1Container_0"></div>
+*		<div id="cal1Container_1"></div>
+*	</xmp>
+* The tables for the calendars ("cal1_0" and "cal1_1") will be inserted into those containers.
+* 
+* <p>
+* <strong>NOTE: As of 2.4.0, the constructor's ID argument is optional.</strong>
+* The CalendarGroup can be constructed by simply providing a container ID string, 
+* or a reference to a container DIV HTMLElement (the element needs to exist 
+* in the document).
+* 
+* E.g.:
+*	<xmp>
+*		var c = new YAHOO.widget.CalendarGroup("calContainer", configOptions);
+*	</xmp>
+* or:
+*   <xmp>
+*       var containerDiv = YAHOO.util.Dom.get("calContainer");
+*		var c = new YAHOO.widget.CalendarGroup(containerDiv, configOptions);
+*	</xmp>
+* </p>
+* <p>
+* If not provided, the ID will be generated from the container DIV ID by adding an "_t" suffix.
+* For example if an ID is not provided, and the container's ID is "calContainer", the CalendarGroup's ID will be set to "calContainer_t".
+* </p>
+* 
+* @namespace YAHOO.widget
+* @class CalendarGroup
+* @constructor
+* @param {String} id optional The id of the table element that will represent the CalendarGroup widget. As of 2.4.0, this argument is optional.
+* @param {String | HTMLElement} container The id of the container div element that will wrap the CalendarGroup table, or a reference to a DIV element which exists in the document.
+* @param {Object} config optional The configuration object containing the initial configuration values for the CalendarGroup.
+*/
+YAHOO.widget.CalendarGroup = function(id, containerId, config) {
+	if (arguments.length > 0) {
+		this.init.apply(this, arguments);
+	}
+};
 
-	var firstClass = "first-of-type";
-	var lastClass = "last-of-type";
+YAHOO.widget.CalendarGroup.prototype = {
 
-	for (var p=0;p<pageCount;++p) {
-		var calId = this.id + sep + p;
-		var calContainerId = this.containerId + sep + p;
+	/**
+	* Initializes the calendar group. All subclasses must call this method in order for the
+	* group to be initialized properly.
+	* @method init
+	* @param {String} id optional The id of the table element that will represent the CalendarGroup widget. As of 2.4.0, this argument is optional.
+	* @param {String | HTMLElement} container The id of the container div element that will wrap the CalendarGroup table, or a reference to a DIV element which exists in the document.
+	* @param {Object} config optional The configuration object containing the initial configuration values for the CalendarGroup.
+	*/
+	init : function(id, container, config) {
 
-		var childConfig = this.cfg.getConfig();
-		childConfig.close = false;
-		childConfig.title = false;
+		// Normalize 2.4.0, pre 2.4.0 args
+		var nArgs = this._parseArgs(arguments);
 
-		var cal = this.constructChild(calId, calContainerId, childConfig);
-		var caldate = cal.cfg.getProperty(cfgPageDate);
-		this._setMonthOnDate(caldate, caldate.getMonth() + p);
-		cal.cfg.setProperty(cfgPageDate, caldate);
+		id = nArgs.id;
+		container = nArgs.container;
+		config = nArgs.config;
 
-		YAHOO.util.Dom.removeClass(cal.oDomContainer, this.Style.CSS_SINGLE);
-		YAHOO.util.Dom.addClass(cal.oDomContainer, groupCalClass);
+		this.oDomContainer = YAHOO.util.Dom.get(container);
 
-		if (p===0) {
-			YAHOO.util.Dom.addClass(cal.oDomContainer, firstClass);
+		if (!this.oDomContainer.id) {
+			this.oDomContainer.id = YAHOO.util.Dom.generateId();
 		}
-
-		if (p==(pageCount-1)) {
-			YAHOO.util.Dom.addClass(cal.oDomContainer, lastClass);
+		if (!id) {
+			id = this.oDomContainer.id + "_t";
 		}
 
-		cal.parent = this;
-		cal.index = p; 
+		/**
+		* The unique id associated with the CalendarGroup
+		* @property id
+		* @type String
+		*/
+		this.id = id;
 
-		this.pages[this.pages.length] = cal;
-	}
-};
+		/**
+		* The unique id associated with the CalendarGroup container
+		* @property containerId
+		* @type String
+		*/
+		this.containerId = this.oDomContainer.id;
 
-/**
-* The default Config handler for the "pagedate" property
-* @method configPageDate
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.CalendarGroup.prototype.configPageDate = function(type, args, obj) {
-	var val = args[0];
-	var firstPageDate;
-	
-	var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
-	
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		if (p === 0) {
-			firstPageDate = cal._parsePageDate(val);
-			cal.cfg.setProperty(cfgPageDate, firstPageDate);
-		} else {
-			var pageDate = new Date(firstPageDate);
-			this._setMonthOnDate(pageDate, pageDate.getMonth() + p);
-			cal.cfg.setProperty(cfgPageDate, pageDate);
-		}
-	}
-};
+		this.initEvents();
+		this.initStyles();
 
-/**
-* The default Config handler for the CalendarGroup "selected" property
-* @method configSelected
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.CalendarGroup.prototype.configSelected = function(type, args, obj) {
-	var cfgSelected = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key;
-	this.delegateConfig(type, args, obj);
-	var selected = (this.pages.length > 0) ? this.pages[0].cfg.getProperty(cfgSelected) : []; 
-	this.cfg.setProperty(cfgSelected, selected, true);
-};
+		/**
+		* The collection of Calendar pages contained within the CalendarGroup
+		* @property pages
+		* @type YAHOO.widget.Calendar[]
+		*/
+		this.pages = [];
 
+		YAHOO.util.Dom.addClass(this.oDomContainer, YAHOO.widget.CalendarGroup.CSS_CONTAINER);
+		YAHOO.util.Dom.addClass(this.oDomContainer, YAHOO.widget.CalendarGroup.CSS_MULTI_UP);
 
-/**
-* Delegates a configuration property to the CustomEvents associated with the CalendarGroup's children
-* @method delegateConfig
-* @param {String} type	The CustomEvent type (usually the property name)
-* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
-*/
-YAHOO.widget.CalendarGroup.prototype.delegateConfig = function(type, args, obj) {
-	var val = args[0];
-	var cal;
+		/**
+		* The Config object used to hold the configuration variables for the CalendarGroup
+		* @property cfg
+		* @type YAHOO.util.Config
+		*/
+		this.cfg = new YAHOO.util.Config(this);
 
-	for (var p=0;p<this.pages.length;p++) {
-		cal = this.pages[p];
-		cal.cfg.setProperty(type, val);
-	}
-};
+		/**
+		* The local object which contains the CalendarGroup's options
+		* @property Options
+		* @type Object
+		*/
+		this.Options = {};
 
+		/**
+		* The local object which contains the CalendarGroup's locale settings
+		* @property Locale
+		* @type Object
+		*/
+		this.Locale = {};
 
-/**
-* Adds a function to all child Calendars within this CalendarGroup.
-* @method setChildFunction
-* @param {String}		fnName		The name of the function
-* @param {Function}		fn			The function to apply to each Calendar page object
-*/
-YAHOO.widget.CalendarGroup.prototype.setChildFunction = function(fnName, fn) {
-	var pageCount = this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);
+		this.setupConfig();
 
-	for (var p=0;p<pageCount;++p) {
-		this.pages[p][fnName] = fn;
-	}
-};
+		if (config) {
+			this.cfg.applyConfig(config, true);
+		}
 
-/**
-* Calls a function within all child Calendars within this CalendarGroup.
-* @method callChildFunction
-* @param {String}		fnName		The name of the function
-* @param {Array}		args		The arguments to pass to the function
-*/
-YAHOO.widget.CalendarGroup.prototype.callChildFunction = function(fnName, args) {
-	var pageCount = this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);
+		this.cfg.fireQueue();
 
-	for (var p=0;p<pageCount;++p) {
-		var page = this.pages[p];
-		if (page[fnName]) {
-			var fn = page[fnName];
-			fn.call(page, args);
+		// OPERA HACK FOR MISWRAPPED FLOATS
+		if (YAHOO.env.ua.opera){
+			this.renderEvent.subscribe(this._fixWidth, this, true);
+			this.showEvent.subscribe(this._fixWidth, this, true);
 		}
-	}	
-};
 
-/**
-* Constructs a child calendar. This method can be overridden if a subclassed version of the default
-* calendar is to be used.
-* @method constructChild
-* @param {String}	id			The id of the table element that will represent the calendar widget
-* @param {String}	containerId	The id of the container div element that will wrap the calendar table
-* @param {Object}	config		The configuration object containing the Calendar's arguments
-* @return {YAHOO.widget.Calendar}	The YAHOO.widget.Calendar instance that is constructed
-*/
-YAHOO.widget.CalendarGroup.prototype.constructChild = function(id,containerId,config) {
-	var container = document.getElementById(containerId);
-	if (! container) {
-		container = document.createElement("div");
-		container.id = containerId;
-		this.oDomContainer.appendChild(container);
-	}
-	return new YAHOO.widget.Calendar(id,containerId,config);
-};
+	},
 
+	setupConfig : function() {
 
-/**
-* Sets the calendar group's month explicitly. This month will be set into the first
-* page of the multi-page calendar, and all other months will be iterated appropriately.
-* @method setMonth
-* @param {Number}	month		The numeric month, from 0 (January) to 11 (December)
-*/
-YAHOO.widget.CalendarGroup.prototype.setMonth = function(month) {
-	month = parseInt(month, 10);
-	var currYear;
+		var defCfg = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG;
+
+		/**
+		* The number of pages to include in the CalendarGroup. This value can only be set once, in the CalendarGroup's constructor arguments.
+		* @config pages
+		* @type Number
+		* @default 2
+		*/
+		this.cfg.addProperty(defCfg.PAGES.key, { value:defCfg.PAGES.value, validator:this.cfg.checkNumber, handler:this.configPages } );
+
+		/**
+		* The month/year representing the current visible Calendar date (mm/yyyy)
+		* @config pagedate
+		* @type String
+		* @default today's date
+		*/
+		this.cfg.addProperty(defCfg.PAGEDATE.key, { value:new Date(), handler:this.configPageDate } );
+
+		/**
+		* The date or range of dates representing the current Calendar selection
+		* @config selected
+		* @type String
+		* @default []
+		*/
+		this.cfg.addProperty(defCfg.SELECTED.key, { value:[], handler:this.configSelected } );
+
+		/**
+		* The title to display above the CalendarGroup's month header
+		* @config title
+		* @type String
+		* @default ""
+		*/
+		this.cfg.addProperty(defCfg.TITLE.key, { value:defCfg.TITLE.value, handler:this.configTitle } );
+
+		/**
+		* Whether or not a close button should be displayed for this CalendarGroup
+		* @config close
+		* @type Boolean
+		* @default false
+		*/
+		this.cfg.addProperty(defCfg.CLOSE.key, { value:defCfg.CLOSE.value, handler:this.configClose } );
+
+		/**
+		* Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below.
+		* This property is enabled by default for IE6 and below. It is disabled by default for other browsers for performance reasons, but can be 
+		* enabled if required.
+		* 
+		* @config iframe
+		* @type Boolean
+		* @default true for IE6 and below, false for all other browsers
+		*/
+		this.cfg.addProperty(defCfg.IFRAME.key, { value:defCfg.IFRAME.value, handler:this.configIframe, validator:this.cfg.checkBoolean } );
 	
-	var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
+		/**
+		* The minimum selectable date in the current Calendar (mm/dd/yyyy)
+		* @config mindate
+		* @type String
+		* @default null
+		*/
+		this.cfg.addProperty(defCfg.MINDATE.key, { value:defCfg.MINDATE.value, handler:this.delegateConfig } );
 	
-	for (var p=0; p<this.pages.length; ++p) {
-		var cal = this.pages[p];
-		var pageDate = cal.cfg.getProperty(cfgPageDate);
-		if (p === 0) {
-			currYear = pageDate.getFullYear();
-		} else {
-			pageDate.setYear(currYear);
-		}
-		this._setMonthOnDate(pageDate, month+p); 
-		cal.cfg.setProperty(cfgPageDate, pageDate);
-	}
-};
+		/**
+		* The maximum selectable date in the current Calendar (mm/dd/yyyy)
+		* @config maxdate
+		* @type String
+		* @default null
+		*/	
+		this.cfg.addProperty(defCfg.MAXDATE.key, { value:defCfg.MAXDATE.value, handler:this.delegateConfig  } );
+	
+		// Options properties
+	
+		/**
+		* True if the Calendar should allow multiple selections. False by default.
+		* @config MULTI_SELECT
+		* @type Boolean
+		* @default false
+		*/
+		this.cfg.addProperty(defCfg.MULTI_SELECT.key,	{ value:defCfg.MULTI_SELECT.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+	
+		/**
+		* The weekday the week begins on. Default is 0 (Sunday).
+		* @config START_WEEKDAY
+		* @type number
+		* @default 0
+		*/	
+		this.cfg.addProperty(defCfg.START_WEEKDAY.key,	{ value:defCfg.START_WEEKDAY.value, handler:this.delegateConfig, validator:this.cfg.checkNumber  } );
+		
+		/**
+		* True if the Calendar should show weekday labels. True by default.
+		* @config SHOW_WEEKDAYS
+		* @type Boolean
+		* @default true
+		*/	
+		this.cfg.addProperty(defCfg.SHOW_WEEKDAYS.key,	{ value:defCfg.SHOW_WEEKDAYS.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+		
+		/**
+		* True if the Calendar should show week row headers. False by default.
+		* @config SHOW_WEEK_HEADER
+		* @type Boolean
+		* @default false
+		*/	
+		this.cfg.addProperty(defCfg.SHOW_WEEK_HEADER.key,{ value:defCfg.SHOW_WEEK_HEADER.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+		
+		/**
+		* True if the Calendar should show week row footers. False by default.
+		* @config SHOW_WEEK_FOOTER
+		* @type Boolean
+		* @default false
+		*/
+		this.cfg.addProperty(defCfg.SHOW_WEEK_FOOTER.key,{ value:defCfg.SHOW_WEEK_FOOTER.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+		
+		/**
+		* True if the Calendar should suppress weeks that are not a part of the current month. False by default.
+		* @config HIDE_BLANK_WEEKS
+		* @type Boolean
+		* @default false
+		*/		
+		this.cfg.addProperty(defCfg.HIDE_BLANK_WEEKS.key,{ value:defCfg.HIDE_BLANK_WEEKS.value, handler:this.delegateConfig, validator:this.cfg.checkBoolean } );
+		
+		/**
+		* The image that should be used for the left navigation arrow.
+		* @config NAV_ARROW_LEFT
+		* @type String
+		* @deprecated	You can customize the image by overriding the default CSS class for the left arrow - "calnavleft"
+		* @default null
+		*/		
+		this.cfg.addProperty(defCfg.NAV_ARROW_LEFT.key,	{ value:defCfg.NAV_ARROW_LEFT.value, handler:this.delegateConfig } );
+		
+		/**
+		* The image that should be used for the right navigation arrow.
+		* @config NAV_ARROW_RIGHT
+		* @type String
+		* @deprecated	You can customize the image by overriding the default CSS class for the right arrow - "calnavright"
+		* @default null
+		*/		
+		this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key,	{ value:defCfg.NAV_ARROW_RIGHT.value, handler:this.delegateConfig } );
+	
+		// Locale properties
+		
+		/**
+		* The short month labels for the current locale.
+		* @config MONTHS_SHORT
+		* @type String[]
+		* @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
+		*/
+		this.cfg.addProperty(defCfg.MONTHS_SHORT.key,	{ value:defCfg.MONTHS_SHORT.value, handler:this.delegateConfig } );
+		
+		/**
+		* The long month labels for the current locale.
+		* @config MONTHS_LONG
+		* @type String[]
+		* @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
+		*/		
+		this.cfg.addProperty(defCfg.MONTHS_LONG.key,		{ value:defCfg.MONTHS_LONG.value, handler:this.delegateConfig } );
+		
+		/**
+		* The 1-character weekday labels for the current locale.
+		* @config WEEKDAYS_1CHAR
+		* @type String[]
+		* @default ["S", "M", "T", "W", "T", "F", "S"]
+		*/		
+		this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key,	{ value:defCfg.WEEKDAYS_1CHAR.value, handler:this.delegateConfig } );
+		
+		/**
+		* The short weekday labels for the current locale.
+		* @config WEEKDAYS_SHORT
+		* @type String[]
+		* @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
+		*/		
+		this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key,	{ value:defCfg.WEEKDAYS_SHORT.value, handler:this.delegateConfig } );
+		
+		/**
+		* The medium weekday labels for the current locale.
+		* @config WEEKDAYS_MEDIUM
+		* @type String[]
+		* @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
+		*/		
+		this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key,	{ value:defCfg.WEEKDAYS_MEDIUM.value, handler:this.delegateConfig } );
+		
+		/**
+		* The long weekday labels for the current locale.
+		* @config WEEKDAYS_LONG
+		* @type String[]
+		* @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
+		*/		
+		this.cfg.addProperty(defCfg.WEEKDAYS_LONG.key,	{ value:defCfg.WEEKDAYS_LONG.value, handler:this.delegateConfig } );
+	
+		/**
+		* The setting that determines which length of month labels should be used. Possible values are "short" and "long".
+		* @config LOCALE_MONTHS
+		* @type String
+		* @default "long"
+		*/
+		this.cfg.addProperty(defCfg.LOCALE_MONTHS.key,	{ value:defCfg.LOCALE_MONTHS.value, handler:this.delegateConfig } );
+	
+		/**
+		* The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long".
+		* @config LOCALE_WEEKDAYS
+		* @type String
+		* @default "short"
+		*/	
+		this.cfg.addProperty(defCfg.LOCALE_WEEKDAYS.key,	{ value:defCfg.LOCALE_WEEKDAYS.value, handler:this.delegateConfig } );
+	
+		/**
+		* The value used to delimit individual dates in a date string passed to various Calendar functions.
+		* @config DATE_DELIMITER
+		* @type String
+		* @default ","
+		*/
+		this.cfg.addProperty(defCfg.DATE_DELIMITER.key,		{ value:defCfg.DATE_DELIMITER.value, handler:this.delegateConfig } );
+	
+		/**
+		* The value used to delimit date fields in a date string passed to various Calendar functions.
+		* @config DATE_FIELD_DELIMITER
+		* @type String
+		* @default "/"
+		*/	
+		this.cfg.addProperty(defCfg.DATE_FIELD_DELIMITER.key,{ value:defCfg.DATE_FIELD_DELIMITER.value, handler:this.delegateConfig } );
+	
+		/**
+		* The value used to delimit date ranges in a date string passed to various Calendar functions.
+		* @config DATE_RANGE_DELIMITER
+		* @type String
+		* @default "-"
+		*/
+		this.cfg.addProperty(defCfg.DATE_RANGE_DELIMITER.key,{ value:defCfg.DATE_RANGE_DELIMITER.value, handler:this.delegateConfig } );
+	
+		/**
+		* The position of the month in a month/year date string
+		* @config MY_MONTH_POSITION
+		* @type Number
+		* @default 1
+		*/
+		this.cfg.addProperty(defCfg.MY_MONTH_POSITION.key,	{ value:defCfg.MY_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+		
+		/**
+		* The position of the year in a month/year date string
+		* @config MY_YEAR_POSITION
+		* @type Number
+		* @default 2
+		*/	
+		this.cfg.addProperty(defCfg.MY_YEAR_POSITION.key,	{ value:defCfg.MY_YEAR_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+		
+		/**
+		* The position of the month in a month/day date string
+		* @config MD_MONTH_POSITION
+		* @type Number
+		* @default 1
+		*/	
+		this.cfg.addProperty(defCfg.MD_MONTH_POSITION.key,	{ value:defCfg.MD_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+		
+		/**
+		* The position of the day in a month/year date string
+		* @config MD_DAY_POSITION
+		* @type Number
+		* @default 2
+		*/	
+		this.cfg.addProperty(defCfg.MD_DAY_POSITION.key,		{ value:defCfg.MD_DAY_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+		
+		/**
+		* The position of the month in a month/day/year date string
+		* @config MDY_MONTH_POSITION
+		* @type Number
+		* @default 1
+		*/	
+		this.cfg.addProperty(defCfg.MDY_MONTH_POSITION.key,	{ value:defCfg.MDY_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+		
+		/**
+		* The position of the day in a month/day/year date string
+		* @config MDY_DAY_POSITION
+		* @type Number
+		* @default 2
+		*/	
+		this.cfg.addProperty(defCfg.MDY_DAY_POSITION.key,	{ value:defCfg.MDY_DAY_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+		
+		/**
+		* The position of the year in a month/day/year date string
+		* @config MDY_YEAR_POSITION
+		* @type Number
+		* @default 3
+		*/	
+		this.cfg.addProperty(defCfg.MDY_YEAR_POSITION.key,	{ value:defCfg.MDY_YEAR_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	
+		/**
+		* The position of the month in the month year label string used as the Calendar header
+		* @config MY_LABEL_MONTH_POSITION
+		* @type Number
+		* @default 1
+		*/
+		this.cfg.addProperty(defCfg.MY_LABEL_MONTH_POSITION.key,	{ value:defCfg.MY_LABEL_MONTH_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+	
+		/**
+		* The position of the year in the month year label string used as the Calendar header
+		* @config MY_LABEL_YEAR_POSITION
+		* @type Number
+		* @default 2
+		*/
+		this.cfg.addProperty(defCfg.MY_LABEL_YEAR_POSITION.key,	{ value:defCfg.MY_LABEL_YEAR_POSITION.value, handler:this.delegateConfig, validator:this.cfg.checkNumber } );
+		
+		/**
+		* The suffix used after the month when rendering the Calendar header
+		* @config MY_LABEL_MONTH_SUFFIX
+		* @type String
+		* @default " "
+		*/
+		this.cfg.addProperty(defCfg.MY_LABEL_MONTH_SUFFIX.key,	{ value:defCfg.MY_LABEL_MONTH_SUFFIX.value, handler:this.delegateConfig } );
+		
+		/**
+		* The suffix used after the year when rendering the Calendar header
+		* @config MY_LABEL_YEAR_SUFFIX
+		* @type String
+		* @default ""
+		*/
+		this.cfg.addProperty(defCfg.MY_LABEL_YEAR_SUFFIX.key, { value:defCfg.MY_LABEL_YEAR_SUFFIX.value, handler:this.delegateConfig } );
 
-/**
-* Sets the calendar group's year explicitly. This year will be set into the first
-* page of the multi-page calendar, and all other months will be iterated appropriately.
-* @method setYear
-* @param {Number}	year		The numeric 4-digit year
-*/
-YAHOO.widget.CalendarGroup.prototype.setYear = function(year) {
+		/**
+		* Configuration for the Month Year Navigation UI. By default it is disabled
+		* @config NAV
+		* @type Object
+		* @default null
+		*/
+		this.cfg.addProperty(defCfg.NAV.key, { value:defCfg.NAV.value, handler:this.configNavigator } );
+	},
 
-	var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
+	/**
+	* Initializes CalendarGroup's built-in CustomEvents
+	* @method initEvents
+	*/
+	initEvents : function() {
+		var me = this;
+		var strEvent = "Event";
 
-	year = parseInt(year, 10);
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		var pageDate = cal.cfg.getProperty(cfgPageDate);
+		/**
+		* Proxy subscriber to subscribe to the CalendarGroup's child Calendars' CustomEvents
+		* @method sub
+		* @private
+		* @param {Function} fn	The function to subscribe to this CustomEvent
+		* @param {Object}	obj	The CustomEvent's scope object
+		* @param {Boolean}	bOverride	Whether or not to apply scope correction
+		*/
+		var sub = function(fn, obj, bOverride) {
+			for (var p=0;p<me.pages.length;++p) {
+				var cal = me.pages[p];
+				cal[this.type + strEvent].subscribe(fn, obj, bOverride);
+			}
+		};
 
-		if ((pageDate.getMonth()+1) == 1 && p>0) {
-			year+=1;
-		}
-		cal.setYear(year);
-	}
-};
-/**
-* Calls the render function of all child calendars within the group.
-* @method render
-*/
-YAHOO.widget.CalendarGroup.prototype.render = function() {
-	this.renderHeader();
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.render();
-	}
-	this.renderFooter();
-};
+		/**
+		* Proxy unsubscriber to unsubscribe from the CalendarGroup's child Calendars' CustomEvents
+		* @method unsub
+		* @private
+		* @param {Function} fn	The function to subscribe to this CustomEvent
+		* @param {Object}	obj	The CustomEvent's scope object
+		*/
+		var unsub = function(fn, obj) {
+			for (var p=0;p<me.pages.length;++p) {
+				var cal = me.pages[p];
+				cal[this.type + strEvent].unsubscribe(fn, obj);
+			}
+		};
+		
+		var defEvents = YAHOO.widget.Calendar._EVENT_TYPES;
+	
+		/**
+		* Fired before a selection is made
+		* @event beforeSelectEvent
+		*/
+		this.beforeSelectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SELECT);
+		this.beforeSelectEvent.subscribe = sub; this.beforeSelectEvent.unsubscribe = unsub;
+	
+		/**
+		* Fired when a selection is made
+		* @event selectEvent
+		* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
+		*/
+		this.selectEvent = new YAHOO.util.CustomEvent(defEvents.SELECT); 
+		this.selectEvent.subscribe = sub; this.selectEvent.unsubscribe = unsub;
+	
+		/**
+		* Fired before a selection is made
+		* @event beforeDeselectEvent
+		*/
+		this.beforeDeselectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_DESELECT); 
+		this.beforeDeselectEvent.subscribe = sub; this.beforeDeselectEvent.unsubscribe = unsub;
+	
+		/**
+		* Fired when a selection is made
+		* @event deselectEvent
+		* @param {Array}	Array of Date field arrays in the format [YYYY, MM, DD].
+		*/
+		this.deselectEvent = new YAHOO.util.CustomEvent(defEvents.DESELECT); 
+		this.deselectEvent.subscribe = sub; this.deselectEvent.unsubscribe = unsub;
+		
+		/**
+		* Fired when the Calendar page is changed
+		* @event changePageEvent
+		*/
+		this.changePageEvent = new YAHOO.util.CustomEvent(defEvents.CHANGE_PAGE); 
+		this.changePageEvent.subscribe = sub; this.changePageEvent.unsubscribe = unsub;
+	
+		/**
+		* Fired before the Calendar is rendered
+		* @event beforeRenderEvent
+		*/
+		this.beforeRenderEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER);
+		this.beforeRenderEvent.subscribe = sub; this.beforeRenderEvent.unsubscribe = unsub;
+	
+		/**
+		* Fired when the Calendar is rendered
+		* @event renderEvent
+		*/
+		this.renderEvent = new YAHOO.util.CustomEvent(defEvents.RENDER);
+		this.renderEvent.subscribe = sub; this.renderEvent.unsubscribe = unsub;
+	
+		/**
+		* Fired when the Calendar is reset
+		* @event resetEvent
+		*/
+		this.resetEvent = new YAHOO.util.CustomEvent(defEvents.RESET); 
+		this.resetEvent.subscribe = sub; this.resetEvent.unsubscribe = unsub;
+	
+		/**
+		* Fired when the Calendar is cleared
+		* @event clearEvent
+		*/
+		this.clearEvent = new YAHOO.util.CustomEvent(defEvents.CLEAR);
+		this.clearEvent.subscribe = sub; this.clearEvent.unsubscribe = unsub;
+	
+		/**
+		* Fired just before the CalendarGroup is to be shown
+		* @event beforeShowEvent
+		*/
+		this.beforeShowEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SHOW);
+	
+		/**
+		* Fired after the CalendarGroup is shown
+		* @event showEvent
+		*/
+		this.showEvent = new YAHOO.util.CustomEvent(defEvents.SHOW);
+	
+		/**
+		* Fired just before the CalendarGroup is to be hidden
+		* @event beforeHideEvent
+		*/
+		this.beforeHideEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_HIDE);
+	
+		/**
+		* Fired after the CalendarGroup is hidden
+		* @event hideEvent
+		*/
+		this.hideEvent = new YAHOO.util.CustomEvent(defEvents.HIDE);
 
-/**
-* Selects a date or a collection of dates on the current calendar. This method, by default,
-* does not call the render method explicitly. Once selection has completed, render must be 
-* called for the changes to be reflected visually.
-* @method select
-* @param	{String/Date/Date[]}	date	The date string of dates to select in the current calendar. Valid formats are
-*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
-*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
-*								This method can also take a JavaScript Date object or an array of Date objects.
-* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.CalendarGroup.prototype.select = function(date) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.select(date);
-	}
-	return this.getSelectedDates();
-};
+		/**
+		* Fired just before the CalendarNavigator is to be shown
+		* @event beforeShowNavEvent
+		*/
+		this.beforeShowNavEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SHOW_NAV);
+	
+		/**
+		* Fired after the CalendarNavigator is shown
+		* @event showNavEvent
+		*/
+		this.showNavEvent = new YAHOO.util.CustomEvent(defEvents.SHOW_NAV);
+	
+		/**
+		* Fired just before the CalendarNavigator is to be hidden
+		* @event beforeHideNavEvent
+		*/
+		this.beforeHideNavEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_HIDE_NAV);
+	
+		/**
+		* Fired after the CalendarNavigator is hidden
+		* @event hideNavEvent
+		*/
+		this.hideNavEvent = new YAHOO.util.CustomEvent(defEvents.HIDE_NAV);
 
-/**
-* Selects dates in the CalendarGroup based on the cell index provided. This method is used to select cells without having to do a full render. The selected style is applied to the cells directly.
-* The value of the MULTI_SELECT Configuration attribute will determine the set of dates which get selected. 
-* <ul>
-*    <li>If MULTI_SELECT is false, selectCell will select the cell at the specified index for only the last displayed Calendar page.</li>
-*    <li>If MULTI_SELECT is true, selectCell will select the cell at the specified index, on each displayed Calendar page.</li>
-* </ul>
-* @method selectCell
-* @param	{Number}	cellIndex	The index of the cell to be selected. 
-* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.CalendarGroup.prototype.selectCell = function(cellIndex) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.selectCell(cellIndex);
-	}
-	return this.getSelectedDates();
-};
+		/**
+		* Fired just before the CalendarNavigator is to be rendered
+		* @event beforeRenderNavEvent
+		*/
+		this.beforeRenderNavEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER_NAV);
 
-/**
-* Deselects a date or a collection of dates on the current calendar. This method, by default,
-* does not call the render method explicitly. Once deselection has completed, render must be 
-* called for the changes to be reflected visually.
-* @method deselect
-* @param	{String/Date/Date[]}	date	The date string of dates to deselect in the current calendar. Valid formats are
-*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
-*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
-*								This method can also take a JavaScript Date object or an array of Date objects.	
-* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.CalendarGroup.prototype.deselect = function(date) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.deselect(date);
-	}
-	return this.getSelectedDates();
-};
+		/**
+		* Fired after the CalendarNavigator is rendered
+		* @event renderNavEvent
+		*/
+		this.renderNavEvent = new YAHOO.util.CustomEvent(defEvents.RENDER_NAV);
+	},
+	
+	/**
+	* The default Config handler for the "pages" property
+	* @method configPages
+	* @param {String} type	The CustomEvent type (usually the property name)
+	* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+	* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+	*/
+	configPages : function(type, args, obj) {
+		var pageCount = args[0];
+	
+		var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
+	
+		// Define literals outside loop	
+		var sep = "_";
+		var groupCalClass = "groupcal";
+	
+		var firstClass = "first-of-type";
+		var lastClass = "last-of-type";
+	
+		for (var p=0;p<pageCount;++p) {
+			var calId = this.id + sep + p;
+			var calContainerId = this.containerId + sep + p;
+	
+			var childConfig = this.cfg.getConfig();
+			childConfig.close = false;
+			childConfig.title = false;
+			childConfig.navigator = null;
 
-/**
-* Deselects all dates on the current calendar.
-* @method deselectAll
-* @return {Date[]}		Array of JavaScript Date objects representing all individual dates that are currently selected.
-*						Assuming that this function executes properly, the return value should be an empty array.
-*						However, the empty array is returned for the sake of being able to check the selection status
-*						of the calendar.
-*/
-YAHOO.widget.CalendarGroup.prototype.deselectAll = function() {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.deselectAll();
-	}
-	return this.getSelectedDates();
-};
+			var cal = this.constructChild(calId, calContainerId, childConfig);
+			var caldate = cal.cfg.getProperty(cfgPageDate);
+			this._setMonthOnDate(caldate, caldate.getMonth() + p);
+			cal.cfg.setProperty(cfgPageDate, caldate);
+	
+			YAHOO.util.Dom.removeClass(cal.oDomContainer, this.Style.CSS_SINGLE);
+			YAHOO.util.Dom.addClass(cal.oDomContainer, groupCalClass);
 
-/**
-* Deselects dates in the CalendarGroup based on the cell index provided. This method is used to select cells without having to do a full render. The selected style is applied to the cells directly.
-* deselectCell will deselect the cell at the specified index on each displayed Calendar page.
-*
-* @method deselectCell
-* @param	{Number}	cellIndex	The index of the cell to deselect. 
-* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
-*/
-YAHOO.widget.CalendarGroup.prototype.deselectCell = function(cellIndex) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.deselectCell(cellIndex);
-	}
-	return this.getSelectedDates();
-};
+			if (p===0) {
+				YAHOO.util.Dom.addClass(cal.oDomContainer, firstClass);
+			}
+	
+			if (p==(pageCount-1)) {
+				YAHOO.util.Dom.addClass(cal.oDomContainer, lastClass);
+			}
+	
+			cal.parent = this;
+			cal.index = p; 
+	
+			this.pages[this.pages.length] = cal;
+		}
+	},
+	
+	/**
+	* The default Config handler for the "pagedate" property
+	* @method configPageDate
+	* @param {String} type	The CustomEvent type (usually the property name)
+	* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+	* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+	*/
+	configPageDate : function(type, args, obj) {
+		var val = args[0];
+		var firstPageDate;
+		
+		var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
+		
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			if (p === 0) {
+				firstPageDate = cal._parsePageDate(val);
+				cal.cfg.setProperty(cfgPageDate, firstPageDate);
+			} else {
+				var pageDate = new Date(firstPageDate);
+				this._setMonthOnDate(pageDate, pageDate.getMonth() + p);
+				cal.cfg.setProperty(cfgPageDate, pageDate);
+			}
+		}
+	},
+	
+	/**
+	* The default Config handler for the CalendarGroup "selected" property
+	* @method configSelected
+	* @param {String} type	The CustomEvent type (usually the property name)
+	* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+	* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+	*/
+	configSelected : function(type, args, obj) {
+		var cfgSelected = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key;
+		this.delegateConfig(type, args, obj);
+		var selected = (this.pages.length > 0) ? this.pages[0].cfg.getProperty(cfgSelected) : []; 
+		this.cfg.setProperty(cfgSelected, selected, true);
+	},
 
-/**
-* Resets the calendar widget to the originally selected month and year, and 
-* sets the calendar to the initial selection(s).
-* @method reset
-*/
-YAHOO.widget.CalendarGroup.prototype.reset = function() {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.reset();
-	}
-};
+	
+	/**
+	* Delegates a configuration property to the CustomEvents associated with the CalendarGroup's children
+	* @method delegateConfig
+	* @param {String} type	The CustomEvent type (usually the property name)
+	* @param {Object[]}	args	The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
+	* @param {Object} obj	The scope object. For configuration handlers, this will usually equal the owner.
+	*/
+	delegateConfig : function(type, args, obj) {
+		var val = args[0];
+		var cal;
+	
+		for (var p=0;p<this.pages.length;p++) {
+			cal = this.pages[p];
+			cal.cfg.setProperty(type, val);
+		}
+	},
 
-/**
-* Clears the selected dates in the current calendar widget and sets the calendar
-* to the current month and year.
-* @method clear
-*/
-YAHOO.widget.CalendarGroup.prototype.clear = function() {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.clear();
-	}
-};
+	/**
+	* Adds a function to all child Calendars within this CalendarGroup.
+	* @method setChildFunction
+	* @param {String}		fnName		The name of the function
+	* @param {Function}		fn			The function to apply to each Calendar page object
+	*/
+	setChildFunction : function(fnName, fn) {
+		var pageCount = this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);
+	
+		for (var p=0;p<pageCount;++p) {
+			this.pages[p][fnName] = fn;
+		}
+	},
 
-/**
-* Navigates to the next month page in the calendar widget.
-* @method nextMonth
-*/
-YAHOO.widget.CalendarGroup.prototype.nextMonth = function() {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.nextMonth();
-	}
-};
+	/**
+	* Calls a function within all child Calendars within this CalendarGroup.
+	* @method callChildFunction
+	* @param {String}		fnName		The name of the function
+	* @param {Array}		args		The arguments to pass to the function
+	*/
+	callChildFunction : function(fnName, args) {
+		var pageCount = this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);
+	
+		for (var p=0;p<pageCount;++p) {
+			var page = this.pages[p];
+			if (page[fnName]) {
+				var fn = page[fnName];
+				fn.call(page, args);
+			}
+		}	
+	},
 
-/**
-* Navigates to the previous month page in the calendar widget.
-* @method previousMonth
-*/
-YAHOO.widget.CalendarGroup.prototype.previousMonth = function() {
-	for (var p=this.pages.length-1;p>=0;--p) {
-		var cal = this.pages[p];
-		cal.previousMonth();
-	}
-};
+	/**
+	* Constructs a child calendar. This method can be overridden if a subclassed version of the default
+	* calendar is to be used.
+	* @method constructChild
+	* @param {String}	id			The id of the table element that will represent the calendar widget
+	* @param {String}	containerId	The id of the container div element that will wrap the calendar table
+	* @param {Object}	config		The configuration object containing the Calendar's arguments
+	* @return {YAHOO.widget.Calendar}	The YAHOO.widget.Calendar instance that is constructed
+	*/
+	constructChild : function(id,containerId,config) {
+		var container = document.getElementById(containerId);
+		if (! container) {
+			container = document.createElement("div");
+			container.id = containerId;
+			this.oDomContainer.appendChild(container);
+		}
+		return new YAHOO.widget.Calendar(id,containerId,config);
+	},
+	
+	/**
+	* Sets the calendar group's month explicitly. This month will be set into the first
+	* page of the multi-page calendar, and all other months will be iterated appropriately.
+	* @method setMonth
+	* @param {Number}	month		The numeric month, from 0 (January) to 11 (December)
+	*/
+	setMonth : function(month) {
+		month = parseInt(month, 10);
+		var currYear;
 
-/**
-* Navigates to the next year in the currently selected month in the calendar widget.
-* @method nextYear
-*/
-YAHOO.widget.CalendarGroup.prototype.nextYear = function() {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.nextYear();
-	}
-};
+		var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
 
-/**
-* Navigates to the previous year in the currently selected month in the calendar widget.
-* @method previousYear
-*/
-YAHOO.widget.CalendarGroup.prototype.previousYear = function() {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.previousYear();
-	}
-};
+		for (var p=0; p<this.pages.length; ++p) {
+			var cal = this.pages[p];
+			var pageDate = cal.cfg.getProperty(cfgPageDate);
+			if (p === 0) {
+				currYear = pageDate.getFullYear();
+			} else {
+				pageDate.setFullYear(currYear);
+			}
+			this._setMonthOnDate(pageDate, month+p); 
+			cal.cfg.setProperty(cfgPageDate, pageDate);
+		}
+	},
 
+	/**
+	* Sets the calendar group's year explicitly. This year will be set into the first
+	* page of the multi-page calendar, and all other months will be iterated appropriately.
+	* @method setYear
+	* @param {Number}	year		The numeric 4-digit year
+	*/
+	setYear : function(year) {
+	
+		var cfgPageDate = YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
+	
+		year = parseInt(year, 10);
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			var pageDate = cal.cfg.getProperty(cfgPageDate);
+	
+			if ((pageDate.getMonth()+1) == 1 && p>0) {
+				year+=1;
+			}
+			cal.setYear(year);
+		}
+	},
 
-/**
-* Gets the list of currently selected dates from the calendar.
-* @return			An array of currently selected JavaScript Date objects.
-* @type Date[]
-*/
-YAHOO.widget.CalendarGroup.prototype.getSelectedDates = function() { 
-	var returnDates = [];
-	var selected = this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key);
-	for (var d=0;d<selected.length;++d) {
-		var dateArray = selected[d];
+	/**
+	* Calls the render function of all child calendars within the group.
+	* @method render
+	*/
+	render : function() {
+		this.renderHeader();
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.render();
+		}
+		this.renderFooter();
+	},
 
-		var date = new Date(dateArray[0],dateArray[1]-1,dateArray[2]);
-		returnDates.push(date);
-	}
+	/**
+	* Selects a date or a collection of dates on the current calendar. This method, by default,
+	* does not call the render method explicitly. Once selection has completed, render must be 
+	* called for the changes to be reflected visually.
+	* @method select
+	* @param	{String/Date/Date[]}	date	The date string of dates to select in the current calendar. Valid formats are
+	*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
+	*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
+	*								This method can also take a JavaScript Date object or an array of Date objects.
+	* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*/
+	select : function(date) {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.select(date);
+		}
+		return this.getSelectedDates();
+	},
 
-	returnDates.sort( function(a,b) { return a-b; } );
-	return returnDates;
-};
+	/**
+	* Selects dates in the CalendarGroup based on the cell index provided. This method is used to select cells without having to do a full render. The selected style is applied to the cells directly.
+	* The value of the MULTI_SELECT Configuration attribute will determine the set of dates which get selected. 
+	* <ul>
+	*    <li>If MULTI_SELECT is false, selectCell will select the cell at the specified index for only the last displayed Calendar page.</li>
+	*    <li>If MULTI_SELECT is true, selectCell will select the cell at the specified index, on each displayed Calendar page.</li>
+	* </ul>
+	* @method selectCell
+	* @param	{Number}	cellIndex	The index of the cell to be selected. 
+	* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*/
+	selectCell : function(cellIndex) {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.selectCell(cellIndex);
+		}
+		return this.getSelectedDates();
+	},
+	
+	/**
+	* Deselects a date or a collection of dates on the current calendar. This method, by default,
+	* does not call the render method explicitly. Once deselection has completed, render must be 
+	* called for the changes to be reflected visually.
+	* @method deselect
+	* @param	{String/Date/Date[]}	date	The date string of dates to deselect in the current calendar. Valid formats are
+	*								individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
+	*								Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
+	*								This method can also take a JavaScript Date object or an array of Date objects.	
+	* @return	{Date[]}			Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*/
+	deselect : function(date) {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.deselect(date);
+		}
+		return this.getSelectedDates();
+	},
+	
+	/**
+	* Deselects all dates on the current calendar.
+	* @method deselectAll
+	* @return {Date[]}		Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*						Assuming that this function executes properly, the return value should be an empty array.
+	*						However, the empty array is returned for the sake of being able to check the selection status
+	*						of the calendar.
+	*/
+	deselectAll : function() {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.deselectAll();
+		}
+		return this.getSelectedDates();
+	},
+	
+	/**
+	* Deselects dates in the CalendarGroup based on the cell index provided. This method is used to select cells without having to do a full render. The selected style is applied to the cells directly.
+	* deselectCell will deselect the cell at the specified index on each displayed Calendar page.
+	*
+	* @method deselectCell
+	* @param	{Number}	cellIndex	The index of the cell to deselect. 
+	* @return	{Date[]}	Array of JavaScript Date objects representing all individual dates that are currently selected.
+	*/
+	deselectCell : function(cellIndex) {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.deselectCell(cellIndex);
+		}
+		return this.getSelectedDates();
+	},
+	
+	/**
+	* Resets the calendar widget to the originally selected month and year, and 
+	* sets the calendar to the initial selection(s).
+	* @method reset
+	*/
+	reset : function() {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.reset();
+		}
+	},
+	
+	/**
+	* Clears the selected dates in the current calendar widget and sets the calendar
+	* to the current month and year.
+	* @method clear
+	*/
+	clear : function() {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.clear();
+		}
+	},
+	
+	/**
+	* Navigates to the next month page in the calendar widget.
+	* @method nextMonth
+	*/
+	nextMonth : function() {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.nextMonth();
+		}
+	},
+	
+	/**
+	* Navigates to the previous month page in the calendar widget.
+	* @method previousMonth
+	*/
+	previousMonth : function() {
+		for (var p=this.pages.length-1;p>=0;--p) {
+			var cal = this.pages[p];
+			cal.previousMonth();
+		}
+	},
+	
+	/**
+	* Navigates to the next year in the currently selected month in the calendar widget.
+	* @method nextYear
+	*/
+	nextYear : function() {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.nextYear();
+		}
+	},
 
-/**
-* Adds a renderer to the render stack. The function reference passed to this method will be executed
-* when a date cell matches the conditions specified in the date string for this renderer.
-* @method addRenderer
-* @param	{String}	sDates		A date string to associate with the specified renderer. Valid formats
-*									include date (12/24/2005), month/day (12/24), and range (12/1/2004-1/1/2005)
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.CalendarGroup.prototype.addRenderer = function(sDates, fnRender) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.addRenderer(sDates, fnRender);
-	}
-};
+	/**
+	* Navigates to the previous year in the currently selected month in the calendar widget.
+	* @method previousYear
+	*/
+	previousYear : function() {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.previousYear();
+		}
+	},
 
-/**
-* Adds a month to the render stack. The function reference passed to this method will be executed
-* when a date cell matches the month passed to this method.
-* @method addMonthRenderer
-* @param	{Number}	month		The month (1-12) to associate with this renderer
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.CalendarGroup.prototype.addMonthRenderer = function(month, fnRender) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.addMonthRenderer(month, fnRender);
-	}
-};
+	/**
+	* Gets the list of currently selected dates from the calendar.
+	* @return			An array of currently selected JavaScript Date objects.
+	* @type Date[]
+	*/
+	getSelectedDates : function() { 
+		var returnDates = [];
+		var selected = this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key);
+		for (var d=0;d<selected.length;++d) {
+			var dateArray = selected[d];
 
-/**
-* Adds a weekday to the render stack. The function reference passed to this method will be executed
-* when a date cell matches the weekday passed to this method.
-* @method addWeekdayRenderer
-* @param	{Number}	weekday		The weekday (1-7) to associate with this renderer. 1=Sunday, 2=Monday etc.
-* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
-*/
-YAHOO.widget.CalendarGroup.prototype.addWeekdayRenderer = function(weekday, fnRender) {
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		cal.addWeekdayRenderer(weekday, fnRender);
-	}
-};
+			var date = YAHOO.widget.DateMath.getDate(dateArray[0],dateArray[1]-1,dateArray[2]);
+			returnDates.push(date);
+		}
 
-/**
-* Renders the header for the CalendarGroup.
-* @method renderHeader
-*/
-YAHOO.widget.CalendarGroup.prototype.renderHeader = function() {};
+		returnDates.sort( function(a,b) { return a-b; } );
+		return returnDates;
+	},
 
-/**
-* Renders a footer for the 2-up calendar container. By default, this method is
-* unimplemented.
-* @method renderFooter
-*/
-YAHOO.widget.CalendarGroup.prototype.renderFooter = function() {};
+	/**
+	* Adds a renderer to the render stack. The function reference passed to this method will be executed
+	* when a date cell matches the conditions specified in the date string for this renderer.
+	* @method addRenderer
+	* @param	{String}	sDates		A date string to associate with the specified renderer. Valid formats
+	*									include date (12/24/2005), month/day (12/24), and range (12/1/2004-1/1/2005)
+	* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
+	*/
+	addRenderer : function(sDates, fnRender) {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.addRenderer(sDates, fnRender);
+		}
+	},
 
-/**
-* Adds the designated number of months to the current calendar month, and sets the current
-* calendar page date to the new month.
-* @method addMonths
-* @param {Number}	count	The number of months to add to the current calendar
-*/
-YAHOO.widget.CalendarGroup.prototype.addMonths = function(count) {
-	this.callChildFunction("addMonths", count);
-};
+	/**
+	* Adds a month to the render stack. The function reference passed to this method will be executed
+	* when a date cell matches the month passed to this method.
+	* @method addMonthRenderer
+	* @param	{Number}	month		The month (1-12) to associate with this renderer
+	* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
+	*/
+	addMonthRenderer : function(month, fnRender) {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.addMonthRenderer(month, fnRender);
+		}
+	},
 
+	/**
+	* Adds a weekday to the render stack. The function reference passed to this method will be executed
+	* when a date cell matches the weekday passed to this method.
+	* @method addWeekdayRenderer
+	* @param	{Number}	weekday		The weekday (1-7) to associate with this renderer. 1=Sunday, 2=Monday etc.
+	* @param	{Function}	fnRender	The function executed to render cells that match the render rules for this renderer.
+	*/
+	addWeekdayRenderer : function(weekday, fnRender) {
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			cal.addWeekdayRenderer(weekday, fnRender);
+		}
+	},
 
-/**
-* Subtracts the designated number of months from the current calendar month, and sets the current
-* calendar page date to the new month.
-* @method subtractMonths
-* @param {Number}	count	The number of months to subtract from the current calendar
-*/
-YAHOO.widget.CalendarGroup.prototype.subtractMonths = function(count) {
-	this.callChildFunction("subtractMonths", count);
-};
+	/**
+	 * Removes all custom renderers added to the CalendarGroup through the addRenderer, addMonthRenderer and 
+	 * addWeekRenderer methods. CalendarGroup's render method needs to be called to after removing renderers 
+	 * to see the changes applied.
+	 * 
+	 * @method removeRenderers
+	 */
+	removeRenderers : function() {
+		this.callChildFunction("removeRenderers");
+	},
 
-/**
-* Adds the designated number of years to the current calendar, and sets the current
-* calendar page date to the new month.
-* @method addYears
-* @param {Number}	count	The number of years to add to the current calendar
-*/
-YAHOO.widget.CalendarGroup.prototype.addYears = function(count) {
-	this.callChildFunction("addYears", count);
-};
+	/**
+	* Renders the header for the CalendarGroup.
+	* @method renderHeader
+	*/
+	renderHeader : function() {
+		// EMPTY DEFAULT IMPL
+	},
 
-/**
-* Subtcats the designated number of years from the current calendar, and sets the current
-* calendar page date to the new month.
-* @method subtractYears
-* @param {Number}	count	The number of years to subtract from the current calendar
-*/
-YAHOO.widget.CalendarGroup.prototype.subtractYears = function(count) {
-	this.callChildFunction("subtractYears", count);
-};
+	/**
+	* Renders a footer for the 2-up calendar container. By default, this method is
+	* unimplemented.
+	* @method renderFooter
+	*/
+	renderFooter : function() {
+		// EMPTY DEFAULT IMPL
+	},
 
-/**
-* Shows the CalendarGroup's outer container.
-* @method show
-*/
-YAHOO.widget.CalendarGroup.prototype.show = function() {
-	this.oDomContainer.style.display = "block";
-	if (YAHOO.env.ua.opera) {
-		this._fixWidth();
-	}
-};
+	/**
+	* Adds the designated number of months to the current calendar month, and sets the current
+	* calendar page date to the new month.
+	* @method addMonths
+	* @param {Number}	count	The number of months to add to the current calendar
+	*/
+	addMonths : function(count) {
+		this.callChildFunction("addMonths", count);
+	},
+	
+	/**
+	* Subtracts the designated number of months from the current calendar month, and sets the current
+	* calendar page date to the new month.
+	* @method subtractMonths
+	* @param {Number}	count	The number of months to subtract from the current calendar
+	*/
+	subtractMonths : function(count) {
+		this.callChildFunction("subtractMonths", count);
+	},
 
-/**
-* Sets the month on a Date object, taking into account year rollover if the month is less than 0 or greater than 11.
-* The Date object passed in is modified. It should be cloned before passing it into this method if the original value needs to be maintained
-* @method	_setMonthOnDate
-* @private
-* @param	{Date}	date	The Date object on which to set the month index
-* @param	{Number}	iMonth	The month index to set
-*/
-YAHOO.widget.CalendarGroup.prototype._setMonthOnDate = function(date, iMonth) {
-	// Bug in Safari 1.3, 2.0 (WebKit build < 420), Date.setMonth does not work consistently if iMonth is not 0-11
-	if (YAHOO.env.ua.webkit && YAHOO.env.ua.webkit < 420 && (iMonth < 0 || iMonth > 11)) {
-		var DM = YAHOO.widget.DateMath;
-		var newDate = DM.add(date, DM.MONTH, iMonth-date.getMonth());
-		date.setTime(newDate.getTime());
-	} else {
-		date.setMonth(iMonth);
-	}
-};
+	/**
+	* Adds the designated number of years to the current calendar, and sets the current
+	* calendar page date to the new month.
+	* @method addYears
+	* @param {Number}	count	The number of years to add to the current calendar
+	*/
+	addYears : function(count) {
+		this.callChildFunction("addYears", count);
+	},
 
-/**
- * Fixes the width of the CalendarGroup container element, to account for miswrapped floats
- * @method _fixWidth
- * @private
- */
-YAHOO.widget.CalendarGroup.prototype._fixWidth = function() {
-	var startW = this.oDomContainer.offsetWidth;
-	var w = 0;
-	for (var p=0;p<this.pages.length;++p) {
-		var cal = this.pages[p];
-		w += cal.oDomContainer.offsetWidth;
+	/**
+	* Subtcats the designated number of years from the current calendar, and sets the current
+	* calendar page date to the new month.
+	* @method subtractYears
+	* @param {Number}	count	The number of years to subtract from the current calendar
+	*/
+	subtractYears : function(count) {
+		this.callChildFunction("subtractYears", count);
+	},
+
+	/**
+	 * Returns the Calendar page instance which has a pagedate (month/year) matching the given date. 
+	 * Returns null if no match is found.
+	 * 
+	 * @method getCalendarPage
+	 * @param {Date} date The JavaScript Date object for which a Calendar page is to be found.
+	 * @return {Calendar} The Calendar page instance representing the month to which the date 
+	 * belongs.
+	 */
+	getCalendarPage : function(date) {
+		var cal = null;
+		if (date) {
+			var y = date.getFullYear(),
+				m = date.getMonth();
+
+			var pages = this.pages;
+			for (var i = 0; i < pages.length; ++i) {
+				var pageDate = pages[i].cfg.getProperty("pagedate");
+				if (pageDate.getFullYear() === y && pageDate.getMonth() === m) {
+					cal = pages[i];
+					break;
+				}
+			}
+		}
+		return cal;
+	},
+
+	/**
+	* Sets the month on a Date object, taking into account year rollover if the month is less than 0 or greater than 11.
+	* The Date object passed in is modified. It should be cloned before passing it into this method if the original value needs to be maintained
+	* @method	_setMonthOnDate
+	* @private
+	* @param	{Date}	date	The Date object on which to set the month index
+	* @param	{Number}	iMonth	The month index to set
+	*/
+	_setMonthOnDate : function(date, iMonth) {
+		// Bug in Safari 1.3, 2.0 (WebKit build < 420), Date.setMonth does not work consistently if iMonth is not 0-11
+		if (YAHOO.env.ua.webkit && YAHOO.env.ua.webkit < 420 && (iMonth < 0 || iMonth > 11)) {
+			var DM = YAHOO.widget.DateMath;
+			var newDate = DM.add(date, DM.MONTH, iMonth-date.getMonth());
+			date.setTime(newDate.getTime());
+		} else {
+			date.setMonth(iMonth);
+		}
+	},
+	
+	/**
+	 * Fixes the width of the CalendarGroup container element, to account for miswrapped floats
+	 * @method _fixWidth
+	 * @private
+	 */
+	_fixWidth : function() {
+		var w = 0;
+		for (var p=0;p<this.pages.length;++p) {
+			var cal = this.pages[p];
+			w += cal.oDomContainer.offsetWidth;
+		}
+		if (w > 0) {
+			this.oDomContainer.style.width = w + "px";
+		}
+	},
+	
+	/**
+	* Returns a string representation of the object.
+	* @method toString
+	* @return {String}	A string representation of the CalendarGroup object.
+	*/
+	toString : function() {
+		return "CalendarGroup " + this.id;
 	}
-	if (w > 0) {
-		this.oDomContainer.style.width = w + "px";
-	}
 };
 
-
 /**
 * CSS class representing the container for the calendar
 * @property YAHOO.widget.CalendarGroup.CSS_CONTAINER
@@ -4982,11 +5479,15 @@
 																 "configTitle",
 																 "configClose",
 																 "configIframe",
+																 "configNavigator",
 																 "createTitleBar",
 																 "createCloseButton",
 																 "removeTitleBar",
 																 "removeCloseButton",
 																 "hide",
+																 "show",
+																 "toDate",
+																 "_parseArgs",
 																 "browser");
 
 /**
@@ -5000,15 +5501,6 @@
 YAHOO.widget.CalendarGroup._DEFAULT_CONFIG = YAHOO.widget.Calendar._DEFAULT_CONFIG;
 YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES = {key:"pages", value:2};
 
-/**
-* Returns a string representation of the object.
-* @method toString
-* @return {String}	A string representation of the CalendarGroup object.
-*/
-YAHOO.widget.CalendarGroup.prototype.toString = function() {
-	return "CalendarGroup " + this.id;
-};
-
 YAHOO.widget.CalGrp = YAHOO.widget.CalendarGroup;
 
 /**
@@ -5027,4 +5519,1241 @@
 */
 YAHOO.widget.Cal2up = YAHOO.widget.Calendar2up;
 
-YAHOO.register("calendar", YAHOO.widget.Calendar, {version: "2.3.1", build: "541"});
+/**
+ * The CalendarNavigator is used along with a Calendar/CalendarGroup to 
+ * provide a Month/Year popup navigation control, allowing the user to navigate 
+ * to a specific month/year in the Calendar/CalendarGroup without having to 
+ * scroll through months sequentially
+ *
+ * @namespace YAHOO.widget
+ * @class CalendarNavigator
+ * @constructor
+ * @param {Calendar|CalendarGroup} cal The instance of the Calendar or CalendarGroup to which this CalendarNavigator should be attached.
+ */
+YAHOO.widget.CalendarNavigator = function(cal) {
+	this.init(cal);
+};
+
+(function() {
+	// Setup static properties (inside anon fn, so that we can use shortcuts)
+	var CN = YAHOO.widget.CalendarNavigator;
+
+	/**
+	 * YAHOO.widget.CalendarNavigator.CLASSES contains constants
+	 * for the class values applied to the CalendarNaviatgator's 
+	 * DOM elements
+	 * @property YAHOO.widget.CalendarNavigator.CLASSES
+	 * @type Object
+	 * @static
+	 */
+	CN.CLASSES = {
+		/**
+		 * Class applied to the Calendar Navigator's bounding box
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.NAV
+		 * @type String
+		 * @static
+		 */
+		NAV :"yui-cal-nav",
+		/**
+		 * Class applied to the Calendar/CalendarGroup's bounding box to indicate
+		 * the Navigator is currently visible
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.NAV_VISIBLE
+		 * @type String
+		 * @static
+		 */
+		NAV_VISIBLE: "yui-cal-nav-visible",
+		/**
+		 * Class applied to the Navigator mask's bounding box
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.MASK
+		 * @type String
+		 * @static
+		 */
+		MASK : "yui-cal-nav-mask",
+		/**
+		 * Class applied to the year label/control bounding box
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.YEAR
+		 * @type String
+		 * @static
+		 */
+		YEAR : "yui-cal-nav-y",
+		/**
+		 * Class applied to the month label/control bounding box
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.MONTH
+		 * @type String
+		 * @static
+		 */
+		MONTH : "yui-cal-nav-m",
+		/**
+		 * Class applied to the submit/cancel button's bounding box
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.BUTTONS
+		 * @type String
+		 * @static
+		 */
+		BUTTONS : "yui-cal-nav-b",
+		/**
+		 * Class applied to buttons wrapping element
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.BUTTON
+		 * @type String
+		 * @static
+		 */
+		BUTTON : "yui-cal-nav-btn",
+		/**
+		 * Class applied to the validation error area's bounding box
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.ERROR
+		 * @type String
+		 * @static
+		 */
+		ERROR : "yui-cal-nav-e",
+		/**
+		 * Class applied to the year input control
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.YEAR_CTRL
+		 * @type String
+		 * @static
+		 */
+		YEAR_CTRL : "yui-cal-nav-yc",
+		/**
+		 * Class applied to the month input control
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.MONTH_CTRL
+		 * @type String
+		 * @static
+		 */
+		MONTH_CTRL : "yui-cal-nav-mc",
+		/**
+		 * Class applied to controls with invalid data (e.g. a year input field with invalid an year)
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.INVALID
+		 * @type String
+		 * @static
+		 */
+		INVALID : "yui-invalid",
+		/**
+		 * Class applied to default controls
+		 * @property YAHOO.widget.CalendarNavigator.CLASSES.DEFAULT
+		 * @type String
+		 * @static
+		 */
+		DEFAULT : "yui-default"
+	};
+
+	/**
+	 * Object literal containing the default configuration values for the CalendarNavigator
+	 * The configuration object is expected to follow the format below, with the properties being
+	 * case sensitive.
+	 * <dl>
+	 * <dt>strings</dt>
+	 * <dd><em>Object</em> :  An object with the properties shown below, defining the string labels to use in the Navigator's UI
+	 *     <dl>
+	 *         <dt>month</dt><dd><em>String</em> : The string to use for the month label. Defaults to "Month".</dd>
+	 *         <dt>year</dt><dd><em>String</em> : The string to use for the year label. Defaults to "Year".</dd>
+	 *         <dt>submit</dt><dd><em>String</em> : The string to use for the submit button label. Defaults to "Okay".</dd>
+	 *         <dt>cancel</dt><dd><em>String</em> : The string to use for the cancel button label. Defaults to "Cancel".</dd>
+	 *         <dt>invalidYear</dt><dd><em>String</em> : The string to use for invalid year values. Defaults to "Year needs to be a number".</dd>
+	 *     </dl>
+	 * </dd>
+	 * <dt>monthFormat</dt><dd><em>String</em> : The month format to use. Either YAHOO.widget.Calendar.LONG, or YAHOO.widget.Calendar.SHORT. Defaults to YAHOO.widget.Calendar.LONG</dd>
+	 * <dt>initialFocus</dt><dd><em>String</em> : Either "year" or "month" specifying which input control should get initial focus. Defaults to "year"</dd>
+	 * </dl>
+	 * @property _DEFAULT_CFG
+	 * @protected
+	 * @type Object
+	 * @static
+	 */
+	CN._DEFAULT_CFG = {
+		strings : {
+			month: "Month",
+			year: "Year",
+			submit: "Okay",
+			cancel: "Cancel",
+			invalidYear : "Year needs to be a number"
+		},
+		monthFormat: YAHOO.widget.Calendar.LONG,
+		initialFocus: "year"
+	};
+
+	/**
+	 * The suffix added to the Calendar/CalendarGroup's ID, to generate
+	 * a unique ID for the Navigator and it's bounding box.
+	 * @property YAHOO.widget.CalendarNavigator.ID_SUFFIX
+	 * @static
+	 * @type String
+	 * @final
+	 */
+	CN.ID_SUFFIX = "_nav";
+	/**
+	 * The suffix added to the Navigator's ID, to generate
+	 * a unique ID for the month control.
+	 * @property YAHOO.widget.CalendarNavigator.MONTH_SUFFIX
+	 * @static
+	 * @type String 
+	 * @final
+	 */
+	CN.MONTH_SUFFIX = "_month";
+	/**
+	 * The suffix added to the Navigator's ID, to generate
+	 * a unique ID for the year control.
+	 * @property YAHOO.widget.CalendarNavigator.YEAR_SUFFIX
+	 * @static
+	 * @type String
+	 * @final
+	 */
+	CN.YEAR_SUFFIX = "_year";
+	/**
+	 * The suffix added to the Navigator's ID, to generate
+	 * a unique ID for the error bounding box.
+	 * @property YAHOO.widget.CalendarNavigator.ERROR_SUFFIX
+	 * @static
+	 * @type String
+	 * @final
+	 */
+	CN.ERROR_SUFFIX = "_error";
+	/**
+	 * The suffix added to the Navigator's ID, to generate
+	 * a unique ID for the "Cancel" button.
+	 * @property YAHOO.widget.CalendarNavigator.CANCEL_SUFFIX
+	 * @static
+	 * @type String
+	 * @final
+	 */
+	CN.CANCEL_SUFFIX = "_cancel";
+	/**
+	 * The suffix added to the Navigator's ID, to generate
+	 * a unique ID for the "Submit" button.
+	 * @property YAHOO.widget.CalendarNavigator.SUBMIT_SUFFIX
+	 * @static
+	 * @type String
+	 * @final
+	 */
+	CN.SUBMIT_SUFFIX = "_submit";
+
+	/**
+	 * The number of digits to which the year input control is to be limited.
+	 * @property YAHOO.widget.CalendarNavigator.YR_MAX_DIGITS
+	 * @static
+	 * @type Number
+	 */
+	CN.YR_MAX_DIGITS = 4;
+
+	/**
+	 * The amount by which to increment the current year value,
+	 * when the arrow up/down key is pressed on the year control
+	 * @property YAHOO.widget.CalendarNavigator.YR_MINOR_INC
+	 * @static
+	 * @type Number
+	 */
+	CN.YR_MINOR_INC = 1;
+
+	/**
+	 * The amount by which to increment the current year value,
+	 * when the page up/down key is pressed on the year control
+	 * @property YAHOO.widget.CalendarNavigator.YR_MAJOR_INC
+	 * @static
+	 * @type Number
+	 */
+	CN.YR_MAJOR_INC = 10;
+
+	/**
+	 * Artificial delay (in ms) between the time the Navigator is hidden
+	 * and the Calendar/CalendarGroup state is updated. Allows the user
+	 * the see the Calendar/CalendarGroup page changing. If set to 0
+	 * the Calendar/CalendarGroup page will be updated instantly
+	 * @property YAHOO.widget.CalendarNavigator.UPDATE_DELAY
+	 * @static
+	 * @type Number
+	 */
+	CN.UPDATE_DELAY = 50;
+
+	/**
+	 * Regular expression used to validate the year input
+	 * @property YAHOO.widget.CalendarNavigator.YR_PATTERN
+	 * @static
+	 * @type RegExp
+	 */
+	CN.YR_PATTERN = /^\d+$/;
+	/**
+	 * Regular expression used to trim strings
+	 * @property YAHOO.widget.CalendarNavigator.TRIM
+	 * @static
+	 * @type RegExp
+	 */
+	CN.TRIM = /^\s*(.*?)\s*$/;
+})();
+
+YAHOO.widget.CalendarNavigator.prototype = {
+
+	/**
+	 * The unique ID for this CalendarNavigator instance
+	 * @property id
+	 * @type String
+	 */
+	id : null,
+
+	/**
+	 * The Calendar/CalendarGroup instance to which the navigator belongs
+	 * @property cal
+	 * @type {Calendar|CalendarGroup}
+	 */
+	cal : null,
+
+	/**
+	 * Reference to the HTMLElement used to render the navigator's bounding box
+	 * @property navEl
+	 * @type HTMLElement
+	 */
+	navEl : null,
+
+	/**
+	 * Reference to the HTMLElement used to render the navigator's mask
+	 * @property maskEl
+	 * @type HTMLElement
+	 */
+	maskEl : null,
+
+	/**
+	 * Reference to the HTMLElement used to input the year
+	 * @property yearEl
+	 * @type HTMLElement
+	 */
+	yearEl : null,
+
+	/**
+	 * Reference to the HTMLElement used to input the month
+	 * @property monthEl
+	 * @type HTMLElement
+	 */
+	monthEl : null,
+
+	/**
+	 * Reference to the HTMLElement used to display validation errors
+	 * @property errorEl
+	 * @type HTMLElement
+	 */
+	errorEl : null,
+
+	/**
+	 * Reference to the HTMLElement used to update the Calendar/Calendar group
+	 * with the month/year values
+	 * @property submitEl
+	 * @type HTMLElement
+	 */
+	submitEl : null,
+	
+	/**
+	 * Reference to the HTMLElement used to hide the navigator without updating the 
+	 * Calendar/Calendar group
+	 * @property cancelEl
+	 * @type HTMLElement
+	 */
+	cancelEl : null,
+
+	/** 
+	 * Reference to the first focusable control in the navigator (by default monthEl)
+	 * @property firstCtrl
+	 * @type HTMLElement
+	 */
+	firstCtrl : null,
+	
+	/** 
+	 * Reference to the last focusable control in the navigator (by default cancelEl)
+	 * @property lastCtrl
+	 * @type HTMLElement
+	 */
+	lastCtrl : null,
+
+	/**
+	 * The document containing the Calendar/Calendar group instance
+	 * @protected
+	 * @property _doc
+	 * @type HTMLDocument
+	 */
+	_doc : null,
+
+	/**
+	 * Internal state property for the current year displayed in the navigator
+	 * @protected
+	 * @property _year
+	 * @type Number
+	 */
+	_year: null,
+	
+	/**
+	 * Internal state property for the current month index displayed in the navigator
+	 * @protected
+	 * @property _month
+	 * @type Number
+	 */
+	_month: 0,
+
+	/**
+	 * Private internal state property which indicates whether or not the 
+	 * Navigator has been rendered.
+	 * @private
+	 * @property __rendered
+	 * @type Boolean
+	 */
+	__rendered: false,
+
+	/**
+	 * Init lifecycle method called as part of construction
+	 * 
+	 * @method init
+	 * @param {Calendar} cal The instance of the Calendar or CalendarGroup to which this CalendarNavigator should be attached
+	 */
+	init : function(cal) {
+		var calBox = cal.oDomContainer;
+
+		this.cal = cal;
+		this.id = calBox.id + YAHOO.widget.CalendarNavigator.ID_SUFFIX;
+		this._doc = calBox.ownerDocument;
+
+		/**
+		 * Private flag, to identify IE6/IE7 Quirks
+		 * @private
+		 * @property __isIEQuirks
+		 */
+		var ie = YAHOO.env.ua.ie;
+		this.__isIEQuirks = (ie && ((ie <= 6) || (ie === 7 && this._doc.compatMode == "BackCompat")));
+	},
+
+	/**
+	 * Displays the navigator and mask, updating the input controls to reflect the 
+	 * currently set month and year. The show method will invoke the render method
+	 * if the navigator has not been renderered already, allowing for lazy rendering
+	 * of the control.
+	 * 
+	 * The show method will fire the Calendar/CalendarGroup's beforeShowNav and showNav events
+	 * 
+	 * @method show
+	 */
+	show : function() {
+		var CLASSES = YAHOO.widget.CalendarNavigator.CLASSES;
+
+		if (this.cal.beforeShowNavEvent.fire()) {
+			if (!this.__rendered) {
+				this.render();
+			}
+			this.clearErrors();
+
+			this._updateMonthUI();
+			this._updateYearUI();
+			this._show(this.navEl, true);
+
+			this.setInitialFocus();
+			this.showMask();
+
+			YAHOO.util.Dom.addClass(this.cal.oDomContainer, CLASSES.NAV_VISIBLE);
+			this.cal.showNavEvent.fire();
+		}
+	},
+
+	/**
+	 * Hides the navigator and mask
+	 * 
+	 * The show method will fire the Calendar/CalendarGroup's beforeHideNav event and hideNav events
+	 * @method hide
+	 */
+	hide : function() {
+		var CLASSES = YAHOO.widget.CalendarNavigator.CLASSES;
+
+		if (this.cal.beforeHideNavEvent.fire()) {
+			this._show(this.navEl, false);
+			this.hideMask();
+			YAHOO.util.Dom.removeClass(this.cal.oDomContainer, CLASSES.NAV_VISIBLE);
+			this.cal.hideNavEvent.fire();
+		}
+	},
+	
+
+	/**
+	 * Displays the navigator's mask element
+	 * 
+	 * @method showMask
+	 */
+	showMask : function() {
+		this._show(this.maskEl, true);
+		if (this.__isIEQuirks) {
+			this._syncMask();
+		}
+	},
+
+	/**
+	 * Hides the navigator's mask element
+	 * 
+	 * @method hideMask
+	 */
+	hideMask : function() {
+		this._show(this.maskEl, false);
+	},
+
+	/**
+	 * Returns the current month set on the navigator
+	 * 
+	 * Note: This may not be the month set in the UI, if 
+	 * the UI contains an invalid value.
+	 * 
+	 * @method getMonth
+	 * @return {Number} The Navigator's current month index
+	 */
+	getMonth: function() {
+		return this._month;
+	},
+
+	/**
+	 * Returns the current year set on the navigator
+	 * 
+	 * Note: This may not be the year set in the UI, if 
+	 * the UI contains an invalid value.
+	 * 
+	 * @method getYear
+	 * @return {Number} The Navigator's current year value
+	 */
+	getYear: function() {
+		return this._year;
+	},
+
+	/**
+	 * Sets the current month on the Navigator, and updates the UI
+	 * 
+	 * @method setMonth
+	 * @param {Number} nMonth The month index, from 0 (Jan) through 11 (Dec).
+	 */
+	setMonth : function(nMonth) {
+		if (nMonth >= 0 && nMonth < 12) {
+			this._month = nMonth;
+		}
+		this._updateMonthUI();
+	},
+
+	/**
+	 * Sets the current year on the Navigator, and updates the UI. If the 
+	 * provided year is invalid, it will not be set.
+	 * 
+	 * @method setYear
+	 * @param {Number} nYear The full year value to set the Navigator to.
+	 */
+	setYear : function(nYear) {
+		var yrPattern = YAHOO.widget.CalendarNavigator.YR_PATTERN;
+		if (YAHOO.lang.isNumber(nYear) && yrPattern.test(nYear+"")) {
+			this._year = nYear;
+		}
+		this._updateYearUI();
+	},
+
+	/**
+	 * Renders the HTML for the navigator, adding it to the 
+	 * document and attaches event listeners if it has not 
+	 * already been rendered.
+	 * 
+	 * @method render
+	 */
+	render: function() {
+		this.cal.beforeRenderNavEvent.fire();
+		if (!this.__rendered) {
+			this.createNav();
+			this.createMask();
+			this.applyListeners();
+			this.__rendered = true;
+		}
+		this.cal.renderNavEvent.fire();
+	},
+
+	/**
+	 * Creates the navigator's containing HTMLElement, it's contents, and appends 
+	 * the containg element to the Calendar/CalendarGroup's container.
+	 * 
+	 * @method createNav
+	 */
+	createNav : function() {
+		var NAV = YAHOO.widget.CalendarNavigator;
+		var doc = this._doc;
+
+		var d = doc.createElement("div");
+		d.className = NAV.CLASSES.NAV;
+
+		var htmlBuf = this.renderNavContents([]);
+
+		d.innerHTML = htmlBuf.join('');
+		this.cal.oDomContainer.appendChild(d);
+
+		this.navEl = d;
+
+		this.yearEl = doc.getElementById(this.id + NAV.YEAR_SUFFIX);
+		this.monthEl = doc.getElementById(this.id + NAV.MONTH_SUFFIX);
+		this.errorEl = doc.getElementById(this.id + NAV.ERROR_SUFFIX);
+		this.submitEl = doc.getElementById(this.id + NAV.SUBMIT_SUFFIX);
+		this.cancelEl = doc.getElementById(this.id + NAV.CANCEL_SUFFIX);
+
+		if (YAHOO.env.ua.gecko && this.yearEl && this.yearEl.type == "text") {
+			// Avoid XUL error on focus, select [ https://bugzilla.mozilla.org/show_bug.cgi?id=236791, 
+			// supposedly fixed in 1.8.1, but there are reports of it still being around for methods other than blur ]
+			this.yearEl.setAttribute("autocomplete", "off");
+		}
+
+		this._setFirstLastElements();
+	},
+
+	/**
+	 * Creates the Mask HTMLElement and appends it to the Calendar/CalendarGroups
+	 * container.
+	 * 
+	 * @method createMask
+	 */
+	createMask : function() {
+		var C = YAHOO.widget.CalendarNavigator.CLASSES;
+
+		var d = this._doc.createElement("div");
+		d.className = C.MASK;
+
+		this.cal.oDomContainer.appendChild(d);
+		this.maskEl = d;
+	},
+
+	/**
+	 * Used to set the width/height of the mask in pixels to match the Calendar Container.
+	 * Currently only used for IE6 and IE7 quirks mode. The other A-Grade browser are handled using CSS (width/height 100%).
+	 * <p>
+	 * The method is also registered as an HTMLElement resize listener on the Calendars container element.
+	 * </p>
+	 * @protected
+	 * @method _syncMask
+	 */
+	_syncMask : function() {
+		var c = this.cal.oDomContainer;
+		if (c && this.maskEl) {
+			var r = YAHOO.util.Dom.getRegion(c);
+			YAHOO.util.Dom.setStyle(this.maskEl, "width", r.right - r.left + "px");
+			YAHOO.util.Dom.setStyle(this.maskEl, "height", r.bottom - r.top + "px");
+		}
+	},
+
+	/**
+	 * Renders the contents of the navigator
+	 * 
+	 * @method renderNavContents
+	 * 
+	 * @param {Array} html The HTML buffer to append the HTML to.
+	 * @return {Array} A reference to the buffer passed in.
+	 */
+	renderNavContents : function(html) {
+		var NAV = YAHOO.widget.CalendarNavigator,
+			C = NAV.CLASSES,
+			h = html; // just to use a shorter name
+
+		h[h.length] = '<div class="' + C.MONTH + '">';
+		this.renderMonth(h);
+		h[h.length] = '</div>';
+		h[h.length] = '<div class="' + C.YEAR + '">';
+		this.renderYear(h);
+		h[h.length] = '</div>';
+		h[h.length] = '<div class="' + C.BUTTONS + '">';
+		this.renderButtons(h);
+		h[h.length] = '</div>';
+		h[h.length] = '<div class="' + C.ERROR + '" id="' + this.id + NAV.ERROR_SUFFIX + '"></div>';
+
+		return h;
+	},
+
+	/**
+	 * Renders the month label and control for the navigator
+	 * 
+	 * @method renderNavContents
+	 * @param {Array} html The HTML buffer to append the HTML to.
+	 * @return {Array} A reference to the buffer passed in.
+	 */
+	renderMonth : function(html) {
+		var NAV = YAHOO.widget.CalendarNavigator,
+			C = NAV.CLASSES;
+
+		var id = this.id + NAV.MONTH_SUFFIX,
+			mf = this.__getCfg("monthFormat"),
+			months = this.cal.cfg.getProperty((mf == YAHOO.widget.Calendar.SHORT) ? "MONTHS_SHORT" : "MONTHS_LONG"),
+			h = html;
+
+		if (months && months.length > 0) {
+			h[h.length] = '<label for="' + id + '">';
+			h[h.length] = this.__getCfg("month", true);
+			h[h.length] = '</label>';
+			h[h.length] = '<select name="' + id + '" id="' + id + '" class="' + C.MONTH_CTRL + '">';
+			for (var i = 0; i < months.length; i++) {
+				h[h.length] = '<option value="' + i + '">';
+				h[h.length] = months[i];
+				h[h.length] = '</option>';
+			}
+			h[h.length] = '</select>';
+		}
+		return h;
+	},
+
+	/**
+	 * Renders the year label and control for the navigator
+	 * 
+	 * @method renderYear
+	 * @param {Array} html The HTML buffer to append the HTML to.
+	 * @return {Array} A reference to the buffer passed in.
+	 */
+	renderYear : function(html) {
+		var NAV = YAHOO.widget.CalendarNavigator,
+			C = NAV.CLASSES;
+
+		var id = this.id + NAV.YEAR_SUFFIX,
+			size = NAV.YR_MAX_DIGITS,
+			h = html;
+
+		h[h.length] = '<label for="' + id + '">';
+		h[h.length] = this.__getCfg("year", true);
+		h[h.length] = '</label>';
+		h[h.length] = '<input type="text" name="' + id + '" id="' + id + '" class="' + C.YEAR_CTRL + '" maxlength="' + size + '"/>';
+		return h;
+	},
+
+	/**
+	 * Renders the submit/cancel buttons for the navigator
+	 * 
+	 * @method renderButton
+	 * @return {String} The HTML created for the Button UI
+	 */
+	renderButtons : function(html) {
+		var C = YAHOO.widget.CalendarNavigator.CLASSES;
+		var h = html;
+
+		h[h.length] = '<span class="' + C.BUTTON + ' ' + C.DEFAULT + '">';
+		h[h.length] = '<button type="button" id="' + this.id + '_submit' + '">';
+		h[h.length] = this.__getCfg("submit", true);
+		h[h.length] = '</button>';
+		h[h.length] = '</span>';
+		h[h.length] = '<span class="' + C.BUTTON +'">';
+		h[h.length] = '<button type="button" id="' + this.id + '_cancel' + '">';
+		h[h.length] = this.__getCfg("cancel", true);
+		h[h.length] = '</button>';
+		h[h.length] = '</span>';
+
+		return h;
+	},
+
+	/**
+	 * Attaches DOM event listeners to the rendered elements
+	 * <p>
+	 * The method will call applyKeyListeners, to setup keyboard specific 
+	 * listeners
+	 * </p>
+	 * @method applyListeners
+	 */
+	applyListeners : function() {
+		var E = YAHOO.util.Event;
+
+		function yearUpdateHandler() {
+			if (this.validate()) {
+				this.setYear(this._getYearFromUI());
+			}
+		}
+
+		function monthUpdateHandler() {
+			this.setMonth(this._getMonthFromUI());
+		}
+
+		E.on(this.submitEl, "click", this.submit, this, true);
+		E.on(this.cancelEl, "click", this.cancel, this, true);
+		E.on(this.yearEl, "blur", yearUpdateHandler, this, true);
+		E.on(this.monthEl, "change", monthUpdateHandler, this, true);
+
+		if (this.__isIEQuirks) {
+			YAHOO.util.Event.on(this.cal.oDomContainer, "resize", this._syncMask, this, true);
+		}
+
+		this.applyKeyListeners();
+	},
+
+	/**
+	 * Removes/purges DOM event listeners from the rendered elements
+	 * 
+	 * @method purgeListeners
+	 */
+	purgeListeners : function() {
+		var E = YAHOO.util.Event;
+		E.removeListener(this.submitEl, "click", this.submit);
+		E.removeListener(this.cancelEl, "click", this.cancel);
+		E.removeListener(this.yearEl, "blur");
+		E.removeListener(this.monthEl, "change");
+		if (this.__isIEQuirks) {
+			E.removeListener(this.cal.oDomContainer, "resize", this._syncMask);
+		}
+
+		this.purgeKeyListeners();
+	},
+
+	/**
+	 * Attaches DOM listeners for keyboard support. 
+	 * Tab/Shift-Tab looping, Enter Key Submit on Year element,
+	 * Up/Down/PgUp/PgDown year increment on Year element
+	 * <p>
+	 * NOTE: MacOSX Safari 2.x doesn't let you tab to buttons and 
+	 * MacOSX Gecko does not let you tab to buttons or select controls,
+	 * so for these browsers, Tab/Shift-Tab looping is limited to the 
+	 * elements which can be reached using the tab key.
+	 * </p>
+	 * @method applyKeyListeners
+	 */
+	applyKeyListeners : function() {
+		var E = YAHOO.util.Event;
+
+		// IE doesn't fire keypress for arrow/pg keys (non-char keys)
+		var ua = YAHOO.env.ua;
+		var arrowEvt = (ua.ie) ? "keydown" : "keypress";
+
+		// - IE doesn't fire keypress for non-char keys
+		// - Opera doesn't allow us to cancel keydown or keypress for tab, but 
+		//   changes focus successfully on keydown (keypress is too late to change focus - opera's already moved on).
+		var tabEvt = (ua.ie || ua.opera) ? "keydown" : "keypress";
+
+		// Everyone likes keypress for Enter (char keys) - whoo hoo!
+		E.on(this.yearEl, "keypress", this._handleEnterKey, this, true);
+
+		E.on(this.yearEl, arrowEvt, this._handleDirectionKeys, this, true);
+		E.on(this.lastCtrl, tabEvt, this._handleTabKey, this, true);
+		E.on(this.firstCtrl, tabEvt, this._handleShiftTabKey, this, true);
+	},
+
+	/**
+	 * Removes/purges DOM listeners for keyboard support
+	 *
+	 * @method purgeKeyListeners
+	 */
+	purgeKeyListeners : function() {
+		var E = YAHOO.util.Event;
+
+		var arrowEvt = (YAHOO.env.ua.ie) ? "keydown" : "keypress";
+		var tabEvt = (YAHOO.env.ua.ie || YAHOO.env.ua.opera) ? "keydown" : "keypress";
+
+		E.removeListener(this.yearEl, "keypress", this._handleEnterKey);
+		E.removeListener(this.yearEl, arrowEvt, this._handleDirectionKeys);
+		E.removeListener(this.lastCtrl, tabEvt, this._handleTabKey);
+		E.removeListener(this.firstCtrl, tabEvt, this._handleShiftTabKey);
+	},
+
+	/**
+	 * Updates the Calendar/CalendarGroup's pagedate with the currently set month and year if valid.
+	 * <p>
+	 * If the currently set month/year is invalid, a validation error will be displayed and the 
+	 * Calendar/CalendarGroup's pagedate will not be updated.
+	 * </p>
+	 * @method submit
+	 */
+	submit : function() {
+		if (this.validate()) {
+			this.hide();
+
+			this.setMonth(this._getMonthFromUI());
+			this.setYear(this._getYearFromUI());
+
+			var cal = this.cal;
+			var nav = this;
+			
+			function update() {
+				cal.setYear(nav.getYear());
+				cal.setMonth(nav.getMonth());
+				cal.render();
+			}
+			// Artificial delay, just to help the user see something changed
+			var delay = YAHOO.widget.CalendarNavigator.UPDATE_DELAY;
+			if (delay > 0) {
+				window.setTimeout(update, delay);
+			} else {
+				update();
+			}
+		}
+	},
+
+	/**
+	 * Hides the navigator and mask, without updating the Calendar/CalendarGroup's state
+	 * 
+	 * @method cancel
+	 */
+	cancel : function() {
+		this.hide();
+	},
+
+	/**
+	 * Validates the current state of the UI controls
+	 * 
+	 * @method validate
+	 * @return {Boolean} true, if the current UI state contains valid values, false if not
+	 */
+	validate : function() {
+		if (this._getYearFromUI() !== null) {
+			this.clearErrors();
+			return true;
+		} else {
+			this.setYearError();
+			this.setError(this.__getCfg("invalidYear", true));
+			return false;
+		}
+	},
+
+	/**
+	 * Displays an error message in the Navigator's error panel
+	 * @method setError
+	 * @param {String} msg The error message to display
+	 */
+	setError : function(msg) {
+		if (this.errorEl) {
+			this.errorEl.innerHTML = msg;
+			this._show(this.errorEl, true);
+		}
+	},
+
+	/**
+	 * Clears the navigator's error message and hides the error panel
+	 * @method clearError 
+	 */
+	clearError : function() {
+		if (this.errorEl) {
+			this.errorEl.innerHTML = "";
+			this._show(this.errorEl, false);
+		}
+	},
+
+	/**
+	 * Displays the validation error UI for the year control
+	 * @method setYearError
+	 */
+	setYearError : function() {
+		YAHOO.util.Dom.addClass(this.yearEl, YAHOO.widget.CalendarNavigator.CLASSES.INVALID);
+	},
+
+	/**
+	 * Removes the validation error UI for the year control
+	 * @method clearYearError
+	 */
+	clearYearError : function() {
+		YAHOO.util.Dom.removeClass(this.yearEl, YAHOO.widget.CalendarNavigator.CLASSES.INVALID);
+	},
+
+	/**
+	 * Clears all validation and error messages in the UI
+	 * @method clearErrors
+	 */
+	clearErrors : function() {
+		this.clearError();
+		this.clearYearError();
+	},
+
+	/**
+	 * Sets the initial focus, based on the configured value
+	 * @method setInitialFocus
+	 */
+	setInitialFocus : function() {
+		var el = this.submitEl;
+		var f = this.__getCfg("initialFocus");
+
+		if (f && f.toLowerCase) {
+			f = f.toLowerCase();
+			if (f == "year") {
+				el = this.yearEl;
+				try {
+					this.yearEl.select();
+				} catch (e) {
+					// Ignore;
+				}
+			} else if (f == "month") {
+				el = this.monthEl;
+			}
+		}
+
+		if (el && YAHOO.lang.isFunction(el.focus)) {
+			try {
+				el.focus();
+			} catch (e) {
+				// TODO: Fall back if focus fails?
+			}
+		}
+	},
+
+	/**
+	 * Removes all renderered HTML elements for the Navigator from
+	 * the DOM, purges event listeners and clears (nulls) any property
+	 * references to HTML references
+	 * @method erase
+	 */
+	erase : function() {
+		if (this.__rendered) {
+			this.purgeListeners();
+
+			// Clear out innerHTML references
+			this.yearEl = null;
+			this.monthEl = null;
+			this.errorEl = null;
+			this.submitEl = null;
+			this.cancelEl = null;
+			this.firstCtrl = null;
+			this.lastCtrl = null;
+			if (this.navEl) {
+				this.navEl.innerHTML = "";
+			}
+
+			var p = this.navEl.parentNode;
+			if (p) {
+				p.removeChild(this.navEl);
+			}
+			this.navEl = null;
+
+			var pm = this.maskEl.parentNode;
+			if (pm) {
+				pm.removeChild(this.maskEl);
+			}
+			this.maskEl = null;
+			this.__rendered = false;
+		}
+	},
+
+	/**
+	 * Destroys the Navigator object and any HTML references
+	 * @method destroy
+	 */
+	destroy : function() {
+		this.erase();
+		this._doc = null;
+		this.cal = null;
+		this.id = null;
+	},
+
+	/**
+	 * Protected implementation to handle how UI elements are 
+	 * hidden/shown.
+	 *
+	 * @method _show
+	 * @protected
+	 */
+	_show : function(el, bShow) {
+		if (el) {
+			YAHOO.util.Dom.setStyle(el, "display", (bShow) ? "block" : "none");
+		}
+	},
+
+	/**
+	 * Returns the month value (index), from the month UI element
+	 * @protected
+	 * @method _getMonthFromUI
+	 * @return {Number} The month index, or 0 if a UI element for the month
+	 * is not found
+	 */
+	_getMonthFromUI : function() {
+		if (this.monthEl) {
+			return this.monthEl.selectedIndex;
+		} else {
+			return 0; // Default to Jan
+		}
+	},
+
+	/**
+	 * Returns the year value, from the Navitator's year UI element
+	 * @protected
+	 * @method _getYearFromUI
+	 * @return {Number} The year value set in the UI, if valid. null is returned if 
+	 * the UI does not contain a valid year value.
+	 */
+	_getYearFromUI : function() {
+		var NAV = YAHOO.widget.CalendarNavigator;
+
+		var yr = null;
+		if (this.yearEl) {
+			var value = this.yearEl.value;
+			value = value.replace(NAV.TRIM, "$1");
+
+			if (NAV.YR_PATTERN.test(value)) {
+				yr = parseInt(value, 10);
+			}
+		}
+		return yr;
+	},
+
+	/**
+	 * Updates the Navigator's year UI, based on the year value set on the Navigator object
+	 * @protected
+	 * @method _updateYearUI
+	 */
+	_updateYearUI : function() {
+		if (this.yearEl && this._year !== null) {
+			this.yearEl.value = this._year;
+		}
+	},
+
+	/**
+	 * Updates the Navigator's month UI, based on the month value set on the Navigator object
+	 * @protected
+	 * @method _updateMonthUI
+	 */
+	_updateMonthUI : function() {
+		if (this.monthEl) {
+			this.monthEl.selectedIndex = this._month;
+		}
+	},
+
+	/**
+	 * Sets up references to the first and last focusable element in the Navigator's UI
+	 * in terms of tab order (Naviagator's firstEl and lastEl properties). The references
+	 * are used to control modality by looping around from the first to the last control
+	 * and visa versa for tab/shift-tab navigation.
+	 * <p>
+	 * See <a href="#applyKeyListeners">applyKeyListeners</a>
+	 * </p>
+	 * @protected
+	 * @method _setFirstLastElements
+	 */
+	_setFirstLastElements : function() {
+		this.firstCtrl = this.monthEl;
+		this.lastCtrl = this.cancelEl;
+
+		// Special handling for MacOSX.
+		// - Safari 2.x can't focus on buttons
+		// - Gecko can't focus on select boxes or buttons
+		if (this.__isMac) {
+			if (YAHOO.env.ua.webkit && YAHOO.env.ua.webkit < 420){
+				this.firstCtrl = this.monthEl;
+				this.lastCtrl = this.yearEl;
+			}
+			if (YAHOO.env.ua.gecko) {
+				this.firstCtrl = this.yearEl;
+				this.lastCtrl = this.yearEl;
+			}
+		}
+	},
+
+	/**
+	 * Default Keyboard event handler to capture Enter 
+	 * on the Navigator's year control (yearEl)
+	 * 
+	 * @method _handleEnterKey
+	 * @protected
+	 * @param {Event} e The DOM event being handled
+	 */
+	_handleEnterKey : function(e) {
+		var KEYS = YAHOO.util.KeyListener.KEY;
+
+		if (YAHOO.util.Event.getCharCode(e) == KEYS.ENTER) {
+			this.submit();
+		}
+	},
+
+	/**
+	 * Default Keyboard event handler to capture up/down/pgup/pgdown
+	 * on the Navigator's year control (yearEl).
+	 * 
+	 * @method _handleDirectionKeys
+	 * @protected
+	 * @param {Event} e The DOM event being handled
+	 */
+	_handleDirectionKeys : function(e) {
+		var E = YAHOO.util.Event;
+		var KEYS = YAHOO.util.KeyListener.KEY;
+		var NAV = YAHOO.widget.CalendarNavigator;
+
+		var value = (this.yearEl.value) ? parseInt(this.yearEl.value, 10) : null;
+		if (isFinite(value)) {
+			var dir = false;
+			switch(E.getCharCode(e)) {
+				case KEYS.UP:
+					this.yearEl.value = value + NAV.YR_MINOR_INC;
+					dir = true;
+					break;
+				case KEYS.DOWN:
+					this.yearEl.value = Math.max(value - NAV.YR_MINOR_INC, 0);
+					dir = true;
+					break;
+				case KEYS.PAGE_UP:
+					this.yearEl.value = value + NAV.YR_MAJOR_INC;
+					dir = true;
+					break;
+				case KEYS.PAGE_DOWN:
+					this.yearEl.value = Math.max(value - NAV.YR_MAJOR_INC, 0);
+					dir = true;
+					break;
+				default:
+					break;
+			}
+			if (dir) {
+				E.preventDefault(e);
+				try {
+					this.yearEl.select();
+				} catch(e) {
+					// Ignore
+				}
+			}
+		}
+	},
+
+	/**
+	 * Default Keyboard event handler to capture Tab 
+	 * on the last control (lastCtrl) in the Navigator.
+	 * 
+	 * @method _handleTabKey
+	 * @protected
+	 * @param {Event} e The DOM event being handled
+	 */
+	_handleTabKey : function(e) {
+		var E = YAHOO.util.Event;
+		var KEYS = YAHOO.util.KeyListener.KEY;
+
+		if (E.getCharCode(e) == KEYS.TAB && !e.shiftKey) {
+			try {
+				E.preventDefault(e);
+				this.firstCtrl.focus();
+			} catch (e) {
+				// Ignore - mainly for focus edge cases
+			}
+		}
+	},
+
+	/**
+	 * Default Keyboard event handler to capture Shift-Tab 
+	 * on the first control (firstCtrl) in the Navigator.
+	 * 
+	 * @method _handleShiftTabKey
+	 * @protected
+	 * @param {Event} e The DOM event being handled
+	 */
+	_handleShiftTabKey : function(e) {
+		var E = YAHOO.util.Event;
+		var KEYS = YAHOO.util.KeyListener.KEY;
+
+		if (e.shiftKey && E.getCharCode(e) == KEYS.TAB) {
+			try {
+				E.preventDefault(e);
+				this.lastCtrl.focus();
+			} catch (e) {
+				// Ignore - mainly for focus edge cases
+			}
+		}
+	},
+
+	/**
+	 * Retrieve Navigator configuration values from 
+	 * the parent Calendar/CalendarGroup's config value.
+	 * <p>
+	 * If it has not been set in the user provided configuration, the method will 
+	 * return the default value of the configuration property, as set in _DEFAULT_CFG
+	 * </p>
+	 * @private
+	 * @method __getCfg
+	 * @param {String} Case sensitive property name.
+	 * @param {Boolean} true, if the property is a string property, false if not.
+	 * @return The value of the configuration property
+	 */
+	__getCfg : function(prop, bIsStr) {
+		var DEF_CFG = YAHOO.widget.CalendarNavigator._DEFAULT_CFG;
+		var cfg = this.cal.cfg.getProperty("navigator");
+
+		if (bIsStr) {
+			return (cfg !== true && cfg.strings && cfg.strings[prop]) ? cfg.strings[prop] : DEF_CFG.strings[prop];
+		} else {
+			return (cfg !== true && cfg[prop]) ? cfg[prop] : DEF_CFG[prop];
+		}
+	},
+
+	/**
+	 * Private flag, to identify MacOS
+	 * @private
+	 * @property __isMac
+	 */
+	__isMac : (navigator.userAgent.toLowerCase().indexOf("macintosh") != -1)
+
+};
+
+YAHOO.register("calendar", YAHOO.widget.Calendar, {version: "2.4.1", build: "742"});

Added: trunk/root/static/yui/charts/README
===================================================================
--- trunk/root/static/yui/charts/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/charts/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,6 @@
+YUI Library - Charts - Release Notes
+2.4.1
+  * No change
+
+2.4.0
+  * Experimental release

Added: trunk/root/static/yui/charts/assets/charts.swf
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/charts/assets/charts.swf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/charts/charts-experimental-debug.js
===================================================================
--- trunk/root/static/yui/charts/charts-experimental-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/charts/charts-experimental-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,1713 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+/**
+ * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
+ *
+ * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ */
+if(typeof deconcept == "undefined") var deconcept = new Object();
+if(typeof deconcept.util == "undefined") deconcept.util = new Object();
+if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
+deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) {
+	if (!document.getElementById) { return; }
+	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
+	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
+	this.params = new Object();
+	this.variables = new Object();
+	this.attributes = new Array();
+	if(swf) { this.setAttribute('swf', swf); }
+	if(id) { this.setAttribute('id', id); }
+	if(w) { this.setAttribute('width', w); }
+	if(h) { this.setAttribute('height', h); }
+	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
+	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
+	if (!window.opera && document.all && this.installedVer.major > 7) {
+		// only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
+		deconcept.SWFObject.doPrepUnload = true;
+	}
+	if(c) { this.addParam('bgcolor', c); }
+	var q = quality ? quality : 'high';
+	this.addParam('quality', q);
+	this.setAttribute('useExpressInstall', false);
+	this.setAttribute('doExpressInstall', false);
+	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
+	this.setAttribute('xiRedirectUrl', xir);
+	this.setAttribute('redirectUrl', '');
+	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
+}
+deconcept.SWFObject.prototype = {
+	useExpressInstall: function(path) {
+		this.xiSWFPath = !path ? "expressinstall.swf" : path;
+		this.setAttribute('useExpressInstall', true);
+	},
+	setAttribute: function(name, value){
+		this.attributes[name] = value;
+	},
+	getAttribute: function(name){
+		return this.attributes[name];
+	},
+	addParam: function(name, value){
+		this.params[name] = value;
+	},
+	getParams: function(){
+		return this.params;
+	},
+	addVariable: function(name, value){
+		this.variables[name] = value;
+	},
+	getVariable: function(name){
+		return this.variables[name];
+	},
+	getVariables: function(){
+		return this.variables;
+	},
+	getVariablePairs: function(){
+		var variablePairs = new Array();
+		var key;
+		var variables = this.getVariables();
+		for(key in variables){
+			variablePairs[variablePairs.length] = key +"="+ variables[key];
+		}
+		return variablePairs;
+	},
+	getSWFHTML: function() {
+		var swfNode = "";
+		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
+			if (this.getAttribute("doExpressInstall")) {
+				this.addVariable("MMplayerType", "PlugIn");
+				this.setAttribute('swf', this.xiSWFPath);
+			}
+			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'"';
+			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
+			var params = this.getParams();
+			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
+			var pairs = this.getVariablePairs().join("&");
+			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
+			swfNode += '/>';
+		} else { // PC IE
+			if (this.getAttribute("doExpressInstall")) {
+				this.addVariable("MMplayerType", "ActiveX");
+				this.setAttribute('swf', this.xiSWFPath);
+			}
+			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'">';
+			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
+			var params = this.getParams();
+			for(var key in params) {
+			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
+			}
+			var pairs = this.getVariablePairs().join("&");
+			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
+			swfNode += "</object>";
+		}
+		return swfNode;
+	},
+	write: function(elementId){
+		if(this.getAttribute('useExpressInstall')) {
+			// check to see if we need to do an express install
+			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
+			if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
+				this.setAttribute('doExpressInstall', true);
+				this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
+				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
+				this.addVariable("MMdoctitle", document.title);
+			}
+		}
+		if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
+			var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
+			n.innerHTML = this.getSWFHTML();
+			return true;
+		}else{
+			if(this.getAttribute('redirectUrl') != "") {
+				document.location.replace(this.getAttribute('redirectUrl'));
+			}
+		}
+		return false;
+	}
+}
+
+/* ---- detection functions ---- */
+deconcept.SWFObjectUtil.getPlayerVersion = function(){
+	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
+	if(navigator.plugins && navigator.mimeTypes.length){
+		var x = navigator.plugins["Shockwave Flash"];
+		if(x && x.description) {
+			PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
+		}
+	}else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){ // if Windows CE
+		var axo = 1;
+		var counter = 3;
+		while(axo) {
+			try {
+				counter++;
+				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
+//				document.write("player v: "+ counter);
+				PlayerVersion = new deconcept.PlayerVersion([counter,0,0]);
+			} catch (e) {
+				axo = null;
+			}
+		}
+	} else { // Win IE (non mobile)
+		// do minor version lookup in IE, but avoid fp6 crashing issues
+		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
+		try{
+			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
+		}catch(e){
+			try {
+				var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
+				PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
+				axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
+			} catch(e) {
+				if (PlayerVersion.major == 6) {
+					return PlayerVersion;
+				}
+			}
+			try {
+				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
+			} catch(e) {}
+		}
+		if (axo != null) {
+			PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
+		}
+	}
+	return PlayerVersion;
+}
+deconcept.PlayerVersion = function(arrVersion){
+	this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
+	this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
+	this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
+}
+deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
+	if(this.major < fv.major) return false;
+	if(this.major > fv.major) return true;
+	if(this.minor < fv.minor) return false;
+	if(this.minor > fv.minor) return true;
+	if(this.rev < fv.rev) return false;
+	return true;
+}
+/* ---- get value of query string param ---- */
+deconcept.util = {
+	getRequestParameter: function(param) {
+		var q = document.location.search || document.location.hash;
+		if (param == null) { return q; }
+		if(q) {
+			var pairs = q.substring(1).split("&");
+			for (var i=0; i < pairs.length; i++) {
+				if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+					return pairs[i].substring((pairs[i].indexOf("=")+1));
+				}
+			}
+		}
+		return "";
+	}
+}
+/* fix for video streaming bug */
+deconcept.SWFObjectUtil.cleanupSWFs = function() {
+	var objects = document.getElementsByTagName("OBJECT");
+	for (var i = objects.length - 1; i >= 0; i--) {
+		objects[i].style.display = 'none';
+		for (var x in objects[i]) {
+			if (typeof objects[i][x] == 'function') {
+				objects[i][x] = function(){};
+			}
+		}
+	}
+}
+// fixes bug in some fp9 versions see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
+if (deconcept.SWFObject.doPrepUnload) {
+	if (!deconcept.unloadSet) {
+		deconcept.SWFObjectUtil.prepUnload = function() {
+			__flash_unloadHandler = function(){};
+			__flash_savedUnloadHandler = function(){};
+			window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs);
+		}
+		window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
+		deconcept.unloadSet = true;
+	}
+}
+/* add document.getElementById if needed (mobile IE < 5) */
+if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }}
+
+/* add some aliases for ease of use/backwards compatibility */
+var getQueryParamValue = deconcept.util.getRequestParameter;
+var FlashObject = deconcept.SWFObject; // for legacy support
+var SWFObject = deconcept.SWFObject;
+
+/**
+ * Wraps Flash embedding functionality and allows communication with SWF through
+ * attributes.
+ *
+ * @namespace YAHOO.widget
+ * @class FlashAdapter
+ * @uses YAHOO.util.AttributeProvider
+ */
+YAHOO.widget.FlashAdapter = function(swfURL, containerID, attributes)
+{
+	// set up the initial events and attributes stuff
+	this._queue = this._queue || [];
+	this._events = this._events || {};
+	this._configs = this._configs || {};
+	attributes = attributes || {};
+	
+	//the Flash Player external interface code from Adobe doesn't play nicely
+	//with the default value, yui-gen, in IE
+	this._id = attributes.id = attributes.id || YAHOO.util.Dom.generateId(null, "yuigen");
+	attributes.version = attributes.version || "9.0.45";
+	attributes.backgroundColor = attributes.backgroundColor || "#ffffff";
+	
+	//we can't use the initial attributes right away
+	//so save them for once the SWF finishes loading
+	this._attributes = attributes;
+	
+	this._swfURL = swfURL;
+	
+	//embed the SWF file in the page
+	this._embedSWF(this._swfURL, containerID, attributes.id, attributes.version, attributes.backgroundColor, attributes.expressInstall);
+	
+	/**
+	 * Fires when the SWF is initialized and communication is possible.
+	 * @event contentReady
+	 */
+	this.createEvent("contentReady");
+};
+
+YAHOO.extend(YAHOO.widget.FlashAdapter, YAHOO.util.AttributeProvider,
+{
+	/**
+	 * The URL of the SWF file.
+	 * @property _swfURL
+	 * @type String
+	 * @private
+	 */
+	_swfURL: null,
+
+	/**
+	 * A reference to the embedded SWF file.
+	 * @property _swf
+	 * @private
+	 */
+	_swf: null,
+
+	/**
+	 * The id of this instance.
+	 * @property _id
+	 * @type String
+	 * @private
+	 */
+	_id: null,
+	
+	/**
+	 * The initializing attributes are stored here until the SWF is ready.
+	 * @property _attributes
+	 * @type Object
+	 * @private
+	 */
+	_attributes: null, //the intializing attributes
+
+	/**
+	 * Public accessor to the unique name of the FlashAdapter instance.
+	 *
+	 * @method toString
+	 * @return {String} Unique name of the FlashAdapter instance.
+	 */
+	toString: function()
+	{
+		return "FlashAdapter " + this._id;
+	},
+
+	/**
+	 * Embeds the SWF in the page and associates it with this instance.
+	 *
+	 * @method _embedSWF
+	 * @private
+	 */
+	_embedSWF: function(swfURL, containerID, swfID, version, backgroundColor, expressInstall)
+	{
+		//standard SWFObject embed
+		var swfObj = new deconcept.SWFObject(swfURL, swfID, "100%", "100%", version, backgroundColor, expressInstall);
+		
+		if(expressInstall)
+		{
+			swfObj.useExpressInstall(expressInstall);
+		}
+
+		//make sure we can communicate with ExternalInterface
+		swfObj.addParam("allowScriptAccess", "always");
+		//again, a useful ExternalInterface trick
+		swfObj.addVariable("allowedDomain", document.location.hostname);
+
+		//tell the SWF which HTML element it is in
+		swfObj.addVariable("elementID", swfID);
+
+		// set the name of the function to call when the swf has an event
+		swfObj.addVariable("eventHandler", "YAHOO.widget.FlashAdapter.eventHandler");
+
+		var container = YAHOO.util.Dom.get(containerID);
+		var result = swfObj.write(container);
+		if(result)
+		{
+			this._swf = YAHOO.util.Dom.get(swfID);
+			//if successful, let's add an owner property to the SWF reference
+			//this will allow the event handler to communicate with a YAHOO.widget.FlashAdapter
+			this._swf.owner = this;
+		}
+		else YAHOO.log("Unable to load SWF " + swfURL);
+	},
+
+	/**
+	 * Handles or re-dispatches events received from the SWF.
+	 *
+	 * @method _eventHandler
+	 * @private
+	 */
+	_eventHandler: function(event)
+	{
+		var type = event.type;
+		switch(type)
+		{
+			case "swfReady":
+			{
+   				this._loadHandler();
+				return;
+			}
+			case "log":
+			{
+				YAHOO.log(event.message, event.category, this.toString());
+				return;
+			}
+		}
+		
+		//be sure to return after your case or the event will automatically fire!
+		this.fireEvent(type, event);
+	},
+
+	/**
+	 * Called when the SWF has been initialized.
+	 *
+	 * @method _loadHandler
+	 * @private
+	 */
+	_loadHandler: function()
+	{
+		this._initAttributes(this._attributes);
+		this.setAttributes(this._attributes, true);
+		this._attributes = null;
+		
+		this.fireEvent("contentReady");
+	},
+	
+	/**
+	 * Initializes the attributes.
+	 *
+	 * @method _initAttributes
+	 * @private
+	 */
+	_initAttributes: function(attributes)
+	{
+		//should be overridden if other attributes need to be set up
+		
+		/**
+		 * @attribute swfURL
+		 * @description Absolute or relative URL to the SWF displayed by the FlashAdapter.
+		 * @type String
+		 */
+		this.getAttributeConfig("swfURL",
+		{
+			method: this._getSWFURL
+		});
+	},
+	
+	/**
+	 * Getter for swfURL attribute.
+	 *
+	 * @method _getSWFURL
+	 * @private
+	 */
+	_getSWFURL: function()
+	{
+		return this._swfURL;
+	}
+});
+
+/**
+ * Receives event messages from SWF and passes them to the correct instance
+ * of FlashAdapter.
+ *
+ * @method YAHOO.widget.FlashAdapter.eventHandler
+ * @static
+ * @private
+ */
+YAHOO.widget.FlashAdapter.eventHandler = function(elementID, event)
+{
+	var loadedSWF = YAHOO.util.Dom.get(elementID);
+	if(!loadedSWF.owner)
+	{
+		//fix for ie: if owner doesn't exist yet, try again in a moment
+		setTimeout(function() { YAHOO.widget.FlashAdapter.eventHandler( elementID, event ); }, 0);
+	}
+	else loadedSWF.owner._eventHandler(event);
+};
+
+/**
+ * The Charts widget provides a Flash control for displaying data
+ * graphically by series across A-grade browsers with Flash Player installed.
+ *
+ * @module charts
+ * @requires yahoo, dom, event, datasource
+ * @title Charts Widget
+ * @beta
+ */
+
+/**
+ * Chart class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class Chart
+ * @uses YAHOO.util.FlashAdapter
+ * @constructor
+ * @param type {String} The char type. May be "line", "column", "bar", or "pie"
+ * @param containerId {HTMLElement} Container element for the Flash Player instance.
+ * @param dataSource {YAHOO.util.DataSource} DataSource instance.
+ * @param attributes {object} (optional) Object literal of configuration values.
+ */
+YAHOO.widget.Chart = function(type, containerId, dataSource, attributes)
+{
+	YAHOO.widget.Chart.superclass.constructor.call(this, YAHOO.widget.Chart.SWFURL, containerId, attributes);
+	
+	this._type = type;
+	this._dataSource = dataSource;
+	
+	/**
+	 * Fires when the user moves the mouse over the bounds of an item renderer in the chart.
+	 *
+	 * @event itemMouseOverEvent
+	 * @param event.type {String} The event type
+	 * @param event.item {Object} The data displayed by the renderer
+	 * @param event.index {Number} The position within the series that the item appears.
+	 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
+	 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
+	 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
+	 */
+	this.createEvent("itemMouseOverEvent");
+	
+	/**
+	 * Fires when the user moves the mouse out of the bounds of an item renderer in the chart.
+	 *
+	 * @event itemMouseOutEvent
+	 * @param event.type {String} The event type
+	 * @param event.item {Object} The data displayed by the renderer
+	 * @param event.index {Number} The position within the series that the item appears.
+	 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
+	 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
+	 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
+	 */
+	this.createEvent("itemMouseOutEvent");
+	
+	/**
+	 * Fires when the user clicks an item renderer in the chart with the mouse.
+	 *
+	 * @event itemClickEvent
+	 * @param event.type {String} The event type
+	 * @param event.item {Object} The data displayed by the renderer
+	 * @param event.index {Number} The position within the series that the item appears.
+	 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
+	 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
+	 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
+	 */
+	this.createEvent("itemClickEvent");
+	
+	/**
+	 * Fires when the user double-clicks an item renderer in the chart with the mouse.
+	 *
+	 * @event itemDoubleClickEvent
+	 * @param event.type {String} The event type
+	 * @param event.item {Object} The data displayed by the renderer
+	 * @param event.index {Number} The position within the series that the item appears.
+	 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
+	 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
+	 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
+	 */
+	this.createEvent("itemDoubleClickEvent");
+	
+	/**
+	 * Fires when the user presses the mouse down on an item to initiate a drag action.
+	 *
+	 * @event itemDragStartEvent
+	 * @param event.type {String} The event type
+	 * @param event.item {Object} The data displayed by the renderer
+	 * @param event.index {Number} The position within the series that the item appears.
+	 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
+	 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
+	 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
+	 */
+	this.createEvent("itemDragStartEvent");
+	
+	/**
+	 * Fires when the user moves the mouse during a drag action.
+	 *
+	 * @event itemDragEvent
+	 * @param event.type {String} The event type
+	 * @param event.item {Object} The data displayed by the renderer
+	 * @param event.index {Number} The position within the series that the item appears.
+	 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
+	 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
+	 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
+	 */
+	this.createEvent("itemDragEvent");
+
+	/**
+	 * Fires when the user releases the mouse during a drag action.
+	 *
+	 * @event itemDragEndEvent
+	 * @param event.type {String} The event type
+	 * @param event.item {Object} The data displayed by the renderer
+	 * @param event.index {Number} The position within the series that the item appears.
+	 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
+	 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
+	 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
+	 */
+	this.createEvent("itemDragEndEvent");
+};
+
+YAHOO.extend(YAHOO.widget.Chart, YAHOO.widget.FlashAdapter,
+{
+	/**
+	 * The type of this chart instance.
+	 * @property _type
+	 * @type String
+	 * @private
+	 */
+	_type: null,
+
+	/**
+	 * The id returned from the DataSource's setInterval function.
+	 * @property _pollingID
+	 * @type Number
+	 * @private
+	 */
+	_pollingID: null,
+
+	/**
+	 * The time, in ms, between requests for data.
+	 * @property _pollingInterval
+	 * @type Number
+	 * @private
+	 */
+	_pollingInterval: null,
+
+	/**
+	 * Public accessor to the unique name of the Chart instance.
+	 *
+	 * @method toString
+	 * @return {String} Unique name of the Chart instance.
+	 */
+	toString: function()
+	{
+		return "Chart " + this._id;
+	},
+	
+	/**
+	 * Sets a single style value on the Chart instance.
+	 *
+	 * @method setStyle
+	 * @param name {String} Name of the Chart style value to change.
+	 * @param value {Object} New value to pass to the Chart style.
+	 */
+	setStyle: function(name, value)
+	{
+		//we must jsonify this because Flash Player versions below 9.0.60 don't handle
+		//complex ExternalInterface parsing correctly
+		value = YAHOO.lang.JSON.stringify(value);
+		this._swf.setStyle(name, value);
+	},
+	
+	/**
+	 * Resets all styles on the Chart instance.
+	 *
+	 * @method setStyles
+	 * @param styles {Object} Initializer for all Chart styles.
+	 */
+	setStyles: function(styles)
+	{
+		//we must jsonify this because Flash Player versions below 9.0.60 don't handle
+		//complex ExternalInterface parsing correctly
+		styles = YAHOO.lang.JSON.stringify(styles);
+		this._swf.setStyles(styles);
+	},
+	
+	/**
+	 * Sets the styles on all series in the Chart.
+	 *
+	 * @method setSeriesStyles
+	 * @param styles {Array} Initializer for all Chart series styles.
+	 */
+	setSeriesStyles: function(styles)
+	{
+		//we must jsonify this because Flash Player versions below 9.0.60 don't handle
+		//complex ExternalInterface parsing correctly
+		for(var i = 0; i < styles.length; i++)
+		{
+			styles[i] = YAHOO.lang.JSON.stringify(styles[i]);	
+		}
+		this._swf.setSeriesStyles(styles);
+	},
+	
+	/**
+	 * Initializes the attributes.
+	 *
+	 * @method _initAttributes
+	 * @private
+	 */
+	_initAttributes: function(attributes)
+	{
+		YAHOO.widget.Chart.superclass._initAttributes.call(this, attributes);
+
+		/**
+		 * @attribute request
+		 * @description Request to be sent to the Chart's DataSource.
+		 * @type String
+		 */
+		this.getAttributeConfig("request",
+		{
+			method: this._getRequest
+		});
+		
+		this.setAttributeConfig("request",
+		{
+			method: this._setRequest
+		});
+		
+		/**
+		 * @attribute dataSource
+		 * @description The DataSource instance to display in the Chart.
+		 * @type DataSource
+		 */
+		this.getAttributeConfig("dataSource",
+		{
+			method: this._getDataSource
+		});
+		
+		this.setAttributeConfig("dataSource",
+		{
+			method: this._setDataSource
+		});
+		
+		/**
+		 * @attribute series
+		 * @description Defines the series to be displayed by the Chart.
+		 * @type Array
+		 */
+		this.getAttributeConfig("series",
+		{
+			method: this._getSeriesDefs
+		});
+		
+		this.setAttributeConfig("series",
+		{
+			method: this._setSeriesDefs
+		});
+		
+		/**
+		 * @attribute categoryNames
+		 * @description Defines the names of the categories to be displayed in the Chart..
+		 * @type Array
+		 */
+		this.getAttributeConfig("categoryNames",
+		{
+			method: this._getCategoryNames
+		});
+		
+		this.setAttributeConfig("categoryNames",
+		{
+			validator: YAHOO.lang.isArray,
+			method: this._setCategoryNames
+		});
+		
+		/**
+		 * @attribute dataTipFunction
+		 * @description The string representation of a globally-accessible function
+		 * that may be called by the SWF to generate the datatip text for a Chart's item.
+		 * @type String
+		 */
+		this.getAttributeConfig("dataTipFunction",
+		{
+			method: this._getDataTipFunction
+		});
+		
+		this.setAttributeConfig("dataTipFunction",
+		{
+			method: this._setDataTipFunction
+		});
+
+		/**
+		 * @attribute polling
+		 * @description A numeric value indicating the number of milliseconds between
+		 * polling requests to the DataSource.
+		 * @type Number
+		 */
+		this.getAttributeConfig("polling",
+		{
+			method: this._getPolling
+		});
+
+		this.setAttributeConfig("polling",
+		{
+			method: this._setPolling
+		});
+	},
+	
+	/**
+	 * Called when the SWF is ready for communication. Sets the type, initializes
+	 * the styles, and sets the DataSource.
+	 *
+	 * @method _loadHandler
+	 * @private
+	 */
+	_loadHandler: function()
+	{
+		this._swf.setType(this._type);
+		
+		//set initial styles
+		if(this._attributes.style)
+		{
+			var style = this._attributes.style;
+			this.setStyles(style);		
+		}
+		
+		YAHOO.widget.Chart.superclass._loadHandler.call(this);
+		
+		if(this._dataSource)
+		{
+			this.set("dataSource", this._dataSource);
+		}
+	},
+
+	/**
+	 * Sends the request to the DataSource.
+	 *
+	 * @method _refreshData
+	 * @private
+	 */
+	_refreshData: function()
+	{
+		if(this._dataSource != null)
+		{
+			if(this._pollingID != null)
+			{
+				this._dataSource.clearInterval(this._pollingID);
+				this._pollingID = null;
+			}
+			
+			if(this._pollingInterval > 0)
+			{
+				this._pollingID = this._dataSource.setInterval(this._pollingInterval, this._request, this._loadDataHandler, this);
+			}
+			else
+			{
+				this._dataSource.sendRequest(this._request, this._loadDataHandler, this);
+			}
+		}
+	},
+
+	/**
+	 * Called when the DataSource receives new data. The series definitions are used
+	 * to build a data provider for the SWF chart.
+	 *
+	 * @method _loadDataHandler
+	 * @private
+	 */
+	_loadDataHandler: function(request, response, error)
+	{
+		if(error)
+		{
+			YAHOO.log("Unable to load data.", "error");
+		}
+		else
+		{
+			var styleChanged = false;
+			
+			//make a copy of the series definitions so that we aren't
+			//editing them directly.
+			var dataProvider = [];	
+			var seriesCount = 0;
+			if(this._seriesDefs)
+			{
+				seriesCount = this._seriesDefs.length;
+				for(var i = 0; i < seriesCount; i++)
+				{
+					var currentSeries = this._seriesDefs[i];
+					var clonedSeries = {};
+					for(var prop in currentSeries)
+					{
+						
+						if(prop == "style" && currentSeries.style != null)
+						{
+							clonedSeries.style = YAHOO.lang.JSON.stringify(currentSeries.style);
+							styleChanged = true;
+							
+							//we don't want to modify the styles again next time
+							//so null out the style property.
+							currentSeries.style = null;
+						}
+						else clonedSeries[prop] = currentSeries[prop];
+					}
+					dataProvider.push(clonedSeries);
+				}
+			}
+			
+			if(seriesCount > 0)
+			{
+				for(i = 0; i < seriesCount; i++)
+				{
+					currentSeries = dataProvider[i];
+					if(!currentSeries.type)
+					{
+						currentSeries.type = this._type;
+					}
+					currentSeries.dataProvider = response.results;
+				}
+			}
+			else
+			{
+				var series = {type: this._type, dataProvider: response.results};
+				dataProvider.push(series);
+			}
+			this._swf.setDataProvider(dataProvider, styleChanged);
+		}
+	},
+
+	/**
+	 * Storage for the request attribute.
+	 * 
+	 * @property _request
+	 * @private
+	 */
+	_request: "",
+	
+	/**
+	 * Getter for the request attribute.
+	 *
+	 * @method _getRequest
+	 * @private
+	 */
+	_getRequest: function()
+	{
+		return this._request;
+	},
+	
+	/**
+	 * Setter for the request attribute.
+	 *
+	 * @method _setRequest
+	 * @private
+	 */
+	_setRequest: function(value)
+	{
+		this._request = value;
+		this._refreshData();
+	},
+
+	/**
+	 * Storage for the dataSource attribute.
+	 * 
+	 * @property _dataSource
+	 * @private
+	 */
+	_dataSource: null,
+	
+	/**
+	 * Getter for the dataSource attribute.
+	 *
+	 * @method _getDataSource
+	 * @private
+	 */
+	_getDataSource: function()
+	{
+		return this._dataSource;
+	},
+
+	/**
+	 * Setter for the dataSource attribute.
+	 *
+	 * @method _setDataSource
+	 * @private
+	 */
+	_setDataSource: function(value)
+	{	
+		this._dataSource = value;
+		this._refreshData();
+	},
+	
+	/**
+	 * Storage for the series attribute.
+	 * 
+	 * @property _seriesDefs
+	 * @private
+	 */
+	_seriesDefs: null,
+	
+	/**
+	 * Getter for the series attribute.
+	 *
+	 * @method _getSeriesDefs
+	 * @private
+	 */
+	_getSeriesDefs: function()
+	{
+		return this._seriesDefs;
+	},
+	
+	/**
+	 * Setter for the series attribute.
+	 *
+	 * @method _setSeriesDefs
+	 * @private
+	 */
+	_setSeriesDefs: function(value)
+	{
+		this._seriesDefs = value;
+	},
+
+	/**
+	 * Getter for the categoryNames attribute.
+	 *
+	 * @method _getCategoryNames
+	 * @private
+	 */
+	_getCategoryNames: function()
+	{
+		return this._swf.getCategoryNames();
+	},
+
+	/**
+	 * Setter for the categoryNames attribute.
+	 *
+	 * @method _setCategoryNames
+	 * @private
+	 */
+	_setCategoryNames: function(value)
+	{
+		this._swf.setCategoryNames(value);
+	},
+	
+	/**
+	 * Storage for the dataTipFunction attribute.
+	 *
+	 * @property _dataTipFunction
+	 * @private
+	 */
+	_dataTipFunction: null,
+	
+	/**
+	 * Getter for the dataTipFunction attribute.
+	 *
+	 * @method _getDataTipFunction
+	 * @private
+	 */
+	_getDataTipFunction: function()
+	{
+		return this._dataTipFunction;
+	},
+	
+	/**
+	 * Setter for the dataTipFunction attribute.
+	 *
+	 * @method _setDataTipFunction
+	 * @private
+	 */
+	_setDataTipFunction: function(value)
+	{
+		this._dataTipFunction = value;
+		this._swf.setDataTipFunction(value);
+	},
+
+	/**
+	 * Getter for the polling attribute.
+	 *
+	 * @method _getPolling
+	 * @private
+	 */
+	_getPolling: function()
+	{
+		return this._pollingInterval;
+	},
+
+	/**
+	 * Setter for the polling attribute.
+	 *
+	 * @method _setPolling
+	 * @private
+	 */
+	_setPolling: function(value)
+	{
+		this._pollingInterval = value;
+		this._refreshData();
+	}
+});
+
+/**
+ * Storage for the dataTipFunction attribute.
+ *
+ * @property Chart.SWFURL
+ * @private
+ * @static
+ * @final
+ * @default "assets/charts.swf"
+ */
+YAHOO.widget.Chart.SWFURL = "assets/charts.swf";
+
+/**
+ * PieChart class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class PieChart
+ * @uses YAHOO.widget.CartesianChart
+ * @constructor
+ * @param containerId {HTMLElement} Container element for the Flash Player instance.
+ * @param dataSource {YAHOO.util.DataSource} DataSource instance.
+ * @param attributes {object} (optional) Object literal of configuration values.
+ */
+YAHOO.widget.PieChart = function(containerId, dataSource, attributes)
+{
+	YAHOO.widget.PieChart.superclass.constructor.call(this, "pie", containerId, dataSource, attributes);
+};
+
+YAHOO.lang.extend(YAHOO.widget.PieChart, YAHOO.widget.Chart,
+{
+	/**
+	 * Initializes the attributes.
+	 *
+	 * @method _initAttributes
+	 * @private
+	 */
+	_initAttributes: function(attributes)
+	{	
+		YAHOO.widget.PieChart.superclass._initAttributes.call(this, attributes);
+		
+		/**
+		 * @attribute dataField
+		 * @description The field in each item that corresponds to the data value.
+		 * @type String
+		 */
+		this.getAttributeConfig("dataField",
+		{
+			method: this._getDataField
+		});
+   
+		this.setAttributeConfig("dataField",
+		{
+			validator: YAHOO.lang.isString,
+			method: this._setDataField
+		});
+   
+		/**
+		 * @attribute categoryField
+		 * @description The field in each item that corresponds to the category value.
+		 * @type String
+		 */
+		this.getAttributeConfig("categoryField",
+		{
+			method: this._getCategoryField
+		});
+   
+		this.setAttributeConfig("categoryField",
+		{
+			validator: YAHOO.lang.isString,
+			method: this._setCategoryField
+		});
+	},
+
+	/**
+	 * Getter for the dataField attribute.
+	 *
+	 * @method _getDataField
+	 * @private
+	 */
+	_getDataField: function()
+	{
+		return this._swf.getDataField();
+	},
+
+	/**
+	 * Setter for the dataField attribute.
+	 *
+	 * @method _setDataField
+	 * @private
+	 */
+	_setDataField: function(value)
+	{
+		this._swf.setDataField(value);
+	},
+
+	/**
+	 * Getter for the categoryField attribute.
+	 *
+	 * @method _getCategoryField
+	 * @private
+	 */
+	_getCategoryField: function()
+	{
+		return this._swf.getCategoryField();
+	},
+
+	/**
+	 * Setter for the categoryField attribute.
+	 *
+	 * @method _setCategoryField
+	 * @private
+	 */
+	_setCategoryField: function(value)
+	{
+		this._swf.setCategoryField(value);
+	}
+});
+
+/**
+ * CartesianChart class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class CartesianChart
+ * @uses YAHOO.widget.Charts
+ * @constructor
+ * @param type {String} The char type. May be "line", "column", or "bar"
+ * @param containerId {HTMLElement} Container element for the Flash Player instance.
+ * @param dataSource {YAHOO.util.DataSource} DataSource instance.
+ * @param attributes {object} (optional) Object literal of configuration values.
+ */
+ YAHOO.widget.CartesianChart = function(type, containerId, dataSource, attributes)
+{
+	YAHOO.widget.CartesianChart.superclass.constructor.call(this, type, containerId, dataSource, attributes);
+};
+
+YAHOO.lang.extend(YAHOO.widget.CartesianChart, YAHOO.widget.Chart,
+{
+	/**
+	 * Initializes the attributes.
+	 *
+	 * @method _initAttributes
+	 * @private
+	 */
+	_initAttributes: function(attributes)
+	{	
+		YAHOO.widget.CartesianChart.superclass._initAttributes.call(this, attributes);
+
+		/**
+		 * @attribute xField
+		 * @description The field in each item that corresponds to a value on the x axis.
+		 * @type String
+		 */
+		this.getAttributeConfig("xField",
+		{
+			method: this._getXField
+		});
+
+		this.setAttributeConfig("xField",
+		{
+			validator: YAHOO.lang.isString,
+			method: this._setXField
+		});
+
+		/**
+		 * @attribute yField
+		 * @description The field in each item that corresponds to a value on the x axis.
+		 * @type String
+		 */
+		this.getAttributeConfig("yField",
+		{
+			method: this._getYField
+		});
+
+		this.setAttributeConfig("yField",
+		{
+			validator: YAHOO.lang.isString,
+			method: this._setYField
+		});
+
+		/**
+		 * @attribute xAxis
+		 * @description A custom configuration for the horizontal x axis.
+		 * @type Axis
+		 */
+		this.setAttributeConfig("xAxis",
+		{
+			method: this._setXAxis
+		});
+
+		/**
+		 * @attribute yAxis
+		 * @description A custom configuration for the vertical y axis.
+		 * @type Axis
+		 */
+		this.setAttributeConfig("yAxis",
+		{
+			method: this._setYAxis
+		});
+	},
+
+	/**
+	 * Getter for the xField attribute.
+	 *
+	 * @method _getXField
+	 * @private
+	 */
+	_getXField: function()
+	{
+		return this._swf.getHorizontalField();
+	},
+
+	/**
+	 * Setter for the xField attribute.
+	 *
+	 * @method _setXField
+	 * @private
+	 */
+	_setXField: function(value)
+	{
+		this._swf.setHorizontalField(value);
+	},
+
+	/**
+	 * Getter for the yField attribute.
+	 *
+	 * @method _getYField
+	 * @private
+	 */
+	_getYField: function()
+	{
+		return this._swf.getVerticalField();
+	},
+
+	/**
+	 * Setter for the yField attribute.
+	 *
+	 * @method _setYField
+	 * @private
+	 */
+	_setYField: function(value)
+	{
+		this._swf.setVerticalField(value);
+	},
+	
+	/**
+	 * Setter for the xAxis attribute.
+	 *
+	 * @method _setXAxis
+	 * @private
+	 */
+	_setXAxis: function(value)
+	{
+		this._swf.setHorizontalAxis(value);
+	},
+
+	/**
+	 * Getter for the yAxis attribute.
+	 *
+	 * @method _setYAxis
+	 * @private
+	 */
+	_setYAxis: function(value)
+	{
+		this._swf.setVerticalAxis(value);
+	}
+});
+
+/**
+ * LineChart class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class LineChart
+ * @uses YAHOO.widget.CartesianChart
+ * @constructor
+ * @param containerId {HTMLElement} Container element for the Flash Player instance.
+ * @param dataSource {YAHOO.util.DataSource} DataSource instance.
+ * @param attributes {object} (optional) Object literal of configuration values.
+ */
+YAHOO.widget.LineChart = function(containerId, dataSource, attributes)
+{
+	YAHOO.widget.LineChart.superclass.constructor.call(this, "line", containerId, dataSource, attributes);
+};
+
+YAHOO.lang.extend(YAHOO.widget.LineChart, YAHOO.widget.CartesianChart);
+
+/**
+ * ColumnChart class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class ColumnChart
+ * @uses YAHOO.widget.CartesianChart
+ * @constructor
+ * @param containerId {HTMLElement} Container element for the Flash Player instance.
+ * @param dataSource {YAHOO.util.DataSource} DataSource instance.
+ * @param attributes {object} (optional) Object literal of configuration values.
+ */
+YAHOO.widget.ColumnChart = function(containerId, dataSource, attributes)
+{
+	YAHOO.widget.ColumnChart.superclass.constructor.call(this, "column", containerId, dataSource, attributes);
+};
+
+YAHOO.lang.extend(YAHOO.widget.ColumnChart, YAHOO.widget.CartesianChart);
+
+/**
+ * BarChart class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class BarChart
+ * @uses YAHOO.widget.CartesianChart
+ * @constructor
+ * @param containerId {HTMLElement} Container element for the Flash Player instance.
+ * @param dataSource {YAHOO.util.DataSource} DataSource instance.
+ * @param attributes {object} (optional) Object literal of configuration values.
+ */
+YAHOO.widget.BarChart = function(containerId, dataSource, attributes)
+{
+	YAHOO.widget.BarChart.superclass.constructor.call(this, "bar", containerId, dataSource, attributes);
+};
+
+YAHOO.lang.extend(YAHOO.widget.BarChart, YAHOO.widget.CartesianChart);
+
+/**
+ * Defines a CartesianChart's vertical or horizontal axis.
+ *
+ * @namespace YAHOO.widget
+ * @class Axis
+ * @constructor
+ */
+YAHOO.widget.Axis = function()
+{
+};
+
+YAHOO.widget.Axis.prototype = 
+{
+	/**
+	 * The type of axis.
+	 *
+	 * @property type
+	 * @type String
+	 */
+	type: null,
+	
+	/**
+	 * The direction in which the axis is drawn. May be "horizontal" or "vertical".
+	 *
+	 * @property orientation
+	 * @type String
+	 */
+	orientation: "horizontal",
+	
+	/**
+	 * If true, the items on the axis will be drawn in opposite direction.
+	 *
+	 * @property reverse
+	 * @type Boolean
+	 */
+	reverse: false,
+	
+	/**
+	 * A string reference to the globally-accessible function that may be called to
+	 * determine each of the label values for this axis.
+	 *
+	 * @property labelFunction
+	 * @type String
+	 */
+	labelFunction: null,
+	
+	/**
+	 * If true, labels that overlap previously drawn labels on the axis will be hidden.
+	 *
+	 * @property hideOverlappingLabels
+	 * @type Boolean
+	 */
+	hideOverlappingLabels: true
+};
+
+/**
+ * A type of axis whose units are measured in numeric values.
+ *
+ * @namespace YAHOO.widget
+ * @class NumericAxis
+ * @constructor
+ */
+YAHOO.widget.NumericAxis = function()
+{
+	YAHOO.widget.NumericAxis.superclass.constructor.call(this);
+};
+
+YAHOO.lang.extend(YAHOO.widget.NumericAxis, YAHOO.widget.Axis,
+{
+	type: "numeric",
+	
+	/**
+	 * The minimum value drawn by the axis. If not set explicitly, the axis minimum
+	 * will be calculated automatically.
+	 *
+	 * @property minimum
+	 * @type Number
+	 */
+	minimum: NaN,
+	
+	/**
+	 * The maximum value drawn by the axis. If not set explicitly, the axis maximum
+	 * will be calculated automatically.
+	 *
+	 * @property maximum
+	 * @type Number
+	 */
+	maximum: NaN,
+	
+	/**
+	 * The spacing between major intervals on this axis.
+	 *
+	 * @property majorUnit
+	 * @type Number
+	 */
+	majorUnit: NaN,
+
+	/**
+	 * The spacing between minor intervals on this axis.
+	 *
+	 * @property minorUnit
+	 * @type Number
+	 */
+	minorUnit: NaN,
+	
+	/**
+	 * If true, the labels, ticks, gridlines, and other objects will snap to
+	 * the nearest major or minor unit. If false, their position will be based
+	 * on the minimum value.
+	 *
+	 * @property snapToUnits
+	 * @type Boolean
+	 */
+	snapToUnits: true,
+
+	/**
+	 * If true, and the bounds are calculated automatically, either the minimum or
+	 * maximum will be set to zero.
+	 *
+	 * @property alwaysShowZero
+	 * @type Boolean
+	 */
+	alwaysShowZero: true,
+
+	/**
+	 * The scaling algorithm to use on this axis. May be "linear" or "logarithmic".
+	 *
+	 * @property scale
+	 * @type String
+	 */
+	scale: "linear"
+});
+
+/**
+ * A type of axis whose units are measured in time-based values.
+ *
+ * @namespace YAHOO.widget
+ * @class TimeAxis
+ * @constructor
+ */
+YAHOO.widget.TimeAxis = function()
+{
+	YAHOO.widget.TimeAxis.superclass.constructor.call(this);
+};
+
+YAHOO.lang.extend(YAHOO.widget.TimeAxis, YAHOO.widget.Axis,
+{
+	type: "time",
+	
+	/**
+	 * The minimum value drawn by the axis. If not set explicitly, the axis minimum
+	 * will be calculated automatically.
+	 *
+	 * @property minimum
+	 * @type Date
+	 */
+	minimum: null,
+
+	/**
+	 * The maximum value drawn by the axis. If not set explicitly, the axis maximum
+	 * will be calculated automatically.
+	 *
+	 * @property maximum
+	 * @type Number
+	 */
+	maximum: null,
+	
+	/**
+	 * The spacing between major intervals on this axis.
+	 *
+	 * @property majorUnit
+	 * @type Number
+	 */
+	majorUnit: NaN,
+	
+	/**
+	 * The time unit used by the majorUnit.
+	 *
+	 * @property majorTimeUnit
+	 * @type String
+	 */
+	majorTimeUnit: null,
+	
+	/**
+	 * The spacing between minor intervals on this axis.
+	 *
+	 * @property majorUnit
+	 * @type Number
+	 */
+	minorUnit: NaN,
+	
+	/**
+	 * The time unit used by the minorUnit.
+	 *
+	 * @property majorTimeUnit
+	 * @type String
+	 */
+	minorTimeUnit: null,
+
+	/**
+	 * If true, the labels, ticks, gridlines, and other objects will snap to
+	 * the nearest major or minor unit. If false, their position will be based
+	 * on the minimum value.
+	 *
+	 * @property snapToUnits
+	 * @type Boolean
+	 */
+	snapToUnits: true
+});
+
+/**
+ * A type of axis that displays items in categories.
+ *
+ * @namespace YAHOO.widget
+ * @class CategoryAxis
+ * @constructor
+ */
+YAHOO.widget.CategoryAxis = function()
+{
+	YAHOO.widget.CategoryAxis.superclass.constructor.call(this);
+};
+
+YAHOO.lang.extend(YAHOO.widget.CategoryAxis, YAHOO.widget.Axis,
+{
+	type: "category",
+	
+	/**
+	 * A list of category names to display along this axis.
+	 *
+	 * @property categoryNames
+	 * @type Array
+	 */
+	categoryNames: null
+});
+
+/**
+ * Series class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class Series
+ * @constructor
+ */
+YAHOO.widget.Series = function() {};
+
+YAHOO.widget.Series.prototype = 
+{
+	type: null,
+	displayName: null
+};
+
+/**
+ * CartesianSeries class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class CartesianSeries
+ * @constructor
+ */
+YAHOO.widget.CartesianSeries = function() 
+{
+	YAHOO.widget.CartesianSeries.superclass.constructor.call(this);
+};
+
+YAHOO.lang.extend(YAHOO.widget.CartesianSeries, YAHOO.widget.Series,
+{
+	xField: null,
+	yField: null
+});
+
+/**
+ * ColumnSeries class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class ColumnSeries
+ * @constructor
+ */
+YAHOO.widget.ColumnSeries = function() 
+{
+	YAHOO.widget.ColumnSeries.superclass.constructor.call(this);
+};
+
+YAHOO.lang.extend(YAHOO.widget.ColumnSeries, YAHOO.widget.CartesianSeries,
+{
+	type: "column"
+});
+
+/**
+ * LineSeries class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class LineSeries
+ * @constructor
+ */
+YAHOO.widget.LineSeries = function() 
+{
+	YAHOO.widget.LineSeries.superclass.constructor.call(this);
+};
+
+YAHOO.lang.extend(YAHOO.widget.LineSeries, YAHOO.widget.CartesianSeries,
+{
+	type: "line"
+});
+
+
+/**
+ * BarSeries class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class BarSeries
+ * @constructor
+ */
+YAHOO.widget.BarSeries = function() 
+{
+	YAHOO.widget.BarSeries.superclass.constructor.call(this);
+};
+
+YAHOO.lang.extend(YAHOO.widget.BarSeries, YAHOO.widget.CartesianSeries,
+{
+	type: "bar"
+});
+
+
+/**
+ * PieSeries class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class PieSeries
+ * @constructor
+ */
+YAHOO.widget.PieSeries = function() 
+{
+	YAHOO.widget.PieSeries.superclass.constructor.call(this);
+};
+
+YAHOO.lang.extend(YAHOO.widget.PieSeries, YAHOO.widget.Series,
+{
+	type: "pie",
+	dataField: null,
+	categoryField: null
+});
+
+YAHOO.register("charts", YAHOO.widget.Chart, {version: "2.4.1", build: "742"});

Added: trunk/root/static/yui/charts/charts-experimental-min.js
===================================================================
--- trunk/root/static/yui/charts/charts-experimental-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/charts/charts-experimental-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,9 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(E,C,K,F,H,J,L,G,A,D){if(!document.getElementById){return ;}this.DETECT_KEY=D?D:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(E){this.setAttribute("swf",E);}if(C){this.setAttribute("id",C);}if(K){this.setAttribute("width",K);}if(F){this.setAttribute("height",F);}if(H){this.setAttribute("version",new deconcept.PlayerVersion(H.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(J){this.addParam("bgcolor",J);}var B=L?L:"high";this.addParam("quality",B);this.setAttribute("useExpressInstal!
 l",false);this.setAttribute("doExpressInstall",false);var I=(G)?G:window.location;this.setAttribute("xiRedirectUrl",I);this.setAttribute("redirectUrl","");if(A){this.setAttribute("redirectUrl",A);}};deconcept.SWFObject.prototype={useExpressInstall:function(A){this.xiSWFPath=!A?"expressinstall.swf":A;this.setAttribute("useExpressInstall",true);},setAttribute:function(A,B){this.attributes[A]=B;},getAttribute:function(A){return this.attributes[A];},addParam:function(A,B){this.params[A]=B;},getParams:function(){return this.params;},addVariable:function(A,B){this.variables[A]=B;},getVariable:function(A){return this.variables[A];},getVariables:function(){return this.variables;},getVariablePairs:function(){var A=new Array();var B;var C=this.getVariables();for(B in C){A[A.length]=B+"="+C[B];}return A;},getSWFHTML:function(){var D="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugI!
 n");this.setAttribute("swf",this.xiSWFPath);}D="<embed type=\"!
 applicat
ion/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";D+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var C=this.getParams();for(var A in C){D+=[A]+"=\""+C[A]+"\" ";}var B=this.getVariablePairs().join("&");if(B.length>0){D+="flashvars=\""+B+"\"";}D+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}D="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";D+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var C=this.getParams();for(var A in C){D+="<param name=\""+A+"\" value=\""+C[A]+"\" />";}var B=this.getVariablePairs().join("&");if(B.length>!
 0){D+="<param name=\"flashvars\" value=\""+B+"\" />";}D+="</object>";}return D;},write:function(A){if(this.getAttribute("useExpressInstall")){var B=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(B)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var C=(typeof A=="string")?document.getElementById(A):A;C.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var C=new deconcept.PlayerVersion([0,0,0]);if(navigator.pl!
 ugins&&navigator.mimeTypes.length){var A=navigator.plugins["Sh!
 ockwave 
Flash"];if(A&&A.description){C=new deconcept.PlayerVersion(A.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var D=1;var B=3;while(D){try{B++;D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+B);C=new deconcept.PlayerVersion([B,0,0]);}catch(E){D=null;}}}else{try{var D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(E){try{var D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");C=new deconcept.PlayerVersion([6,0,21]);D.AllowScriptAccess="always";}catch(E){if(C.major==6){return C;}}try{D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(E){}}if(D!=null){C=new deconcept.PlayerVersion(D.GetVariable("$version").split(" ")[1].split(","));}}}return C;};deconcept.PlayerVersion=function(A){this.major=A[0]!=null?parseInt(A[0]):0;this.minor=A[1]!=null?parseInt(A[1]):0;this.rev=A[2]!=null?parseInt(A[2]):0;};deconcept.PlayerVersion.prototype.version!
 IsValid=function(A){if(this.major<A.major){return false;}if(this.major>A.major){return true;}if(this.minor<A.minor){return false;}if(this.minor>A.minor){return true;}if(this.rev<A.rev){return false;}return true;};deconcept.util={getRequestParameter:function(D){var C=document.location.search||document.location.hash;if(D==null){return C;}if(C){var B=C.substring(1).split("&");for(var A=0;A<B.length;A++){if(B[A].substring(0,B[A].indexOf("="))==D){return B[A].substring((B[A].indexOf("=")+1));}}}return"";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var C=document.getElementsByTagName("OBJECT");for(var B=C.length-1;B>=0;B--){C[B].style.display="none";for(var A in C[B]){if(typeof C[B][A]=="function"){C[B][A]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);
+};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(A){return document.all[A];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;YAHOO.widget.FlashAdapter=function(C,A,B){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};B=B||{};this._id=B.id=B.id||YAHOO.util.Dom.generateId(null,"yuigen");B.version=B.version||"9.0.45";B.backgroundColor=B.backgroundColor||"#ffffff";this._attributes=B;this._swfURL=C;this._embedSWF(this._swfURL,A,B.id,B.version,B.backgroundColor,B.expressInstall);this.createEvent("contentReady");};YAHOO.extend(YAHOO.widget.FlashAdapter,YAHOO.util.AttributeProvider,{_swfURL:null,_swf:null,_id:null,_attributes:null,toString:function(){return"FlashAdapter "+this._id;},_embedSWF:function(H,G,C,B,E,F){var D=new deconcept.SWF!
 Object(H,C,"100%","100%",B,E,F);if(F){D.useExpressInstall(F);}D.addParam("allowScriptAccess","always");D.addVariable("allowedDomain",document.location.hostname);D.addVariable("elementID",C);D.addVariable("eventHandler","YAHOO.widget.FlashAdapter.eventHandler");var A=YAHOO.util.Dom.get(G);var I=D.write(A);if(I){this._swf=YAHOO.util.Dom.get(C);this._swf.owner=this;}},_eventHandler:function(B){var A=B.type;switch(A){case"swfReady":this._loadHandler();return ;case"log":return ;}this.fireEvent(A,B);},_loadHandler:function(){this._initAttributes(this._attributes);this.setAttributes(this._attributes,true);this._attributes=null;this.fireEvent("contentReady");},_initAttributes:function(A){this.getAttributeConfig("swfURL",{method:this._getSWFURL});},_getSWFURL:function(){return this._swfURL;}});YAHOO.widget.FlashAdapter.eventHandler=function(A,C){var B=YAHOO.util.Dom.get(A);if(!B.owner){setTimeout(function(){YAHOO.widget.FlashAdapter.eventHandler(A,C);},0);}else{B.owner._eventHandler!
 (C);}};YAHOO.widget.Chart=function(C,A,D,B){YAHOO.widget.Chart!
 .supercl
ass.constructor.call(this,YAHOO.widget.Chart.SWFURL,A,B);this._type=C;this._dataSource=D;this.createEvent("itemMouseOverEvent");this.createEvent("itemMouseOutEvent");this.createEvent("itemClickEvent");this.createEvent("itemDoubleClickEvent");this.createEvent("itemDragStartEvent");this.createEvent("itemDragEvent");this.createEvent("itemDragEndEvent");};YAHOO.extend(YAHOO.widget.Chart,YAHOO.widget.FlashAdapter,{_type:null,_pollingID:null,_pollingInterval:null,toString:function(){return"Chart "+this._id;},setStyle:function(A,B){B=YAHOO.lang.JSON.stringify(B);this._swf.setStyle(A,B);},setStyles:function(A){A=YAHOO.lang.JSON.stringify(A);this._swf.setStyles(A);},setSeriesStyles:function(B){for(var A=0;A<B.length;A++){B[A]=YAHOO.lang.JSON.stringify(B[A]);}this._swf.setSeriesStyles(B);},_initAttributes:function(A){YAHOO.widget.Chart.superclass._initAttributes.call(this,A);this.getAttributeConfig("request",{method:this._getRequest});this.setAttributeConfig("request",{method:this._se!
 tRequest});this.getAttributeConfig("dataSource",{method:this._getDataSource});this.setAttributeConfig("dataSource",{method:this._setDataSource});this.getAttributeConfig("series",{method:this._getSeriesDefs});this.setAttributeConfig("series",{method:this._setSeriesDefs});this.getAttributeConfig("categoryNames",{method:this._getCategoryNames});this.setAttributeConfig("categoryNames",{validator:YAHOO.lang.isArray,method:this._setCategoryNames});this.getAttributeConfig("dataTipFunction",{method:this._getDataTipFunction});this.setAttributeConfig("dataTipFunction",{method:this._setDataTipFunction});this.getAttributeConfig("polling",{method:this._getPolling});this.setAttributeConfig("polling",{method:this._setPolling});},_loadHandler:function(){this._swf.setType(this._type);if(this._attributes.style){var A=this._attributes.style;this.setStyles(A);}YAHOO.widget.Chart.superclass._loadHandler.call(this);if(this._dataSource){this.set("dataSource",this._dataSource);}},_refreshData:func!
 tion(){if(this._dataSource!=null){if(this._pollingID!=null){th!
 is._data
Source.clearInterval(this._pollingID);this._pollingID=null;}if(this._pollingInterval>0){this._pollingID=this._dataSource.setInterval(this._pollingInterval,this._request,this._loadDataHandler,this);}else{this._dataSource.sendRequest(this._request,this._loadDataHandler,this);}}},_loadDataHandler:function(D,C,J){if(J){}else{var I=false;var F=[];var E=0;if(this._seriesDefs){E=this._seriesDefs.length;for(var H=0;H<E;H++){var K=this._seriesDefs[H];var B={};for(var A in K){if(A=="style"&&K.style!=null){B.style=YAHOO.lang.JSON.stringify(K.style);I=true;K.style=null;}else{B[A]=K[A];}}F.push(B);}}if(E>0){for(H=0;H<E;H++){K=F[H];if(!K.type){K.type=this._type;}K.dataProvider=C.results;}}else{var G={type:this._type,dataProvider:C.results};F.push(G);}this._swf.setDataProvider(F,I);}},_request:"",_getRequest:function(){return this._request;},_setRequest:function(A){this._request=A;this._refreshData();},_dataSource:null,_getDataSource:function(){return this._dataSource;},_setDataSource:func!
 tion(A){this._dataSource=A;this._refreshData();},_seriesDefs:null,_getSeriesDefs:function(){return this._seriesDefs;},_setSeriesDefs:function(A){this._seriesDefs=A;},_getCategoryNames:function(){return this._swf.getCategoryNames();},_setCategoryNames:function(A){this._swf.setCategoryNames(A);},_dataTipFunction:null,_getDataTipFunction:function(){return this._dataTipFunction;},_setDataTipFunction:function(A){this._dataTipFunction=A;this._swf.setDataTipFunction(A);},_getPolling:function(){return this._pollingInterval;},_setPolling:function(A){this._pollingInterval=A;this._refreshData();}});YAHOO.widget.Chart.SWFURL="assets/charts.swf";YAHOO.widget.PieChart=function(A,C,B){YAHOO.widget.PieChart.superclass.constructor.call(this,"pie",A,C,B);};YAHOO.lang.extend(YAHOO.widget.PieChart,YAHOO.widget.Chart,{_initAttributes:function(A){YAHOO.widget.PieChart.superclass._initAttributes.call(this,A);this.getAttributeConfig("dataField",{method:this._getDataField});
+this.setAttributeConfig("dataField",{validator:YAHOO.lang.isString,method:this._setDataField});this.getAttributeConfig("categoryField",{method:this._getCategoryField});this.setAttributeConfig("categoryField",{validator:YAHOO.lang.isString,method:this._setCategoryField});},_getDataField:function(){return this._swf.getDataField();},_setDataField:function(A){this._swf.setDataField(A);},_getCategoryField:function(){return this._swf.getCategoryField();},_setCategoryField:function(A){this._swf.setCategoryField(A);}});YAHOO.widget.CartesianChart=function(C,A,D,B){YAHOO.widget.CartesianChart.superclass.constructor.call(this,C,A,D,B);};YAHOO.lang.extend(YAHOO.widget.CartesianChart,YAHOO.widget.Chart,{_initAttributes:function(A){YAHOO.widget.CartesianChart.superclass._initAttributes.call(this,A);this.getAttributeConfig("xField",{method:this._getXField});this.setAttributeConfig("xField",{validator:YAHOO.lang.isString,method:this._setXField});this.getAttributeConfig("yField",{method:th!
 is._getYField});this.setAttributeConfig("yField",{validator:YAHOO.lang.isString,method:this._setYField});this.setAttributeConfig("xAxis",{method:this._setXAxis});this.setAttributeConfig("yAxis",{method:this._setYAxis});},_getXField:function(){return this._swf.getHorizontalField();},_setXField:function(A){this._swf.setHorizontalField(A);},_getYField:function(){return this._swf.getVerticalField();},_setYField:function(A){this._swf.setVerticalField(A);},_setXAxis:function(A){this._swf.setHorizontalAxis(A);},_setYAxis:function(A){this._swf.setVerticalAxis(A);}});YAHOO.widget.LineChart=function(A,C,B){YAHOO.widget.LineChart.superclass.constructor.call(this,"line",A,C,B);};YAHOO.lang.extend(YAHOO.widget.LineChart,YAHOO.widget.CartesianChart);YAHOO.widget.ColumnChart=function(A,C,B){YAHOO.widget.ColumnChart.superclass.constructor.call(this,"column",A,C,B);};YAHOO.lang.extend(YAHOO.widget.ColumnChart,YAHOO.widget.CartesianChart);YAHOO.widget.BarChart=function(A,C,B){YAHOO.widget.Ba!
 rChart.superclass.constructor.call(this,"bar",A,C,B);};YAHOO.l!
 ang.exte
nd(YAHOO.widget.BarChart,YAHOO.widget.CartesianChart);YAHOO.widget.Axis=function(){};YAHOO.widget.Axis.prototype={type:null,orientation:"horizontal",reverse:false,labelFunction:null,hideOverlappingLabels:true};YAHOO.widget.NumericAxis=function(){YAHOO.widget.NumericAxis.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.NumericAxis,YAHOO.widget.Axis,{type:"numeric",minimum:NaN,maximum:NaN,majorUnit:NaN,minorUnit:NaN,snapToUnits:true,alwaysShowZero:true,scale:"linear"});YAHOO.widget.TimeAxis=function(){YAHOO.widget.TimeAxis.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.TimeAxis,YAHOO.widget.Axis,{type:"time",minimum:null,maximum:null,majorUnit:NaN,majorTimeUnit:null,minorUnit:NaN,minorTimeUnit:null,snapToUnits:true});YAHOO.widget.CategoryAxis=function(){YAHOO.widget.CategoryAxis.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.CategoryAxis,YAHOO.widget.Axis,{type:"category",categoryNames:null});YAHOO.widget.Series=functio!
 n(){};YAHOO.widget.Series.prototype={type:null,displayName:null};YAHOO.widget.CartesianSeries=function(){YAHOO.widget.CartesianSeries.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.CartesianSeries,YAHOO.widget.Series,{xField:null,yField:null});YAHOO.widget.ColumnSeries=function(){YAHOO.widget.ColumnSeries.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.ColumnSeries,YAHOO.widget.CartesianSeries,{type:"column"});YAHOO.widget.LineSeries=function(){YAHOO.widget.LineSeries.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.LineSeries,YAHOO.widget.CartesianSeries,{type:"line"});YAHOO.widget.BarSeries=function(){YAHOO.widget.BarSeries.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.BarSeries,YAHOO.widget.CartesianSeries,{type:"bar"});YAHOO.widget.PieSeries=function(){YAHOO.widget.PieSeries.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.PieSeries,YAHOO.widget.Series,{type:"pie",dataField:n!
 ull,categoryField:null});YAHOO.register("charts",YAHOO.widget.!
 Chart,{v
ersion:"2.4.1",build:"742"});
\ No newline at end of file

Added: trunk/root/static/yui/charts/charts-experimental.js
===================================================================
--- trunk/root/static/yui/charts/charts-experimental.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/charts/charts-experimental.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,1710 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+/**
+ * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
+ *
+ * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ */
+if(typeof deconcept == "undefined") var deconcept = new Object();
+if(typeof deconcept.util == "undefined") deconcept.util = new Object();
+if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
+deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) {
+	if (!document.getElementById) { return; }
+	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
+	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
+	this.params = new Object();
+	this.variables = new Object();
+	this.attributes = new Array();
+	if(swf) { this.setAttribute('swf', swf); }
+	if(id) { this.setAttribute('id', id); }
+	if(w) { this.setAttribute('width', w); }
+	if(h) { this.setAttribute('height', h); }
+	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
+	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
+	if (!window.opera && document.all && this.installedVer.major > 7) {
+		// only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
+		deconcept.SWFObject.doPrepUnload = true;
+	}
+	if(c) { this.addParam('bgcolor', c); }
+	var q = quality ? quality : 'high';
+	this.addParam('quality', q);
+	this.setAttribute('useExpressInstall', false);
+	this.setAttribute('doExpressInstall', false);
+	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
+	this.setAttribute('xiRedirectUrl', xir);
+	this.setAttribute('redirectUrl', '');
+	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
+}
+deconcept.SWFObject.prototype = {
+	useExpressInstall: function(path) {
+		this.xiSWFPath = !path ? "expressinstall.swf" : path;
+		this.setAttribute('useExpressInstall', true);
+	},
+	setAttribute: function(name, value){
+		this.attributes[name] = value;
+	},
+	getAttribute: function(name){
+		return this.attributes[name];
+	},
+	addParam: function(name, value){
+		this.params[name] = value;
+	},
+	getParams: function(){
+		return this.params;
+	},
+	addVariable: function(name, value){
+		this.variables[name] = value;
+	},
+	getVariable: function(name){
+		return this.variables[name];
+	},
+	getVariables: function(){
+		return this.variables;
+	},
+	getVariablePairs: function(){
+		var variablePairs = new Array();
+		var key;
+		var variables = this.getVariables();
+		for(key in variables){
+			variablePairs[variablePairs.length] = key +"="+ variables[key];
+		}
+		return variablePairs;
+	},
+	getSWFHTML: function() {
+		var swfNode = "";
+		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
+			if (this.getAttribute("doExpressInstall")) {
+				this.addVariable("MMplayerType", "PlugIn");
+				this.setAttribute('swf', this.xiSWFPath);
+			}
+			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'"';
+			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
+			var params = this.getParams();
+			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
+			var pairs = this.getVariablePairs().join("&");
+			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
+			swfNode += '/>';
+		} else { // PC IE
+			if (this.getAttribute("doExpressInstall")) {
+				this.addVariable("MMplayerType", "ActiveX");
+				this.setAttribute('swf', this.xiSWFPath);
+			}
+			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'">';
+			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
+			var params = this.getParams();
+			for(var key in params) {
+			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
+			}
+			var pairs = this.getVariablePairs().join("&");
+			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
+			swfNode += "</object>";
+		}
+		return swfNode;
+	},
+	write: function(elementId){
+		if(this.getAttribute('useExpressInstall')) {
+			// check to see if we need to do an express install
+			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
+			if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
+				this.setAttribute('doExpressInstall', true);
+				this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
+				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
+				this.addVariable("MMdoctitle", document.title);
+			}
+		}
+		if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
+			var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
+			n.innerHTML = this.getSWFHTML();
+			return true;
+		}else{
+			if(this.getAttribute('redirectUrl') != "") {
+				document.location.replace(this.getAttribute('redirectUrl'));
+			}
+		}
+		return false;
+	}
+}
+
+/* ---- detection functions ---- */
+deconcept.SWFObjectUtil.getPlayerVersion = function(){
+	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
+	if(navigator.plugins && navigator.mimeTypes.length){
+		var x = navigator.plugins["Shockwave Flash"];
+		if(x && x.description) {
+			PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
+		}
+	}else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){ // if Windows CE
+		var axo = 1;
+		var counter = 3;
+		while(axo) {
+			try {
+				counter++;
+				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
+//				document.write("player v: "+ counter);
+				PlayerVersion = new deconcept.PlayerVersion([counter,0,0]);
+			} catch (e) {
+				axo = null;
+			}
+		}
+	} else { // Win IE (non mobile)
+		// do minor version lookup in IE, but avoid fp6 crashing issues
+		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
+		try{
+			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
+		}catch(e){
+			try {
+				var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
+				PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
+				axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
+			} catch(e) {
+				if (PlayerVersion.major == 6) {
+					return PlayerVersion;
+				}
+			}
+			try {
+				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
+			} catch(e) {}
+		}
+		if (axo != null) {
+			PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
+		}
+	}
+	return PlayerVersion;
+}
+deconcept.PlayerVersion = function(arrVersion){
+	this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
+	this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
+	this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
+}
+deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
+	if(this.major < fv.major) return false;
+	if(this.major > fv.major) return true;
+	if(this.minor < fv.minor) return false;
+	if(this.minor > fv.minor) return true;
+	if(this.rev < fv.rev) return false;
+	return true;
+}
+/* ---- get value of query string param ---- */
+deconcept.util = {
+	getRequestParameter: function(param) {
+		var q = document.location.search || document.location.hash;
+		if (param == null) { return q; }
+		if(q) {
+			var pairs = q.substring(1).split("&");
+			for (var i=0; i < pairs.length; i++) {
+				if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+					return pairs[i].substring((pairs[i].indexOf("=")+1));
+				}
+			}
+		}
+		return "";
+	}
+}
+/* fix for video streaming bug */
+deconcept.SWFObjectUtil.cleanupSWFs = function() {
+	var objects = document.getElementsByTagName("OBJECT");
+	for (var i = objects.length - 1; i >= 0; i--) {
+		objects[i].style.display = 'none';
+		for (var x in objects[i]) {
+			if (typeof objects[i][x] == 'function') {
+				objects[i][x] = function(){};
+			}
+		}
+	}
+}
+// fixes bug in some fp9 versions see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
+if (deconcept.SWFObject.doPrepUnload) {
+	if (!deconcept.unloadSet) {
+		deconcept.SWFObjectUtil.prepUnload = function() {
+			__flash_unloadHandler = function(){};
+			__flash_savedUnloadHandler = function(){};
+			window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs);
+		}
+		window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
+		deconcept.unloadSet = true;
+	}
+}
+/* add document.getElementById if needed (mobile IE < 5) */
+if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }}
+
+/* add some aliases for ease of use/backwards compatibility */
+var getQueryParamValue = deconcept.util.getRequestParameter;
+var FlashObject = deconcept.SWFObject; // for legacy support
+var SWFObject = deconcept.SWFObject;
+
+/**
+ * Wraps Flash embedding functionality and allows communication with SWF through
+ * attributes.
+ *
+ * @namespace YAHOO.widget
+ * @class FlashAdapter
+ * @uses YAHOO.util.AttributeProvider
+ */
+YAHOO.widget.FlashAdapter = function(swfURL, containerID, attributes)
+{
+	// set up the initial events and attributes stuff
+	this._queue = this._queue || [];
+	this._events = this._events || {};
+	this._configs = this._configs || {};
+	attributes = attributes || {};
+	
+	//the Flash Player external interface code from Adobe doesn't play nicely
+	//with the default value, yui-gen, in IE
+	this._id = attributes.id = attributes.id || YAHOO.util.Dom.generateId(null, "yuigen");
+	attributes.version = attributes.version || "9.0.45";
+	attributes.backgroundColor = attributes.backgroundColor || "#ffffff";
+	
+	//we can't use the initial attributes right away
+	//so save them for once the SWF finishes loading
+	this._attributes = attributes;
+	
+	this._swfURL = swfURL;
+	
+	//embed the SWF file in the page
+	this._embedSWF(this._swfURL, containerID, attributes.id, attributes.version, attributes.backgroundColor, attributes.expressInstall);
+	
+	/**
+	 * Fires when the SWF is initialized and communication is possible.
+	 * @event contentReady
+	 */
+	this.createEvent("contentReady");
+};
+
+YAHOO.extend(YAHOO.widget.FlashAdapter, YAHOO.util.AttributeProvider,
+{
+	/**
+	 * The URL of the SWF file.
+	 * @property _swfURL
+	 * @type String
+	 * @private
+	 */
+	_swfURL: null,
+
+	/**
+	 * A reference to the embedded SWF file.
+	 * @property _swf
+	 * @private
+	 */
+	_swf: null,
+
+	/**
+	 * The id of this instance.
+	 * @property _id
+	 * @type String
+	 * @private
+	 */
+	_id: null,
+	
+	/**
+	 * The initializing attributes are stored here until the SWF is ready.
+	 * @property _attributes
+	 * @type Object
+	 * @private
+	 */
+	_attributes: null, //the intializing attributes
+
+	/**
+	 * Public accessor to the unique name of the FlashAdapter instance.
+	 *
+	 * @method toString
+	 * @return {String} Unique name of the FlashAdapter instance.
+	 */
+	toString: function()
+	{
+		return "FlashAdapter " + this._id;
+	},
+
+	/**
+	 * Embeds the SWF in the page and associates it with this instance.
+	 *
+	 * @method _embedSWF
+	 * @private
+	 */
+	_embedSWF: function(swfURL, containerID, swfID, version, backgroundColor, expressInstall)
+	{
+		//standard SWFObject embed
+		var swfObj = new deconcept.SWFObject(swfURL, swfID, "100%", "100%", version, backgroundColor, expressInstall);
+		
+		if(expressInstall)
+		{
+			swfObj.useExpressInstall(expressInstall);
+		}
+
+		//make sure we can communicate with ExternalInterface
+		swfObj.addParam("allowScriptAccess", "always");
+		//again, a useful ExternalInterface trick
+		swfObj.addVariable("allowedDomain", document.location.hostname);
+
+		//tell the SWF which HTML element it is in
+		swfObj.addVariable("elementID", swfID);
+
+		// set the name of the function to call when the swf has an event
+		swfObj.addVariable("eventHandler", "YAHOO.widget.FlashAdapter.eventHandler");
+
+		var container = YAHOO.util.Dom.get(containerID);
+		var result = swfObj.write(container);
+		if(result)
+		{
+			this._swf = YAHOO.util.Dom.get(swfID);
+			//if successful, let's add an owner property to the SWF reference
+			//this will allow the event handler to communicate with a YAHOO.widget.FlashAdapter
+			this._swf.owner = this;
+		}
+	},
+
+	/**
+	 * Handles or re-dispatches events received from the SWF.
+	 *
+	 * @method _eventHandler
+	 * @private
+	 */
+	_eventHandler: function(event)
+	{
+		var type = event.type;
+		switch(type)
+		{
+			case "swfReady":
+			{
+   				this._loadHandler();
+				return;
+			}
+			case "log":
+			{
+				return;
+			}
+		}
+		
+		//be sure to return after your case or the event will automatically fire!
+		this.fireEvent(type, event);
+	},
+
+	/**
+	 * Called when the SWF has been initialized.
+	 *
+	 * @method _loadHandler
+	 * @private
+	 */
+	_loadHandler: function()
+	{
+		this._initAttributes(this._attributes);
+		this.setAttributes(this._attributes, true);
+		this._attributes = null;
+		
+		this.fireEvent("contentReady");
+	},
+	
+	/**
+	 * Initializes the attributes.
+	 *
+	 * @method _initAttributes
+	 * @private
+	 */
+	_initAttributes: function(attributes)
+	{
+		//should be overridden if other attributes need to be set up
+		
+		/**
+		 * @attribute swfURL
+		 * @description Absolute or relative URL to the SWF displayed by the FlashAdapter.
+		 * @type String
+		 */
+		this.getAttributeConfig("swfURL",
+		{
+			method: this._getSWFURL
+		});
+	},
+	
+	/**
+	 * Getter for swfURL attribute.
+	 *
+	 * @method _getSWFURL
+	 * @private
+	 */
+	_getSWFURL: function()
+	{
+		return this._swfURL;
+	}
+});
+
+/**
+ * Receives event messages from SWF and passes them to the correct instance
+ * of FlashAdapter.
+ *
+ * @method YAHOO.widget.FlashAdapter.eventHandler
+ * @static
+ * @private
+ */
+YAHOO.widget.FlashAdapter.eventHandler = function(elementID, event)
+{
+	var loadedSWF = YAHOO.util.Dom.get(elementID);
+	if(!loadedSWF.owner)
+	{
+		//fix for ie: if owner doesn't exist yet, try again in a moment
+		setTimeout(function() { YAHOO.widget.FlashAdapter.eventHandler( elementID, event ); }, 0);
+	}
+	else loadedSWF.owner._eventHandler(event);
+};
+
+/**
+ * The Charts widget provides a Flash control for displaying data
+ * graphically by series across A-grade browsers with Flash Player installed.
+ *
+ * @module charts
+ * @requires yahoo, dom, event, datasource
+ * @title Charts Widget
+ * @beta
+ */
+
+/**
+ * Chart class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class Chart
+ * @uses YAHOO.util.FlashAdapter
+ * @constructor
+ * @param type {String} The char type. May be "line", "column", "bar", or "pie"
+ * @param containerId {HTMLElement} Container element for the Flash Player instance.
+ * @param dataSource {YAHOO.util.DataSource} DataSource instance.
+ * @param attributes {object} (optional) Object literal of configuration values.
+ */
+YAHOO.widget.Chart = function(type, containerId, dataSource, attributes)
+{
+	YAHOO.widget.Chart.superclass.constructor.call(this, YAHOO.widget.Chart.SWFURL, containerId, attributes);
+	
+	this._type = type;
+	this._dataSource = dataSource;
+	
+	/**
+	 * Fires when the user moves the mouse over the bounds of an item renderer in the chart.
+	 *
+	 * @event itemMouseOverEvent
+	 * @param event.type {String} The event type
+	 * @param event.item {Object} The data displayed by the renderer
+	 * @param event.index {Number} The position within the series that the item appears.
+	 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
+	 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
+	 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
+	 */
+	this.createEvent("itemMouseOverEvent");
+	
+	/**
+	 * Fires when the user moves the mouse out of the bounds of an item renderer in the chart.
+	 *
+	 * @event itemMouseOutEvent
+	 * @param event.type {String} The event type
+	 * @param event.item {Object} The data displayed by the renderer
+	 * @param event.index {Number} The position within the series that the item appears.
+	 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
+	 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
+	 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
+	 */
+	this.createEvent("itemMouseOutEvent");
+	
+	/**
+	 * Fires when the user clicks an item renderer in the chart with the mouse.
+	 *
+	 * @event itemClickEvent
+	 * @param event.type {String} The event type
+	 * @param event.item {Object} The data displayed by the renderer
+	 * @param event.index {Number} The position within the series that the item appears.
+	 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
+	 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
+	 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
+	 */
+	this.createEvent("itemClickEvent");
+	
+	/**
+	 * Fires when the user double-clicks an item renderer in the chart with the mouse.
+	 *
+	 * @event itemDoubleClickEvent
+	 * @param event.type {String} The event type
+	 * @param event.item {Object} The data displayed by the renderer
+	 * @param event.index {Number} The position within the series that the item appears.
+	 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
+	 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
+	 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
+	 */
+	this.createEvent("itemDoubleClickEvent");
+	
+	/**
+	 * Fires when the user presses the mouse down on an item to initiate a drag action.
+	 *
+	 * @event itemDragStartEvent
+	 * @param event.type {String} The event type
+	 * @param event.item {Object} The data displayed by the renderer
+	 * @param event.index {Number} The position within the series that the item appears.
+	 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
+	 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
+	 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
+	 */
+	this.createEvent("itemDragStartEvent");
+	
+	/**
+	 * Fires when the user moves the mouse during a drag action.
+	 *
+	 * @event itemDragEvent
+	 * @param event.type {String} The event type
+	 * @param event.item {Object} The data displayed by the renderer
+	 * @param event.index {Number} The position within the series that the item appears.
+	 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
+	 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
+	 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
+	 */
+	this.createEvent("itemDragEvent");
+
+	/**
+	 * Fires when the user releases the mouse during a drag action.
+	 *
+	 * @event itemDragEndEvent
+	 * @param event.type {String} The event type
+	 * @param event.item {Object} The data displayed by the renderer
+	 * @param event.index {Number} The position within the series that the item appears.
+	 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
+	 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
+	 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
+	 */
+	this.createEvent("itemDragEndEvent");
+};
+
+YAHOO.extend(YAHOO.widget.Chart, YAHOO.widget.FlashAdapter,
+{
+	/**
+	 * The type of this chart instance.
+	 * @property _type
+	 * @type String
+	 * @private
+	 */
+	_type: null,
+
+	/**
+	 * The id returned from the DataSource's setInterval function.
+	 * @property _pollingID
+	 * @type Number
+	 * @private
+	 */
+	_pollingID: null,
+
+	/**
+	 * The time, in ms, between requests for data.
+	 * @property _pollingInterval
+	 * @type Number
+	 * @private
+	 */
+	_pollingInterval: null,
+
+	/**
+	 * Public accessor to the unique name of the Chart instance.
+	 *
+	 * @method toString
+	 * @return {String} Unique name of the Chart instance.
+	 */
+	toString: function()
+	{
+		return "Chart " + this._id;
+	},
+	
+	/**
+	 * Sets a single style value on the Chart instance.
+	 *
+	 * @method setStyle
+	 * @param name {String} Name of the Chart style value to change.
+	 * @param value {Object} New value to pass to the Chart style.
+	 */
+	setStyle: function(name, value)
+	{
+		//we must jsonify this because Flash Player versions below 9.0.60 don't handle
+		//complex ExternalInterface parsing correctly
+		value = YAHOO.lang.JSON.stringify(value);
+		this._swf.setStyle(name, value);
+	},
+	
+	/**
+	 * Resets all styles on the Chart instance.
+	 *
+	 * @method setStyles
+	 * @param styles {Object} Initializer for all Chart styles.
+	 */
+	setStyles: function(styles)
+	{
+		//we must jsonify this because Flash Player versions below 9.0.60 don't handle
+		//complex ExternalInterface parsing correctly
+		styles = YAHOO.lang.JSON.stringify(styles);
+		this._swf.setStyles(styles);
+	},
+	
+	/**
+	 * Sets the styles on all series in the Chart.
+	 *
+	 * @method setSeriesStyles
+	 * @param styles {Array} Initializer for all Chart series styles.
+	 */
+	setSeriesStyles: function(styles)
+	{
+		//we must jsonify this because Flash Player versions below 9.0.60 don't handle
+		//complex ExternalInterface parsing correctly
+		for(var i = 0; i < styles.length; i++)
+		{
+			styles[i] = YAHOO.lang.JSON.stringify(styles[i]);	
+		}
+		this._swf.setSeriesStyles(styles);
+	},
+	
+	/**
+	 * Initializes the attributes.
+	 *
+	 * @method _initAttributes
+	 * @private
+	 */
+	_initAttributes: function(attributes)
+	{
+		YAHOO.widget.Chart.superclass._initAttributes.call(this, attributes);
+
+		/**
+		 * @attribute request
+		 * @description Request to be sent to the Chart's DataSource.
+		 * @type String
+		 */
+		this.getAttributeConfig("request",
+		{
+			method: this._getRequest
+		});
+		
+		this.setAttributeConfig("request",
+		{
+			method: this._setRequest
+		});
+		
+		/**
+		 * @attribute dataSource
+		 * @description The DataSource instance to display in the Chart.
+		 * @type DataSource
+		 */
+		this.getAttributeConfig("dataSource",
+		{
+			method: this._getDataSource
+		});
+		
+		this.setAttributeConfig("dataSource",
+		{
+			method: this._setDataSource
+		});
+		
+		/**
+		 * @attribute series
+		 * @description Defines the series to be displayed by the Chart.
+		 * @type Array
+		 */
+		this.getAttributeConfig("series",
+		{
+			method: this._getSeriesDefs
+		});
+		
+		this.setAttributeConfig("series",
+		{
+			method: this._setSeriesDefs
+		});
+		
+		/**
+		 * @attribute categoryNames
+		 * @description Defines the names of the categories to be displayed in the Chart..
+		 * @type Array
+		 */
+		this.getAttributeConfig("categoryNames",
+		{
+			method: this._getCategoryNames
+		});
+		
+		this.setAttributeConfig("categoryNames",
+		{
+			validator: YAHOO.lang.isArray,
+			method: this._setCategoryNames
+		});
+		
+		/**
+		 * @attribute dataTipFunction
+		 * @description The string representation of a globally-accessible function
+		 * that may be called by the SWF to generate the datatip text for a Chart's item.
+		 * @type String
+		 */
+		this.getAttributeConfig("dataTipFunction",
+		{
+			method: this._getDataTipFunction
+		});
+		
+		this.setAttributeConfig("dataTipFunction",
+		{
+			method: this._setDataTipFunction
+		});
+
+		/**
+		 * @attribute polling
+		 * @description A numeric value indicating the number of milliseconds between
+		 * polling requests to the DataSource.
+		 * @type Number
+		 */
+		this.getAttributeConfig("polling",
+		{
+			method: this._getPolling
+		});
+
+		this.setAttributeConfig("polling",
+		{
+			method: this._setPolling
+		});
+	},
+	
+	/**
+	 * Called when the SWF is ready for communication. Sets the type, initializes
+	 * the styles, and sets the DataSource.
+	 *
+	 * @method _loadHandler
+	 * @private
+	 */
+	_loadHandler: function()
+	{
+		this._swf.setType(this._type);
+		
+		//set initial styles
+		if(this._attributes.style)
+		{
+			var style = this._attributes.style;
+			this.setStyles(style);		
+		}
+		
+		YAHOO.widget.Chart.superclass._loadHandler.call(this);
+		
+		if(this._dataSource)
+		{
+			this.set("dataSource", this._dataSource);
+		}
+	},
+
+	/**
+	 * Sends the request to the DataSource.
+	 *
+	 * @method _refreshData
+	 * @private
+	 */
+	_refreshData: function()
+	{
+		if(this._dataSource != null)
+		{
+			if(this._pollingID != null)
+			{
+				this._dataSource.clearInterval(this._pollingID);
+				this._pollingID = null;
+			}
+			
+			if(this._pollingInterval > 0)
+			{
+				this._pollingID = this._dataSource.setInterval(this._pollingInterval, this._request, this._loadDataHandler, this);
+			}
+			else
+			{
+				this._dataSource.sendRequest(this._request, this._loadDataHandler, this);
+			}
+		}
+	},
+
+	/**
+	 * Called when the DataSource receives new data. The series definitions are used
+	 * to build a data provider for the SWF chart.
+	 *
+	 * @method _loadDataHandler
+	 * @private
+	 */
+	_loadDataHandler: function(request, response, error)
+	{
+		if(error)
+		{
+		}
+		else
+		{
+			var styleChanged = false;
+			
+			//make a copy of the series definitions so that we aren't
+			//editing them directly.
+			var dataProvider = [];	
+			var seriesCount = 0;
+			if(this._seriesDefs)
+			{
+				seriesCount = this._seriesDefs.length;
+				for(var i = 0; i < seriesCount; i++)
+				{
+					var currentSeries = this._seriesDefs[i];
+					var clonedSeries = {};
+					for(var prop in currentSeries)
+					{
+						
+						if(prop == "style" && currentSeries.style != null)
+						{
+							clonedSeries.style = YAHOO.lang.JSON.stringify(currentSeries.style);
+							styleChanged = true;
+							
+							//we don't want to modify the styles again next time
+							//so null out the style property.
+							currentSeries.style = null;
+						}
+						else clonedSeries[prop] = currentSeries[prop];
+					}
+					dataProvider.push(clonedSeries);
+				}
+			}
+			
+			if(seriesCount > 0)
+			{
+				for(i = 0; i < seriesCount; i++)
+				{
+					currentSeries = dataProvider[i];
+					if(!currentSeries.type)
+					{
+						currentSeries.type = this._type;
+					}
+					currentSeries.dataProvider = response.results;
+				}
+			}
+			else
+			{
+				var series = {type: this._type, dataProvider: response.results};
+				dataProvider.push(series);
+			}
+			this._swf.setDataProvider(dataProvider, styleChanged);
+		}
+	},
+
+	/**
+	 * Storage for the request attribute.
+	 * 
+	 * @property _request
+	 * @private
+	 */
+	_request: "",
+	
+	/**
+	 * Getter for the request attribute.
+	 *
+	 * @method _getRequest
+	 * @private
+	 */
+	_getRequest: function()
+	{
+		return this._request;
+	},
+	
+	/**
+	 * Setter for the request attribute.
+	 *
+	 * @method _setRequest
+	 * @private
+	 */
+	_setRequest: function(value)
+	{
+		this._request = value;
+		this._refreshData();
+	},
+
+	/**
+	 * Storage for the dataSource attribute.
+	 * 
+	 * @property _dataSource
+	 * @private
+	 */
+	_dataSource: null,
+	
+	/**
+	 * Getter for the dataSource attribute.
+	 *
+	 * @method _getDataSource
+	 * @private
+	 */
+	_getDataSource: function()
+	{
+		return this._dataSource;
+	},
+
+	/**
+	 * Setter for the dataSource attribute.
+	 *
+	 * @method _setDataSource
+	 * @private
+	 */
+	_setDataSource: function(value)
+	{	
+		this._dataSource = value;
+		this._refreshData();
+	},
+	
+	/**
+	 * Storage for the series attribute.
+	 * 
+	 * @property _seriesDefs
+	 * @private
+	 */
+	_seriesDefs: null,
+	
+	/**
+	 * Getter for the series attribute.
+	 *
+	 * @method _getSeriesDefs
+	 * @private
+	 */
+	_getSeriesDefs: function()
+	{
+		return this._seriesDefs;
+	},
+	
+	/**
+	 * Setter for the series attribute.
+	 *
+	 * @method _setSeriesDefs
+	 * @private
+	 */
+	_setSeriesDefs: function(value)
+	{
+		this._seriesDefs = value;
+	},
+
+	/**
+	 * Getter for the categoryNames attribute.
+	 *
+	 * @method _getCategoryNames
+	 * @private
+	 */
+	_getCategoryNames: function()
+	{
+		return this._swf.getCategoryNames();
+	},
+
+	/**
+	 * Setter for the categoryNames attribute.
+	 *
+	 * @method _setCategoryNames
+	 * @private
+	 */
+	_setCategoryNames: function(value)
+	{
+		this._swf.setCategoryNames(value);
+	},
+	
+	/**
+	 * Storage for the dataTipFunction attribute.
+	 *
+	 * @property _dataTipFunction
+	 * @private
+	 */
+	_dataTipFunction: null,
+	
+	/**
+	 * Getter for the dataTipFunction attribute.
+	 *
+	 * @method _getDataTipFunction
+	 * @private
+	 */
+	_getDataTipFunction: function()
+	{
+		return this._dataTipFunction;
+	},
+	
+	/**
+	 * Setter for the dataTipFunction attribute.
+	 *
+	 * @method _setDataTipFunction
+	 * @private
+	 */
+	_setDataTipFunction: function(value)
+	{
+		this._dataTipFunction = value;
+		this._swf.setDataTipFunction(value);
+	},
+
+	/**
+	 * Getter for the polling attribute.
+	 *
+	 * @method _getPolling
+	 * @private
+	 */
+	_getPolling: function()
+	{
+		return this._pollingInterval;
+	},
+
+	/**
+	 * Setter for the polling attribute.
+	 *
+	 * @method _setPolling
+	 * @private
+	 */
+	_setPolling: function(value)
+	{
+		this._pollingInterval = value;
+		this._refreshData();
+	}
+});
+
+/**
+ * Storage for the dataTipFunction attribute.
+ *
+ * @property Chart.SWFURL
+ * @private
+ * @static
+ * @final
+ * @default "assets/charts.swf"
+ */
+YAHOO.widget.Chart.SWFURL = "assets/charts.swf";
+
+/**
+ * PieChart class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class PieChart
+ * @uses YAHOO.widget.CartesianChart
+ * @constructor
+ * @param containerId {HTMLElement} Container element for the Flash Player instance.
+ * @param dataSource {YAHOO.util.DataSource} DataSource instance.
+ * @param attributes {object} (optional) Object literal of configuration values.
+ */
+YAHOO.widget.PieChart = function(containerId, dataSource, attributes)
+{
+	YAHOO.widget.PieChart.superclass.constructor.call(this, "pie", containerId, dataSource, attributes);
+};
+
+YAHOO.lang.extend(YAHOO.widget.PieChart, YAHOO.widget.Chart,
+{
+	/**
+	 * Initializes the attributes.
+	 *
+	 * @method _initAttributes
+	 * @private
+	 */
+	_initAttributes: function(attributes)
+	{	
+		YAHOO.widget.PieChart.superclass._initAttributes.call(this, attributes);
+		
+		/**
+		 * @attribute dataField
+		 * @description The field in each item that corresponds to the data value.
+		 * @type String
+		 */
+		this.getAttributeConfig("dataField",
+		{
+			method: this._getDataField
+		});
+   
+		this.setAttributeConfig("dataField",
+		{
+			validator: YAHOO.lang.isString,
+			method: this._setDataField
+		});
+   
+		/**
+		 * @attribute categoryField
+		 * @description The field in each item that corresponds to the category value.
+		 * @type String
+		 */
+		this.getAttributeConfig("categoryField",
+		{
+			method: this._getCategoryField
+		});
+   
+		this.setAttributeConfig("categoryField",
+		{
+			validator: YAHOO.lang.isString,
+			method: this._setCategoryField
+		});
+	},
+
+	/**
+	 * Getter for the dataField attribute.
+	 *
+	 * @method _getDataField
+	 * @private
+	 */
+	_getDataField: function()
+	{
+		return this._swf.getDataField();
+	},
+
+	/**
+	 * Setter for the dataField attribute.
+	 *
+	 * @method _setDataField
+	 * @private
+	 */
+	_setDataField: function(value)
+	{
+		this._swf.setDataField(value);
+	},
+
+	/**
+	 * Getter for the categoryField attribute.
+	 *
+	 * @method _getCategoryField
+	 * @private
+	 */
+	_getCategoryField: function()
+	{
+		return this._swf.getCategoryField();
+	},
+
+	/**
+	 * Setter for the categoryField attribute.
+	 *
+	 * @method _setCategoryField
+	 * @private
+	 */
+	_setCategoryField: function(value)
+	{
+		this._swf.setCategoryField(value);
+	}
+});
+
+/**
+ * CartesianChart class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class CartesianChart
+ * @uses YAHOO.widget.Charts
+ * @constructor
+ * @param type {String} The char type. May be "line", "column", or "bar"
+ * @param containerId {HTMLElement} Container element for the Flash Player instance.
+ * @param dataSource {YAHOO.util.DataSource} DataSource instance.
+ * @param attributes {object} (optional) Object literal of configuration values.
+ */
+ YAHOO.widget.CartesianChart = function(type, containerId, dataSource, attributes)
+{
+	YAHOO.widget.CartesianChart.superclass.constructor.call(this, type, containerId, dataSource, attributes);
+};
+
+YAHOO.lang.extend(YAHOO.widget.CartesianChart, YAHOO.widget.Chart,
+{
+	/**
+	 * Initializes the attributes.
+	 *
+	 * @method _initAttributes
+	 * @private
+	 */
+	_initAttributes: function(attributes)
+	{	
+		YAHOO.widget.CartesianChart.superclass._initAttributes.call(this, attributes);
+
+		/**
+		 * @attribute xField
+		 * @description The field in each item that corresponds to a value on the x axis.
+		 * @type String
+		 */
+		this.getAttributeConfig("xField",
+		{
+			method: this._getXField
+		});
+
+		this.setAttributeConfig("xField",
+		{
+			validator: YAHOO.lang.isString,
+			method: this._setXField
+		});
+
+		/**
+		 * @attribute yField
+		 * @description The field in each item that corresponds to a value on the x axis.
+		 * @type String
+		 */
+		this.getAttributeConfig("yField",
+		{
+			method: this._getYField
+		});
+
+		this.setAttributeConfig("yField",
+		{
+			validator: YAHOO.lang.isString,
+			method: this._setYField
+		});
+
+		/**
+		 * @attribute xAxis
+		 * @description A custom configuration for the horizontal x axis.
+		 * @type Axis
+		 */
+		this.setAttributeConfig("xAxis",
+		{
+			method: this._setXAxis
+		});
+
+		/**
+		 * @attribute yAxis
+		 * @description A custom configuration for the vertical y axis.
+		 * @type Axis
+		 */
+		this.setAttributeConfig("yAxis",
+		{
+			method: this._setYAxis
+		});
+	},
+
+	/**
+	 * Getter for the xField attribute.
+	 *
+	 * @method _getXField
+	 * @private
+	 */
+	_getXField: function()
+	{
+		return this._swf.getHorizontalField();
+	},
+
+	/**
+	 * Setter for the xField attribute.
+	 *
+	 * @method _setXField
+	 * @private
+	 */
+	_setXField: function(value)
+	{
+		this._swf.setHorizontalField(value);
+	},
+
+	/**
+	 * Getter for the yField attribute.
+	 *
+	 * @method _getYField
+	 * @private
+	 */
+	_getYField: function()
+	{
+		return this._swf.getVerticalField();
+	},
+
+	/**
+	 * Setter for the yField attribute.
+	 *
+	 * @method _setYField
+	 * @private
+	 */
+	_setYField: function(value)
+	{
+		this._swf.setVerticalField(value);
+	},
+	
+	/**
+	 * Setter for the xAxis attribute.
+	 *
+	 * @method _setXAxis
+	 * @private
+	 */
+	_setXAxis: function(value)
+	{
+		this._swf.setHorizontalAxis(value);
+	},
+
+	/**
+	 * Getter for the yAxis attribute.
+	 *
+	 * @method _setYAxis
+	 * @private
+	 */
+	_setYAxis: function(value)
+	{
+		this._swf.setVerticalAxis(value);
+	}
+});
+
+/**
+ * LineChart class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class LineChart
+ * @uses YAHOO.widget.CartesianChart
+ * @constructor
+ * @param containerId {HTMLElement} Container element for the Flash Player instance.
+ * @param dataSource {YAHOO.util.DataSource} DataSource instance.
+ * @param attributes {object} (optional) Object literal of configuration values.
+ */
+YAHOO.widget.LineChart = function(containerId, dataSource, attributes)
+{
+	YAHOO.widget.LineChart.superclass.constructor.call(this, "line", containerId, dataSource, attributes);
+};
+
+YAHOO.lang.extend(YAHOO.widget.LineChart, YAHOO.widget.CartesianChart);
+
+/**
+ * ColumnChart class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class ColumnChart
+ * @uses YAHOO.widget.CartesianChart
+ * @constructor
+ * @param containerId {HTMLElement} Container element for the Flash Player instance.
+ * @param dataSource {YAHOO.util.DataSource} DataSource instance.
+ * @param attributes {object} (optional) Object literal of configuration values.
+ */
+YAHOO.widget.ColumnChart = function(containerId, dataSource, attributes)
+{
+	YAHOO.widget.ColumnChart.superclass.constructor.call(this, "column", containerId, dataSource, attributes);
+};
+
+YAHOO.lang.extend(YAHOO.widget.ColumnChart, YAHOO.widget.CartesianChart);
+
+/**
+ * BarChart class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class BarChart
+ * @uses YAHOO.widget.CartesianChart
+ * @constructor
+ * @param containerId {HTMLElement} Container element for the Flash Player instance.
+ * @param dataSource {YAHOO.util.DataSource} DataSource instance.
+ * @param attributes {object} (optional) Object literal of configuration values.
+ */
+YAHOO.widget.BarChart = function(containerId, dataSource, attributes)
+{
+	YAHOO.widget.BarChart.superclass.constructor.call(this, "bar", containerId, dataSource, attributes);
+};
+
+YAHOO.lang.extend(YAHOO.widget.BarChart, YAHOO.widget.CartesianChart);
+
+/**
+ * Defines a CartesianChart's vertical or horizontal axis.
+ *
+ * @namespace YAHOO.widget
+ * @class Axis
+ * @constructor
+ */
+YAHOO.widget.Axis = function()
+{
+};
+
+YAHOO.widget.Axis.prototype = 
+{
+	/**
+	 * The type of axis.
+	 *
+	 * @property type
+	 * @type String
+	 */
+	type: null,
+	
+	/**
+	 * The direction in which the axis is drawn. May be "horizontal" or "vertical".
+	 *
+	 * @property orientation
+	 * @type String
+	 */
+	orientation: "horizontal",
+	
+	/**
+	 * If true, the items on the axis will be drawn in opposite direction.
+	 *
+	 * @property reverse
+	 * @type Boolean
+	 */
+	reverse: false,
+	
+	/**
+	 * A string reference to the globally-accessible function that may be called to
+	 * determine each of the label values for this axis.
+	 *
+	 * @property labelFunction
+	 * @type String
+	 */
+	labelFunction: null,
+	
+	/**
+	 * If true, labels that overlap previously drawn labels on the axis will be hidden.
+	 *
+	 * @property hideOverlappingLabels
+	 * @type Boolean
+	 */
+	hideOverlappingLabels: true
+};
+
+/**
+ * A type of axis whose units are measured in numeric values.
+ *
+ * @namespace YAHOO.widget
+ * @class NumericAxis
+ * @constructor
+ */
+YAHOO.widget.NumericAxis = function()
+{
+	YAHOO.widget.NumericAxis.superclass.constructor.call(this);
+};
+
+YAHOO.lang.extend(YAHOO.widget.NumericAxis, YAHOO.widget.Axis,
+{
+	type: "numeric",
+	
+	/**
+	 * The minimum value drawn by the axis. If not set explicitly, the axis minimum
+	 * will be calculated automatically.
+	 *
+	 * @property minimum
+	 * @type Number
+	 */
+	minimum: NaN,
+	
+	/**
+	 * The maximum value drawn by the axis. If not set explicitly, the axis maximum
+	 * will be calculated automatically.
+	 *
+	 * @property maximum
+	 * @type Number
+	 */
+	maximum: NaN,
+	
+	/**
+	 * The spacing between major intervals on this axis.
+	 *
+	 * @property majorUnit
+	 * @type Number
+	 */
+	majorUnit: NaN,
+
+	/**
+	 * The spacing between minor intervals on this axis.
+	 *
+	 * @property minorUnit
+	 * @type Number
+	 */
+	minorUnit: NaN,
+	
+	/**
+	 * If true, the labels, ticks, gridlines, and other objects will snap to
+	 * the nearest major or minor unit. If false, their position will be based
+	 * on the minimum value.
+	 *
+	 * @property snapToUnits
+	 * @type Boolean
+	 */
+	snapToUnits: true,
+
+	/**
+	 * If true, and the bounds are calculated automatically, either the minimum or
+	 * maximum will be set to zero.
+	 *
+	 * @property alwaysShowZero
+	 * @type Boolean
+	 */
+	alwaysShowZero: true,
+
+	/**
+	 * The scaling algorithm to use on this axis. May be "linear" or "logarithmic".
+	 *
+	 * @property scale
+	 * @type String
+	 */
+	scale: "linear"
+});
+
+/**
+ * A type of axis whose units are measured in time-based values.
+ *
+ * @namespace YAHOO.widget
+ * @class TimeAxis
+ * @constructor
+ */
+YAHOO.widget.TimeAxis = function()
+{
+	YAHOO.widget.TimeAxis.superclass.constructor.call(this);
+};
+
+YAHOO.lang.extend(YAHOO.widget.TimeAxis, YAHOO.widget.Axis,
+{
+	type: "time",
+	
+	/**
+	 * The minimum value drawn by the axis. If not set explicitly, the axis minimum
+	 * will be calculated automatically.
+	 *
+	 * @property minimum
+	 * @type Date
+	 */
+	minimum: null,
+
+	/**
+	 * The maximum value drawn by the axis. If not set explicitly, the axis maximum
+	 * will be calculated automatically.
+	 *
+	 * @property maximum
+	 * @type Number
+	 */
+	maximum: null,
+	
+	/**
+	 * The spacing between major intervals on this axis.
+	 *
+	 * @property majorUnit
+	 * @type Number
+	 */
+	majorUnit: NaN,
+	
+	/**
+	 * The time unit used by the majorUnit.
+	 *
+	 * @property majorTimeUnit
+	 * @type String
+	 */
+	majorTimeUnit: null,
+	
+	/**
+	 * The spacing between minor intervals on this axis.
+	 *
+	 * @property majorUnit
+	 * @type Number
+	 */
+	minorUnit: NaN,
+	
+	/**
+	 * The time unit used by the minorUnit.
+	 *
+	 * @property majorTimeUnit
+	 * @type String
+	 */
+	minorTimeUnit: null,
+
+	/**
+	 * If true, the labels, ticks, gridlines, and other objects will snap to
+	 * the nearest major or minor unit. If false, their position will be based
+	 * on the minimum value.
+	 *
+	 * @property snapToUnits
+	 * @type Boolean
+	 */
+	snapToUnits: true
+});
+
+/**
+ * A type of axis that displays items in categories.
+ *
+ * @namespace YAHOO.widget
+ * @class CategoryAxis
+ * @constructor
+ */
+YAHOO.widget.CategoryAxis = function()
+{
+	YAHOO.widget.CategoryAxis.superclass.constructor.call(this);
+};
+
+YAHOO.lang.extend(YAHOO.widget.CategoryAxis, YAHOO.widget.Axis,
+{
+	type: "category",
+	
+	/**
+	 * A list of category names to display along this axis.
+	 *
+	 * @property categoryNames
+	 * @type Array
+	 */
+	categoryNames: null
+});
+
+/**
+ * Series class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class Series
+ * @constructor
+ */
+YAHOO.widget.Series = function() {};
+
+YAHOO.widget.Series.prototype = 
+{
+	type: null,
+	displayName: null
+};
+
+/**
+ * CartesianSeries class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class CartesianSeries
+ * @constructor
+ */
+YAHOO.widget.CartesianSeries = function() 
+{
+	YAHOO.widget.CartesianSeries.superclass.constructor.call(this);
+};
+
+YAHOO.lang.extend(YAHOO.widget.CartesianSeries, YAHOO.widget.Series,
+{
+	xField: null,
+	yField: null
+});
+
+/**
+ * ColumnSeries class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class ColumnSeries
+ * @constructor
+ */
+YAHOO.widget.ColumnSeries = function() 
+{
+	YAHOO.widget.ColumnSeries.superclass.constructor.call(this);
+};
+
+YAHOO.lang.extend(YAHOO.widget.ColumnSeries, YAHOO.widget.CartesianSeries,
+{
+	type: "column"
+});
+
+/**
+ * LineSeries class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class LineSeries
+ * @constructor
+ */
+YAHOO.widget.LineSeries = function() 
+{
+	YAHOO.widget.LineSeries.superclass.constructor.call(this);
+};
+
+YAHOO.lang.extend(YAHOO.widget.LineSeries, YAHOO.widget.CartesianSeries,
+{
+	type: "line"
+});
+
+
+/**
+ * BarSeries class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class BarSeries
+ * @constructor
+ */
+YAHOO.widget.BarSeries = function() 
+{
+	YAHOO.widget.BarSeries.superclass.constructor.call(this);
+};
+
+YAHOO.lang.extend(YAHOO.widget.BarSeries, YAHOO.widget.CartesianSeries,
+{
+	type: "bar"
+});
+
+
+/**
+ * PieSeries class for the YUI Charts widget.
+ *
+ * @namespace YAHOO.widget
+ * @class PieSeries
+ * @constructor
+ */
+YAHOO.widget.PieSeries = function() 
+{
+	YAHOO.widget.PieSeries.superclass.constructor.call(this);
+};
+
+YAHOO.lang.extend(YAHOO.widget.PieSeries, YAHOO.widget.Series,
+{
+	type: "pie",
+	dataField: null,
+	categoryField: null
+});
+
+YAHOO.register("charts", YAHOO.widget.Chart, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/colorpicker/README
===================================================================
--- trunk/root/static/yui/colorpicker/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/colorpicker/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,13 @@
 ColorPicker - Release Notes
 
+2.4.1
+   * No change
+
+2.4.0
+   * Initialization values assigned to showcontrols, showrgbcontrols,
+     showwebsafe, showhexsummary, animate, red, green, and blue in the
+     constructor configuration are now honored. 
+
 2.3.1
    * No change (bug fixes were inherited from slider)
 

Modified: trunk/root/static/yui/colorpicker/assets/colorpicker_core.css
===================================================================
--- trunk/root/static/yui/colorpicker/assets/colorpicker_core.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/colorpicker/assets/colorpicker_core.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,5 +2,5 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */

Modified: trunk/root/static/yui/colorpicker/assets/skins/sam/colorpicker-skin.css
===================================================================
--- trunk/root/static/yui/colorpicker/assets/skins/sam/colorpicker-skin.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/colorpicker/assets/skins/sam/colorpicker-skin.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 
 .yui-picker-panel {
@@ -81,8 +81,8 @@
 .yui-picker-controls { position:absolute; top: 72px; left:226px; font:1em monospace;}
 .yui-picker-controls .hd { background: transparent; border-width: 0px !important;}
 .yui-picker-controls .bd { height: 100px; border-width: 0px !important;}
-.yui-picker-controls ul {float:left;list-style:none;padding:0 2px 0 0;margin:0}
-.yui-picker-controls li {padding:2px;margin:0}
+.yui-picker-controls ul {float:left;padding:0 2px 0 0;margin:0}
+.yui-picker-controls li {padding:2px;list-style:none;margin:0}
 .yui-picker-controls input { 
     font-size: 0.85em;
     width: 2.4em;

Modified: trunk/root/static/yui/colorpicker/assets/skins/sam/colorpicker.css
===================================================================
--- trunk/root/static/yui/colorpicker/assets/skins/sam/colorpicker.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/colorpicker/assets/skins/sam/colorpicker.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-.yui-picker-panel{background:#e3e3e3;border-color:#888;}.yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000;}.yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px;}.yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px;}.yui-picker{position:relative;}.yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute;}.yui-picker-hue-bg{-moz-outline:none;outline:0px none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px;}.yui-picker-bg{-moz-outline:none;outline:0px none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png);}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../build/colorpicker/assets/picker_mask.png',sizingMethod='scale');}.yu!
 i-picker-mask{position:absolute;z-index:1;top:0px;left:0px;}.yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px;}.yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888;}.yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888;}.yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace;}.yui-picker-controls .hd{background:transparent;border-width:0px !important;}.yui-picker-controls .bd{height:100px;border-width:0px !important;}.yui-picker-controls ul{float:left;list-style:none;padding:0 2px 0 0;margin:0}.yui-picker-controls li{padding:2px;margin:0}.yui-picker-controls input{font-size:0.85em;width:2.4em;}.yui-picker-hex-controls{clear:both;padding:2px;}.yui-picker-hex-controls input{width:4.6em;}.yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color!
 :#000;}
+.yui-picker-panel{background:#e3e3e3;border-color:#888;}.yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000;}.yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px;}.yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px;}.yui-picker{position:relative;}.yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute;}.yui-picker-hue-bg{-moz-outline:none;outline:0px none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px;}.yui-picker-bg{-moz-outline:none;outline:0px none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png);}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../build/colorpicker/assets/picker_mask.png',sizingMethod='scale');}.yu!
 i-picker-mask{position:absolute;z-index:1;top:0px;left:0px;}.yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px;}.yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888;}.yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888;}.yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace;}.yui-picker-controls .hd{background:transparent;border-width:0px !important;}.yui-picker-controls .bd{height:100px;border-width:0px !important;}.yui-picker-controls ul{float:left;padding:0 2px 0 0;margin:0}.yui-picker-controls li{padding:2px;list-style:none;margin:0}.yui-picker-controls input{font-size:0.85em;width:2.4em;}.yui-picker-hex-controls{clear:both;padding:2px;}.yui-picker-hex-controls input{width:4.6em;}.yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color!
 :#000;}

Modified: trunk/root/static/yui/colorpicker/colorpicker-beta-debug.js
===================================================================
--- trunk/root/static/yui/colorpicker/colorpicker-beta-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/colorpicker/colorpicker-beta-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * Provides color conversion and validation utils
@@ -1216,7 +1216,27 @@
             }, this);
     };
 
+
     /**
+     * Updates the rgb attribute with the current state of the r,g,b
+     * fields.  This is invoked from change listeners on these
+     * attributes to facilitate updating these values from the
+     * individual form fields
+     * @method _updateRGB
+     * @private
+     */
+    var _updateRGB = function() {
+        var rgb = [this.get(this.OPT.RED), 
+                   this.get(this.OPT.GREEN),
+                   this.get(this.OPT.BLUE)];
+
+        this.logger.log("RGB value set to " + rgb);
+        this.set(this.OPT.RGB, rgb);
+
+        _updateSliders.call(this);
+    };
+
+    /**
      * Sets the initial state of the sliders
      * @method initPicker
      */
@@ -1285,6 +1305,9 @@
                                                    this.getElement(this.ID.PICKER_THUMB), 0, s, 0, s);
         this.pickerSlider.subscribe("change", _onPickerSliderChange, this, true);
 
+        // Set the animate state
+        this.set(o.ANIMATE,this.get(o.ANIMATE));
+
         //_onHueSliderChange.call(this, 0);
 
         Event.on(this.getElement(this.ID.WEBSAFE_SWATCH), "click", function(e) {
@@ -1312,30 +1335,12 @@
         Event.on(this.getElement(this.ID.HEX), "blur", function(e, me) {
                 _useFieldValue.call(me, e, this, me.OPT.HEX);
             }, this);
+
+        _updateRGB.call(this);
     };
 
 
-
     /**
-     * Updates the rgb attribute with the current state of the r,g,b
-     * fields.  This is invoked from change listeners on these
-     * attributes to facilitate updating these values from the
-     * individual form fields
-     * @method _updateRGB
-     * @private
-     */
-    var _updateRGB = function() {
-        var rgb = [this.get(this.OPT.RED), 
-                   this.get(this.OPT.GREEN),
-                   this.get(this.OPT.BLUE)];
-
-        this.logger.log("RGB value set to " + rgb);
-        this.set(this.OPT.RGB, rgb);
-
-        _updateSliders.call(this);
-    };
-
-    /**
      * Updates the RGB values from the current state of the HSV
      * values.  Executed when the one of the HSV form fields are
      * updated
@@ -1442,7 +1447,7 @@
          * @type int
          */
         this.setAttributeConfig(this.OPT.VALUE, {
-                value: attr.value || 100,
+                value: lang.isNumber(attr.value) ? attr.value : 100,
                 validator: lang.isNumber
             });
 
@@ -1452,7 +1457,7 @@
          * @type int
          */
         this.setAttributeConfig(this.OPT.RED, {
-                value: attr.red || 255,
+                value: lang.isNumber(attr.red) ? attr.red : 255,
                 validator: lang.isNumber
             });
 
@@ -1462,7 +1467,7 @@
          * @type int
          */
         this.setAttributeConfig(this.OPT.GREEN, {
-                value: attr.red || 255,
+                value: lang.isNumber(attr.green) ? attr.green : 255,
                 validator: lang.isNumber
             });
 
@@ -1472,7 +1477,7 @@
          * @type int
          */
         this.setAttributeConfig(this.OPT.BLUE, {
-                value: attr.blue || 255,
+                value: lang.isNumber(attr.blue) ? attr.blue : 255,
                 validator: lang.isNumber
             });
 
@@ -1632,7 +1637,7 @@
          * @default true
          */
         this.setAttributeConfig(this.OPT.SHOW_CONTROLS, {
-                value: (attr.showcontrols) || true,
+                value: lang.isBoolean(attr.showcontrols) ? attr.showcontrols : true,
                 method: function(on) {
 
                     var el = Dom.getElementsByClassName("bd", "div", 
@@ -1654,7 +1659,7 @@
          * @default true
          */
         this.setAttributeConfig(this.OPT.SHOW_RGB_CONTROLS, {
-                value: (attr.showrgbcontrols) || true,
+                value: lang.isBoolean(attr.showrgbcontrols) ? attr.showrgbcontrols : true,
                 method: function(on) {
                     //Dom.setStyle(this.getElement(this.ID.RBG_CONTROLS), "visibility", (on) ? "" : "hidden");
                     _hideShowEl.call(this, this.ID.RGB_CONTROLS, on);
@@ -1668,7 +1673,8 @@
          * @default false
          */
         this.setAttributeConfig(this.OPT.SHOW_HSV_CONTROLS, {
-                value: (attr.showhsvcontrols) || false,
+                value: lang.isBoolean(attr.showhsvcontrols) ?
+                                      attr.showhsvcontrols : false,
                 method: function(on) {
                     //Dom.setStyle(this.getElement(this.ID.HSV_CONTROLS), "visibility", (on) ? "" : "hidden");
                     _hideShowEl.call(this, this.ID.HSV_CONTROLS, on);
@@ -1687,7 +1693,8 @@
          * @default true
          */
         this.setAttributeConfig(this.OPT.SHOW_HEX_CONTROLS, {
-                value: (attr.showhexcontrols) || false,
+                value: lang.isBoolean(attr.showhexcontrols) ?
+                                      attr.showhexcontrols : false,
                 method: function(on) {
                     _hideShowEl.call(this, this.ID.HEX_CONTROLS, on);
                 }
@@ -1700,7 +1707,7 @@
          * @default true
          */
         this.setAttributeConfig(this.OPT.SHOW_WEBSAFE, {
-                value: (attr.showwebsafe) || true,
+                value: lang.isBoolean(attr.showwebsafe) ? attr.showwebsafe : true,
                 method: function(on) {
                     _hideShowEl.call(this, this.ID.WEBSAFE_SWATCH, on);
                 }
@@ -1713,7 +1720,7 @@
          * @default true
          */
         this.setAttributeConfig(this.OPT.SHOW_HEX_SUMMARY, {
-                value: (attr.showhexsummary) || true,
+                value: lang.isBoolean(attr.showhexsummary) ? attr.showhexsummary : true,
                 method: function(on) {
                     _hideShowEl.call(this, this.ID.HEX_SUMMARY, on);
 
@@ -1724,7 +1731,7 @@
                 }
             });
         this.setAttributeConfig(this.OPT.ANIMATE, {
-                value: (attr.animate) || true,
+                value: lang.isBoolean(attr.animate) ? attr.animate : true,
                 method: function(on) {
                     this.pickerSlider.animate = on;
                     this.hueSlider.animate = on;
@@ -1744,8 +1751,5 @@
         this.initPicker();
     };
 
-
-
-
 })();
-YAHOO.register("colorpicker", YAHOO.widget.ColorPicker, {version: "2.3.1", build: "541"});
+YAHOO.register("colorpicker", YAHOO.widget.ColorPicker, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/colorpicker/colorpicker-beta-min.js
===================================================================
--- trunk/root/static/yui/colorpicker/colorpicker-beta-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/colorpicker/colorpicker-beta-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,8 +2,8 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 YAHOO.util.Color=function(){var A="0123456789ABCDEF",B=YAHOO.lang;return{real2dec:function(C){return Math.min(255,Math.round(C*256));},hsv2rgb:function(G,N,L){if(B.isArray(G)){return this.hsv2rgb.call(this,G[0],G[1],G[2]);}var C,H,K,F,I,E,D,M;F=Math.floor((G/60)%6);I=(G/60)-F;E=L*(1-N);D=L*(1-I*N);M=L*(1-(1-I)*N);switch(F){case 0:C=L;H=M;K=E;break;case 1:C=D;H=L;K=E;break;case 2:C=E;H=L;K=M;break;case 3:C=E;H=D;K=L;break;case 4:C=M;H=E;K=L;break;case 5:C=L;H=E;K=D;break;}var J=this.real2dec;return[J(C),J(H),J(K)];},rgb2hsv:function(C,G,H){if(B.isArray(C)){return this.rgb2hsv.call(this,C[0],C[1],C[2]);}C=C/255;G=G/255;H=H/255;var D,I,K,F,L,J;D=Math.min(Math.min(C,G),H);I=Math.max(Math.max(C,G),H);K=I-D;switch(I){case D:F=0;break;case C:F=60*(G-H)/K;if(G<H){F+=360;}break;case G:F=(60*(H-C)/K)+120;break;case H:F=(60*(C-G)/K)+240;break;}L=(I===0)?0:1-(D/I);var E=[Math.round(F),L,I];return E;},rgb2hex:function(E,D,C){if(B.isArray(E)){return this.rgb2hex.call(this,E[0],E[1],E[2])!
 ;}var F=this.dec2hex;return F(E)+F(D)+F(C);},dec2hex:function(C){C=parseInt(C,10);C=(B.isNumber(C))?C:0;C=(C>255||C<0)?0:C;return A.charAt((C-C%16)/16)+A.charAt(C%16);},hex2dec:function(E){var D=function(F){return A.indexOf(F.toUpperCase());};var C=E.split("");return((D(C[0])*16)+D(C[1]));},hex2rgb:function(C){var D=this.hex2dec;return[D(C.substr(0,2)),D(C.substr(2,2)),D(C.substr(4,2))];},websafe:function(E,D,C){if(B.isArray(E)){return this.websafe.call(this,E[0],E[1],E[2]);}var F=function(G){if(B.isNumber(G)){G=Math.min(Math.max(0,G),255);var H,I;for(H=0;H<256;H=H+51){I=H+51;if(G>=H&&G<=I){return(G-H>25)?I:H;}}}return G;};return[F(E),F(D),F(C)];}};}();(function(){var E=0;var R=function(){var b=document.createElement("div");if(this.CSS.BASE){b.className=this.CSS.BASE;}return b;};YAHOO.widget.ColorPicker=function(h,b){E=E+1;b=b||{};if(arguments.length===1&&!YAHOO.lang.isString(h)&&!h.nodeName){b=h;h=b.element||null;}if(!h&&!b.element){h=R.call(this,b);}YAHOO.widget.ColorPick!
 er.superclass.constructor.call(this,h,b);};YAHOO.extend(YAHOO.!
 widget.C
olorPicker,YAHOO.util.Element);var Q=YAHOO.widget.ColorPicker.prototype,P=YAHOO.widget.Slider,e=YAHOO.util.Color,C=YAHOO.util.Dom,f=YAHOO.util.Event,g=YAHOO.lang,J=g.substitute;var a="yui-picker";Q.ID={R:a+"-r",R_HEX:a+"-rhex",G:a+"-g",G_HEX:a+"-ghex",B:a+"-b",B_HEX:a+"-bhex",H:a+"-h",S:a+"-s",V:a+"-v",PICKER_BG:a+"-bg",PICKER_THUMB:a+"-thumb",HUE_BG:a+"-hue-bg",HUE_THUMB:a+"-hue-thumb",HEX:a+"-hex",SWATCH:a+"-swatch",WEBSAFE_SWATCH:a+"-websafe-swatch",CONTROLS:a+"-controls",RGB_CONTROLS:a+"-rgb-controls",HSV_CONTROLS:a+"-hsv-controls",HEX_CONTROLS:a+"-hex-controls",HEX_SUMMARY:a+"-hex-summary",CONTROLS_LABEL:a+"-controls-label"};Q.TXT={ILLEGAL_HEX:"Illegal hex value entered",SHOW_CONTROLS:"Show color details",HIDE_CONTROLS:"Hide color details",CURRENT_COLOR:"Currently selected color: {rgb}",CLOSEST_WEBSAFE:"Closest websafe color: {rgb}. Click to select.",R:"R",G:"G",B:"B",H:"H",S:"S",V:"V",HEX:"#",DEG:"¡",PERCENT:"%"};Q.IMAGE={PICKER_THUMB:"../../build/colorpicker/assets/pi!
 cker_thumb.png",HUE_THUMB:"../../build/colorpicker/assets/hue_thumb.png"};Q.DEFAULT={PICKER_SIZE:180};Q.OPT={HUE:"hue",SATURATION:"saturation",VALUE:"value",RED:"red",GREEN:"green",BLUE:"blue",HSV:"hsv",RGB:"rgb",WEBSAFE:"websafe",HEX:"hex",PICKER_SIZE:"pickersize",SHOW_CONTROLS:"showcontrols",SHOW_RGB_CONTROLS:"showrgbcontrols",SHOW_HSV_CONTROLS:"showhsvcontrols",SHOW_HEX_CONTROLS:"showhexcontrols",SHOW_HEX_SUMMARY:"showhexsummary",SHOW_WEBSAFE:"showwebsafe",CONTAINER:"container",IDS:"ids",ELEMENTS:"elements",TXT:"txt",IMAGES:"images",ANIMATE:"animate"};var S=function(){var b=this.get(this.OPT.PICKER_SIZE),i=this.get(this.OPT.HUE);i=b-Math.round(i/360*b);if(i===b){i=0;}this.hueSlider.setValue(i);};var d=function(){var h=this.get(this.OPT.PICKER_SIZE),i=this.get(this.OPT.SATURATION),b=this.get(this.OPT.VALUE);i=Math.round(i*h/100);b=Math.round(h-(b*h/100));this.pickerSlider.setRegionValue(i,b);};var T=function(){S.call(this);d.call(this);};Q.setValue=function(h,b){b=(b)||fa!
 lse;this.set(this.OPT.RGB,h,b);T.call(this);};Q.hueSlider=null!
 ;Q.picke
rSlider=null;var X=function(){var b=this.get(this.OPT.PICKER_SIZE),i=(b-this.hueSlider.getValue())/b;i=Math.round(i*360);return(i===360)?0:i;};var O=function(){return this.pickerSlider.getXValue()/this.get(this.OPT.PICKER_SIZE);};var N=function(){var b=this.get(this.OPT.PICKER_SIZE);return(b-this.pickerSlider.getYValue())/b;};var M=function(){var i=this.get(this.OPT.RGB),k=this.get(this.OPT.WEBSAFE),j=this.getElement(this.ID.SWATCH),h=i.join(","),b=this.get(this.OPT.TXT);C.setStyle(j,"background-color","rgb("+h+")");j.title=g.substitute(b.CURRENT_COLOR,{"rgb":"#"+this.get(this.OPT.HEX)});j=this.getElement(this.ID.WEBSAFE_SWATCH);h=k.join(",");C.setStyle(j,"background-color","rgb("+h+")");j.title=g.substitute(b.CLOSEST_WEBSAFE,{"rgb":"#"+e.rgb2hex(k)});};var Z=function(){var k=X.call(this),j=O.call(this),b=N.call(this);var i=e.hsv2rgb(k,j,b);this.set(this.OPT.RGB,i);};var B=function(){this.getElement(this.ID.H).value=this.get(this.OPT.HUE);this.getElement(this.ID.S).value=thi!
 s.get(this.OPT.SATURATION);this.getElement(this.ID.V).value=this.get(this.OPT.VALUE);this.getElement(this.ID.R).value=this.get(this.OPT.RED);this.getElement(this.ID.R_HEX).innerHTML=e.dec2hex(this.get(this.OPT.RED));this.getElement(this.ID.G).value=this.get(this.OPT.GREEN);this.getElement(this.ID.G_HEX).innerHTML=e.dec2hex(this.get(this.OPT.GREEN));this.getElement(this.ID.B).value=this.get(this.OPT.BLUE);this.getElement(this.ID.B_HEX).innerHTML=e.dec2hex(this.get(this.OPT.BLUE));this.getElement(this.ID.HEX).value=this.get(this.OPT.HEX);};var Y=function(k){var i=X.call(this);this.set(this.OPT.HUE,i,true);var b=e.hsv2rgb(i,1,1);var j="rgb("+b.join(",")+")";C.setStyle(this.getElement(this.ID.PICKER_BG),"background-color",j);if(this.hueSlider.valueChangeSource===this.hueSlider.SOURCE_UI_EVENT){Z.call(this);}B.call(this);M.call(this);};var H=function(i){var h=O.call(this),b=N.call(this);this.set(this.OPT.SATURATION,Math.round(h*100),true);
-this.set(this.OPT.VALUE,Math.round(b*100),true);if(this.pickerSlider.valueChangeSource===this.pickerSlider.SOURCE_UI_EVENT){Z.call(this);}B.call(this);M.call(this);};var W=function(b){var h=f.getCharCode(b);if(h===38){return 3;}else{if(h===13){return 6;}else{if(h===40){return 4;}else{if(h>=48&&h<=57){return 1;}else{if(h>=97&&h<=102){return 2;}else{if(h>=65&&h<=70){return 2;}else{if("8, 9, 13, 27, 37, 39".indexOf(h)>-1){return 5;}else{return 0;}}}}}}}};var I=function(h,b,j){var i=b.value;if(j!==this.OPT.HEX){i=parseInt(i,10);}if(i!==this.get(j)){this.set(j,i);}};var G=function(i,b,k){var j=W(i);var h=(i.shiftKey)?10:1;switch(j){case 6:I.apply(this,arguments);break;case 3:this.set(k,Math.min(this.get(k)+h,255));B.call(this);break;case 4:this.set(k,Math.max(this.get(k)-h,0));B.call(this);break;default:}};var A=function(h,b,j){var i=W(h);if(i===6){I.apply(this,arguments);}};var L=function(h,b){var i=W(h);switch(i){case 6:case 5:case 1:break;case 2:if(b!==true){break;}default:f.!
 stopEvent(h);return false;}};var K=function(b){return L(b,true);};Q.getElement=function(b){return this.get(this.OPT.ELEMENTS)[this.get(this.OPT.IDS)[b]];};var D=function(){var k,j,n,l,m,b=this.get(this.OPT.IDS),o=this.get(this.OPT.TXT),r=this.get(this.OPT.IMAGES),q=function(i,p){var t=document.createElement(i);if(p){g.augmentObject(t,p,true);}return t;},s=function(i,p){var t=g.merge({autocomplete:"off",value:"0",size:3,maxlength:3},p);t.name=t.id;return new q(i,t);};var h=this.get("element");k=new q("div",{id:b[this.ID.PICKER_BG],className:"yui-picker-bg",tabIndex:-1,hideFocus:true});j=new q("div",{id:b[this.ID.PICKER_THUMB],className:"yui-picker-thumb"});n=new q("img",{src:r.PICKER_THUMB});j.appendChild(n);k.appendChild(j);h.appendChild(k);k=new q("div",{id:b[this.ID.HUE_BG],className:"yui-picker-hue-bg",tabIndex:-1,hideFocus:true});j=new q("div",{id:b[this.ID.HUE_THUMB],className:"yui-picker-hue-thumb"});n=new q("img",{src:r.HUE_THUMB});j.appendChild(n);k.appendChild(j);h!
 .appendChild(k);k=new q("div",{id:b[this.ID.CONTROLS],classNam!
 e:"yui-p
icker-controls"});h.appendChild(k);h=k;k=new q("div",{className:"hd"});j=new q("a",{id:b[this.ID.CONTROLS_LABEL],href:"#"});k.appendChild(j);h.appendChild(k);k=new q("div",{className:"bd"});h.appendChild(k);h=k;k=new q("ul",{id:b[this.ID.RGB_CONTROLS],className:"yui-picker-rgb-controls"});j=new q("li");j.appendChild(document.createTextNode(o.R+" "));l=new s("input",{id:b[this.ID.R],className:"yui-picker-r"});j.appendChild(l);k.appendChild(j);j=new q("li");j.appendChild(document.createTextNode(o.G+" "));l=new s("input",{id:b[this.ID.G],className:"yui-picker-g"});j.appendChild(l);k.appendChild(j);j=new q("li");j.appendChild(document.createTextNode(o.B+" "));l=new s("input",{id:b[this.ID.B],className:"yui-picker-b"});j.appendChild(l);k.appendChild(j);h.appendChild(k);k=new q("ul",{id:b[this.ID.HSV_CONTROLS],className:"yui-picker-hsv-controls"});j=new q("li");j.appendChild(document.createTextNode(o.H+" "));l=new s("input",{id:b[this.ID.H],className:"yui-picker-h"});j.appendChild!
 (l);j.appendChild(document.createTextNode(" "+o.DEG));k.appendChild(j);j=new q("li");j.appendChild(document.createTextNode(o.S+" "));l=new s("input",{id:b[this.ID.S],className:"yui-picker-s"});j.appendChild(l);j.appendChild(document.createTextNode(" "+o.PERCENT));k.appendChild(j);j=new q("li");j.appendChild(document.createTextNode(o.V+" "));l=new s("input",{id:b[this.ID.V],className:"yui-picker-v"});j.appendChild(l);j.appendChild(document.createTextNode(" "+o.PERCENT));k.appendChild(j);h.appendChild(k);k=new q("ul",{id:b[this.ID.HEX_SUMMARY],className:"yui-picker-hex_summary"});j=new q("li",{id:b[this.ID.R_HEX]});k.appendChild(j);j=new q("li",{id:b[this.ID.G_HEX]});k.appendChild(j);j=new q("li",{id:b[this.ID.B_HEX]});k.appendChild(j);h.appendChild(k);k=new q("div",{id:b[this.ID.HEX_CONTROLS],className:"yui-picker-hex-controls"});k.appendChild(document.createTextNode(o.HEX+" "));j=new s("input",{id:b[this.ID.HEX],className:"yui-picker-hex",size:6,maxlength:6});k.appendChild(!
 j);h.appendChild(k);h=this.get("element");k=new q("div",{id:b[!
 this.ID.
SWATCH],className:"yui-picker-swatch"});h.appendChild(k);k=new q("div",{id:b[this.ID.WEBSAFE_SWATCH],className:"yui-picker-websafe-swatch"});h.appendChild(k);};var c=function(h,b){f.on(this.getElement(h),"keydown",function(j,i){G.call(i,j,this,b);},this);f.on(this.getElement(h),"keypress",K,this);f.on(this.getElement(h),"blur",function(j,i){I.call(i,j,this,b);},this);};Q.initPicker=function(){var m=this.OPT,l=this.get(m.IDS),h=this.get(m.ELEMENTS),b,k,n;for(b in this.ID){if(g.hasOwnProperty(this.ID,b)){l[this.ID[b]]=l[b];}}k=C.get(l[this.ID.PICKER_BG]);if(!k){D.call(this);}else{}for(b in l){if(g.hasOwnProperty(l,b)){k=C.get(l[b]);n=C.generateId(k);l[b]=n;l[l[b]]=n;h[n]=k;}}h=[m.SHOW_CONTROLS,m.SHOW_RGB_CONTROLS,m.SHOW_HSV_CONTROLS,m.SHOW_HEX_CONTROLS,m.SHOW_HEX_SUMMARY,m.SHOW_WEBSAFE];for(b=0;b<h.length;b=b+1){this.set(h[b],this.get(h[b]));}var j=this.get(m.PICKER_SIZE);this.hueSlider=P.getVertSlider(this.getElement(this.ID.HUE_BG),this.getElement(this.ID.HUE_THUMB),0,j);thi!
 s.hueSlider.subscribe("change",Y,this,true);this.pickerSlider=P.getSliderRegion(this.getElement(this.ID.PICKER_BG),this.getElement(this.ID.PICKER_THUMB),0,j,0,j);this.pickerSlider.subscribe("change",H,this,true);f.on(this.getElement(this.ID.WEBSAFE_SWATCH),"click",function(i){this.setValue(this.get(m.WEBSAFE));},this,true);f.on(this.getElement(this.ID.CONTROLS_LABEL),"click",function(i){this.set(m.SHOW_CONTROLS,!this.get(m.SHOW_CONTROLS));f.preventDefault(i);},this,true);c.call(this,this.ID.R,this.OPT.RED);c.call(this,this.ID.G,this.OPT.GREEN);c.call(this,this.ID.B,this.OPT.BLUE);c.call(this,this.ID.H,this.OPT.HUE);c.call(this,this.ID.S,this.OPT.SATURATION);c.call(this,this.ID.V,this.OPT.VALUE);f.on(this.getElement(this.ID.HEX),"keydown",function(o,i){A.call(i,o,this,i.OPT.HEX);},this);f.on(this.getElement(this.ID.HEX),"keypress",L,this);f.on(this.getElement(this.ID.HEX),"blur",function(o,i){I.call(i,o,this,i.OPT.HEX);
-},this);};var F=function(){var b=[this.get(this.OPT.RED),this.get(this.OPT.GREEN),this.get(this.OPT.BLUE)];this.set(this.OPT.RGB,b);T.call(this);};var U=function(){var h=[this.get(this.OPT.HUE),this.get(this.OPT.SATURATION)/100,this.get(this.OPT.VALUE)/100];var b=e.hsv2rgb(h);this.set(this.OPT.RGB,b);T.call(this);};var V=function(){var k=this.get(this.OPT.HEX),b=k.length;if(b===3){var m=k.split(""),j;for(j=0;j<b;j=j+1){m[j]=m[j]+m[j];}k=m.join("");}if(k.length!==6){return false;}var h=e.hex2rgb(k);this.setValue(h);};Q.initAttributes=function(b){b=b||{};YAHOO.widget.ColorPicker.superclass.initAttributes.call(this,b);this.setAttributeConfig(this.OPT.PICKER_SIZE,{value:b.size||this.DEFAULT.PICKER_SIZE});this.setAttributeConfig(this.OPT.HUE,{value:b.hue||0,validator:g.isNumber});this.setAttributeConfig(this.OPT.SATURATION,{value:b.saturation||0,validator:g.isNumber});this.setAttributeConfig(this.OPT.VALUE,{value:b.value||100,validator:g.isNumber});this.setAttributeConfig(this.O!
 PT.RED,{value:b.red||255,validator:g.isNumber});this.setAttributeConfig(this.OPT.GREEN,{value:b.red||255,validator:g.isNumber});this.setAttributeConfig(this.OPT.BLUE,{value:b.blue||255,validator:g.isNumber});this.setAttributeConfig(this.OPT.HEX,{value:b.hex||"FFFFFF",validator:g.isString});this.setAttributeConfig(this.OPT.RGB,{value:b.rgb||[255,255,255],method:function(l){this.set(this.OPT.RED,l[0],true);this.set(this.OPT.GREEN,l[1],true);this.set(this.OPT.BLUE,l[2],true);var n=e.websafe(l);this.set(this.OPT.WEBSAFE,n,true);var m=e.rgb2hex(l);this.set(this.OPT.HEX,m,true);var i=e.rgb2hsv(l);this.set(this.OPT.HUE,i[0],true);this.set(this.OPT.SATURATION,Math.round(i[1]*100),true);this.set(this.OPT.VALUE,Math.round(i[2]*100),true);},readonly:true});this.setAttributeConfig(this.OPT.CONTAINER,{value:null,method:function(i){if(i){i.showEvent.subscribe(function(){this.pickerSlider.focus();},this,true);}}});this.setAttributeConfig(this.OPT.WEBSAFE,{value:b.websafe||[255,255,255]});!
 var j=b.ids||g.merge({},this.ID);if(!b.ids&&E>1){for(var h in !
 j){if(g.
hasOwnProperty(j,h)){j[h]=j[h]+E;}}}this.setAttributeConfig(this.OPT.IDS,{value:j,writeonce:true});this.setAttributeConfig(this.OPT.TXT,{value:b.txt||this.TXT,writeonce:true});this.setAttributeConfig(this.OPT.IMAGES,{value:b.images||this.IMAGE,writeonce:true});this.setAttributeConfig(this.OPT.ELEMENTS,{value:{},readonly:true});var k=function(m,i){var l=(g.isString(m)?this.getElement(m):m);C.setStyle(l,"display",(i)?"":"none");};this.setAttributeConfig(this.OPT.SHOW_CONTROLS,{value:(b.showcontrols)||true,method:function(i){var l=C.getElementsByClassName("bd","div",this.getElement(this.ID.CONTROLS))[0];k.call(this,l,i);this.getElement(this.ID.CONTROLS_LABEL).innerHTML=(i)?this.get(this.OPT.TXT).HIDE_CONTROLS:this.get(this.OPT.TXT).SHOW_CONTROLS;}});this.setAttributeConfig(this.OPT.SHOW_RGB_CONTROLS,{value:(b.showrgbcontrols)||true,method:function(i){k.call(this,this.ID.RGB_CONTROLS,i);}});this.setAttributeConfig(this.OPT.SHOW_HSV_CONTROLS,{value:(b.showhsvcontrols)||false,meth!
 od:function(i){k.call(this,this.ID.HSV_CONTROLS,i);if(i&&this.get(this.OPT.SHOW_HEX_SUMMARY)){this.set(this.OPT.SHOW_HEX_SUMMARY,false);}}});this.setAttributeConfig(this.OPT.SHOW_HEX_CONTROLS,{value:(b.showhexcontrols)||false,method:function(i){k.call(this,this.ID.HEX_CONTROLS,i);}});this.setAttributeConfig(this.OPT.SHOW_WEBSAFE,{value:(b.showwebsafe)||true,method:function(i){k.call(this,this.ID.WEBSAFE_SWATCH,i);}});this.setAttributeConfig(this.OPT.SHOW_HEX_SUMMARY,{value:(b.showhexsummary)||true,method:function(i){k.call(this,this.ID.HEX_SUMMARY,i);if(i&&this.get(this.OPT.SHOW_HSV_CONTROLS)){this.set(this.OPT.SHOW_HSV_CONTROLS,false);}}});this.setAttributeConfig(this.OPT.ANIMATE,{value:(b.animate)||true,method:function(i){this.pickerSlider.animate=i;this.hueSlider.animate=i;}});this.on(this.OPT.HUE+"Change",U,this,true);this.on(this.OPT.SATURATION+"Change",U,this,true);this.on(this.OPT.VALUE+"Change",d,this,true);this.on(this.OPT.RED+"Change",F,this,true);this.on(this.OPT!
 .GREEN+"Change",F,this,true);this.on(this.OPT.BLUE+"Change",F,!
 this,tru
e);this.on(this.OPT.HEX+"Change",V,this,true);this.initPicker();};})();YAHOO.register("colorpicker",YAHOO.widget.ColorPicker,{version:"2.3.1",build:"541"});
\ No newline at end of file
+this.set(this.OPT.VALUE,Math.round(b*100),true);if(this.pickerSlider.valueChangeSource===this.pickerSlider.SOURCE_UI_EVENT){Z.call(this);}B.call(this);M.call(this);};var W=function(b){var h=f.getCharCode(b);if(h===38){return 3;}else{if(h===13){return 6;}else{if(h===40){return 4;}else{if(h>=48&&h<=57){return 1;}else{if(h>=97&&h<=102){return 2;}else{if(h>=65&&h<=70){return 2;}else{if("8, 9, 13, 27, 37, 39".indexOf(h)>-1){return 5;}else{return 0;}}}}}}}};var I=function(h,b,j){var i=b.value;if(j!==this.OPT.HEX){i=parseInt(i,10);}if(i!==this.get(j)){this.set(j,i);}};var G=function(i,b,k){var j=W(i);var h=(i.shiftKey)?10:1;switch(j){case 6:I.apply(this,arguments);break;case 3:this.set(k,Math.min(this.get(k)+h,255));B.call(this);break;case 4:this.set(k,Math.max(this.get(k)-h,0));B.call(this);break;default:}};var A=function(h,b,j){var i=W(h);if(i===6){I.apply(this,arguments);}};var L=function(h,b){var i=W(h);switch(i){case 6:case 5:case 1:break;case 2:if(b!==true){break;}default:f.!
 stopEvent(h);return false;}};var K=function(b){return L(b,true);};Q.getElement=function(b){return this.get(this.OPT.ELEMENTS)[this.get(this.OPT.IDS)[b]];};var D=function(){var k,j,n,l,m,b=this.get(this.OPT.IDS),o=this.get(this.OPT.TXT),r=this.get(this.OPT.IMAGES),q=function(i,p){var t=document.createElement(i);if(p){g.augmentObject(t,p,true);}return t;},s=function(i,p){var t=g.merge({autocomplete:"off",value:"0",size:3,maxlength:3},p);t.name=t.id;return new q(i,t);};var h=this.get("element");k=new q("div",{id:b[this.ID.PICKER_BG],className:"yui-picker-bg",tabIndex:-1,hideFocus:true});j=new q("div",{id:b[this.ID.PICKER_THUMB],className:"yui-picker-thumb"});n=new q("img",{src:r.PICKER_THUMB});j.appendChild(n);k.appendChild(j);h.appendChild(k);k=new q("div",{id:b[this.ID.HUE_BG],className:"yui-picker-hue-bg",tabIndex:-1,hideFocus:true});j=new q("div",{id:b[this.ID.HUE_THUMB],className:"yui-picker-hue-thumb"});n=new q("img",{src:r.HUE_THUMB});j.appendChild(n);k.appendChild(j);h!
 .appendChild(k);k=new q("div",{id:b[this.ID.CONTROLS],classNam!
 e:"yui-p
icker-controls"});h.appendChild(k);h=k;k=new q("div",{className:"hd"});j=new q("a",{id:b[this.ID.CONTROLS_LABEL],href:"#"});k.appendChild(j);h.appendChild(k);k=new q("div",{className:"bd"});h.appendChild(k);h=k;k=new q("ul",{id:b[this.ID.RGB_CONTROLS],className:"yui-picker-rgb-controls"});j=new q("li");j.appendChild(document.createTextNode(o.R+" "));l=new s("input",{id:b[this.ID.R],className:"yui-picker-r"});j.appendChild(l);k.appendChild(j);j=new q("li");j.appendChild(document.createTextNode(o.G+" "));l=new s("input",{id:b[this.ID.G],className:"yui-picker-g"});j.appendChild(l);k.appendChild(j);j=new q("li");j.appendChild(document.createTextNode(o.B+" "));l=new s("input",{id:b[this.ID.B],className:"yui-picker-b"});j.appendChild(l);k.appendChild(j);h.appendChild(k);k=new q("ul",{id:b[this.ID.HSV_CONTROLS],className:"yui-picker-hsv-controls"});j=new q("li");j.appendChild(document.createTextNode(o.H+" "));l=new s("input",{id:b[this.ID.H],className:"yui-picker-h"});j.appendChild!
 (l);j.appendChild(document.createTextNode(" "+o.DEG));k.appendChild(j);j=new q("li");j.appendChild(document.createTextNode(o.S+" "));l=new s("input",{id:b[this.ID.S],className:"yui-picker-s"});j.appendChild(l);j.appendChild(document.createTextNode(" "+o.PERCENT));k.appendChild(j);j=new q("li");j.appendChild(document.createTextNode(o.V+" "));l=new s("input",{id:b[this.ID.V],className:"yui-picker-v"});j.appendChild(l);j.appendChild(document.createTextNode(" "+o.PERCENT));k.appendChild(j);h.appendChild(k);k=new q("ul",{id:b[this.ID.HEX_SUMMARY],className:"yui-picker-hex_summary"});j=new q("li",{id:b[this.ID.R_HEX]});k.appendChild(j);j=new q("li",{id:b[this.ID.G_HEX]});k.appendChild(j);j=new q("li",{id:b[this.ID.B_HEX]});k.appendChild(j);h.appendChild(k);k=new q("div",{id:b[this.ID.HEX_CONTROLS],className:"yui-picker-hex-controls"});k.appendChild(document.createTextNode(o.HEX+" "));j=new s("input",{id:b[this.ID.HEX],className:"yui-picker-hex",size:6,maxlength:6});k.appendChild(!
 j);h.appendChild(k);h=this.get("element");k=new q("div",{id:b[!
 this.ID.
SWATCH],className:"yui-picker-swatch"});h.appendChild(k);k=new q("div",{id:b[this.ID.WEBSAFE_SWATCH],className:"yui-picker-websafe-swatch"});h.appendChild(k);};var c=function(h,b){f.on(this.getElement(h),"keydown",function(j,i){G.call(i,j,this,b);},this);f.on(this.getElement(h),"keypress",K,this);f.on(this.getElement(h),"blur",function(j,i){I.call(i,j,this,b);},this);};var F=function(){var b=[this.get(this.OPT.RED),this.get(this.OPT.GREEN),this.get(this.OPT.BLUE)];this.set(this.OPT.RGB,b);T.call(this);};Q.initPicker=function(){var m=this.OPT,l=this.get(m.IDS),h=this.get(m.ELEMENTS),b,k,n;for(b in this.ID){if(g.hasOwnProperty(this.ID,b)){l[this.ID[b]]=l[b];}}k=C.get(l[this.ID.PICKER_BG]);if(!k){D.call(this);}else{}for(b in l){if(g.hasOwnProperty(l,b)){k=C.get(l[b]);n=C.generateId(k);l[b]=n;l[l[b]]=n;h[n]=k;}}h=[m.SHOW_CONTROLS,m.SHOW_RGB_CONTROLS,m.SHOW_HSV_CONTROLS,m.SHOW_HEX_CONTROLS,m.SHOW_HEX_SUMMARY,m.SHOW_WEBSAFE];for(b=0;b<h.length;b=b+1){this.set(h[b],this.get(h[b]));!
 }var j=this.get(m.PICKER_SIZE);this.hueSlider=P.getVertSlider(this.getElement(this.ID.HUE_BG),this.getElement(this.ID.HUE_THUMB),0,j);this.hueSlider.subscribe("change",Y,this,true);this.pickerSlider=P.getSliderRegion(this.getElement(this.ID.PICKER_BG),this.getElement(this.ID.PICKER_THUMB),0,j,0,j);this.pickerSlider.subscribe("change",H,this,true);this.set(m.ANIMATE,this.get(m.ANIMATE));f.on(this.getElement(this.ID.WEBSAFE_SWATCH),"click",function(i){this.setValue(this.get(m.WEBSAFE));},this,true);f.on(this.getElement(this.ID.CONTROLS_LABEL),"click",function(i){this.set(m.SHOW_CONTROLS,!this.get(m.SHOW_CONTROLS));f.preventDefault(i);},this,true);c.call(this,this.ID.R,this.OPT.RED);c.call(this,this.ID.G,this.OPT.GREEN);c.call(this,this.ID.B,this.OPT.BLUE);c.call(this,this.ID.H,this.OPT.HUE);c.call(this,this.ID.S,this.OPT.SATURATION);c.call(this,this.ID.V,this.OPT.VALUE);f.on(this.getElement(this.ID.HEX),"keydown",function(o,i){A.call(i,o,this,i.OPT.HEX);
+},this);f.on(this.getElement(this.ID.HEX),"keypress",L,this);f.on(this.getElement(this.ID.HEX),"blur",function(o,i){I.call(i,o,this,i.OPT.HEX);},this);F.call(this);};var U=function(){var h=[this.get(this.OPT.HUE),this.get(this.OPT.SATURATION)/100,this.get(this.OPT.VALUE)/100];var b=e.hsv2rgb(h);this.set(this.OPT.RGB,b);T.call(this);};var V=function(){var k=this.get(this.OPT.HEX),b=k.length;if(b===3){var m=k.split(""),j;for(j=0;j<b;j=j+1){m[j]=m[j]+m[j];}k=m.join("");}if(k.length!==6){return false;}var h=e.hex2rgb(k);this.setValue(h);};Q.initAttributes=function(b){b=b||{};YAHOO.widget.ColorPicker.superclass.initAttributes.call(this,b);this.setAttributeConfig(this.OPT.PICKER_SIZE,{value:b.size||this.DEFAULT.PICKER_SIZE});this.setAttributeConfig(this.OPT.HUE,{value:b.hue||0,validator:g.isNumber});this.setAttributeConfig(this.OPT.SATURATION,{value:b.saturation||0,validator:g.isNumber});this.setAttributeConfig(this.OPT.VALUE,{value:g.isNumber(b.value)?b.value:100,validator:g.isN!
 umber});this.setAttributeConfig(this.OPT.RED,{value:g.isNumber(b.red)?b.red:255,validator:g.isNumber});this.setAttributeConfig(this.OPT.GREEN,{value:g.isNumber(b.green)?b.green:255,validator:g.isNumber});this.setAttributeConfig(this.OPT.BLUE,{value:g.isNumber(b.blue)?b.blue:255,validator:g.isNumber});this.setAttributeConfig(this.OPT.HEX,{value:b.hex||"FFFFFF",validator:g.isString});this.setAttributeConfig(this.OPT.RGB,{value:b.rgb||[255,255,255],method:function(l){this.set(this.OPT.RED,l[0],true);this.set(this.OPT.GREEN,l[1],true);this.set(this.OPT.BLUE,l[2],true);var n=e.websafe(l);this.set(this.OPT.WEBSAFE,n,true);var m=e.rgb2hex(l);this.set(this.OPT.HEX,m,true);var i=e.rgb2hsv(l);this.set(this.OPT.HUE,i[0],true);this.set(this.OPT.SATURATION,Math.round(i[1]*100),true);this.set(this.OPT.VALUE,Math.round(i[2]*100),true);},readonly:true});this.setAttributeConfig(this.OPT.CONTAINER,{value:null,method:function(i){if(i){i.showEvent.subscribe(function(){this.pickerSlider.focus()!
 ;},this,true);}}});this.setAttributeConfig(this.OPT.WEBSAFE,{v!
 alue:b.w
ebsafe||[255,255,255]});var j=b.ids||g.merge({},this.ID);if(!b.ids&&E>1){for(var h in j){if(g.hasOwnProperty(j,h)){j[h]=j[h]+E;}}}this.setAttributeConfig(this.OPT.IDS,{value:j,writeonce:true});this.setAttributeConfig(this.OPT.TXT,{value:b.txt||this.TXT,writeonce:true});this.setAttributeConfig(this.OPT.IMAGES,{value:b.images||this.IMAGE,writeonce:true});this.setAttributeConfig(this.OPT.ELEMENTS,{value:{},readonly:true});var k=function(m,i){var l=(g.isString(m)?this.getElement(m):m);C.setStyle(l,"display",(i)?"":"none");};this.setAttributeConfig(this.OPT.SHOW_CONTROLS,{value:g.isBoolean(b.showcontrols)?b.showcontrols:true,method:function(i){var l=C.getElementsByClassName("bd","div",this.getElement(this.ID.CONTROLS))[0];k.call(this,l,i);this.getElement(this.ID.CONTROLS_LABEL).innerHTML=(i)?this.get(this.OPT.TXT).HIDE_CONTROLS:this.get(this.OPT.TXT).SHOW_CONTROLS;}});this.setAttributeConfig(this.OPT.SHOW_RGB_CONTROLS,{value:g.isBoolean(b.showrgbcontrols)?b.showrgbcontrols:true,m!
 ethod:function(i){k.call(this,this.ID.RGB_CONTROLS,i);}});this.setAttributeConfig(this.OPT.SHOW_HSV_CONTROLS,{value:g.isBoolean(b.showhsvcontrols)?b.showhsvcontrols:false,method:function(i){k.call(this,this.ID.HSV_CONTROLS,i);if(i&&this.get(this.OPT.SHOW_HEX_SUMMARY)){this.set(this.OPT.SHOW_HEX_SUMMARY,false);}}});this.setAttributeConfig(this.OPT.SHOW_HEX_CONTROLS,{value:g.isBoolean(b.showhexcontrols)?b.showhexcontrols:false,method:function(i){k.call(this,this.ID.HEX_CONTROLS,i);}});this.setAttributeConfig(this.OPT.SHOW_WEBSAFE,{value:g.isBoolean(b.showwebsafe)?b.showwebsafe:true,method:function(i){k.call(this,this.ID.WEBSAFE_SWATCH,i);}});this.setAttributeConfig(this.OPT.SHOW_HEX_SUMMARY,{value:g.isBoolean(b.showhexsummary)?b.showhexsummary:true,method:function(i){k.call(this,this.ID.HEX_SUMMARY,i);if(i&&this.get(this.OPT.SHOW_HSV_CONTROLS)){this.set(this.OPT.SHOW_HSV_CONTROLS,false);}}});this.setAttributeConfig(this.OPT.ANIMATE,{value:g.isBoolean(b.animate)?b.animate:true!
 ,method:function(i){this.pickerSlider.animate=i;this.hueSlider!
 .animate
=i;}});this.on(this.OPT.HUE+"Change",U,this,true);this.on(this.OPT.SATURATION+"Change",U,this,true);this.on(this.OPT.VALUE+"Change",d,this,true);this.on(this.OPT.RED+"Change",F,this,true);this.on(this.OPT.GREEN+"Change",F,this,true);this.on(this.OPT.BLUE+"Change",F,this,true);this.on(this.OPT.HEX+"Change",V,this,true);this.initPicker();};})();YAHOO.register("colorpicker",YAHOO.widget.ColorPicker,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/colorpicker/colorpicker-beta.js
===================================================================
--- trunk/root/static/yui/colorpicker/colorpicker-beta.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/colorpicker/colorpicker-beta.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * Provides color conversion and validation utils
@@ -1207,7 +1207,26 @@
             }, this);
     };
 
+
     /**
+     * Updates the rgb attribute with the current state of the r,g,b
+     * fields.  This is invoked from change listeners on these
+     * attributes to facilitate updating these values from the
+     * individual form fields
+     * @method _updateRGB
+     * @private
+     */
+    var _updateRGB = function() {
+        var rgb = [this.get(this.OPT.RED), 
+                   this.get(this.OPT.GREEN),
+                   this.get(this.OPT.BLUE)];
+
+        this.set(this.OPT.RGB, rgb);
+
+        _updateSliders.call(this);
+    };
+
+    /**
      * Sets the initial state of the sliders
      * @method initPicker
      */
@@ -1274,6 +1293,9 @@
                                                    this.getElement(this.ID.PICKER_THUMB), 0, s, 0, s);
         this.pickerSlider.subscribe("change", _onPickerSliderChange, this, true);
 
+        // Set the animate state
+        this.set(o.ANIMATE,this.get(o.ANIMATE));
+
         //_onHueSliderChange.call(this, 0);
 
         Event.on(this.getElement(this.ID.WEBSAFE_SWATCH), "click", function(e) {
@@ -1301,29 +1323,12 @@
         Event.on(this.getElement(this.ID.HEX), "blur", function(e, me) {
                 _useFieldValue.call(me, e, this, me.OPT.HEX);
             }, this);
+
+        _updateRGB.call(this);
     };
 
 
-
     /**
-     * Updates the rgb attribute with the current state of the r,g,b
-     * fields.  This is invoked from change listeners on these
-     * attributes to facilitate updating these values from the
-     * individual form fields
-     * @method _updateRGB
-     * @private
-     */
-    var _updateRGB = function() {
-        var rgb = [this.get(this.OPT.RED), 
-                   this.get(this.OPT.GREEN),
-                   this.get(this.OPT.BLUE)];
-
-        this.set(this.OPT.RGB, rgb);
-
-        _updateSliders.call(this);
-    };
-
-    /**
      * Updates the RGB values from the current state of the HSV
      * values.  Executed when the one of the HSV form fields are
      * updated
@@ -1425,7 +1430,7 @@
          * @type int
          */
         this.setAttributeConfig(this.OPT.VALUE, {
-                value: attr.value || 100,
+                value: lang.isNumber(attr.value) ? attr.value : 100,
                 validator: lang.isNumber
             });
 
@@ -1435,7 +1440,7 @@
          * @type int
          */
         this.setAttributeConfig(this.OPT.RED, {
-                value: attr.red || 255,
+                value: lang.isNumber(attr.red) ? attr.red : 255,
                 validator: lang.isNumber
             });
 
@@ -1445,7 +1450,7 @@
          * @type int
          */
         this.setAttributeConfig(this.OPT.GREEN, {
-                value: attr.red || 255,
+                value: lang.isNumber(attr.green) ? attr.green : 255,
                 validator: lang.isNumber
             });
 
@@ -1455,7 +1460,7 @@
          * @type int
          */
         this.setAttributeConfig(this.OPT.BLUE, {
-                value: attr.blue || 255,
+                value: lang.isNumber(attr.blue) ? attr.blue : 255,
                 validator: lang.isNumber
             });
 
@@ -1612,7 +1617,7 @@
          * @default true
          */
         this.setAttributeConfig(this.OPT.SHOW_CONTROLS, {
-                value: (attr.showcontrols) || true,
+                value: lang.isBoolean(attr.showcontrols) ? attr.showcontrols : true,
                 method: function(on) {
 
                     var el = Dom.getElementsByClassName("bd", "div", 
@@ -1634,7 +1639,7 @@
          * @default true
          */
         this.setAttributeConfig(this.OPT.SHOW_RGB_CONTROLS, {
-                value: (attr.showrgbcontrols) || true,
+                value: lang.isBoolean(attr.showrgbcontrols) ? attr.showrgbcontrols : true,
                 method: function(on) {
                     //Dom.setStyle(this.getElement(this.ID.RBG_CONTROLS), "visibility", (on) ? "" : "hidden");
                     _hideShowEl.call(this, this.ID.RGB_CONTROLS, on);
@@ -1648,7 +1653,8 @@
          * @default false
          */
         this.setAttributeConfig(this.OPT.SHOW_HSV_CONTROLS, {
-                value: (attr.showhsvcontrols) || false,
+                value: lang.isBoolean(attr.showhsvcontrols) ?
+                                      attr.showhsvcontrols : false,
                 method: function(on) {
                     //Dom.setStyle(this.getElement(this.ID.HSV_CONTROLS), "visibility", (on) ? "" : "hidden");
                     _hideShowEl.call(this, this.ID.HSV_CONTROLS, on);
@@ -1667,7 +1673,8 @@
          * @default true
          */
         this.setAttributeConfig(this.OPT.SHOW_HEX_CONTROLS, {
-                value: (attr.showhexcontrols) || false,
+                value: lang.isBoolean(attr.showhexcontrols) ?
+                                      attr.showhexcontrols : false,
                 method: function(on) {
                     _hideShowEl.call(this, this.ID.HEX_CONTROLS, on);
                 }
@@ -1680,7 +1687,7 @@
          * @default true
          */
         this.setAttributeConfig(this.OPT.SHOW_WEBSAFE, {
-                value: (attr.showwebsafe) || true,
+                value: lang.isBoolean(attr.showwebsafe) ? attr.showwebsafe : true,
                 method: function(on) {
                     _hideShowEl.call(this, this.ID.WEBSAFE_SWATCH, on);
                 }
@@ -1693,7 +1700,7 @@
          * @default true
          */
         this.setAttributeConfig(this.OPT.SHOW_HEX_SUMMARY, {
-                value: (attr.showhexsummary) || true,
+                value: lang.isBoolean(attr.showhexsummary) ? attr.showhexsummary : true,
                 method: function(on) {
                     _hideShowEl.call(this, this.ID.HEX_SUMMARY, on);
 
@@ -1704,7 +1711,7 @@
                 }
             });
         this.setAttributeConfig(this.OPT.ANIMATE, {
-                value: (attr.animate) || true,
+                value: lang.isBoolean(attr.animate) ? attr.animate : true,
                 method: function(on) {
                     this.pickerSlider.animate = on;
                     this.hueSlider.animate = on;
@@ -1724,8 +1731,5 @@
         this.initPicker();
     };
 
-
-
-
 })();
-YAHOO.register("colorpicker", YAHOO.widget.ColorPicker, {version: "2.3.1", build: "541"});
+YAHOO.register("colorpicker", YAHOO.widget.ColorPicker, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/connection/README
===================================================================
--- trunk/root/static/yui/connection/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/connection/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,26 @@
 Connection Manager Release Notes
 
+*** version 2.4.1 ***
+
+No change
+
+*** version 2.4.0 ***
+
+* [FIXED] SF1804153.  Transactions initialized with setForm() now properly clear
+the POST data field after each transaction.
+
+* The callback object can accept a new member, cache, defined with a boolean
+value.  If set to false (e.g., var callback = { cache:false };), a timestamp
+will be appended to the URI to override HTTP GET caching.  This timestamp value
+will appear as rnd=timestamp in the request querystring.
+
+* Custom Events startEvent, completeEvent, and abortEvent now receive
+callback.argument, if defined, in addition to the transaction ID.  Each Custom
+Event's function handler receives two arguments -- the event type as the first
+argument, and an array as the second argument.  The first element in the array
+is the transaction ID, and the second element are any arguments defined in the
+callback object.
+
 *** version 2.3.1 ***
 
 * setDefaultPostHeader() can now be overloaded with a boolean, string, or
@@ -236,29 +257,3 @@
 
 * Initial release
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

Modified: trunk/root/static/yui/connection/connection-debug.js
===================================================================
--- trunk/root/static/yui/connection/connection-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/connection/connection-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * The Connection Manager provides a simplified interface to the XMLHttpRequest
@@ -234,14 +234,10 @@
 				document,
 				'click',
 				function(e){
-					try
-					{
-						var obj = YAHOO.util.Event.getTarget(e);
-						if(obj.type.toLowerCase() == 'submit'){
-							YAHOO.util.Connect._submitElementValue = encodeURIComponent(obj.name) + "=" + encodeURIComponent(obj.value);
-						}
+					var obj = YAHOO.util.Event.getTarget(e);
+					if(obj.type && obj.type.toLowerCase() == 'submit'){
+						YAHOO.util.Connect._submitElementValue = encodeURIComponent(obj.name) + "=" + encodeURIComponent(obj.value);
 					}
-					catch(e){}
 				});
 			return true;
 	    }
@@ -484,6 +480,7 @@
 	asyncRequest:function(method, uri, callback, postData)
 	{
 		var o = (this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();
+		var args = (callback && callback.argument)?callback.argument:null;
 
 		if(!o){
 			YAHOO.log('Unable to create connection object.', 'error', 'Connection');
@@ -511,9 +508,6 @@
 						// and then concatenate _sFormData to the URI.
 						uri += ((uri.indexOf('?') == -1)?'?':'&') + this._sFormData;
 					}
-					else{
-						uri += "?" + this._sFormData;
-					}
 				}
 				else if(method.toUpperCase() == 'POST'){
 					// If POST data exist in addition to the HTML form data,
@@ -522,6 +516,12 @@
 				}
 			}
 
+			if(method.toUpperCase() == 'GET' && (callback && callback.cache === false)){
+				// If callback.cache is defined and set to false, a
+				// timestamp value will be added to the querystring.
+				uri += ((uri.indexOf('?') == -1)?'?':'&') + "rnd=" + new Date().valueOf().toString();
+			}
+
 			o.conn.open(method, uri, true);
 
 			// Each transaction will automatically include a custom header of
@@ -534,24 +534,35 @@
 				}
 			}
 
-			if(this._isFormSubmit == false && this._use_default_post_header){
+			//If the transaction method is POST and the POST header value is set to true
+			//or a custom value, initalize the Content-Type header to this value.
+			if((method.toUpperCase() == 'POST' && this._use_default_post_header) && this._isFormSubmit === false){
 				this.initHeader('Content-Type', this._default_post_header);
-				YAHOO.log('Initialize header Content-Type to application/x-www-form-urlencoded; UTF_8 for POST transaction.', 'info', 'Connection');
+				YAHOO.log('Initialize header Content-Type to application/x-www-form-urlencoded; UTF-8 for POST transaction.', 'info', 'Connection');
 			}
 
+			//Initialize all default and custom HTTP headers,
 			if(this._has_default_headers || this._has_http_headers){
 				this.setHeader(o);
 			}
 
 			this.handleReadyState(o, callback);
 			o.conn.send(postData || null);
+			YAHOO.log('Transaction ' + o.tId + ' sent.', 'info', 'Connection');
 
+
+			// Reset the HTML form data and state properties as
+			// soon as the data are submitted.
+			if(this._isFormSubmit === true){
+				this.resetFormState();
+			}
+
 			// Fire global custom event -- startEvent
-			this.startEvent.fire(o);
+			this.startEvent.fire(o, args);
 
 			if(o.startEvent){
 				// Fire transaction custom event -- startEvent
-				o.startEvent.fire(o);
+				o.startEvent.fire(o, args);
 			}
 
 			return o;
@@ -602,6 +613,7 @@
 
     {
 		var oConn = this;
+		var args = (callback && callback.argument)?callback.argument:null;
 
 		if(callback && callback.timeout){
 			this._timeOut[o.tId] = window.setTimeout(function(){ oConn.abort(o, callback, true); }, callback.timeout);
@@ -622,11 +634,11 @@
 					}
 
 					// Fire global custom event -- completeEvent
-					oConn.completeEvent.fire(o);
+					oConn.completeEvent.fire(o, args);
 
 					if(o.completeEvent){
 						// Fire transaction custom event -- completeEvent
-						o.completeEvent.fire(o);
+						o.completeEvent.fire(o, args);
 					}
 
 					oConn.handleTransactionResponse(o, callback);
@@ -649,8 +661,8 @@
    */
     handleTransactionResponse:function(o, callback, isAbort)
     {
-
 		var httpStatus, responseObject;
+		var args = (callback && callback.argument)?callback.argument:null;
 
 		try
 		{
@@ -670,20 +682,18 @@
 		}
 
 		if(httpStatus >= 200 && httpStatus < 300 || httpStatus === 1223){
-			responseObject = this.createResponseObject(o, (callback && callback.argument)?callback.argument:undefined);
-			if(callback){
-				if(callback.success){
-					if(!callback.scope){
-						callback.success(responseObject);
-						YAHOO.log('Success callback. HTTP code is ' + httpStatus, 'info', 'Connection');
-					}
-					else{
-						// If a scope property is defined, the callback will be fired from
-						// the context of the object.
-						callback.success.apply(callback.scope, [responseObject]);
-						YAHOO.log('Success callback with scope. HTTP code is ' + httpStatus, 'info', 'Connection');
-					}
+			responseObject = this.createResponseObject(o, args);
+			if(callback && callback.success){
+				if(!callback.scope){
+					callback.success(responseObject);
+					YAHOO.log('Success callback. HTTP code is ' + httpStatus, 'info', 'Connection');
 				}
+				else{
+					// If a scope property is defined, the callback will be fired from
+					// the context of the object.
+					callback.success.apply(callback.scope, [responseObject]);
+					YAHOO.log('Success callback with scope. HTTP code is ' + httpStatus, 'info', 'Connection');
+				}
 			}
 
 			// Fire global custom event -- successEvent
@@ -703,34 +713,30 @@
 				case 12031:
 				case 12152: // Connection closed by server.
 				case 13030: // See above comments for variable status.
-					responseObject = this.createExceptionObject(o.tId, (callback && callback.argument)?callback.argument:undefined, (isAbort?isAbort:false));
-					if(callback){
-						if(callback.failure){
-							if(!callback.scope){
-								callback.failure(responseObject);
-								YAHOO.log('Failure callback. Exception detected. Status code is ' + httpStatus, 'warn', 'Connection');
-							}
-							else{
-								callback.failure.apply(callback.scope, [responseObject]);
-								YAHOO.log('Failure callback with scope. Exception detected. Status code is ' + httpStatus, 'warn', 'Connection');
-							}
+					responseObject = this.createExceptionObject(o.tId, args, (isAbort?isAbort:false));
+					if(callback && callback.failure){
+						if(!callback.scope){
+							callback.failure(responseObject);
+							YAHOO.log('Failure callback. Exception detected. Status code is ' + httpStatus, 'warn', 'Connection');
 						}
+						else{
+							callback.failure.apply(callback.scope, [responseObject]);
+							YAHOO.log('Failure callback with scope. Exception detected. Status code is ' + httpStatus, 'warn', 'Connection');
+						}
 					}
 
 					break;
 				default:
-					responseObject = this.createResponseObject(o, (callback && callback.argument)?callback.argument:undefined);
-					if(callback){
-						if(callback.failure){
-							if(!callback.scope){
-								callback.failure(responseObject);
-								YAHOO.log('Failure callback. HTTP status code is ' + httpStatus, 'warn', 'Connection');
-							}
-							else{
-								callback.failure.apply(callback.scope, [responseObject]);
-								YAHOO.log('Failure callback with scope. HTTP status code is ' + httpStatus, 'warn', 'Connection');
-							}
+					responseObject = this.createResponseObject(o, args);
+					if(callback && callback.failure){
+						if(!callback.scope){
+							callback.failure(responseObject);
+							YAHOO.log('Failure callback. HTTP status code is ' + httpStatus, 'warn', 'Connection');
 						}
+						else{
+							callback.failure.apply(callback.scope, [responseObject]);
+							YAHOO.log('Failure callback with scope. HTTP status code is ' + httpStatus, 'warn', 'Connection');
+						}
 					}
 			}
 
@@ -787,7 +793,7 @@
 		obj.responseText = o.conn.responseText;
 		obj.responseXML = o.conn.responseXML;
 
-		if(typeof callbackArg !== undefined){
+		if(callbackArg){
 			obj.argument = callbackArg;
 		}
 
@@ -922,13 +928,14 @@
    */
 	setForm:function(formId, isUpload, secureUri)
 	{
+		// reset the HTML form data and state properties
 		this.resetFormState();
 
 		var oForm;
 		if(typeof formId == 'string'){
 			// Determine if the argument is a form id or a form name.
-			// Note form name usage is deprecated by supported
-			// here for legacy reasons.
+			// Note form name usage is deprecated, but supported
+			// here for backward compatibility.
 			oForm = (document.getElementById(formId) || document.forms[formId]);
 		}
 		else if(typeof formId == 'object'){
@@ -966,9 +973,9 @@
 		// label-value pairs.
 		for (var i=0; i<oForm.elements.length; i++){
 			oElement = oForm.elements[i];
-			oDisabled = oForm.elements[i].disabled;
-			oName = oForm.elements[i].name;
-			oValue = oForm.elements[i].value;
+			oDisabled = oElement.disabled;
+			oName = oElement.name;
+			oValue = oElement.value;
 
 			// Do not submit fields that are disabled or
 			// do not have a name attribute value.
@@ -1134,10 +1141,11 @@
 
 		// Each iframe has an id prefix of "yuiIO" followed
 		// by the unique transaction id.
+		var oConn = this;
 		var frameId = 'yuiIO' + o.tId;
 		var uploadEncoding = 'multipart/form-data';
 		var io = document.getElementById(frameId);
-		var oConn = this;
+		var args = (callback && callback.argument)?callback.argument:null;
 
 		// Track original HTML form attribute values.
 		var rawFormAttributes =
@@ -1170,11 +1178,11 @@
 		this._formNode.submit();
 
 		// Fire global custom event -- startEvent
-		this.startEvent.fire(o);
+		this.startEvent.fire(o, args);
 
 		if(o.startEvent){
 			// Fire transaction custom event -- startEvent
-			o.startEvent.fire(o);
+			o.startEvent.fire(o, args);
 		}
 
 		// Start polling if a callback is present and the timeout
@@ -1217,11 +1225,11 @@
 			}
 
 			// Fire global custom event -- completeEvent
-			oConn.completeEvent.fire(o);
+			oConn.completeEvent.fire(o, args);
 
 			if(o.completeEvent){
 				// Fire transaction custom event -- completeEvent
-				o.completeEvent.fire(o);
+				o.completeEvent.fire(o, args);
 			}
 
 			var obj = {};
@@ -1283,8 +1291,10 @@
 	abort:function(o, callback, isTimeout)
 	{
 		var abortStatus;
+		var args = (callback && callback.argument)?callback.argument:null;
 
-		if(o.conn){
+
+		if(o && o.conn){
 			if(this.isCallInProgress(o)){
 				// Issue abort request
 				o.conn.abort();
@@ -1300,13 +1310,14 @@
 				abortStatus = true;
 			}
 		}
-		else if(o.isUpload === true){
+		else if(o && o.isUpload === true){
 			var frameId = 'yuiIO' + o.tId;
 			var io = document.getElementById(frameId);
 
 			if(io){
-				// Remove the event listener from the iframe.
-				YAHOO.util.Event.removeListener(io, "load", uploadCallback);
+				// Remove all listeners on the iframe prior to
+				// its destruction.
+				YAHOO.util.Event.removeListener(io, "load");
 				// Destroy the iframe facilitating the transaction.
 				document.body.removeChild(io);
 				YAHOO.log('File upload iframe destroyed. Id is:' + frameId, 'info', 'Connection');
@@ -1325,11 +1336,11 @@
 
 		if(abortStatus === true){
 			// Fire global custom event -- abortEvent
-			this.abortEvent.fire(o);
+			this.abortEvent.fire(o, args);
 
 			if(o.abortEvent){
 				// Fire transaction custom event -- abortEvent
-				o.abortEvent.fire(o);
+				o.abortEvent.fire(o, args);
 			}
 
 			this.handleTransactionResponse(o, callback, true);
@@ -1373,14 +1384,16 @@
    */
 	releaseObject:function(o)
 	{
-		//dereference the XHR instance.
-		if(o.conn){
+		if(o && o.conn){
+			//dereference the XHR instance.
 			o.conn = null;
+
+			YAHOO.log('Connection object for transaction ' + o.tId + ' destroyed.', 'info', 'Connection');
+
+			//dereference the connection object.
+			o = null;
 		}
-		YAHOO.log('Connection object for transaction ' + o.tId + ' destroyed.', 'info', 'Connection');
-		//dereference the connection object.
-		o = null;
 	}
 };
 
-YAHOO.register("connection", YAHOO.util.Connect, {version: "2.3.1", build: "541"});
+YAHOO.register("connection", YAHOO.util.Connect, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/connection/connection-min.js
===================================================================
--- trunk/root/static/yui/connection/connection-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/connection/connection-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(q){try{var S=YAHOO.util.Event.getTarget(q);if(S.type.toLowerCase()=="submit"){YAHOO.util.Connect._submitElementValue=encodeURIComponent(S.name)+"="+encodeURIComponent(S.value);}}catch(q){}});return true;}return false;})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete!
 "),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(S){this._msxml_progid.unshift(S);},setDefaultPostHeader:function(S){if(typeof S=="string"){this._default_post_header=S;}else{if(typeof S=="boolean"){this._use_default_post_header=S;}}},setDefaultXhrHeader:function(S){if(typeof S=="string"){this._default_xhr_header=S;}else{this._use_default_xhr_header=S;}},setPollingInterval:function(S){if(typeof S=="number"&&isFinite(S)){this._polling_interval=S;}},createXhrObject:function(w){var m,S;try{S=new XMLHttpRequest();m={conn:S,tId:w};}catch(R){for(var q=0;q<this._msxml_progid.length;++q){try{S!
 =new ActiveXObject(this._msxml_progid[q]);m={conn:S,tId:w};bre!
 ak;}catc
h(R){}}}finally{return m;}},getConnectionObject:function(S){var R;var m=this._transaction_id;try{if(!S){R=this.createXhrObject(m);}else{R={};R.tId=m;R.isUpload=true;}if(R){this._transaction_id++;}}catch(q){}finally{return R;}},asyncRequest:function(w,q,m,S){var R=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();if(!R){return null;}else{if(m&&m.customevents){this.initCustomEvents(R,m);}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(R,m,q,S);return R;}if(w.toUpperCase()=="GET"){if(this._sFormData.length!==0){q+=((q.indexOf("?")==-1)?"?":"&")+this._sFormData;}else{q+="?"+this._sFormData;}}else{if(w.toUpperCase()=="POST"){S=S?this._sFormData+"&"+S:this._sFormData;}}}R.conn.open(w,q,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true);}}if(this._isFormSubmit==false&&this._use_default_post_header){this.initHeader("Content-Type",this._defau!
 lt_post_header);}if(this._has_default_headers||this._has_http_headers){this.setHeader(R);}this.handleReadyState(R,m);R.conn.send(S||null);this.startEvent.fire(R);if(R.startEvent){R.startEvent.fire(R);}return R;}},initCustomEvents:function(S,R){for(var q in R.customevents){if(this._customEvents[q][0]){S[this._customEvents[q][0]]=new YAHOO.util.CustomEvent(this._customEvents[q][1],(R.scope)?R.scope:null);S[this._customEvents[q][0]].subscribe(R.customevents[q]);}}},handleReadyState:function(q,R){var S=this;if(R&&R.timeout){this._timeOut[q.tId]=window.setTimeout(function(){S.abort(q,R,true);},R.timeout);}this._poll[q.tId]=window.setInterval(function(){if(q.conn&&q.conn.readyState===4){window.clearInterval(S._poll[q.tId]);delete S._poll[q.tId];if(R&&R.timeout){window.clearTimeout(S._timeOut[q.tId]);delete S._timeOut[q.tId];}S.completeEvent.fire(q);if(q.completeEvent){q.completeEvent.fire(q);}S.handleTransactionResponse(q,R);}},this._polling_interval);},handleTransactionResponse:!
 function(w,V,S){var R,q;try{if(w.conn.status!==undefined&&w.co!
 nn.statu
s!==0){R=w.conn.status;}else{R=13030;}}catch(m){R=13030;}if(R>=200&&R<300||R===1223){q=this.createResponseObject(w,(V&&V.argument)?V.argument:undefined);if(V){if(V.success){if(!V.scope){V.success(q);}else{V.success.apply(V.scope,[q]);}}}this.successEvent.fire(q);if(w.successEvent){w.successEvent.fire(q);}}else{switch(R){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:q=this.createExceptionObject(w.tId,(V&&V.argument)?V.argument:undefined,(S?S:false));if(V){if(V.failure){if(!V.scope){V.failure(q);}else{V.failure.apply(V.scope,[q]);}}}break;default:q=this.createResponseObject(w,(V&&V.argument)?V.argument:undefined);if(V){if(V.failure){if(!V.scope){V.failure(q);}else{V.failure.apply(V.scope,[q]);}}}}this.failureEvent.fire(q);if(w.failureEvent){w.failureEvent.fire(q);}}this.releaseObject(w);q=null;},createResponseObject:function(S,d){var m={};var T={};try{var R=S.conn.getAllResponseHeaders();var V=R.split("\n");for(var w=0;w<V.length;w++){var q=V[w].indexOf(":"!
 );if(q!=-1){T[V[w].substring(0,q)]=V[w].substring(q+2);}}}catch(N){}m.tId=S.tId;m.status=(S.conn.status==1223)?204:S.conn.status;m.statusText=(S.conn.status==1223)?"No Content":S.conn.statusText;m.getResponseHeader=T;m.getAllResponseHeaders=R;m.responseText=S.conn.responseText;m.responseXML=S.conn.responseXML;if(typeof d!==undefined){m.argument=d;}return m;},createExceptionObject:function(N,m,S){var V=0;var d="communication failure";var R=-1;var q="transaction aborted";var w={};w.tId=N;if(S){w.status=R;w.statusText=q;}else{w.status=V;w.statusText=d;}if(m){w.argument=m;}return w;},initHeader:function(S,m,R){var q=(R)?this._default_headers:this._http_headers;q[S]=m;if(R){this._has_default_headers=true;}else{this._has_http_headers=true;}},setHeader:function(S){if(this._has_default_headers){for(var q in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,q)){S.conn.setRequestHeader(q,this._default_headers[q]);}}}if(this._has_http_headers){for(var q in this!
 ._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_header!
 s,q)){S.
conn.setRequestHeader(q,this._http_headers[q]);}}delete this._http_headers;this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false;},setForm:function(M,w,q){this.resetFormState();var f;if(typeof M=="string"){f=(document.getElementById(M)||document.forms[M]);}else{if(typeof M=="object"){f=M;}else{return ;}}if(w){var V=this.createFrame(q?q:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=f;return ;}var S,T,d,p;var N=false;for(var m=0;m<f.elements.length;m++){S=f.elements[m];p=f.elements[m].disabled;T=f.elements[m].name;d=f.elements[m].value;if(!p&&T){switch(S.type){case "select-one":case "select-multiple":for(var R=0;R<S.options.length;R++){if(S.options[R].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(S.options[R].attributes["value"].specified?S.options[R].value:S.options[R].text)+"&";}else{thi!
 s._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(S.options[R].hasAttribute("value")?S.options[R].value:S.options[R].text)+"&";}}}break;case "radio":case "checkbox":if(S.checked){this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(d)+"&";}break;case "file":case undefined:case "reset":case "button":break;case "submit":if(N===false){if(this._hasSubmitListener&&this._submitElementValue){this._sFormData+=this._submitElementValue+"&";}else{this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(d)+"&";}N=true;}break;default:this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(d)+"&";}}}this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);this.initHeader("Content-Type",this._default_form_header);return this._sFormData;},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";},createFrame:function(S){var q="yuiIO"+this._transaction_id;var R;if(window.!
 ActiveXObject){R=document.createElement("<iframe id=\""+q+"\" !
 name=\""
+q+"\" />");if(typeof S=="boolean"){R.src="javascript:false";}else{if(typeof secureURI=="string"){R.src=S;}}}else{R=document.createElement("iframe");R.id=q;R.name=q;}R.style.position="absolute";R.style.top="-1000px";R.style.left="-1000px";document.body.appendChild(R);},appendPostData:function(S){var m=[];var q=S.split("&");for(var R=0;R<q.length;R++){var w=q[R].indexOf("=");if(w!=-1){m[R]=document.createElement("input");m[R].type="hidden";m[R].name=q[R].substring(0,w);m[R].value=q[R].substring(w+1);this._formNode.appendChild(m[R]);}}return m;},uploadFile:function(m,p,w,R){var N="yuiIO"+m.tId;var T="multipart/form-data";var f=document.getElementById(N);var U=this;var q={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",w);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",N);if(this._formNode.encoding){this._formNode.setAttr!
 ibute("encoding",T);}else{this._formNode.setAttribute("enctype",T);}if(R){var M=this.appendPostData(R);}this._formNode.submit();this.startEvent.fire(m);if(m.startEvent){m.startEvent.fire(m);}if(p&&p.timeout){this._timeOut[m.tId]=window.setTimeout(function(){U.abort(m,p,true);},p.timeout);}if(M&&M.length>0){for(var d=0;d<M.length;d++){this._formNode.removeChild(M[d]);}}for(var S in q){if(YAHOO.lang.hasOwnProperty(q,S)){if(q[S]){this._formNode.setAttribute(S,q[S]);}else{this._formNode.removeAttribute(S);}}}this.resetFormState();var V=function(){if(p&&p.timeout){window.clearTimeout(U._timeOut[m.tId]);delete U._timeOut[m.tId];}U.completeEvent.fire(m);if(m.completeEvent){m.completeEvent.fire(m);}var v={};v.tId=m.tId;v.argument=p.argument;try{v.responseText=f.contentWindow.document.body?f.contentWindow.document.body.innerHTML:f.contentWindow.document.documentElement.textContent;v.responseXML=f.contentWindow.document.XMLDocument?f.contentWindow.document.XMLDocument:f.contentWindow!
 .document;}catch(u){}if(p&&p.upload){if(!p.scope){p.upload(v);!
 }else{p.
upload.apply(p.scope,[v]);}}U.uploadEvent.fire(v);if(m.uploadEvent){m.uploadEvent.fire(v);}YAHOO.util.Event.removeListener(f,"load",V);setTimeout(function(){document.body.removeChild(f);U.releaseObject(m);},100);};YAHOO.util.Event.addListener(f,"load",V);},abort:function(m,V,S){var R;if(m.conn){if(this.isCallInProgress(m)){m.conn.abort();window.clearInterval(this._poll[m.tId]);delete this._poll[m.tId];if(S){window.clearTimeout(this._timeOut[m.tId]);delete this._timeOut[m.tId];}R=true;}}else{if(m.isUpload===true){var q="yuiIO"+m.tId;var w=document.getElementById(q);if(w){YAHOO.util.Event.removeListener(w,"load",uploadCallback);document.body.removeChild(w);if(S){window.clearTimeout(this._timeOut[m.tId]);delete this._timeOut[m.tId];}R=true;}}else{R=false;}}if(R===true){this.abortEvent.fire(m);if(m.abortEvent){m.abortEvent.fire(m);}this.handleTransactionResponse(m,V,true);}return R;},isCallInProgress:function(q){if(q&&q.conn){return q.conn.readyState!==4&&q.conn.readyState!==0;}!
 else{if(q&&q.isUpload===true){var S="yuiIO"+q.tId;return document.getElementById(S)?true:false;}else{return false;}}},releaseObject:function(S){if(S.conn){S.conn=null;}S=null;}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.3.1",build:"541"});
\ No newline at end of file
+YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(B){var A=YAHOO.util.Event.getTarget(B);if(A.type&&A.type.toLowerCase()=="submit"){YAHOO.util.Connect._submitElementValue=encodeURIComponent(A.name)+"="+encodeURIComponent(A.value);}});return true;}return false;})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),succ!
 essEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(A){this._msxml_progid.unshift(A);},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A;}else{if(typeof A=="boolean"){this._use_default_post_header=A;}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A;}else{this._use_default_xhr_header=A;}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A;}},createXhrObject:function(E){var D,A;try{A=new XMLHttpRequest();D={conn:A,tId:E};}catch(C){for(var B=0;B<this._msxml_progid.length;++B){try{A=new Ac!
 tiveXObject(this._msxml_progid[B]);D={conn:A,tId:E};break;}cat!
 ch(C){}}
}finally{return D;}},getConnectionObject:function(A){var C;var D=this._transaction_id;try{if(!A){C=this.createXhrObject(D);}else{C={};C.tId=D;C.isUpload=true;}if(C){this._transaction_id++;}}catch(B){}finally{return C;}},asyncRequest:function(F,C,E,A){var D=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var B=(E&&E.argument)?E.argument:null;if(!D){return null;}else{if(E&&E.customevents){this.initCustomEvents(D,E);}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(D,E,C,A);return D;}if(F.toUpperCase()=="GET"){if(this._sFormData.length!==0){C+=((C.indexOf("?")==-1)?"?":"&")+this._sFormData;}}else{if(F.toUpperCase()=="POST"){A=A?this._sFormData+"&"+A:this._sFormData;}}}if(F.toUpperCase()=="GET"&&(E&&E.cache===false)){C+=((C.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString();}D.conn.open(F,C,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._defau!
 lt_xhr_header,true);}}if((F.toUpperCase()=="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header);}if(this._has_default_headers||this._has_http_headers){this.setHeader(D);}this.handleReadyState(D,E);D.conn.send(A||null);if(this._isFormSubmit===true){this.resetFormState();}this.startEvent.fire(D,B);if(D.startEvent){D.startEvent.fire(D,B);}return D;}},initCustomEvents:function(A,C){for(var B in C.customevents){if(this._customEvents[B][0]){A[this._customEvents[B][0]]=new YAHOO.util.CustomEvent(this._customEvents[B][1],(C.scope)?C.scope:null);A[this._customEvents[B][0]].subscribe(C.customevents[B]);}}},handleReadyState:function(C,D){var B=this;var A=(D&&D.argument)?D.argument:null;if(D&&D.timeout){this._timeOut[C.tId]=window.setTimeout(function(){B.abort(C,D,true);},D.timeout);}this._poll[C.tId]=window.setInterval(function(){if(C.conn&&C.conn.readyState===4){window.clearInterval(B._poll[C.tId]);delete B._pol!
 l[C.tId];if(D&&D.timeout){window.clearTimeout(B._timeOut[C.tId!
 ]);delet
e B._timeOut[C.tId];}B.completeEvent.fire(C,A);if(C.completeEvent){C.completeEvent.fire(C,A);}B.handleTransactionResponse(C,D);}},this._polling_interval);},handleTransactionResponse:function(F,G,A){var D,C;var B=(G&&G.argument)?G.argument:null;try{if(F.conn.status!==undefined&&F.conn.status!==0){D=F.conn.status;}else{D=13030;}}catch(E){D=13030;}if(D>=200&&D<300||D===1223){C=this.createResponseObject(F,B);if(G&&G.success){if(!G.scope){G.success(C);}else{G.success.apply(G.scope,[C]);}}this.successEvent.fire(C);if(F.successEvent){F.successEvent.fire(C);}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:C=this.createExceptionObject(F.tId,B,(A?A:false));if(G&&G.failure){if(!G.scope){G.failure(C);}else{G.failure.apply(G.scope,[C]);}}break;default:C=this.createResponseObject(F,B);if(G&&G.failure){if(!G.scope){G.failure(C);}else{G.failure.apply(G.scope,[C]);}}}this.failureEvent.fire(C);if(F.failureEvent){F.failureEvent.fire(C);}}this.releaseObject(F);!
 C=null;},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E<F.length;E++){var B=F[E].indexOf(":");if(B!=-1){I[F[E].substring(0,B)]=F[E].substring(B+2);}}}catch(H){}D.tId=A.tId;D.status=(A.conn.status==1223)?204:A.conn.status;D.statusText=(A.conn.status==1223)?"No Content":A.conn.statusText;D.getResponseHeader=I;D.getAllResponseHeaders=C;D.responseText=A.conn.responseText;D.responseXML=A.conn.responseXML;if(G){D.argument=G;}return D;},createExceptionObject:function(H,D,A){var F=0;var G="communication failure";var C=-1;var B="transaction aborted";var E={};E.tId=H;if(A){E.status=C;E.statusText=B;}else{E.status=F;E.statusText=G;}if(D){E.argument=D;}return E;},initHeader:function(A,D,C){var B=(C)?this._default_headers:this._http_headers;B[A]=D;if(C){this._has_default_headers=true;}else{this._has_http_headers=true;}},setHeader:function(A){if(this._has_default_headers){for(var B in this._default_headers){!
 if(YAHOO.lang.hasOwnProperty(this._default_headers,B)){A.conn.!
 setReque
stHeader(B,this._default_headers[B]);
+}}}if(this._has_http_headers){for(var B in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,B)){A.conn.setRequestHeader(B,this._http_headers[B]);}}delete this._http_headers;this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false;},setForm:function(K,E,B){this.resetFormState();var J;if(typeof K=="string"){J=(document.getElementById(K)||document.forms[K]);}else{if(typeof K=="object"){J=K;}else{return ;}}if(E){var F=this.createFrame(B?B:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=J;return ;}var A,I,G,L;var H=false;for(var D=0;D<J.elements.length;D++){A=J.elements[D];L=A.disabled;I=A.name;G=A.value;if(!L&&I){switch(A.type){case"select-one":case"select-multiple":for(var C=0;C<A.options.length;C++){if(A.options[C].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(A.options[C].a!
 ttributes["value"].specified?A.options[C].value:A.options[C].text)+"&";}else{this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(A.options[C].hasAttribute("value")?A.options[C].value:A.options[C].text)+"&";}}}break;case"radio":case"checkbox":if(A.checked){this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(G)+"&";}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(H===false){if(this._hasSubmitListener&&this._submitElementValue){this._sFormData+=this._submitElementValue+"&";}else{this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(G)+"&";}H=true;}break;default:this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(G)+"&";}}}this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);this.initHeader("Content-Type",this._default_form_header);return this._sFormData;},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";},c!
 reateFrame:function(A){var B="yuiIO"+this._transaction_id;var !
 C;if(win
dow.ActiveXObject){C=document.createElement("<iframe id=\""+B+"\" name=\""+B+"\" />");if(typeof A=="boolean"){C.src="javascript:false";}else{if(typeof secureURI=="string"){C.src=A;}}}else{C=document.createElement("iframe");C.id=B;C.name=B;}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C);},appendPostData:function(A){var D=[];var B=A.split("&");for(var C=0;C<B.length;C++){var E=B[C].indexOf("=");if(E!=-1){D[C]=document.createElement("input");D[C].type="hidden";D[C].name=B[C].substring(0,E);D[C].value=B[C].substring(E+1);this._formNode.appendChild(D[C]);}}return D;},uploadFile:function(D,M,E,C){var N=this;var H="yuiIO"+D.tId;var I="multipart/form-data";var K=document.getElementById(H);var J=(M&&M.argument)?M.argument:null;var B={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",E);this._formNode.setAttri!
 bute("method","POST");this._formNode.setAttribute("target",H);if(this._formNode.encoding){this._formNode.setAttribute("encoding",I);}else{this._formNode.setAttribute("enctype",I);}if(C){var L=this.appendPostData(C);}this._formNode.submit();this.startEvent.fire(D,J);if(D.startEvent){D.startEvent.fire(D,J);}if(M&&M.timeout){this._timeOut[D.tId]=window.setTimeout(function(){N.abort(D,M,true);},M.timeout);}if(L&&L.length>0){for(var G=0;G<L.length;G++){this._formNode.removeChild(L[G]);}}for(var A in B){if(YAHOO.lang.hasOwnProperty(B,A)){if(B[A]){this._formNode.setAttribute(A,B[A]);}else{this._formNode.removeAttribute(A);}}}this.resetFormState();var F=function(){if(M&&M.timeout){window.clearTimeout(N._timeOut[D.tId]);delete N._timeOut[D.tId];}N.completeEvent.fire(D,J);if(D.completeEvent){D.completeEvent.fire(D,J);}var P={};P.tId=D.tId;P.argument=M.argument;try{P.responseText=K.contentWindow.document.body?K.contentWindow.document.body.innerHTML:K.contentWindow.document.documentEle!
 ment.textContent;P.responseXML=K.contentWindow.document.XMLDoc!
 ument?K.
contentWindow.document.XMLDocument:K.contentWindow.document;}catch(O){}if(M&&M.upload){if(!M.scope){M.upload(P);}else{M.upload.apply(M.scope,[P]);}}N.uploadEvent.fire(P);if(D.uploadEvent){D.uploadEvent.fire(P);}YAHOO.util.Event.removeListener(K,"load",F);setTimeout(function(){document.body.removeChild(K);N.releaseObject(D);},100);};YAHOO.util.Event.addListener(K,"load",F);},abort:function(E,G,A){var D;var B=(G&&G.argument)?G.argument:null;if(E&&E.conn){if(this.isCallInProgress(E)){E.conn.abort();window.clearInterval(this._poll[E.tId]);delete this._poll[E.tId];if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId];}D=true;}}else{if(E&&E.isUpload===true){var C="yuiIO"+E.tId;var F=document.getElementById(C);if(F){YAHOO.util.Event.removeListener(F,"load");document.body.removeChild(F);if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId];}D=true;}}else{D=false;}}if(D===true){this.abortEvent.fire(E,B);if(E.abortEvent){E.abortEvent.fire(E,!
 B);}this.handleTransactionResponse(E,G,true);}return D;},isCallInProgress:function(B){if(B&&B.conn){return B.conn.readyState!==4&&B.conn.readyState!==0;}else{if(B&&B.isUpload===true){var A="yuiIO"+B.tId;return document.getElementById(A)?true:false;}else{return false;}}},releaseObject:function(A){if(A&&A.conn){A.conn=null;A=null;}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/connection/connection.js
===================================================================
--- trunk/root/static/yui/connection/connection.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/connection/connection.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * The Connection Manager provides a simplified interface to the XMLHttpRequest
@@ -234,14 +234,10 @@
 				document,
 				'click',
 				function(e){
-					try
-					{
-						var obj = YAHOO.util.Event.getTarget(e);
-						if(obj.type.toLowerCase() == 'submit'){
-							YAHOO.util.Connect._submitElementValue = encodeURIComponent(obj.name) + "=" + encodeURIComponent(obj.value);
-						}
+					var obj = YAHOO.util.Event.getTarget(e);
+					if(obj.type && obj.type.toLowerCase() == 'submit'){
+						YAHOO.util.Connect._submitElementValue = encodeURIComponent(obj.name) + "=" + encodeURIComponent(obj.value);
 					}
-					catch(e){}
 				});
 			return true;
 	    }
@@ -478,6 +474,7 @@
 	asyncRequest:function(method, uri, callback, postData)
 	{
 		var o = (this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();
+		var args = (callback && callback.argument)?callback.argument:null;
 
 		if(!o){
 			return null;
@@ -504,9 +501,6 @@
 						// and then concatenate _sFormData to the URI.
 						uri += ((uri.indexOf('?') == -1)?'?':'&') + this._sFormData;
 					}
-					else{
-						uri += "?" + this._sFormData;
-					}
 				}
 				else if(method.toUpperCase() == 'POST'){
 					// If POST data exist in addition to the HTML form data,
@@ -515,6 +509,12 @@
 				}
 			}
 
+			if(method.toUpperCase() == 'GET' && (callback && callback.cache === false)){
+				// If callback.cache is defined and set to false, a
+				// timestamp value will be added to the querystring.
+				uri += ((uri.indexOf('?') == -1)?'?':'&') + "rnd=" + new Date().valueOf().toString();
+			}
+
 			o.conn.open(method, uri, true);
 
 			// Each transaction will automatically include a custom header of
@@ -526,10 +526,13 @@
 				}
 			}
 
-			if(this._isFormSubmit == false && this._use_default_post_header){
+			//If the transaction method is POST and the POST header value is set to true
+			//or a custom value, initalize the Content-Type header to this value.
+			if((method.toUpperCase() == 'POST' && this._use_default_post_header) && this._isFormSubmit === false){
 				this.initHeader('Content-Type', this._default_post_header);
 			}
 
+			//Initialize all default and custom HTTP headers,
 			if(this._has_default_headers || this._has_http_headers){
 				this.setHeader(o);
 			}
@@ -537,12 +540,19 @@
 			this.handleReadyState(o, callback);
 			o.conn.send(postData || null);
 
+
+			// Reset the HTML form data and state properties as
+			// soon as the data are submitted.
+			if(this._isFormSubmit === true){
+				this.resetFormState();
+			}
+
 			// Fire global custom event -- startEvent
-			this.startEvent.fire(o);
+			this.startEvent.fire(o, args);
 
 			if(o.startEvent){
 				// Fire transaction custom event -- startEvent
-				o.startEvent.fire(o);
+				o.startEvent.fire(o, args);
 			}
 
 			return o;
@@ -591,6 +601,7 @@
 
     {
 		var oConn = this;
+		var args = (callback && callback.argument)?callback.argument:null;
 
 		if(callback && callback.timeout){
 			this._timeOut[o.tId] = window.setTimeout(function(){ oConn.abort(o, callback, true); }, callback.timeout);
@@ -611,11 +622,11 @@
 					}
 
 					// Fire global custom event -- completeEvent
-					oConn.completeEvent.fire(o);
+					oConn.completeEvent.fire(o, args);
 
 					if(o.completeEvent){
 						// Fire transaction custom event -- completeEvent
-						o.completeEvent.fire(o);
+						o.completeEvent.fire(o, args);
 					}
 
 					oConn.handleTransactionResponse(o, callback);
@@ -638,8 +649,8 @@
    */
     handleTransactionResponse:function(o, callback, isAbort)
     {
-
 		var httpStatus, responseObject;
+		var args = (callback && callback.argument)?callback.argument:null;
 
 		try
 		{
@@ -659,18 +670,16 @@
 		}
 
 		if(httpStatus >= 200 && httpStatus < 300 || httpStatus === 1223){
-			responseObject = this.createResponseObject(o, (callback && callback.argument)?callback.argument:undefined);
-			if(callback){
-				if(callback.success){
-					if(!callback.scope){
-						callback.success(responseObject);
-					}
-					else{
-						// If a scope property is defined, the callback will be fired from
-						// the context of the object.
-						callback.success.apply(callback.scope, [responseObject]);
-					}
+			responseObject = this.createResponseObject(o, args);
+			if(callback && callback.success){
+				if(!callback.scope){
+					callback.success(responseObject);
 				}
+				else{
+					// If a scope property is defined, the callback will be fired from
+					// the context of the object.
+					callback.success.apply(callback.scope, [responseObject]);
+				}
 			}
 
 			// Fire global custom event -- successEvent
@@ -690,30 +699,26 @@
 				case 12031:
 				case 12152: // Connection closed by server.
 				case 13030: // See above comments for variable status.
-					responseObject = this.createExceptionObject(o.tId, (callback && callback.argument)?callback.argument:undefined, (isAbort?isAbort:false));
-					if(callback){
-						if(callback.failure){
-							if(!callback.scope){
-								callback.failure(responseObject);
-							}
-							else{
-								callback.failure.apply(callback.scope, [responseObject]);
-							}
+					responseObject = this.createExceptionObject(o.tId, args, (isAbort?isAbort:false));
+					if(callback && callback.failure){
+						if(!callback.scope){
+							callback.failure(responseObject);
 						}
+						else{
+							callback.failure.apply(callback.scope, [responseObject]);
+						}
 					}
 
 					break;
 				default:
-					responseObject = this.createResponseObject(o, (callback && callback.argument)?callback.argument:undefined);
-					if(callback){
-						if(callback.failure){
-							if(!callback.scope){
-								callback.failure(responseObject);
-							}
-							else{
-								callback.failure.apply(callback.scope, [responseObject]);
-							}
+					responseObject = this.createResponseObject(o, args);
+					if(callback && callback.failure){
+						if(!callback.scope){
+							callback.failure(responseObject);
 						}
+						else{
+							callback.failure.apply(callback.scope, [responseObject]);
+						}
 					}
 			}
 
@@ -770,7 +775,7 @@
 		obj.responseText = o.conn.responseText;
 		obj.responseXML = o.conn.responseXML;
 
-		if(typeof callbackArg !== undefined){
+		if(callbackArg){
 			obj.argument = callbackArg;
 		}
 
@@ -903,13 +908,14 @@
    */
 	setForm:function(formId, isUpload, secureUri)
 	{
+		// reset the HTML form data and state properties
 		this.resetFormState();
 
 		var oForm;
 		if(typeof formId == 'string'){
 			// Determine if the argument is a form id or a form name.
-			// Note form name usage is deprecated by supported
-			// here for legacy reasons.
+			// Note form name usage is deprecated, but supported
+			// here for backward compatibility.
 			oForm = (document.getElementById(formId) || document.forms[formId]);
 		}
 		else if(typeof formId == 'object'){
@@ -946,9 +952,9 @@
 		// label-value pairs.
 		for (var i=0; i<oForm.elements.length; i++){
 			oElement = oForm.elements[i];
-			oDisabled = oForm.elements[i].disabled;
-			oName = oForm.elements[i].name;
-			oValue = oForm.elements[i].value;
+			oDisabled = oElement.disabled;
+			oName = oElement.name;
+			oValue = oElement.value;
 
 			// Do not submit fields that are disabled or
 			// do not have a name attribute value.
@@ -1111,10 +1117,11 @@
 
 		// Each iframe has an id prefix of "yuiIO" followed
 		// by the unique transaction id.
+		var oConn = this;
 		var frameId = 'yuiIO' + o.tId;
 		var uploadEncoding = 'multipart/form-data';
 		var io = document.getElementById(frameId);
-		var oConn = this;
+		var args = (callback && callback.argument)?callback.argument:null;
 
 		// Track original HTML form attribute values.
 		var rawFormAttributes =
@@ -1147,11 +1154,11 @@
 		this._formNode.submit();
 
 		// Fire global custom event -- startEvent
-		this.startEvent.fire(o);
+		this.startEvent.fire(o, args);
 
 		if(o.startEvent){
 			// Fire transaction custom event -- startEvent
-			o.startEvent.fire(o);
+			o.startEvent.fire(o, args);
 		}
 
 		// Start polling if a callback is present and the timeout
@@ -1194,11 +1201,11 @@
 			}
 
 			// Fire global custom event -- completeEvent
-			oConn.completeEvent.fire(o);
+			oConn.completeEvent.fire(o, args);
 
 			if(o.completeEvent){
 				// Fire transaction custom event -- completeEvent
-				o.completeEvent.fire(o);
+				o.completeEvent.fire(o, args);
 			}
 
 			var obj = {};
@@ -1257,8 +1264,10 @@
 	abort:function(o, callback, isTimeout)
 	{
 		var abortStatus;
+		var args = (callback && callback.argument)?callback.argument:null;
 
-		if(o.conn){
+
+		if(o && o.conn){
 			if(this.isCallInProgress(o)){
 				// Issue abort request
 				o.conn.abort();
@@ -1274,13 +1283,14 @@
 				abortStatus = true;
 			}
 		}
-		else if(o.isUpload === true){
+		else if(o && o.isUpload === true){
 			var frameId = 'yuiIO' + o.tId;
 			var io = document.getElementById(frameId);
 
 			if(io){
-				// Remove the event listener from the iframe.
-				YAHOO.util.Event.removeListener(io, "load", uploadCallback);
+				// Remove all listeners on the iframe prior to
+				// its destruction.
+				YAHOO.util.Event.removeListener(io, "load");
 				// Destroy the iframe facilitating the transaction.
 				document.body.removeChild(io);
 
@@ -1298,11 +1308,11 @@
 
 		if(abortStatus === true){
 			// Fire global custom event -- abortEvent
-			this.abortEvent.fire(o);
+			this.abortEvent.fire(o, args);
 
 			if(o.abortEvent){
 				// Fire transaction custom event -- abortEvent
-				o.abortEvent.fire(o);
+				o.abortEvent.fire(o, args);
 			}
 
 			this.handleTransactionResponse(o, callback, true);
@@ -1345,13 +1355,15 @@
    */
 	releaseObject:function(o)
 	{
-		//dereference the XHR instance.
-		if(o.conn){
+		if(o && o.conn){
+			//dereference the XHR instance.
 			o.conn = null;
+
+
+			//dereference the connection object.
+			o = null;
 		}
-		//dereference the connection object.
-		o = null;
 	}
 };
 
-YAHOO.register("connection", YAHOO.util.Connect, {version: "2.3.1", build: "541"});
\ No newline at end of file
+YAHOO.register("connection", YAHOO.util.Connect, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/container/README
===================================================================
--- trunk/root/static/yui/container/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/container/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,76 @@
 Container Release Notes
 
+*** version 2.4.1 ***
+
+No change
+
+*** version 2.4.0 ***
+
+Fixed the following bugs:
+-------------------------
+
++ constraintoviewport and fixedcenter now handle Overlays which are 
+  larger than the viewport. The Overlay will be positioned such that
+  it's top, left corner is in the viewport. Panel's draggable 
+  behavior now also honors constraintoviewport, if the panel is 
+  larger than the viewport.
+
++ constrainToViewport will now correctly constrain Overlays which 
+  haven't been specifically positioned (don't have an XY value set).
+
++ Overlay/OverlayManager bringToTop methods will bring Overlays to 
+  the top of the stack, even if their current zindex is the same as 
+  other Overlays on the page.
+
++ Fixed double textResizeEvents fired on gecko based browsers (e.g
+  Firefox 2.x).
+
++ Panel underlay now resizes correctly in Safari 2.x, when the 
+  content of the Panel is modified (e.g. when setBody() is called).
+  
++ Tooltip "text" configuration property is no longer overridden by
+  the "title" attribute value on the context element if both are
+  set. The "text" configuration property takes precedence 
+  (as indicated in the Tooltip documentation).
+
++ Transparent shadows no longer become opaque (black) in IE6/IE7 
+  when a Panel with ContainerEffect.FADE is hidden and then 
+  shown again. Also on IE6/IE7 transparent shadows no longer 
+  appear opaque while animation is in progress.
+
++ An empty header is no longer created for non-draggable 
+  Dialogs/SimpleDialogs which don't provide their own headers.
+  By design, an empty header is still created for draggable 
+  Dialogs/SimpleDialogs which don't provide a header, in order 
+  to provide a drag handle.
+  
++ Select boxes inside Modal Panels on IE6 are no longer hidden.
+
++ In Sam Skin, Dialog/SimpleDialog default and non-default HTML 
+  buttons (used when YUI Button is not included on the page) now 
+  have a consistent look. Previously style properties intended 
+  for default YUI Buttons, were being incorrectly applied to 
+  default HTML buttons, giving them a look inconsistent with 
+  non-default buttons.
+
+Added the following features:
+-----------------------------
+
++ Added "dragOnly" configuration property to Panel, to leverage
+  the "dragOnly" configuration property added to the DragDrop 
+  utility for 2.4.0.
+
+  When the "dragOnly" configuration property is set to true,
+  the DD instance created for the Panel will not check for drop 
+  targets on the page, improving performance during drag operations 
+  which don't require drop target interaction.
+
+  The property is set to "false" by default to maintain backwards
+  compatibility with older 2.x releases, but should be set to "true"
+  if no drop targets for the Panel exist on the page.
+
+  See the DragDrop utilities 2.4.0 README for additional information.
+
 *** version 2.3.1 ***
 
 Fixed the following bugs:
@@ -124,8 +195,8 @@
      <div class="box">
         <table>
            <tr>
-        	   <td>1</td>
-        	   <td>2</td>
+               <td>1</td>
+               <td>2</td>
            </tr>
         </table>
      </div>
@@ -658,204 +729,204 @@
 
 *** version 2.2.0 ***
 
-	Module
-	   - Removed hardcoded file paths for image roots.  Affected properties
-	   include:
-		- YAHOO.widget.Module.IMG_ROOT
-		- YAHOO.widget.Module.IMG_ROOT_SSL
-	   - HTML elements, created via createElement, now use lowercase.
+    Module
+       - Removed hardcoded file paths for image roots.  Affected properties
+       include:
+        - YAHOO.widget.Module.IMG_ROOT
+        - YAHOO.widget.Module.IMG_ROOT_SSL
+       - HTML elements, created via createElement, now use lowercase.
 
-	Panel
-	   - To shield against CSS class collision, the following references now
-	   have a "yui-" prefix:
-	      - YAHOO.widget.Panel.CSS_PANEL now references CSS class "yui-
-	      panel".
-	      - YAHOO.widget.Panel.CSS_PANEL_CONTAINER now references CSS class
-	      "yui-panel-container".
-	   -  Close button can now be configured via the CSS class "container-
-	   close".
-	   - HTML elements, created via createElement, now use lowercase.
+    Panel
+       - To shield against CSS class collision, the following references now
+       have a "yui-" prefix:
+          - YAHOO.widget.Panel.CSS_PANEL now references CSS class "yui-
+          panel".
+          - YAHOO.widget.Panel.CSS_PANEL_CONTAINER now references CSS class
+          "yui-panel-container".
+       -  Close button can now be configured via the CSS class "container-
+       close".
+       - HTML elements, created via createElement, now use lowercase.
 
-	Dialog
-	   - To shield against CSS class collision, the following references now
-	   have a "yui-" prefix:
-	   	- YAHOO.widget.Dialog.CSS_DIALOG now references CSS class "yui-
-	   	dialog".
-	   - HTML elements, created via createElement, now use lowercase.
+    Dialog
+       - To shield against CSS class collision, the following references now
+       have a "yui-" prefix:
+        - YAHOO.widget.Dialog.CSS_DIALOG now references CSS class "yui-
+        dialog".
+       - HTML elements, created via createElement, now use lowercase.
 
-	SimpleDialog
-	   - Removed hardcoded file paths for SimpleDialog icons, which are now
-	   configurable in CSS:
-	      - YAHOO.widget.SimpleDialog.ICON_BLOCK now references CSS class
-	      "blckicon".
-	      - YAHOO.widget.SimpleDialog.ICON_ALARM now references CSS class
-	      "alrticon".
-	      - YAHOO.widget.SimpleDialog.ICON_HELP now references CSS class
-	      "hlpicon".
-	      - YAHOO.widget.SimpleDialog.ICON_INFO now references CSS class
-	      "infoicon".
-	      - YAHOO.widget.SimpleDialog.ICON_WARN now references CSS class
-	      "warnicon".
-	      - YAHOO.widget.SimpleDialog.ICON_TIP now references CSS class
-	      "tipicon".
-	   - To provide shield against CSS class collision the following
-	   references now have a "yui-" prefix:
-	      - YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG now references CSS
-	      class "yui-simple-dialog";
+    SimpleDialog
+       - Removed hardcoded file paths for SimpleDialog icons, which are now
+       configurable in CSS:
+          - YAHOO.widget.SimpleDialog.ICON_BLOCK now references CSS class
+          "blckicon".
+          - YAHOO.widget.SimpleDialog.ICON_ALARM now references CSS class
+          "alrticon".
+          - YAHOO.widget.SimpleDialog.ICON_HELP now references CSS class
+          "hlpicon".
+          - YAHOO.widget.SimpleDialog.ICON_INFO now references CSS class
+          "infoicon".
+          - YAHOO.widget.SimpleDialog.ICON_WARN now references CSS class
+          "warnicon".
+          - YAHOO.widget.SimpleDialog.ICON_TIP now references CSS class
+          "tipicon".
+       - To provide shield against CSS class collision the following
+       references now have a "yui-" prefix:
+          - YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG now references CSS
+          class "yui-simple-dialog";
 
-	Tooltip
-	   - To shield against CSS class collision, the following references now
-	   have a "yui-" prefix:
-	      - YAHOO.widget.Tooltip.CSS_TOOLTIP now references CSS class "yui-
-	      tipicon" "yui-tt";
+    Tooltip
+       - To shield against CSS class collision, the following references now
+       have a "yui-" prefix:
+          - YAHOO.widget.Tooltip.CSS_TOOLTIP now references CSS class "yui-
+          tipicon" "yui-tt";
 
 *** version 0.12.2 ***
 
-	Module
-	   - Corrected issue where listener was not properly removed from resize
-	   monitor element when "monitorresize" is disabled
+    Module
+       - Corrected issue where listener was not properly removed from resize
+       monitor element when "monitorresize" is disabled
 
-	Panel
-	   - Fixed issue that would sometimes prevent select lists from working
-	   properly in Firefox
+    Panel
+       - Fixed issue that would sometimes prevent select lists from working
+       properly in Firefox
 
-	Dialog
-	   - Fixed error that would occur when trying to create a Dialog where
-	   the first form element is set to "disabled"
-	   - Modified "close" property handler for Dialog/SimpleDialog to call
-	   "cancel" instead of "hide"
+    Dialog
+       - Fixed error that would occur when trying to create a Dialog where
+       the first form element is set to "disabled"
+       - Modified "close" property handler for Dialog/SimpleDialog to call
+       "cancel" instead of "hide"
 
 *** version 0.12.1 ***
 
-	All Classes
-	   - "monitorresize" property now functions in situations where
-	   document.domain has been modified.
-	   - YAHOO.widget.Module.textResizeEvent now fires when the font size is
-	   changed (except for Opera, which uses "zoom" functionality that
-	   prevents this)
-	   - Event listeners attached to container elements are now properly
-	   purged on destroy using YAHOO.util.Event.purgeElement
+    All Classes
+       - "monitorresize" property now functions in situations where
+       document.domain has been modified.
+       - YAHOO.widget.Module.textResizeEvent now fires when the font size is
+       changed (except for Opera, which uses "zoom" functionality that
+       prevents this)
+       - Event listeners attached to container elements are now properly
+       purged on destroy using YAHOO.util.Event.purgeElement
 
-	Panel
-	   - Fixed issue where focus events were broken on the page when a modal
-	   Panel was created
+    Panel
+       - Fixed issue where focus events were broken on the page when a modal
+       Panel was created
 
-	Dialog
-	   - Fixed bug where hitting "enter" on a Dialog was forcing the default
-	   submission behavior of the form's action to execute
-	   - Dialog no longer tries to give focus to hidden form elements.
-	   - Replaced   references in Panel with   for XHTML
-	   compliance.
-	   - Fixed issue that was preventing Safari from successfully using the
-	   getData() function
+    Dialog
+       - Fixed bug where hitting "enter" on a Dialog was forcing the default
+       submission behavior of the form's action to execute
+       - Dialog no longer tries to give focus to hidden form elements.
+       - Replaced   references in Panel with   for XHTML
+       compliance.
+       - Fixed issue that was preventing Safari from successfully using the
+       getData() function
 
 *** version 0.12 ***
 
-	All Classes
-	   - New documentation format implemented, and removed unnecessary
-	   prototype null references previously used for generating
-	   documentation
+    All Classes
+       - New documentation format implemented, and removed unnecessary
+       prototype null references previously used for generating
+       documentation
 
-	Config
-	   - Added 'undefined' check when reading initial properties for
-	   .reset()
-	   - Fixed Firefox warning on .resetProperty()
-	   - Fixed issue preventing resetProperty() from resetting values
-	   correctly
+    Config
+       - Added 'undefined' check when reading initial properties for
+       .reset()
+       - Fixed Firefox warning on .resetProperty()
+       - Fixed issue preventing resetProperty() from resetting values
+       correctly
 
-	Module
-	   - Removed unused "childNodesInDom" property
+    Module
+       - Removed unused "childNodesInDom" property
 
-	Overlay
-	   - Converted center() to use Dom utility
-	   - Fixed configVisible() to properly detect actual visible/hidden
-	   status in Internet Explorer, which reports "inherit" for all elements
-	   by default.
-	   - Updated onDomResize to properly reapply "context" property
-	   - Unified scroll/resize handlers so that they fire properly (when the
-	   event has completed) as opposed to constantly (as seen in Mozilla-
-	   based browsers)
+    Overlay
+       - Converted center() to use Dom utility
+       - Fixed configVisible() to properly detect actual visible/hidden
+       status in Internet Explorer, which reports "inherit" for all elements
+       by default.
+       - Updated onDomResize to properly reapply "context" property
+       - Unified scroll/resize handlers so that they fire properly (when the
+       event has completed) as opposed to constantly (as seen in Mozilla-
+       based browsers)
 
-	Panel
-	   - Modified modality mask to show before Panel is shown (prior to any
-	   animation)
-	   - Modified buildWrapper to eliminate cloning of the initial markup
-	   module, which fixes issues with select options not maintaining their
-	   default selections in IE
-	   - Modality mask is now z-indexed properly so that the mask z-index is
-	   always one less than the Panel z-index
+    Panel
+       - Modified modality mask to show before Panel is shown (prior to any
+       animation)
+       - Modified buildWrapper to eliminate cloning of the initial markup
+       module, which fixes issues with select options not maintaining their
+       default selections in IE
+       - Modality mask is now z-indexed properly so that the mask z-index is
+       always one less than the Panel z-index
 
-	Dialog
-	   - Fixed Connection to get "action" attribute using getAttribute, to
-	   allow for form fields named "action"
-	   - Added support for "GET" by retrieving the form "method" rather than
-	   always defaulting to "POST"
+    Dialog
+       - Fixed Connection to get "action" attribute using getAttribute, to
+       allow for form fields named "action"
+       - Added support for "GET" by retrieving the form "method" rather than
+       always defaulting to "POST"
 
-	KeyListener
-	   - Fixed to work properly with Safari 2.0 by matching against keyCode
-	   or charCode
+    KeyListener
+       - Fixed to work properly with Safari 2.0 by matching against keyCode
+       or charCode
 
 *** version 0.11.4 ***
 
-	- Panel: Modality mask is now properly removed from DOM on Panel
-	destroy.
+    - Panel: Modality mask is now properly removed from DOM on Panel
+    destroy.
 
 *** version 0.11.3 ***
 
-	- Module: Fixed SSL warning issue in IE
-	- Overlay: Fixed memory leak related to iframe shim in IE
-	- Panel: No focusable elements under the mask can now be tabbed to
-	- Panel: Set Panel container overflow to hidden to fix scrolling issue
-	in Opera 9
+    - Module: Fixed SSL warning issue in IE
+    - Overlay: Fixed memory leak related to iframe shim in IE
+    - Panel: No focusable elements under the mask can now be tabbed to
+    - Panel: Set Panel container overflow to hidden to fix scrolling issue
+    in Opera 9
 
 *** version 0.11.2 ***
 
-	- All: JsLint optimization
-	- Overlay: Fixed SSL issues with monitorresize property
-	- OverlayManager: Fixed z-index incrementing issues
-	- Dialog: Form elements called "name" will now function properly
-	- Dialog: Removed unnecessary scope:this reference
+    - All: JsLint optimization
+    - Overlay: Fixed SSL issues with monitorresize property
+    - OverlayManager: Fixed z-index incrementing issues
+    - Dialog: Form elements called "name" will now function properly
+    - Dialog: Removed unnecessary scope:this reference
 
 *** version 0.11.1 ***
 
-	- Tooltip: Removed incorrect logger statement
-	- Dialog: Corrected logic that was causing browser lockup in IE for
-	SimpleDialog
-	- Dialog: Fixed "firstButtom" typo
+    - Tooltip: Removed incorrect logger statement
+    - Dialog: Corrected logic that was causing browser lockup in IE for
+    SimpleDialog
+    - Dialog: Fixed "firstButtom" typo
 
 *** version 0.11.0 ***
 
-	- toString function added to all classes for easy logging
-	- YAHOO.extend is now being used for inheritance on all container
-	classes
-	- Module: monitorresize feature now works on all browsers
-	- Module: Fixed bug with image root and isSecure
-	- Overlay: Fixed bugs related to IFRAME shim positioning
-	- Overlay: center() now works in quirks mode
-	- Overlay: Overlay now has a custom destroy() method that also removes
-	the IFRAME shim
-	- OverlayManager: Fixed bug in the prototype that was preventing
-	multiple Managers on one page
-	- OverlayManager: focusEvent now fires at all appropriate times
-	- Tooltip: context can now be specified as an array, so Tooltips can be
-	reused across multiple context elements
-	- Tooltip: preventoverlap now functions properly for large context
-	elements (i.e, images)
-	- Tooltip: fixed bugs regarding setTimeout
-	- Tooltip: added mousemove event to allow for more accurate Tooltip
-	positioning
-	- Panel: added dragEvent for monitoring all event handlers for drag and
-	drop
-	- Panel: modality mask is now resized on scroll
-	- Panel: KeyListeners are now properly destroyed when the Panel is
-	destroyed
-	- Panel: Header is now sized properly in quirks mode
-	- Dialog: Blinking cursor issue is fixed for Firefox
-	- Dialog: callback object for Connection is now public (this.callback)
-	- Dialog: onsuccess/onfailure properties removed (as a result of the
-	public callback object)
-	- Dialog: Dialog is now invisible by default
-	- Dialog: Buttons are now properly cleaned up on destroy
+    - toString function added to all classes for easy logging
+    - YAHOO.extend is now being used for inheritance on all container
+    classes
+    - Module: monitorresize feature now works on all browsers
+    - Module: Fixed bug with image root and isSecure
+    - Overlay: Fixed bugs related to IFRAME shim positioning
+    - Overlay: center() now works in quirks mode
+    - Overlay: Overlay now has a custom destroy() method that also removes
+    the IFRAME shim
+    - OverlayManager: Fixed bug in the prototype that was preventing
+    multiple Managers on one page
+    - OverlayManager: focusEvent now fires at all appropriate times
+    - Tooltip: context can now be specified as an array, so Tooltips can be
+    reused across multiple context elements
+    - Tooltip: preventoverlap now functions properly for large context
+    elements (i.e, images)
+    - Tooltip: fixed bugs regarding setTimeout
+    - Tooltip: added mousemove event to allow for more accurate Tooltip
+    positioning
+    - Panel: added dragEvent for monitoring all event handlers for drag and
+    drop
+    - Panel: modality mask is now resized on scroll
+    - Panel: KeyListeners are now properly destroyed when the Panel is
+    destroyed
+    - Panel: Header is now sized properly in quirks mode
+    - Dialog: Blinking cursor issue is fixed for Firefox
+    - Dialog: callback object for Connection is now public (this.callback)
+    - Dialog: onsuccess/onfailure properties removed (as a result of the
+    public callback object)
+    - Dialog: Dialog is now invisible by default
+    - Dialog: Buttons are now properly cleaned up on destroy
 
 *** version 0.10.0 ***
 

Modified: trunk/root/static/yui/container/assets/container-core.css
===================================================================
--- trunk/root/static/yui/container/assets/container-core.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/container/assets/container-core.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 .yui-overlay,
 .yui-panel-container {
@@ -30,10 +30,6 @@
     overflow: auto;
 }
 
-.yui-panel-container select {
-    _visibility: inherit;
-}
-
 /* 
     PLEASE NOTE:
 
@@ -51,15 +47,16 @@
 
 */
 
-.masked select, 
-.drag select, 
+.masked select,
+.drag select,
 .hide-select select {
+    _visibility: hidden;
+}
 
-    _visibility: hidden;   
-
+.yui-panel-container select {
+    _visibility: inherit;
 }
 
-
 /*
 
 There are two known issues with YAHOO.widget.Overlay (and its subclasses) that 
@@ -135,7 +132,20 @@
 
 }
 
+/* 
+   Workaround for Safari 2.x - the yui-force-redraw class is applied, and then removed when
+   the Panel's content changes, to force Safari 2.x to redraw the underlay.
+   We attempt to choose a CSS property which has no visual impact when added,
+   removed.
+*/
+.yui-panel-container.shadow .underlay.yui-force-redraw {
+    padding-bottom: 1px;
+}
 
+.yui-effect-fade .underlay {
+    display:none;
+}
+
 /*
     PLEASE NOTE: The <DIV> element used for a Tooltip's shadow is appended 
     to its root element via JavaScript once it has been rendered.  The 

Modified: trunk/root/static/yui/container/assets/container.css
===================================================================
--- trunk/root/static/yui/container/assets/container.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/container/assets/container.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 .yui-overlay,
 .yui-panel-container {
@@ -173,6 +173,20 @@
 
 }
 
+/* 
+   Workaround for Safari 2.x - the yui-force-redraw class is applied, and then removed when
+   the Panel's content changes, to force Safari 2.x to redraw the underlay.
+   We attempt to choose a CSS property which has no visual impact when added,
+   removed, but still causes Safari to redraw
+*/
+.yui-panel-container.shadow .underlay.yui-force-redraw {
+    padding-bottom: 1px;
+}
+
+.yui-effect-fade .underlay {
+    display:none;
+}
+
 .yui-panel {
     visibility:hidden;
     border-collapse:separate;

Modified: trunk/root/static/yui/container/assets/skins/sam/container-skin.css
===================================================================
--- trunk/root/static/yui/container/assets/skins/sam/container-skin.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/container/assets/skins/sam/container-skin.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* Panel modality mask styles */
 
@@ -190,29 +190,24 @@
 
 }
 
+.yui-skin-sam .yui-dialog .ft button.default {
+    font-weight:bold;
+}
 
-/* Dialog default button styles */
-
-.yui-skin-sam .yui-dialog .ft .default {
-
+/* Dialog default YUI Button styles */
+.yui-skin-sam .yui-dialog .ft span.default {
     border-color: #304369;
     background-position: 0 -1400px;
-
 }
 
-.yui-skin-sam .yui-dialog .ft .default .first-child {
-
+.yui-skin-sam .yui-dialog .ft span.default .first-child {
     border-color: #304369;
-
 }
 
-.yui-skin-sam .yui-dialog .ft .default button {
-
+.yui-skin-sam .yui-dialog .ft span.default button {
     color: #fff;
-
 }
 
-
 /* SimpleDialog icon styles */
 
 .yui-skin-sam .yui-simple-dialog .bd .yui-icon {
@@ -286,18 +281,16 @@
 }
 
 .yui-skin-sam .yui-tt-shadow {
-
     top: 2px;
     right: -3px;
     left: -3px;
     bottom: -3px;
     background-color: #000;
-
 }
 
 .yui-skin-sam .yui-tt-shadow-visible {
 
     opacity: .12;
-    *filter: alpha(opacity=12);  /* For IE */    
+    *filter: alpha(opacity=12);  /* For IE */
 
 }
\ No newline at end of file

Modified: trunk/root/static/yui/container/assets/skins/sam/container.css
===================================================================
--- trunk/root/static/yui/container/assets/skins/sam/container.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/container/assets/skins/sam/container.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2;}.yui-panel-container form{margin:0;}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;}.yui-panel-container select{_visibility:inherit;}.masked select,.drag select,.hide-select select{_visibility:hidden;}.hide-scrollbars,.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.show-scrollbars{overflow:auto;}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible;}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto;}.yui-tt-shadow{position:absolute;}.yui-skin-sam .mask{background-color:#000;opacity:.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px 3px;}.yui-skin-sam .yui-panel{position:relative;*zoom:1;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;}.yui-skin-sam .yui-panel .hd,.yui-skin-sam !
 .yui-panel .bd,.yui-skin-sam .yui-panel .ft{*zoom:1;*position:relative;border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc;}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#F2F2F2;}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -200px;}.yui-skin-sam .yui-panel .bd{padding:10px;}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%;}.yui-skin-sam .yui-panel-container.focused .yui-panel .hd{}.yui-skin-sam .container-close{position:absolute;top:5px;right:6px;width:25px;height:15px;background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -300px;cursor:pointer;}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px;}.yui-skin-sam .yui-panel-container.matte{padding:9px 10px;background!
 -color:#fff;}.yui-skin-sam .yui-panel-container.shadow{_paddin!
 g:2px 5p
x 0 3px;}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;right:-3px;bottom:-3px;left:-3px;*top:3px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_right:0;_bottom:0;_left:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yui-dialog .ft{border-top:none;padding:0 10px 10px 10px;font-size:100%;}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right;}.yui-skin-sam .yui-dialog .ft .default{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-dialog .ft .default .first-child{border-color:#304369;}.yui-skin-sam .yui-dialog .ft .default button{color:#fff;}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left;}.yui-skin-sam .yui-simple-dialog .bd span.blckicon{background-position:0 -1100px;}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{backgr!
 ound-position:0 -1050px;}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-position:0 -1150px;}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px;}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px;}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px;}.yui-skin-sam .yui-tt .bd{position:relative;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#D4C237 #A6982B #A6982B #A6982B;border-width:1px;border-style:solid;background-color:#FFEE69;}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto;}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;*filter:alpha(opacity=12);}
+.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2;}.yui-panel-container form{margin:0;}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;}.masked select,.drag select,.hide-select select{_visibility:hidden;}.yui-panel-container select{_visibility:inherit;}.hide-scrollbars,.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.show-scrollbars{overflow:auto;}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible;}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto;}.yui-panel-container.shadow .underlay.yui-force-redraw{padding-bottom:1px;}.yui-effect-fade .underlay{display:none;}.yui-tt-shadow{position:absolute;}.yui-skin-sam .mask{background-color:#000;opacity:.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px 3px;}.yui-skin-sam .yui-panel{position:relative;*zoom:1;left:0;top!
 :0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{*zoom:1;*position:relative;border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc;}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#F2F2F2;}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -200px;}.yui-skin-sam .yui-panel .bd{padding:10px;}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%;}.yui-skin-sam .yui-panel-container.focused .yui-panel .hd{}.yui-skin-sam .container-close{position:absolute;top:5px;right:6px;width:25px;height:15px;background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -300px;cursor:pointer;}.yui-skin-sam .yui-!
 panel-container .underlay{right:-1px;left:-1px;}.yui-skin-sam !
 .yui-pan
el-container.matte{padding:9px 10px;background-color:#fff;}.yui-skin-sam .yui-panel-container.shadow{_padding:2px 5px 0 3px;}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;right:-3px;bottom:-3px;left:-3px;*top:3px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_right:0;_bottom:0;_left:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yui-dialog .ft{border-top:none;padding:0 10px 10px 10px;font-size:100%;}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right;}.yui-skin-sam .yui-dialog .ft button.default{font-weight:bold;}.yui-skin-sam .yui-dialog .ft span.default{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-dialog .ft span.default .first-child{border-color:#304369;}.yui-skin-sam .yui-dialog .ft span.default button{color:#fff;}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 0;w!
 idth:16px;height:16px;margin-right:10px;float:left;}.yui-skin-sam .yui-simple-dialog .bd span.blckicon{background-position:0 -1100px;}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px;}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-position:0 -1150px;}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px;}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px;}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px;}.yui-skin-sam .yui-tt .bd{position:relative;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#D4C237 #A6982B #A6982B #A6982B;border-width:1px;border-style:solid;background-color:#FFEE69;}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto;}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;*filter:alpha(opacity=12);}

Modified: trunk/root/static/yui/container/container-debug.js
===================================================================
--- trunk/root/static/yui/container/container-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/container/container-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 (function () {
 
@@ -18,27 +18,21 @@
     * @param {Object} owner The owner Object to which this Config Object belongs
     */
     YAHOO.util.Config = function (owner) {
-    
+
         if (owner) {
-    
             this.init(owner);
-    
         }
-    
-        if (!owner) { 
-        
-            YAHOO.log("No owner specified for Config object", "error"); 
-    
-        }
-    
+
+        if (!owner) {  YAHOO.log("No owner specified for Config object", "error", "Config"); }
+
     };
 
 
     var Lang = YAHOO.lang,
-        CustomEvent = YAHOO.util.CustomEvent,        
+        CustomEvent = YAHOO.util.CustomEvent,
         Config = YAHOO.util.Config;
-    
 
+
     /**
      * Constant representing the CustomEvent type for the config changed event.
      * @property YAHOO.util.Config.CONFIG_CHANGED_EVENT
@@ -157,7 +151,7 @@
         * @param {value} Object The value of the correct type for the property
         */ 
         fireEvent: function ( key, value ) {
-            YAHOO.log("Firing Config event: " + key + "=" + value, "info");
+            YAHOO.log("Firing Config event: " + key + "=" + value, "info", "Config");
             var property = this.config[key];
         
             if (property && property.event) {
@@ -174,7 +168,7 @@
         */
         addProperty: function ( key, propertyObject ) {
             key = key.toLowerCase();
-            YAHOO.log("Added property: " + key, "info");
+            YAHOO.log("Added property: " + key, "info", "Config");
         
             this.config[key] = propertyObject;
         
@@ -279,7 +273,7 @@
             var property;
         
             key = key.toLowerCase();
-            YAHOO.log("setProperty: " + key + "=" + value, "info");
+            YAHOO.log("setProperty: " + key + "=" + value, "info", "Config");
         
             if (this.queueInProgress && ! silent) {
                 // Currently running through a queue... 
@@ -318,7 +312,7 @@
         queueProperty: function (key, value) {
         
             key = key.toLowerCase();
-            YAHOO.log("queueProperty: " + key + "=" + value, "info");
+            YAHOO.log("queueProperty: " + key + "=" + value, "info", "Config");
         
             var property = this.config[key],
                 foundDuplicate = false,
@@ -358,7 +352,7 @@
                         if (queueItem) {
                             queueItemKey = queueItem[0];
                             queueItemValue = queueItem[1];
-                            
+
                             if (queueItemKey == key) {
     
                                 /*
@@ -386,38 +380,38 @@
                 }
         
                 if (property.supercedes) {
-        
+
                     sLen = property.supercedes.length;
-        
+
                     for (s = 0; s < sLen; s++) {
-        
+
                         supercedesCheck = property.supercedes[s];
                         qLen = this.eventQueue.length;
-        
+
                         for (q = 0; q < qLen; q++) {
                             queueItemCheck = this.eventQueue[q];
-        
+
                             if (queueItemCheck) {
                                 queueItemCheckKey = queueItemCheck[0];
                                 queueItemCheckValue = queueItemCheck[1];
-                                
+
                                 if (queueItemCheckKey == 
                                     supercedesCheck.toLowerCase() ) {
-    
+
                                     this.eventQueue.push([queueItemCheckKey, 
                                         queueItemCheckValue]);
-    
+
                                     this.eventQueue[q] = null;
                                     break;
-    
+
                                 }
                             }
                         }
                     }
                 }
 
-                YAHOO.log("Config event queue: " + this.outputEventQueue(), "info");
-        
+                YAHOO.log("Config event queue: " + this.outputEventQueue(), "info", "Config");
+
                 return true;
             } else {
                 return false;
@@ -466,37 +460,23 @@
         applyConfig: function (userConfig, init) {
         
             var sKey,
-                oValue,
                 oConfig;
 
             if (init) {
-
                 oConfig = {};
-
                 for (sKey in userConfig) {
-                
                     if (Lang.hasOwnProperty(userConfig, sKey)) {
-
                         oConfig[sKey.toLowerCase()] = userConfig[sKey];
-
                     }
-                
                 }
-
                 this.initialConfig = oConfig;
-
             }
 
             for (sKey in userConfig) {
-            
                 if (Lang.hasOwnProperty(userConfig, sKey)) {
-            
                     this.queueProperty(sKey, userConfig[sKey]);
-                
                 }
-
             }
-
         },
         
         /**
@@ -563,19 +543,12 @@
             var property = this.config[key.toLowerCase()];
     
             if (property && property.event) {
-    
                 if (!Config.alreadySubscribed(property.event, handler, obj)) {
-    
                     property.event.subscribe(handler, obj, override);
-    
                 }
-    
                 return true;
-    
             } else {
-    
                 return false;
-    
             }
     
         },
@@ -695,28 +668,20 @@
             i;
 
         if (nSubscribers > 0) {
-
             i = nSubscribers - 1;
-        
             do {
-
                 subsc = evt.subscribers[i];
-
                 if (subsc && subsc.obj == obj && subsc.fn == fn) {
-        
                     return true;
-        
-                }    
-            
+                }
             }
             while (i--);
-        
         }
-    
+
         return false;
-    
+
     };
-    
+
     YAHOO.lang.augmentProto(Config, YAHOO.util.EventProvider);
 
 }());
@@ -806,13 +771,13 @@
         * @type Object
         */
         DEFAULT_CONFIG = {
-
+        
             "VISIBLE": { 
                 key: "visible", 
                 value: true, 
                 validator: YAHOO.lang.isBoolean 
             },
-
+        
             "EFFECT": { 
                 key: "effect", 
                 suppressEvent: true, 
@@ -1249,7 +1214,7 @@
         */
         init: function (el, userConfig) {
 
-            var elId, i, child;
+            var elId, child;
 
             this.initEvents();
             this.beforeInitEvent.fire(Module);
@@ -1335,6 +1300,7 @@
                 sHTML;
 
             function fireTextResize() {
+                YAHOO.log("Module got iframe contentWindow resize event", "info");
                 Module.textResizeEvent.fire();
             }
 
@@ -1349,20 +1315,19 @@
                     }
 
                     /*
-                        Need to set "src" attribute of the iframe to 
-                        prevent the browser from reporting duplicate 
-                        cookies. (See SourceForge bug #1721755)
-                    */
+                        Need to set the iframe document for Gecko
+                        to fire resize events on the iframe contentWindow.
+                     */
                     if (YAHOO.env.ua.gecko) {
-                        sHTML = "<html><head><script " +
-                                "type=\"text/javascript\">" + 
-                                "window.onresize=function(){window.parent." +
-                                "YAHOO.widget.Module.textResizeEvent." +
-                                "fire();};window.parent.YAHOO.widget.Module." +
-                                "textResizeEvent.fire();</script></head>" + 
-                                "<body></body></html>";
+                         sHTML = ["<html><head><script ",
+                                  "type=\"text/javascript\">",
+                                  "window.onresize=function(){window.parent.",
+                                  "YAHOO.widget.Module.textResizeEvent.",
+                                  "fire();}", 
+                                  "<\/script></head>",
+                                  "<body></body></html>"].join('');
 
-                        oIFrame.src = "data:text/html;charset=utf-8," + 
+                        oIFrame.src = "data:text/html;charset=utf-8," +
                             encodeURIComponent(sHTML);
                     }
 
@@ -1390,6 +1355,10 @@
                     oIFrame.style.borderWidth = "0";
                     oIFrame.style.visibility = "visible";
 
+                    /*
+                       Don't open/close the document for Gecko like we used to, since it
+                       leads to duplicate cookies. (See SourceForge bug #1721755)
+                    */
                     if (YAHOO.env.ua.webkit) {
                         oDoc = oIFrame.contentWindow.document;
                         oDoc.open();
@@ -1401,13 +1370,16 @@
                     Module.textResizeEvent.subscribe(this.onDomResize, this, true);
 
                     if (!Module.textResizeInitialized) {
-                        if (!Event.on(oIFrame.contentWindow, "resize", fireTextResize)) {
-                            /*
-                                 This will fail in IE if document.domain has 
-                                 changed, so we must change the listener to 
-                                 use the oIFrame element instead
-                            */
-                            Event.on(oIFrame, "resize", fireTextResize);
+                         // We already handle gecko using the iframe's document content
+                        if (!YAHOO.env.ua.gecko) {
+                            if (!Event.on(oIFrame.contentWindow, "resize", fireTextResize)) {
+                                /*
+                                     This will fail in IE if document.domain has 
+                                     changed, so we must change the listener to 
+                                     use the oIFrame element instead
+                                */
+                                Event.on(oIFrame, "resize", fireTextResize);
+                            }
                         }
                         Module.textResizeInitialized = true;
                     }
@@ -1429,7 +1401,7 @@
         
             this.resizeMonitor.style.top = nTop + "px";
             this.resizeMonitor.style.left =  nLeft + "px";
-        
+
         },
         
         /**
@@ -1764,7 +1736,7 @@
         },
 
         /**
-         * This method is a private helper, used when constructing the DOM structure for the module 
+         * This method is a protected helper, used when constructing the DOM structure for the module 
          * to account for situations which may cause Operation Aborted errors in IE. It should not 
          * be used for general DOM construction.
          * <p>
@@ -1843,10 +1815,8 @@
         * @type Object
         */
         EVENT_TYPES = {
-        
             "BEFORE_MOVE": "beforeMove",
             "MOVE": "move"
-        
         },
 
         /**
@@ -1857,21 +1827,21 @@
         * @type Object
         */
         DEFAULT_CONFIG = {
-        
+
             "X": { 
                 key: "x", 
                 validator: Lang.isNumber, 
                 suppressEvent: true, 
-                supercedes: ["iframe"] 
+                supercedes: ["iframe"]
             },
-        
+
             "Y": { 
                 key: "y", 
                 validator: Lang.isNumber, 
                 suppressEvent: true, 
-                supercedes: ["iframe"] 
+                supercedes: ["iframe"]
             },
-        
+
             "XY": { 
                 key: "xy", 
                 suppressEvent: true, 
@@ -1912,7 +1882,7 @@
                 key: "constraintoviewport", 
                 value: false, 
                 validator: Lang.isBoolean, 
-                supercedes: ["iframe", "x", "y", "xy"] 
+                supercedes: ["iframe", "x", "y", "xy"]
             }, 
 
             "IFRAME": { 
@@ -1934,7 +1904,7 @@
 
     /**
     * Number representing how much the iframe shim should be offset from each 
-    * side of an Overlay instance.
+    * side of an Overlay instance, in pixels.
     * @property YAHOO.widget.Overlay.IFRAME_SRC
     * @default 3
     * @static
@@ -1942,8 +1912,19 @@
     * @type Number
     */
     Overlay.IFRAME_OFFSET = 3;
-    
+
     /**
+    * Number representing the minimum distance an Overlay instance should be 
+    * positioned relative to the boundaries of the browser's viewport, in pixels.
+    * @property YAHOO.widget.Overlay.VIEWPORT_OFFSET
+    * @default 10
+    * @static
+    * @final
+    * @type Number
+    */
+    Overlay.VIEWPORT_OFFSET = 10;
+
+    /**
     * Constant representing the top left corner of an element, used for 
     * configuring the context element alignment
     * @property YAHOO.widget.Overlay.TOP_LEFT
@@ -1952,7 +1933,7 @@
     * @type String
     */
     Overlay.TOP_LEFT = "tl";
-    
+
     /**
     * Constant representing the top right corner of an element, used for 
     * configuring the context element alignment
@@ -1962,7 +1943,7 @@
     * @type String
     */
     Overlay.TOP_RIGHT = "tr";
-    
+
     /**
     * Constant representing the top bottom left corner of an element, used for 
     * configuring the context element alignment
@@ -1972,7 +1953,7 @@
     * @type String
     */
     Overlay.BOTTOM_LEFT = "bl";
-    
+
     /**
     * Constant representing the bottom right corner of an element, used for 
     * configuring the context element alignment
@@ -1982,7 +1963,7 @@
     * @type String
     */
     Overlay.BOTTOM_RIGHT = "br";
-    
+
     /**
     * Constant representing the default CSS class used for an Overlay
     * @property YAHOO.widget.Overlay.CSS_OVERLAY
@@ -1991,22 +1972,21 @@
     * @type String
     */
     Overlay.CSS_OVERLAY = "yui-overlay";
-    
-    
+
     /**
     * A singleton CustomEvent used for reacting to the DOM event for 
     * window scroll
     * @event YAHOO.widget.Overlay.windowScrollEvent
     */
     Overlay.windowScrollEvent = new CustomEvent("windowScroll");
-    
+
     /**
     * A singleton CustomEvent used for reacting to the DOM event for
     * window resize
     * @event YAHOO.widget.Overlay.windowResizeEvent
     */
     Overlay.windowResizeEvent = new CustomEvent("windowResize");
-    
+
     /**
     * The DOM event handler used to fire the CustomEvent for window scroll
     * @method YAHOO.widget.Overlay.windowScrollHandler
@@ -2014,13 +1994,13 @@
     * @param {DOMEvent} e The DOM scroll event
     */
     Overlay.windowScrollHandler = function (e) {
-    
+
         if (YAHOO.env.ua.ie) {
 
             if (! window.scrollEnd) {
                 window.scrollEnd = -1;
             }
-    
+
             clearTimeout(window.scrollEnd);
     
             window.scrollEnd = setTimeout(function () { 
@@ -2054,7 +2034,7 @@
             Overlay.windowResizeEvent.fire();
         }
     };
-    
+
     /**
     * A boolean that indicated whether the window resize and scroll events have 
     * already been subscribed to.
@@ -2063,7 +2043,7 @@
     * @type Boolean
     */
     Overlay._initialized = null;
-    
+
     if (Overlay._initialized === null) {
         Event.on(window, "scroll", Overlay.windowScrollHandler);
         Event.on(window, "resize", Overlay.windowResizeHandler);
@@ -2072,7 +2052,7 @@
     }
 
     YAHOO.extend(Overlay, Module, {
-    
+
         /**
         * The Overlay initialization method, which is executed for Overlay and  
         * all of its subclasses. This method is automatically called by the 
@@ -2093,7 +2073,7 @@
             */
     
             Overlay.superclass.init.call(this, el/*, userConfig*/);  
-            
+
             this.beforeInitEvent.fire(Overlay);
             
             Dom.addClass(this.element, Overlay.CSS_OVERLAY);
@@ -2228,7 +2208,7 @@
                 supercedes: DEFAULT_CONFIG.CONTEXT.supercedes
             
             });
-    
+
             /**
             * True if the Overlay should be anchored to the center of 
             * the viewport.
@@ -2252,13 +2232,13 @@
             * @default null
             */
             this.cfg.addProperty(DEFAULT_CONFIG.WIDTH.key, {
-            
+
                 handler: this.configWidth, 
                 suppressEvent: DEFAULT_CONFIG.WIDTH.suppressEvent, 
                 supercedes: DEFAULT_CONFIG.WIDTH.supercedes
-            
+
             });
-            
+
             /**
             * CSS height of the Overlay.
             * @config height
@@ -2266,13 +2246,13 @@
             * @default null
             */
             this.cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key, {
-            
+
                 handler: this.configHeight, 
                 suppressEvent: DEFAULT_CONFIG.HEIGHT.suppressEvent, 
                 supercedes: DEFAULT_CONFIG.HEIGHT.supercedes
             
             });
-            
+
             /**
             * CSS z-index of the Overlay.
             * @config zIndex
@@ -2280,10 +2260,10 @@
             * @default null
             */
             this.cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key, {
-    
+
                 handler: this.configzIndex,
                 value: DEFAULT_CONFIG.ZINDEX.value
-    
+
             });
             
             /**
@@ -2294,12 +2274,12 @@
             * @default false
             */
             this.cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key, {
-            
+
                 handler: this.configConstrainToViewport, 
                 value: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value, 
                 validator: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator, 
                 supercedes: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes
-            
+
             });
             
             /**
@@ -2313,7 +2293,7 @@
             * @default true for IE6 and below, false for all other browsers.
             */
             this.cfg.addProperty(DEFAULT_CONFIG.IFRAME.key, {
-            
+
                 handler: this.configIframe, 
                 value: DEFAULT_CONFIG.IFRAME.value, 
                 validator: DEFAULT_CONFIG.IFRAME.validator, 
@@ -2330,9 +2310,7 @@
         * @param {Number} y The Overlay's new y position
         */
         moveTo: function (x, y) {
-    
             this.cfg.setProperty("xy", [x, y]);
-    
         },
 
         /**
@@ -2384,64 +2362,64 @@
                 eff, ei, e, i, j, k, h,
                 nEffects,
                 nEffectInstances;
-    
+
             if (currentVis == "inherit") {
                 e = this.element.parentNode;
-    
+
                 while (e.nodeType != 9 && e.nodeType != 11) {
                     currentVis = Dom.getStyle(e, "visibility");
-    
+
                     if (currentVis != "inherit") { 
                         break; 
                     }
-    
+
                     e = e.parentNode;
                 }
-    
+
                 if (currentVis == "inherit") {
                     currentVis = "visible";
                 }
             }
-    
+
             if (effect) {
                 if (effect instanceof Array) {
                     nEffects = effect.length;
-    
+
                     for (i = 0; i < nEffects; i++) {
                         eff = effect[i];
                         effectInstances[effectInstances.length] = 
                             eff.effect(this, eff.duration);
-    
+
                     }
                 } else {
                     effectInstances[effectInstances.length] = 
                         effect.effect(this, effect.duration);
                 }
             }
-    
-        
+
+
             if (visible) { // Show
                 if (isMacGecko) {
                     this.showMacGeckoScrollbars();
                 }
-    
+
                 if (effect) { // Animate in
                     if (visible) { // Animate in if not showing
                         if (currentVis != "visible" || currentVis === "") {
                             this.beforeShowEvent.fire();
                             nEffectInstances = effectInstances.length;
-    
+
                             for (j = 0; j < nEffectInstances; j++) {
                                 ei = effectInstances[j];
                                 if (j === 0 && !alreadySubscribed(
                                         ei.animateInCompleteEvent, 
                                         this.showEvent.fire, this.showEvent)) {
-    
+
                                     /*
                                          Delegate showEvent until end 
                                          of animateInComplete
                                     */
-    
+
                                     ei.animateInCompleteEvent.subscribe(
                                      this.showEvent.fire, this.showEvent, true);
                                 }
@@ -2452,15 +2430,15 @@
                 } else { // Show
                     if (currentVis != "visible" || currentVis === "") {
                         this.beforeShowEvent.fire();
-    
+
                         Dom.setStyle(this.element, "visibility", "visible");
-    
+
                         this.cfg.refireEvent("iframe");
                         this.showEvent.fire();
                     }
                 }
             } else { // Hide
-    
+
                 if (isMacGecko) {
                     this.hideMacGeckoScrollbars();
                 }
@@ -2488,13 +2466,13 @@
                             }
                             h.animateOut();
                         }
-    
+
                     } else if (currentVis === "") {
                         Dom.setStyle(this.element, "visibility", "hidden");
                     }
-    
+
                 } else { // Simple hide
-    
+
                     if (currentVis == "visible" || currentVis === "") {
                         this.beforeHideEvent.fire();
                         Dom.setStyle(this.element, "visibility", "hidden");
@@ -2526,30 +2504,30 @@
         * this will usually equal the owner.
         */
         configFixedCenter: function (type, args, obj) {
-    
+
             var val = args[0],
                 alreadySubscribed = Config.alreadySubscribed,
                 windowResizeEvent = Overlay.windowResizeEvent,
                 windowScrollEvent = Overlay.windowScrollEvent;
-            
+
             if (val) {
                 this.center();
 
                 if (!alreadySubscribed(this.beforeShowEvent, this.center, this)) {
                     this.beforeShowEvent.subscribe(this.center);
                 }
-            
+
                 if (!alreadySubscribed(windowResizeEvent, this.doCenterOnDOMEvent, this)) {
                     windowResizeEvent.subscribe(this.doCenterOnDOMEvent, this, true);
                 }
-            
+
                 if (!alreadySubscribed(windowScrollEvent, this.doCenterOnDOMEvent, this)) {
                     windowScrollEvent.subscribe(this.doCenterOnDOMEvent, this, true);
                 }
-    
+
             } else {
                 this.beforeShowEvent.unsubscribe(this.center);
-    
+
                 windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent, this);
                 windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent, this);
             }
@@ -2568,11 +2546,11 @@
     
             var height = args[0],
                 el = this.element;
-    
+
             Dom.setStyle(el, "height", height);
             this.cfg.refireEvent("iframe");
         },
-        
+
         /**
         * The default event handler fired when the "width" property is changed.
         * @method configWidth
@@ -2583,7 +2561,7 @@
         * this will usually equal the owner.
         */
         configWidth: function (type, args, obj) {
-    
+
             var width = args[0],
                 el = this.element;
     
@@ -2673,7 +2651,7 @@
             this.cfg.setProperty("y", y, true);
 
             this.beforeMoveEvent.fire([x, y]);
-            
+
             x = this.cfg.getProperty("x");
             y = this.cfg.getProperty("y");
             
@@ -2684,7 +2662,7 @@
             this.cfg.refireEvent("iframe");
             this.moveEvent.fire([x, y]);
         },
-        
+
         /**
         * The default event handler fired when the "y" property is changed.
         * @method configY
@@ -2786,7 +2764,7 @@
          * </p>
          * @method stackIframe
          */
-        stackIframe: function() {
+        stackIframe: function () {
             if (this.iframe) {
                 var overlayZ = Dom.getStyle(this.element, "zIndex");
                 if (!YAHOO.lang.isUndefined(overlayZ) && !isNaN(overlayZ)) {
@@ -2812,8 +2790,7 @@
 
                 var oIFrame = this.iframe,
                     oElement = this.element,
-                    oParent,
-                    aXY;
+                    oParent;
 
                 if (!oIFrame) {
                     if (!m_oIFrameTemplate) {
@@ -2925,23 +2902,38 @@
         * this will usually equal the owner.
         */
         configConstrainToViewport: function (type, args, obj) {
-    
+
+            function constrainBeforeShow() {
+                if (YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))) {
+                    // Set CFG XY based on DOM XY
+                    this.syncPosition();
+                }
+                var x = this.cfg.getProperty("x");
+                var y = this.cfg.getProperty("y");
+
+                // Account for XY being set silently (no moveTo fired/called)
+                var cXY = this.getConstrainedXY(x, y);
+                if (cXY[0] !== x || cXY[1] !== y) {
+                    this.moveTo(cXY[0], cXY[1]);
+                }
+            }
+
             var val = args[0];
-    
+
             if (val) {
-                if (! Config.alreadySubscribed(this.beforeMoveEvent, 
-                    this.enforceConstraints, this)) {
-    
-                    this.beforeMoveEvent.subscribe(this.enforceConstraints, 
-                        this, true);
-    
+                if (! Config.alreadySubscribed(this.beforeMoveEvent, this.enforceConstraints, this)) {
+                    this.beforeMoveEvent.subscribe(this.enforceConstraints, this, true);
                 }
+
+                if (! Config.alreadySubscribed(this.beforeShowEvent, constrainBeforeShow)) {
+                    this.beforeShowEvent.subscribe(constrainBeforeShow);
+                }
             } else {
+                this.beforeShowEvent.unsubscribe(constrainBeforeShow);
                 this.beforeMoveEvent.unsubscribe(this.enforceConstraints, this);
             }
-    
         },
-        
+
         /**
         * The default event handler fired when the "context" property 
         * is changed.
@@ -2968,29 +2960,28 @@
                 if (contextEl) {
     
                     if (typeof contextEl == "string") {
-    
+
                         this.cfg.setProperty("context", 
                             [document.getElementById(contextEl), 
                                 elementMagnetCorner, contextMagnetCorner], 
                                 true);
-    
+
                     }
                     
                     if (elementMagnetCorner && contextMagnetCorner) {
-    
+
                         this.align(elementMagnetCorner, contextMagnetCorner);
-    
+
                     }
-    
+
                 }
-    
+
             }
-    
+
         },
-        
-        
+
         // END BUILT-IN PROPERTY EVENT HANDLERS //
-        
+
         /**
         * Aligns the Overlay to its context element using the specified corner 
         * points (represented by the constants TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, 
@@ -3002,14 +2993,13 @@
         * that the elementAlign corner should stick to.
         */
         align: function (elementAlign, contextAlign) {
-    
+
             var contextArgs = this.cfg.getProperty("context"),
                 me = this,
                 context,
                 element,
                 contextRegion;
-    
-    
+
             function doAlign(v, h) {
     
                 switch (elementAlign) {
@@ -3041,47 +3031,33 @@
                 me = this;
                 
                 if (! elementAlign) {
-    
                     elementAlign = contextArgs[1];
-    
                 }
                 
                 if (! contextAlign) {
-    
                     contextAlign = contextArgs[2];
-    
                 }
                 
                 if (element && context) {
-    
                     contextRegion = Dom.getRegion(context);
-                    
+
                     switch (contextAlign) {
     
                     case Overlay.TOP_LEFT:
-    
                         doAlign(contextRegion.top, contextRegion.left);
-    
                         break;
     
                     case Overlay.TOP_RIGHT:
-    
                         doAlign(contextRegion.top, contextRegion.right);
-    
                         break;
     
                     case Overlay.BOTTOM_LEFT:
-    
                         doAlign(contextRegion.bottom, contextRegion.left);
-    
                         break;
     
                     case Overlay.BOTTOM_RIGHT:
-    
                         doAlign(contextRegion.bottom, contextRegion.right);
-    
                         break;
-    
                     }
     
                 }
@@ -3089,7 +3065,7 @@
             }
             
         },
-        
+
         /**
         * The default event handler executed when the moveEvent is fired, if the 
         * "constraintoviewport" is set to true.
@@ -3101,70 +3077,96 @@
         * this will usually equal the owner.
         */
         enforceConstraints: function (type, args, obj) {
-    
-            var pos = args[0],
-                x = pos[0],
-                y = pos[1],
+            var pos = args[0];
+            var cXY = this.getConstrainedXY(pos[0], pos[1]);
+            this.cfg.setProperty("x", cXY[0], true);
+            this.cfg.setProperty("y", cXY[1], true);
+            this.cfg.setProperty("xy", cXY, true);
+        },
+
+        /**
+         * Given x, y coordinate values, returns the calculated coordinates required to 
+         * position the Overlay if it is to be constrained to the viewport, based on the 
+         * current element size, viewport dimensions and scroll values.
+         *
+         * @param {Number} x The X coordinate value to be constrained
+         * @param {Number} y The Y coordinate value to be constrained
+         * @return {Array} The constrained x and y coordinates at index 0 and 1 respectively;
+         */
+        getConstrainedXY: function(x, y) {
+
+            var nViewportOffset = Overlay.VIEWPORT_OFFSET,
+                viewPortWidth = Dom.getViewportWidth(),
+                viewPortHeight = Dom.getViewportHeight(),
                 offsetHeight = this.element.offsetHeight,
                 offsetWidth = this.element.offsetWidth,
-                viewPortWidth = Dom.getViewportWidth(),
-                viewPortHeight = Dom.getViewportHeight(),
                 scrollX = Dom.getDocumentScrollLeft(),
-                scrollY = Dom.getDocumentScrollTop(),
-                topConstraint = scrollY + 10,
-                leftConstraint = scrollX + 10,
-                bottomConstraint = scrollY + viewPortHeight - offsetHeight - 10,
-                rightConstraint = scrollX + viewPortWidth - offsetWidth - 10;
-        
-    
-            if (x < leftConstraint) {
-    
-                x = leftConstraint;
-    
-            } else if (x > rightConstraint) {
-    
-                x = rightConstraint;
-    
+                scrollY = Dom.getDocumentScrollTop();
+
+            var xNew = x;
+            var yNew = y;
+
+            if (offsetWidth + nViewportOffset < viewPortWidth) {
+
+                var leftConstraint = scrollX + nViewportOffset;
+                var rightConstraint = scrollX + viewPortWidth - offsetWidth - nViewportOffset;
+
+                if (x < leftConstraint) {
+                    xNew = leftConstraint;
+                } else if (x > rightConstraint) {
+                    xNew = rightConstraint;
+                }
+            } else {
+                xNew = nViewportOffset + scrollX;
             }
-            
-            if (y < topConstraint) {
-    
-                y = topConstraint;
-    
-            } else if (y > bottomConstraint) {
-    
-                y = bottomConstraint;
-    
+
+            if (offsetHeight + nViewportOffset < viewPortHeight) {
+
+                var topConstraint = scrollY + nViewportOffset;
+                var bottomConstraint = scrollY + viewPortHeight - offsetHeight - nViewportOffset;
+
+                if (y < topConstraint) {
+                    yNew  = topConstraint;
+                } else if (y  > bottomConstraint) {
+                    yNew  = bottomConstraint;
+                }
+            } else {
+                yNew = nViewportOffset + scrollY;
             }
-            
-            this.cfg.setProperty("x", x, true);
-            this.cfg.setProperty("y", y, true);
-            this.cfg.setProperty("xy", [x, y], true);
-    
+
+            return [xNew, yNew];
         },
-        
+
         /**
         * Centers the container in the viewport.
         * @method center
         */
         center: function () {
-    
-            var scrollX = Dom.getDocumentScrollLeft(),
-                scrollY = Dom.getDocumentScrollTop(),
-    
-                viewPortWidth = Dom.getClientWidth(),
-                viewPortHeight = Dom.getClientHeight(),
+
+            var nViewportOffset = Overlay.VIEWPORT_OFFSET,
                 elementWidth = this.element.offsetWidth,
                 elementHeight = this.element.offsetHeight,
-                x = (viewPortWidth / 2) - (elementWidth / 2) + scrollX,
-                y = (viewPortHeight / 2) - (elementHeight / 2) + scrollY;
-            
+                viewPortWidth = Dom.getViewportWidth(),
+                viewPortHeight = Dom.getViewportHeight(),
+                x,
+                y;
+
+            if (elementWidth < viewPortWidth) {
+                x = (viewPortWidth / 2) - (elementWidth / 2) + Dom.getDocumentScrollLeft();
+            } else {
+                x = nViewportOffset + Dom.getDocumentScrollLeft();
+            }
+
+            if (elementHeight < viewPortHeight) {
+                y = (viewPortHeight / 2) - (elementHeight / 2) + Dom.getDocumentScrollTop();
+            } else {
+                y = nViewportOffset + Dom.getDocumentScrollTop();
+            }
+
             this.cfg.setProperty("xy", [parseInt(x, 10), parseInt(y, 10)]);
-            
             this.cfg.refireEvent("iframe");
-    
         },
-        
+
         /**
         * Synchronizes the Panel's "xy", "x", and "y" properties with the 
         * Panel's position in the DOM. This is primarily used to update  
@@ -3172,15 +3174,15 @@
         * @method syncPosition
         */
         syncPosition: function () {
-    
+
             var pos = Dom.getXY(this.element);
-    
+
             this.cfg.setProperty("x", pos[0], true);
             this.cfg.setProperty("y", pos[1], true);
             this.cfg.setProperty("xy", pos, true);
-    
+
         },
-        
+
         /**
         * Event handler fired when the resize monitor element is resized.
         * @method onDomResize
@@ -3188,11 +3190,11 @@
         * @param {Object} obj The scope object
         */
         onDomResize: function (e, obj) {
-    
+
             var me = this;
-    
+
             Overlay.superclass.onDomResize.call(this, e, obj);
-    
+
             setTimeout(function () {
                 me.syncPosition();
                 me.cfg.refireEvent("iframe");
@@ -3206,83 +3208,71 @@
         * YAHOO.widget.Overlay.
         * @method bringToTop
         */
-        bringToTop: function() {
-    
+        bringToTop: function () {
+
             var aOverlays = [],
                 oElement = this.element;
-    
+
             function compareZIndexDesc(p_oOverlay1, p_oOverlay2) {
-        
+
                 var sZIndex1 = Dom.getStyle(p_oOverlay1, "zIndex"),
-        
                     sZIndex2 = Dom.getStyle(p_oOverlay2, "zIndex"),
-        
-                    nZIndex1 = (!sZIndex1 || isNaN(sZIndex1)) ? 
-                        0 : parseInt(sZIndex1, 10),
-        
-                    nZIndex2 = (!sZIndex2 || isNaN(sZIndex2)) ? 
-                        0 : parseInt(sZIndex2, 10);
-        
+
+                    nZIndex1 = (!sZIndex1 || isNaN(sZIndex1)) ? 0 : parseInt(sZIndex1, 10),
+                    nZIndex2 = (!sZIndex2 || isNaN(sZIndex2)) ? 0 : parseInt(sZIndex2, 10);
+
                 if (nZIndex1 > nZIndex2) {
-        
                     return -1;
-        
                 } else if (nZIndex1 < nZIndex2) {
-        
                     return 1;
-        
                 } else {
-        
                     return 0;
-        
                 }
-        
             }
-        
+
             function isOverlayElement(p_oElement) {
-        
+
                 var oOverlay = Dom.hasClass(p_oElement, Overlay.CSS_OVERLAY),
                     Panel = YAHOO.widget.Panel;
-            
+
                 if (oOverlay && !Dom.isAncestor(oElement, oOverlay)) {
-                
                     if (Panel && Dom.hasClass(p_oElement, Panel.CSS_PANEL)) {
-        
                         aOverlays[aOverlays.length] = p_oElement.parentNode;
-                    
-                    }
-                    else {
-        
+                    } else {
                         aOverlays[aOverlays.length] = p_oElement;
-        
                     }
-                
                 }
-            
             }
-            
+
             Dom.getElementsBy(isOverlayElement, "DIV", document.body);
-    
+
             aOverlays.sort(compareZIndexDesc);
-            
+
             var oTopOverlay = aOverlays[0],
                 nTopZIndex;
-            
+
             if (oTopOverlay) {
-    
                 nTopZIndex = Dom.getStyle(oTopOverlay, "zIndex");
-    
-                if (!isNaN(nTopZIndex) && oTopOverlay != oElement) {
-    
-                    this.cfg.setProperty("zindex", 
-                        (parseInt(nTopZIndex, 10) + 2));
-    
+
+                if (!isNaN(nTopZIndex)) {
+                    var bRequiresBump = false;
+
+                    if (oTopOverlay != oElement) {
+                        bRequiresBump = true;
+                    } else if (aOverlays.length > 1) {
+                        var nNextZIndex = Dom.getStyle(aOverlays[1], "zIndex");
+                        // Don't rely on DOM order to stack if 2 overlays are at the same zindex.
+                        if (!isNaN(nNextZIndex) && (nTopZIndex == nNextZIndex)) {
+                            bRequiresBump = true;
+                        }
+                    }
+                    if (bRequiresBump) {
+                        this.cfg.setProperty("zindex", (parseInt(nTopZIndex, 10) + 2));
+                    }
                 }
-            
             }
-        
         },
-        
+
         /**
         * Removes the Overlay element from the DOM and sets all child 
         * elements to null.
@@ -3291,11 +3281,9 @@
         destroy: function () {
 
             if (this.iframe) {
-    
                 this.iframe.parentNode.removeChild(this.iframe);
-    
             }
-        
+
             this.iframe = null;
         
             Overlay.windowResizeEvent.unsubscribe(
@@ -3522,7 +3510,7 @@
                     i = nOverlays - 1;
 
                     do {
-                        this.overlays[i].blur();                    
+                        this.overlays[i].blur();
                     }
                     while(i--);
                 }
@@ -3683,22 +3671,33 @@
                 aOverlays.sort(this.compareZIndexDesc);
 
                 oTopOverlay = aOverlays[0];
-                
+
                 if (oTopOverlay) {
+                    nTopZIndex = Dom.getStyle(oTopOverlay.element, "zIndex");
 
-                    nTopZIndex = Dom.getStyle(oTopOverlay.element, "zIndex");
-    
-                    if (!isNaN(nTopZIndex) && oTopOverlay != oOverlay) {
-    
-                        oOverlay.cfg.setProperty("zIndex", 
-                            (parseInt(nTopZIndex, 10) + 2));
-    
+                    if (!isNaN(nTopZIndex)) {
+
+                        var bRequiresBump = false;
+
+                        if (oTopOverlay !== oOverlay) {
+                            bRequiresBump = true;
+                        } else if (aOverlays.length > 1) {
+                            var nNextZIndex = Dom.getStyle(aOverlays[1].element, "zIndex");
+                            // Don't rely on DOM order to stack if 2 overlays are at the same zindex.
+                            if (!isNaN(nNextZIndex) && (nTopZIndex == nNextZIndex)) {
+                                bRequiresBump = true;
+                            }
+                        }
+
+                        if (bRequiresBump) {
+                            oOverlay.cfg.setProperty("zindex", (parseInt(nTopZIndex, 10) + 2));
+                        }
                     }
                     aOverlays.sort(this.compareZIndexDesc);
                 }
             }
         },
-        
+
         /**
         * Attempts to locate an Overlay by instance or ID.
         * @method find
@@ -3708,7 +3707,7 @@
         * cannot be located.
         */
         find: function (overlay) {
-        
+
             var aOverlays = this.overlays,
                 nOverlays = aOverlays.length,
                 i;
@@ -3781,7 +3780,7 @@
                 while(i--);
             }
         },
-        
+
         /**
         * Hides all Overlays in the manager.
         * @method hideAll
@@ -3800,7 +3799,7 @@
                 while(i--);
             }
         },
-        
+
         /**
         * Returns a string representation of the object.
         * @method toString
@@ -3950,15 +3949,15 @@
             oBody.appendChild(oClone);
 
             sNewWidth = (oClone.offsetWidth + "px");
-            
+
             oBody.removeChild(oClone);
-            
+
             oClone = null;
 
             oConfig.setProperty("width", sNewWidth);
-            
+
             oConfig.refireEvent("xy");
-            
+
             this.subscribe("hide", restoreOriginalWidth, 
                 [(sOriginalWidth || ""), sNewWidth]);
         
@@ -3966,7 +3965,6 @@
 
     }
 
-
     // "onDOMReady" that renders the ToolTip
 
     function onDOMReady(p_sType, p_aArgs, p_oObject) {
@@ -4000,21 +3998,19 @@
         * See configuration documentation for more details.
         */
         init: function (el, userConfig) {
-    
+
             this.logger = new YAHOO.widget.LogWriter(this.toString());
-    
+
             Tooltip.superclass.init.call(this, el);
-    
+
             this.beforeInitEvent.fire(Tooltip);
-    
+
             Dom.addClass(this.element, Tooltip.CSS_TOOLTIP);
-    
+
             if (userConfig) {
-
                 this.cfg.applyConfig(userConfig, true);
+            }
 
-            }
-    
             this.cfg.queueProperty("visible", false);
             this.cfg.queueProperty("constraintoviewport", true);
     
@@ -4091,7 +4087,7 @@
             });
         
             /**
-            * Specifies the Tooltip's text.
+            * Specifies the Tooltip's text. 
             * @config text
             * @type String
             * @default null
@@ -4198,15 +4194,10 @@
         
             
             if (aElements) {
-        
                 nElements = aElements.length;
-                
                 if (nElements > 0) {
-                
                     i = nElements - 1;
-                    
                     do {
-        
                         oElement = aElements[i];
         
                         Event.removeListener(oElement, "mouseover", 
@@ -4217,14 +4208,10 @@
 
                         Event.removeListener(oElement, "mouseout", 
                             this.onContextMouseOut);
-                    
                     }
                     while (i--);
-                
                 }
-        
             }
-        
         },
         
         /**
@@ -4344,14 +4331,14 @@
                 obj.hideProcId = null;
 
             }
-        
+
             Event.on(context, "mousemove", obj.onContextMouseMove, obj);
-        
+
             if (context.title) {
                 obj._tempTitle = context.title;
                 context.title = "";
             }
-        
+
             /**
             * The unique process ID associated with the thread responsible 
             * for showing the Tooltip.
@@ -4411,35 +4398,37 @@
         * with doShow
         */
         doShow: function (e, context) {
-        
+
             var yOffset = 25,
                 me = this;
-        
+
             if (YAHOO.env.ua.opera && context.tagName && 
                 context.tagName.toUpperCase() == "A") {
 
                 yOffset += 12;
 
             }
-        
+
             return setTimeout(function () {
-        
-                if (me._tempTitle) {
+
+                var txt = me.cfg.getProperty("text");
+                // title does not over-ride text
+                if (me._tempTitle && (txt === "" || YAHOO.lang.isUndefined(txt) || YAHOO.lang.isNull(txt))) {
                     me.setBody(me._tempTitle);
                 } else {
                     me.cfg.refireEvent("text");
                 }
-        
+
                 me.logger.log("Show tooltip", "time");
                 me.moveTo(me.pageX, me.pageY + yOffset);
 
                 if (me.cfg.getProperty("preventoverlap")) {
                     me.preventOverlap(me.pageX, me.pageY);
                 }
-        
+
                 Event.removeListener(context, "mousemove", 
                     me.onContextMouseMove);
-        
+
                 me.show();
                 me.hideProcId = me.doHide();
 
@@ -4705,7 +4694,7 @@
         * @type Object
         */
         DEFAULT_CONFIG = {
-        
+
             "CLOSE": { 
                 key: "close", 
                 value: true, 
@@ -4720,6 +4709,13 @@
                 supercedes: ["visible"]  
             },
 
+            "DRAG_ONLY" : {
+                key: "dragonly",
+                value: false,
+                validator: Lang.isBoolean,
+                supercedes: ["draggable"]
+            },
+
             "UNDERLAY": { 
                 key: "underlay", 
                 value: "shadow", 
@@ -4733,10 +4729,10 @@
                 supercedes: ["visible", "zindex"]
             },
 
-            "KEY_LISTENERS": { 
-                key: "keylisteners", 
-                suppressEvent: true, 
-                supercedes: ["visible"] 
+            "KEY_LISTENERS": {
+                key: "keylisteners",
+                suppressEvent: true,
+                supercedes: ["visible"]
             }
         };
 
@@ -4759,7 +4755,6 @@
     */
     Panel.CSS_PANEL_CONTAINER = "yui-panel-container";
 
-
     // Private CustomEvent listeners
 
     /* 
@@ -4769,7 +4764,7 @@
     */
 
     function createHeader(p_sType, p_aArgs) {
-        if (!this.header) {
+        if (!this.header && this.cfg.getProperty("draggable")) {
             this.setHeader(" ");
         }
     }
@@ -4906,7 +4901,7 @@
     }
 
     YAHOO.extend(Panel, Overlay, {
-    
+
         /**
         * The Overlay initialization method, which is executed for Overlay and 
         * all of its subclasses. This method is automatically called by the 
@@ -4927,28 +4922,21 @@
             */
 
             Panel.superclass.init.call(this, el/*, userConfig*/);  
-        
+
             this.beforeInitEvent.fire(Panel);
-        
+
             Dom.addClass(this.element, Panel.CSS_PANEL);
-        
+
             this.buildWrapper();
-        
+
             if (userConfig) {
                 this.cfg.applyConfig(userConfig, true);
             }
-        
+
             this.subscribe("showMask", addFocusEventHandlers);
             this.subscribe("hideMask", removeFocusEventHandlers);
+            this.subscribe("beforeRender", createHeader);
 
-            // We also set up a beforeRender handler
-            // in configDraggable, but we need to check here, 
-            // since configDraggable won't get called until
-            // after the first render
-            if (this.cfg.getProperty("draggable")) {
-                this.subscribe("beforeRender", createHeader);
-            }
-
             this.initEvent.fire(Panel);
         },
         
@@ -5035,8 +5023,35 @@
                 validator: DEFAULT_CONFIG.DRAGGABLE.validator, 
                 supercedes: DEFAULT_CONFIG.DRAGGABLE.supercedes 
             });
-        
+
             /**
+            * Boolean specifying if the draggable Panel should be drag only, not interacting with drop 
+            * targets on the page.
+            * <p>
+            * When set to true, draggable Panels will not check to see if they are over drop targets,
+            * or fire the DragDrop events required to support drop target interaction (onDragEnter, 
+            * onDragOver, onDragOut, onDragDrop etc.).
+            * If the Panel is not designed to be dropped on any target elements on the page, then this 
+            * flag can be set to true to improve performance.
+            * </p>
+            * <p>
+            * When set to false, all drop target related events will be fired.
+            * </p>
+            * <p>
+            * The property is set to false by default to maintain backwards compatibility but should be 
+            * set to true if drop target interaction is not required for the Panel, to improve performance.</p>
+            * 
+            * @config dragOnly
+            * @type Boolean
+            * @default false
+            */
+            this.cfg.addProperty(DEFAULT_CONFIG.DRAG_ONLY.key, { 
+                value: DEFAULT_CONFIG.DRAG_ONLY.value, 
+                validator: DEFAULT_CONFIG.DRAG_ONLY.validator, 
+                supercedes: DEFAULT_CONFIG.DRAG_ONLY.supercedes 
+            });
+
+            /**
             * Sets the type of underlay to display for the Panel. Valid values 
             * are "shadow," "matte," and "none".  <strong>PLEASE NOTE:</strong> 
             * The creation of the underlay element is deferred until the Panel 
@@ -5157,9 +5172,6 @@
                     this.registerDragDrop();
                 }
 
-                if (!Config.alreadySubscribed(this.beforeRenderEvent, createHeader, null)) {
-                    this.subscribe("beforeRender", createHeader);
-                }
                 this.subscribe("beforeShow", setWidthToOffsetWidth);
 
             } else {
@@ -5172,7 +5184,6 @@
                     Dom.setStyle(this.header,"cursor","auto");
                 }
 
-                this.unsubscribe("beforeRender", createHeader);
                 this.unsubscribe("beforeShow", setWidthToOffsetWidth);
             }
         },
@@ -5194,7 +5205,20 @@
                 sUnderlay = args[0].toLowerCase(),
                 oUnderlay = this.underlay,
                 oElement = this.element;
+                
+            function fixWebkitUnderlay() {
+                // Webkit 419.3 (Safari 2.x) does not update
+                // it's Render Tree for the Container when content changes. 
+                // We need to force it to update using this contentChange 
+                // listener
 
+                // Webkit 523.6 doesn't have this problem and doesn't 
+                // need the fix
+                var u = this.underlay;
+                Dom.addClass(u, "yui-force-redraw");
+                window.setTimeout(function(){Dom.removeClass(u, "yui-force-redraw");}, 0);
+            }
+
             function createUnderlay() {
 
                 var nIE;
@@ -5208,29 +5232,25 @@
 
                     oUnderlay = m_oUnderlayTemplate.cloneNode(false);
                     this.element.appendChild(oUnderlay);
-                    
+
                     this.underlay = oUnderlay;
 
                     nIE = UA.ie;
 
-                    if (nIE == 6 || 
-                        (nIE == 7 && document.compatMode == "BackCompat")) {
-                            
+                    if (nIE == 6 || (nIE == 7 && document.compatMode == "BackCompat")) {
+
                         this.sizeUnderlay();
 
-                        this.cfg.subscribeToConfigEvent("width", 
-                            this.sizeUnderlay);
-
-                        this.cfg.subscribeToConfigEvent("height", 
-                            this.sizeUnderlay);
-
+                        this.cfg.subscribeToConfigEvent("width", this.sizeUnderlay);
+                        this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);
                         this.changeContentEvent.subscribe(this.sizeUnderlay);
 
-                        YAHOO.widget.Module.textResizeEvent.subscribe(
-                            this.sizeUnderlay, this, true);
-                    
+                        YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay, this, true);
                     }
 
+                    if (UA.webkit && UA.webkit < 420) {
+                        this.changeContentEvent.subscribe(fixWebkitUnderlay);
+                    }
                 }
 
             }
@@ -5240,7 +5260,7 @@
                 this._underlayDeferred = false;
                 this.beforeShowEvent.unsubscribe(onBeforeShow);
             }
-            
+
             function destroyUnderlay() {
                 if (this._underlayDeferred) {
                     this.beforeShowEvent.unsubscribe(onBeforeShow);
@@ -5248,18 +5268,12 @@
                 }
 
                 if (oUnderlay) {
-
-                    this.cfg.unsubscribeFromConfigEvent("width", 
-                        this.sizeUnderlay);
-
-                    this.cfg.unsubscribeFromConfigEvent("height", 
-                        this.sizeUnderlay);
-
+                    this.cfg.unsubscribeFromConfigEvent("width", this.sizeUnderlay);
+                    this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);
                     this.changeContentEvent.unsubscribe(this.sizeUnderlay);
+                    this.changeContentEvent.unsubscribe(fixWebkitUnderlay);
+                    YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay, this, true);
 
-                    YAHOO.widget.Module.textResizeEvent.unsubscribe(
-                        this.sizeUnderlay, this, true);
-
                     this.element.removeChild(oUnderlay);
 
                     this.underlay = null;
@@ -5269,38 +5283,34 @@
 
             switch (sUnderlay) {
     
-            case "shadow":
-
-                Dom.removeClass(oElement, "matte");
-                Dom.addClass(oElement, "shadow");
-
-                break;
-
-            case "matte":
-
-                if (!bMacGecko) {
-                    destroyUnderlay.call(this);
-                }
-
-                Dom.removeClass(oElement, "shadow");
-                Dom.addClass(oElement, "matte");
-
-                break;
-            default:
-
-                if (!bMacGecko) {
-
-                    destroyUnderlay.call(this);
-
-                }
-            
-                Dom.removeClass(oElement, "shadow");
-                Dom.removeClass(oElement, "matte");
-
-                break;
+                case "shadow":
+    
+                    Dom.removeClass(oElement, "matte");
+                    Dom.addClass(oElement, "shadow");
+    
+                    break;
+    
+                case "matte":
+    
+                    if (!bMacGecko) {
+                        destroyUnderlay.call(this);
+                    }
+    
+                    Dom.removeClass(oElement, "shadow");
+                    Dom.addClass(oElement, "matte");
+    
+                    break;
+                default:
+    
+                    if (!bMacGecko) {
+                        destroyUnderlay.call(this);
+                    }
+                    Dom.removeClass(oElement, "shadow");
+                    Dom.removeClass(oElement, "matte");
+    
+                    break;
             }
 
-
             if ((sUnderlay == "shadow") || (bMacGecko && !oUnderlay)) {
                 
                 if (this.cfg.getProperty("visible")) {
@@ -5536,26 +5546,26 @@
         * @method buildWrapper
         */
         buildWrapper: function () {
-    
+
             var elementParent = this.element.parentNode,
                 originalElement = this.element,
                 wrapper = document.createElement("div");
-    
+
             wrapper.className = Panel.CSS_PANEL_CONTAINER;
             wrapper.id = originalElement.id + "_c";
-        
+
             if (elementParent) {
                 elementParent.insertBefore(wrapper, originalElement);
             }
-        
+
             wrapper.appendChild(originalElement);
-        
+
             this.element = wrapper;
             this.innerElement = originalElement;
-        
+
             Dom.setStyle(this.innerElement, "visibility", "inherit");
         },
-        
+
         /**
         * Adjusts the size of the shadow based on the size of the element.
         * @method sizeUnderlay
@@ -5582,102 +5592,96 @@
         * @method registerDragDrop
         */
         registerDragDrop: function () {
-    
+
             var me = this;
-    
+
             if (this.header) {
-        
+
                 if (!DD) {
-        
                     YAHOO.log("DD dependency not met.", "error");
-        
                     return;
-                
                 }
-        
-                this.dd = new DD(this.element.id, this.id);
-        
+
+                var bDragOnly = (this.cfg.getProperty("dragonly") === true);
+                this.dd = new DD(this.element.id, this.id, {dragOnly: bDragOnly});
+
                 if (!this.header.id) {
                     this.header.id = this.id + "_h";
                 }
-        
-    
+
                 this.dd.startDrag = function () {
-        
+
                     var offsetHeight,
                         offsetWidth,
                         viewPortWidth,
                         viewPortHeight,
                         scrollX,
-                        scrollY,
-                        topConstraint,
-                        leftConstraint,
-                        bottomConstraint,
-                        rightConstraint;
-    
+                        scrollY;
+
                     if (YAHOO.env.ua.ie == 6) {
                         Dom.addClass(me.element,"drag");
                     }
-        
+
                     if (me.cfg.getProperty("constraintoviewport")) {
-    
+
+                        var nViewportOffset = Overlay.VIEWPORT_OFFSET;
+
                         offsetHeight = me.element.offsetHeight;
                         offsetWidth = me.element.offsetWidth;
-                        
+
                         viewPortWidth = Dom.getViewportWidth();
                         viewPortHeight = Dom.getViewportHeight();
-                        
+
                         scrollX = Dom.getDocumentScrollLeft();
                         scrollY = Dom.getDocumentScrollTop();
-                        
-                        topConstraint = scrollY + 10;
-                        leftConstraint = scrollX + 10;
 
-                        bottomConstraint = 
-                            scrollY + viewPortHeight - offsetHeight - 10;
+                        if (offsetHeight + nViewportOffset < viewPortHeight) {
+                            this.minY = scrollY + nViewportOffset;
+                            this.maxY = scrollY + viewPortHeight - offsetHeight - nViewportOffset;
+                        } else {
+                            this.minY = scrollY + nViewportOffset;
+                            this.maxY = scrollY + nViewportOffset;
+                        }
 
-                        rightConstraint = 
-                            scrollX + viewPortWidth - offsetWidth - 10;
-        
-                        this.minX = leftConstraint;
-                        this.maxX = rightConstraint;
+                        if (offsetWidth + nViewportOffset < viewPortWidth) {
+                            this.minX = scrollX + nViewportOffset;
+                            this.maxX = scrollX + viewPortWidth - offsetWidth - nViewportOffset;
+                        } else {
+                            this.minX = scrollX + nViewportOffset;
+                            this.maxX = scrollX + nViewportOffset;
+                        }
+
                         this.constrainX = true;
-        
-                        this.minY = topConstraint;
-                        this.maxY = bottomConstraint;
                         this.constrainY = true;
-    
                     } else {
-    
                         this.constrainX = false;
                         this.constrainY = false;
-    
                     }
-        
+
                     me.dragEvent.fire("startDrag", arguments);
                 };
-        
+
                 this.dd.onDrag = function () {
                     me.syncPosition();
                     me.cfg.refireEvent("iframe");
                     if (this.platform == "mac" && YAHOO.env.ua.gecko) {
                         this.showMacGeckoScrollbars();
                     }
-        
+
                     me.dragEvent.fire("onDrag", arguments);
                 };
-        
+
                 this.dd.endDrag = function () {
 
                     if (YAHOO.env.ua.ie == 6) {
                         Dom.removeClass(me.element,"drag");
                     }
-        
+
                     me.dragEvent.fire("endDrag", arguments);
                     me.moveEvent.fire(me.cfg.getProperty("xy"));
-                    
+
                 };
-        
+
                 this.dd.setHandleElId(this.header.id);
                 this.dd.addInvalidHandleType("INPUT");
                 this.dd.addInvalidHandleType("SELECT");
@@ -6847,11 +6851,7 @@
         * this will usually equal the owner.
         */
         configPostMethod: function (type, args, obj) {
-    
-            var postmethod = args[0];
-        
             this.registerForm();
-    
         },
         
         // END BUILT-IN PROPERTY EVENT HANDLERS //
@@ -7529,67 +7529,69 @@
     * @return {YAHOO.widget.ContainerEffect} The configured ContainerEffect object
     */
     ContainerEffect.FADE = function (overlay, dur) {
-    
-        var fade = new ContainerEffect(overlay, 
-        
-            { attributes: { opacity: { from: 0, to: 1 } }, 
-                duration: dur, 
-                method: Easing.easeIn }, 
-            
-            { attributes: { opacity: { to: 0 } },
-                duration: dur, 
-                method: Easing.easeOut }, 
-            
-            overlay.element);
-        
-    
+
+        var fin = {
+            attributes: {opacity:{from:0, to:1}},
+            duration: dur,
+            method: Easing.easeIn
+        };
+
+        var fout = {
+            attributes: {opacity:{to:0}},
+            duration: dur,
+            method: Easing.easeOut
+        };
+
+        var fade = new ContainerEffect(overlay, fin, fout, overlay.element);
+
+        fade.handleUnderlayStart = function() {
+            var underlay = this.overlay.underlay;
+            if (underlay && YAHOO.env.ua.ie) {
+                var hasFilters = (underlay.filters && underlay.filters.length > 0);
+                if(hasFilters) {
+                    Dom.addClass(overlay.element, "yui-effect-fade");
+                }
+            }
+        };
+
+        fade.handleUnderlayComplete = function() {
+            var underlay = this.overlay.underlay;
+            if (underlay && YAHOO.env.ua.ie) {
+                Dom.removeClass(overlay.element, "yui-effect-fade");
+            }
+        };
+
         fade.handleStartAnimateIn = function (type,args,obj) {
             Dom.addClass(obj.overlay.element, "hide-select");
-        
-            if (! obj.overlay.underlay) {
+
+            if (!obj.overlay.underlay) {
                 obj.overlay.cfg.refireEvent("underlay");
             }
-        
-            if (obj.overlay.underlay) {
-    
-                obj.initialUnderlayOpacity = 
-                    Dom.getStyle(obj.overlay.underlay, "opacity");
-    
-                obj.overlay.underlay.style.filter = null;
-    
-            }
-        
+
+            obj.handleUnderlayStart();
+
             Dom.setStyle(obj.overlay.element, "visibility", "visible");
             Dom.setStyle(obj.overlay.element, "opacity", 0);
         };
-        
-    
+
         fade.handleCompleteAnimateIn = function (type,args,obj) {
             Dom.removeClass(obj.overlay.element, "hide-select");
-        
+
             if (obj.overlay.element.style.filter) {
                 obj.overlay.element.style.filter = null;
             }
-        
-            if (obj.overlay.underlay) {
-                Dom.setStyle(obj.overlay.underlay, "opacity", 
-                    obj.initialUnderlayOpacity);
-            }
-        
+
+            obj.handleUnderlayComplete();
+
             obj.overlay.cfg.refireEvent("iframe");
             obj.animateInCompleteEvent.fire();
         };
-        
-    
+
         fade.handleStartAnimateOut = function (type, args, obj) {
             Dom.addClass(obj.overlay.element, "hide-select");
-        
-            if (obj.overlay.underlay) {
-                obj.overlay.underlay.style.filter = null;
-            }
+            obj.handleUnderlayStart();
         };
-        
-    
+
         fade.handleCompleteAnimateOut =  function (type, args, obj) {
             Dom.removeClass(obj.overlay.element, "hide-select");
             if (obj.overlay.element.style.filter) {
@@ -7597,12 +7599,13 @@
             }
             Dom.setStyle(obj.overlay.element, "visibility", "hidden");
             Dom.setStyle(obj.overlay.element, "opacity", 1);
-        
+
+            obj.handleUnderlayComplete();
+
             obj.overlay.cfg.refireEvent("iframe");
-        
             obj.animateOutCompleteEvent.fire();
         };
-        
+
         fade.init();
         return fade;
     };
@@ -7674,11 +7677,9 @@
     
             var vw = Dom.getViewportWidth(),
                 pos = Dom.getXY(obj.overlay.element),
-                yso = pos[1],
-                currentTo = obj.animOut.attributes.points.to;
+                yso = pos[1];
     
             obj.animOut.attributes.points.to = [(vw + 25), yso];
-    
         };
         
         slide.handleTweenAnimateOut = function (type, args, obj) {
@@ -7835,4 +7836,4 @@
 
 })();
 
-YAHOO.register("container", YAHOO.widget.Module, {version: "2.3.1", build: "541"});
+YAHOO.register("container", YAHOO.widget.Module, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/container/container-min.js
===================================================================
--- trunk/root/static/yui/container/container-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/container/container-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,16 +2,16 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-(function(){YAHOO.util.Config=function(D){if(D){this.init(D);}if(!D){}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE);},checkNumber:function(D){return(!isNaN(D));},fireEvent:function(D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F);}},addProperty:function(E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handler,this.owner);}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queueProperty(!
 E,D.value);}},getConfig:function(){var D={},F,E;for(F in this.config){E=this.config[F];if(E&&E.event){D[F]=E.value;}}return D;},getProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E.value;}else{return undefined;}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true;}}else{return false;}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E,G);return true;}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validator(G)){return false;}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChangedEvent.fire([E,G]);}return true;}}else{return false;}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false;}else{if(!B.isUndefined(P!
 )){R.value=P;}else{P=R.value;}K=false;J=this.eventQueue.length!
 ;for(L=0
;L<J;L++){G=this.eventQueue[L];if(G){H=G[0];I=G[1];if(H==S){this.eventQueue[L]=null;this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]);K=true;break;}}}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P]);}}if(R.supercedes){O=R.supercedes.length;for(T=0;T<O;T++){Q=R.supercedes[T];F=this.eventQueue.length;for(E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M[0];D=M[1];if(N==Q.toLowerCase()){this.eventQueue.push([N,D]);this.eventQueue[E]=null;break;}}}}}return true;}else{return false;}},refireEvent:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queueProperty(D);}else{this.fireEvent(D,E.value);}}},applyConfig:function(E,H){var G,D,F;if(H){F={};for(G in E){if(B.hasOwnProperty(E,G)){F[G.toLowerCase()]=E[G];}}this.initialConfig=F;}for(G in E){if(B.hasOwnProperty(E,G)){this.queueProperty(G,E[G]);}}},refresh:function(){var D;for(D in this.config){this.refireEvent(D);}},fireQueue:function(){var E,H,D,G,F;this.queueInP!
 rogress=true;for(E=0;E<this.eventQueue.length;E++){H=this.eventQueue[E];if(H){D=H[0];G=H[1];F=this.config[D];F.value=G;this.fireEvent(D,G);}}this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()];if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D);}return true;}else{return false;}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F&&F.event){return F.event.unsubscribe(E,G);}else{return false;}},toString:function(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]";}return D;},outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length;for(E=0;E<F;E++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G[1]+", ";}}return D;},destroy:function(){var E=this.config,D,F;for(D in E){if(B.hasOwnProperty(E,D)){F=E[D];F.event.unsubscribeAll();F.event=null;}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.confi!
 g=null;this.initialConfig=null;this.eventQueue=null;}};A.alrea!
 dySubscr
ibed=function(E,H,I){var F=E.subscribers.length,D,G;if(F>0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true;}}while(G--);}return false;};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Module=function(Q,P){if(Q){this.init(Q,P);}else{}};var F=YAHOO.util.Dom,D=YAHOO.util.Config,M=YAHOO.util.Event,L=YAHOO.util.CustomEvent,G=YAHOO.widget.Module,H,O,N,E,A={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},I={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:fals!
 e}};G.IMG_ROOT=null;G.IMG_ROOT_SSL=null;G.CSS_MODULE="yui-module";G.CSS_HEADER="hd";G.CSS_BODY="bd";G.CSS_FOOTER="ft";G.RESIZE_MONITOR_SECURE_URL="javascript:false;";G.textResizeEvent=new L("textResize");function K(){if(!H){H=document.createElement("div");H.innerHTML=("<div class=\""+G.CSS_HEADER+"\"></div><div class=\""+G.CSS_BODY+"\"></div><div class=\""+G.CSS_FOOTER+"\"></div>");O=H.firstChild;N=O.nextSibling;E=N.nextSibling;}return H;}function J(){if(!O){K();}return(O.cloneNode(false));}function B(){if(!N){K();}return(N.cloneNode(false));}function C(){if(!E){K();}return(E.cloneNode(false));}G.prototype={constructor:G,element:null,header:null,body:null,footer:null,id:null,imageRoot:G.IMG_ROOT,initEvents:function(){var P=L.LIST;this.beforeInitEvent=this.createEvent(A.BEFORE_INIT);this.beforeInitEvent.signature=P;this.initEvent=this.createEvent(A.INIT);this.initEvent.signature=P;this.appendEvent=this.createEvent(A.APPEND);
-this.appendEvent.signature=P;this.beforeRenderEvent=this.createEvent(A.BEFORE_RENDER);this.beforeRenderEvent.signature=P;this.renderEvent=this.createEvent(A.RENDER);this.renderEvent.signature=P;this.changeHeaderEvent=this.createEvent(A.CHANGE_HEADER);this.changeHeaderEvent.signature=P;this.changeBodyEvent=this.createEvent(A.CHANGE_BODY);this.changeBodyEvent.signature=P;this.changeFooterEvent=this.createEvent(A.CHANGE_FOOTER);this.changeFooterEvent.signature=P;this.changeContentEvent=this.createEvent(A.CHANGE_CONTENT);this.changeContentEvent.signature=P;this.destroyEvent=this.createEvent(A.DESTORY);this.destroyEvent.signature=P;this.beforeShowEvent=this.createEvent(A.BEFORE_SHOW);this.beforeShowEvent.signature=P;this.showEvent=this.createEvent(A.SHOW);this.showEvent.signature=P;this.beforeHideEvent=this.createEvent(A.BEFORE_HIDE);this.beforeHideEvent.signature=P;this.hideEvent=this.createEvent(A.HIDE);this.hideEvent.signature=P;},platform:function(){var P=navigator.userAgent!
 .toLowerCase();if(P.indexOf("windows")!=-1||P.indexOf("win32")!=-1){return"windows";}else{if(P.indexOf("macintosh")!=-1){return"mac";}else{return false;}}}(),browser:function(){var P=navigator.userAgent.toLowerCase();if(P.indexOf("opera")!=-1){return"opera";}else{if(P.indexOf("msie 7")!=-1){return"ie7";}else{if(P.indexOf("msie")!=-1){return"ie";}else{if(P.indexOf("safari")!=-1){return"safari";}else{if(P.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty(I.VISIBLE.key,{handler:this.configVisible,value:I.VISIBLE.value,validator:I.VISIBLE.validator});this.cfg.addProperty(I.EFFECT.key,{suppressEvent:I.EFFECT.suppressEvent,supercedes:I.EFFECT.supercedes});this.cfg.addProperty(I.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:I.MONITOR_RESIZE.value});this.cfg.addProperty(I.APPEND_TO_DOCUMENT_B!
 ODY.key,{value:I.APPEND_TO_DOCUMENT_BODY.value});},init:functi!
 on(V,U){
var R,T,W;this.initEvents();this.beforeInitEvent.fire(G);this.cfg=new D(this);if(this.isSecure){this.imageRoot=G.IMG_ROOT_SSL;}if(typeof V=="string"){R=V;V=document.getElementById(V);if(!V){V=(K()).cloneNode(false);V.id=R;}}this.element=V;if(V.id){this.id=V.id;}W=this.element.firstChild;if(W){var Q=false,P=false,S=false;do{if(1==W.nodeType){if(!Q&&F.hasClass(W,G.CSS_HEADER)){this.header=W;Q=true;}else{if(!P&&F.hasClass(W,G.CSS_BODY)){this.body=W;P=true;}else{if(!S&&F.hasClass(W,G.CSS_FOOTER)){this.footer=W;S=true;}}}}}while((W=W.nextSibling));}this.initDefaultConfig();F.addClass(this.element,G.CSS_MODULE);if(U){this.cfg.applyConfig(U,true);}if(!D.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}this.initEvent.fire(G);},initResizeMonitor:function(){var P,Q,S;function T(){G.textResizeEvent.fire();}if(!YAHOO.env.ua.opera){Q=F.get("_yuiResizeMonitor");if(!Q){Q=document.createElement("iframe");if(this.i!
 sSecure&&G.RESIZE_MONITOR_SECURE_URL&&YAHOO.env.ua.ie){Q.src=G.RESIZE_MONITOR_SECURE_URL;}if(YAHOO.env.ua.gecko){S="<html><head><script type=\"text/javascript\">window.onresize=function(){window.parent.YAHOO.widget.Module.textResizeEvent.fire();};window.parent.YAHOO.widget.Module.textResizeEvent.fire();</script></head><body></body></html>";Q.src="data:text/html;charset=utf-8,"+encodeURIComponent(S);}Q.id="_yuiResizeMonitor";Q.style.position="absolute";Q.style.visibility="hidden";var R=document.body.firstChild;if(R){document.body.insertBefore(Q,R);}else{document.body.appendChild(Q);}Q.style.width="10em";Q.style.height="10em";Q.style.top=(-1*Q.offsetHeight)+"px";Q.style.left=(-1*Q.offsetWidth)+"px";Q.style.borderWidth="0";Q.style.visibility="visible";if(YAHOO.env.ua.webkit){P=Q.contentWindow.document;P.open();P.close();}}if(Q&&Q.contentWindow){G.textResizeEvent.subscribe(this.onDomResize,this,true);if(!G.textResizeInitialized){if(!M.on(Q.contentWindow,"resize",T)){M.on(Q,"res!
 ize",T);}G.textResizeInitialized=true;}this.resizeMonitor=Q;}}!
 },onDomR
esize:function(S,R){var Q=-1*this.resizeMonitor.offsetWidth,P=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=P+"px";this.resizeMonitor.style.left=Q+"px";},setHeader:function(Q){var P=this.header||(this.header=J());if(typeof Q=="string"){P.innerHTML=Q;}else{P.innerHTML="";P.appendChild(Q);}this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire();},appendToHeader:function(Q){var P=this.header||(this.header=J());P.appendChild(Q);this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire();},setBody:function(Q){var P=this.body||(this.body=B());if(typeof Q=="string"){P.innerHTML=Q;}else{P.innerHTML="";P.appendChild(Q);}this.changeBodyEvent.fire(Q);this.changeContentEvent.fire();},appendToBody:function(Q){var P=this.body||(this.body=B());P.appendChild(Q);this.changeBodyEvent.fire(Q);this.changeContentEvent.fire();},setFooter:function(Q){var P=this.footer||(this.footer=C());if(typeof Q=="string"){P.innerHTML=Q;}else{P.innerHTML="";P.appendChild(Q);}this.chang!
 eFooterEvent.fire(Q);this.changeContentEvent.fire();},appendToFooter:function(Q){var P=this.footer||(this.footer=C());P.appendChild(Q);this.changeFooterEvent.fire(Q);this.changeContentEvent.fire();},render:function(R,P){var S=this,T;function Q(U){if(typeof U=="string"){U=document.getElementById(U);}if(U){S._addToParent(U,S.element);S.appendEvent.fire();}}this.beforeRenderEvent.fire();if(!P){P=this.element;}if(R){Q(R);}else{if(!F.inDocument(this.element)){return false;}}if(this.header&&!F.inDocument(this.header)){T=P.firstChild;if(T){P.insertBefore(this.header,T);}else{P.appendChild(this.header);}}if(this.body&&!F.inDocument(this.body)){if(this.footer&&F.isAncestor(this.moduleElement,this.footer)){P.insertBefore(this.body,this.footer);}else{P.appendChild(this.body);}}if(this.footer&&!F.inDocument(this.footer)){P.appendChild(this.footer);}this.renderEvent.fire();return true;},destroy:function(){var P,Q;if(this.element){M.purgeElement(this.element,true);
-P=this.element.parentNode;}if(P){P.removeChild(this.element);}this.element=null;this.header=null;this.body=null;this.footer=null;G.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire();for(Q in this){if(Q instanceof L){Q.unsubscribeAll();}}},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(Q,P,R){var S=P[0];if(S){this.beforeShowEvent.fire();F.setStyle(this.element,"display","block");this.showEvent.fire();}else{this.beforeHideEvent.fire();F.setStyle(this.element,"display","none");this.hideEvent.fire();}},configMonitorResize:function(R,Q,S){var P=Q[0];if(P){this.initResizeMonitor();}else{G.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null;}},_addToParent:function(P,Q){if(!this.cfg.getProperty("appendtodocumentbody")&&P===document.body&&P.firstChild){P.insertBefore(Q,P.firstChild);}else{P.appendChild(Q);}},toS!
 tring:function(){return"Module "+this.id;}};YAHOO.lang.augmentProto(G,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Overlay=function(L,K){YAHOO.widget.Overlay.superclass.constructor.call(this,L,K);};var F=YAHOO.lang,I=YAHOO.util.CustomEvent,E=YAHOO.widget.Module,J=YAHOO.util.Event,D=YAHOO.util.Dom,C=YAHOO.util.Config,B=YAHOO.widget.Overlay,G,A={"BEFORE_MOVE":"beforeMove","MOVE":"move"},H={"X":{key:"x",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,validator:F.isBoolean,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"ZINDEX":{key:"zindex",value:null!
 },"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:fal!
 se,valid
ator:F.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(YAHOO.env.ua.ie==6?true:false),validator:F.isBoolean,supercedes:["zindex"]}};B.IFRAME_SRC="javascript:false;";B.IFRAME_OFFSET=3;B.TOP_LEFT="tl";B.TOP_RIGHT="tr";B.BOTTOM_LEFT="bl";B.BOTTOM_RIGHT="br";B.CSS_OVERLAY="yui-overlay";B.windowScrollEvent=new I("windowScroll");B.windowResizeEvent=new I("windowResize");B.windowScrollHandler=function(K){if(YAHOO.env.ua.ie){if(!window.scrollEnd){window.scrollEnd=-1;}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){B.windowScrollEvent.fire();},1);}else{B.windowScrollEvent.fire();}};B.windowResizeHandler=function(K){if(YAHOO.env.ua.ie){if(!window.resizeEnd){window.resizeEnd=-1;}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){B.windowResizeEvent.fire();},100);}else{B.windowResizeEvent.fire();}};B._initialized=null;if(B._initialized===null){J.on(window,"scroll",B.windowScrollHandler);J.on(window,"resize",B.windowRes!
 izeHandler);B._initialized=true;}YAHOO.extend(B,E,{init:function(L,K){B.superclass.init.call(this,L);this.beforeInitEvent.fire(B);D.addClass(this.element,B.CSS_OVERLAY);if(K){this.cfg.applyConfig(K,true);}if(this.platform=="mac"&&YAHOO.env.ua.gecko){if(!C.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}if(!C.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}this.initEvent.fire(B);},initEvents:function(){B.superclass.initEvents.call(this);var K=I.LIST;this.beforeMoveEvent=this.createEvent(A.BEFORE_MOVE);this.beforeMoveEvent.signature=K;this.moveEvent=this.createEvent(A.MOVE);this.moveEvent.signature=K;},initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.X.key,{handler:this.configX,validator:H.X.validator,suppressEvent:H.X.suppressEvent,supercedes:H.X.supercedes});thi!
 s.cfg.addProperty(H.Y.key,{handler:this.configY,validator:H.Y.!
 validato
r,suppressEvent:H.Y.suppressEvent,supercedes:H.Y.supercedes});this.cfg.addProperty(H.XY.key,{handler:this.configXY,suppressEvent:H.XY.suppressEvent,supercedes:H.XY.supercedes});this.cfg.addProperty(H.CONTEXT.key,{handler:this.configContext,suppressEvent:H.CONTEXT.suppressEvent,supercedes:H.CONTEXT.supercedes});this.cfg.addProperty(H.FIXED_CENTER.key,{handler:this.configFixedCenter,value:H.FIXED_CENTER.value,validator:H.FIXED_CENTER.validator,supercedes:H.FIXED_CENTER.supercedes});this.cfg.addProperty(H.WIDTH.key,{handler:this.configWidth,suppressEvent:H.WIDTH.suppressEvent,supercedes:H.WIDTH.supercedes});this.cfg.addProperty(H.HEIGHT.key,{handler:this.configHeight,suppressEvent:H.HEIGHT.suppressEvent,supercedes:H.HEIGHT.supercedes});this.cfg.addProperty(H.ZINDEX.key,{handler:this.configzIndex,value:H.ZINDEX.value});this.cfg.addProperty(H.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:H.CONSTRAIN_TO_VIEWPORT.value,validator:H.CONSTRAIN_TO_VIEWPORT.val!
 idator,supercedes:H.CONSTRAIN_TO_VIEWPORT.supercedes});this.cfg.addProperty(H.IFRAME.key,{handler:this.configIframe,value:H.IFRAME.value,validator:H.IFRAME.validator,supercedes:H.IFRAME.supercedes});},moveTo:function(K,L){this.cfg.setProperty("xy",[K,L]);},hideMacGeckoScrollbars:function(){D.removeClass(this.element,"show-scrollbars");D.addClass(this.element,"hide-scrollbars");},showMacGeckoScrollbars:function(){D.removeClass(this.element,"hide-scrollbars");D.addClass(this.element,"show-scrollbars");},configVisible:function(N,K,T){var M=K[0],O=D.getStyle(this.element,"visibility"),U=this.cfg.getProperty("effect"),R=[],Q=(this.platform=="mac"&&YAHOO.env.ua.gecko),b=C.alreadySubscribed,S,L,a,Y,X,W,Z,V,P;if(O=="inherit"){a=this.element.parentNode;while(a.nodeType!=9&&a.nodeType!=11){O=D.getStyle(a,"visibility");if(O!="inherit"){break;}a=a.parentNode;}if(O=="inherit"){O="visible";}}if(U){if(U instanceof Array){V=U.length;
-for(Y=0;Y<V;Y++){S=U[Y];R[R.length]=S.effect(this,S.duration);}}else{R[R.length]=U.effect(this,U.duration);}}if(M){if(Q){this.showMacGeckoScrollbars();}if(U){if(M){if(O!="visible"||O===""){this.beforeShowEvent.fire();P=R.length;for(X=0;X<P;X++){L=R[X];if(X===0&&!b(L.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){L.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}L.animateIn();}}}}else{if(O!="visible"||O===""){this.beforeShowEvent.fire();D.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire();}}}else{if(Q){this.hideMacGeckoScrollbars();}if(U){if(O=="visible"){this.beforeHideEvent.fire();P=R.length;for(W=0;W<P;W++){Z=R[W];if(W===0&&!b(Z.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){Z.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}Z.animateOut();}}else{if(O===""){D.setStyle(this.element,"visibility","hidden");}}}else{if(O=="visible"||O===""){this.befo!
 reHideEvent.fire();D.setStyle(this.element,"visibility","hidden");this.hideEvent.fire();}}}},doCenterOnDOMEvent:function(){if(this.cfg.getProperty("visible")){this.center();}},configFixedCenter:function(O,M,P){var Q=M[0],L=C.alreadySubscribed,N=B.windowResizeEvent,K=B.windowScrollEvent;if(Q){this.center();if(!L(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center);}if(!L(N,this.doCenterOnDOMEvent,this)){N.subscribe(this.doCenterOnDOMEvent,this,true);}if(!L(K,this.doCenterOnDOMEvent,this)){K.subscribe(this.doCenterOnDOMEvent,this,true);}}else{this.beforeShowEvent.unsubscribe(this.center);N.unsubscribe(this.doCenterOnDOMEvent,this);K.unsubscribe(this.doCenterOnDOMEvent,this);}},configHeight:function(N,L,O){var K=L[0],M=this.element;D.setStyle(M,"height",K);this.cfg.refireEvent("iframe");},configWidth:function(N,K,O){var M=K[0],L=this.element;D.setStyle(L,"width",M);this.cfg.refireEvent("iframe");},configzIndex:function(M,K,N){var O=K[0],L=this.el!
 ement;if(!O){O=D.getStyle(L,"zIndex");if(!O||isNaN(O)){O=0;}}i!
 f(this.i
frame||this.cfg.getProperty("iframe")===true){if(O<=0){O=1;}}D.setStyle(L,"zIndex",O);this.cfg.setProperty("zIndex",O,true);if(this.iframe){this.stackIframe();}},configXY:function(M,L,N){var P=L[0],K=P[0],O=P[1];this.cfg.setProperty("x",K);this.cfg.setProperty("y",O);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},configX:function(M,L,N){var K=L[0],O=this.cfg.getProperty("y");this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setX(this.element,K,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},configY:function(M,L,N){var K=this.cfg.getProperty("x"),O=L[0];this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setY(thi!
 s.element,O,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},showIframe:function(){var L=this.iframe,K;if(L){K=this.element.parentNode;if(K!=L.parentNode){this._addToParent(K,L);}L.style.display="block";}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none";}},syncIframe:function(){var K=this.iframe,M=this.element,O=B.IFRAME_OFFSET,L=(O*2),N;if(K){K.style.width=(M.offsetWidth+L+"px");K.style.height=(M.offsetHeight+L+"px");N=this.cfg.getProperty("xy");if(!F.isArray(N)||(isNaN(N[0])||isNaN(N[1]))){this.syncPosition();N=this.cfg.getProperty("xy");}D.setXY(K,[(N[0]-O),(N[1]-O)]);}},stackIframe:function(){if(this.iframe){var K=D.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(K)&&!isNaN(K)){D.setStyle(this.iframe,"zIndex",(K-1));}}},configIframe:function(N,M,O){var K=M[0];function P(){var R=this.iframe,S=this.element,U,T;if(!R){if(!G){G=document.createElement("iframe");if(this.isSecure){G.src=B.!
 IFRAME_SRC;}if(YAHOO.env.ua.ie){G.style.filter="alpha(opacity=!
 0)";G.fr
ameBorder=0;}else{G.style.opacity="0";}G.style.position="absolute";G.style.border="none";G.style.margin="0";G.style.padding="0";G.style.display="none";}R=G.cloneNode(false);U=S.parentNode;var Q=U||document.body;this._addToParent(Q,R);this.iframe=R;}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true;}}function L(){P.call(this);this.beforeShowEvent.unsubscribe(L);this._iframeDeferred=false;}if(K){if(this.cfg.getProperty("visible")){P.call(this);}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(L);this._iframeDeferred=true;}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false;}}},!
 configConstrainToViewport:function(L,K,M){var N=K[0];if(N){if(!C.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}}else{this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}},configContext:function(M,L,O){var Q=L[0],N,P,K;if(Q){N=Q[0];P=Q[1];K=Q[2];if(N){if(typeof N=="string"){this.cfg.setProperty("context",[document.getElementById(N),P,K],true);}if(P&&K){this.align(P,K);}}}},align:function(L,K){var Q=this.cfg.getProperty("context"),P=this,O,N,R;function M(S,T){switch(L){case B.TOP_LEFT:P.moveTo(T,S);break;case B.TOP_RIGHT:P.moveTo((T-N.offsetWidth),S);break;case B.BOTTOM_LEFT:P.moveTo(T,(S-N.offsetHeight));break;case B.BOTTOM_RIGHT:P.moveTo((T-N.offsetWidth),(S-N.offsetHeight));break;}}if(Q){O=Q[0];N=this.element;P=this;if(!L){L=Q[1];}if(!K){K=Q[2];}if(N&&O){R=D.getRegion(O);switch(K){case B.TOP_LEFT:M(R.top,R.left);
-break;case B.TOP_RIGHT:M(R.top,R.right);break;case B.BOTTOM_LEFT:M(R.bottom,R.left);break;case B.BOTTOM_RIGHT:M(R.bottom,R.right);break;}}}},enforceConstraints:function(S,R,O){var U=R[0],W=U[0],V=U[1],L=this.element.offsetHeight,Q=this.element.offsetWidth,T=D.getViewportWidth(),N=D.getViewportHeight(),Z=D.getDocumentScrollLeft(),X=D.getDocumentScrollTop(),M=X+10,P=Z+10,K=X+N-L-10,Y=Z+T-Q-10;if(W<P){W=P;}else{if(W>Y){W=Y;}}if(V<M){V=M;}else{if(V>K){V=K;}}this.cfg.setProperty("x",W,true);this.cfg.setProperty("y",V,true);this.cfg.setProperty("xy",[W,V],true);},center:function(){var Q=D.getDocumentScrollLeft(),O=D.getDocumentScrollTop(),L=D.getClientWidth(),P=D.getClientHeight(),N=this.element.offsetWidth,M=this.element.offsetHeight,K=(L/2)-(N/2)+Q,R=(P/2)-(M/2)+O;this.cfg.setProperty("xy",[parseInt(K,10),parseInt(R,10)]);this.cfg.refireEvent("iframe");},syncPosition:function(){var K=D.getXY(this.element);this.cfg.setProperty("x",K[0],true);this.cfg.setProperty("y",K[1],true);t!
 his.cfg.setProperty("xy",K,true);},onDomResize:function(M,L){var K=this;B.superclass.onDomResize.call(this,M,L);setTimeout(function(){K.syncPosition();K.cfg.refireEvent("iframe");K.cfg.refireEvent("context");},0);},bringToTop:function(){var N=[],M=this.element;function P(T,S){var V=D.getStyle(T,"zIndex"),U=D.getStyle(S,"zIndex"),R=(!V||isNaN(V))?0:parseInt(V,10),Q=(!U||isNaN(U))?0:parseInt(U,10);if(R>Q){return -1;}else{if(R<Q){return 1;}else{return 0;}}}function L(S){var Q=D.hasClass(S,B.CSS_OVERLAY),R=YAHOO.widget.Panel;if(Q&&!D.isAncestor(M,Q)){if(R&&D.hasClass(S,R.CSS_PANEL)){N[N.length]=S.parentNode;}else{N[N.length]=S;}}}D.getElementsBy(L,"DIV",document.body);N.sort(P);var K=N[0],O;if(K){O=D.getStyle(K,"zIndex");if(!isNaN(O)&&K!=M){this.cfg.setProperty("zindex",(parseInt(O,10)+2));}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;B.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.windowScrollEvent.unsu!
 bscribe(this.doCenterOnDOMEvent,this);B.superclass.destroy.cal!
 l(this);
},toString:function(){return"Overlay "+this.id;}});}());(function(){YAHOO.widget.OverlayManager=function(G){this.init(G);};var D=YAHOO.widget.Overlay,C=YAHOO.util.Event,E=YAHOO.util.Dom,B=YAHOO.util.Config,F=YAHOO.util.CustomEvent,A=YAHOO.widget.OverlayManager;A.CSS_FOCUSED="focused";A.prototype={constructor:A,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},init:function(I){this.cfg=new B(this);this.initDefaultConfig();if(I){this.cfg.applyConfig(I,true);}this.cfg.fireQueue();var H=null;this.getActive=function(){return H;};this.focus=function(J){var K=this.find(J);if(K){if(H!=K){if(H){H.blur();}this.bringToTop(K);H=K;E.addClass(H.element,A.CSS_FOCUSED);K.focusEvent.fire();}}};this.remove=function(K){var M=this.find(K),J;if(M){if(H==M){H=null;}var L=(M.element===null&&M.cfg===null)?true:false;if(!L){J=E.getStyle(M.element,"zIndex");M.cfg.setProperty("zIndex",-1000,true);}t!
 his.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));M.hideEvent.unsubscribe(M.blur);M.destroyEvent.unsubscribe(this._onOverlayDestroy,M);if(!L){C.removeListener(M.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);M.cfg.setProperty("zIndex",J,true);M.cfg.setProperty("manager",null);}M.focusEvent.unsubscribeAll();M.blurEvent.unsubscribeAll();M.focusEvent=null;M.blurEvent=null;M.focus=null;M.blur=null;}};this.blurAll=function(){var K=this.overlays.length,J;if(K>0){J=K-1;do{this.overlays[J].blur();}while(J--);}};this._onOverlayBlur=function(K,J){H=null;};var G=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[];}if(G){this.register(G);this.overlays.sort(this.compareZIndexDesc);}},_onOverlayElementFocus:function(I){var G=C.getTarget(I),H=this.close;if(H&&(G==H||E.isAncestor(H,G))){this.blur();}else{this.focus();}},_onOverlayDestroy:function(H,G,I){this.remove(I);},register:function(G){var !
 K=this,L,I,H,J;if(G instanceof D){G.cfg.addProperty("manager",!
 {value:t
his});G.focusEvent=G.createEvent("focus");G.focusEvent.signature=F.LIST;G.blurEvent=G.createEvent("blur");G.blurEvent.signature=F.LIST;G.focus=function(){K.focus(this);};G.blur=function(){if(K.getActive()==this){E.removeClass(this.element,A.CSS_FOCUSED);this.blurEvent.fire();}};G.blurEvent.subscribe(K._onOverlayBlur);G.hideEvent.subscribe(G.blur);G.destroyEvent.subscribe(this._onOverlayDestroy,G,this);C.on(G.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus,null,G);L=E.getStyle(G.element,"zIndex");if(!isNaN(L)){G.cfg.setProperty("zIndex",parseInt(L,10));}else{G.cfg.setProperty("zIndex",0);}this.overlays.push(G);this.bringToTop(G);return true;}else{if(G instanceof Array){I=0;J=G.length;for(H=0;H<J;H++){if(this.register(G[H])){I++;}}if(I>0){return true;}}else{return false;}}},bringToTop:function(K){var H=this.find(K),J,G,I;if(H){I=this.overlays;I.sort(this.compareZIndexDesc);G=I[0];if(G){J=E.getStyle(G.element,"zIndex");if(!isNaN(J)&&G!=H){H.cfg.setPropert!
 y("zIndex",(parseInt(J,10)+2));}I.sort(this.compareZIndexDesc);}}},find:function(G){var I=this.overlays,J=I.length,H;if(J>0){H=J-1;if(G instanceof D){do{if(I[H]==G){return I[H];}}while(H--);}else{if(typeof G=="string"){do{if(I[H].id==G){return I[H];}}while(H--);}}return null;}},compareZIndexDesc:function(J,I){var H=(J.cfg)?J.cfg.getProperty("zIndex"):null,G=(I.cfg)?I.cfg.getProperty("zIndex"):null;if(H===null&&G===null){return 0;}else{if(H===null){return 1;}else{if(G===null){return -1;}else{if(H>G){return -1;}else{if(H<G){return 1;}else{return 0;}}}}}},showAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].show();}while(G--);}},hideAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].hide();}while(G--);}},toString:function(){return"OverlayManager";}};}());(function(){YAHOO.widget.Tooltip=function(L,K){YAHOO.widget.Tooltip.superclass.constructor.call(this,L,K);};var D=YAHOO.lang,J=YAHOO.util.Event,B=YAHOO.util.Dom,F=YAHOO.widget.Tooltip,E,!
 G={"PREVENT_OVERLAP":{key:"preventoverlap",value:true,validato!
 r:D.isBo
olean,supercedes:["x","y","xy"]},"SHOW_DELAY":{key:"showdelay",value:200,validator:D.isNumber},"AUTO_DISMISS_DELAY":{key:"autodismissdelay",value:5000,validator:D.isNumber},"HIDE_DELAY":{key:"hidedelay",value:250,validator:D.isNumber},"TEXT":{key:"text",suppressEvent:true},"CONTAINER":{key:"container"}};
-F.CSS_TOOLTIP="yui-tt";function H(L,K,M){var P=M[0],N=M[1],O=this.cfg,Q=O.getProperty("width");if(Q==N){O.setProperty("width",P);}this.unsubscribe("hide",this._onHide,M);}function C(L,K){var M=document.body,Q=this.cfg,P=Q.getProperty("width"),N,O;if((!P||P=="auto")&&(Q.getProperty("container")!=M||Q.getProperty("x")>=B.getViewportWidth()||Q.getProperty("y")>=B.getViewportHeight())){O=this.element.cloneNode(true);O.style.visibility="hidden";O.style.top="0px";O.style.left="0px";M.appendChild(O);N=(O.offsetWidth+"px");M.removeChild(O);O=null;Q.setProperty("width",N);Q.refireEvent("xy");this.subscribe("hide",H,[(P||""),N]);}}function A(L,K,M){this.render(M);}function I(){J.onDOMReady(A,this.cfg.getProperty("container"),this);}YAHOO.extend(F,YAHOO.widget.Overlay,{init:function(L,K){F.superclass.init.call(this,L);this.beforeInitEvent.fire(F);B.addClass(this.element,F.CSS_TOOLTIP);if(K){this.cfg.applyConfig(K,true);}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("c!
 onstraintoviewport",true);this.setBody("");this.subscribe("beforeShow",C);this.subscribe("init",I);this.subscribe("render",this.onRender);this.initEvent.fire(F);},initDefaultConfig:function(){F.superclass.initDefaultConfig.call(this);this.cfg.addProperty(G.PREVENT_OVERLAP.key,{value:G.PREVENT_OVERLAP.value,validator:G.PREVENT_OVERLAP.validator,supercedes:G.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(G.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:G.SHOW_DELAY.validator});this.cfg.addProperty(G.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:G.AUTO_DISMISS_DELAY.value,validator:G.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(G.HIDE_DELAY.key,{handler:this.configHideDelay,value:G.HIDE_DELAY.value,validator:G.HIDE_DELAY.validator});this.cfg.addProperty(G.TEXT.key,{handler:this.configText,suppressEvent:G.TEXT.suppressEvent});this.cfg.addProperty(G.CONTAINER.key,{handler:this.configContainer,value:document.body});},configText:func!
 tion(L,K,M){var N=K[0];if(N){this.setBody(N);}},configContaine!
 r:functi
on(M,L,N){var K=L[0];if(typeof K=="string"){this.cfg.setProperty("container",document.getElementById(K),true);}},_removeEventListeners:function(){var N=this._context,K,M,L;if(N){K=N.length;if(K>0){L=K-1;do{M=N[L];J.removeListener(M,"mouseover",this.onContextMouseOver);J.removeListener(M,"mousemove",this.onContextMouseMove);J.removeListener(M,"mouseout",this.onContextMouseOut);}while(L--);}}},configContext:function(P,L,Q){var O=L[0],R,K,N,M;if(O){if(!(O instanceof Array)){if(typeof O=="string"){this.cfg.setProperty("context",[document.getElementById(O)],true);}else{this.cfg.setProperty("context",[O],true);}O=this.cfg.getProperty("context");}this._removeEventListeners();this._context=O;R=this._context;if(R){K=R.length;if(K>0){M=K-1;do{N=R[M];J.on(N,"mouseover",this.onContextMouseOver,this);J.on(N,"mousemove",this.onContextMouseMove,this);J.on(N,"mouseout",this.onContextMouseOut,this);}while(M--);}}}},onContextMouseMove:function(L,K){K.pageX=J.getPageX(L);K.pageY=J.getPageY(L);!
 },onContextMouseOver:function(M,L){var K=this;if(L.hideProcId){clearTimeout(L.hideProcId);L.hideProcId=null;}J.on(K,"mousemove",L.onContextMouseMove,L);if(K.title){L._tempTitle=K.title;K.title="";}L.showProcId=L.doShow(M,K);},onContextMouseOut:function(M,L){var K=this;if(L._tempTitle){K.title=L._tempTitle;L._tempTitle=null;}if(L.showProcId){clearTimeout(L.showProcId);L.showProcId=null;}if(L.hideProcId){clearTimeout(L.hideProcId);L.hideProcId=null;}L.hideProcId=setTimeout(function(){L.hide();},L.cfg.getProperty("hidedelay"));},doShow:function(M,K){var N=25,L=this;if(YAHOO.env.ua.opera&&K.tagName&&K.tagName.toUpperCase()=="A"){N+=12;}return setTimeout(function(){if(L._tempTitle){L.setBody(L._tempTitle);}else{L.cfg.refireEvent("text");}L.moveTo(L.pageX,L.pageY+N);if(L.cfg.getProperty("preventoverlap")){L.preventOverlap(L.pageX,L.pageY);}J.removeListener(K,"mousemove",L.onContextMouseMove);L.show();L.hideProcId=L.doHide();},this.cfg.getProperty("showdelay"));},doHide:function()!
 {var K=this;return setTimeout(function(){K.hide();},this.cfg.g!
 etProper
ty("autodismissdelay"));},preventOverlap:function(O,N){var K=this.element.offsetHeight,M=new YAHOO.util.Point(O,N),L=B.getRegion(this.element);L.top-=5;L.left-=5;L.right+=5;L.bottom+=5;if(L.contains(M)){this.cfg.setProperty("y",(N-K-5));}},onRender:function(O,N){function P(){var S=this.element,R=this._shadow;if(R){R.style.width=(S.offsetWidth+6)+"px";R.style.height=(S.offsetHeight+1)+"px";}}function L(){B.addClass(this._shadow,"yui-tt-shadow-visible");}function K(){B.removeClass(this._shadow,"yui-tt-shadow-visible");}function Q(){var T=this._shadow,S,R,V,U;if(!T){S=this.element;R=YAHOO.widget.Module;V=YAHOO.env.ua.ie;U=this;if(!E){E=document.createElement("div");E.className="yui-tt-shadow";}T=E.cloneNode(false);S.appendChild(T);this._shadow=T;L.call(this);this.subscribe("beforeShow",L);this.subscribe("beforeHide",K);if(V==6||(V==7&&document.compatMode=="BackCompat")){window.setTimeout(function(){P.call(U);},0);this.cfg.subscribeToConfigEvent("width",P);this.cfg.subscribeToCo!
 nfigEvent("height",P);this.subscribe("changeContent",P);R.textResizeEvent.subscribe(P,this,true);this.subscribe("destroy",function(){R.textResizeEvent.unsubscribe(P,this);});}}}function M(){Q.call(this);this.unsubscribe("beforeShow",M);}if(this.cfg.getProperty("visible")){Q.call(this);}else{this.subscribe("beforeShow",M);}},destroy:function(){this._removeEventListeners();F.superclass.destroy.call(this);},toString:function(){return"Tooltip "+this.id;}});}());(function(){YAHOO.widget.Panel=function(U,T){YAHOO.widget.Panel.superclass.constructor.call(this,U,T);};var G=YAHOO.lang,N=YAHOO.util.DD,A=YAHOO.util.Dom,S=YAHOO.util.Event,I=YAHOO.widget.Overlay,L=YAHOO.util.CustomEvent,J=YAHOO.util.Config,O=YAHOO.widget.Panel,H,Q,D,E={"SHOW_MASK":"showMask","HIDE_MASK":"hideMask","DRAG":"drag"},M={"CLOSE":{key:"close",value:true,validator:G.isBoolean,supercedes:["visible"]},"DRAGGABLE":{key:"draggable",value:(N?true:false),validator:G.isBoolean,supercedes:["visible"]},"UNDERLAY":{key:"!
 underlay",value:"shadow",supercedes:["visible"]},"MODAL":{key:!
 "modal",
value:false,validator:G.isBoolean,supercedes:["visible","zindex"]},"KEY_LISTENERS":{key:"keylisteners",suppressEvent:true,supercedes:["visible"]}};
-O.CSS_PANEL="yui-panel";O.CSS_PANEL_CONTAINER="yui-panel-container";function K(U,T){if(!this.header){this.setHeader(" ");}}function R(U,T,V){var Y=V[0],W=V[1],X=this.cfg,Z=X.getProperty("width");if(Z==W){X.setProperty("width",Y);}this.unsubscribe("hide",R,V);}function C(U,T){var Y=YAHOO.env.ua.ie,X,W,V;if(Y==6||(Y==7&&document.compatMode=="BackCompat")){X=this.cfg;W=X.getProperty("width");if(!W||W=="auto"){V=(this.element.offsetWidth+"px");X.setProperty("width",V);this.subscribe("hide",R,[(W||""),V]);}}}function F(){this.blur();}function P(V,U){var W=this;function T(Z){var Y=Z.tagName.toUpperCase(),X=false;switch(Y){case"A":case"BUTTON":case"SELECT":case"TEXTAREA":if(!A.isAncestor(W.element,Z)){S.on(Z,"focus",F,Z,true);X=true;}break;case"INPUT":if(Z.type!="hidden"&&!A.isAncestor(W.element,Z)){S.on(Z,"focus",F,Z,true);X=true;}break;}return X;}this.focusableElements=A.getElementsBy(T);}function B(V,U){var Y=this.focusableElements,T=Y.length,W,X;for(X=0;X<T;X++){W=Y[X];S.!
 removeListener(W,"focus",F);}}YAHOO.extend(O,I,{init:function(U,T){O.superclass.init.call(this,U);this.beforeInitEvent.fire(O);A.addClass(this.element,O.CSS_PANEL);this.buildWrapper();if(T){this.cfg.applyConfig(T,true);}this.subscribe("showMask",P);this.subscribe("hideMask",B);if(this.cfg.getProperty("draggable")){this.subscribe("beforeRender",K);}this.initEvent.fire(O);},initEvents:function(){O.superclass.initEvents.call(this);var T=L.LIST;this.showMaskEvent=this.createEvent(E.SHOW_MASK);this.showMaskEvent.signature=T;this.hideMaskEvent=this.createEvent(E.HIDE_MASK);this.hideMaskEvent.signature=T;this.dragEvent=this.createEvent(E.DRAG);this.dragEvent.signature=T;},initDefaultConfig:function(){O.superclass.initDefaultConfig.call(this);this.cfg.addProperty(M.CLOSE.key,{handler:this.configClose,value:M.CLOSE.value,validator:M.CLOSE.validator,supercedes:M.CLOSE.supercedes});this.cfg.addProperty(M.DRAGGABLE.key,{handler:this.configDraggable,value:M.DRAGGABLE.value,validator:M.D!
 RAGGABLE.validator,supercedes:M.DRAGGABLE.supercedes});this.cf!
 g.addPro
perty(M.UNDERLAY.key,{handler:this.configUnderlay,value:M.UNDERLAY.value,supercedes:M.UNDERLAY.supercedes});this.cfg.addProperty(M.MODAL.key,{handler:this.configModal,value:M.MODAL.value,validator:M.MODAL.validator,supercedes:M.MODAL.supercedes});this.cfg.addProperty(M.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:M.KEY_LISTENERS.suppressEvent,supercedes:M.KEY_LISTENERS.supercedes});},configClose:function(V,T,X){var Y=T[0],U=this.close;function W(a,Z){Z.hide();}if(Y){if(!U){if(!D){D=document.createElement("span");D.innerHTML=" ";D.className="container-close";}U=D.cloneNode(true);this.innerElement.appendChild(U);S.on(U,"click",W,this);this.close=U;}else{U.style.display="block";}}else{if(U){U.style.display="none";}}},configDraggable:function(U,T,V){var W=T[0];if(W){if(!N){this.cfg.setProperty("draggable",false);return ;}if(this.header){A.setStyle(this.header,"cursor","move");this.registerDragDrop();}if(!J.alreadySubscribed(this.beforeRenderEvent,K,null)!
 ){this.subscribe("beforeRender",K);}this.subscribe("beforeShow",C);}else{if(this.dd){this.dd.unreg();}if(this.header){A.setStyle(this.header,"cursor","auto");}this.unsubscribe("beforeRender",K);this.unsubscribe("beforeShow",C);}},configUnderlay:function(c,b,X){var a=YAHOO.env.ua,Z=(this.platform=="mac"&&a.gecko),d=b[0].toLowerCase(),T=this.underlay,U=this.element;function V(){var e;if(!T){if(!Q){Q=document.createElement("div");Q.className="underlay";}T=Q.cloneNode(false);this.element.appendChild(T);this.underlay=T;e=a.ie;if(e==6||(e==7&&document.compatMode=="BackCompat")){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.sizeUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay,this,true);}}}function Y(){V.call(this);this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(Y);}function W(){if(this._underlayDeferred){this.be!
 foreShowEvent.unsubscribe(Y);this._underlayDeferred=false;}if(!
 T){this.
cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(T);this.underlay=null;}}switch(d){case"shadow":A.removeClass(U,"matte");A.addClass(U,"shadow");break;case"matte":if(!Z){W.call(this);}A.removeClass(U,"shadow");A.addClass(U,"matte");break;default:if(!Z){W.call(this);}A.removeClass(U,"shadow");A.removeClass(U,"matte");break;}if((d=="shadow")||(Z&&!T)){if(this.cfg.getProperty("visible")){V.call(this);}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(Y);this._underlayDeferred=true;}}}},configModal:function(U,T,W){var V=T[0];if(V){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);I.windo!
 wResizeEvent.subscribe(this.sizeMask,this,true);this._hasModalityEventListeners=true;}}else{if(this._hasModalityEventListeners){if(this.cfg.getProperty("visible")){this.hideMask();this.removeMask();}this.unsubscribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTop);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hideMask);I.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false;}}},removeMask:function(){var U=this.mask,T;if(U){this.hideMask();T=U.parentNode;if(T){T.removeChild(U);}this.mask=null;}},configKeyListeners:function(W,T,Z){var V=T[0],Y,X,U;if(V){if(V instanceof Array){X=V.length;for(U=0;U<X;U++){Y=V[U];if(!J.alreadySubscribed(this.showEvent,Y.enable,Y)){this.showEvent.subscribe(Y.enable,Y,true);}if(!J.alreadySubscribed(this.hideEvent,Y.disable,Y)){this.hideEvent.subscribe(Y.disable,Y,true);this.destroyEvent.subscribe(Y.disable,Y,true);
-}}}else{if(!J.alreadySubscribed(this.showEvent,V.enable,V)){this.showEvent.subscribe(V.enable,V,true);}if(!J.alreadySubscribed(this.hideEvent,V.disable,V)){this.hideEvent.subscribe(V.disable,V,true);this.destroyEvent.subscribe(V.disable,V,true);}}}},configHeight:function(W,U,X){var T=U[0],V=this.innerElement;A.setStyle(V,"height",T);this.cfg.refireEvent("iframe");},configWidth:function(W,T,X){var V=T[0],U=this.innerElement;A.setStyle(U,"width",V);this.cfg.refireEvent("iframe");},configzIndex:function(U,T,W){O.superclass.configzIndex.call(this,U,T,W);if(this.mask||this.cfg.getProperty("modal")===true){var V=A.getStyle(this.element,"zIndex");if(!V||isNaN(V)){V=0;}if(V===0){this.cfg.setProperty("zIndex",1);}else{this.stackMask();}}},buildWrapper:function(){var V=this.element.parentNode,T=this.element,U=document.createElement("div");U.className=O.CSS_PANEL_CONTAINER;U.id=T.id+"_c";if(V){V.insertBefore(U,T);}U.appendChild(T);this.element=U;this.innerElement=T;A.setStyle(this.inn!
 erElement,"visibility","inherit");},sizeUnderlay:function(){var U=this.underlay,T;if(U){T=this.element;U.style.width=T.offsetWidth+"px";U.style.height=T.offsetHeight+"px";}},registerDragDrop:function(){var T=this;if(this.header){if(!N){return ;}this.dd=new N(this.element.id,this.id);if(!this.header.id){this.header.id=this.id+"_h";}this.dd.startDrag=function(){var V,Z,a,X,d,b,W,Y,U,c;if(YAHOO.env.ua.ie==6){A.addClass(T.element,"drag");}if(T.cfg.getProperty("constraintoviewport")){V=T.element.offsetHeight;Z=T.element.offsetWidth;a=A.getViewportWidth();X=A.getViewportHeight();d=A.getDocumentScrollLeft();b=A.getDocumentScrollTop();W=b+10;Y=d+10;U=b+X-V-10;c=d+a-Z-10;this.minX=Y;this.maxX=c;this.constrainX=true;this.minY=W;this.maxY=U;this.constrainY=true;}else{this.constrainX=false;this.constrainY=false;}T.dragEvent.fire("startDrag",arguments);};this.dd.onDrag=function(){T.syncPosition();T.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoS!
 crollbars();}T.dragEvent.fire("onDrag",arguments);};this.dd.en!
 dDrag=fu
nction(){if(YAHOO.env.ua.ie==6){A.removeClass(T.element,"drag");}T.dragEvent.fire("endDrag",arguments);T.moveEvent.fire(T.cfg.getProperty("xy"));};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA");}},buildMask:function(){var T=this.mask;if(!T){if(!H){H=document.createElement("div");H.className="mask";H.innerHTML=" ";}T=H.cloneNode(true);T.id=this.id+"_mask";document.body.insertBefore(T,document.body.firstChild);this.mask=T;this.stackMask();}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";this.hideMaskEvent.fire();A.removeClass(document.body,"masked");}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){A.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire();}},sizeMask:function(){if(this.mask){this.mask.style.height=A.getDocumentHeight()+"px";this.ma!
 sk.style.width=A.getDocumentWidth()+"px";}},stackMask:function(){if(this.mask){var T=A.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(T)&&!isNaN(T)){A.setStyle(this.mask,"zIndex",T-1);}}},render:function(T){return O.superclass.render.call(this,T,this.innerElement);},destroy:function(){I.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){S.purgeElement(this.close);}O.superclass.destroy.call(this);},toString:function(){return"Panel "+this.id;}});}());(function(){YAHOO.widget.Dialog=function(L,K){YAHOO.widget.Dialog.superclass.constructor.call(this,L,K);};var J=YAHOO.util.Event,I=YAHOO.util.CustomEvent,D=YAHOO.util.Dom,B=YAHOO.util.KeyListener,H=YAHOO.util.Connect,F=YAHOO.widget.Dialog,E=YAHOO.lang,A={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},G={"POST_METHOD":{key:"postmethod",value:"async"},"BUTTONS":{key:"buttons",value:!
 "none"}};F.CSS_DIALOG="yui-dialog";function C(){var N=this._aB!
 uttons,L
,M,K;if(E.isArray(N)){L=N.length;if(L>0){K=L-1;do{M=N[K];if(YAHOO.widget.Button&&M instanceof YAHOO.widget.Button){M.destroy();}else{if(M.tagName.toUpperCase()=="BUTTON"){J.purgeElement(M);J.purgeElement(M,false);}}}while(K--);}}}YAHOO.extend(F,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){F.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(G.POST_METHOD.key,{handler:this.configPostMethod,value:G.POST_METHOD.value,validator:function(K){if(K!="form"&&K!="async"&&K!="none"&&K!="manual"){return false;}else{return true;}}});this.cfg.addProperty(G.BUTTONS.key,{handler:this.configButtons,value:G.BUTTONS.value});},initEvents:function(){F.superclass.initEvents.call(this);var K=I.LIST;this.beforeSubmitEvent=this.createEvent(A.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=K;this.submitEvent=this.createEvent(A.SUBMIT);this.submitEvent.signature=K;this.manualSubmitEvent=this.createEvent(A.MANUAL_SUBMIT);th!
 is.manualSubmitEvent.signature=K;this.asyncSubmitEvent=this.createEvent(A.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=K;this.formSubmitEvent=this.createEvent(A.FORM_SUBMIT);this.formSubmitEvent.signature=K;this.cancelEvent=this.createEvent(A.CANCEL);this.cancelEvent.signature=K;},init:function(L,K){F.superclass.init.call(this,L);this.beforeInitEvent.fire(F);D.addClass(this.element,F.CSS_DIALOG);this.cfg.setProperty("visible",false);if(K){this.cfg.applyConfig(K,true);}this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(F);},doSubmit:function(){var Q=this.form,O=false,N=false,P,K,M,L;switch(this.cfg.getProperty("postmethod")){case"async":P=Q.elements;K=P.length;if(K>0){M=K-1;do{if(P[M].type=="file"){O=true;break;}}while(M--);}if(O&&YAHOO.env.ua.ie&&this.isSecure){N=true;}L=(Q.getAttribute("method")||"POST").toUpperCase();
-H.setForm(Q,O,N);H.asyncRequest(L,Q.getAttribute("action"),this.callback);this.asyncSubmitEvent.fire();break;case"form":Q.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break;}},registerForm:function(){var M=this.element.getElementsByTagName("form")[0],L=this,K,N;if(this.form){if(this.form==M&&D.isAncestor(this.element,this.form)){return ;}else{J.purgeElement(this.form);this.form=null;}}if(!M){M=document.createElement("form");M.name="frm_"+this.id;this.body.appendChild(M);}if(M){this.form=M;J.on(M,"submit",function(O){J.stopEvent(O);this.submit();this.form.blur();},this,true);this.firstFormElement=function(){var Q,P,O=M.elements.length;for(Q=0;Q<O;Q++){P=M.elements[Q];if(P.focus&&!P.disabled&&P.type!="hidden"){return P;}}return null;}();this.lastFormElement=function(){var Q,P,O=M.elements.length;for(Q=O-1;Q>=0;Q--){P=M.elements[Q];if(P.focus&&!P.disabled&&P.type!="hidden"){return P;}}return null;}();if(this.cfg.getProperty("!
 modal")){K=this.firstFormElement||this.firstButton;if(K){this.preventBackTab=new B(K,{shift:true,keys:9},{fn:L.focusLast,scope:L,correctScope:true});this.showEvent.subscribe(this.preventBackTab.enable,this.preventBackTab,true);this.hideEvent.subscribe(this.preventBackTab.disable,this.preventBackTab,true);}N=this.lastButton||this.lastFormElement;if(N){this.preventTabOut=new B(N,{shift:false,keys:9},{fn:L.focusFirst,scope:L,correctScope:true});this.showEvent.subscribe(this.preventTabOut.enable,this.preventTabOut,true);this.hideEvent.subscribe(this.preventTabOut.disable,this.preventTabOut,true);}}}},configClose:function(M,K,N){var O=K[0];function L(Q,P){P.cancel();}if(O){if(!this.close){this.close=document.createElement("div");D.addClass(this.close,"container-close");this.close.innerHTML=" ";this.innerElement.appendChild(this.close);J.on(this.close,"click",L,this);}else{this.close.style.display="block";}}else{if(this.close){this.close.style.display="none";}}},configButton!
 s:function(U,T,O){var P=YAHOO.widget.Button,W=T[0],M=this.inne!
 rElement
,V,R,L,S,Q,K,N;C.call(this);this._aButtons=null;if(E.isArray(W)){Q=document.createElement("span");Q.className="button-group";S=W.length;this._aButtons=[];for(N=0;N<S;N++){V=W[N];if(P){L=new P({label:V.text,container:Q});R=L.get("element");if(V.isDefault){L.addClass("default");this.defaultHtmlButton=R;}if(E.isFunction(V.handler)){L.set("onclick",{fn:V.handler,obj:this,scope:this});}else{if(E.isObject(V.handler)&&E.isFunction(V.handler.fn)){L.set("onclick",{fn:V.handler.fn,obj:((!E.isUndefined(V.handler.obj))?V.handler.obj:this),scope:(V.handler.scope||this)});}}this._aButtons[this._aButtons.length]=L;}else{R=document.createElement("button");R.setAttribute("type","button");if(V.isDefault){R.className="default";this.defaultHtmlButton=R;}R.innerHTML=V.text;if(E.isFunction(V.handler)){J.on(R,"click",V.handler,this,true);}else{if(E.isObject(V.handler)&&E.isFunction(V.handler.fn)){J.on(R,"click",V.handler.fn,((!E.isUndefined(V.handler.obj))?V.handler.obj:this),(V.handler.scope||thi!
 s));}}Q.appendChild(R);this._aButtons[this._aButtons.length]=R;}V.htmlButton=R;if(N===0){this.firstButton=R;}if(N==(S-1)){this.lastButton=R;}}this.setFooter(Q);K=this.footer;if(D.inDocument(this.element)&&!D.isAncestor(M,K)){M.appendChild(K);}this.buttonSpan=Q;}else{Q=this.buttonSpan;K=this.footer;if(Q&&K){K.removeChild(Q);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null;}}this.cfg.refireEvent("iframe");this.cfg.refireEvent("underlay");},getButtons:function(){var K=this._aButtons;if(K){return K;}},focusFirst:function(N,L,P){var M=this.firstFormElement,K;if(L){K=L[1];if(K){J.stopEvent(K);}}if(M){try{M.focus();}catch(O){}}else{this.focusDefaultButton();}},focusLast:function(N,L,P){var Q=this.cfg.getProperty("buttons"),M=this.lastFormElement,K;if(L){K=L[1];if(K){J.stopEvent(K);}}if(Q&&E.isArray(Q)){this.focusLastButton();}else{if(M){try{M.focus();}catch(O){}}}},focusDefaultButton:function(){var K=this.defaultHtmlButton;if(K){try{K.foc!
 us();}catch(L){}}},blurButtons:function(){var P=this.cfg.getPr!
 operty("
buttons"),M,O,L,K;if(P&&E.isArray(P)){M=P.length;if(M>0){K=(M-1);do{O=P[K];if(O){L=O.htmlButton;if(L){try{L.blur();}catch(N){}}}}while(K--);}}},focusFirstButton:function(){var N=this.cfg.getProperty("buttons"),M,K;if(N&&E.isArray(N)){M=N[0];if(M){K=M.htmlButton;if(K){try{K.focus();}catch(L){}}}}},focusLastButton:function(){var O=this.cfg.getProperty("buttons"),L,N,K;if(O&&E.isArray(O)){L=O.length;if(L>0){N=O[(L-1)];if(N){K=N.htmlButton;if(K){try{K.focus();}catch(M){}}}}}},configPostMethod:function(M,L,N){var K=L[0];this.registerForm();},validate:function(){return true;},submit:function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();this.hide();return true;}else{return false;}},cancel:function(){this.cancelEvent.fire();this.hide();},getData:function(){var a=this.form,M,T,W,O,U,R,Q,L,X,N,Y,b,K,P,c,Z,V;function S(e){var d=e.tagName.toUpperCase();return((d=="INPUT"||d=="TEXTAREA"||d=="SELECT")&&e.name==O);}if(a){M=a.elements;T=M.lengt!
 h;W={};for(Z=0;Z<T;Z++){O=M[Z].name;U=D.getElementsBy(S,"*",a);R=U.length;if(R>0){if(R==1){U=U[0];Q=U.type;L=U.tagName.toUpperCase();switch(L){case"INPUT":if(Q=="checkbox"){W[O]=U.checked;}else{if(Q!="radio"){W[O]=U.value;}}break;case"TEXTAREA":W[O]=U.value;break;case"SELECT":X=U.options;N=X.length;Y=[];for(V=0;V<N;V++){b=X[V];if(b.selected){K=b.value;if(!K||K===""){K=b.text;}Y[Y.length]=K;}}W[O]=Y;break;}}else{Q=U[0].type;switch(Q){case"radio":for(V=0;V<R;V++){P=U[V];if(P.checked){W[O]=P.value;break;}}break;case"checkbox":Y=[];for(V=0;V<R;V++){c=U[V];if(c.checked){Y[Y.length]=c.value;}}W[O]=Y;break;}}}}}return W;},destroy:function(){C.call(this);this._aButtons=null;var K=this.element.getElementsByTagName("form"),L;if(K.length>0){L=K[0];if(L){J.purgeElement(L);if(L.parentNode){L.parentNode.removeChild(L);}this.form=null;}}F.superclass.destroy.call(this);},toString:function(){return"Dialog "+this.id;}});}());
-(function(){YAHOO.widget.SimpleDialog=function(E,D){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,E,D);};var C=YAHOO.util.Dom,B=YAHOO.widget.SimpleDialog,A={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};B.ICON_BLOCK="blckicon";B.ICON_ALARM="alrticon";B.ICON_HELP="hlpicon";B.ICON_INFO="infoicon";B.ICON_WARN="warnicon";B.ICON_TIP="tipicon";B.ICON_CSS_CLASSNAME="yui-icon";B.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(B,YAHOO.widget.Dialog,{initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);this.cfg.addProperty(A.ICON.key,{handler:this.configIcon,value:A.ICON.value,suppressEvent:A.ICON.suppressEvent});this.cfg.addProperty(A.TEXT.key,{handler:this.configText,value:A.TEXT.value,suppressEvent:A.TEXT.suppressEvent,supercedes:A.TEXT.supercedes});},init:function(E,D){B.superclass.init.call(this,E);this.beforeInitEvent.fire(B);C.addClass(this.element,B.CSS_SIMPLEDIALOG);th!
 is.cfg.queueProperty("postmethod","manual");if(D){this.cfg.applyConfig(D,true);}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("");}},this,true);this.initEvent.fire(B);},registerForm:function(){B.superclass.registerForm.call(this);this.form.innerHTML+="<input type=\"hidden\" name=\""+this.id+"\" value=\"\"/>";},configIcon:function(F,E,J){var K=E[0],D=this.body,I=B.ICON_CSS_CLASSNAME,H,G;if(K&&K!="none"){H=C.getElementsByClassName(I,"*",D);if(H){G=H.parentNode;if(G){G.removeChild(H);H=null;}}if(K.indexOf(".")==-1){H=document.createElement("span");H.className=(I+" "+K);H.innerHTML=" ";}else{H=document.createElement("img");H.src=(this.imageRoot+K);H.className=I;}if(H){D.insertBefore(H,D.firstChild);}}},configText:function(E,D,F){var G=D[0];if(G){this.setBody(G);this.cfg.refireEvent("icon");}},toString:function(){return"SimpleDialog "+this.id;}});}());(function(){YAHOO.widget.ContainerEffect=function(F,I,H,E,G){if(!G){G=YAHOO.util.Anim;}this.overla!
 y=F;this.attrIn=I;this.attrOut=H;this.targetElement=E||F.eleme!
 nt;this.
animClass=G;};var B=YAHOO.util.Dom,D=YAHOO.util.CustomEvent,C=YAHOO.util.Easing,A=YAHOO.widget.ContainerEffect;A.FADE=function(E,F){var G=new A(E,{attributes:{opacity:{from:0,to:1}},duration:F,method:C.easeIn},{attributes:{opacity:{to:0}},duration:F,method:C.easeOut},E.element);G.handleStartAnimateIn=function(I,H,J){B.addClass(J.overlay.element,"hide-select");if(!J.overlay.underlay){J.overlay.cfg.refireEvent("underlay");}if(J.overlay.underlay){J.initialUnderlayOpacity=B.getStyle(J.overlay.underlay,"opacity");J.overlay.underlay.style.filter=null;}B.setStyle(J.overlay.element,"visibility","visible");B.setStyle(J.overlay.element,"opacity",0);};G.handleCompleteAnimateIn=function(I,H,J){B.removeClass(J.overlay.element,"hide-select");if(J.overlay.element.style.filter){J.overlay.element.style.filter=null;}if(J.overlay.underlay){B.setStyle(J.overlay.underlay,"opacity",J.initialUnderlayOpacity);}J.overlay.cfg.refireEvent("iframe");J.animateInCompleteEvent.fire();};G.handleStartAnimat!
 eOut=function(I,H,J){B.addClass(J.overlay.element,"hide-select");if(J.overlay.underlay){J.overlay.underlay.style.filter=null;}};G.handleCompleteAnimateOut=function(I,H,J){B.removeClass(J.overlay.element,"hide-select");if(J.overlay.element.style.filter){J.overlay.element.style.filter=null;}B.setStyle(J.overlay.element,"visibility","hidden");B.setStyle(J.overlay.element,"opacity",1);J.overlay.cfg.refireEvent("iframe");J.animateOutCompleteEvent.fire();};G.init();return G;};A.SLIDE=function(G,I){var F=G.cfg.getProperty("x")||B.getX(G.element),K=G.cfg.getProperty("y")||B.getY(G.element),J=B.getClientWidth(),H=G.element.offsetWidth,E=new A(G,{attributes:{points:{to:[F,K]}},duration:I,method:C.easeIn},{attributes:{points:{to:[(J+25),K]}},duration:I,method:C.easeOut},G.element,YAHOO.util.Motion);E.handleStartAnimateIn=function(M,L,N){N.overlay.element.style.left=((-25)-H)+"px";N.overlay.element.style.top=K+"px";};E.handleTweenAnimateIn=function(O,N,P){var Q=B.getXY(P.overlay.elemen!
 t),M=Q[0],L=Q[1];if(B.getStyle(P.overlay.element,"visibility")!
 =="hidde
n"&&M<F){B.setStyle(P.overlay.element,"visibility","visible");}P.overlay.cfg.setProperty("xy",[M,L],true);P.overlay.cfg.refireEvent("iframe");};E.handleCompleteAnimateIn=function(M,L,N){N.overlay.cfg.setProperty("xy",[F,K],true);N.startX=F;N.startY=K;N.overlay.cfg.refireEvent("iframe");N.animateInCompleteEvent.fire();};E.handleStartAnimateOut=function(N,M,Q){var O=B.getViewportWidth(),R=B.getXY(Q.overlay.element),P=R[1],L=Q.animOut.attributes.points.to;Q.animOut.attributes.points.to=[(O+25),P];};E.handleTweenAnimateOut=function(N,M,O){var Q=B.getXY(O.overlay.element),L=Q[0],P=Q[1];O.overlay.cfg.setProperty("xy",[L,P],true);O.overlay.cfg.refireEvent("iframe");};E.handleCompleteAnimateOut=function(M,L,N){B.setStyle(N.overlay.element,"visibility","hidden");N.overlay.cfg.setProperty("xy",[F,K]);N.animateOutCompleteEvent.fire();};E.init();return E;};A.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=D.LIS!
 T;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=D.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=D.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=D.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);
-},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate();},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate();},handleStartAnimateIn:function(F,E,G){},handleTweenAnimateIn:function(F,E,G){},handleCompleteAnimateIn:function(F,E,G){},handleStartAnimateOut:function(F,E,G){},handleTweenAnimateOut:function(F,E,G){},handleCompleteAnimateOut:function(F,E,G){},toString:function(){var E="ContainerEffect";if(this.overlay){E+=" ["+this.overlay.toString()+"]";}return E;}};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.3.1",build:"541"});
\ No newline at end of file
+(function(){YAHOO.util.Config=function(D){if(D){this.init(D);}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE);},checkNumber:function(D){return(!isNaN(D));},fireEvent:function(D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F);}},addProperty:function(E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handler,this.owner);}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queueProperty(E,D.valu!
 e);}},getConfig:function(){var D={},F,E;for(F in this.config){E=this.config[F];if(E&&E.event){D[F]=E.value;}}return D;},getProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E.value;}else{return undefined;}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true;}}else{return false;}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E,G);return true;}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validator(G)){return false;}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChangedEvent.fire([E,G]);}return true;}}else{return false;}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false;}else{if(!B.isUndefined(P)){R.val!
 ue=P;}else{P=R.value;}K=false;J=this.eventQueue.length;for(L=0!
 ;L<J;L++
){G=this.eventQueue[L];if(G){H=G[0];I=G[1];if(H==S){this.eventQueue[L]=null;this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]);K=true;break;}}}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P]);}}if(R.supercedes){O=R.supercedes.length;for(T=0;T<O;T++){Q=R.supercedes[T];F=this.eventQueue.length;for(E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M[0];D=M[1];if(N==Q.toLowerCase()){this.eventQueue.push([N,D]);this.eventQueue[E]=null;break;}}}}}return true;}else{return false;}},refireEvent:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queueProperty(D);}else{this.fireEvent(D,E.value);}}},applyConfig:function(D,G){var F,E;if(G){E={};for(F in D){if(B.hasOwnProperty(D,F)){E[F.toLowerCase()]=D[F];}}this.initialConfig=E;}for(F in D){if(B.hasOwnProperty(D,F)){this.queueProperty(F,D[F]);}}},refresh:function(){var D;for(D in this.config){this.refireEvent(D);}},fireQueue:function(){var E,H,D,G,F;this.queueInProgress=tr!
 ue;for(E=0;E<this.eventQueue.length;E++){H=this.eventQueue[E];if(H){D=H[0];G=H[1];F=this.config[D];F.value=G;this.fireEvent(D,G);}}this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()];if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D);}return true;}else{return false;}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F&&F.event){return F.event.unsubscribe(E,G);}else{return false;}},toString:function(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]";}return D;},outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length;for(E=0;E<F;E++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G[1]+", ";}}return D;},destroy:function(){var E=this.config,D,F;for(D in E){if(B.hasOwnProperty(E,D)){F=E[D];F.event.unsubscribeAll();F.event=null;}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;thi!
 s.initialConfig=null;this.eventQueue=null;}};A.alreadySubscrib!
 ed=funct
ion(E,H,I){var F=E.subscribers.length,D,G;if(F>0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true;}}while(G--);}return false;};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Module=function(Q,P){if(Q){this.init(Q,P);}else{}};var F=YAHOO.util.Dom,D=YAHOO.util.Config,M=YAHOO.util.Event,L=YAHOO.util.CustomEvent,G=YAHOO.widget.Module,H,O,N,E,A={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},I={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};G.IMG_!
 ROOT=null;G.IMG_ROOT_SSL=null;G.CSS_MODULE="yui-module";G.CSS_HEADER="hd";G.CSS_BODY="bd";G.CSS_FOOTER="ft";G.RESIZE_MONITOR_SECURE_URL="javascript:false;";G.textResizeEvent=new L("textResize");function K(){if(!H){H=document.createElement("div");H.innerHTML=("<div class=\""+G.CSS_HEADER+"\"></div><div class=\""+G.CSS_BODY+"\"></div><div class=\""+G.CSS_FOOTER+"\"></div>");O=H.firstChild;N=O.nextSibling;E=N.nextSibling;}return H;}function J(){if(!O){K();}return(O.cloneNode(false));}function B(){if(!N){K();}return(N.cloneNode(false));}function C(){if(!E){K();}return(E.cloneNode(false));}G.prototype={constructor:G,element:null,header:null,body:null,footer:null,id:null,imageRoot:G.IMG_ROOT,initEvents:function(){var P=L.LIST;this.beforeInitEvent=this.createEvent(A.BEFORE_INIT);this.beforeInitEvent.signature=P;this.initEvent=this.createEvent(A.INIT);this.initEvent.signature=P;this.appendEvent=this.createEvent(A.APPEND);
+this.appendEvent.signature=P;this.beforeRenderEvent=this.createEvent(A.BEFORE_RENDER);this.beforeRenderEvent.signature=P;this.renderEvent=this.createEvent(A.RENDER);this.renderEvent.signature=P;this.changeHeaderEvent=this.createEvent(A.CHANGE_HEADER);this.changeHeaderEvent.signature=P;this.changeBodyEvent=this.createEvent(A.CHANGE_BODY);this.changeBodyEvent.signature=P;this.changeFooterEvent=this.createEvent(A.CHANGE_FOOTER);this.changeFooterEvent.signature=P;this.changeContentEvent=this.createEvent(A.CHANGE_CONTENT);this.changeContentEvent.signature=P;this.destroyEvent=this.createEvent(A.DESTORY);this.destroyEvent.signature=P;this.beforeShowEvent=this.createEvent(A.BEFORE_SHOW);this.beforeShowEvent.signature=P;this.showEvent=this.createEvent(A.SHOW);this.showEvent.signature=P;this.beforeHideEvent=this.createEvent(A.BEFORE_HIDE);this.beforeHideEvent.signature=P;this.hideEvent=this.createEvent(A.HIDE);this.hideEvent.signature=P;},platform:function(){var P=navigator.userAgent!
 .toLowerCase();if(P.indexOf("windows")!=-1||P.indexOf("win32")!=-1){return"windows";}else{if(P.indexOf("macintosh")!=-1){return"mac";}else{return false;}}}(),browser:function(){var P=navigator.userAgent.toLowerCase();if(P.indexOf("opera")!=-1){return"opera";}else{if(P.indexOf("msie 7")!=-1){return"ie7";}else{if(P.indexOf("msie")!=-1){return"ie";}else{if(P.indexOf("safari")!=-1){return"safari";}else{if(P.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty(I.VISIBLE.key,{handler:this.configVisible,value:I.VISIBLE.value,validator:I.VISIBLE.validator});this.cfg.addProperty(I.EFFECT.key,{suppressEvent:I.EFFECT.suppressEvent,supercedes:I.EFFECT.supercedes});this.cfg.addProperty(I.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:I.MONITOR_RESIZE.value});this.cfg.addProperty(I.APPEND_TO_DOCUMENT_B!
 ODY.key,{value:I.APPEND_TO_DOCUMENT_BODY.value});},init:functi!
 on(U,T){
var R,V;this.initEvents();this.beforeInitEvent.fire(G);this.cfg=new D(this);if(this.isSecure){this.imageRoot=G.IMG_ROOT_SSL;}if(typeof U=="string"){R=U;U=document.getElementById(U);if(!U){U=(K()).cloneNode(false);U.id=R;}}this.element=U;if(U.id){this.id=U.id;}V=this.element.firstChild;if(V){var Q=false,P=false,S=false;do{if(1==V.nodeType){if(!Q&&F.hasClass(V,G.CSS_HEADER)){this.header=V;Q=true;}else{if(!P&&F.hasClass(V,G.CSS_BODY)){this.body=V;P=true;}else{if(!S&&F.hasClass(V,G.CSS_FOOTER)){this.footer=V;S=true;}}}}}while((V=V.nextSibling));}this.initDefaultConfig();F.addClass(this.element,G.CSS_MODULE);if(T){this.cfg.applyConfig(T,true);}if(!D.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}this.initEvent.fire(G);},initResizeMonitor:function(){var P,Q,S;function T(){G.textResizeEvent.fire();}if(!YAHOO.env.ua.opera){Q=F.get("_yuiResizeMonitor");if(!Q){Q=document.createElement("iframe");if(this.isS!
 ecure&&G.RESIZE_MONITOR_SECURE_URL&&YAHOO.env.ua.ie){Q.src=G.RESIZE_MONITOR_SECURE_URL;}if(YAHOO.env.ua.gecko){S=["<html><head><script ","type=\"text/javascript\">","window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();}","</script></head>","<body></body></html>"].join("");Q.src="data:text/html;charset=utf-8,"+encodeURIComponent(S);}Q.id="_yuiResizeMonitor";Q.style.position="absolute";Q.style.visibility="hidden";var R=document.body.firstChild;if(R){document.body.insertBefore(Q,R);}else{document.body.appendChild(Q);}Q.style.width="10em";Q.style.height="10em";Q.style.top=(-1*Q.offsetHeight)+"px";Q.style.left=(-1*Q.offsetWidth)+"px";Q.style.borderWidth="0";Q.style.visibility="visible";if(YAHOO.env.ua.webkit){P=Q.contentWindow.document;P.open();P.close();}}if(Q&&Q.contentWindow){G.textResizeEvent.subscribe(this.onDomResize,this,true);if(!G.textResizeInitialized){if(!YAHOO.env.ua.gecko){if(!M.on(Q.contentWindow,"resize",T)){M.on(Q,"resize",T)!
 ;}}G.textResizeInitialized=true;}this.resizeMonitor=Q;}}},onDo!
 mResize:
function(S,R){var Q=-1*this.resizeMonitor.offsetWidth,P=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=P+"px";this.resizeMonitor.style.left=Q+"px";},setHeader:function(Q){var P=this.header||(this.header=J());if(typeof Q=="string"){P.innerHTML=Q;}else{P.innerHTML="";P.appendChild(Q);}this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire();},appendToHeader:function(Q){var P=this.header||(this.header=J());P.appendChild(Q);this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire();},setBody:function(Q){var P=this.body||(this.body=B());if(typeof Q=="string"){P.innerHTML=Q;}else{P.innerHTML="";P.appendChild(Q);}this.changeBodyEvent.fire(Q);this.changeContentEvent.fire();},appendToBody:function(Q){var P=this.body||(this.body=B());P.appendChild(Q);this.changeBodyEvent.fire(Q);this.changeContentEvent.fire();},setFooter:function(Q){var P=this.footer||(this.footer=C());if(typeof Q=="string"){P.innerHTML=Q;}else{P.innerHTML="";P.appendChild(Q);}this.changeFoote!
 rEvent.fire(Q);this.changeContentEvent.fire();},appendToFooter:function(Q){var P=this.footer||(this.footer=C());P.appendChild(Q);this.changeFooterEvent.fire(Q);this.changeContentEvent.fire();},render:function(R,P){var S=this,T;function Q(U){if(typeof U=="string"){U=document.getElementById(U);}if(U){S._addToParent(U,S.element);S.appendEvent.fire();}}this.beforeRenderEvent.fire();if(!P){P=this.element;}if(R){Q(R);}else{if(!F.inDocument(this.element)){return false;}}if(this.header&&!F.inDocument(this.header)){T=P.firstChild;if(T){P.insertBefore(this.header,T);}else{P.appendChild(this.header);}}if(this.body&&!F.inDocument(this.body)){if(this.footer&&F.isAncestor(this.moduleElement,this.footer)){P.insertBefore(this.body,this.footer);}else{P.appendChild(this.body);}}if(this.footer&&!F.inDocument(this.footer)){P.appendChild(this.footer);}this.renderEvent.fire();return true;},destroy:function(){var P,Q;if(this.element){M.purgeElement(this.element,true);
+P=this.element.parentNode;}if(P){P.removeChild(this.element);}this.element=null;this.header=null;this.body=null;this.footer=null;G.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire();for(Q in this){if(Q instanceof L){Q.unsubscribeAll();}}},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(Q,P,R){var S=P[0];if(S){this.beforeShowEvent.fire();F.setStyle(this.element,"display","block");this.showEvent.fire();}else{this.beforeHideEvent.fire();F.setStyle(this.element,"display","none");this.hideEvent.fire();}},configMonitorResize:function(R,Q,S){var P=Q[0];if(P){this.initResizeMonitor();}else{G.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null;}},_addToParent:function(P,Q){if(!this.cfg.getProperty("appendtodocumentbody")&&P===document.body&&P.firstChild){P.insertBefore(Q,P.firstChild);}else{P.appendChild(Q);}},toS!
 tring:function(){return"Module "+this.id;}};YAHOO.lang.augmentProto(G,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Overlay=function(L,K){YAHOO.widget.Overlay.superclass.constructor.call(this,L,K);};var F=YAHOO.lang,I=YAHOO.util.CustomEvent,E=YAHOO.widget.Module,J=YAHOO.util.Event,D=YAHOO.util.Dom,C=YAHOO.util.Config,B=YAHOO.widget.Overlay,G,A={"BEFORE_MOVE":"beforeMove","MOVE":"move"},H={"X":{key:"x",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,validator:F.isBoolean,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"ZINDEX":{key:"zindex",value:null!
 },"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:fal!
 se,valid
ator:F.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(YAHOO.env.ua.ie==6?true:false),validator:F.isBoolean,supercedes:["zindex"]}};B.IFRAME_SRC="javascript:false;";B.IFRAME_OFFSET=3;B.VIEWPORT_OFFSET=10;B.TOP_LEFT="tl";B.TOP_RIGHT="tr";B.BOTTOM_LEFT="bl";B.BOTTOM_RIGHT="br";B.CSS_OVERLAY="yui-overlay";B.windowScrollEvent=new I("windowScroll");B.windowResizeEvent=new I("windowResize");B.windowScrollHandler=function(K){if(YAHOO.env.ua.ie){if(!window.scrollEnd){window.scrollEnd=-1;}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){B.windowScrollEvent.fire();},1);}else{B.windowScrollEvent.fire();}};B.windowResizeHandler=function(K){if(YAHOO.env.ua.ie){if(!window.resizeEnd){window.resizeEnd=-1;}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){B.windowResizeEvent.fire();},100);}else{B.windowResizeEvent.fire();}};B._initialized=null;if(B._initialized===null){J.on(window,"scroll",B.windowScrollHandler);J.on(window!
 ,"resize",B.windowResizeHandler);B._initialized=true;}YAHOO.extend(B,E,{init:function(L,K){B.superclass.init.call(this,L);this.beforeInitEvent.fire(B);D.addClass(this.element,B.CSS_OVERLAY);if(K){this.cfg.applyConfig(K,true);}if(this.platform=="mac"&&YAHOO.env.ua.gecko){if(!C.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}if(!C.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}this.initEvent.fire(B);},initEvents:function(){B.superclass.initEvents.call(this);var K=I.LIST;this.beforeMoveEvent=this.createEvent(A.BEFORE_MOVE);this.beforeMoveEvent.signature=K;this.moveEvent=this.createEvent(A.MOVE);this.moveEvent.signature=K;},initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.X.key,{handler:this.configX,validator:H.X.validator,suppressEvent:H.X.suppressEvent,supercedes!
 :H.X.supercedes});this.cfg.addProperty(H.Y.key,{handler:this.c!
 onfigY,v
alidator:H.Y.validator,suppressEvent:H.Y.suppressEvent,supercedes:H.Y.supercedes});this.cfg.addProperty(H.XY.key,{handler:this.configXY,suppressEvent:H.XY.suppressEvent,supercedes:H.XY.supercedes});this.cfg.addProperty(H.CONTEXT.key,{handler:this.configContext,suppressEvent:H.CONTEXT.suppressEvent,supercedes:H.CONTEXT.supercedes});this.cfg.addProperty(H.FIXED_CENTER.key,{handler:this.configFixedCenter,value:H.FIXED_CENTER.value,validator:H.FIXED_CENTER.validator,supercedes:H.FIXED_CENTER.supercedes});this.cfg.addProperty(H.WIDTH.key,{handler:this.configWidth,suppressEvent:H.WIDTH.suppressEvent,supercedes:H.WIDTH.supercedes});this.cfg.addProperty(H.HEIGHT.key,{handler:this.configHeight,suppressEvent:H.HEIGHT.suppressEvent,supercedes:H.HEIGHT.supercedes});this.cfg.addProperty(H.ZINDEX.key,{handler:this.configzIndex,value:H.ZINDEX.value});this.cfg.addProperty(H.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:H.CONSTRAIN_TO_VIEWPORT.value,validator:H.CONS!
 TRAIN_TO_VIEWPORT.validator,supercedes:H.CONSTRAIN_TO_VIEWPORT.supercedes});this.cfg.addProperty(H.IFRAME.key,{handler:this.configIframe,value:H.IFRAME.value,validator:H.IFRAME.validator,supercedes:H.IFRAME.supercedes});},moveTo:function(K,L){this.cfg.setProperty("xy",[K,L]);},hideMacGeckoScrollbars:function(){D.removeClass(this.element,"show-scrollbars");D.addClass(this.element,"hide-scrollbars");},showMacGeckoScrollbars:function(){D.removeClass(this.element,"hide-scrollbars");D.addClass(this.element,"show-scrollbars");},configVisible:function(N,K,T){var M=K[0],O=D.getStyle(this.element,"visibility"),U=this.cfg.getProperty("effect"),R=[],Q=(this.platform=="mac"&&YAHOO.env.ua.gecko),b=C.alreadySubscribed,S,L,a,Y,X,W,Z,V,P;if(O=="inherit"){a=this.element.parentNode;while(a.nodeType!=9&&a.nodeType!=11){O=D.getStyle(a,"visibility");if(O!="inherit"){break;}a=a.parentNode;}if(O=="inherit"){O="visible";}}if(U){if(U instanceof Array){V=U.length;
+for(Y=0;Y<V;Y++){S=U[Y];R[R.length]=S.effect(this,S.duration);}}else{R[R.length]=U.effect(this,U.duration);}}if(M){if(Q){this.showMacGeckoScrollbars();}if(U){if(M){if(O!="visible"||O===""){this.beforeShowEvent.fire();P=R.length;for(X=0;X<P;X++){L=R[X];if(X===0&&!b(L.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){L.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}L.animateIn();}}}}else{if(O!="visible"||O===""){this.beforeShowEvent.fire();D.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire();}}}else{if(Q){this.hideMacGeckoScrollbars();}if(U){if(O=="visible"){this.beforeHideEvent.fire();P=R.length;for(W=0;W<P;W++){Z=R[W];if(W===0&&!b(Z.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){Z.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}Z.animateOut();}}else{if(O===""){D.setStyle(this.element,"visibility","hidden");}}}else{if(O=="visible"||O===""){this.befo!
 reHideEvent.fire();D.setStyle(this.element,"visibility","hidden");this.hideEvent.fire();}}}},doCenterOnDOMEvent:function(){if(this.cfg.getProperty("visible")){this.center();}},configFixedCenter:function(O,M,P){var Q=M[0],L=C.alreadySubscribed,N=B.windowResizeEvent,K=B.windowScrollEvent;if(Q){this.center();if(!L(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center);}if(!L(N,this.doCenterOnDOMEvent,this)){N.subscribe(this.doCenterOnDOMEvent,this,true);}if(!L(K,this.doCenterOnDOMEvent,this)){K.subscribe(this.doCenterOnDOMEvent,this,true);}}else{this.beforeShowEvent.unsubscribe(this.center);N.unsubscribe(this.doCenterOnDOMEvent,this);K.unsubscribe(this.doCenterOnDOMEvent,this);}},configHeight:function(N,L,O){var K=L[0],M=this.element;D.setStyle(M,"height",K);this.cfg.refireEvent("iframe");},configWidth:function(N,K,O){var M=K[0],L=this.element;D.setStyle(L,"width",M);this.cfg.refireEvent("iframe");},configzIndex:function(M,K,N){var O=K[0],L=this.el!
 ement;if(!O){O=D.getStyle(L,"zIndex");if(!O||isNaN(O)){O=0;}}i!
 f(this.i
frame||this.cfg.getProperty("iframe")===true){if(O<=0){O=1;}}D.setStyle(L,"zIndex",O);this.cfg.setProperty("zIndex",O,true);if(this.iframe){this.stackIframe();}},configXY:function(M,L,N){var P=L[0],K=P[0],O=P[1];this.cfg.setProperty("x",K);this.cfg.setProperty("y",O);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},configX:function(M,L,N){var K=L[0],O=this.cfg.getProperty("y");this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setX(this.element,K,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},configY:function(M,L,N){var K=this.cfg.getProperty("x"),O=L[0];this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setY(thi!
 s.element,O,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},showIframe:function(){var L=this.iframe,K;if(L){K=this.element.parentNode;if(K!=L.parentNode){this._addToParent(K,L);}L.style.display="block";}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none";}},syncIframe:function(){var K=this.iframe,M=this.element,O=B.IFRAME_OFFSET,L=(O*2),N;if(K){K.style.width=(M.offsetWidth+L+"px");K.style.height=(M.offsetHeight+L+"px");N=this.cfg.getProperty("xy");if(!F.isArray(N)||(isNaN(N[0])||isNaN(N[1]))){this.syncPosition();N=this.cfg.getProperty("xy");}D.setXY(K,[(N[0]-O),(N[1]-O)]);}},stackIframe:function(){if(this.iframe){var K=D.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(K)&&!isNaN(K)){D.setStyle(this.iframe,"zIndex",(K-1));}}},configIframe:function(N,M,O){var K=M[0];function P(){var R=this.iframe,S=this.element,T;if(!R){if(!G){G=document.createElement("iframe");if(this.isSecure){G.src=B.IF!
 RAME_SRC;}if(YAHOO.env.ua.ie){G.style.filter="alpha(opacity=0)!
 ";G.fram
eBorder=0;}else{G.style.opacity="0";}G.style.position="absolute";G.style.border="none";G.style.margin="0";G.style.padding="0";G.style.display="none";}R=G.cloneNode(false);T=S.parentNode;var Q=T||document.body;this._addToParent(Q,R);this.iframe=R;}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true;}}function L(){P.call(this);this.beforeShowEvent.unsubscribe(L);this._iframeDeferred=false;}if(K){if(this.cfg.getProperty("visible")){P.call(this);}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(L);this._iframeDeferred=true;}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false;}}},co!
 nfigConstrainToViewport:function(M,K,N){function L(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();}var P=this.cfg.getProperty("x");var R=this.cfg.getProperty("y");var Q=this.getConstrainedXY(P,R);if(Q[0]!==P||Q[1]!==R){this.moveTo(Q[0],Q[1]);}}var O=K[0];if(O){if(!C.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}if(!C.alreadySubscribed(this.beforeShowEvent,L)){this.beforeShowEvent.subscribe(L);}}else{this.beforeShowEvent.unsubscribe(L);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}},configContext:function(M,L,O){var Q=L[0],N,P,K;if(Q){N=Q[0];P=Q[1];K=Q[2];if(N){if(typeof N=="string"){this.cfg.setProperty("context",[document.getElementById(N),P,K],true);}if(P&&K){this.align(P,K);}}}},align:function(L,K){var Q=this.cfg.getProperty("context"),P=this,O,N,R;function M(S,T){switch(L){case B.TOP_LEFT:P.moveTo(T,S);
+break;case B.TOP_RIGHT:P.moveTo((T-N.offsetWidth),S);break;case B.BOTTOM_LEFT:P.moveTo(T,(S-N.offsetHeight));break;case B.BOTTOM_RIGHT:P.moveTo((T-N.offsetWidth),(S-N.offsetHeight));break;}}if(Q){O=Q[0];N=this.element;P=this;if(!L){L=Q[1];}if(!K){K=Q[2];}if(N&&O){R=D.getRegion(O);switch(K){case B.TOP_LEFT:M(R.top,R.left);break;case B.TOP_RIGHT:M(R.top,R.right);break;case B.BOTTOM_LEFT:M(R.bottom,R.left);break;case B.BOTTOM_RIGHT:M(R.bottom,R.right);break;}}}},enforceConstraints:function(L,K,M){var O=K[0];var N=this.getConstrainedXY(O[0],O[1]);this.cfg.setProperty("x",N[0],true);this.cfg.setProperty("y",N[1],true);this.cfg.setProperty("xy",N,true);},getConstrainedXY:function(V,T){var N=B.VIEWPORT_OFFSET,U=D.getViewportWidth(),Q=D.getViewportHeight(),M=this.element.offsetHeight,S=this.element.offsetWidth,Y=D.getDocumentScrollLeft(),W=D.getDocumentScrollTop();var P=V;var L=T;if(S+N<U){var R=Y+N;var X=Y+U-S-N;if(V<R){P=R;}else{if(V>X){P=X;}}}else{P=N+Y;}if(M+N<Q){var O=W+N;var !
 K=W+Q-M-N;if(T<O){L=O;}else{if(T>K){L=K;}}}else{L=N+W;}return[P,L];},center:function(){var N=B.VIEWPORT_OFFSET,O=this.element.offsetWidth,M=this.element.offsetHeight,L=D.getViewportWidth(),P=D.getViewportHeight(),K,Q;if(O<L){K=(L/2)-(O/2)+D.getDocumentScrollLeft();}else{K=N+D.getDocumentScrollLeft();}if(M<P){Q=(P/2)-(M/2)+D.getDocumentScrollTop();}else{Q=N+D.getDocumentScrollTop();}this.cfg.setProperty("xy",[parseInt(K,10),parseInt(Q,10)]);this.cfg.refireEvent("iframe");},syncPosition:function(){var K=D.getXY(this.element);this.cfg.setProperty("x",K[0],true);this.cfg.setProperty("y",K[1],true);this.cfg.setProperty("xy",K,true);},onDomResize:function(M,L){var K=this;B.superclass.onDomResize.call(this,M,L);setTimeout(function(){K.syncPosition();K.cfg.refireEvent("iframe");K.cfg.refireEvent("context");},0);},bringToTop:function(){var O=[],N=this.element;function R(V,U){var X=D.getStyle(V,"zIndex"),W=D.getStyle(U,"zIndex"),T=(!X||isNaN(X))?0:parseInt(X,10),S=(!W||isNaN(W))?0:pa!
 rseInt(W,10);if(T>S){return -1;}else{if(T<S){return 1;}else{re!
 turn 0;}
}}function M(U){var S=D.hasClass(U,B.CSS_OVERLAY),T=YAHOO.widget.Panel;if(S&&!D.isAncestor(N,S)){if(T&&D.hasClass(U,T.CSS_PANEL)){O[O.length]=U.parentNode;}else{O[O.length]=U;}}}D.getElementsBy(M,"DIV",document.body);O.sort(R);var K=O[0],Q;if(K){Q=D.getStyle(K,"zIndex");if(!isNaN(Q)){var P=false;if(K!=N){P=true;}else{if(O.length>1){var L=D.getStyle(O[1],"zIndex");if(!isNaN(L)&&(Q==L)){P=true;}}}if(P){this.cfg.setProperty("zindex",(parseInt(Q,10)+2));}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;B.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.superclass.destroy.call(this);},toString:function(){return"Overlay "+this.id;}});}());(function(){YAHOO.widget.OverlayManager=function(G){this.init(G);};var D=YAHOO.widget.Overlay,C=YAHOO.util.Event,E=YAHOO.util.Dom,B=YAHOO.util.Config,F=YAHOO.util.CustomEvent,A=YAHOO.widget.OverlayManager;A.CSS_FOCUSE!
 D="focused";A.prototype={constructor:A,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},init:function(I){this.cfg=new B(this);this.initDefaultConfig();if(I){this.cfg.applyConfig(I,true);}this.cfg.fireQueue();var H=null;this.getActive=function(){return H;};this.focus=function(J){var K=this.find(J);if(K){if(H!=K){if(H){H.blur();}this.bringToTop(K);H=K;E.addClass(H.element,A.CSS_FOCUSED);K.focusEvent.fire();}}};this.remove=function(K){var M=this.find(K),J;if(M){if(H==M){H=null;}var L=(M.element===null&&M.cfg===null)?true:false;if(!L){J=E.getStyle(M.element,"zIndex");M.cfg.setProperty("zIndex",-1000,true);}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));M.hideEvent.unsubscribe(M.blur);M.destroyEvent.unsubscribe(this._onOverlayDestroy,M);if(!L){C.removeListener(M.element,this.cfg.getProperty("focusevent"),this._onOverla!
 yElementFocus);M.cfg.setProperty("zIndex",J,true);M.cfg.setPro!
 perty("m
anager",null);}M.focusEvent.unsubscribeAll();M.blurEvent.unsubscribeAll();M.focusEvent=null;M.blurEvent=null;M.focus=null;M.blur=null;}};this.blurAll=function(){var K=this.overlays.length,J;if(K>0){J=K-1;do{this.overlays[J].blur();}while(J--);}};this._onOverlayBlur=function(K,J){H=null;};var G=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[];}if(G){this.register(G);this.overlays.sort(this.compareZIndexDesc);}},_onOverlayElementFocus:function(I){var G=C.getTarget(I),H=this.close;if(H&&(G==H||E.isAncestor(H,G))){this.blur();}else{this.focus();}},_onOverlayDestroy:function(H,G,I){this.remove(I);},register:function(G){var K=this,L,I,H,J;if(G instanceof D){G.cfg.addProperty("manager",{value:this});G.focusEvent=G.createEvent("focus");G.focusEvent.signature=F.LIST;G.blurEvent=G.createEvent("blur");G.blurEvent.signature=F.LIST;G.focus=function(){K.focus(this);};G.blur=function(){if(K.getActive()==this){E.removeClass(this.element,A.CSS_FOCUSED);this.blurEvent.fire!
 ();}};G.blurEvent.subscribe(K._onOverlayBlur);G.hideEvent.subscribe(G.blur);G.destroyEvent.subscribe(this._onOverlayDestroy,G,this);C.on(G.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus,null,G);L=E.getStyle(G.element,"zIndex");if(!isNaN(L)){G.cfg.setProperty("zIndex",parseInt(L,10));}else{G.cfg.setProperty("zIndex",0);}this.overlays.push(G);this.bringToTop(G);return true;}else{if(G instanceof Array){I=0;J=G.length;for(H=0;H<J;H++){if(this.register(G[H])){I++;}}if(I>0){return true;}}else{return false;}}},bringToTop:function(M){var I=this.find(M),L,G,J;if(I){J=this.overlays;J.sort(this.compareZIndexDesc);G=J[0];if(G){L=E.getStyle(G.element,"zIndex");if(!isNaN(L)){var K=false;if(G!==I){K=true;}else{if(J.length>1){var H=E.getStyle(J[1].element,"zIndex");if(!isNaN(H)&&(L==H)){K=true;}}}if(K){I.cfg.setProperty("zindex",(parseInt(L,10)+2));}}J.sort(this.compareZIndexDesc);}}},find:function(G){var I=this.overlays,J=I.length,H;
+if(J>0){H=J-1;if(G instanceof D){do{if(I[H]==G){return I[H];}}while(H--);}else{if(typeof G=="string"){do{if(I[H].id==G){return I[H];}}while(H--);}}return null;}},compareZIndexDesc:function(J,I){var H=(J.cfg)?J.cfg.getProperty("zIndex"):null,G=(I.cfg)?I.cfg.getProperty("zIndex"):null;if(H===null&&G===null){return 0;}else{if(H===null){return 1;}else{if(G===null){return -1;}else{if(H>G){return -1;}else{if(H<G){return 1;}else{return 0;}}}}}},showAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].show();}while(G--);}},hideAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].hide();}while(G--);}},toString:function(){return"OverlayManager";}};}());(function(){YAHOO.widget.Tooltip=function(L,K){YAHOO.widget.Tooltip.superclass.constructor.call(this,L,K);};var D=YAHOO.lang,J=YAHOO.util.Event,B=YAHOO.util.Dom,F=YAHOO.widget.Tooltip,E,G={"PREVENT_OVERLAP":{key:"preventoverlap",value:true,validator:D.isBoolean,supercedes:["x","y","xy"]},"SHOW_DELAY":{!
 key:"showdelay",value:200,validator:D.isNumber},"AUTO_DISMISS_DELAY":{key:"autodismissdelay",value:5000,validator:D.isNumber},"HIDE_DELAY":{key:"hidedelay",value:250,validator:D.isNumber},"TEXT":{key:"text",suppressEvent:true},"CONTAINER":{key:"container"}};F.CSS_TOOLTIP="yui-tt";function H(L,K,M){var P=M[0],N=M[1],O=this.cfg,Q=O.getProperty("width");if(Q==N){O.setProperty("width",P);}this.unsubscribe("hide",this._onHide,M);}function C(L,K){var M=document.body,Q=this.cfg,P=Q.getProperty("width"),N,O;if((!P||P=="auto")&&(Q.getProperty("container")!=M||Q.getProperty("x")>=B.getViewportWidth()||Q.getProperty("y")>=B.getViewportHeight())){O=this.element.cloneNode(true);O.style.visibility="hidden";O.style.top="0px";O.style.left="0px";M.appendChild(O);N=(O.offsetWidth+"px");M.removeChild(O);O=null;Q.setProperty("width",N);Q.refireEvent("xy");this.subscribe("hide",H,[(P||""),N]);}}function A(L,K,M){this.render(M);}function I(){J.onDOMReady(A,this.cfg.getProperty("container"),this)!
 ;}YAHOO.extend(F,YAHOO.widget.Overlay,{init:function(L,K){F.su!
 perclass
.init.call(this,L);this.beforeInitEvent.fire(F);B.addClass(this.element,F.CSS_TOOLTIP);if(K){this.cfg.applyConfig(K,true);}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("beforeShow",C);this.subscribe("init",I);this.subscribe("render",this.onRender);this.initEvent.fire(F);},initDefaultConfig:function(){F.superclass.initDefaultConfig.call(this);this.cfg.addProperty(G.PREVENT_OVERLAP.key,{value:G.PREVENT_OVERLAP.value,validator:G.PREVENT_OVERLAP.validator,supercedes:G.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(G.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:G.SHOW_DELAY.validator});this.cfg.addProperty(G.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:G.AUTO_DISMISS_DELAY.value,validator:G.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(G.HIDE_DELAY.key,{handler:this.configHideDelay,value:G.HIDE_DELAY.value,validator:G.HIDE_DELAY.validator});this.cfg.addP!
 roperty(G.TEXT.key,{handler:this.configText,suppressEvent:G.TEXT.suppressEvent});this.cfg.addProperty(G.CONTAINER.key,{handler:this.configContainer,value:document.body});},configText:function(L,K,M){var N=K[0];if(N){this.setBody(N);}},configContainer:function(M,L,N){var K=L[0];if(typeof K=="string"){this.cfg.setProperty("container",document.getElementById(K),true);}},_removeEventListeners:function(){var N=this._context,K,M,L;if(N){K=N.length;if(K>0){L=K-1;do{M=N[L];J.removeListener(M,"mouseover",this.onContextMouseOver);J.removeListener(M,"mousemove",this.onContextMouseMove);J.removeListener(M,"mouseout",this.onContextMouseOut);}while(L--);}}},configContext:function(P,L,Q){var O=L[0],R,K,N,M;if(O){if(!(O instanceof Array)){if(typeof O=="string"){this.cfg.setProperty("context",[document.getElementById(O)],true);}else{this.cfg.setProperty("context",[O],true);}O=this.cfg.getProperty("context");}this._removeEventListeners();this._context=O;R=this._context;if(R){K=R.length;if(K>!
 0){M=K-1;do{N=R[M];J.on(N,"mouseover",this.onContextMouseOver,!
 this);J.
on(N,"mousemove",this.onContextMouseMove,this);J.on(N,"mouseout",this.onContextMouseOut,this);}while(M--);}}}},onContextMouseMove:function(L,K){K.pageX=J.getPageX(L);K.pageY=J.getPageY(L);},onContextMouseOver:function(M,L){var K=this;if(L.hideProcId){clearTimeout(L.hideProcId);L.hideProcId=null;}J.on(K,"mousemove",L.onContextMouseMove,L);if(K.title){L._tempTitle=K.title;K.title="";}L.showProcId=L.doShow(M,K);},onContextMouseOut:function(M,L){var K=this;if(L._tempTitle){K.title=L._tempTitle;L._tempTitle=null;}if(L.showProcId){clearTimeout(L.showProcId);L.showProcId=null;}if(L.hideProcId){clearTimeout(L.hideProcId);L.hideProcId=null;}L.hideProcId=setTimeout(function(){L.hide();},L.cfg.getProperty("hidedelay"));},doShow:function(M,K){var N=25,L=this;if(YAHOO.env.ua.opera&&K.tagName&&K.tagName.toUpperCase()=="A"){N+=12;}return setTimeout(function(){var O=L.cfg.getProperty("text");if(L._tempTitle&&(O===""||YAHOO.lang.isUndefined(O)||YAHOO.lang.isNull(O))){L.setBody(L._tempTitle);!
 }else{L.cfg.refireEvent("text");}L.moveTo(L.pageX,L.pageY+N);if(L.cfg.getProperty("preventoverlap")){L.preventOverlap(L.pageX,L.pageY);}J.removeListener(K,"mousemove",L.onContextMouseMove);L.show();L.hideProcId=L.doHide();},this.cfg.getProperty("showdelay"));},doHide:function(){var K=this;return setTimeout(function(){K.hide();},this.cfg.getProperty("autodismissdelay"));},preventOverlap:function(O,N){var K=this.element.offsetHeight,M=new YAHOO.util.Point(O,N),L=B.getRegion(this.element);L.top-=5;L.left-=5;L.right+=5;L.bottom+=5;if(L.contains(M)){this.cfg.setProperty("y",(N-K-5));}},onRender:function(O,N){function P(){var S=this.element,R=this._shadow;if(R){R.style.width=(S.offsetWidth+6)+"px";R.style.height=(S.offsetHeight+1)+"px";}}function L(){B.addClass(this._shadow,"yui-tt-shadow-visible");}function K(){B.removeClass(this._shadow,"yui-tt-shadow-visible");}function Q(){var T=this._shadow,S,R,V,U;if(!T){S=this.element;
+R=YAHOO.widget.Module;V=YAHOO.env.ua.ie;U=this;if(!E){E=document.createElement("div");E.className="yui-tt-shadow";}T=E.cloneNode(false);S.appendChild(T);this._shadow=T;L.call(this);this.subscribe("beforeShow",L);this.subscribe("beforeHide",K);if(V==6||(V==7&&document.compatMode=="BackCompat")){window.setTimeout(function(){P.call(U);},0);this.cfg.subscribeToConfigEvent("width",P);this.cfg.subscribeToConfigEvent("height",P);this.subscribe("changeContent",P);R.textResizeEvent.subscribe(P,this,true);this.subscribe("destroy",function(){R.textResizeEvent.unsubscribe(P,this);});}}}function M(){Q.call(this);this.unsubscribe("beforeShow",M);}if(this.cfg.getProperty("visible")){Q.call(this);}else{this.subscribe("beforeShow",M);}},destroy:function(){this._removeEventListeners();F.superclass.destroy.call(this);},toString:function(){return"Tooltip "+this.id;}});}());(function(){YAHOO.widget.Panel=function(U,T){YAHOO.widget.Panel.superclass.constructor.call(this,U,T);};var G=YAHOO.lang,N!
 =YAHOO.util.DD,A=YAHOO.util.Dom,S=YAHOO.util.Event,I=YAHOO.widget.Overlay,L=YAHOO.util.CustomEvent,J=YAHOO.util.Config,O=YAHOO.widget.Panel,H,Q,D,E={"SHOW_MASK":"showMask","HIDE_MASK":"hideMask","DRAG":"drag"},M={"CLOSE":{key:"close",value:true,validator:G.isBoolean,supercedes:["visible"]},"DRAGGABLE":{key:"draggable",value:(N?true:false),validator:G.isBoolean,supercedes:["visible"]},"DRAG_ONLY":{key:"dragonly",value:false,validator:G.isBoolean,supercedes:["draggable"]},"UNDERLAY":{key:"underlay",value:"shadow",supercedes:["visible"]},"MODAL":{key:"modal",value:false,validator:G.isBoolean,supercedes:["visible","zindex"]},"KEY_LISTENERS":{key:"keylisteners",suppressEvent:true,supercedes:["visible"]}};O.CSS_PANEL="yui-panel";O.CSS_PANEL_CONTAINER="yui-panel-container";function K(U,T){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader(" ");}}function R(U,T,V){var Y=V[0],W=V[1],X=this.cfg,Z=X.getProperty("width");if(Z==W){X.setProperty("width",Y);}this.unsu!
 bscribe("hide",R,V);}function C(U,T){var Y=YAHOO.env.ua.ie,X,W!
 ,V;if(Y=
=6||(Y==7&&document.compatMode=="BackCompat")){X=this.cfg;W=X.getProperty("width");if(!W||W=="auto"){V=(this.element.offsetWidth+"px");X.setProperty("width",V);this.subscribe("hide",R,[(W||""),V]);}}}function F(){this.blur();}function P(V,U){var W=this;function T(Z){var Y=Z.tagName.toUpperCase(),X=false;switch(Y){case"A":case"BUTTON":case"SELECT":case"TEXTAREA":if(!A.isAncestor(W.element,Z)){S.on(Z,"focus",F,Z,true);X=true;}break;case"INPUT":if(Z.type!="hidden"&&!A.isAncestor(W.element,Z)){S.on(Z,"focus",F,Z,true);X=true;}break;}return X;}this.focusableElements=A.getElementsBy(T);}function B(V,U){var Y=this.focusableElements,T=Y.length,W,X;for(X=0;X<T;X++){W=Y[X];S.removeListener(W,"focus",F);}}YAHOO.extend(O,I,{init:function(U,T){O.superclass.init.call(this,U);this.beforeInitEvent.fire(O);A.addClass(this.element,O.CSS_PANEL);this.buildWrapper();if(T){this.cfg.applyConfig(T,true);}this.subscribe("showMask",P);this.subscribe("hideMask",B);this.subscribe("beforeRender",K);this!
 .initEvent.fire(O);},initEvents:function(){O.superclass.initEvents.call(this);var T=L.LIST;this.showMaskEvent=this.createEvent(E.SHOW_MASK);this.showMaskEvent.signature=T;this.hideMaskEvent=this.createEvent(E.HIDE_MASK);this.hideMaskEvent.signature=T;this.dragEvent=this.createEvent(E.DRAG);this.dragEvent.signature=T;},initDefaultConfig:function(){O.superclass.initDefaultConfig.call(this);this.cfg.addProperty(M.CLOSE.key,{handler:this.configClose,value:M.CLOSE.value,validator:M.CLOSE.validator,supercedes:M.CLOSE.supercedes});this.cfg.addProperty(M.DRAGGABLE.key,{handler:this.configDraggable,value:M.DRAGGABLE.value,validator:M.DRAGGABLE.validator,supercedes:M.DRAGGABLE.supercedes});this.cfg.addProperty(M.DRAG_ONLY.key,{value:M.DRAG_ONLY.value,validator:M.DRAG_ONLY.validator,supercedes:M.DRAG_ONLY.supercedes});this.cfg.addProperty(M.UNDERLAY.key,{handler:this.configUnderlay,value:M.UNDERLAY.value,supercedes:M.UNDERLAY.supercedes});this.cfg.addProperty(M.MODAL.key,{handler:this!
 .configModal,value:M.MODAL.value,validator:M.MODAL.validator,s!
 upercede
s:M.MODAL.supercedes});this.cfg.addProperty(M.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:M.KEY_LISTENERS.suppressEvent,supercedes:M.KEY_LISTENERS.supercedes});},configClose:function(V,T,X){var Y=T[0],U=this.close;function W(a,Z){Z.hide();}if(Y){if(!U){if(!D){D=document.createElement("span");D.innerHTML=" ";D.className="container-close";}U=D.cloneNode(true);this.innerElement.appendChild(U);S.on(U,"click",W,this);this.close=U;}else{U.style.display="block";}}else{if(U){U.style.display="none";}}},configDraggable:function(U,T,V){var W=T[0];if(W){if(!N){this.cfg.setProperty("draggable",false);return ;}if(this.header){A.setStyle(this.header,"cursor","move");this.registerDragDrop();}this.subscribe("beforeShow",C);}else{if(this.dd){this.dd.unreg();}if(this.header){A.setStyle(this.header,"cursor","auto");}this.unsubscribe("beforeShow",C);}},configUnderlay:function(c,b,X){var a=YAHOO.env.ua,Z=(this.platform=="mac"&&a.gecko),d=b[0].toLowerCase(),T=this.underla!
 y,U=this.element;function e(){var f=this.underlay;A.addClass(f,"yui-force-redraw");window.setTimeout(function(){A.removeClass(f,"yui-force-redraw");},0);}function V(){var f;if(!T){if(!Q){Q=document.createElement("div");Q.className="underlay";}T=Q.cloneNode(false);this.element.appendChild(T);this.underlay=T;f=a.ie;if(f==6||(f==7&&document.compatMode=="BackCompat")){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.sizeUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay,this,true);}if(a.webkit&&a.webkit<420){this.changeContentEvent.subscribe(e);}}}function Y(){V.call(this);this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(Y);}function W(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(Y);this._underlayDeferred=false;}if(T){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);
+this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(e);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(T);this.underlay=null;}}switch(d){case"shadow":A.removeClass(U,"matte");A.addClass(U,"shadow");break;case"matte":if(!Z){W.call(this);}A.removeClass(U,"shadow");A.addClass(U,"matte");break;default:if(!Z){W.call(this);}A.removeClass(U,"shadow");A.removeClass(U,"matte");break;}if((d=="shadow")||(Z&&!T)){if(this.cfg.getProperty("visible")){V.call(this);}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(Y);this._underlayDeferred=true;}}}},configModal:function(U,T,W){var V=T[0];if(V){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);I.windowResizeEvent.subsc!
 ribe(this.sizeMask,this,true);this._hasModalityEventListeners=true;}}else{if(this._hasModalityEventListeners){if(this.cfg.getProperty("visible")){this.hideMask();this.removeMask();}this.unsubscribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTop);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hideMask);I.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false;}}},removeMask:function(){var U=this.mask,T;if(U){this.hideMask();T=U.parentNode;if(T){T.removeChild(U);}this.mask=null;}},configKeyListeners:function(W,T,Z){var V=T[0],Y,X,U;if(V){if(V instanceof Array){X=V.length;for(U=0;U<X;U++){Y=V[U];if(!J.alreadySubscribed(this.showEvent,Y.enable,Y)){this.showEvent.subscribe(Y.enable,Y,true);}if(!J.alreadySubscribed(this.hideEvent,Y.disable,Y)){this.hideEvent.subscribe(Y.disable,Y,true);this.destroyEvent.subscribe(Y.disable,Y,true);}}}else{if(!J.alreadySubscribed(this.showEvent,V.enable,V)){this!
 .showEvent.subscribe(V.enable,V,true);}if(!J.alreadySubscribed!
 (this.hi
deEvent,V.disable,V)){this.hideEvent.subscribe(V.disable,V,true);this.destroyEvent.subscribe(V.disable,V,true);}}}},configHeight:function(W,U,X){var T=U[0],V=this.innerElement;A.setStyle(V,"height",T);this.cfg.refireEvent("iframe");},configWidth:function(W,T,X){var V=T[0],U=this.innerElement;A.setStyle(U,"width",V);this.cfg.refireEvent("iframe");},configzIndex:function(U,T,W){O.superclass.configzIndex.call(this,U,T,W);if(this.mask||this.cfg.getProperty("modal")===true){var V=A.getStyle(this.element,"zIndex");if(!V||isNaN(V)){V=0;}if(V===0){this.cfg.setProperty("zIndex",1);}else{this.stackMask();}}},buildWrapper:function(){var V=this.element.parentNode,T=this.element,U=document.createElement("div");U.className=O.CSS_PANEL_CONTAINER;U.id=T.id+"_c";if(V){V.insertBefore(U,T);}U.appendChild(T);this.element=U;this.innerElement=T;A.setStyle(this.innerElement,"visibility","inherit");},sizeUnderlay:function(){var U=this.underlay,T;if(U){T=this.element;U.style.width=T.offsetWidth+"px"!
 ;U.style.height=T.offsetHeight+"px";}},registerDragDrop:function(){var U=this;if(this.header){if(!N){return ;}var T=(this.cfg.getProperty("dragonly")===true);this.dd=new N(this.element.id,this.id,{dragOnly:T});if(!this.header.id){this.header.id=this.id+"_h";}this.dd.startDrag=function(){var W,Y,V,b,a,Z;if(YAHOO.env.ua.ie==6){A.addClass(U.element,"drag");}if(U.cfg.getProperty("constraintoviewport")){var X=I.VIEWPORT_OFFSET;W=U.element.offsetHeight;Y=U.element.offsetWidth;V=A.getViewportWidth();b=A.getViewportHeight();a=A.getDocumentScrollLeft();Z=A.getDocumentScrollTop();if(W+X<b){this.minY=Z+X;this.maxY=Z+b-W-X;}else{this.minY=Z+X;this.maxY=Z+X;}if(Y+X<V){this.minX=a+X;this.maxX=a+V-Y-X;}else{this.minX=a+X;this.maxX=a+X;}this.constrainX=true;this.constrainY=true;}else{this.constrainX=false;this.constrainY=false;}U.dragEvent.fire("startDrag",arguments);};this.dd.onDrag=function(){U.syncPosition();U.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.s!
 howMacGeckoScrollbars();}U.dragEvent.fire("onDrag",arguments);!
 };this.d
d.endDrag=function(){if(YAHOO.env.ua.ie==6){A.removeClass(U.element,"drag");}U.dragEvent.fire("endDrag",arguments);U.moveEvent.fire(U.cfg.getProperty("xy"));};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA");}},buildMask:function(){var T=this.mask;if(!T){if(!H){H=document.createElement("div");H.className="mask";H.innerHTML=" ";}T=H.cloneNode(true);T.id=this.id+"_mask";document.body.insertBefore(T,document.body.firstChild);this.mask=T;this.stackMask();}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";this.hideMaskEvent.fire();A.removeClass(document.body,"masked");}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){A.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire();}},sizeMask:function(){if(this.mask){this.mask.style.height=A.getDocumentHeight()+!
 "px";this.mask.style.width=A.getDocumentWidth()+"px";}},stackMask:function(){if(this.mask){var T=A.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(T)&&!isNaN(T)){A.setStyle(this.mask,"zIndex",T-1);}}},render:function(T){return O.superclass.render.call(this,T,this.innerElement);},destroy:function(){I.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){S.purgeElement(this.close);}O.superclass.destroy.call(this);},toString:function(){return"Panel "+this.id;}});}());(function(){YAHOO.widget.Dialog=function(L,K){YAHOO.widget.Dialog.superclass.constructor.call(this,L,K);};var J=YAHOO.util.Event,I=YAHOO.util.CustomEvent,D=YAHOO.util.Dom,B=YAHOO.util.KeyListener,H=YAHOO.util.Connect,F=YAHOO.widget.Dialog,E=YAHOO.lang,A={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},G={"POST_METHOD":{key:"postmethod",value:"async"},"BUTTONS":{key:"but!
 tons",value:"none"}};
+F.CSS_DIALOG="yui-dialog";function C(){var N=this._aButtons,L,M,K;if(E.isArray(N)){L=N.length;if(L>0){K=L-1;do{M=N[K];if(YAHOO.widget.Button&&M instanceof YAHOO.widget.Button){M.destroy();}else{if(M.tagName.toUpperCase()=="BUTTON"){J.purgeElement(M);J.purgeElement(M,false);}}}while(K--);}}}YAHOO.extend(F,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){F.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(G.POST_METHOD.key,{handler:this.configPostMethod,value:G.POST_METHOD.value,validator:function(K){if(K!="form"&&K!="async"&&K!="none"&&K!="manual"){return false;}else{return true;}}});this.cfg.addProperty(G.BUTTONS.key,{handler:this.configButtons,value:G.BUTTONS.value});},initEvents:function(){F.superclass.initEvents.call(this);var K=I.LIST;this.beforeSubmitEvent=this.createEvent(A.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=K;this.submitEvent=this.createEvent(A.SUBMIT);this.submitEvent.signature!
 =K;this.manualSubmitEvent=this.createEvent(A.MANUAL_SUBMIT);this.manualSubmitEvent.signature=K;this.asyncSubmitEvent=this.createEvent(A.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=K;this.formSubmitEvent=this.createEvent(A.FORM_SUBMIT);this.formSubmitEvent.signature=K;this.cancelEvent=this.createEvent(A.CANCEL);this.cancelEvent.signature=K;},init:function(L,K){F.superclass.init.call(this,L);this.beforeInitEvent.fire(F);D.addClass(this.element,F.CSS_DIALOG);this.cfg.setProperty("visible",false);if(K){this.cfg.applyConfig(K,true);}this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(F);},doSubmit:function(){var Q=this.form,O=false,N=false,P,K,M,L;switch(this.cfg.getProperty("postmethod")){case"async":P=Q.elements;K=P.length;if(K>0){M=K-1;do{if(P[M].type=="file"){O=true;break;}}while(M--);}if(O&&YAHOO.env.ua.ie&&this.isSecure){N=true;}L=(Q.getAttribute(!
 "method")||"POST").toUpperCase();H.setForm(Q,O,N);H.asyncReque!
 st(L,Q.g
etAttribute("action"),this.callback);this.asyncSubmitEvent.fire();break;case"form":Q.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break;}},registerForm:function(){var M=this.element.getElementsByTagName("form")[0],L=this,K,N;if(this.form){if(this.form==M&&D.isAncestor(this.element,this.form)){return ;}else{J.purgeElement(this.form);this.form=null;}}if(!M){M=document.createElement("form");M.name="frm_"+this.id;this.body.appendChild(M);}if(M){this.form=M;J.on(M,"submit",function(O){J.stopEvent(O);this.submit();this.form.blur();},this,true);this.firstFormElement=function(){var Q,P,O=M.elements.length;for(Q=0;Q<O;Q++){P=M.elements[Q];if(P.focus&&!P.disabled&&P.type!="hidden"){return P;}}return null;}();this.lastFormElement=function(){var Q,P,O=M.elements.length;for(Q=O-1;Q>=0;Q--){P=M.elements[Q];if(P.focus&&!P.disabled&&P.type!="hidden"){return P;}}return null;}();if(this.cfg.getProperty("modal")){K=this.firstFormElement||this!
 .firstButton;if(K){this.preventBackTab=new B(K,{shift:true,keys:9},{fn:L.focusLast,scope:L,correctScope:true});this.showEvent.subscribe(this.preventBackTab.enable,this.preventBackTab,true);this.hideEvent.subscribe(this.preventBackTab.disable,this.preventBackTab,true);}N=this.lastButton||this.lastFormElement;if(N){this.preventTabOut=new B(N,{shift:false,keys:9},{fn:L.focusFirst,scope:L,correctScope:true});this.showEvent.subscribe(this.preventTabOut.enable,this.preventTabOut,true);this.hideEvent.subscribe(this.preventTabOut.disable,this.preventTabOut,true);}}}},configClose:function(M,K,N){var O=K[0];function L(Q,P){P.cancel();}if(O){if(!this.close){this.close=document.createElement("div");D.addClass(this.close,"container-close");this.close.innerHTML=" ";this.innerElement.appendChild(this.close);J.on(this.close,"click",L,this);}else{this.close.style.display="block";}}else{if(this.close){this.close.style.display="none";}}},configButtons:function(U,T,O){var P=YAHOO.widget.B!
 utton,W=T[0],M=this.innerElement,V,R,L,S,Q,K,N;C.call(this);th!
 is._aBut
tons=null;if(E.isArray(W)){Q=document.createElement("span");Q.className="button-group";S=W.length;this._aButtons=[];for(N=0;N<S;N++){V=W[N];if(P){L=new P({label:V.text,container:Q});R=L.get("element");if(V.isDefault){L.addClass("default");this.defaultHtmlButton=R;}if(E.isFunction(V.handler)){L.set("onclick",{fn:V.handler,obj:this,scope:this});}else{if(E.isObject(V.handler)&&E.isFunction(V.handler.fn)){L.set("onclick",{fn:V.handler.fn,obj:((!E.isUndefined(V.handler.obj))?V.handler.obj:this),scope:(V.handler.scope||this)});}}this._aButtons[this._aButtons.length]=L;}else{R=document.createElement("button");R.setAttribute("type","button");if(V.isDefault){R.className="default";this.defaultHtmlButton=R;}R.innerHTML=V.text;if(E.isFunction(V.handler)){J.on(R,"click",V.handler,this,true);}else{if(E.isObject(V.handler)&&E.isFunction(V.handler.fn)){J.on(R,"click",V.handler.fn,((!E.isUndefined(V.handler.obj))?V.handler.obj:this),(V.handler.scope||this));}}Q.appendChild(R);this._aButtons[!
 this._aButtons.length]=R;}V.htmlButton=R;if(N===0){this.firstButton=R;}if(N==(S-1)){this.lastButton=R;}}this.setFooter(Q);K=this.footer;if(D.inDocument(this.element)&&!D.isAncestor(M,K)){M.appendChild(K);}this.buttonSpan=Q;}else{Q=this.buttonSpan;K=this.footer;if(Q&&K){K.removeChild(Q);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null;}}this.cfg.refireEvent("iframe");this.cfg.refireEvent("underlay");},getButtons:function(){var K=this._aButtons;if(K){return K;}},focusFirst:function(N,L,P){var M=this.firstFormElement,K;if(L){K=L[1];if(K){J.stopEvent(K);}}if(M){try{M.focus();}catch(O){}}else{this.focusDefaultButton();}},focusLast:function(N,L,P){var Q=this.cfg.getProperty("buttons"),M=this.lastFormElement,K;if(L){K=L[1];if(K){J.stopEvent(K);}}if(Q&&E.isArray(Q)){this.focusLastButton();}else{if(M){try{M.focus();}catch(O){}}}},focusDefaultButton:function(){var K=this.defaultHtmlButton;
+if(K){try{K.focus();}catch(L){}}},blurButtons:function(){var P=this.cfg.getProperty("buttons"),M,O,L,K;if(P&&E.isArray(P)){M=P.length;if(M>0){K=(M-1);do{O=P[K];if(O){L=O.htmlButton;if(L){try{L.blur();}catch(N){}}}}while(K--);}}},focusFirstButton:function(){var N=this.cfg.getProperty("buttons"),M,K;if(N&&E.isArray(N)){M=N[0];if(M){K=M.htmlButton;if(K){try{K.focus();}catch(L){}}}}},focusLastButton:function(){var O=this.cfg.getProperty("buttons"),L,N,K;if(O&&E.isArray(O)){L=O.length;if(L>0){N=O[(L-1)];if(N){K=N.htmlButton;if(K){try{K.focus();}catch(M){}}}}}},configPostMethod:function(L,K,M){this.registerForm();},validate:function(){return true;},submit:function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();this.hide();return true;}else{return false;}},cancel:function(){this.cancelEvent.fire();this.hide();},getData:function(){var a=this.form,M,T,W,O,U,R,Q,L,X,N,Y,b,K,P,c,Z,V;function S(e){var d=e.tagName.toUpperCase();return((d=="IN!
 PUT"||d=="TEXTAREA"||d=="SELECT")&&e.name==O);}if(a){M=a.elements;T=M.length;W={};for(Z=0;Z<T;Z++){O=M[Z].name;U=D.getElementsBy(S,"*",a);R=U.length;if(R>0){if(R==1){U=U[0];Q=U.type;L=U.tagName.toUpperCase();switch(L){case"INPUT":if(Q=="checkbox"){W[O]=U.checked;}else{if(Q!="radio"){W[O]=U.value;}}break;case"TEXTAREA":W[O]=U.value;break;case"SELECT":X=U.options;N=X.length;Y=[];for(V=0;V<N;V++){b=X[V];if(b.selected){K=b.value;if(!K||K===""){K=b.text;}Y[Y.length]=K;}}W[O]=Y;break;}}else{Q=U[0].type;switch(Q){case"radio":for(V=0;V<R;V++){P=U[V];if(P.checked){W[O]=P.value;break;}}break;case"checkbox":Y=[];for(V=0;V<R;V++){c=U[V];if(c.checked){Y[Y.length]=c.value;}}W[O]=Y;break;}}}}}return W;},destroy:function(){C.call(this);this._aButtons=null;var K=this.element.getElementsByTagName("form"),L;if(K.length>0){L=K[0];if(L){J.purgeElement(L);if(L.parentNode){L.parentNode.removeChild(L);}this.form=null;}}F.superclass.destroy.call(this);},toString:function(){return"Dialog "+this.id;}!
 });}());(function(){YAHOO.widget.SimpleDialog=function(E,D){YA!
 HOO.widg
et.SimpleDialog.superclass.constructor.call(this,E,D);};var C=YAHOO.util.Dom,B=YAHOO.widget.SimpleDialog,A={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};B.ICON_BLOCK="blckicon";B.ICON_ALARM="alrticon";B.ICON_HELP="hlpicon";B.ICON_INFO="infoicon";B.ICON_WARN="warnicon";B.ICON_TIP="tipicon";B.ICON_CSS_CLASSNAME="yui-icon";B.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(B,YAHOO.widget.Dialog,{initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);this.cfg.addProperty(A.ICON.key,{handler:this.configIcon,value:A.ICON.value,suppressEvent:A.ICON.suppressEvent});this.cfg.addProperty(A.TEXT.key,{handler:this.configText,value:A.TEXT.value,suppressEvent:A.TEXT.suppressEvent,supercedes:A.TEXT.supercedes});},init:function(E,D){B.superclass.init.call(this,E);this.beforeInitEvent.fire(B);C.addClass(this.element,B.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(D){this.cfg.appl!
 yConfig(D,true);}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("");}},this,true);this.initEvent.fire(B);},registerForm:function(){B.superclass.registerForm.call(this);this.form.innerHTML+="<input type=\"hidden\" name=\""+this.id+"\" value=\"\"/>";},configIcon:function(F,E,J){var K=E[0],D=this.body,I=B.ICON_CSS_CLASSNAME,H,G;if(K&&K!="none"){H=C.getElementsByClassName(I,"*",D);if(H){G=H.parentNode;if(G){G.removeChild(H);H=null;}}if(K.indexOf(".")==-1){H=document.createElement("span");H.className=(I+" "+K);H.innerHTML=" ";}else{H=document.createElement("img");H.src=(this.imageRoot+K);H.className=I;}if(H){D.insertBefore(H,D.firstChild);}}},configText:function(E,D,F){var G=D[0];if(G){this.setBody(G);this.cfg.refireEvent("icon");}},toString:function(){return"SimpleDialog "+this.id;}});}());(function(){YAHOO.widget.ContainerEffect=function(F,I,H,E,G){if(!G){G=YAHOO.util.Anim;}this.overlay=F;this.attrIn=I;this.attrOut=H;this.targetElement=E||F.elemen!
 t;this.animClass=G;};var B=YAHOO.util.Dom,D=YAHOO.util.CustomE!
 vent,C=Y
AHOO.util.Easing,A=YAHOO.widget.ContainerEffect;A.FADE=function(E,G){var I={attributes:{opacity:{from:0,to:1}},duration:G,method:C.easeIn};var F={attributes:{opacity:{to:0}},duration:G,method:C.easeOut};var H=new A(E,I,F,E.element);H.handleUnderlayStart=function(){var K=this.overlay.underlay;if(K&&YAHOO.env.ua.ie){var J=(K.filters&&K.filters.length>0);if(J){B.addClass(E.element,"yui-effect-fade");}}};H.handleUnderlayComplete=function(){var J=this.overlay.underlay;if(J&&YAHOO.env.ua.ie){B.removeClass(E.element,"yui-effect-fade");}};H.handleStartAnimateIn=function(K,J,L){B.addClass(L.overlay.element,"hide-select");if(!L.overlay.underlay){L.overlay.cfg.refireEvent("underlay");}L.handleUnderlayStart();B.setStyle(L.overlay.element,"visibility","visible");B.setStyle(L.overlay.element,"opacity",0);};H.handleCompleteAnimateIn=function(K,J,L){B.removeClass(L.overlay.element,"hide-select");if(L.overlay.element.style.filter){L.overlay.element.style.filter=null;}L.handleUnderlayComplete!
 ();L.overlay.cfg.refireEvent("iframe");L.animateInCompleteEvent.fire();};H.handleStartAnimateOut=function(K,J,L){B.addClass(L.overlay.element,"hide-select");L.handleUnderlayStart();};H.handleCompleteAnimateOut=function(K,J,L){B.removeClass(L.overlay.element,"hide-select");if(L.overlay.element.style.filter){L.overlay.element.style.filter=null;}B.setStyle(L.overlay.element,"visibility","hidden");B.setStyle(L.overlay.element,"opacity",1);L.handleUnderlayComplete();L.overlay.cfg.refireEvent("iframe");L.animateOutCompleteEvent.fire();};H.init();return H;};A.SLIDE=function(G,I){var F=G.cfg.getProperty("x")||B.getX(G.element),K=G.cfg.getProperty("y")||B.getY(G.element),J=B.getClientWidth(),H=G.element.offsetWidth,E=new A(G,{attributes:{points:{to:[F,K]}},duration:I,method:C.easeIn},{attributes:{points:{to:[(J+25),K]}},duration:I,method:C.easeOut},G.element,YAHOO.util.Motion);E.handleStartAnimateIn=function(M,L,N){N.overlay.element.style.left=((-25)-H)+"px";
+N.overlay.element.style.top=K+"px";};E.handleTweenAnimateIn=function(O,N,P){var Q=B.getXY(P.overlay.element),M=Q[0],L=Q[1];if(B.getStyle(P.overlay.element,"visibility")=="hidden"&&M<F){B.setStyle(P.overlay.element,"visibility","visible");}P.overlay.cfg.setProperty("xy",[M,L],true);P.overlay.cfg.refireEvent("iframe");};E.handleCompleteAnimateIn=function(M,L,N){N.overlay.cfg.setProperty("xy",[F,K],true);N.startX=F;N.startY=K;N.overlay.cfg.refireEvent("iframe");N.animateInCompleteEvent.fire();};E.handleStartAnimateOut=function(M,L,P){var N=B.getViewportWidth(),Q=B.getXY(P.overlay.element),O=Q[1];P.animOut.attributes.points.to=[(N+25),O];};E.handleTweenAnimateOut=function(N,M,O){var Q=B.getXY(O.overlay.element),L=Q[0],P=Q[1];O.overlay.cfg.setProperty("xy",[L,P],true);O.overlay.cfg.refireEvent("iframe");};E.handleCompleteAnimateOut=function(M,L,N){B.setStyle(N.overlay.element,"visibility","hidden");N.overlay.cfg.setProperty("xy",[F,K]);N.animateOutCompleteEvent.fire();};E.init()!
 ;return E;};A.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=D.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=D.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=D.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=D.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.!
 subscribe(this.handleTweenAnimateOut,this);this.animOut.onComp!
 lete.sub
scribe(this.handleCompleteAnimateOut,this);},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate();},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate();},handleStartAnimateIn:function(F,E,G){},handleTweenAnimateIn:function(F,E,G){},handleCompleteAnimateIn:function(F,E,G){},handleStartAnimateOut:function(F,E,G){},handleTweenAnimateOut:function(F,E,G){},handleCompleteAnimateOut:function(F,E,G){},toString:function(){var E="ContainerEffect";if(this.overlay){E+=" ["+this.overlay.toString()+"]";}return E;}};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/container/container.js
===================================================================
--- trunk/root/static/yui/container/container.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/container/container.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 (function () {
 
@@ -18,26 +18,20 @@
     * @param {Object} owner The owner Object to which this Config Object belongs
     */
     YAHOO.util.Config = function (owner) {
-    
+
         if (owner) {
-    
             this.init(owner);
-    
         }
-    
-        if (!owner) { 
-        
-    
-        }
-    
+
+
     };
 
 
     var Lang = YAHOO.lang,
-        CustomEvent = YAHOO.util.CustomEvent,        
+        CustomEvent = YAHOO.util.CustomEvent,
         Config = YAHOO.util.Config;
-    
 
+
     /**
      * Constant representing the CustomEvent type for the config changed event.
      * @property YAHOO.util.Config.CONFIG_CHANGED_EVENT
@@ -353,7 +347,7 @@
                         if (queueItem) {
                             queueItemKey = queueItem[0];
                             queueItemValue = queueItem[1];
-                            
+
                             if (queueItemKey == key) {
     
                                 /*
@@ -381,37 +375,37 @@
                 }
         
                 if (property.supercedes) {
-        
+
                     sLen = property.supercedes.length;
-        
+
                     for (s = 0; s < sLen; s++) {
-        
+
                         supercedesCheck = property.supercedes[s];
                         qLen = this.eventQueue.length;
-        
+
                         for (q = 0; q < qLen; q++) {
                             queueItemCheck = this.eventQueue[q];
-        
+
                             if (queueItemCheck) {
                                 queueItemCheckKey = queueItemCheck[0];
                                 queueItemCheckValue = queueItemCheck[1];
-                                
+
                                 if (queueItemCheckKey == 
                                     supercedesCheck.toLowerCase() ) {
-    
+
                                     this.eventQueue.push([queueItemCheckKey, 
                                         queueItemCheckValue]);
-    
+
                                     this.eventQueue[q] = null;
                                     break;
-    
+
                                 }
                             }
                         }
                     }
                 }
 
-        
+
                 return true;
             } else {
                 return false;
@@ -460,37 +454,23 @@
         applyConfig: function (userConfig, init) {
         
             var sKey,
-                oValue,
                 oConfig;
 
             if (init) {
-
                 oConfig = {};
-
                 for (sKey in userConfig) {
-                
                     if (Lang.hasOwnProperty(userConfig, sKey)) {
-
                         oConfig[sKey.toLowerCase()] = userConfig[sKey];
-
                     }
-                
                 }
-
                 this.initialConfig = oConfig;
-
             }
 
             for (sKey in userConfig) {
-            
                 if (Lang.hasOwnProperty(userConfig, sKey)) {
-            
                     this.queueProperty(sKey, userConfig[sKey]);
-                
                 }
-
             }
-
         },
         
         /**
@@ -557,19 +537,12 @@
             var property = this.config[key.toLowerCase()];
     
             if (property && property.event) {
-    
                 if (!Config.alreadySubscribed(property.event, handler, obj)) {
-    
                     property.event.subscribe(handler, obj, override);
-    
                 }
-    
                 return true;
-    
             } else {
-    
                 return false;
-    
             }
     
         },
@@ -689,28 +662,20 @@
             i;
 
         if (nSubscribers > 0) {
-
             i = nSubscribers - 1;
-        
             do {
-
                 subsc = evt.subscribers[i];
-
                 if (subsc && subsc.obj == obj && subsc.fn == fn) {
-        
                     return true;
-        
-                }    
-            
+                }
             }
             while (i--);
-        
         }
-    
+
         return false;
-    
+
     };
-    
+
     YAHOO.lang.augmentProto(Config, YAHOO.util.EventProvider);
 
 }());
@@ -798,13 +763,13 @@
         * @type Object
         */
         DEFAULT_CONFIG = {
-
+        
             "VISIBLE": { 
                 key: "visible", 
                 value: true, 
                 validator: YAHOO.lang.isBoolean 
             },
-
+        
             "EFFECT": { 
                 key: "effect", 
                 suppressEvent: true, 
@@ -1241,7 +1206,7 @@
         */
         init: function (el, userConfig) {
 
-            var elId, i, child;
+            var elId, child;
 
             this.initEvents();
             this.beforeInitEvent.fire(Module);
@@ -1341,20 +1306,19 @@
                     }
 
                     /*
-                        Need to set "src" attribute of the iframe to 
-                        prevent the browser from reporting duplicate 
-                        cookies. (See SourceForge bug #1721755)
-                    */
+                        Need to set the iframe document for Gecko
+                        to fire resize events on the iframe contentWindow.
+                     */
                     if (YAHOO.env.ua.gecko) {
-                        sHTML = "<html><head><script " +
-                                "type=\"text/javascript\">" + 
-                                "window.onresize=function(){window.parent." +
-                                "YAHOO.widget.Module.textResizeEvent." +
-                                "fire();};window.parent.YAHOO.widget.Module." +
-                                "textResizeEvent.fire();</script></head>" + 
-                                "<body></body></html>";
+                         sHTML = ["<html><head><script ",
+                                  "type=\"text/javascript\">",
+                                  "window.onresize=function(){window.parent.",
+                                  "YAHOO.widget.Module.textResizeEvent.",
+                                  "fire();}", 
+                                  "<\/script></head>",
+                                  "<body></body></html>"].join('');
 
-                        oIFrame.src = "data:text/html;charset=utf-8," + 
+                        oIFrame.src = "data:text/html;charset=utf-8," +
                             encodeURIComponent(sHTML);
                     }
 
@@ -1382,6 +1346,10 @@
                     oIFrame.style.borderWidth = "0";
                     oIFrame.style.visibility = "visible";
 
+                    /*
+                       Don't open/close the document for Gecko like we used to, since it
+                       leads to duplicate cookies. (See SourceForge bug #1721755)
+                    */
                     if (YAHOO.env.ua.webkit) {
                         oDoc = oIFrame.contentWindow.document;
                         oDoc.open();
@@ -1393,13 +1361,16 @@
                     Module.textResizeEvent.subscribe(this.onDomResize, this, true);
 
                     if (!Module.textResizeInitialized) {
-                        if (!Event.on(oIFrame.contentWindow, "resize", fireTextResize)) {
-                            /*
-                                 This will fail in IE if document.domain has 
-                                 changed, so we must change the listener to 
-                                 use the oIFrame element instead
-                            */
-                            Event.on(oIFrame, "resize", fireTextResize);
+                         // We already handle gecko using the iframe's document content
+                        if (!YAHOO.env.ua.gecko) {
+                            if (!Event.on(oIFrame.contentWindow, "resize", fireTextResize)) {
+                                /*
+                                     This will fail in IE if document.domain has 
+                                     changed, so we must change the listener to 
+                                     use the oIFrame element instead
+                                */
+                                Event.on(oIFrame, "resize", fireTextResize);
+                            }
                         }
                         Module.textResizeInitialized = true;
                     }
@@ -1421,7 +1392,7 @@
         
             this.resizeMonitor.style.top = nTop + "px";
             this.resizeMonitor.style.left =  nLeft + "px";
-        
+
         },
         
         /**
@@ -1755,7 +1726,7 @@
         },
 
         /**
-         * This method is a private helper, used when constructing the DOM structure for the module 
+         * This method is a protected helper, used when constructing the DOM structure for the module 
          * to account for situations which may cause Operation Aborted errors in IE. It should not 
          * be used for general DOM construction.
          * <p>
@@ -1834,10 +1805,8 @@
         * @type Object
         */
         EVENT_TYPES = {
-        
             "BEFORE_MOVE": "beforeMove",
             "MOVE": "move"
-        
         },
 
         /**
@@ -1848,21 +1817,21 @@
         * @type Object
         */
         DEFAULT_CONFIG = {
-        
+
             "X": { 
                 key: "x", 
                 validator: Lang.isNumber, 
                 suppressEvent: true, 
-                supercedes: ["iframe"] 
+                supercedes: ["iframe"]
             },
-        
+
             "Y": { 
                 key: "y", 
                 validator: Lang.isNumber, 
                 suppressEvent: true, 
-                supercedes: ["iframe"] 
+                supercedes: ["iframe"]
             },
-        
+
             "XY": { 
                 key: "xy", 
                 suppressEvent: true, 
@@ -1903,7 +1872,7 @@
                 key: "constraintoviewport", 
                 value: false, 
                 validator: Lang.isBoolean, 
-                supercedes: ["iframe", "x", "y", "xy"] 
+                supercedes: ["iframe", "x", "y", "xy"]
             }, 
 
             "IFRAME": { 
@@ -1925,7 +1894,7 @@
 
     /**
     * Number representing how much the iframe shim should be offset from each 
-    * side of an Overlay instance.
+    * side of an Overlay instance, in pixels.
     * @property YAHOO.widget.Overlay.IFRAME_SRC
     * @default 3
     * @static
@@ -1933,8 +1902,19 @@
     * @type Number
     */
     Overlay.IFRAME_OFFSET = 3;
-    
+
     /**
+    * Number representing the minimum distance an Overlay instance should be 
+    * positioned relative to the boundaries of the browser's viewport, in pixels.
+    * @property YAHOO.widget.Overlay.VIEWPORT_OFFSET
+    * @default 10
+    * @static
+    * @final
+    * @type Number
+    */
+    Overlay.VIEWPORT_OFFSET = 10;
+
+    /**
     * Constant representing the top left corner of an element, used for 
     * configuring the context element alignment
     * @property YAHOO.widget.Overlay.TOP_LEFT
@@ -1943,7 +1923,7 @@
     * @type String
     */
     Overlay.TOP_LEFT = "tl";
-    
+
     /**
     * Constant representing the top right corner of an element, used for 
     * configuring the context element alignment
@@ -1953,7 +1933,7 @@
     * @type String
     */
     Overlay.TOP_RIGHT = "tr";
-    
+
     /**
     * Constant representing the top bottom left corner of an element, used for 
     * configuring the context element alignment
@@ -1963,7 +1943,7 @@
     * @type String
     */
     Overlay.BOTTOM_LEFT = "bl";
-    
+
     /**
     * Constant representing the bottom right corner of an element, used for 
     * configuring the context element alignment
@@ -1973,7 +1953,7 @@
     * @type String
     */
     Overlay.BOTTOM_RIGHT = "br";
-    
+
     /**
     * Constant representing the default CSS class used for an Overlay
     * @property YAHOO.widget.Overlay.CSS_OVERLAY
@@ -1982,22 +1962,21 @@
     * @type String
     */
     Overlay.CSS_OVERLAY = "yui-overlay";
-    
-    
+
     /**
     * A singleton CustomEvent used for reacting to the DOM event for 
     * window scroll
     * @event YAHOO.widget.Overlay.windowScrollEvent
     */
     Overlay.windowScrollEvent = new CustomEvent("windowScroll");
-    
+
     /**
     * A singleton CustomEvent used for reacting to the DOM event for
     * window resize
     * @event YAHOO.widget.Overlay.windowResizeEvent
     */
     Overlay.windowResizeEvent = new CustomEvent("windowResize");
-    
+
     /**
     * The DOM event handler used to fire the CustomEvent for window scroll
     * @method YAHOO.widget.Overlay.windowScrollHandler
@@ -2005,13 +1984,13 @@
     * @param {DOMEvent} e The DOM scroll event
     */
     Overlay.windowScrollHandler = function (e) {
-    
+
         if (YAHOO.env.ua.ie) {
 
             if (! window.scrollEnd) {
                 window.scrollEnd = -1;
             }
-    
+
             clearTimeout(window.scrollEnd);
     
             window.scrollEnd = setTimeout(function () { 
@@ -2045,7 +2024,7 @@
             Overlay.windowResizeEvent.fire();
         }
     };
-    
+
     /**
     * A boolean that indicated whether the window resize and scroll events have 
     * already been subscribed to.
@@ -2054,7 +2033,7 @@
     * @type Boolean
     */
     Overlay._initialized = null;
-    
+
     if (Overlay._initialized === null) {
         Event.on(window, "scroll", Overlay.windowScrollHandler);
         Event.on(window, "resize", Overlay.windowResizeHandler);
@@ -2063,7 +2042,7 @@
     }
 
     YAHOO.extend(Overlay, Module, {
-    
+
         /**
         * The Overlay initialization method, which is executed for Overlay and  
         * all of its subclasses. This method is automatically called by the 
@@ -2084,7 +2063,7 @@
             */
     
             Overlay.superclass.init.call(this, el/*, userConfig*/);  
-            
+
             this.beforeInitEvent.fire(Overlay);
             
             Dom.addClass(this.element, Overlay.CSS_OVERLAY);
@@ -2219,7 +2198,7 @@
                 supercedes: DEFAULT_CONFIG.CONTEXT.supercedes
             
             });
-    
+
             /**
             * True if the Overlay should be anchored to the center of 
             * the viewport.
@@ -2243,13 +2222,13 @@
             * @default null
             */
             this.cfg.addProperty(DEFAULT_CONFIG.WIDTH.key, {
-            
+
                 handler: this.configWidth, 
                 suppressEvent: DEFAULT_CONFIG.WIDTH.suppressEvent, 
                 supercedes: DEFAULT_CONFIG.WIDTH.supercedes
-            
+
             });
-            
+
             /**
             * CSS height of the Overlay.
             * @config height
@@ -2257,13 +2236,13 @@
             * @default null
             */
             this.cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key, {
-            
+
                 handler: this.configHeight, 
                 suppressEvent: DEFAULT_CONFIG.HEIGHT.suppressEvent, 
                 supercedes: DEFAULT_CONFIG.HEIGHT.supercedes
             
             });
-            
+
             /**
             * CSS z-index of the Overlay.
             * @config zIndex
@@ -2271,10 +2250,10 @@
             * @default null
             */
             this.cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key, {
-    
+
                 handler: this.configzIndex,
                 value: DEFAULT_CONFIG.ZINDEX.value
-    
+
             });
             
             /**
@@ -2285,12 +2264,12 @@
             * @default false
             */
             this.cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key, {
-            
+
                 handler: this.configConstrainToViewport, 
                 value: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value, 
                 validator: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator, 
                 supercedes: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes
-            
+
             });
             
             /**
@@ -2304,7 +2283,7 @@
             * @default true for IE6 and below, false for all other browsers.
             */
             this.cfg.addProperty(DEFAULT_CONFIG.IFRAME.key, {
-            
+
                 handler: this.configIframe, 
                 value: DEFAULT_CONFIG.IFRAME.value, 
                 validator: DEFAULT_CONFIG.IFRAME.validator, 
@@ -2321,9 +2300,7 @@
         * @param {Number} y The Overlay's new y position
         */
         moveTo: function (x, y) {
-    
             this.cfg.setProperty("xy", [x, y]);
-    
         },
 
         /**
@@ -2375,64 +2352,64 @@
                 eff, ei, e, i, j, k, h,
                 nEffects,
                 nEffectInstances;
-    
+
             if (currentVis == "inherit") {
                 e = this.element.parentNode;
-    
+
                 while (e.nodeType != 9 && e.nodeType != 11) {
                     currentVis = Dom.getStyle(e, "visibility");
-    
+
                     if (currentVis != "inherit") { 
                         break; 
                     }
-    
+
                     e = e.parentNode;
                 }
-    
+
                 if (currentVis == "inherit") {
                     currentVis = "visible";
                 }
             }
-    
+
             if (effect) {
                 if (effect instanceof Array) {
                     nEffects = effect.length;
-    
+
                     for (i = 0; i < nEffects; i++) {
                         eff = effect[i];
                         effectInstances[effectInstances.length] = 
                             eff.effect(this, eff.duration);
-    
+
                     }
                 } else {
                     effectInstances[effectInstances.length] = 
                         effect.effect(this, effect.duration);
                 }
             }
-    
-        
+
+
             if (visible) { // Show
                 if (isMacGecko) {
                     this.showMacGeckoScrollbars();
                 }
-    
+
                 if (effect) { // Animate in
                     if (visible) { // Animate in if not showing
                         if (currentVis != "visible" || currentVis === "") {
                             this.beforeShowEvent.fire();
                             nEffectInstances = effectInstances.length;
-    
+
                             for (j = 0; j < nEffectInstances; j++) {
                                 ei = effectInstances[j];
                                 if (j === 0 && !alreadySubscribed(
                                         ei.animateInCompleteEvent, 
                                         this.showEvent.fire, this.showEvent)) {
-    
+
                                     /*
                                          Delegate showEvent until end 
                                          of animateInComplete
                                     */
-    
+
                                     ei.animateInCompleteEvent.subscribe(
                                      this.showEvent.fire, this.showEvent, true);
                                 }
@@ -2443,15 +2420,15 @@
                 } else { // Show
                     if (currentVis != "visible" || currentVis === "") {
                         this.beforeShowEvent.fire();
-    
+
                         Dom.setStyle(this.element, "visibility", "visible");
-    
+
                         this.cfg.refireEvent("iframe");
                         this.showEvent.fire();
                     }
                 }
             } else { // Hide
-    
+
                 if (isMacGecko) {
                     this.hideMacGeckoScrollbars();
                 }
@@ -2479,13 +2456,13 @@
                             }
                             h.animateOut();
                         }
-    
+
                     } else if (currentVis === "") {
                         Dom.setStyle(this.element, "visibility", "hidden");
                     }
-    
+
                 } else { // Simple hide
-    
+
                     if (currentVis == "visible" || currentVis === "") {
                         this.beforeHideEvent.fire();
                         Dom.setStyle(this.element, "visibility", "hidden");
@@ -2517,30 +2494,30 @@
         * this will usually equal the owner.
         */
         configFixedCenter: function (type, args, obj) {
-    
+
             var val = args[0],
                 alreadySubscribed = Config.alreadySubscribed,
                 windowResizeEvent = Overlay.windowResizeEvent,
                 windowScrollEvent = Overlay.windowScrollEvent;
-            
+
             if (val) {
                 this.center();
 
                 if (!alreadySubscribed(this.beforeShowEvent, this.center, this)) {
                     this.beforeShowEvent.subscribe(this.center);
                 }
-            
+
                 if (!alreadySubscribed(windowResizeEvent, this.doCenterOnDOMEvent, this)) {
                     windowResizeEvent.subscribe(this.doCenterOnDOMEvent, this, true);
                 }
-            
+
                 if (!alreadySubscribed(windowScrollEvent, this.doCenterOnDOMEvent, this)) {
                     windowScrollEvent.subscribe(this.doCenterOnDOMEvent, this, true);
                 }
-    
+
             } else {
                 this.beforeShowEvent.unsubscribe(this.center);
-    
+
                 windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent, this);
                 windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent, this);
             }
@@ -2559,11 +2536,11 @@
     
             var height = args[0],
                 el = this.element;
-    
+
             Dom.setStyle(el, "height", height);
             this.cfg.refireEvent("iframe");
         },
-        
+
         /**
         * The default event handler fired when the "width" property is changed.
         * @method configWidth
@@ -2574,7 +2551,7 @@
         * this will usually equal the owner.
         */
         configWidth: function (type, args, obj) {
-    
+
             var width = args[0],
                 el = this.element;
     
@@ -2663,7 +2640,7 @@
             this.cfg.setProperty("y", y, true);
 
             this.beforeMoveEvent.fire([x, y]);
-            
+
             x = this.cfg.getProperty("x");
             y = this.cfg.getProperty("y");
             
@@ -2674,7 +2651,7 @@
             this.cfg.refireEvent("iframe");
             this.moveEvent.fire([x, y]);
         },
-        
+
         /**
         * The default event handler fired when the "y" property is changed.
         * @method configY
@@ -2776,7 +2753,7 @@
          * </p>
          * @method stackIframe
          */
-        stackIframe: function() {
+        stackIframe: function () {
             if (this.iframe) {
                 var overlayZ = Dom.getStyle(this.element, "zIndex");
                 if (!YAHOO.lang.isUndefined(overlayZ) && !isNaN(overlayZ)) {
@@ -2802,8 +2779,7 @@
 
                 var oIFrame = this.iframe,
                     oElement = this.element,
-                    oParent,
-                    aXY;
+                    oParent;
 
                 if (!oIFrame) {
                     if (!m_oIFrameTemplate) {
@@ -2915,23 +2891,38 @@
         * this will usually equal the owner.
         */
         configConstrainToViewport: function (type, args, obj) {
-    
+
+            function constrainBeforeShow() {
+                if (YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))) {
+                    // Set CFG XY based on DOM XY
+                    this.syncPosition();
+                }
+                var x = this.cfg.getProperty("x");
+                var y = this.cfg.getProperty("y");
+
+                // Account for XY being set silently (no moveTo fired/called)
+                var cXY = this.getConstrainedXY(x, y);
+                if (cXY[0] !== x || cXY[1] !== y) {
+                    this.moveTo(cXY[0], cXY[1]);
+                }
+            }
+
             var val = args[0];
-    
+
             if (val) {
-                if (! Config.alreadySubscribed(this.beforeMoveEvent, 
-                    this.enforceConstraints, this)) {
-    
-                    this.beforeMoveEvent.subscribe(this.enforceConstraints, 
-                        this, true);
-    
+                if (! Config.alreadySubscribed(this.beforeMoveEvent, this.enforceConstraints, this)) {
+                    this.beforeMoveEvent.subscribe(this.enforceConstraints, this, true);
                 }
+
+                if (! Config.alreadySubscribed(this.beforeShowEvent, constrainBeforeShow)) {
+                    this.beforeShowEvent.subscribe(constrainBeforeShow);
+                }
             } else {
+                this.beforeShowEvent.unsubscribe(constrainBeforeShow);
                 this.beforeMoveEvent.unsubscribe(this.enforceConstraints, this);
             }
-    
         },
-        
+
         /**
         * The default event handler fired when the "context" property 
         * is changed.
@@ -2958,29 +2949,28 @@
                 if (contextEl) {
     
                     if (typeof contextEl == "string") {
-    
+
                         this.cfg.setProperty("context", 
                             [document.getElementById(contextEl), 
                                 elementMagnetCorner, contextMagnetCorner], 
                                 true);
-    
+
                     }
                     
                     if (elementMagnetCorner && contextMagnetCorner) {
-    
+
                         this.align(elementMagnetCorner, contextMagnetCorner);
-    
+
                     }
-    
+
                 }
-    
+
             }
-    
+
         },
-        
-        
+
         // END BUILT-IN PROPERTY EVENT HANDLERS //
-        
+
         /**
         * Aligns the Overlay to its context element using the specified corner 
         * points (represented by the constants TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, 
@@ -2992,14 +2982,13 @@
         * that the elementAlign corner should stick to.
         */
         align: function (elementAlign, contextAlign) {
-    
+
             var contextArgs = this.cfg.getProperty("context"),
                 me = this,
                 context,
                 element,
                 contextRegion;
-    
-    
+
             function doAlign(v, h) {
     
                 switch (elementAlign) {
@@ -3031,47 +3020,33 @@
                 me = this;
                 
                 if (! elementAlign) {
-    
                     elementAlign = contextArgs[1];
-    
                 }
                 
                 if (! contextAlign) {
-    
                     contextAlign = contextArgs[2];
-    
                 }
                 
                 if (element && context) {
-    
                     contextRegion = Dom.getRegion(context);
-                    
+
                     switch (contextAlign) {
     
                     case Overlay.TOP_LEFT:
-    
                         doAlign(contextRegion.top, contextRegion.left);
-    
                         break;
     
                     case Overlay.TOP_RIGHT:
-    
                         doAlign(contextRegion.top, contextRegion.right);
-    
                         break;
     
                     case Overlay.BOTTOM_LEFT:
-    
                         doAlign(contextRegion.bottom, contextRegion.left);
-    
                         break;
     
                     case Overlay.BOTTOM_RIGHT:
-    
                         doAlign(contextRegion.bottom, contextRegion.right);
-    
                         break;
-    
                     }
     
                 }
@@ -3079,7 +3054,7 @@
             }
             
         },
-        
+
         /**
         * The default event handler executed when the moveEvent is fired, if the 
         * "constraintoviewport" is set to true.
@@ -3091,70 +3066,96 @@
         * this will usually equal the owner.
         */
         enforceConstraints: function (type, args, obj) {
-    
-            var pos = args[0],
-                x = pos[0],
-                y = pos[1],
+            var pos = args[0];
+            var cXY = this.getConstrainedXY(pos[0], pos[1]);
+            this.cfg.setProperty("x", cXY[0], true);
+            this.cfg.setProperty("y", cXY[1], true);
+            this.cfg.setProperty("xy", cXY, true);
+        },
+
+        /**
+         * Given x, y coordinate values, returns the calculated coordinates required to 
+         * position the Overlay if it is to be constrained to the viewport, based on the 
+         * current element size, viewport dimensions and scroll values.
+         *
+         * @param {Number} x The X coordinate value to be constrained
+         * @param {Number} y The Y coordinate value to be constrained
+         * @return {Array} The constrained x and y coordinates at index 0 and 1 respectively;
+         */
+        getConstrainedXY: function(x, y) {
+
+            var nViewportOffset = Overlay.VIEWPORT_OFFSET,
+                viewPortWidth = Dom.getViewportWidth(),
+                viewPortHeight = Dom.getViewportHeight(),
                 offsetHeight = this.element.offsetHeight,
                 offsetWidth = this.element.offsetWidth,
-                viewPortWidth = Dom.getViewportWidth(),
-                viewPortHeight = Dom.getViewportHeight(),
                 scrollX = Dom.getDocumentScrollLeft(),
-                scrollY = Dom.getDocumentScrollTop(),
-                topConstraint = scrollY + 10,
-                leftConstraint = scrollX + 10,
-                bottomConstraint = scrollY + viewPortHeight - offsetHeight - 10,
-                rightConstraint = scrollX + viewPortWidth - offsetWidth - 10;
-        
-    
-            if (x < leftConstraint) {
-    
-                x = leftConstraint;
-    
-            } else if (x > rightConstraint) {
-    
-                x = rightConstraint;
-    
+                scrollY = Dom.getDocumentScrollTop();
+
+            var xNew = x;
+            var yNew = y;
+
+            if (offsetWidth + nViewportOffset < viewPortWidth) {
+
+                var leftConstraint = scrollX + nViewportOffset;
+                var rightConstraint = scrollX + viewPortWidth - offsetWidth - nViewportOffset;
+
+                if (x < leftConstraint) {
+                    xNew = leftConstraint;
+                } else if (x > rightConstraint) {
+                    xNew = rightConstraint;
+                }
+            } else {
+                xNew = nViewportOffset + scrollX;
             }
-            
-            if (y < topConstraint) {
-    
-                y = topConstraint;
-    
-            } else if (y > bottomConstraint) {
-    
-                y = bottomConstraint;
-    
+
+            if (offsetHeight + nViewportOffset < viewPortHeight) {
+
+                var topConstraint = scrollY + nViewportOffset;
+                var bottomConstraint = scrollY + viewPortHeight - offsetHeight - nViewportOffset;
+
+                if (y < topConstraint) {
+                    yNew  = topConstraint;
+                } else if (y  > bottomConstraint) {
+                    yNew  = bottomConstraint;
+                }
+            } else {
+                yNew = nViewportOffset + scrollY;
             }
-            
-            this.cfg.setProperty("x", x, true);
-            this.cfg.setProperty("y", y, true);
-            this.cfg.setProperty("xy", [x, y], true);
-    
+
+            return [xNew, yNew];
         },
-        
+
         /**
         * Centers the container in the viewport.
         * @method center
         */
         center: function () {
-    
-            var scrollX = Dom.getDocumentScrollLeft(),
-                scrollY = Dom.getDocumentScrollTop(),
-    
-                viewPortWidth = Dom.getClientWidth(),
-                viewPortHeight = Dom.getClientHeight(),
+
+            var nViewportOffset = Overlay.VIEWPORT_OFFSET,
                 elementWidth = this.element.offsetWidth,
                 elementHeight = this.element.offsetHeight,
-                x = (viewPortWidth / 2) - (elementWidth / 2) + scrollX,
-                y = (viewPortHeight / 2) - (elementHeight / 2) + scrollY;
-            
+                viewPortWidth = Dom.getViewportWidth(),
+                viewPortHeight = Dom.getViewportHeight(),
+                x,
+                y;
+
+            if (elementWidth < viewPortWidth) {
+                x = (viewPortWidth / 2) - (elementWidth / 2) + Dom.getDocumentScrollLeft();
+            } else {
+                x = nViewportOffset + Dom.getDocumentScrollLeft();
+            }
+
+            if (elementHeight < viewPortHeight) {
+                y = (viewPortHeight / 2) - (elementHeight / 2) + Dom.getDocumentScrollTop();
+            } else {
+                y = nViewportOffset + Dom.getDocumentScrollTop();
+            }
+
             this.cfg.setProperty("xy", [parseInt(x, 10), parseInt(y, 10)]);
-            
             this.cfg.refireEvent("iframe");
-    
         },
-        
+
         /**
         * Synchronizes the Panel's "xy", "x", and "y" properties with the 
         * Panel's position in the DOM. This is primarily used to update  
@@ -3162,15 +3163,15 @@
         * @method syncPosition
         */
         syncPosition: function () {
-    
+
             var pos = Dom.getXY(this.element);
-    
+
             this.cfg.setProperty("x", pos[0], true);
             this.cfg.setProperty("y", pos[1], true);
             this.cfg.setProperty("xy", pos, true);
-    
+
         },
-        
+
         /**
         * Event handler fired when the resize monitor element is resized.
         * @method onDomResize
@@ -3178,11 +3179,11 @@
         * @param {Object} obj The scope object
         */
         onDomResize: function (e, obj) {
-    
+
             var me = this;
-    
+
             Overlay.superclass.onDomResize.call(this, e, obj);
-    
+
             setTimeout(function () {
                 me.syncPosition();
                 me.cfg.refireEvent("iframe");
@@ -3196,83 +3197,71 @@
         * YAHOO.widget.Overlay.
         * @method bringToTop
         */
-        bringToTop: function() {
-    
+        bringToTop: function () {
+
             var aOverlays = [],
                 oElement = this.element;
-    
+
             function compareZIndexDesc(p_oOverlay1, p_oOverlay2) {
-        
+
                 var sZIndex1 = Dom.getStyle(p_oOverlay1, "zIndex"),
-        
                     sZIndex2 = Dom.getStyle(p_oOverlay2, "zIndex"),
-        
-                    nZIndex1 = (!sZIndex1 || isNaN(sZIndex1)) ? 
-                        0 : parseInt(sZIndex1, 10),
-        
-                    nZIndex2 = (!sZIndex2 || isNaN(sZIndex2)) ? 
-                        0 : parseInt(sZIndex2, 10);
-        
+
+                    nZIndex1 = (!sZIndex1 || isNaN(sZIndex1)) ? 0 : parseInt(sZIndex1, 10),
+                    nZIndex2 = (!sZIndex2 || isNaN(sZIndex2)) ? 0 : parseInt(sZIndex2, 10);
+
                 if (nZIndex1 > nZIndex2) {
-        
                     return -1;
-        
                 } else if (nZIndex1 < nZIndex2) {
-        
                     return 1;
-        
                 } else {
-        
                     return 0;
-        
                 }
-        
             }
-        
+
             function isOverlayElement(p_oElement) {
-        
+
                 var oOverlay = Dom.hasClass(p_oElement, Overlay.CSS_OVERLAY),
                     Panel = YAHOO.widget.Panel;
-            
+
                 if (oOverlay && !Dom.isAncestor(oElement, oOverlay)) {
-                
                     if (Panel && Dom.hasClass(p_oElement, Panel.CSS_PANEL)) {
-        
                         aOverlays[aOverlays.length] = p_oElement.parentNode;
-                    
-                    }
-                    else {
-        
+                    } else {
                         aOverlays[aOverlays.length] = p_oElement;
-        
                     }
-                
                 }
-            
             }
-            
+
             Dom.getElementsBy(isOverlayElement, "DIV", document.body);
-    
+
             aOverlays.sort(compareZIndexDesc);
-            
+
             var oTopOverlay = aOverlays[0],
                 nTopZIndex;
-            
+
             if (oTopOverlay) {
-    
                 nTopZIndex = Dom.getStyle(oTopOverlay, "zIndex");
-    
-                if (!isNaN(nTopZIndex) && oTopOverlay != oElement) {
-    
-                    this.cfg.setProperty("zindex", 
-                        (parseInt(nTopZIndex, 10) + 2));
-    
+
+                if (!isNaN(nTopZIndex)) {
+                    var bRequiresBump = false;
+
+                    if (oTopOverlay != oElement) {
+                        bRequiresBump = true;
+                    } else if (aOverlays.length > 1) {
+                        var nNextZIndex = Dom.getStyle(aOverlays[1], "zIndex");
+                        // Don't rely on DOM order to stack if 2 overlays are at the same zindex.
+                        if (!isNaN(nNextZIndex) && (nTopZIndex == nNextZIndex)) {
+                            bRequiresBump = true;
+                        }
+                    }
+                    if (bRequiresBump) {
+                        this.cfg.setProperty("zindex", (parseInt(nTopZIndex, 10) + 2));
+                    }
                 }
-            
             }
-        
         },
-        
+
         /**
         * Removes the Overlay element from the DOM and sets all child 
         * elements to null.
@@ -3281,11 +3270,9 @@
         destroy: function () {
 
             if (this.iframe) {
-    
                 this.iframe.parentNode.removeChild(this.iframe);
-    
             }
-        
+
             this.iframe = null;
         
             Overlay.windowResizeEvent.unsubscribe(
@@ -3512,7 +3499,7 @@
                     i = nOverlays - 1;
 
                     do {
-                        this.overlays[i].blur();                    
+                        this.overlays[i].blur();
                     }
                     while(i--);
                 }
@@ -3673,22 +3660,33 @@
                 aOverlays.sort(this.compareZIndexDesc);
 
                 oTopOverlay = aOverlays[0];
-                
+
                 if (oTopOverlay) {
+                    nTopZIndex = Dom.getStyle(oTopOverlay.element, "zIndex");
 
-                    nTopZIndex = Dom.getStyle(oTopOverlay.element, "zIndex");
-    
-                    if (!isNaN(nTopZIndex) && oTopOverlay != oOverlay) {
-    
-                        oOverlay.cfg.setProperty("zIndex", 
-                            (parseInt(nTopZIndex, 10) + 2));
-    
+                    if (!isNaN(nTopZIndex)) {
+
+                        var bRequiresBump = false;
+
+                        if (oTopOverlay !== oOverlay) {
+                            bRequiresBump = true;
+                        } else if (aOverlays.length > 1) {
+                            var nNextZIndex = Dom.getStyle(aOverlays[1].element, "zIndex");
+                            // Don't rely on DOM order to stack if 2 overlays are at the same zindex.
+                            if (!isNaN(nNextZIndex) && (nTopZIndex == nNextZIndex)) {
+                                bRequiresBump = true;
+                            }
+                        }
+
+                        if (bRequiresBump) {
+                            oOverlay.cfg.setProperty("zindex", (parseInt(nTopZIndex, 10) + 2));
+                        }
                     }
                     aOverlays.sort(this.compareZIndexDesc);
                 }
             }
         },
-        
+
         /**
         * Attempts to locate an Overlay by instance or ID.
         * @method find
@@ -3698,7 +3696,7 @@
         * cannot be located.
         */
         find: function (overlay) {
-        
+
             var aOverlays = this.overlays,
                 nOverlays = aOverlays.length,
                 i;
@@ -3771,7 +3769,7 @@
                 while(i--);
             }
         },
-        
+
         /**
         * Hides all Overlays in the manager.
         * @method hideAll
@@ -3790,7 +3788,7 @@
                 while(i--);
             }
         },
-        
+
         /**
         * Returns a string representation of the object.
         * @method toString
@@ -3940,15 +3938,15 @@
             oBody.appendChild(oClone);
 
             sNewWidth = (oClone.offsetWidth + "px");
-            
+
             oBody.removeChild(oClone);
-            
+
             oClone = null;
 
             oConfig.setProperty("width", sNewWidth);
-            
+
             oConfig.refireEvent("xy");
-            
+
             this.subscribe("hide", restoreOriginalWidth, 
                 [(sOriginalWidth || ""), sNewWidth]);
         
@@ -3956,7 +3954,6 @@
 
     }
 
-
     // "onDOMReady" that renders the ToolTip
 
     function onDOMReady(p_sType, p_aArgs, p_oObject) {
@@ -3990,20 +3987,18 @@
         * See configuration documentation for more details.
         */
         init: function (el, userConfig) {
-    
-    
+
+
             Tooltip.superclass.init.call(this, el);
-    
+
             this.beforeInitEvent.fire(Tooltip);
-    
+
             Dom.addClass(this.element, Tooltip.CSS_TOOLTIP);
-    
+
             if (userConfig) {
-
                 this.cfg.applyConfig(userConfig, true);
+            }
 
-            }
-    
             this.cfg.queueProperty("visible", false);
             this.cfg.queueProperty("constraintoviewport", true);
     
@@ -4080,7 +4075,7 @@
             });
         
             /**
-            * Specifies the Tooltip's text.
+            * Specifies the Tooltip's text. 
             * @config text
             * @type String
             * @default null
@@ -4187,15 +4182,10 @@
         
             
             if (aElements) {
-        
                 nElements = aElements.length;
-                
                 if (nElements > 0) {
-                
                     i = nElements - 1;
-                    
                     do {
-        
                         oElement = aElements[i];
         
                         Event.removeListener(oElement, "mouseover", 
@@ -4206,14 +4196,10 @@
 
                         Event.removeListener(oElement, "mouseout", 
                             this.onContextMouseOut);
-                    
                     }
                     while (i--);
-                
                 }
-        
             }
-        
         },
         
         /**
@@ -4331,14 +4317,14 @@
                 obj.hideProcId = null;
 
             }
-        
+
             Event.on(context, "mousemove", obj.onContextMouseMove, obj);
-        
+
             if (context.title) {
                 obj._tempTitle = context.title;
                 context.title = "";
             }
-        
+
             /**
             * The unique process ID associated with the thread responsible 
             * for showing the Tooltip.
@@ -4392,34 +4378,36 @@
         * with doShow
         */
         doShow: function (e, context) {
-        
+
             var yOffset = 25,
                 me = this;
-        
+
             if (YAHOO.env.ua.opera && context.tagName && 
                 context.tagName.toUpperCase() == "A") {
 
                 yOffset += 12;
 
             }
-        
+
             return setTimeout(function () {
-        
-                if (me._tempTitle) {
+
+                var txt = me.cfg.getProperty("text");
+                // title does not over-ride text
+                if (me._tempTitle && (txt === "" || YAHOO.lang.isUndefined(txt) || YAHOO.lang.isNull(txt))) {
                     me.setBody(me._tempTitle);
                 } else {
                     me.cfg.refireEvent("text");
                 }
-        
+
                 me.moveTo(me.pageX, me.pageY + yOffset);
 
                 if (me.cfg.getProperty("preventoverlap")) {
                     me.preventOverlap(me.pageX, me.pageY);
                 }
-        
+
                 Event.removeListener(context, "mousemove", 
                     me.onContextMouseMove);
-        
+
                 me.show();
                 me.hideProcId = me.doHide();
 
@@ -4678,7 +4666,7 @@
         * @type Object
         */
         DEFAULT_CONFIG = {
-        
+
             "CLOSE": { 
                 key: "close", 
                 value: true, 
@@ -4693,6 +4681,13 @@
                 supercedes: ["visible"]  
             },
 
+            "DRAG_ONLY" : {
+                key: "dragonly",
+                value: false,
+                validator: Lang.isBoolean,
+                supercedes: ["draggable"]
+            },
+
             "UNDERLAY": { 
                 key: "underlay", 
                 value: "shadow", 
@@ -4706,10 +4701,10 @@
                 supercedes: ["visible", "zindex"]
             },
 
-            "KEY_LISTENERS": { 
-                key: "keylisteners", 
-                suppressEvent: true, 
-                supercedes: ["visible"] 
+            "KEY_LISTENERS": {
+                key: "keylisteners",
+                suppressEvent: true,
+                supercedes: ["visible"]
             }
         };
 
@@ -4732,7 +4727,6 @@
     */
     Panel.CSS_PANEL_CONTAINER = "yui-panel-container";
 
-
     // Private CustomEvent listeners
 
     /* 
@@ -4742,7 +4736,7 @@
     */
 
     function createHeader(p_sType, p_aArgs) {
-        if (!this.header) {
+        if (!this.header && this.cfg.getProperty("draggable")) {
             this.setHeader(" ");
         }
     }
@@ -4879,7 +4873,7 @@
     }
 
     YAHOO.extend(Panel, Overlay, {
-    
+
         /**
         * The Overlay initialization method, which is executed for Overlay and 
         * all of its subclasses. This method is automatically called by the 
@@ -4900,28 +4894,21 @@
             */
 
             Panel.superclass.init.call(this, el/*, userConfig*/);  
-        
+
             this.beforeInitEvent.fire(Panel);
-        
+
             Dom.addClass(this.element, Panel.CSS_PANEL);
-        
+
             this.buildWrapper();
-        
+
             if (userConfig) {
                 this.cfg.applyConfig(userConfig, true);
             }
-        
+
             this.subscribe("showMask", addFocusEventHandlers);
             this.subscribe("hideMask", removeFocusEventHandlers);
+            this.subscribe("beforeRender", createHeader);
 
-            // We also set up a beforeRender handler
-            // in configDraggable, but we need to check here, 
-            // since configDraggable won't get called until
-            // after the first render
-            if (this.cfg.getProperty("draggable")) {
-                this.subscribe("beforeRender", createHeader);
-            }
-
             this.initEvent.fire(Panel);
         },
         
@@ -5008,8 +4995,35 @@
                 validator: DEFAULT_CONFIG.DRAGGABLE.validator, 
                 supercedes: DEFAULT_CONFIG.DRAGGABLE.supercedes 
             });
-        
+
             /**
+            * Boolean specifying if the draggable Panel should be drag only, not interacting with drop 
+            * targets on the page.
+            * <p>
+            * When set to true, draggable Panels will not check to see if they are over drop targets,
+            * or fire the DragDrop events required to support drop target interaction (onDragEnter, 
+            * onDragOver, onDragOut, onDragDrop etc.).
+            * If the Panel is not designed to be dropped on any target elements on the page, then this 
+            * flag can be set to true to improve performance.
+            * </p>
+            * <p>
+            * When set to false, all drop target related events will be fired.
+            * </p>
+            * <p>
+            * The property is set to false by default to maintain backwards compatibility but should be 
+            * set to true if drop target interaction is not required for the Panel, to improve performance.</p>
+            * 
+            * @config dragOnly
+            * @type Boolean
+            * @default false
+            */
+            this.cfg.addProperty(DEFAULT_CONFIG.DRAG_ONLY.key, { 
+                value: DEFAULT_CONFIG.DRAG_ONLY.value, 
+                validator: DEFAULT_CONFIG.DRAG_ONLY.validator, 
+                supercedes: DEFAULT_CONFIG.DRAG_ONLY.supercedes 
+            });
+
+            /**
             * Sets the type of underlay to display for the Panel. Valid values 
             * are "shadow," "matte," and "none".  <strong>PLEASE NOTE:</strong> 
             * The creation of the underlay element is deferred until the Panel 
@@ -5129,9 +5143,6 @@
                     this.registerDragDrop();
                 }
 
-                if (!Config.alreadySubscribed(this.beforeRenderEvent, createHeader, null)) {
-                    this.subscribe("beforeRender", createHeader);
-                }
                 this.subscribe("beforeShow", setWidthToOffsetWidth);
 
             } else {
@@ -5144,7 +5155,6 @@
                     Dom.setStyle(this.header,"cursor","auto");
                 }
 
-                this.unsubscribe("beforeRender", createHeader);
                 this.unsubscribe("beforeShow", setWidthToOffsetWidth);
             }
         },
@@ -5166,7 +5176,20 @@
                 sUnderlay = args[0].toLowerCase(),
                 oUnderlay = this.underlay,
                 oElement = this.element;
+                
+            function fixWebkitUnderlay() {
+                // Webkit 419.3 (Safari 2.x) does not update
+                // it's Render Tree for the Container when content changes. 
+                // We need to force it to update using this contentChange 
+                // listener
 
+                // Webkit 523.6 doesn't have this problem and doesn't 
+                // need the fix
+                var u = this.underlay;
+                Dom.addClass(u, "yui-force-redraw");
+                window.setTimeout(function(){Dom.removeClass(u, "yui-force-redraw");}, 0);
+            }
+
             function createUnderlay() {
 
                 var nIE;
@@ -5180,29 +5203,25 @@
 
                     oUnderlay = m_oUnderlayTemplate.cloneNode(false);
                     this.element.appendChild(oUnderlay);
-                    
+
                     this.underlay = oUnderlay;
 
                     nIE = UA.ie;
 
-                    if (nIE == 6 || 
-                        (nIE == 7 && document.compatMode == "BackCompat")) {
-                            
+                    if (nIE == 6 || (nIE == 7 && document.compatMode == "BackCompat")) {
+
                         this.sizeUnderlay();
 
-                        this.cfg.subscribeToConfigEvent("width", 
-                            this.sizeUnderlay);
-
-                        this.cfg.subscribeToConfigEvent("height", 
-                            this.sizeUnderlay);
-
+                        this.cfg.subscribeToConfigEvent("width", this.sizeUnderlay);
+                        this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);
                         this.changeContentEvent.subscribe(this.sizeUnderlay);
 
-                        YAHOO.widget.Module.textResizeEvent.subscribe(
-                            this.sizeUnderlay, this, true);
-                    
+                        YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay, this, true);
                     }
 
+                    if (UA.webkit && UA.webkit < 420) {
+                        this.changeContentEvent.subscribe(fixWebkitUnderlay);
+                    }
                 }
 
             }
@@ -5212,7 +5231,7 @@
                 this._underlayDeferred = false;
                 this.beforeShowEvent.unsubscribe(onBeforeShow);
             }
-            
+
             function destroyUnderlay() {
                 if (this._underlayDeferred) {
                     this.beforeShowEvent.unsubscribe(onBeforeShow);
@@ -5220,18 +5239,12 @@
                 }
 
                 if (oUnderlay) {
-
-                    this.cfg.unsubscribeFromConfigEvent("width", 
-                        this.sizeUnderlay);
-
-                    this.cfg.unsubscribeFromConfigEvent("height", 
-                        this.sizeUnderlay);
-
+                    this.cfg.unsubscribeFromConfigEvent("width", this.sizeUnderlay);
+                    this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);
                     this.changeContentEvent.unsubscribe(this.sizeUnderlay);
+                    this.changeContentEvent.unsubscribe(fixWebkitUnderlay);
+                    YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay, this, true);
 
-                    YAHOO.widget.Module.textResizeEvent.unsubscribe(
-                        this.sizeUnderlay, this, true);
-
                     this.element.removeChild(oUnderlay);
 
                     this.underlay = null;
@@ -5241,38 +5254,34 @@
 
             switch (sUnderlay) {
     
-            case "shadow":
-
-                Dom.removeClass(oElement, "matte");
-                Dom.addClass(oElement, "shadow");
-
-                break;
-
-            case "matte":
-
-                if (!bMacGecko) {
-                    destroyUnderlay.call(this);
-                }
-
-                Dom.removeClass(oElement, "shadow");
-                Dom.addClass(oElement, "matte");
-
-                break;
-            default:
-
-                if (!bMacGecko) {
-
-                    destroyUnderlay.call(this);
-
-                }
-            
-                Dom.removeClass(oElement, "shadow");
-                Dom.removeClass(oElement, "matte");
-
-                break;
+                case "shadow":
+    
+                    Dom.removeClass(oElement, "matte");
+                    Dom.addClass(oElement, "shadow");
+    
+                    break;
+    
+                case "matte":
+    
+                    if (!bMacGecko) {
+                        destroyUnderlay.call(this);
+                    }
+    
+                    Dom.removeClass(oElement, "shadow");
+                    Dom.addClass(oElement, "matte");
+    
+                    break;
+                default:
+    
+                    if (!bMacGecko) {
+                        destroyUnderlay.call(this);
+                    }
+                    Dom.removeClass(oElement, "shadow");
+                    Dom.removeClass(oElement, "matte");
+    
+                    break;
             }
 
-
             if ((sUnderlay == "shadow") || (bMacGecko && !oUnderlay)) {
                 
                 if (this.cfg.getProperty("visible")) {
@@ -5508,26 +5517,26 @@
         * @method buildWrapper
         */
         buildWrapper: function () {
-    
+
             var elementParent = this.element.parentNode,
                 originalElement = this.element,
                 wrapper = document.createElement("div");
-    
+
             wrapper.className = Panel.CSS_PANEL_CONTAINER;
             wrapper.id = originalElement.id + "_c";
-        
+
             if (elementParent) {
                 elementParent.insertBefore(wrapper, originalElement);
             }
-        
+
             wrapper.appendChild(originalElement);
-        
+
             this.element = wrapper;
             this.innerElement = originalElement;
-        
+
             Dom.setStyle(this.innerElement, "visibility", "inherit");
         },
-        
+
         /**
         * Adjusts the size of the shadow based on the size of the element.
         * @method sizeUnderlay
@@ -5554,101 +5563,95 @@
         * @method registerDragDrop
         */
         registerDragDrop: function () {
-    
+
             var me = this;
-    
+
             if (this.header) {
-        
+
                 if (!DD) {
-        
-        
                     return;
-                
                 }
-        
-                this.dd = new DD(this.element.id, this.id);
-        
+
+                var bDragOnly = (this.cfg.getProperty("dragonly") === true);
+                this.dd = new DD(this.element.id, this.id, {dragOnly: bDragOnly});
+
                 if (!this.header.id) {
                     this.header.id = this.id + "_h";
                 }
-        
-    
+
                 this.dd.startDrag = function () {
-        
+
                     var offsetHeight,
                         offsetWidth,
                         viewPortWidth,
                         viewPortHeight,
                         scrollX,
-                        scrollY,
-                        topConstraint,
-                        leftConstraint,
-                        bottomConstraint,
-                        rightConstraint;
-    
+                        scrollY;
+
                     if (YAHOO.env.ua.ie == 6) {
                         Dom.addClass(me.element,"drag");
                     }
-        
+
                     if (me.cfg.getProperty("constraintoviewport")) {
-    
+
+                        var nViewportOffset = Overlay.VIEWPORT_OFFSET;
+
                         offsetHeight = me.element.offsetHeight;
                         offsetWidth = me.element.offsetWidth;
-                        
+
                         viewPortWidth = Dom.getViewportWidth();
                         viewPortHeight = Dom.getViewportHeight();
-                        
+
                         scrollX = Dom.getDocumentScrollLeft();
                         scrollY = Dom.getDocumentScrollTop();
-                        
-                        topConstraint = scrollY + 10;
-                        leftConstraint = scrollX + 10;
 
-                        bottomConstraint = 
-                            scrollY + viewPortHeight - offsetHeight - 10;
+                        if (offsetHeight + nViewportOffset < viewPortHeight) {
+                            this.minY = scrollY + nViewportOffset;
+                            this.maxY = scrollY + viewPortHeight - offsetHeight - nViewportOffset;
+                        } else {
+                            this.minY = scrollY + nViewportOffset;
+                            this.maxY = scrollY + nViewportOffset;
+                        }
 
-                        rightConstraint = 
-                            scrollX + viewPortWidth - offsetWidth - 10;
-        
-                        this.minX = leftConstraint;
-                        this.maxX = rightConstraint;
+                        if (offsetWidth + nViewportOffset < viewPortWidth) {
+                            this.minX = scrollX + nViewportOffset;
+                            this.maxX = scrollX + viewPortWidth - offsetWidth - nViewportOffset;
+                        } else {
+                            this.minX = scrollX + nViewportOffset;
+                            this.maxX = scrollX + nViewportOffset;
+                        }
+
                         this.constrainX = true;
-        
-                        this.minY = topConstraint;
-                        this.maxY = bottomConstraint;
                         this.constrainY = true;
-    
                     } else {
-    
                         this.constrainX = false;
                         this.constrainY = false;
-    
                     }
-        
+
                     me.dragEvent.fire("startDrag", arguments);
                 };
-        
+
                 this.dd.onDrag = function () {
                     me.syncPosition();
                     me.cfg.refireEvent("iframe");
                     if (this.platform == "mac" && YAHOO.env.ua.gecko) {
                         this.showMacGeckoScrollbars();
                     }
-        
+
                     me.dragEvent.fire("onDrag", arguments);
                 };
-        
+
                 this.dd.endDrag = function () {
 
                     if (YAHOO.env.ua.ie == 6) {
                         Dom.removeClass(me.element,"drag");
                     }
-        
+
                     me.dragEvent.fire("endDrag", arguments);
                     me.moveEvent.fire(me.cfg.getProperty("xy"));
-                    
+
                 };
-        
+
                 this.dd.setHandleElId(this.header.id);
                 this.dd.addInvalidHandleType("INPUT");
                 this.dd.addInvalidHandleType("SELECT");
@@ -6818,11 +6821,7 @@
         * this will usually equal the owner.
         */
         configPostMethod: function (type, args, obj) {
-    
-            var postmethod = args[0];
-        
             this.registerForm();
-    
         },
         
         // END BUILT-IN PROPERTY EVENT HANDLERS //
@@ -7500,67 +7499,69 @@
     * @return {YAHOO.widget.ContainerEffect} The configured ContainerEffect object
     */
     ContainerEffect.FADE = function (overlay, dur) {
-    
-        var fade = new ContainerEffect(overlay, 
-        
-            { attributes: { opacity: { from: 0, to: 1 } }, 
-                duration: dur, 
-                method: Easing.easeIn }, 
-            
-            { attributes: { opacity: { to: 0 } },
-                duration: dur, 
-                method: Easing.easeOut }, 
-            
-            overlay.element);
-        
-    
+
+        var fin = {
+            attributes: {opacity:{from:0, to:1}},
+            duration: dur,
+            method: Easing.easeIn
+        };
+
+        var fout = {
+            attributes: {opacity:{to:0}},
+            duration: dur,
+            method: Easing.easeOut
+        };
+
+        var fade = new ContainerEffect(overlay, fin, fout, overlay.element);
+
+        fade.handleUnderlayStart = function() {
+            var underlay = this.overlay.underlay;
+            if (underlay && YAHOO.env.ua.ie) {
+                var hasFilters = (underlay.filters && underlay.filters.length > 0);
+                if(hasFilters) {
+                    Dom.addClass(overlay.element, "yui-effect-fade");
+                }
+            }
+        };
+
+        fade.handleUnderlayComplete = function() {
+            var underlay = this.overlay.underlay;
+            if (underlay && YAHOO.env.ua.ie) {
+                Dom.removeClass(overlay.element, "yui-effect-fade");
+            }
+        };
+
         fade.handleStartAnimateIn = function (type,args,obj) {
             Dom.addClass(obj.overlay.element, "hide-select");
-        
-            if (! obj.overlay.underlay) {
+
+            if (!obj.overlay.underlay) {
                 obj.overlay.cfg.refireEvent("underlay");
             }
-        
-            if (obj.overlay.underlay) {
-    
-                obj.initialUnderlayOpacity = 
-                    Dom.getStyle(obj.overlay.underlay, "opacity");
-    
-                obj.overlay.underlay.style.filter = null;
-    
-            }
-        
+
+            obj.handleUnderlayStart();
+
             Dom.setStyle(obj.overlay.element, "visibility", "visible");
             Dom.setStyle(obj.overlay.element, "opacity", 0);
         };
-        
-    
+
         fade.handleCompleteAnimateIn = function (type,args,obj) {
             Dom.removeClass(obj.overlay.element, "hide-select");
-        
+
             if (obj.overlay.element.style.filter) {
                 obj.overlay.element.style.filter = null;
             }
-        
-            if (obj.overlay.underlay) {
-                Dom.setStyle(obj.overlay.underlay, "opacity", 
-                    obj.initialUnderlayOpacity);
-            }
-        
+
+            obj.handleUnderlayComplete();
+
             obj.overlay.cfg.refireEvent("iframe");
             obj.animateInCompleteEvent.fire();
         };
-        
-    
+
         fade.handleStartAnimateOut = function (type, args, obj) {
             Dom.addClass(obj.overlay.element, "hide-select");
-        
-            if (obj.overlay.underlay) {
-                obj.overlay.underlay.style.filter = null;
-            }
+            obj.handleUnderlayStart();
         };
-        
-    
+
         fade.handleCompleteAnimateOut =  function (type, args, obj) {
             Dom.removeClass(obj.overlay.element, "hide-select");
             if (obj.overlay.element.style.filter) {
@@ -7568,12 +7569,13 @@
             }
             Dom.setStyle(obj.overlay.element, "visibility", "hidden");
             Dom.setStyle(obj.overlay.element, "opacity", 1);
-        
+
+            obj.handleUnderlayComplete();
+
             obj.overlay.cfg.refireEvent("iframe");
-        
             obj.animateOutCompleteEvent.fire();
         };
-        
+
         fade.init();
         return fade;
     };
@@ -7645,11 +7647,9 @@
     
             var vw = Dom.getViewportWidth(),
                 pos = Dom.getXY(obj.overlay.element),
-                yso = pos[1],
-                currentTo = obj.animOut.attributes.points.to;
+                yso = pos[1];
     
             obj.animOut.attributes.points.to = [(vw + 25), yso];
-    
         };
         
         slide.handleTweenAnimateOut = function (type, args, obj) {
@@ -7806,4 +7806,4 @@
 
 })();
 
-YAHOO.register("container", YAHOO.widget.Module, {version: "2.3.1", build: "541"});
+YAHOO.register("container", YAHOO.widget.Module, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/container/container_core-debug.js
===================================================================
--- trunk/root/static/yui/container/container_core-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/container/container_core-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 (function () {
 
@@ -18,27 +18,21 @@
     * @param {Object} owner The owner Object to which this Config Object belongs
     */
     YAHOO.util.Config = function (owner) {
-    
+
         if (owner) {
-    
             this.init(owner);
-    
         }
-    
-        if (!owner) { 
-        
-            YAHOO.log("No owner specified for Config object", "error"); 
-    
-        }
-    
+
+        if (!owner) {  YAHOO.log("No owner specified for Config object", "error", "Config"); }
+
     };
 
 
     var Lang = YAHOO.lang,
-        CustomEvent = YAHOO.util.CustomEvent,        
+        CustomEvent = YAHOO.util.CustomEvent,
         Config = YAHOO.util.Config;
-    
 
+
     /**
      * Constant representing the CustomEvent type for the config changed event.
      * @property YAHOO.util.Config.CONFIG_CHANGED_EVENT
@@ -157,7 +151,7 @@
         * @param {value} Object The value of the correct type for the property
         */ 
         fireEvent: function ( key, value ) {
-            YAHOO.log("Firing Config event: " + key + "=" + value, "info");
+            YAHOO.log("Firing Config event: " + key + "=" + value, "info", "Config");
             var property = this.config[key];
         
             if (property && property.event) {
@@ -174,7 +168,7 @@
         */
         addProperty: function ( key, propertyObject ) {
             key = key.toLowerCase();
-            YAHOO.log("Added property: " + key, "info");
+            YAHOO.log("Added property: " + key, "info", "Config");
         
             this.config[key] = propertyObject;
         
@@ -279,7 +273,7 @@
             var property;
         
             key = key.toLowerCase();
-            YAHOO.log("setProperty: " + key + "=" + value, "info");
+            YAHOO.log("setProperty: " + key + "=" + value, "info", "Config");
         
             if (this.queueInProgress && ! silent) {
                 // Currently running through a queue... 
@@ -318,7 +312,7 @@
         queueProperty: function (key, value) {
         
             key = key.toLowerCase();
-            YAHOO.log("queueProperty: " + key + "=" + value, "info");
+            YAHOO.log("queueProperty: " + key + "=" + value, "info", "Config");
         
             var property = this.config[key],
                 foundDuplicate = false,
@@ -358,7 +352,7 @@
                         if (queueItem) {
                             queueItemKey = queueItem[0];
                             queueItemValue = queueItem[1];
-                            
+
                             if (queueItemKey == key) {
     
                                 /*
@@ -386,38 +380,38 @@
                 }
         
                 if (property.supercedes) {
-        
+
                     sLen = property.supercedes.length;
-        
+
                     for (s = 0; s < sLen; s++) {
-        
+
                         supercedesCheck = property.supercedes[s];
                         qLen = this.eventQueue.length;
-        
+
                         for (q = 0; q < qLen; q++) {
                             queueItemCheck = this.eventQueue[q];
-        
+
                             if (queueItemCheck) {
                                 queueItemCheckKey = queueItemCheck[0];
                                 queueItemCheckValue = queueItemCheck[1];
-                                
+
                                 if (queueItemCheckKey == 
                                     supercedesCheck.toLowerCase() ) {
-    
+
                                     this.eventQueue.push([queueItemCheckKey, 
                                         queueItemCheckValue]);
-    
+
                                     this.eventQueue[q] = null;
                                     break;
-    
+
                                 }
                             }
                         }
                     }
                 }
 
-                YAHOO.log("Config event queue: " + this.outputEventQueue(), "info");
-        
+                YAHOO.log("Config event queue: " + this.outputEventQueue(), "info", "Config");
+
                 return true;
             } else {
                 return false;
@@ -466,37 +460,23 @@
         applyConfig: function (userConfig, init) {
         
             var sKey,
-                oValue,
                 oConfig;
 
             if (init) {
-
                 oConfig = {};
-
                 for (sKey in userConfig) {
-                
                     if (Lang.hasOwnProperty(userConfig, sKey)) {
-
                         oConfig[sKey.toLowerCase()] = userConfig[sKey];
-
                     }
-                
                 }
-
                 this.initialConfig = oConfig;
-
             }
 
             for (sKey in userConfig) {
-            
                 if (Lang.hasOwnProperty(userConfig, sKey)) {
-            
                     this.queueProperty(sKey, userConfig[sKey]);
-                
                 }
-
             }
-
         },
         
         /**
@@ -563,19 +543,12 @@
             var property = this.config[key.toLowerCase()];
     
             if (property && property.event) {
-    
                 if (!Config.alreadySubscribed(property.event, handler, obj)) {
-    
                     property.event.subscribe(handler, obj, override);
-    
                 }
-    
                 return true;
-    
             } else {
-    
                 return false;
-    
             }
     
         },
@@ -695,28 +668,20 @@
             i;
 
         if (nSubscribers > 0) {
-
             i = nSubscribers - 1;
-        
             do {
-
                 subsc = evt.subscribers[i];
-
                 if (subsc && subsc.obj == obj && subsc.fn == fn) {
-        
                     return true;
-        
-                }    
-            
+                }
             }
             while (i--);
-        
         }
-    
+
         return false;
-    
+
     };
-    
+
     YAHOO.lang.augmentProto(Config, YAHOO.util.EventProvider);
 
 }());
@@ -1249,7 +1214,7 @@
         */
         init: function (el, userConfig) {
 
-            var elId, i, child;
+            var elId, child;
 
             this.initEvents();
             this.beforeInitEvent.fire(Module);
@@ -1335,6 +1300,7 @@
                 sHTML;
 
             function fireTextResize() {
+                YAHOO.log("Module got iframe contentWindow resize event", "info");
                 Module.textResizeEvent.fire();
             }
 
@@ -1349,20 +1315,19 @@
                     }
 
                     /*
-                        Need to set "src" attribute of the iframe to 
-                        prevent the browser from reporting duplicate 
-                        cookies. (See SourceForge bug #1721755)
-                    */
+                        Need to set the iframe document for Gecko
+                        to fire resize events on the iframe contentWindow.
+                     */
                     if (YAHOO.env.ua.gecko) {
-                        sHTML = "<html><head><script " +
-                                "type=\"text/javascript\">" + 
-                                "window.onresize=function(){window.parent." +
-                                "YAHOO.widget.Module.textResizeEvent." +
-                                "fire();};window.parent.YAHOO.widget.Module." +
-                                "textResizeEvent.fire();</script></head>" + 
-                                "<body></body></html>";
+                         sHTML = ["<html><head><script ",
+                                  "type=\"text/javascript\">",
+                                  "window.onresize=function(){window.parent.",
+                                  "YAHOO.widget.Module.textResizeEvent.",
+                                  "fire();}", 
+                                  "<\/script></head>",
+                                  "<body></body></html>"].join('');
 
-                        oIFrame.src = "data:text/html;charset=utf-8," + 
+                        oIFrame.src = "data:text/html;charset=utf-8," +
                             encodeURIComponent(sHTML);
                     }
 
@@ -1390,6 +1355,10 @@
                     oIFrame.style.borderWidth = "0";
                     oIFrame.style.visibility = "visible";
 
+                    /*
+                       Don't open/close the document for Gecko like we used to, since it
+                       leads to duplicate cookies. (See SourceForge bug #1721755)
+                    */
                     if (YAHOO.env.ua.webkit) {
                         oDoc = oIFrame.contentWindow.document;
                         oDoc.open();
@@ -1401,13 +1370,16 @@
                     Module.textResizeEvent.subscribe(this.onDomResize, this, true);
 
                     if (!Module.textResizeInitialized) {
-                        if (!Event.on(oIFrame.contentWindow, "resize", fireTextResize)) {
-                            /*
-                                 This will fail in IE if document.domain has 
-                                 changed, so we must change the listener to 
-                                 use the oIFrame element instead
-                            */
-                            Event.on(oIFrame, "resize", fireTextResize);
+                         // We already handle gecko using the iframe's document content
+                        if (!YAHOO.env.ua.gecko) {
+                            if (!Event.on(oIFrame.contentWindow, "resize", fireTextResize)) {
+                                /*
+                                     This will fail in IE if document.domain has 
+                                     changed, so we must change the listener to 
+                                     use the oIFrame element instead
+                                */
+                                Event.on(oIFrame, "resize", fireTextResize);
+                            }
                         }
                         Module.textResizeInitialized = true;
                     }
@@ -1429,7 +1401,7 @@
         
             this.resizeMonitor.style.top = nTop + "px";
             this.resizeMonitor.style.left =  nLeft + "px";
-        
+
         },
         
         /**
@@ -1764,7 +1736,7 @@
         },
 
         /**
-         * This method is a private helper, used when constructing the DOM structure for the module 
+         * This method is a protected helper, used when constructing the DOM structure for the module 
          * to account for situations which may cause Operation Aborted errors in IE. It should not 
          * be used for general DOM construction.
          * <p>
@@ -1843,10 +1815,8 @@
         * @type Object
         */
         EVENT_TYPES = {
-        
             "BEFORE_MOVE": "beforeMove",
             "MOVE": "move"
-        
         },
 
         /**
@@ -1857,21 +1827,21 @@
         * @type Object
         */
         DEFAULT_CONFIG = {
-        
+
             "X": { 
                 key: "x", 
                 validator: Lang.isNumber, 
                 suppressEvent: true, 
-                supercedes: ["iframe"] 
+                supercedes: ["iframe"]
             },
-        
+
             "Y": { 
                 key: "y", 
                 validator: Lang.isNumber, 
                 suppressEvent: true, 
-                supercedes: ["iframe"] 
+                supercedes: ["iframe"]
             },
-        
+
             "XY": { 
                 key: "xy", 
                 suppressEvent: true, 
@@ -1912,7 +1882,7 @@
                 key: "constraintoviewport", 
                 value: false, 
                 validator: Lang.isBoolean, 
-                supercedes: ["iframe", "x", "y", "xy"] 
+                supercedes: ["iframe", "x", "y", "xy"]
             }, 
 
             "IFRAME": { 
@@ -1934,7 +1904,7 @@
 
     /**
     * Number representing how much the iframe shim should be offset from each 
-    * side of an Overlay instance.
+    * side of an Overlay instance, in pixels.
     * @property YAHOO.widget.Overlay.IFRAME_SRC
     * @default 3
     * @static
@@ -1942,8 +1912,19 @@
     * @type Number
     */
     Overlay.IFRAME_OFFSET = 3;
-    
+
     /**
+    * Number representing the minimum distance an Overlay instance should be 
+    * positioned relative to the boundaries of the browser's viewport, in pixels.
+    * @property YAHOO.widget.Overlay.VIEWPORT_OFFSET
+    * @default 10
+    * @static
+    * @final
+    * @type Number
+    */
+    Overlay.VIEWPORT_OFFSET = 10;
+
+    /**
     * Constant representing the top left corner of an element, used for 
     * configuring the context element alignment
     * @property YAHOO.widget.Overlay.TOP_LEFT
@@ -1952,7 +1933,7 @@
     * @type String
     */
     Overlay.TOP_LEFT = "tl";
-    
+
     /**
     * Constant representing the top right corner of an element, used for 
     * configuring the context element alignment
@@ -1962,7 +1943,7 @@
     * @type String
     */
     Overlay.TOP_RIGHT = "tr";
-    
+
     /**
     * Constant representing the top bottom left corner of an element, used for 
     * configuring the context element alignment
@@ -1972,7 +1953,7 @@
     * @type String
     */
     Overlay.BOTTOM_LEFT = "bl";
-    
+
     /**
     * Constant representing the bottom right corner of an element, used for 
     * configuring the context element alignment
@@ -1982,7 +1963,7 @@
     * @type String
     */
     Overlay.BOTTOM_RIGHT = "br";
-    
+
     /**
     * Constant representing the default CSS class used for an Overlay
     * @property YAHOO.widget.Overlay.CSS_OVERLAY
@@ -1991,22 +1972,21 @@
     * @type String
     */
     Overlay.CSS_OVERLAY = "yui-overlay";
-    
-    
+
     /**
     * A singleton CustomEvent used for reacting to the DOM event for 
     * window scroll
     * @event YAHOO.widget.Overlay.windowScrollEvent
     */
     Overlay.windowScrollEvent = new CustomEvent("windowScroll");
-    
+
     /**
     * A singleton CustomEvent used for reacting to the DOM event for
     * window resize
     * @event YAHOO.widget.Overlay.windowResizeEvent
     */
     Overlay.windowResizeEvent = new CustomEvent("windowResize");
-    
+
     /**
     * The DOM event handler used to fire the CustomEvent for window scroll
     * @method YAHOO.widget.Overlay.windowScrollHandler
@@ -2014,13 +1994,13 @@
     * @param {DOMEvent} e The DOM scroll event
     */
     Overlay.windowScrollHandler = function (e) {
-    
+
         if (YAHOO.env.ua.ie) {
 
             if (! window.scrollEnd) {
                 window.scrollEnd = -1;
             }
-    
+
             clearTimeout(window.scrollEnd);
     
             window.scrollEnd = setTimeout(function () { 
@@ -2054,7 +2034,7 @@
             Overlay.windowResizeEvent.fire();
         }
     };
-    
+
     /**
     * A boolean that indicated whether the window resize and scroll events have 
     * already been subscribed to.
@@ -2063,7 +2043,7 @@
     * @type Boolean
     */
     Overlay._initialized = null;
-    
+
     if (Overlay._initialized === null) {
         Event.on(window, "scroll", Overlay.windowScrollHandler);
         Event.on(window, "resize", Overlay.windowResizeHandler);
@@ -2072,7 +2052,7 @@
     }
 
     YAHOO.extend(Overlay, Module, {
-    
+
         /**
         * The Overlay initialization method, which is executed for Overlay and  
         * all of its subclasses. This method is automatically called by the 
@@ -2093,7 +2073,7 @@
             */
     
             Overlay.superclass.init.call(this, el/*, userConfig*/);  
-            
+
             this.beforeInitEvent.fire(Overlay);
             
             Dom.addClass(this.element, Overlay.CSS_OVERLAY);
@@ -2228,7 +2208,7 @@
                 supercedes: DEFAULT_CONFIG.CONTEXT.supercedes
             
             });
-    
+
             /**
             * True if the Overlay should be anchored to the center of 
             * the viewport.
@@ -2252,13 +2232,13 @@
             * @default null
             */
             this.cfg.addProperty(DEFAULT_CONFIG.WIDTH.key, {
-            
+
                 handler: this.configWidth, 
                 suppressEvent: DEFAULT_CONFIG.WIDTH.suppressEvent, 
                 supercedes: DEFAULT_CONFIG.WIDTH.supercedes
-            
+
             });
-            
+
             /**
             * CSS height of the Overlay.
             * @config height
@@ -2266,13 +2246,13 @@
             * @default null
             */
             this.cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key, {
-            
+
                 handler: this.configHeight, 
                 suppressEvent: DEFAULT_CONFIG.HEIGHT.suppressEvent, 
                 supercedes: DEFAULT_CONFIG.HEIGHT.supercedes
             
             });
-            
+
             /**
             * CSS z-index of the Overlay.
             * @config zIndex
@@ -2280,10 +2260,10 @@
             * @default null
             */
             this.cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key, {
-    
+
                 handler: this.configzIndex,
                 value: DEFAULT_CONFIG.ZINDEX.value
-    
+
             });
             
             /**
@@ -2294,12 +2274,12 @@
             * @default false
             */
             this.cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key, {
-            
+
                 handler: this.configConstrainToViewport, 
                 value: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value, 
                 validator: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator, 
                 supercedes: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes
-            
+
             });
             
             /**
@@ -2313,7 +2293,7 @@
             * @default true for IE6 and below, false for all other browsers.
             */
             this.cfg.addProperty(DEFAULT_CONFIG.IFRAME.key, {
-            
+
                 handler: this.configIframe, 
                 value: DEFAULT_CONFIG.IFRAME.value, 
                 validator: DEFAULT_CONFIG.IFRAME.validator, 
@@ -2330,9 +2310,7 @@
         * @param {Number} y The Overlay's new y position
         */
         moveTo: function (x, y) {
-    
             this.cfg.setProperty("xy", [x, y]);
-    
         },
 
         /**
@@ -2384,64 +2362,64 @@
                 eff, ei, e, i, j, k, h,
                 nEffects,
                 nEffectInstances;
-    
+
             if (currentVis == "inherit") {
                 e = this.element.parentNode;
-    
+
                 while (e.nodeType != 9 && e.nodeType != 11) {
                     currentVis = Dom.getStyle(e, "visibility");
-    
+
                     if (currentVis != "inherit") { 
                         break; 
                     }
-    
+
                     e = e.parentNode;
                 }
-    
+
                 if (currentVis == "inherit") {
                     currentVis = "visible";
                 }
             }
-    
+
             if (effect) {
                 if (effect instanceof Array) {
                     nEffects = effect.length;
-    
+
                     for (i = 0; i < nEffects; i++) {
                         eff = effect[i];
                         effectInstances[effectInstances.length] = 
                             eff.effect(this, eff.duration);
-    
+
                     }
                 } else {
                     effectInstances[effectInstances.length] = 
                         effect.effect(this, effect.duration);
                 }
             }
-    
-        
+
+
             if (visible) { // Show
                 if (isMacGecko) {
                     this.showMacGeckoScrollbars();
                 }
-    
+
                 if (effect) { // Animate in
                     if (visible) { // Animate in if not showing
                         if (currentVis != "visible" || currentVis === "") {
                             this.beforeShowEvent.fire();
                             nEffectInstances = effectInstances.length;
-    
+
                             for (j = 0; j < nEffectInstances; j++) {
                                 ei = effectInstances[j];
                                 if (j === 0 && !alreadySubscribed(
                                         ei.animateInCompleteEvent, 
                                         this.showEvent.fire, this.showEvent)) {
-    
+
                                     /*
                                          Delegate showEvent until end 
                                          of animateInComplete
                                     */
-    
+
                                     ei.animateInCompleteEvent.subscribe(
                                      this.showEvent.fire, this.showEvent, true);
                                 }
@@ -2452,15 +2430,15 @@
                 } else { // Show
                     if (currentVis != "visible" || currentVis === "") {
                         this.beforeShowEvent.fire();
-    
+
                         Dom.setStyle(this.element, "visibility", "visible");
-    
+
                         this.cfg.refireEvent("iframe");
                         this.showEvent.fire();
                     }
                 }
             } else { // Hide
-    
+
                 if (isMacGecko) {
                     this.hideMacGeckoScrollbars();
                 }
@@ -2488,13 +2466,13 @@
                             }
                             h.animateOut();
                         }
-    
+
                     } else if (currentVis === "") {
                         Dom.setStyle(this.element, "visibility", "hidden");
                     }
-    
+
                 } else { // Simple hide
-    
+
                     if (currentVis == "visible" || currentVis === "") {
                         this.beforeHideEvent.fire();
                         Dom.setStyle(this.element, "visibility", "hidden");
@@ -2526,30 +2504,30 @@
         * this will usually equal the owner.
         */
         configFixedCenter: function (type, args, obj) {
-    
+
             var val = args[0],
                 alreadySubscribed = Config.alreadySubscribed,
                 windowResizeEvent = Overlay.windowResizeEvent,
                 windowScrollEvent = Overlay.windowScrollEvent;
-            
+
             if (val) {
                 this.center();
 
                 if (!alreadySubscribed(this.beforeShowEvent, this.center, this)) {
                     this.beforeShowEvent.subscribe(this.center);
                 }
-            
+
                 if (!alreadySubscribed(windowResizeEvent, this.doCenterOnDOMEvent, this)) {
                     windowResizeEvent.subscribe(this.doCenterOnDOMEvent, this, true);
                 }
-            
+
                 if (!alreadySubscribed(windowScrollEvent, this.doCenterOnDOMEvent, this)) {
                     windowScrollEvent.subscribe(this.doCenterOnDOMEvent, this, true);
                 }
-    
+
             } else {
                 this.beforeShowEvent.unsubscribe(this.center);
-    
+
                 windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent, this);
                 windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent, this);
             }
@@ -2568,11 +2546,11 @@
     
             var height = args[0],
                 el = this.element;
-    
+
             Dom.setStyle(el, "height", height);
             this.cfg.refireEvent("iframe");
         },
-        
+
         /**
         * The default event handler fired when the "width" property is changed.
         * @method configWidth
@@ -2583,7 +2561,7 @@
         * this will usually equal the owner.
         */
         configWidth: function (type, args, obj) {
-    
+
             var width = args[0],
                 el = this.element;
     
@@ -2673,7 +2651,7 @@
             this.cfg.setProperty("y", y, true);
 
             this.beforeMoveEvent.fire([x, y]);
-            
+
             x = this.cfg.getProperty("x");
             y = this.cfg.getProperty("y");
             
@@ -2684,7 +2662,7 @@
             this.cfg.refireEvent("iframe");
             this.moveEvent.fire([x, y]);
         },
-        
+
         /**
         * The default event handler fired when the "y" property is changed.
         * @method configY
@@ -2786,7 +2764,7 @@
          * </p>
          * @method stackIframe
          */
-        stackIframe: function() {
+        stackIframe: function () {
             if (this.iframe) {
                 var overlayZ = Dom.getStyle(this.element, "zIndex");
                 if (!YAHOO.lang.isUndefined(overlayZ) && !isNaN(overlayZ)) {
@@ -2812,8 +2790,7 @@
 
                 var oIFrame = this.iframe,
                     oElement = this.element,
-                    oParent,
-                    aXY;
+                    oParent;
 
                 if (!oIFrame) {
                     if (!m_oIFrameTemplate) {
@@ -2925,23 +2902,38 @@
         * this will usually equal the owner.
         */
         configConstrainToViewport: function (type, args, obj) {
-    
+
+            function constrainBeforeShow() {
+                if (YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))) {
+                    // Set CFG XY based on DOM XY
+                    this.syncPosition();
+                }
+                var x = this.cfg.getProperty("x");
+                var y = this.cfg.getProperty("y");
+
+                // Account for XY being set silently (no moveTo fired/called)
+                var cXY = this.getConstrainedXY(x, y);
+                if (cXY[0] !== x || cXY[1] !== y) {
+                    this.moveTo(cXY[0], cXY[1]);
+                }
+            }
+
             var val = args[0];
-    
+
             if (val) {
-                if (! Config.alreadySubscribed(this.beforeMoveEvent, 
-                    this.enforceConstraints, this)) {
-    
-                    this.beforeMoveEvent.subscribe(this.enforceConstraints, 
-                        this, true);
-    
+                if (! Config.alreadySubscribed(this.beforeMoveEvent, this.enforceConstraints, this)) {
+                    this.beforeMoveEvent.subscribe(this.enforceConstraints, this, true);
                 }
+
+                if (! Config.alreadySubscribed(this.beforeShowEvent, constrainBeforeShow)) {
+                    this.beforeShowEvent.subscribe(constrainBeforeShow);
+                }
             } else {
+                this.beforeShowEvent.unsubscribe(constrainBeforeShow);
                 this.beforeMoveEvent.unsubscribe(this.enforceConstraints, this);
             }
-    
         },
-        
+
         /**
         * The default event handler fired when the "context" property 
         * is changed.
@@ -2968,29 +2960,28 @@
                 if (contextEl) {
     
                     if (typeof contextEl == "string") {
-    
+
                         this.cfg.setProperty("context", 
                             [document.getElementById(contextEl), 
                                 elementMagnetCorner, contextMagnetCorner], 
                                 true);
-    
+
                     }
                     
                     if (elementMagnetCorner && contextMagnetCorner) {
-    
+
                         this.align(elementMagnetCorner, contextMagnetCorner);
-    
+
                     }
-    
+
                 }
-    
+
             }
-    
+
         },
-        
-        
+
         // END BUILT-IN PROPERTY EVENT HANDLERS //
-        
+
         /**
         * Aligns the Overlay to its context element using the specified corner 
         * points (represented by the constants TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, 
@@ -3002,14 +2993,13 @@
         * that the elementAlign corner should stick to.
         */
         align: function (elementAlign, contextAlign) {
-    
+
             var contextArgs = this.cfg.getProperty("context"),
                 me = this,
                 context,
                 element,
                 contextRegion;
-    
-    
+
             function doAlign(v, h) {
     
                 switch (elementAlign) {
@@ -3041,47 +3031,33 @@
                 me = this;
                 
                 if (! elementAlign) {
-    
                     elementAlign = contextArgs[1];
-    
                 }
                 
                 if (! contextAlign) {
-    
                     contextAlign = contextArgs[2];
-    
                 }
                 
                 if (element && context) {
-    
                     contextRegion = Dom.getRegion(context);
-                    
+
                     switch (contextAlign) {
     
                     case Overlay.TOP_LEFT:
-    
                         doAlign(contextRegion.top, contextRegion.left);
-    
                         break;
     
                     case Overlay.TOP_RIGHT:
-    
                         doAlign(contextRegion.top, contextRegion.right);
-    
                         break;
     
                     case Overlay.BOTTOM_LEFT:
-    
                         doAlign(contextRegion.bottom, contextRegion.left);
-    
                         break;
     
                     case Overlay.BOTTOM_RIGHT:
-    
                         doAlign(contextRegion.bottom, contextRegion.right);
-    
                         break;
-    
                     }
     
                 }
@@ -3089,7 +3065,7 @@
             }
             
         },
-        
+
         /**
         * The default event handler executed when the moveEvent is fired, if the 
         * "constraintoviewport" is set to true.
@@ -3101,70 +3077,96 @@
         * this will usually equal the owner.
         */
         enforceConstraints: function (type, args, obj) {
-    
-            var pos = args[0],
-                x = pos[0],
-                y = pos[1],
+            var pos = args[0];
+            var cXY = this.getConstrainedXY(pos[0], pos[1]);
+            this.cfg.setProperty("x", cXY[0], true);
+            this.cfg.setProperty("y", cXY[1], true);
+            this.cfg.setProperty("xy", cXY, true);
+        },
+
+        /**
+         * Given x, y coordinate values, returns the calculated coordinates required to 
+         * position the Overlay if it is to be constrained to the viewport, based on the 
+         * current element size, viewport dimensions and scroll values.
+         *
+         * @param {Number} x The X coordinate value to be constrained
+         * @param {Number} y The Y coordinate value to be constrained
+         * @return {Array} The constrained x and y coordinates at index 0 and 1 respectively;
+         */
+        getConstrainedXY: function(x, y) {
+
+            var nViewportOffset = Overlay.VIEWPORT_OFFSET,
+                viewPortWidth = Dom.getViewportWidth(),
+                viewPortHeight = Dom.getViewportHeight(),
                 offsetHeight = this.element.offsetHeight,
                 offsetWidth = this.element.offsetWidth,
-                viewPortWidth = Dom.getViewportWidth(),
-                viewPortHeight = Dom.getViewportHeight(),
                 scrollX = Dom.getDocumentScrollLeft(),
-                scrollY = Dom.getDocumentScrollTop(),
-                topConstraint = scrollY + 10,
-                leftConstraint = scrollX + 10,
-                bottomConstraint = scrollY + viewPortHeight - offsetHeight - 10,
-                rightConstraint = scrollX + viewPortWidth - offsetWidth - 10;
-        
-    
-            if (x < leftConstraint) {
-    
-                x = leftConstraint;
-    
-            } else if (x > rightConstraint) {
-    
-                x = rightConstraint;
-    
+                scrollY = Dom.getDocumentScrollTop();
+
+            var xNew = x;
+            var yNew = y;
+
+            if (offsetWidth + nViewportOffset < viewPortWidth) {
+
+                var leftConstraint = scrollX + nViewportOffset;
+                var rightConstraint = scrollX + viewPortWidth - offsetWidth - nViewportOffset;
+
+                if (x < leftConstraint) {
+                    xNew = leftConstraint;
+                } else if (x > rightConstraint) {
+                    xNew = rightConstraint;
+                }
+            } else {
+                xNew = nViewportOffset + scrollX;
             }
-            
-            if (y < topConstraint) {
-    
-                y = topConstraint;
-    
-            } else if (y > bottomConstraint) {
-    
-                y = bottomConstraint;
-    
+
+            if (offsetHeight + nViewportOffset < viewPortHeight) {
+
+                var topConstraint = scrollY + nViewportOffset;
+                var bottomConstraint = scrollY + viewPortHeight - offsetHeight - nViewportOffset;
+
+                if (y < topConstraint) {
+                    yNew  = topConstraint;
+                } else if (y  > bottomConstraint) {
+                    yNew  = bottomConstraint;
+                }
+            } else {
+                yNew = nViewportOffset + scrollY;
             }
-            
-            this.cfg.setProperty("x", x, true);
-            this.cfg.setProperty("y", y, true);
-            this.cfg.setProperty("xy", [x, y], true);
-    
+
+            return [xNew, yNew];
         },
-        
+
         /**
         * Centers the container in the viewport.
         * @method center
         */
         center: function () {
-    
-            var scrollX = Dom.getDocumentScrollLeft(),
-                scrollY = Dom.getDocumentScrollTop(),
-    
-                viewPortWidth = Dom.getClientWidth(),
-                viewPortHeight = Dom.getClientHeight(),
+
+            var nViewportOffset = Overlay.VIEWPORT_OFFSET,
                 elementWidth = this.element.offsetWidth,
                 elementHeight = this.element.offsetHeight,
-                x = (viewPortWidth / 2) - (elementWidth / 2) + scrollX,
-                y = (viewPortHeight / 2) - (elementHeight / 2) + scrollY;
-            
+                viewPortWidth = Dom.getViewportWidth(),
+                viewPortHeight = Dom.getViewportHeight(),
+                x,
+                y;
+
+            if (elementWidth < viewPortWidth) {
+                x = (viewPortWidth / 2) - (elementWidth / 2) + Dom.getDocumentScrollLeft();
+            } else {
+                x = nViewportOffset + Dom.getDocumentScrollLeft();
+            }
+
+            if (elementHeight < viewPortHeight) {
+                y = (viewPortHeight / 2) - (elementHeight / 2) + Dom.getDocumentScrollTop();
+            } else {
+                y = nViewportOffset + Dom.getDocumentScrollTop();
+            }
+
             this.cfg.setProperty("xy", [parseInt(x, 10), parseInt(y, 10)]);
-            
             this.cfg.refireEvent("iframe");
-    
         },
-        
+
         /**
         * Synchronizes the Panel's "xy", "x", and "y" properties with the 
         * Panel's position in the DOM. This is primarily used to update  
@@ -3172,15 +3174,15 @@
         * @method syncPosition
         */
         syncPosition: function () {
-    
+
             var pos = Dom.getXY(this.element);
-    
+
             this.cfg.setProperty("x", pos[0], true);
             this.cfg.setProperty("y", pos[1], true);
             this.cfg.setProperty("xy", pos, true);
-    
+
         },
-        
+
         /**
         * Event handler fired when the resize monitor element is resized.
         * @method onDomResize
@@ -3188,11 +3190,11 @@
         * @param {Object} obj The scope object
         */
         onDomResize: function (e, obj) {
-    
+
             var me = this;
-    
+
             Overlay.superclass.onDomResize.call(this, e, obj);
-    
+
             setTimeout(function () {
                 me.syncPosition();
                 me.cfg.refireEvent("iframe");
@@ -3206,83 +3208,71 @@
         * YAHOO.widget.Overlay.
         * @method bringToTop
         */
-        bringToTop: function() {
-    
+        bringToTop: function () {
+
             var aOverlays = [],
                 oElement = this.element;
-    
+
             function compareZIndexDesc(p_oOverlay1, p_oOverlay2) {
-        
+
                 var sZIndex1 = Dom.getStyle(p_oOverlay1, "zIndex"),
-        
                     sZIndex2 = Dom.getStyle(p_oOverlay2, "zIndex"),
-        
-                    nZIndex1 = (!sZIndex1 || isNaN(sZIndex1)) ? 
-                        0 : parseInt(sZIndex1, 10),
-        
-                    nZIndex2 = (!sZIndex2 || isNaN(sZIndex2)) ? 
-                        0 : parseInt(sZIndex2, 10);
-        
+
+                    nZIndex1 = (!sZIndex1 || isNaN(sZIndex1)) ? 0 : parseInt(sZIndex1, 10),
+                    nZIndex2 = (!sZIndex2 || isNaN(sZIndex2)) ? 0 : parseInt(sZIndex2, 10);
+
                 if (nZIndex1 > nZIndex2) {
-        
                     return -1;
-        
                 } else if (nZIndex1 < nZIndex2) {
-        
                     return 1;
-        
                 } else {
-        
                     return 0;
-        
                 }
-        
             }
-        
+
             function isOverlayElement(p_oElement) {
-        
+
                 var oOverlay = Dom.hasClass(p_oElement, Overlay.CSS_OVERLAY),
                     Panel = YAHOO.widget.Panel;
-            
+
                 if (oOverlay && !Dom.isAncestor(oElement, oOverlay)) {
-                
                     if (Panel && Dom.hasClass(p_oElement, Panel.CSS_PANEL)) {
-        
                         aOverlays[aOverlays.length] = p_oElement.parentNode;
-                    
-                    }
-                    else {
-        
+                    } else {
                         aOverlays[aOverlays.length] = p_oElement;
-        
                     }
-                
                 }
-            
             }
-            
+
             Dom.getElementsBy(isOverlayElement, "DIV", document.body);
-    
+
             aOverlays.sort(compareZIndexDesc);
-            
+
             var oTopOverlay = aOverlays[0],
                 nTopZIndex;
-            
+
             if (oTopOverlay) {
-    
                 nTopZIndex = Dom.getStyle(oTopOverlay, "zIndex");
-    
-                if (!isNaN(nTopZIndex) && oTopOverlay != oElement) {
-    
-                    this.cfg.setProperty("zindex", 
-                        (parseInt(nTopZIndex, 10) + 2));
-    
+
+                if (!isNaN(nTopZIndex)) {
+                    var bRequiresBump = false;
+
+                    if (oTopOverlay != oElement) {
+                        bRequiresBump = true;
+                    } else if (aOverlays.length > 1) {
+                        var nNextZIndex = Dom.getStyle(aOverlays[1], "zIndex");
+                        // Don't rely on DOM order to stack if 2 overlays are at the same zindex.
+                        if (!isNaN(nNextZIndex) && (nTopZIndex == nNextZIndex)) {
+                            bRequiresBump = true;
+                        }
+                    }
+                    if (bRequiresBump) {
+                        this.cfg.setProperty("zindex", (parseInt(nTopZIndex, 10) + 2));
+                    }
                 }
-            
             }
-        
         },
-        
+
         /**
         * Removes the Overlay element from the DOM and sets all child 
         * elements to null.
@@ -3291,11 +3281,9 @@
         destroy: function () {
 
             if (this.iframe) {
-    
                 this.iframe.parentNode.removeChild(this.iframe);
-    
             }
-        
+
             this.iframe = null;
         
             Overlay.windowResizeEvent.unsubscribe(
@@ -3522,7 +3510,7 @@
                     i = nOverlays - 1;
 
                     do {
-                        this.overlays[i].blur();                    
+                        this.overlays[i].blur();
                     }
                     while(i--);
                 }
@@ -3683,22 +3671,33 @@
                 aOverlays.sort(this.compareZIndexDesc);
 
                 oTopOverlay = aOverlays[0];
-                
+
                 if (oTopOverlay) {
+                    nTopZIndex = Dom.getStyle(oTopOverlay.element, "zIndex");
 
-                    nTopZIndex = Dom.getStyle(oTopOverlay.element, "zIndex");
-    
-                    if (!isNaN(nTopZIndex) && oTopOverlay != oOverlay) {
-    
-                        oOverlay.cfg.setProperty("zIndex", 
-                            (parseInt(nTopZIndex, 10) + 2));
-    
+                    if (!isNaN(nTopZIndex)) {
+
+                        var bRequiresBump = false;
+
+                        if (oTopOverlay !== oOverlay) {
+                            bRequiresBump = true;
+                        } else if (aOverlays.length > 1) {
+                            var nNextZIndex = Dom.getStyle(aOverlays[1].element, "zIndex");
+                            // Don't rely on DOM order to stack if 2 overlays are at the same zindex.
+                            if (!isNaN(nNextZIndex) && (nTopZIndex == nNextZIndex)) {
+                                bRequiresBump = true;
+                            }
+                        }
+
+                        if (bRequiresBump) {
+                            oOverlay.cfg.setProperty("zindex", (parseInt(nTopZIndex, 10) + 2));
+                        }
                     }
                     aOverlays.sort(this.compareZIndexDesc);
                 }
             }
         },
-        
+
         /**
         * Attempts to locate an Overlay by instance or ID.
         * @method find
@@ -3708,7 +3707,7 @@
         * cannot be located.
         */
         find: function (overlay) {
-        
+
             var aOverlays = this.overlays,
                 nOverlays = aOverlays.length,
                 i;
@@ -3781,7 +3780,7 @@
                 while(i--);
             }
         },
-        
+
         /**
         * Hides all Overlays in the manager.
         * @method hideAll
@@ -3800,7 +3799,7 @@
                 while(i--);
             }
         },
-        
+
         /**
         * Returns a string representation of the object.
         * @method toString
@@ -3898,67 +3897,69 @@
     * @return {YAHOO.widget.ContainerEffect} The configured ContainerEffect object
     */
     ContainerEffect.FADE = function (overlay, dur) {
-    
-        var fade = new ContainerEffect(overlay, 
-        
-            { attributes: { opacity: { from: 0, to: 1 } }, 
-                duration: dur, 
-                method: Easing.easeIn }, 
-            
-            { attributes: { opacity: { to: 0 } },
-                duration: dur, 
-                method: Easing.easeOut }, 
-            
-            overlay.element);
-        
-    
+
+        var fin = {
+            attributes: {opacity:{from:0, to:1}},
+            duration: dur,
+            method: Easing.easeIn
+        };
+
+        var fout = {
+            attributes: {opacity:{to:0}},
+            duration: dur,
+            method: Easing.easeOut
+        };
+
+        var fade = new ContainerEffect(overlay, fin, fout, overlay.element);
+
+        fade.handleUnderlayStart = function() {
+            var underlay = this.overlay.underlay;
+            if (underlay && YAHOO.env.ua.ie) {
+                var hasFilters = (underlay.filters && underlay.filters.length > 0);
+                if(hasFilters) {
+                    Dom.addClass(overlay.element, "yui-effect-fade");
+                }
+            }
+        };
+
+        fade.handleUnderlayComplete = function() {
+            var underlay = this.overlay.underlay;
+            if (underlay && YAHOO.env.ua.ie) {
+                Dom.removeClass(overlay.element, "yui-effect-fade");
+            }
+        };
+
         fade.handleStartAnimateIn = function (type,args,obj) {
             Dom.addClass(obj.overlay.element, "hide-select");
-        
-            if (! obj.overlay.underlay) {
+
+            if (!obj.overlay.underlay) {
                 obj.overlay.cfg.refireEvent("underlay");
             }
-        
-            if (obj.overlay.underlay) {
-    
-                obj.initialUnderlayOpacity = 
-                    Dom.getStyle(obj.overlay.underlay, "opacity");
-    
-                obj.overlay.underlay.style.filter = null;
-    
-            }
-        
+
+            obj.handleUnderlayStart();
+
             Dom.setStyle(obj.overlay.element, "visibility", "visible");
             Dom.setStyle(obj.overlay.element, "opacity", 0);
         };
-        
-    
+
         fade.handleCompleteAnimateIn = function (type,args,obj) {
             Dom.removeClass(obj.overlay.element, "hide-select");
-        
+
             if (obj.overlay.element.style.filter) {
                 obj.overlay.element.style.filter = null;
             }
-        
-            if (obj.overlay.underlay) {
-                Dom.setStyle(obj.overlay.underlay, "opacity", 
-                    obj.initialUnderlayOpacity);
-            }
-        
+
+            obj.handleUnderlayComplete();
+
             obj.overlay.cfg.refireEvent("iframe");
             obj.animateInCompleteEvent.fire();
         };
-        
-    
+
         fade.handleStartAnimateOut = function (type, args, obj) {
             Dom.addClass(obj.overlay.element, "hide-select");
-        
-            if (obj.overlay.underlay) {
-                obj.overlay.underlay.style.filter = null;
-            }
+            obj.handleUnderlayStart();
         };
-        
-    
+
         fade.handleCompleteAnimateOut =  function (type, args, obj) {
             Dom.removeClass(obj.overlay.element, "hide-select");
             if (obj.overlay.element.style.filter) {
@@ -3966,12 +3967,13 @@
             }
             Dom.setStyle(obj.overlay.element, "visibility", "hidden");
             Dom.setStyle(obj.overlay.element, "opacity", 1);
-        
+
+            obj.handleUnderlayComplete();
+
             obj.overlay.cfg.refireEvent("iframe");
-        
             obj.animateOutCompleteEvent.fire();
         };
-        
+
         fade.init();
         return fade;
     };
@@ -4043,11 +4045,9 @@
     
             var vw = Dom.getViewportWidth(),
                 pos = Dom.getXY(obj.overlay.element),
-                yso = pos[1],
-                currentTo = obj.animOut.attributes.points.to;
+                yso = pos[1];
     
             obj.animOut.attributes.points.to = [(vw + 25), yso];
-    
         };
         
         slide.handleTweenAnimateOut = function (type, args, obj) {
@@ -4204,4 +4204,4 @@
 
 })();
 
-YAHOO.register("container_core", YAHOO.widget.Module, {version: "2.3.1", build: "541"});
+YAHOO.register("containercore", YAHOO.widget.Module, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/container/container_core-min.js
===================================================================
--- trunk/root/static/yui/container/container_core-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/container/container_core-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,11 +2,11 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-(function(){YAHOO.util.Config=function(D){if(D){this.init(D);}if(!D){}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE);},checkNumber:function(D){return(!isNaN(D));},fireEvent:function(D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F);}},addProperty:function(E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handler,this.owner);}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queueProperty(!
 E,D.value);}},getConfig:function(){var D={},F,E;for(F in this.config){E=this.config[F];if(E&&E.event){D[F]=E.value;}}return D;},getProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E.value;}else{return undefined;}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true;}}else{return false;}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E,G);return true;}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validator(G)){return false;}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChangedEvent.fire([E,G]);}return true;}}else{return false;}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false;}else{if(!B.isUndefined(P!
 )){R.value=P;}else{P=R.value;}K=false;J=this.eventQueue.length!
 ;for(L=0
;L<J;L++){G=this.eventQueue[L];if(G){H=G[0];I=G[1];if(H==S){this.eventQueue[L]=null;this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]);K=true;break;}}}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P]);}}if(R.supercedes){O=R.supercedes.length;for(T=0;T<O;T++){Q=R.supercedes[T];F=this.eventQueue.length;for(E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M[0];D=M[1];if(N==Q.toLowerCase()){this.eventQueue.push([N,D]);this.eventQueue[E]=null;break;}}}}}return true;}else{return false;}},refireEvent:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queueProperty(D);}else{this.fireEvent(D,E.value);}}},applyConfig:function(E,H){var G,D,F;if(H){F={};for(G in E){if(B.hasOwnProperty(E,G)){F[G.toLowerCase()]=E[G];}}this.initialConfig=F;}for(G in E){if(B.hasOwnProperty(E,G)){this.queueProperty(G,E[G]);}}},refresh:function(){var D;for(D in this.config){this.refireEvent(D);}},fireQueue:function(){var E,H,D,G,F;this.queueInP!
 rogress=true;for(E=0;E<this.eventQueue.length;E++){H=this.eventQueue[E];if(H){D=H[0];G=H[1];F=this.config[D];F.value=G;this.fireEvent(D,G);}}this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()];if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D);}return true;}else{return false;}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F&&F.event){return F.event.unsubscribe(E,G);}else{return false;}},toString:function(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]";}return D;},outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length;for(E=0;E<F;E++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G[1]+", ";}}return D;},destroy:function(){var E=this.config,D,F;for(D in E){if(B.hasOwnProperty(E,D)){F=E[D];F.event.unsubscribeAll();F.event=null;}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.confi!
 g=null;this.initialConfig=null;this.eventQueue=null;}};A.alrea!
 dySubscr
ibed=function(E,H,I){var F=E.subscribers.length,D,G;if(F>0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true;}}while(G--);}return false;};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Module=function(Q,P){if(Q){this.init(Q,P);}else{}};var F=YAHOO.util.Dom,D=YAHOO.util.Config,M=YAHOO.util.Event,L=YAHOO.util.CustomEvent,G=YAHOO.widget.Module,H,O,N,E,A={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},I={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:fals!
 e}};G.IMG_ROOT=null;G.IMG_ROOT_SSL=null;G.CSS_MODULE="yui-module";G.CSS_HEADER="hd";G.CSS_BODY="bd";G.CSS_FOOTER="ft";G.RESIZE_MONITOR_SECURE_URL="javascript:false;";G.textResizeEvent=new L("textResize");function K(){if(!H){H=document.createElement("div");H.innerHTML=("<div class=\""+G.CSS_HEADER+"\"></div><div class=\""+G.CSS_BODY+"\"></div><div class=\""+G.CSS_FOOTER+"\"></div>");O=H.firstChild;N=O.nextSibling;E=N.nextSibling;}return H;}function J(){if(!O){K();}return(O.cloneNode(false));}function B(){if(!N){K();}return(N.cloneNode(false));}function C(){if(!E){K();}return(E.cloneNode(false));}G.prototype={constructor:G,element:null,header:null,body:null,footer:null,id:null,imageRoot:G.IMG_ROOT,initEvents:function(){var P=L.LIST;this.beforeInitEvent=this.createEvent(A.BEFORE_INIT);this.beforeInitEvent.signature=P;this.initEvent=this.createEvent(A.INIT);this.initEvent.signature=P;this.appendEvent=this.createEvent(A.APPEND);
-this.appendEvent.signature=P;this.beforeRenderEvent=this.createEvent(A.BEFORE_RENDER);this.beforeRenderEvent.signature=P;this.renderEvent=this.createEvent(A.RENDER);this.renderEvent.signature=P;this.changeHeaderEvent=this.createEvent(A.CHANGE_HEADER);this.changeHeaderEvent.signature=P;this.changeBodyEvent=this.createEvent(A.CHANGE_BODY);this.changeBodyEvent.signature=P;this.changeFooterEvent=this.createEvent(A.CHANGE_FOOTER);this.changeFooterEvent.signature=P;this.changeContentEvent=this.createEvent(A.CHANGE_CONTENT);this.changeContentEvent.signature=P;this.destroyEvent=this.createEvent(A.DESTORY);this.destroyEvent.signature=P;this.beforeShowEvent=this.createEvent(A.BEFORE_SHOW);this.beforeShowEvent.signature=P;this.showEvent=this.createEvent(A.SHOW);this.showEvent.signature=P;this.beforeHideEvent=this.createEvent(A.BEFORE_HIDE);this.beforeHideEvent.signature=P;this.hideEvent=this.createEvent(A.HIDE);this.hideEvent.signature=P;},platform:function(){var P=navigator.userAgent!
 .toLowerCase();if(P.indexOf("windows")!=-1||P.indexOf("win32")!=-1){return"windows";}else{if(P.indexOf("macintosh")!=-1){return"mac";}else{return false;}}}(),browser:function(){var P=navigator.userAgent.toLowerCase();if(P.indexOf("opera")!=-1){return"opera";}else{if(P.indexOf("msie 7")!=-1){return"ie7";}else{if(P.indexOf("msie")!=-1){return"ie";}else{if(P.indexOf("safari")!=-1){return"safari";}else{if(P.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty(I.VISIBLE.key,{handler:this.configVisible,value:I.VISIBLE.value,validator:I.VISIBLE.validator});this.cfg.addProperty(I.EFFECT.key,{suppressEvent:I.EFFECT.suppressEvent,supercedes:I.EFFECT.supercedes});this.cfg.addProperty(I.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:I.MONITOR_RESIZE.value});this.cfg.addProperty(I.APPEND_TO_DOCUMENT_B!
 ODY.key,{value:I.APPEND_TO_DOCUMENT_BODY.value});},init:functi!
 on(V,U){
var R,T,W;this.initEvents();this.beforeInitEvent.fire(G);this.cfg=new D(this);if(this.isSecure){this.imageRoot=G.IMG_ROOT_SSL;}if(typeof V=="string"){R=V;V=document.getElementById(V);if(!V){V=(K()).cloneNode(false);V.id=R;}}this.element=V;if(V.id){this.id=V.id;}W=this.element.firstChild;if(W){var Q=false,P=false,S=false;do{if(1==W.nodeType){if(!Q&&F.hasClass(W,G.CSS_HEADER)){this.header=W;Q=true;}else{if(!P&&F.hasClass(W,G.CSS_BODY)){this.body=W;P=true;}else{if(!S&&F.hasClass(W,G.CSS_FOOTER)){this.footer=W;S=true;}}}}}while((W=W.nextSibling));}this.initDefaultConfig();F.addClass(this.element,G.CSS_MODULE);if(U){this.cfg.applyConfig(U,true);}if(!D.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}this.initEvent.fire(G);},initResizeMonitor:function(){var P,Q,S;function T(){G.textResizeEvent.fire();}if(!YAHOO.env.ua.opera){Q=F.get("_yuiResizeMonitor");if(!Q){Q=document.createElement("iframe");if(this.i!
 sSecure&&G.RESIZE_MONITOR_SECURE_URL&&YAHOO.env.ua.ie){Q.src=G.RESIZE_MONITOR_SECURE_URL;}if(YAHOO.env.ua.gecko){S="<html><head><script type=\"text/javascript\">window.onresize=function(){window.parent.YAHOO.widget.Module.textResizeEvent.fire();};window.parent.YAHOO.widget.Module.textResizeEvent.fire();</script></head><body></body></html>";Q.src="data:text/html;charset=utf-8,"+encodeURIComponent(S);}Q.id="_yuiResizeMonitor";Q.style.position="absolute";Q.style.visibility="hidden";var R=document.body.firstChild;if(R){document.body.insertBefore(Q,R);}else{document.body.appendChild(Q);}Q.style.width="10em";Q.style.height="10em";Q.style.top=(-1*Q.offsetHeight)+"px";Q.style.left=(-1*Q.offsetWidth)+"px";Q.style.borderWidth="0";Q.style.visibility="visible";if(YAHOO.env.ua.webkit){P=Q.contentWindow.document;P.open();P.close();}}if(Q&&Q.contentWindow){G.textResizeEvent.subscribe(this.onDomResize,this,true);if(!G.textResizeInitialized){if(!M.on(Q.contentWindow,"resize",T)){M.on(Q,"res!
 ize",T);}G.textResizeInitialized=true;}this.resizeMonitor=Q;}}!
 },onDomR
esize:function(S,R){var Q=-1*this.resizeMonitor.offsetWidth,P=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=P+"px";this.resizeMonitor.style.left=Q+"px";},setHeader:function(Q){var P=this.header||(this.header=J());if(typeof Q=="string"){P.innerHTML=Q;}else{P.innerHTML="";P.appendChild(Q);}this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire();},appendToHeader:function(Q){var P=this.header||(this.header=J());P.appendChild(Q);this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire();},setBody:function(Q){var P=this.body||(this.body=B());if(typeof Q=="string"){P.innerHTML=Q;}else{P.innerHTML="";P.appendChild(Q);}this.changeBodyEvent.fire(Q);this.changeContentEvent.fire();},appendToBody:function(Q){var P=this.body||(this.body=B());P.appendChild(Q);this.changeBodyEvent.fire(Q);this.changeContentEvent.fire();},setFooter:function(Q){var P=this.footer||(this.footer=C());if(typeof Q=="string"){P.innerHTML=Q;}else{P.innerHTML="";P.appendChild(Q);}this.chang!
 eFooterEvent.fire(Q);this.changeContentEvent.fire();},appendToFooter:function(Q){var P=this.footer||(this.footer=C());P.appendChild(Q);this.changeFooterEvent.fire(Q);this.changeContentEvent.fire();},render:function(R,P){var S=this,T;function Q(U){if(typeof U=="string"){U=document.getElementById(U);}if(U){S._addToParent(U,S.element);S.appendEvent.fire();}}this.beforeRenderEvent.fire();if(!P){P=this.element;}if(R){Q(R);}else{if(!F.inDocument(this.element)){return false;}}if(this.header&&!F.inDocument(this.header)){T=P.firstChild;if(T){P.insertBefore(this.header,T);}else{P.appendChild(this.header);}}if(this.body&&!F.inDocument(this.body)){if(this.footer&&F.isAncestor(this.moduleElement,this.footer)){P.insertBefore(this.body,this.footer);}else{P.appendChild(this.body);}}if(this.footer&&!F.inDocument(this.footer)){P.appendChild(this.footer);}this.renderEvent.fire();return true;},destroy:function(){var P,Q;if(this.element){M.purgeElement(this.element,true);
-P=this.element.parentNode;}if(P){P.removeChild(this.element);}this.element=null;this.header=null;this.body=null;this.footer=null;G.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire();for(Q in this){if(Q instanceof L){Q.unsubscribeAll();}}},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(Q,P,R){var S=P[0];if(S){this.beforeShowEvent.fire();F.setStyle(this.element,"display","block");this.showEvent.fire();}else{this.beforeHideEvent.fire();F.setStyle(this.element,"display","none");this.hideEvent.fire();}},configMonitorResize:function(R,Q,S){var P=Q[0];if(P){this.initResizeMonitor();}else{G.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null;}},_addToParent:function(P,Q){if(!this.cfg.getProperty("appendtodocumentbody")&&P===document.body&&P.firstChild){P.insertBefore(Q,P.firstChild);}else{P.appendChild(Q);}},toS!
 tring:function(){return"Module "+this.id;}};YAHOO.lang.augmentProto(G,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Overlay=function(L,K){YAHOO.widget.Overlay.superclass.constructor.call(this,L,K);};var F=YAHOO.lang,I=YAHOO.util.CustomEvent,E=YAHOO.widget.Module,J=YAHOO.util.Event,D=YAHOO.util.Dom,C=YAHOO.util.Config,B=YAHOO.widget.Overlay,G,A={"BEFORE_MOVE":"beforeMove","MOVE":"move"},H={"X":{key:"x",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,validator:F.isBoolean,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"ZINDEX":{key:"zindex",value:null!
 },"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:fal!
 se,valid
ator:F.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(YAHOO.env.ua.ie==6?true:false),validator:F.isBoolean,supercedes:["zindex"]}};B.IFRAME_SRC="javascript:false;";B.IFRAME_OFFSET=3;B.TOP_LEFT="tl";B.TOP_RIGHT="tr";B.BOTTOM_LEFT="bl";B.BOTTOM_RIGHT="br";B.CSS_OVERLAY="yui-overlay";B.windowScrollEvent=new I("windowScroll");B.windowResizeEvent=new I("windowResize");B.windowScrollHandler=function(K){if(YAHOO.env.ua.ie){if(!window.scrollEnd){window.scrollEnd=-1;}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){B.windowScrollEvent.fire();},1);}else{B.windowScrollEvent.fire();}};B.windowResizeHandler=function(K){if(YAHOO.env.ua.ie){if(!window.resizeEnd){window.resizeEnd=-1;}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){B.windowResizeEvent.fire();},100);}else{B.windowResizeEvent.fire();}};B._initialized=null;if(B._initialized===null){J.on(window,"scroll",B.windowScrollHandler);J.on(window,"resize",B.windowRes!
 izeHandler);B._initialized=true;}YAHOO.extend(B,E,{init:function(L,K){B.superclass.init.call(this,L);this.beforeInitEvent.fire(B);D.addClass(this.element,B.CSS_OVERLAY);if(K){this.cfg.applyConfig(K,true);}if(this.platform=="mac"&&YAHOO.env.ua.gecko){if(!C.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}if(!C.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}this.initEvent.fire(B);},initEvents:function(){B.superclass.initEvents.call(this);var K=I.LIST;this.beforeMoveEvent=this.createEvent(A.BEFORE_MOVE);this.beforeMoveEvent.signature=K;this.moveEvent=this.createEvent(A.MOVE);this.moveEvent.signature=K;},initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.X.key,{handler:this.configX,validator:H.X.validator,suppressEvent:H.X.suppressEvent,supercedes:H.X.supercedes});thi!
 s.cfg.addProperty(H.Y.key,{handler:this.configY,validator:H.Y.!
 validato
r,suppressEvent:H.Y.suppressEvent,supercedes:H.Y.supercedes});this.cfg.addProperty(H.XY.key,{handler:this.configXY,suppressEvent:H.XY.suppressEvent,supercedes:H.XY.supercedes});this.cfg.addProperty(H.CONTEXT.key,{handler:this.configContext,suppressEvent:H.CONTEXT.suppressEvent,supercedes:H.CONTEXT.supercedes});this.cfg.addProperty(H.FIXED_CENTER.key,{handler:this.configFixedCenter,value:H.FIXED_CENTER.value,validator:H.FIXED_CENTER.validator,supercedes:H.FIXED_CENTER.supercedes});this.cfg.addProperty(H.WIDTH.key,{handler:this.configWidth,suppressEvent:H.WIDTH.suppressEvent,supercedes:H.WIDTH.supercedes});this.cfg.addProperty(H.HEIGHT.key,{handler:this.configHeight,suppressEvent:H.HEIGHT.suppressEvent,supercedes:H.HEIGHT.supercedes});this.cfg.addProperty(H.ZINDEX.key,{handler:this.configzIndex,value:H.ZINDEX.value});this.cfg.addProperty(H.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:H.CONSTRAIN_TO_VIEWPORT.value,validator:H.CONSTRAIN_TO_VIEWPORT.val!
 idator,supercedes:H.CONSTRAIN_TO_VIEWPORT.supercedes});this.cfg.addProperty(H.IFRAME.key,{handler:this.configIframe,value:H.IFRAME.value,validator:H.IFRAME.validator,supercedes:H.IFRAME.supercedes});},moveTo:function(K,L){this.cfg.setProperty("xy",[K,L]);},hideMacGeckoScrollbars:function(){D.removeClass(this.element,"show-scrollbars");D.addClass(this.element,"hide-scrollbars");},showMacGeckoScrollbars:function(){D.removeClass(this.element,"hide-scrollbars");D.addClass(this.element,"show-scrollbars");},configVisible:function(N,K,T){var M=K[0],O=D.getStyle(this.element,"visibility"),U=this.cfg.getProperty("effect"),R=[],Q=(this.platform=="mac"&&YAHOO.env.ua.gecko),b=C.alreadySubscribed,S,L,a,Y,X,W,Z,V,P;if(O=="inherit"){a=this.element.parentNode;while(a.nodeType!=9&&a.nodeType!=11){O=D.getStyle(a,"visibility");if(O!="inherit"){break;}a=a.parentNode;}if(O=="inherit"){O="visible";}}if(U){if(U instanceof Array){V=U.length;
-for(Y=0;Y<V;Y++){S=U[Y];R[R.length]=S.effect(this,S.duration);}}else{R[R.length]=U.effect(this,U.duration);}}if(M){if(Q){this.showMacGeckoScrollbars();}if(U){if(M){if(O!="visible"||O===""){this.beforeShowEvent.fire();P=R.length;for(X=0;X<P;X++){L=R[X];if(X===0&&!b(L.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){L.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}L.animateIn();}}}}else{if(O!="visible"||O===""){this.beforeShowEvent.fire();D.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire();}}}else{if(Q){this.hideMacGeckoScrollbars();}if(U){if(O=="visible"){this.beforeHideEvent.fire();P=R.length;for(W=0;W<P;W++){Z=R[W];if(W===0&&!b(Z.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){Z.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}Z.animateOut();}}else{if(O===""){D.setStyle(this.element,"visibility","hidden");}}}else{if(O=="visible"||O===""){this.befo!
 reHideEvent.fire();D.setStyle(this.element,"visibility","hidden");this.hideEvent.fire();}}}},doCenterOnDOMEvent:function(){if(this.cfg.getProperty("visible")){this.center();}},configFixedCenter:function(O,M,P){var Q=M[0],L=C.alreadySubscribed,N=B.windowResizeEvent,K=B.windowScrollEvent;if(Q){this.center();if(!L(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center);}if(!L(N,this.doCenterOnDOMEvent,this)){N.subscribe(this.doCenterOnDOMEvent,this,true);}if(!L(K,this.doCenterOnDOMEvent,this)){K.subscribe(this.doCenterOnDOMEvent,this,true);}}else{this.beforeShowEvent.unsubscribe(this.center);N.unsubscribe(this.doCenterOnDOMEvent,this);K.unsubscribe(this.doCenterOnDOMEvent,this);}},configHeight:function(N,L,O){var K=L[0],M=this.element;D.setStyle(M,"height",K);this.cfg.refireEvent("iframe");},configWidth:function(N,K,O){var M=K[0],L=this.element;D.setStyle(L,"width",M);this.cfg.refireEvent("iframe");},configzIndex:function(M,K,N){var O=K[0],L=this.el!
 ement;if(!O){O=D.getStyle(L,"zIndex");if(!O||isNaN(O)){O=0;}}i!
 f(this.i
frame||this.cfg.getProperty("iframe")===true){if(O<=0){O=1;}}D.setStyle(L,"zIndex",O);this.cfg.setProperty("zIndex",O,true);if(this.iframe){this.stackIframe();}},configXY:function(M,L,N){var P=L[0],K=P[0],O=P[1];this.cfg.setProperty("x",K);this.cfg.setProperty("y",O);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},configX:function(M,L,N){var K=L[0],O=this.cfg.getProperty("y");this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setX(this.element,K,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},configY:function(M,L,N){var K=this.cfg.getProperty("x"),O=L[0];this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setY(thi!
 s.element,O,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},showIframe:function(){var L=this.iframe,K;if(L){K=this.element.parentNode;if(K!=L.parentNode){this._addToParent(K,L);}L.style.display="block";}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none";}},syncIframe:function(){var K=this.iframe,M=this.element,O=B.IFRAME_OFFSET,L=(O*2),N;if(K){K.style.width=(M.offsetWidth+L+"px");K.style.height=(M.offsetHeight+L+"px");N=this.cfg.getProperty("xy");if(!F.isArray(N)||(isNaN(N[0])||isNaN(N[1]))){this.syncPosition();N=this.cfg.getProperty("xy");}D.setXY(K,[(N[0]-O),(N[1]-O)]);}},stackIframe:function(){if(this.iframe){var K=D.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(K)&&!isNaN(K)){D.setStyle(this.iframe,"zIndex",(K-1));}}},configIframe:function(N,M,O){var K=M[0];function P(){var R=this.iframe,S=this.element,U,T;if(!R){if(!G){G=document.createElement("iframe");if(this.isSecure){G.src=B.!
 IFRAME_SRC;}if(YAHOO.env.ua.ie){G.style.filter="alpha(opacity=!
 0)";G.fr
ameBorder=0;}else{G.style.opacity="0";}G.style.position="absolute";G.style.border="none";G.style.margin="0";G.style.padding="0";G.style.display="none";}R=G.cloneNode(false);U=S.parentNode;var Q=U||document.body;this._addToParent(Q,R);this.iframe=R;}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true;}}function L(){P.call(this);this.beforeShowEvent.unsubscribe(L);this._iframeDeferred=false;}if(K){if(this.cfg.getProperty("visible")){P.call(this);}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(L);this._iframeDeferred=true;}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false;}}},!
 configConstrainToViewport:function(L,K,M){var N=K[0];if(N){if(!C.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}}else{this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}},configContext:function(M,L,O){var Q=L[0],N,P,K;if(Q){N=Q[0];P=Q[1];K=Q[2];if(N){if(typeof N=="string"){this.cfg.setProperty("context",[document.getElementById(N),P,K],true);}if(P&&K){this.align(P,K);}}}},align:function(L,K){var Q=this.cfg.getProperty("context"),P=this,O,N,R;function M(S,T){switch(L){case B.TOP_LEFT:P.moveTo(T,S);break;case B.TOP_RIGHT:P.moveTo((T-N.offsetWidth),S);break;case B.BOTTOM_LEFT:P.moveTo(T,(S-N.offsetHeight));break;case B.BOTTOM_RIGHT:P.moveTo((T-N.offsetWidth),(S-N.offsetHeight));break;}}if(Q){O=Q[0];N=this.element;P=this;if(!L){L=Q[1];}if(!K){K=Q[2];}if(N&&O){R=D.getRegion(O);switch(K){case B.TOP_LEFT:M(R.top,R.left);
-break;case B.TOP_RIGHT:M(R.top,R.right);break;case B.BOTTOM_LEFT:M(R.bottom,R.left);break;case B.BOTTOM_RIGHT:M(R.bottom,R.right);break;}}}},enforceConstraints:function(S,R,O){var U=R[0],W=U[0],V=U[1],L=this.element.offsetHeight,Q=this.element.offsetWidth,T=D.getViewportWidth(),N=D.getViewportHeight(),Z=D.getDocumentScrollLeft(),X=D.getDocumentScrollTop(),M=X+10,P=Z+10,K=X+N-L-10,Y=Z+T-Q-10;if(W<P){W=P;}else{if(W>Y){W=Y;}}if(V<M){V=M;}else{if(V>K){V=K;}}this.cfg.setProperty("x",W,true);this.cfg.setProperty("y",V,true);this.cfg.setProperty("xy",[W,V],true);},center:function(){var Q=D.getDocumentScrollLeft(),O=D.getDocumentScrollTop(),L=D.getClientWidth(),P=D.getClientHeight(),N=this.element.offsetWidth,M=this.element.offsetHeight,K=(L/2)-(N/2)+Q,R=(P/2)-(M/2)+O;this.cfg.setProperty("xy",[parseInt(K,10),parseInt(R,10)]);this.cfg.refireEvent("iframe");},syncPosition:function(){var K=D.getXY(this.element);this.cfg.setProperty("x",K[0],true);this.cfg.setProperty("y",K[1],true);t!
 his.cfg.setProperty("xy",K,true);},onDomResize:function(M,L){var K=this;B.superclass.onDomResize.call(this,M,L);setTimeout(function(){K.syncPosition();K.cfg.refireEvent("iframe");K.cfg.refireEvent("context");},0);},bringToTop:function(){var N=[],M=this.element;function P(T,S){var V=D.getStyle(T,"zIndex"),U=D.getStyle(S,"zIndex"),R=(!V||isNaN(V))?0:parseInt(V,10),Q=(!U||isNaN(U))?0:parseInt(U,10);if(R>Q){return -1;}else{if(R<Q){return 1;}else{return 0;}}}function L(S){var Q=D.hasClass(S,B.CSS_OVERLAY),R=YAHOO.widget.Panel;if(Q&&!D.isAncestor(M,Q)){if(R&&D.hasClass(S,R.CSS_PANEL)){N[N.length]=S.parentNode;}else{N[N.length]=S;}}}D.getElementsBy(L,"DIV",document.body);N.sort(P);var K=N[0],O;if(K){O=D.getStyle(K,"zIndex");if(!isNaN(O)&&K!=M){this.cfg.setProperty("zindex",(parseInt(O,10)+2));}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;B.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.windowScrollEvent.unsu!
 bscribe(this.doCenterOnDOMEvent,this);B.superclass.destroy.cal!
 l(this);
},toString:function(){return"Overlay "+this.id;}});}());(function(){YAHOO.widget.OverlayManager=function(G){this.init(G);};var D=YAHOO.widget.Overlay,C=YAHOO.util.Event,E=YAHOO.util.Dom,B=YAHOO.util.Config,F=YAHOO.util.CustomEvent,A=YAHOO.widget.OverlayManager;A.CSS_FOCUSED="focused";A.prototype={constructor:A,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},init:function(I){this.cfg=new B(this);this.initDefaultConfig();if(I){this.cfg.applyConfig(I,true);}this.cfg.fireQueue();var H=null;this.getActive=function(){return H;};this.focus=function(J){var K=this.find(J);if(K){if(H!=K){if(H){H.blur();}this.bringToTop(K);H=K;E.addClass(H.element,A.CSS_FOCUSED);K.focusEvent.fire();}}};this.remove=function(K){var M=this.find(K),J;if(M){if(H==M){H=null;}var L=(M.element===null&&M.cfg===null)?true:false;if(!L){J=E.getStyle(M.element,"zIndex");M.cfg.setProperty("zIndex",-1000,true);}t!
 his.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));M.hideEvent.unsubscribe(M.blur);M.destroyEvent.unsubscribe(this._onOverlayDestroy,M);if(!L){C.removeListener(M.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);M.cfg.setProperty("zIndex",J,true);M.cfg.setProperty("manager",null);}M.focusEvent.unsubscribeAll();M.blurEvent.unsubscribeAll();M.focusEvent=null;M.blurEvent=null;M.focus=null;M.blur=null;}};this.blurAll=function(){var K=this.overlays.length,J;if(K>0){J=K-1;do{this.overlays[J].blur();}while(J--);}};this._onOverlayBlur=function(K,J){H=null;};var G=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[];}if(G){this.register(G);this.overlays.sort(this.compareZIndexDesc);}},_onOverlayElementFocus:function(I){var G=C.getTarget(I),H=this.close;if(H&&(G==H||E.isAncestor(H,G))){this.blur();}else{this.focus();}},_onOverlayDestroy:function(H,G,I){this.remove(I);},register:function(G){var !
 K=this,L,I,H,J;if(G instanceof D){G.cfg.addProperty("manager",!
 {value:t
his});G.focusEvent=G.createEvent("focus");G.focusEvent.signature=F.LIST;G.blurEvent=G.createEvent("blur");G.blurEvent.signature=F.LIST;G.focus=function(){K.focus(this);};G.blur=function(){if(K.getActive()==this){E.removeClass(this.element,A.CSS_FOCUSED);this.blurEvent.fire();}};G.blurEvent.subscribe(K._onOverlayBlur);G.hideEvent.subscribe(G.blur);G.destroyEvent.subscribe(this._onOverlayDestroy,G,this);C.on(G.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus,null,G);L=E.getStyle(G.element,"zIndex");if(!isNaN(L)){G.cfg.setProperty("zIndex",parseInt(L,10));}else{G.cfg.setProperty("zIndex",0);}this.overlays.push(G);this.bringToTop(G);return true;}else{if(G instanceof Array){I=0;J=G.length;for(H=0;H<J;H++){if(this.register(G[H])){I++;}}if(I>0){return true;}}else{return false;}}},bringToTop:function(K){var H=this.find(K),J,G,I;if(H){I=this.overlays;I.sort(this.compareZIndexDesc);G=I[0];if(G){J=E.getStyle(G.element,"zIndex");if(!isNaN(J)&&G!=H){H.cfg.setPropert!
 y("zIndex",(parseInt(J,10)+2));}I.sort(this.compareZIndexDesc);}}},find:function(G){var I=this.overlays,J=I.length,H;if(J>0){H=J-1;if(G instanceof D){do{if(I[H]==G){return I[H];}}while(H--);}else{if(typeof G=="string"){do{if(I[H].id==G){return I[H];}}while(H--);}}return null;}},compareZIndexDesc:function(J,I){var H=(J.cfg)?J.cfg.getProperty("zIndex"):null,G=(I.cfg)?I.cfg.getProperty("zIndex"):null;if(H===null&&G===null){return 0;}else{if(H===null){return 1;}else{if(G===null){return -1;}else{if(H>G){return -1;}else{if(H<G){return 1;}else{return 0;}}}}}},showAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].show();}while(G--);}},hideAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].hide();}while(G--);}},toString:function(){return"OverlayManager";}};}());(function(){YAHOO.widget.ContainerEffect=function(F,I,H,E,G){if(!G){G=YAHOO.util.Anim;}this.overlay=F;this.attrIn=I;this.attrOut=H;
-this.targetElement=E||F.element;this.animClass=G;};var B=YAHOO.util.Dom,D=YAHOO.util.CustomEvent,C=YAHOO.util.Easing,A=YAHOO.widget.ContainerEffect;A.FADE=function(E,F){var G=new A(E,{attributes:{opacity:{from:0,to:1}},duration:F,method:C.easeIn},{attributes:{opacity:{to:0}},duration:F,method:C.easeOut},E.element);G.handleStartAnimateIn=function(I,H,J){B.addClass(J.overlay.element,"hide-select");if(!J.overlay.underlay){J.overlay.cfg.refireEvent("underlay");}if(J.overlay.underlay){J.initialUnderlayOpacity=B.getStyle(J.overlay.underlay,"opacity");J.overlay.underlay.style.filter=null;}B.setStyle(J.overlay.element,"visibility","visible");B.setStyle(J.overlay.element,"opacity",0);};G.handleCompleteAnimateIn=function(I,H,J){B.removeClass(J.overlay.element,"hide-select");if(J.overlay.element.style.filter){J.overlay.element.style.filter=null;}if(J.overlay.underlay){B.setStyle(J.overlay.underlay,"opacity",J.initialUnderlayOpacity);}J.overlay.cfg.refireEvent("iframe");J.animateInComp!
 leteEvent.fire();};G.handleStartAnimateOut=function(I,H,J){B.addClass(J.overlay.element,"hide-select");if(J.overlay.underlay){J.overlay.underlay.style.filter=null;}};G.handleCompleteAnimateOut=function(I,H,J){B.removeClass(J.overlay.element,"hide-select");if(J.overlay.element.style.filter){J.overlay.element.style.filter=null;}B.setStyle(J.overlay.element,"visibility","hidden");B.setStyle(J.overlay.element,"opacity",1);J.overlay.cfg.refireEvent("iframe");J.animateOutCompleteEvent.fire();};G.init();return G;};A.SLIDE=function(G,I){var F=G.cfg.getProperty("x")||B.getX(G.element),K=G.cfg.getProperty("y")||B.getY(G.element),J=B.getClientWidth(),H=G.element.offsetWidth,E=new A(G,{attributes:{points:{to:[F,K]}},duration:I,method:C.easeIn},{attributes:{points:{to:[(J+25),K]}},duration:I,method:C.easeOut},G.element,YAHOO.util.Motion);E.handleStartAnimateIn=function(M,L,N){N.overlay.element.style.left=((-25)-H)+"px";N.overlay.element.style.top=K+"px";};E.handleTweenAnimateIn=function!
 (O,N,P){var Q=B.getXY(P.overlay.element),M=Q[0],L=Q[1];if(B.ge!
 tStyle(P
.overlay.element,"visibility")=="hidden"&&M<F){B.setStyle(P.overlay.element,"visibility","visible");}P.overlay.cfg.setProperty("xy",[M,L],true);P.overlay.cfg.refireEvent("iframe");};E.handleCompleteAnimateIn=function(M,L,N){N.overlay.cfg.setProperty("xy",[F,K],true);N.startX=F;N.startY=K;N.overlay.cfg.refireEvent("iframe");N.animateInCompleteEvent.fire();};E.handleStartAnimateOut=function(N,M,Q){var O=B.getViewportWidth(),R=B.getXY(Q.overlay.element),P=R[1],L=Q.animOut.attributes.points.to;Q.animOut.attributes.points.to=[(O+25),P];};E.handleTweenAnimateOut=function(N,M,O){var Q=B.getXY(O.overlay.element),L=Q[0],P=Q[1];O.overlay.cfg.setProperty("xy",[L,P],true);O.overlay.cfg.refireEvent("iframe");};E.handleCompleteAnimateOut=function(M,L,N){B.setStyle(N.overlay.element,"visibility","hidden");N.overlay.cfg.setProperty("xy",[F,K]);N.animateOutCompleteEvent.fire();};E.init();return E;};A.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");thi!
 s.beforeAnimateInEvent.signature=D.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=D.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=D.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=D.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut!
 ,this);},animateIn:function(){this.beforeAnimateInEvent.fire()!
 ;this.an
imIn.animate();},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate();},handleStartAnimateIn:function(F,E,G){},handleTweenAnimateIn:function(F,E,G){},handleCompleteAnimateIn:function(F,E,G){},handleStartAnimateOut:function(F,E,G){},handleTweenAnimateOut:function(F,E,G){},handleCompleteAnimateOut:function(F,E,G){},toString:function(){var E="ContainerEffect";if(this.overlay){E+=" ["+this.overlay.toString()+"]";}return E;}};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);})();YAHOO.register("container_core",YAHOO.widget.Module,{version:"2.3.1",build:"541"});
\ No newline at end of file
+(function(){YAHOO.util.Config=function(D){if(D){this.init(D);}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE);},checkNumber:function(D){return(!isNaN(D));},fireEvent:function(D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F);}},addProperty:function(E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handler,this.owner);}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queueProperty(E,D.valu!
 e);}},getConfig:function(){var D={},F,E;for(F in this.config){E=this.config[F];if(E&&E.event){D[F]=E.value;}}return D;},getProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E.value;}else{return undefined;}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true;}}else{return false;}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E,G);return true;}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validator(G)){return false;}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChangedEvent.fire([E,G]);}return true;}}else{return false;}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false;}else{if(!B.isUndefined(P)){R.val!
 ue=P;}else{P=R.value;}K=false;J=this.eventQueue.length;for(L=0!
 ;L<J;L++
){G=this.eventQueue[L];if(G){H=G[0];I=G[1];if(H==S){this.eventQueue[L]=null;this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]);K=true;break;}}}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P]);}}if(R.supercedes){O=R.supercedes.length;for(T=0;T<O;T++){Q=R.supercedes[T];F=this.eventQueue.length;for(E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M[0];D=M[1];if(N==Q.toLowerCase()){this.eventQueue.push([N,D]);this.eventQueue[E]=null;break;}}}}}return true;}else{return false;}},refireEvent:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queueProperty(D);}else{this.fireEvent(D,E.value);}}},applyConfig:function(D,G){var F,E;if(G){E={};for(F in D){if(B.hasOwnProperty(D,F)){E[F.toLowerCase()]=D[F];}}this.initialConfig=E;}for(F in D){if(B.hasOwnProperty(D,F)){this.queueProperty(F,D[F]);}}},refresh:function(){var D;for(D in this.config){this.refireEvent(D);}},fireQueue:function(){var E,H,D,G,F;this.queueInProgress=tr!
 ue;for(E=0;E<this.eventQueue.length;E++){H=this.eventQueue[E];if(H){D=H[0];G=H[1];F=this.config[D];F.value=G;this.fireEvent(D,G);}}this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()];if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D);}return true;}else{return false;}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F&&F.event){return F.event.unsubscribe(E,G);}else{return false;}},toString:function(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]";}return D;},outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length;for(E=0;E<F;E++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G[1]+", ";}}return D;},destroy:function(){var E=this.config,D,F;for(D in E){if(B.hasOwnProperty(E,D)){F=E[D];F.event.unsubscribeAll();F.event=null;}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;thi!
 s.initialConfig=null;this.eventQueue=null;}};A.alreadySubscrib!
 ed=funct
ion(E,H,I){var F=E.subscribers.length,D,G;if(F>0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true;}}while(G--);}return false;};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Module=function(Q,P){if(Q){this.init(Q,P);}else{}};var F=YAHOO.util.Dom,D=YAHOO.util.Config,M=YAHOO.util.Event,L=YAHOO.util.CustomEvent,G=YAHOO.widget.Module,H,O,N,E,A={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},I={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};G.IMG_!
 ROOT=null;G.IMG_ROOT_SSL=null;G.CSS_MODULE="yui-module";G.CSS_HEADER="hd";G.CSS_BODY="bd";G.CSS_FOOTER="ft";G.RESIZE_MONITOR_SECURE_URL="javascript:false;";G.textResizeEvent=new L("textResize");function K(){if(!H){H=document.createElement("div");H.innerHTML=("<div class=\""+G.CSS_HEADER+"\"></div><div class=\""+G.CSS_BODY+"\"></div><div class=\""+G.CSS_FOOTER+"\"></div>");O=H.firstChild;N=O.nextSibling;E=N.nextSibling;}return H;}function J(){if(!O){K();}return(O.cloneNode(false));}function B(){if(!N){K();}return(N.cloneNode(false));}function C(){if(!E){K();}return(E.cloneNode(false));}G.prototype={constructor:G,element:null,header:null,body:null,footer:null,id:null,imageRoot:G.IMG_ROOT,initEvents:function(){var P=L.LIST;this.beforeInitEvent=this.createEvent(A.BEFORE_INIT);this.beforeInitEvent.signature=P;this.initEvent=this.createEvent(A.INIT);this.initEvent.signature=P;this.appendEvent=this.createEvent(A.APPEND);
+this.appendEvent.signature=P;this.beforeRenderEvent=this.createEvent(A.BEFORE_RENDER);this.beforeRenderEvent.signature=P;this.renderEvent=this.createEvent(A.RENDER);this.renderEvent.signature=P;this.changeHeaderEvent=this.createEvent(A.CHANGE_HEADER);this.changeHeaderEvent.signature=P;this.changeBodyEvent=this.createEvent(A.CHANGE_BODY);this.changeBodyEvent.signature=P;this.changeFooterEvent=this.createEvent(A.CHANGE_FOOTER);this.changeFooterEvent.signature=P;this.changeContentEvent=this.createEvent(A.CHANGE_CONTENT);this.changeContentEvent.signature=P;this.destroyEvent=this.createEvent(A.DESTORY);this.destroyEvent.signature=P;this.beforeShowEvent=this.createEvent(A.BEFORE_SHOW);this.beforeShowEvent.signature=P;this.showEvent=this.createEvent(A.SHOW);this.showEvent.signature=P;this.beforeHideEvent=this.createEvent(A.BEFORE_HIDE);this.beforeHideEvent.signature=P;this.hideEvent=this.createEvent(A.HIDE);this.hideEvent.signature=P;},platform:function(){var P=navigator.userAgent!
 .toLowerCase();if(P.indexOf("windows")!=-1||P.indexOf("win32")!=-1){return"windows";}else{if(P.indexOf("macintosh")!=-1){return"mac";}else{return false;}}}(),browser:function(){var P=navigator.userAgent.toLowerCase();if(P.indexOf("opera")!=-1){return"opera";}else{if(P.indexOf("msie 7")!=-1){return"ie7";}else{if(P.indexOf("msie")!=-1){return"ie";}else{if(P.indexOf("safari")!=-1){return"safari";}else{if(P.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty(I.VISIBLE.key,{handler:this.configVisible,value:I.VISIBLE.value,validator:I.VISIBLE.validator});this.cfg.addProperty(I.EFFECT.key,{suppressEvent:I.EFFECT.suppressEvent,supercedes:I.EFFECT.supercedes});this.cfg.addProperty(I.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:I.MONITOR_RESIZE.value});this.cfg.addProperty(I.APPEND_TO_DOCUMENT_B!
 ODY.key,{value:I.APPEND_TO_DOCUMENT_BODY.value});},init:functi!
 on(U,T){
var R,V;this.initEvents();this.beforeInitEvent.fire(G);this.cfg=new D(this);if(this.isSecure){this.imageRoot=G.IMG_ROOT_SSL;}if(typeof U=="string"){R=U;U=document.getElementById(U);if(!U){U=(K()).cloneNode(false);U.id=R;}}this.element=U;if(U.id){this.id=U.id;}V=this.element.firstChild;if(V){var Q=false,P=false,S=false;do{if(1==V.nodeType){if(!Q&&F.hasClass(V,G.CSS_HEADER)){this.header=V;Q=true;}else{if(!P&&F.hasClass(V,G.CSS_BODY)){this.body=V;P=true;}else{if(!S&&F.hasClass(V,G.CSS_FOOTER)){this.footer=V;S=true;}}}}}while((V=V.nextSibling));}this.initDefaultConfig();F.addClass(this.element,G.CSS_MODULE);if(T){this.cfg.applyConfig(T,true);}if(!D.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}this.initEvent.fire(G);},initResizeMonitor:function(){var P,Q,S;function T(){G.textResizeEvent.fire();}if(!YAHOO.env.ua.opera){Q=F.get("_yuiResizeMonitor");if(!Q){Q=document.createElement("iframe");if(this.isS!
 ecure&&G.RESIZE_MONITOR_SECURE_URL&&YAHOO.env.ua.ie){Q.src=G.RESIZE_MONITOR_SECURE_URL;}if(YAHOO.env.ua.gecko){S=["<html><head><script ","type=\"text/javascript\">","window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();}","</script></head>","<body></body></html>"].join("");Q.src="data:text/html;charset=utf-8,"+encodeURIComponent(S);}Q.id="_yuiResizeMonitor";Q.style.position="absolute";Q.style.visibility="hidden";var R=document.body.firstChild;if(R){document.body.insertBefore(Q,R);}else{document.body.appendChild(Q);}Q.style.width="10em";Q.style.height="10em";Q.style.top=(-1*Q.offsetHeight)+"px";Q.style.left=(-1*Q.offsetWidth)+"px";Q.style.borderWidth="0";Q.style.visibility="visible";if(YAHOO.env.ua.webkit){P=Q.contentWindow.document;P.open();P.close();}}if(Q&&Q.contentWindow){G.textResizeEvent.subscribe(this.onDomResize,this,true);if(!G.textResizeInitialized){if(!YAHOO.env.ua.gecko){if(!M.on(Q.contentWindow,"resize",T)){M.on(Q,"resize",T)!
 ;}}G.textResizeInitialized=true;}this.resizeMonitor=Q;}}},onDo!
 mResize:
function(S,R){var Q=-1*this.resizeMonitor.offsetWidth,P=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=P+"px";this.resizeMonitor.style.left=Q+"px";},setHeader:function(Q){var P=this.header||(this.header=J());if(typeof Q=="string"){P.innerHTML=Q;}else{P.innerHTML="";P.appendChild(Q);}this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire();},appendToHeader:function(Q){var P=this.header||(this.header=J());P.appendChild(Q);this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire();},setBody:function(Q){var P=this.body||(this.body=B());if(typeof Q=="string"){P.innerHTML=Q;}else{P.innerHTML="";P.appendChild(Q);}this.changeBodyEvent.fire(Q);this.changeContentEvent.fire();},appendToBody:function(Q){var P=this.body||(this.body=B());P.appendChild(Q);this.changeBodyEvent.fire(Q);this.changeContentEvent.fire();},setFooter:function(Q){var P=this.footer||(this.footer=C());if(typeof Q=="string"){P.innerHTML=Q;}else{P.innerHTML="";P.appendChild(Q);}this.changeFoote!
 rEvent.fire(Q);this.changeContentEvent.fire();},appendToFooter:function(Q){var P=this.footer||(this.footer=C());P.appendChild(Q);this.changeFooterEvent.fire(Q);this.changeContentEvent.fire();},render:function(R,P){var S=this,T;function Q(U){if(typeof U=="string"){U=document.getElementById(U);}if(U){S._addToParent(U,S.element);S.appendEvent.fire();}}this.beforeRenderEvent.fire();if(!P){P=this.element;}if(R){Q(R);}else{if(!F.inDocument(this.element)){return false;}}if(this.header&&!F.inDocument(this.header)){T=P.firstChild;if(T){P.insertBefore(this.header,T);}else{P.appendChild(this.header);}}if(this.body&&!F.inDocument(this.body)){if(this.footer&&F.isAncestor(this.moduleElement,this.footer)){P.insertBefore(this.body,this.footer);}else{P.appendChild(this.body);}}if(this.footer&&!F.inDocument(this.footer)){P.appendChild(this.footer);}this.renderEvent.fire();return true;},destroy:function(){var P,Q;if(this.element){M.purgeElement(this.element,true);
+P=this.element.parentNode;}if(P){P.removeChild(this.element);}this.element=null;this.header=null;this.body=null;this.footer=null;G.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire();for(Q in this){if(Q instanceof L){Q.unsubscribeAll();}}},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(Q,P,R){var S=P[0];if(S){this.beforeShowEvent.fire();F.setStyle(this.element,"display","block");this.showEvent.fire();}else{this.beforeHideEvent.fire();F.setStyle(this.element,"display","none");this.hideEvent.fire();}},configMonitorResize:function(R,Q,S){var P=Q[0];if(P){this.initResizeMonitor();}else{G.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null;}},_addToParent:function(P,Q){if(!this.cfg.getProperty("appendtodocumentbody")&&P===document.body&&P.firstChild){P.insertBefore(Q,P.firstChild);}else{P.appendChild(Q);}},toS!
 tring:function(){return"Module "+this.id;}};YAHOO.lang.augmentProto(G,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Overlay=function(L,K){YAHOO.widget.Overlay.superclass.constructor.call(this,L,K);};var F=YAHOO.lang,I=YAHOO.util.CustomEvent,E=YAHOO.widget.Module,J=YAHOO.util.Event,D=YAHOO.util.Dom,C=YAHOO.util.Config,B=YAHOO.widget.Overlay,G,A={"BEFORE_MOVE":"beforeMove","MOVE":"move"},H={"X":{key:"x",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,validator:F.isBoolean,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"ZINDEX":{key:"zindex",value:null!
 },"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:fal!
 se,valid
ator:F.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(YAHOO.env.ua.ie==6?true:false),validator:F.isBoolean,supercedes:["zindex"]}};B.IFRAME_SRC="javascript:false;";B.IFRAME_OFFSET=3;B.VIEWPORT_OFFSET=10;B.TOP_LEFT="tl";B.TOP_RIGHT="tr";B.BOTTOM_LEFT="bl";B.BOTTOM_RIGHT="br";B.CSS_OVERLAY="yui-overlay";B.windowScrollEvent=new I("windowScroll");B.windowResizeEvent=new I("windowResize");B.windowScrollHandler=function(K){if(YAHOO.env.ua.ie){if(!window.scrollEnd){window.scrollEnd=-1;}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){B.windowScrollEvent.fire();},1);}else{B.windowScrollEvent.fire();}};B.windowResizeHandler=function(K){if(YAHOO.env.ua.ie){if(!window.resizeEnd){window.resizeEnd=-1;}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){B.windowResizeEvent.fire();},100);}else{B.windowResizeEvent.fire();}};B._initialized=null;if(B._initialized===null){J.on(window,"scroll",B.windowScrollHandler);J.on(window!
 ,"resize",B.windowResizeHandler);B._initialized=true;}YAHOO.extend(B,E,{init:function(L,K){B.superclass.init.call(this,L);this.beforeInitEvent.fire(B);D.addClass(this.element,B.CSS_OVERLAY);if(K){this.cfg.applyConfig(K,true);}if(this.platform=="mac"&&YAHOO.env.ua.gecko){if(!C.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}if(!C.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}this.initEvent.fire(B);},initEvents:function(){B.superclass.initEvents.call(this);var K=I.LIST;this.beforeMoveEvent=this.createEvent(A.BEFORE_MOVE);this.beforeMoveEvent.signature=K;this.moveEvent=this.createEvent(A.MOVE);this.moveEvent.signature=K;},initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.X.key,{handler:this.configX,validator:H.X.validator,suppressEvent:H.X.suppressEvent,supercedes!
 :H.X.supercedes});this.cfg.addProperty(H.Y.key,{handler:this.c!
 onfigY,v
alidator:H.Y.validator,suppressEvent:H.Y.suppressEvent,supercedes:H.Y.supercedes});this.cfg.addProperty(H.XY.key,{handler:this.configXY,suppressEvent:H.XY.suppressEvent,supercedes:H.XY.supercedes});this.cfg.addProperty(H.CONTEXT.key,{handler:this.configContext,suppressEvent:H.CONTEXT.suppressEvent,supercedes:H.CONTEXT.supercedes});this.cfg.addProperty(H.FIXED_CENTER.key,{handler:this.configFixedCenter,value:H.FIXED_CENTER.value,validator:H.FIXED_CENTER.validator,supercedes:H.FIXED_CENTER.supercedes});this.cfg.addProperty(H.WIDTH.key,{handler:this.configWidth,suppressEvent:H.WIDTH.suppressEvent,supercedes:H.WIDTH.supercedes});this.cfg.addProperty(H.HEIGHT.key,{handler:this.configHeight,suppressEvent:H.HEIGHT.suppressEvent,supercedes:H.HEIGHT.supercedes});this.cfg.addProperty(H.ZINDEX.key,{handler:this.configzIndex,value:H.ZINDEX.value});this.cfg.addProperty(H.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:H.CONSTRAIN_TO_VIEWPORT.value,validator:H.CONS!
 TRAIN_TO_VIEWPORT.validator,supercedes:H.CONSTRAIN_TO_VIEWPORT.supercedes});this.cfg.addProperty(H.IFRAME.key,{handler:this.configIframe,value:H.IFRAME.value,validator:H.IFRAME.validator,supercedes:H.IFRAME.supercedes});},moveTo:function(K,L){this.cfg.setProperty("xy",[K,L]);},hideMacGeckoScrollbars:function(){D.removeClass(this.element,"show-scrollbars");D.addClass(this.element,"hide-scrollbars");},showMacGeckoScrollbars:function(){D.removeClass(this.element,"hide-scrollbars");D.addClass(this.element,"show-scrollbars");},configVisible:function(N,K,T){var M=K[0],O=D.getStyle(this.element,"visibility"),U=this.cfg.getProperty("effect"),R=[],Q=(this.platform=="mac"&&YAHOO.env.ua.gecko),b=C.alreadySubscribed,S,L,a,Y,X,W,Z,V,P;if(O=="inherit"){a=this.element.parentNode;while(a.nodeType!=9&&a.nodeType!=11){O=D.getStyle(a,"visibility");if(O!="inherit"){break;}a=a.parentNode;}if(O=="inherit"){O="visible";}}if(U){if(U instanceof Array){V=U.length;
+for(Y=0;Y<V;Y++){S=U[Y];R[R.length]=S.effect(this,S.duration);}}else{R[R.length]=U.effect(this,U.duration);}}if(M){if(Q){this.showMacGeckoScrollbars();}if(U){if(M){if(O!="visible"||O===""){this.beforeShowEvent.fire();P=R.length;for(X=0;X<P;X++){L=R[X];if(X===0&&!b(L.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){L.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}L.animateIn();}}}}else{if(O!="visible"||O===""){this.beforeShowEvent.fire();D.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire();}}}else{if(Q){this.hideMacGeckoScrollbars();}if(U){if(O=="visible"){this.beforeHideEvent.fire();P=R.length;for(W=0;W<P;W++){Z=R[W];if(W===0&&!b(Z.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){Z.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}Z.animateOut();}}else{if(O===""){D.setStyle(this.element,"visibility","hidden");}}}else{if(O=="visible"||O===""){this.befo!
 reHideEvent.fire();D.setStyle(this.element,"visibility","hidden");this.hideEvent.fire();}}}},doCenterOnDOMEvent:function(){if(this.cfg.getProperty("visible")){this.center();}},configFixedCenter:function(O,M,P){var Q=M[0],L=C.alreadySubscribed,N=B.windowResizeEvent,K=B.windowScrollEvent;if(Q){this.center();if(!L(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center);}if(!L(N,this.doCenterOnDOMEvent,this)){N.subscribe(this.doCenterOnDOMEvent,this,true);}if(!L(K,this.doCenterOnDOMEvent,this)){K.subscribe(this.doCenterOnDOMEvent,this,true);}}else{this.beforeShowEvent.unsubscribe(this.center);N.unsubscribe(this.doCenterOnDOMEvent,this);K.unsubscribe(this.doCenterOnDOMEvent,this);}},configHeight:function(N,L,O){var K=L[0],M=this.element;D.setStyle(M,"height",K);this.cfg.refireEvent("iframe");},configWidth:function(N,K,O){var M=K[0],L=this.element;D.setStyle(L,"width",M);this.cfg.refireEvent("iframe");},configzIndex:function(M,K,N){var O=K[0],L=this.el!
 ement;if(!O){O=D.getStyle(L,"zIndex");if(!O||isNaN(O)){O=0;}}i!
 f(this.i
frame||this.cfg.getProperty("iframe")===true){if(O<=0){O=1;}}D.setStyle(L,"zIndex",O);this.cfg.setProperty("zIndex",O,true);if(this.iframe){this.stackIframe();}},configXY:function(M,L,N){var P=L[0],K=P[0],O=P[1];this.cfg.setProperty("x",K);this.cfg.setProperty("y",O);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},configX:function(M,L,N){var K=L[0],O=this.cfg.getProperty("y");this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setX(this.element,K,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},configY:function(M,L,N){var K=this.cfg.getProperty("x"),O=L[0];this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setY(thi!
 s.element,O,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},showIframe:function(){var L=this.iframe,K;if(L){K=this.element.parentNode;if(K!=L.parentNode){this._addToParent(K,L);}L.style.display="block";}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none";}},syncIframe:function(){var K=this.iframe,M=this.element,O=B.IFRAME_OFFSET,L=(O*2),N;if(K){K.style.width=(M.offsetWidth+L+"px");K.style.height=(M.offsetHeight+L+"px");N=this.cfg.getProperty("xy");if(!F.isArray(N)||(isNaN(N[0])||isNaN(N[1]))){this.syncPosition();N=this.cfg.getProperty("xy");}D.setXY(K,[(N[0]-O),(N[1]-O)]);}},stackIframe:function(){if(this.iframe){var K=D.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(K)&&!isNaN(K)){D.setStyle(this.iframe,"zIndex",(K-1));}}},configIframe:function(N,M,O){var K=M[0];function P(){var R=this.iframe,S=this.element,T;if(!R){if(!G){G=document.createElement("iframe");if(this.isSecure){G.src=B.IF!
 RAME_SRC;}if(YAHOO.env.ua.ie){G.style.filter="alpha(opacity=0)!
 ";G.fram
eBorder=0;}else{G.style.opacity="0";}G.style.position="absolute";G.style.border="none";G.style.margin="0";G.style.padding="0";G.style.display="none";}R=G.cloneNode(false);T=S.parentNode;var Q=T||document.body;this._addToParent(Q,R);this.iframe=R;}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true;}}function L(){P.call(this);this.beforeShowEvent.unsubscribe(L);this._iframeDeferred=false;}if(K){if(this.cfg.getProperty("visible")){P.call(this);}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(L);this._iframeDeferred=true;}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false;}}},co!
 nfigConstrainToViewport:function(M,K,N){function L(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();}var P=this.cfg.getProperty("x");var R=this.cfg.getProperty("y");var Q=this.getConstrainedXY(P,R);if(Q[0]!==P||Q[1]!==R){this.moveTo(Q[0],Q[1]);}}var O=K[0];if(O){if(!C.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}if(!C.alreadySubscribed(this.beforeShowEvent,L)){this.beforeShowEvent.subscribe(L);}}else{this.beforeShowEvent.unsubscribe(L);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}},configContext:function(M,L,O){var Q=L[0],N,P,K;if(Q){N=Q[0];P=Q[1];K=Q[2];if(N){if(typeof N=="string"){this.cfg.setProperty("context",[document.getElementById(N),P,K],true);}if(P&&K){this.align(P,K);}}}},align:function(L,K){var Q=this.cfg.getProperty("context"),P=this,O,N,R;function M(S,T){switch(L){case B.TOP_LEFT:P.moveTo(T,S);
+break;case B.TOP_RIGHT:P.moveTo((T-N.offsetWidth),S);break;case B.BOTTOM_LEFT:P.moveTo(T,(S-N.offsetHeight));break;case B.BOTTOM_RIGHT:P.moveTo((T-N.offsetWidth),(S-N.offsetHeight));break;}}if(Q){O=Q[0];N=this.element;P=this;if(!L){L=Q[1];}if(!K){K=Q[2];}if(N&&O){R=D.getRegion(O);switch(K){case B.TOP_LEFT:M(R.top,R.left);break;case B.TOP_RIGHT:M(R.top,R.right);break;case B.BOTTOM_LEFT:M(R.bottom,R.left);break;case B.BOTTOM_RIGHT:M(R.bottom,R.right);break;}}}},enforceConstraints:function(L,K,M){var O=K[0];var N=this.getConstrainedXY(O[0],O[1]);this.cfg.setProperty("x",N[0],true);this.cfg.setProperty("y",N[1],true);this.cfg.setProperty("xy",N,true);},getConstrainedXY:function(V,T){var N=B.VIEWPORT_OFFSET,U=D.getViewportWidth(),Q=D.getViewportHeight(),M=this.element.offsetHeight,S=this.element.offsetWidth,Y=D.getDocumentScrollLeft(),W=D.getDocumentScrollTop();var P=V;var L=T;if(S+N<U){var R=Y+N;var X=Y+U-S-N;if(V<R){P=R;}else{if(V>X){P=X;}}}else{P=N+Y;}if(M+N<Q){var O=W+N;var !
 K=W+Q-M-N;if(T<O){L=O;}else{if(T>K){L=K;}}}else{L=N+W;}return[P,L];},center:function(){var N=B.VIEWPORT_OFFSET,O=this.element.offsetWidth,M=this.element.offsetHeight,L=D.getViewportWidth(),P=D.getViewportHeight(),K,Q;if(O<L){K=(L/2)-(O/2)+D.getDocumentScrollLeft();}else{K=N+D.getDocumentScrollLeft();}if(M<P){Q=(P/2)-(M/2)+D.getDocumentScrollTop();}else{Q=N+D.getDocumentScrollTop();}this.cfg.setProperty("xy",[parseInt(K,10),parseInt(Q,10)]);this.cfg.refireEvent("iframe");},syncPosition:function(){var K=D.getXY(this.element);this.cfg.setProperty("x",K[0],true);this.cfg.setProperty("y",K[1],true);this.cfg.setProperty("xy",K,true);},onDomResize:function(M,L){var K=this;B.superclass.onDomResize.call(this,M,L);setTimeout(function(){K.syncPosition();K.cfg.refireEvent("iframe");K.cfg.refireEvent("context");},0);},bringToTop:function(){var O=[],N=this.element;function R(V,U){var X=D.getStyle(V,"zIndex"),W=D.getStyle(U,"zIndex"),T=(!X||isNaN(X))?0:parseInt(X,10),S=(!W||isNaN(W))?0:pa!
 rseInt(W,10);if(T>S){return -1;}else{if(T<S){return 1;}else{re!
 turn 0;}
}}function M(U){var S=D.hasClass(U,B.CSS_OVERLAY),T=YAHOO.widget.Panel;if(S&&!D.isAncestor(N,S)){if(T&&D.hasClass(U,T.CSS_PANEL)){O[O.length]=U.parentNode;}else{O[O.length]=U;}}}D.getElementsBy(M,"DIV",document.body);O.sort(R);var K=O[0],Q;if(K){Q=D.getStyle(K,"zIndex");if(!isNaN(Q)){var P=false;if(K!=N){P=true;}else{if(O.length>1){var L=D.getStyle(O[1],"zIndex");if(!isNaN(L)&&(Q==L)){P=true;}}}if(P){this.cfg.setProperty("zindex",(parseInt(Q,10)+2));}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;B.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.superclass.destroy.call(this);},toString:function(){return"Overlay "+this.id;}});}());(function(){YAHOO.widget.OverlayManager=function(G){this.init(G);};var D=YAHOO.widget.Overlay,C=YAHOO.util.Event,E=YAHOO.util.Dom,B=YAHOO.util.Config,F=YAHOO.util.CustomEvent,A=YAHOO.widget.OverlayManager;A.CSS_FOCUSE!
 D="focused";A.prototype={constructor:A,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},init:function(I){this.cfg=new B(this);this.initDefaultConfig();if(I){this.cfg.applyConfig(I,true);}this.cfg.fireQueue();var H=null;this.getActive=function(){return H;};this.focus=function(J){var K=this.find(J);if(K){if(H!=K){if(H){H.blur();}this.bringToTop(K);H=K;E.addClass(H.element,A.CSS_FOCUSED);K.focusEvent.fire();}}};this.remove=function(K){var M=this.find(K),J;if(M){if(H==M){H=null;}var L=(M.element===null&&M.cfg===null)?true:false;if(!L){J=E.getStyle(M.element,"zIndex");M.cfg.setProperty("zIndex",-1000,true);}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));M.hideEvent.unsubscribe(M.blur);M.destroyEvent.unsubscribe(this._onOverlayDestroy,M);if(!L){C.removeListener(M.element,this.cfg.getProperty("focusevent"),this._onOverla!
 yElementFocus);M.cfg.setProperty("zIndex",J,true);M.cfg.setPro!
 perty("m
anager",null);}M.focusEvent.unsubscribeAll();M.blurEvent.unsubscribeAll();M.focusEvent=null;M.blurEvent=null;M.focus=null;M.blur=null;}};this.blurAll=function(){var K=this.overlays.length,J;if(K>0){J=K-1;do{this.overlays[J].blur();}while(J--);}};this._onOverlayBlur=function(K,J){H=null;};var G=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[];}if(G){this.register(G);this.overlays.sort(this.compareZIndexDesc);}},_onOverlayElementFocus:function(I){var G=C.getTarget(I),H=this.close;if(H&&(G==H||E.isAncestor(H,G))){this.blur();}else{this.focus();}},_onOverlayDestroy:function(H,G,I){this.remove(I);},register:function(G){var K=this,L,I,H,J;if(G instanceof D){G.cfg.addProperty("manager",{value:this});G.focusEvent=G.createEvent("focus");G.focusEvent.signature=F.LIST;G.blurEvent=G.createEvent("blur");G.blurEvent.signature=F.LIST;G.focus=function(){K.focus(this);};G.blur=function(){if(K.getActive()==this){E.removeClass(this.element,A.CSS_FOCUSED);this.blurEvent.fire!
 ();}};G.blurEvent.subscribe(K._onOverlayBlur);G.hideEvent.subscribe(G.blur);G.destroyEvent.subscribe(this._onOverlayDestroy,G,this);C.on(G.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus,null,G);L=E.getStyle(G.element,"zIndex");if(!isNaN(L)){G.cfg.setProperty("zIndex",parseInt(L,10));}else{G.cfg.setProperty("zIndex",0);}this.overlays.push(G);this.bringToTop(G);return true;}else{if(G instanceof Array){I=0;J=G.length;for(H=0;H<J;H++){if(this.register(G[H])){I++;}}if(I>0){return true;}}else{return false;}}},bringToTop:function(M){var I=this.find(M),L,G,J;if(I){J=this.overlays;J.sort(this.compareZIndexDesc);G=J[0];if(G){L=E.getStyle(G.element,"zIndex");if(!isNaN(L)){var K=false;if(G!==I){K=true;}else{if(J.length>1){var H=E.getStyle(J[1].element,"zIndex");if(!isNaN(H)&&(L==H)){K=true;}}}if(K){I.cfg.setProperty("zindex",(parseInt(L,10)+2));}}J.sort(this.compareZIndexDesc);}}},find:function(G){var I=this.overlays,J=I.length,H;
+if(J>0){H=J-1;if(G instanceof D){do{if(I[H]==G){return I[H];}}while(H--);}else{if(typeof G=="string"){do{if(I[H].id==G){return I[H];}}while(H--);}}return null;}},compareZIndexDesc:function(J,I){var H=(J.cfg)?J.cfg.getProperty("zIndex"):null,G=(I.cfg)?I.cfg.getProperty("zIndex"):null;if(H===null&&G===null){return 0;}else{if(H===null){return 1;}else{if(G===null){return -1;}else{if(H>G){return -1;}else{if(H<G){return 1;}else{return 0;}}}}}},showAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].show();}while(G--);}},hideAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].hide();}while(G--);}},toString:function(){return"OverlayManager";}};}());(function(){YAHOO.widget.ContainerEffect=function(F,I,H,E,G){if(!G){G=YAHOO.util.Anim;}this.overlay=F;this.attrIn=I;this.attrOut=H;this.targetElement=E||F.element;this.animClass=G;};var B=YAHOO.util.Dom,D=YAHOO.util.CustomEvent,C=YAHOO.util.Easing,A=YAHOO.widget.ContainerEffect;A.FADE=function(E,G){var!
  I={attributes:{opacity:{from:0,to:1}},duration:G,method:C.easeIn};var F={attributes:{opacity:{to:0}},duration:G,method:C.easeOut};var H=new A(E,I,F,E.element);H.handleUnderlayStart=function(){var K=this.overlay.underlay;if(K&&YAHOO.env.ua.ie){var J=(K.filters&&K.filters.length>0);if(J){B.addClass(E.element,"yui-effect-fade");}}};H.handleUnderlayComplete=function(){var J=this.overlay.underlay;if(J&&YAHOO.env.ua.ie){B.removeClass(E.element,"yui-effect-fade");}};H.handleStartAnimateIn=function(K,J,L){B.addClass(L.overlay.element,"hide-select");if(!L.overlay.underlay){L.overlay.cfg.refireEvent("underlay");}L.handleUnderlayStart();B.setStyle(L.overlay.element,"visibility","visible");B.setStyle(L.overlay.element,"opacity",0);};H.handleCompleteAnimateIn=function(K,J,L){B.removeClass(L.overlay.element,"hide-select");if(L.overlay.element.style.filter){L.overlay.element.style.filter=null;}L.handleUnderlayComplete();L.overlay.cfg.refireEvent("iframe");L.animateInCompleteEvent.fire();!
 };H.handleStartAnimateOut=function(K,J,L){B.addClass(L.overlay!
 .element
,"hide-select");L.handleUnderlayStart();};H.handleCompleteAnimateOut=function(K,J,L){B.removeClass(L.overlay.element,"hide-select");if(L.overlay.element.style.filter){L.overlay.element.style.filter=null;}B.setStyle(L.overlay.element,"visibility","hidden");B.setStyle(L.overlay.element,"opacity",1);L.handleUnderlayComplete();L.overlay.cfg.refireEvent("iframe");L.animateOutCompleteEvent.fire();};H.init();return H;};A.SLIDE=function(G,I){var F=G.cfg.getProperty("x")||B.getX(G.element),K=G.cfg.getProperty("y")||B.getY(G.element),J=B.getClientWidth(),H=G.element.offsetWidth,E=new A(G,{attributes:{points:{to:[F,K]}},duration:I,method:C.easeIn},{attributes:{points:{to:[(J+25),K]}},duration:I,method:C.easeOut},G.element,YAHOO.util.Motion);E.handleStartAnimateIn=function(M,L,N){N.overlay.element.style.left=((-25)-H)+"px";N.overlay.element.style.top=K+"px";};E.handleTweenAnimateIn=function(O,N,P){var Q=B.getXY(P.overlay.element),M=Q[0],L=Q[1];if(B.getStyle(P.overlay.element,"visibility!
 ")=="hidden"&&M<F){B.setStyle(P.overlay.element,"visibility","visible");}P.overlay.cfg.setProperty("xy",[M,L],true);P.overlay.cfg.refireEvent("iframe");};E.handleCompleteAnimateIn=function(M,L,N){N.overlay.cfg.setProperty("xy",[F,K],true);N.startX=F;N.startY=K;N.overlay.cfg.refireEvent("iframe");N.animateInCompleteEvent.fire();};E.handleStartAnimateOut=function(M,L,P){var N=B.getViewportWidth(),Q=B.getXY(P.overlay.element),O=Q[1];P.animOut.attributes.points.to=[(N+25),O];};E.handleTweenAnimateOut=function(N,M,O){var Q=B.getXY(O.overlay.element),L=Q[0],P=Q[1];O.overlay.cfg.setProperty("xy",[L,P],true);O.overlay.cfg.refireEvent("iframe");};E.handleCompleteAnimateOut=function(M,L,N){B.setStyle(N.overlay.element,"visibility","hidden");N.overlay.cfg.setProperty("xy",[F,K]);N.animateOutCompleteEvent.fire();};E.init();return E;};A.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=D.LIST;this.beforeAnimateOu!
 tEvent=this.createEvent("beforeAnimateOut");this.beforeAnimate!
 OutEvent
.signature=D.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=D.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=D.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate();},animateOut:function(){this.beforeAnimateOutE!
 vent.fire();this.animOut.animate();},handleStartAnimateIn:function(F,E,G){},handleTweenAnimateIn:function(F,E,G){},handleCompleteAnimateIn:function(F,E,G){},handleStartAnimateOut:function(F,E,G){},handleTweenAnimateOut:function(F,E,G){},handleCompleteAnimateOut:function(F,E,G){},toString:function(){var E="ContainerEffect";if(this.overlay){E+=" ["+this.overlay.toString()+"]";}return E;}};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);})();YAHOO.register("containercore",YAHOO.widget.Module,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/container/container_core.js
===================================================================
--- trunk/root/static/yui/container/container_core.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/container/container_core.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 (function () {
 
@@ -18,26 +18,20 @@
     * @param {Object} owner The owner Object to which this Config Object belongs
     */
     YAHOO.util.Config = function (owner) {
-    
+
         if (owner) {
-    
             this.init(owner);
-    
         }
-    
-        if (!owner) { 
-        
-    
-        }
-    
+
+
     };
 
 
     var Lang = YAHOO.lang,
-        CustomEvent = YAHOO.util.CustomEvent,        
+        CustomEvent = YAHOO.util.CustomEvent,
         Config = YAHOO.util.Config;
-    
 
+
     /**
      * Constant representing the CustomEvent type for the config changed event.
      * @property YAHOO.util.Config.CONFIG_CHANGED_EVENT
@@ -353,7 +347,7 @@
                         if (queueItem) {
                             queueItemKey = queueItem[0];
                             queueItemValue = queueItem[1];
-                            
+
                             if (queueItemKey == key) {
     
                                 /*
@@ -381,37 +375,37 @@
                 }
         
                 if (property.supercedes) {
-        
+
                     sLen = property.supercedes.length;
-        
+
                     for (s = 0; s < sLen; s++) {
-        
+
                         supercedesCheck = property.supercedes[s];
                         qLen = this.eventQueue.length;
-        
+
                         for (q = 0; q < qLen; q++) {
                             queueItemCheck = this.eventQueue[q];
-        
+
                             if (queueItemCheck) {
                                 queueItemCheckKey = queueItemCheck[0];
                                 queueItemCheckValue = queueItemCheck[1];
-                                
+
                                 if (queueItemCheckKey == 
                                     supercedesCheck.toLowerCase() ) {
-    
+
                                     this.eventQueue.push([queueItemCheckKey, 
                                         queueItemCheckValue]);
-    
+
                                     this.eventQueue[q] = null;
                                     break;
-    
+
                                 }
                             }
                         }
                     }
                 }
 
-        
+
                 return true;
             } else {
                 return false;
@@ -460,37 +454,23 @@
         applyConfig: function (userConfig, init) {
         
             var sKey,
-                oValue,
                 oConfig;
 
             if (init) {
-
                 oConfig = {};
-
                 for (sKey in userConfig) {
-                
                     if (Lang.hasOwnProperty(userConfig, sKey)) {
-
                         oConfig[sKey.toLowerCase()] = userConfig[sKey];
-
                     }
-                
                 }
-
                 this.initialConfig = oConfig;
-
             }
 
             for (sKey in userConfig) {
-            
                 if (Lang.hasOwnProperty(userConfig, sKey)) {
-            
                     this.queueProperty(sKey, userConfig[sKey]);
-                
                 }
-
             }
-
         },
         
         /**
@@ -557,19 +537,12 @@
             var property = this.config[key.toLowerCase()];
     
             if (property && property.event) {
-    
                 if (!Config.alreadySubscribed(property.event, handler, obj)) {
-    
                     property.event.subscribe(handler, obj, override);
-    
                 }
-    
                 return true;
-    
             } else {
-    
                 return false;
-    
             }
     
         },
@@ -689,28 +662,20 @@
             i;
 
         if (nSubscribers > 0) {
-
             i = nSubscribers - 1;
-        
             do {
-
                 subsc = evt.subscribers[i];
-
                 if (subsc && subsc.obj == obj && subsc.fn == fn) {
-        
                     return true;
-        
-                }    
-            
+                }
             }
             while (i--);
-        
         }
-    
+
         return false;
-    
+
     };
-    
+
     YAHOO.lang.augmentProto(Config, YAHOO.util.EventProvider);
 
 }());
@@ -1241,7 +1206,7 @@
         */
         init: function (el, userConfig) {
 
-            var elId, i, child;
+            var elId, child;
 
             this.initEvents();
             this.beforeInitEvent.fire(Module);
@@ -1341,20 +1306,19 @@
                     }
 
                     /*
-                        Need to set "src" attribute of the iframe to 
-                        prevent the browser from reporting duplicate 
-                        cookies. (See SourceForge bug #1721755)
-                    */
+                        Need to set the iframe document for Gecko
+                        to fire resize events on the iframe contentWindow.
+                     */
                     if (YAHOO.env.ua.gecko) {
-                        sHTML = "<html><head><script " +
-                                "type=\"text/javascript\">" + 
-                                "window.onresize=function(){window.parent." +
-                                "YAHOO.widget.Module.textResizeEvent." +
-                                "fire();};window.parent.YAHOO.widget.Module." +
-                                "textResizeEvent.fire();</script></head>" + 
-                                "<body></body></html>";
+                         sHTML = ["<html><head><script ",
+                                  "type=\"text/javascript\">",
+                                  "window.onresize=function(){window.parent.",
+                                  "YAHOO.widget.Module.textResizeEvent.",
+                                  "fire();}", 
+                                  "<\/script></head>",
+                                  "<body></body></html>"].join('');
 
-                        oIFrame.src = "data:text/html;charset=utf-8," + 
+                        oIFrame.src = "data:text/html;charset=utf-8," +
                             encodeURIComponent(sHTML);
                     }
 
@@ -1382,6 +1346,10 @@
                     oIFrame.style.borderWidth = "0";
                     oIFrame.style.visibility = "visible";
 
+                    /*
+                       Don't open/close the document for Gecko like we used to, since it
+                       leads to duplicate cookies. (See SourceForge bug #1721755)
+                    */
                     if (YAHOO.env.ua.webkit) {
                         oDoc = oIFrame.contentWindow.document;
                         oDoc.open();
@@ -1393,13 +1361,16 @@
                     Module.textResizeEvent.subscribe(this.onDomResize, this, true);
 
                     if (!Module.textResizeInitialized) {
-                        if (!Event.on(oIFrame.contentWindow, "resize", fireTextResize)) {
-                            /*
-                                 This will fail in IE if document.domain has 
-                                 changed, so we must change the listener to 
-                                 use the oIFrame element instead
-                            */
-                            Event.on(oIFrame, "resize", fireTextResize);
+                         // We already handle gecko using the iframe's document content
+                        if (!YAHOO.env.ua.gecko) {
+                            if (!Event.on(oIFrame.contentWindow, "resize", fireTextResize)) {
+                                /*
+                                     This will fail in IE if document.domain has 
+                                     changed, so we must change the listener to 
+                                     use the oIFrame element instead
+                                */
+                                Event.on(oIFrame, "resize", fireTextResize);
+                            }
                         }
                         Module.textResizeInitialized = true;
                     }
@@ -1421,7 +1392,7 @@
         
             this.resizeMonitor.style.top = nTop + "px";
             this.resizeMonitor.style.left =  nLeft + "px";
-        
+
         },
         
         /**
@@ -1755,7 +1726,7 @@
         },
 
         /**
-         * This method is a private helper, used when constructing the DOM structure for the module 
+         * This method is a protected helper, used when constructing the DOM structure for the module 
          * to account for situations which may cause Operation Aborted errors in IE. It should not 
          * be used for general DOM construction.
          * <p>
@@ -1834,10 +1805,8 @@
         * @type Object
         */
         EVENT_TYPES = {
-        
             "BEFORE_MOVE": "beforeMove",
             "MOVE": "move"
-        
         },
 
         /**
@@ -1848,21 +1817,21 @@
         * @type Object
         */
         DEFAULT_CONFIG = {
-        
+
             "X": { 
                 key: "x", 
                 validator: Lang.isNumber, 
                 suppressEvent: true, 
-                supercedes: ["iframe"] 
+                supercedes: ["iframe"]
             },
-        
+
             "Y": { 
                 key: "y", 
                 validator: Lang.isNumber, 
                 suppressEvent: true, 
-                supercedes: ["iframe"] 
+                supercedes: ["iframe"]
             },
-        
+
             "XY": { 
                 key: "xy", 
                 suppressEvent: true, 
@@ -1903,7 +1872,7 @@
                 key: "constraintoviewport", 
                 value: false, 
                 validator: Lang.isBoolean, 
-                supercedes: ["iframe", "x", "y", "xy"] 
+                supercedes: ["iframe", "x", "y", "xy"]
             }, 
 
             "IFRAME": { 
@@ -1925,7 +1894,7 @@
 
     /**
     * Number representing how much the iframe shim should be offset from each 
-    * side of an Overlay instance.
+    * side of an Overlay instance, in pixels.
     * @property YAHOO.widget.Overlay.IFRAME_SRC
     * @default 3
     * @static
@@ -1933,8 +1902,19 @@
     * @type Number
     */
     Overlay.IFRAME_OFFSET = 3;
-    
+
     /**
+    * Number representing the minimum distance an Overlay instance should be 
+    * positioned relative to the boundaries of the browser's viewport, in pixels.
+    * @property YAHOO.widget.Overlay.VIEWPORT_OFFSET
+    * @default 10
+    * @static
+    * @final
+    * @type Number
+    */
+    Overlay.VIEWPORT_OFFSET = 10;
+
+    /**
     * Constant representing the top left corner of an element, used for 
     * configuring the context element alignment
     * @property YAHOO.widget.Overlay.TOP_LEFT
@@ -1943,7 +1923,7 @@
     * @type String
     */
     Overlay.TOP_LEFT = "tl";
-    
+
     /**
     * Constant representing the top right corner of an element, used for 
     * configuring the context element alignment
@@ -1953,7 +1933,7 @@
     * @type String
     */
     Overlay.TOP_RIGHT = "tr";
-    
+
     /**
     * Constant representing the top bottom left corner of an element, used for 
     * configuring the context element alignment
@@ -1963,7 +1943,7 @@
     * @type String
     */
     Overlay.BOTTOM_LEFT = "bl";
-    
+
     /**
     * Constant representing the bottom right corner of an element, used for 
     * configuring the context element alignment
@@ -1973,7 +1953,7 @@
     * @type String
     */
     Overlay.BOTTOM_RIGHT = "br";
-    
+
     /**
     * Constant representing the default CSS class used for an Overlay
     * @property YAHOO.widget.Overlay.CSS_OVERLAY
@@ -1982,22 +1962,21 @@
     * @type String
     */
     Overlay.CSS_OVERLAY = "yui-overlay";
-    
-    
+
     /**
     * A singleton CustomEvent used for reacting to the DOM event for 
     * window scroll
     * @event YAHOO.widget.Overlay.windowScrollEvent
     */
     Overlay.windowScrollEvent = new CustomEvent("windowScroll");
-    
+
     /**
     * A singleton CustomEvent used for reacting to the DOM event for
     * window resize
     * @event YAHOO.widget.Overlay.windowResizeEvent
     */
     Overlay.windowResizeEvent = new CustomEvent("windowResize");
-    
+
     /**
     * The DOM event handler used to fire the CustomEvent for window scroll
     * @method YAHOO.widget.Overlay.windowScrollHandler
@@ -2005,13 +1984,13 @@
     * @param {DOMEvent} e The DOM scroll event
     */
     Overlay.windowScrollHandler = function (e) {
-    
+
         if (YAHOO.env.ua.ie) {
 
             if (! window.scrollEnd) {
                 window.scrollEnd = -1;
             }
-    
+
             clearTimeout(window.scrollEnd);
     
             window.scrollEnd = setTimeout(function () { 
@@ -2045,7 +2024,7 @@
             Overlay.windowResizeEvent.fire();
         }
     };
-    
+
     /**
     * A boolean that indicated whether the window resize and scroll events have 
     * already been subscribed to.
@@ -2054,7 +2033,7 @@
     * @type Boolean
     */
     Overlay._initialized = null;
-    
+
     if (Overlay._initialized === null) {
         Event.on(window, "scroll", Overlay.windowScrollHandler);
         Event.on(window, "resize", Overlay.windowResizeHandler);
@@ -2063,7 +2042,7 @@
     }
 
     YAHOO.extend(Overlay, Module, {
-    
+
         /**
         * The Overlay initialization method, which is executed for Overlay and  
         * all of its subclasses. This method is automatically called by the 
@@ -2084,7 +2063,7 @@
             */
     
             Overlay.superclass.init.call(this, el/*, userConfig*/);  
-            
+
             this.beforeInitEvent.fire(Overlay);
             
             Dom.addClass(this.element, Overlay.CSS_OVERLAY);
@@ -2219,7 +2198,7 @@
                 supercedes: DEFAULT_CONFIG.CONTEXT.supercedes
             
             });
-    
+
             /**
             * True if the Overlay should be anchored to the center of 
             * the viewport.
@@ -2243,13 +2222,13 @@
             * @default null
             */
             this.cfg.addProperty(DEFAULT_CONFIG.WIDTH.key, {
-            
+
                 handler: this.configWidth, 
                 suppressEvent: DEFAULT_CONFIG.WIDTH.suppressEvent, 
                 supercedes: DEFAULT_CONFIG.WIDTH.supercedes
-            
+
             });
-            
+
             /**
             * CSS height of the Overlay.
             * @config height
@@ -2257,13 +2236,13 @@
             * @default null
             */
             this.cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key, {
-            
+
                 handler: this.configHeight, 
                 suppressEvent: DEFAULT_CONFIG.HEIGHT.suppressEvent, 
                 supercedes: DEFAULT_CONFIG.HEIGHT.supercedes
             
             });
-            
+
             /**
             * CSS z-index of the Overlay.
             * @config zIndex
@@ -2271,10 +2250,10 @@
             * @default null
             */
             this.cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key, {
-    
+
                 handler: this.configzIndex,
                 value: DEFAULT_CONFIG.ZINDEX.value
-    
+
             });
             
             /**
@@ -2285,12 +2264,12 @@
             * @default false
             */
             this.cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key, {
-            
+
                 handler: this.configConstrainToViewport, 
                 value: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value, 
                 validator: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator, 
                 supercedes: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes
-            
+
             });
             
             /**
@@ -2304,7 +2283,7 @@
             * @default true for IE6 and below, false for all other browsers.
             */
             this.cfg.addProperty(DEFAULT_CONFIG.IFRAME.key, {
-            
+
                 handler: this.configIframe, 
                 value: DEFAULT_CONFIG.IFRAME.value, 
                 validator: DEFAULT_CONFIG.IFRAME.validator, 
@@ -2321,9 +2300,7 @@
         * @param {Number} y The Overlay's new y position
         */
         moveTo: function (x, y) {
-    
             this.cfg.setProperty("xy", [x, y]);
-    
         },
 
         /**
@@ -2375,64 +2352,64 @@
                 eff, ei, e, i, j, k, h,
                 nEffects,
                 nEffectInstances;
-    
+
             if (currentVis == "inherit") {
                 e = this.element.parentNode;
-    
+
                 while (e.nodeType != 9 && e.nodeType != 11) {
                     currentVis = Dom.getStyle(e, "visibility");
-    
+
                     if (currentVis != "inherit") { 
                         break; 
                     }
-    
+
                     e = e.parentNode;
                 }
-    
+
                 if (currentVis == "inherit") {
                     currentVis = "visible";
                 }
             }
-    
+
             if (effect) {
                 if (effect instanceof Array) {
                     nEffects = effect.length;
-    
+
                     for (i = 0; i < nEffects; i++) {
                         eff = effect[i];
                         effectInstances[effectInstances.length] = 
                             eff.effect(this, eff.duration);
-    
+
                     }
                 } else {
                     effectInstances[effectInstances.length] = 
                         effect.effect(this, effect.duration);
                 }
             }
-    
-        
+
+
             if (visible) { // Show
                 if (isMacGecko) {
                     this.showMacGeckoScrollbars();
                 }
-    
+
                 if (effect) { // Animate in
                     if (visible) { // Animate in if not showing
                         if (currentVis != "visible" || currentVis === "") {
                             this.beforeShowEvent.fire();
                             nEffectInstances = effectInstances.length;
-    
+
                             for (j = 0; j < nEffectInstances; j++) {
                                 ei = effectInstances[j];
                                 if (j === 0 && !alreadySubscribed(
                                         ei.animateInCompleteEvent, 
                                         this.showEvent.fire, this.showEvent)) {
-    
+
                                     /*
                                          Delegate showEvent until end 
                                          of animateInComplete
                                     */
-    
+
                                     ei.animateInCompleteEvent.subscribe(
                                      this.showEvent.fire, this.showEvent, true);
                                 }
@@ -2443,15 +2420,15 @@
                 } else { // Show
                     if (currentVis != "visible" || currentVis === "") {
                         this.beforeShowEvent.fire();
-    
+
                         Dom.setStyle(this.element, "visibility", "visible");
-    
+
                         this.cfg.refireEvent("iframe");
                         this.showEvent.fire();
                     }
                 }
             } else { // Hide
-    
+
                 if (isMacGecko) {
                     this.hideMacGeckoScrollbars();
                 }
@@ -2479,13 +2456,13 @@
                             }
                             h.animateOut();
                         }
-    
+
                     } else if (currentVis === "") {
                         Dom.setStyle(this.element, "visibility", "hidden");
                     }
-    
+
                 } else { // Simple hide
-    
+
                     if (currentVis == "visible" || currentVis === "") {
                         this.beforeHideEvent.fire();
                         Dom.setStyle(this.element, "visibility", "hidden");
@@ -2517,30 +2494,30 @@
         * this will usually equal the owner.
         */
         configFixedCenter: function (type, args, obj) {
-    
+
             var val = args[0],
                 alreadySubscribed = Config.alreadySubscribed,
                 windowResizeEvent = Overlay.windowResizeEvent,
                 windowScrollEvent = Overlay.windowScrollEvent;
-            
+
             if (val) {
                 this.center();
 
                 if (!alreadySubscribed(this.beforeShowEvent, this.center, this)) {
                     this.beforeShowEvent.subscribe(this.center);
                 }
-            
+
                 if (!alreadySubscribed(windowResizeEvent, this.doCenterOnDOMEvent, this)) {
                     windowResizeEvent.subscribe(this.doCenterOnDOMEvent, this, true);
                 }
-            
+
                 if (!alreadySubscribed(windowScrollEvent, this.doCenterOnDOMEvent, this)) {
                     windowScrollEvent.subscribe(this.doCenterOnDOMEvent, this, true);
                 }
-    
+
             } else {
                 this.beforeShowEvent.unsubscribe(this.center);
-    
+
                 windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent, this);
                 windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent, this);
             }
@@ -2559,11 +2536,11 @@
     
             var height = args[0],
                 el = this.element;
-    
+
             Dom.setStyle(el, "height", height);
             this.cfg.refireEvent("iframe");
         },
-        
+
         /**
         * The default event handler fired when the "width" property is changed.
         * @method configWidth
@@ -2574,7 +2551,7 @@
         * this will usually equal the owner.
         */
         configWidth: function (type, args, obj) {
-    
+
             var width = args[0],
                 el = this.element;
     
@@ -2663,7 +2640,7 @@
             this.cfg.setProperty("y", y, true);
 
             this.beforeMoveEvent.fire([x, y]);
-            
+
             x = this.cfg.getProperty("x");
             y = this.cfg.getProperty("y");
             
@@ -2674,7 +2651,7 @@
             this.cfg.refireEvent("iframe");
             this.moveEvent.fire([x, y]);
         },
-        
+
         /**
         * The default event handler fired when the "y" property is changed.
         * @method configY
@@ -2776,7 +2753,7 @@
          * </p>
          * @method stackIframe
          */
-        stackIframe: function() {
+        stackIframe: function () {
             if (this.iframe) {
                 var overlayZ = Dom.getStyle(this.element, "zIndex");
                 if (!YAHOO.lang.isUndefined(overlayZ) && !isNaN(overlayZ)) {
@@ -2802,8 +2779,7 @@
 
                 var oIFrame = this.iframe,
                     oElement = this.element,
-                    oParent,
-                    aXY;
+                    oParent;
 
                 if (!oIFrame) {
                     if (!m_oIFrameTemplate) {
@@ -2915,23 +2891,38 @@
         * this will usually equal the owner.
         */
         configConstrainToViewport: function (type, args, obj) {
-    
+
+            function constrainBeforeShow() {
+                if (YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))) {
+                    // Set CFG XY based on DOM XY
+                    this.syncPosition();
+                }
+                var x = this.cfg.getProperty("x");
+                var y = this.cfg.getProperty("y");
+
+                // Account for XY being set silently (no moveTo fired/called)
+                var cXY = this.getConstrainedXY(x, y);
+                if (cXY[0] !== x || cXY[1] !== y) {
+                    this.moveTo(cXY[0], cXY[1]);
+                }
+            }
+
             var val = args[0];
-    
+
             if (val) {
-                if (! Config.alreadySubscribed(this.beforeMoveEvent, 
-                    this.enforceConstraints, this)) {
-    
-                    this.beforeMoveEvent.subscribe(this.enforceConstraints, 
-                        this, true);
-    
+                if (! Config.alreadySubscribed(this.beforeMoveEvent, this.enforceConstraints, this)) {
+                    this.beforeMoveEvent.subscribe(this.enforceConstraints, this, true);
                 }
+
+                if (! Config.alreadySubscribed(this.beforeShowEvent, constrainBeforeShow)) {
+                    this.beforeShowEvent.subscribe(constrainBeforeShow);
+                }
             } else {
+                this.beforeShowEvent.unsubscribe(constrainBeforeShow);
                 this.beforeMoveEvent.unsubscribe(this.enforceConstraints, this);
             }
-    
         },
-        
+
         /**
         * The default event handler fired when the "context" property 
         * is changed.
@@ -2958,29 +2949,28 @@
                 if (contextEl) {
     
                     if (typeof contextEl == "string") {
-    
+
                         this.cfg.setProperty("context", 
                             [document.getElementById(contextEl), 
                                 elementMagnetCorner, contextMagnetCorner], 
                                 true);
-    
+
                     }
                     
                     if (elementMagnetCorner && contextMagnetCorner) {
-    
+
                         this.align(elementMagnetCorner, contextMagnetCorner);
-    
+
                     }
-    
+
                 }
-    
+
             }
-    
+
         },
-        
-        
+
         // END BUILT-IN PROPERTY EVENT HANDLERS //
-        
+
         /**
         * Aligns the Overlay to its context element using the specified corner 
         * points (represented by the constants TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, 
@@ -2992,14 +2982,13 @@
         * that the elementAlign corner should stick to.
         */
         align: function (elementAlign, contextAlign) {
-    
+
             var contextArgs = this.cfg.getProperty("context"),
                 me = this,
                 context,
                 element,
                 contextRegion;
-    
-    
+
             function doAlign(v, h) {
     
                 switch (elementAlign) {
@@ -3031,47 +3020,33 @@
                 me = this;
                 
                 if (! elementAlign) {
-    
                     elementAlign = contextArgs[1];
-    
                 }
                 
                 if (! contextAlign) {
-    
                     contextAlign = contextArgs[2];
-    
                 }
                 
                 if (element && context) {
-    
                     contextRegion = Dom.getRegion(context);
-                    
+
                     switch (contextAlign) {
     
                     case Overlay.TOP_LEFT:
-    
                         doAlign(contextRegion.top, contextRegion.left);
-    
                         break;
     
                     case Overlay.TOP_RIGHT:
-    
                         doAlign(contextRegion.top, contextRegion.right);
-    
                         break;
     
                     case Overlay.BOTTOM_LEFT:
-    
                         doAlign(contextRegion.bottom, contextRegion.left);
-    
                         break;
     
                     case Overlay.BOTTOM_RIGHT:
-    
                         doAlign(contextRegion.bottom, contextRegion.right);
-    
                         break;
-    
                     }
     
                 }
@@ -3079,7 +3054,7 @@
             }
             
         },
-        
+
         /**
         * The default event handler executed when the moveEvent is fired, if the 
         * "constraintoviewport" is set to true.
@@ -3091,70 +3066,96 @@
         * this will usually equal the owner.
         */
         enforceConstraints: function (type, args, obj) {
-    
-            var pos = args[0],
-                x = pos[0],
-                y = pos[1],
-                offsetHeight = this.element.offsetHeight,
-                offsetWidth = this.element.offsetWidth,
+            var pos = args[0];
+            var cXY = this.getConstrainedXY(pos[0], pos[1]);
+            this.cfg.setProperty("x", cXY[0], true);
+            this.cfg.setProperty("y", cXY[1], true);
+            this.cfg.setProperty("xy", cXY, true);
+        },
+
+        /**
+         * Given x, y coordinate values, returns the calculated coordinates required to 
+         * position the Overlay if it is to be constrained to the viewport, based on the 
+         * current element size, viewport dimensions and scroll values.
+         *
+         * @param {Number} x The X coordinate value to be constrained
+         * @param {Number} y The Y coordinate value to be constrained
+         * @return {Array} The constrained x and y coordinates at index 0 and 1 respectively;
+         */
+        getConstrainedXY: function(x, y) {
+
+            var nViewportOffset = Overlay.VIEWPORT_OFFSET,
                 viewPortWidth = Dom.getViewportWidth(),
                 viewPortHeight = Dom.getViewportHeight(),
+                offsetHeight = this.element.offsetHeight,
+                offsetWidth = this.element.offsetWidth,
                 scrollX = Dom.getDocumentScrollLeft(),
-                scrollY = Dom.getDocumentScrollTop(),
-                topConstraint = scrollY + 10,
-                leftConstraint = scrollX + 10,
-                bottomConstraint = scrollY + viewPortHeight - offsetHeight - 10,
-                rightConstraint = scrollX + viewPortWidth - offsetWidth - 10;
-        
-    
-            if (x < leftConstraint) {
-    
-                x = leftConstraint;
-    
-            } else if (x > rightConstraint) {
-    
-                x = rightConstraint;
-    
+                scrollY = Dom.getDocumentScrollTop();
+
+            var xNew = x;
+            var yNew = y;
+
+            if (offsetWidth + nViewportOffset < viewPortWidth) {
+
+                var leftConstraint = scrollX + nViewportOffset;
+                var rightConstraint = scrollX + viewPortWidth - offsetWidth - nViewportOffset;
+
+                if (x < leftConstraint) {
+                    xNew = leftConstraint;
+                } else if (x > rightConstraint) {
+                    xNew = rightConstraint;
+                }
+            } else {
+                xNew = nViewportOffset + scrollX;
             }
-            
-            if (y < topConstraint) {
-    
-                y = topConstraint;
-    
-            } else if (y > bottomConstraint) {
-    
-                y = bottomConstraint;
-    
+
+            if (offsetHeight + nViewportOffset < viewPortHeight) {
+
+                var topConstraint = scrollY + nViewportOffset;
+                var bottomConstraint = scrollY + viewPortHeight - offsetHeight - nViewportOffset;
+
+                if (y < topConstraint) {
+                    yNew  = topConstraint;
+                } else if (y  > bottomConstraint) {
+                    yNew  = bottomConstraint;
+                }
+            } else {
+                yNew = nViewportOffset + scrollY;
             }
-            
-            this.cfg.setProperty("x", x, true);
-            this.cfg.setProperty("y", y, true);
-            this.cfg.setProperty("xy", [x, y], true);
-    
+
+            return [xNew, yNew];
         },
-        
+
         /**
         * Centers the container in the viewport.
         * @method center
         */
         center: function () {
-    
-            var scrollX = Dom.getDocumentScrollLeft(),
-                scrollY = Dom.getDocumentScrollTop(),
-    
-                viewPortWidth = Dom.getClientWidth(),
-                viewPortHeight = Dom.getClientHeight(),
+
+            var nViewportOffset = Overlay.VIEWPORT_OFFSET,
                 elementWidth = this.element.offsetWidth,
                 elementHeight = this.element.offsetHeight,
-                x = (viewPortWidth / 2) - (elementWidth / 2) + scrollX,
-                y = (viewPortHeight / 2) - (elementHeight / 2) + scrollY;
-            
+                viewPortWidth = Dom.getViewportWidth(),
+                viewPortHeight = Dom.getViewportHeight(),
+                x,
+                y;
+
+            if (elementWidth < viewPortWidth) {
+                x = (viewPortWidth / 2) - (elementWidth / 2) + Dom.getDocumentScrollLeft();
+            } else {
+                x = nViewportOffset + Dom.getDocumentScrollLeft();
+            }
+
+            if (elementHeight < viewPortHeight) {
+                y = (viewPortHeight / 2) - (elementHeight / 2) + Dom.getDocumentScrollTop();
+            } else {
+                y = nViewportOffset + Dom.getDocumentScrollTop();
+            }
+
             this.cfg.setProperty("xy", [parseInt(x, 10), parseInt(y, 10)]);
-            
             this.cfg.refireEvent("iframe");
-    
         },
-        
+
         /**
         * Synchronizes the Panel's "xy", "x", and "y" properties with the 
         * Panel's position in the DOM. This is primarily used to update  
@@ -3162,15 +3163,15 @@
         * @method syncPosition
         */
         syncPosition: function () {
-    
+
             var pos = Dom.getXY(this.element);
-    
+
             this.cfg.setProperty("x", pos[0], true);
             this.cfg.setProperty("y", pos[1], true);
             this.cfg.setProperty("xy", pos, true);
-    
+
         },
-        
+
         /**
         * Event handler fired when the resize monitor element is resized.
         * @method onDomResize
@@ -3178,11 +3179,11 @@
         * @param {Object} obj The scope object
         */
         onDomResize: function (e, obj) {
-    
+
             var me = this;
-    
+
             Overlay.superclass.onDomResize.call(this, e, obj);
-    
+
             setTimeout(function () {
                 me.syncPosition();
                 me.cfg.refireEvent("iframe");
@@ -3196,83 +3197,71 @@
         * YAHOO.widget.Overlay.
         * @method bringToTop
         */
-        bringToTop: function() {
-    
+        bringToTop: function () {
+
             var aOverlays = [],
                 oElement = this.element;
-    
+
             function compareZIndexDesc(p_oOverlay1, p_oOverlay2) {
-        
+
                 var sZIndex1 = Dom.getStyle(p_oOverlay1, "zIndex"),
-        
                     sZIndex2 = Dom.getStyle(p_oOverlay2, "zIndex"),
-        
-                    nZIndex1 = (!sZIndex1 || isNaN(sZIndex1)) ? 
-                        0 : parseInt(sZIndex1, 10),
-        
-                    nZIndex2 = (!sZIndex2 || isNaN(sZIndex2)) ? 
-                        0 : parseInt(sZIndex2, 10);
-        
+
+                    nZIndex1 = (!sZIndex1 || isNaN(sZIndex1)) ? 0 : parseInt(sZIndex1, 10),
+                    nZIndex2 = (!sZIndex2 || isNaN(sZIndex2)) ? 0 : parseInt(sZIndex2, 10);
+
                 if (nZIndex1 > nZIndex2) {
-        
                     return -1;
-        
                 } else if (nZIndex1 < nZIndex2) {
-        
                     return 1;
-        
                 } else {
-        
                     return 0;
-        
                 }
-        
             }
-        
+
             function isOverlayElement(p_oElement) {
-        
+
                 var oOverlay = Dom.hasClass(p_oElement, Overlay.CSS_OVERLAY),
                     Panel = YAHOO.widget.Panel;
-            
+
                 if (oOverlay && !Dom.isAncestor(oElement, oOverlay)) {
-                
                     if (Panel && Dom.hasClass(p_oElement, Panel.CSS_PANEL)) {
-        
                         aOverlays[aOverlays.length] = p_oElement.parentNode;
-                    
-                    }
-                    else {
-        
+                    } else {
                         aOverlays[aOverlays.length] = p_oElement;
-        
                     }
-                
                 }
-            
             }
-            
+
             Dom.getElementsBy(isOverlayElement, "DIV", document.body);
-    
+
             aOverlays.sort(compareZIndexDesc);
-            
+
             var oTopOverlay = aOverlays[0],
                 nTopZIndex;
-            
+
             if (oTopOverlay) {
-    
                 nTopZIndex = Dom.getStyle(oTopOverlay, "zIndex");
-    
-                if (!isNaN(nTopZIndex) && oTopOverlay != oElement) {
-    
-                    this.cfg.setProperty("zindex", 
-                        (parseInt(nTopZIndex, 10) + 2));
-    
+
+                if (!isNaN(nTopZIndex)) {
+                    var bRequiresBump = false;
+
+                    if (oTopOverlay != oElement) {
+                        bRequiresBump = true;
+                    } else if (aOverlays.length > 1) {
+                        var nNextZIndex = Dom.getStyle(aOverlays[1], "zIndex");
+                        // Don't rely on DOM order to stack if 2 overlays are at the same zindex.
+                        if (!isNaN(nNextZIndex) && (nTopZIndex == nNextZIndex)) {
+                            bRequiresBump = true;
+                        }
+                    }
+                    if (bRequiresBump) {
+                        this.cfg.setProperty("zindex", (parseInt(nTopZIndex, 10) + 2));
+                    }
                 }
-            
             }
-        
         },
-        
+
         /**
         * Removes the Overlay element from the DOM and sets all child 
         * elements to null.
@@ -3281,11 +3270,9 @@
         destroy: function () {
 
             if (this.iframe) {
-    
                 this.iframe.parentNode.removeChild(this.iframe);
-    
             }
-        
+
             this.iframe = null;
         
             Overlay.windowResizeEvent.unsubscribe(
@@ -3512,7 +3499,7 @@
                     i = nOverlays - 1;
 
                     do {
-                        this.overlays[i].blur();                    
+                        this.overlays[i].blur();
                     }
                     while(i--);
                 }
@@ -3673,22 +3660,33 @@
                 aOverlays.sort(this.compareZIndexDesc);
 
                 oTopOverlay = aOverlays[0];
-                
-                if (oTopOverlay) {
 
+                if (oTopOverlay) {
                     nTopZIndex = Dom.getStyle(oTopOverlay.element, "zIndex");
-    
-                    if (!isNaN(nTopZIndex) && oTopOverlay != oOverlay) {
-    
-                        oOverlay.cfg.setProperty("zIndex", 
-                            (parseInt(nTopZIndex, 10) + 2));
-    
+
+                    if (!isNaN(nTopZIndex)) {
+
+                        var bRequiresBump = false;
+
+                        if (oTopOverlay !== oOverlay) {
+                            bRequiresBump = true;
+                        } else if (aOverlays.length > 1) {
+                            var nNextZIndex = Dom.getStyle(aOverlays[1].element, "zIndex");
+                            // Don't rely on DOM order to stack if 2 overlays are at the same zindex.
+                            if (!isNaN(nNextZIndex) && (nTopZIndex == nNextZIndex)) {
+                                bRequiresBump = true;
+                            }
+                        }
+
+                        if (bRequiresBump) {
+                            oOverlay.cfg.setProperty("zindex", (parseInt(nTopZIndex, 10) + 2));
+                        }
                     }
                     aOverlays.sort(this.compareZIndexDesc);
                 }
             }
         },
-        
+
         /**
         * Attempts to locate an Overlay by instance or ID.
         * @method find
@@ -3698,7 +3696,7 @@
         * cannot be located.
         */
         find: function (overlay) {
-        
+
             var aOverlays = this.overlays,
                 nOverlays = aOverlays.length,
                 i;
@@ -3771,7 +3769,7 @@
                 while(i--);
             }
         },
-        
+
         /**
         * Hides all Overlays in the manager.
         * @method hideAll
@@ -3790,7 +3788,7 @@
                 while(i--);
             }
         },
-        
+
         /**
         * Returns a string representation of the object.
         * @method toString
@@ -3888,67 +3886,69 @@
     * @return {YAHOO.widget.ContainerEffect} The configured ContainerEffect object
     */
     ContainerEffect.FADE = function (overlay, dur) {
-    
-        var fade = new ContainerEffect(overlay, 
-        
-            { attributes: { opacity: { from: 0, to: 1 } }, 
-                duration: dur, 
-                method: Easing.easeIn }, 
-            
-            { attributes: { opacity: { to: 0 } },
-                duration: dur, 
-                method: Easing.easeOut }, 
-            
-            overlay.element);
-        
-    
+
+        var fin = {
+            attributes: {opacity:{from:0, to:1}},
+            duration: dur,
+            method: Easing.easeIn
+        };
+
+        var fout = {
+            attributes: {opacity:{to:0}},
+            duration: dur,
+            method: Easing.easeOut
+        };
+
+        var fade = new ContainerEffect(overlay, fin, fout, overlay.element);
+
+        fade.handleUnderlayStart = function() {
+            var underlay = this.overlay.underlay;
+            if (underlay && YAHOO.env.ua.ie) {
+                var hasFilters = (underlay.filters && underlay.filters.length > 0);
+                if(hasFilters) {
+                    Dom.addClass(overlay.element, "yui-effect-fade");
+                }
+            }
+        };
+
+        fade.handleUnderlayComplete = function() {
+            var underlay = this.overlay.underlay;
+            if (underlay && YAHOO.env.ua.ie) {
+                Dom.removeClass(overlay.element, "yui-effect-fade");
+            }
+        };
+
         fade.handleStartAnimateIn = function (type,args,obj) {
             Dom.addClass(obj.overlay.element, "hide-select");
-        
-            if (! obj.overlay.underlay) {
+
+            if (!obj.overlay.underlay) {
                 obj.overlay.cfg.refireEvent("underlay");
             }
-        
-            if (obj.overlay.underlay) {
-    
-                obj.initialUnderlayOpacity = 
-                    Dom.getStyle(obj.overlay.underlay, "opacity");
-    
-                obj.overlay.underlay.style.filter = null;
-    
-            }
-        
+
+            obj.handleUnderlayStart();
+
             Dom.setStyle(obj.overlay.element, "visibility", "visible");
             Dom.setStyle(obj.overlay.element, "opacity", 0);
         };
-        
-    
+
         fade.handleCompleteAnimateIn = function (type,args,obj) {
             Dom.removeClass(obj.overlay.element, "hide-select");
-        
+
             if (obj.overlay.element.style.filter) {
                 obj.overlay.element.style.filter = null;
             }
-        
-            if (obj.overlay.underlay) {
-                Dom.setStyle(obj.overlay.underlay, "opacity", 
-                    obj.initialUnderlayOpacity);
-            }
-        
+
+            obj.handleUnderlayComplete();
+
             obj.overlay.cfg.refireEvent("iframe");
             obj.animateInCompleteEvent.fire();
         };
-        
-    
+
         fade.handleStartAnimateOut = function (type, args, obj) {
             Dom.addClass(obj.overlay.element, "hide-select");
-        
-            if (obj.overlay.underlay) {
-                obj.overlay.underlay.style.filter = null;
-            }
+            obj.handleUnderlayStart();
         };
-        
-    
+
         fade.handleCompleteAnimateOut =  function (type, args, obj) {
             Dom.removeClass(obj.overlay.element, "hide-select");
             if (obj.overlay.element.style.filter) {
@@ -3956,12 +3956,13 @@
             }
             Dom.setStyle(obj.overlay.element, "visibility", "hidden");
             Dom.setStyle(obj.overlay.element, "opacity", 1);
-        
+
+            obj.handleUnderlayComplete();
+
             obj.overlay.cfg.refireEvent("iframe");
-        
             obj.animateOutCompleteEvent.fire();
         };
-        
+
         fade.init();
         return fade;
     };
@@ -4033,11 +4034,9 @@
     
             var vw = Dom.getViewportWidth(),
                 pos = Dom.getXY(obj.overlay.element),
-                yso = pos[1],
-                currentTo = obj.animOut.attributes.points.to;
+                yso = pos[1];
     
             obj.animOut.attributes.points.to = [(vw + 25), yso];
-    
         };
         
         slide.handleTweenAnimateOut = function (type, args, obj) {
@@ -4194,4 +4193,4 @@
 
 })();
 
-YAHOO.register("container_core", YAHOO.widget.Module, {version: "2.3.1", build: "541"});
+YAHOO.register("containercore", YAHOO.widget.Module, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/datasource/README
===================================================================
--- trunk/root/static/yui/datasource/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/datasource/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,19 @@
 DataSource Release Notes
 
+**** version 2.4.1 ***
+
+No change
+
+**** version 2.4.0 ***
+
+* Support for YUI JSON Utility.
+
+* Implemented setInterval(), clearInterval(), and clearAllIntervals() for polling.
+
+* Text data parsing algorithm now tolerates newlines within and at the end of data.
+
+
+
 **** version 2.3.1 ***
 
 * No changes.

Modified: trunk/root/static/yui/datasource/datasource-beta-debug.js
===================================================================
--- trunk/root/static/yui/datasource/datasource-beta-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/datasource/datasource-beta-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * The DataSource utility provides a common configurable interface for widgets
@@ -86,6 +86,9 @@
         this._aCache = [];
         YAHOO.log("Cache initialized", "info", this.toString());
     }
+    
+    // Initialize interval tracker
+    this._aIntervals = [];
 
     this._sName = "DataSource instance" + YAHOO.util.DataSource._nIndex;
     YAHOO.util.DataSource._nIndex++;
@@ -344,6 +347,15 @@
  */
 YAHOO.util.DataSource.prototype._oQueue = null;
 
+/**
+ * Array of polling interval IDs that have been enabled, needed to clear all intervals.
+ *
+ * @property _aIntervals
+ * @type Array
+ * @private
+ */
+YAHOO.util.DataSource.prototype._aIntervals = null;
+
 /////////////////////////////////////////////////////////////////////////////
 //
 // Private methods
@@ -688,6 +700,63 @@
 };
 
 /**
+ * Sets up a polling mechanism to send requests at set intervals and forward
+ * responses to given callback.
+ *
+ * @method setInterval
+ * @param nMsec {Number} Length of interval in milliseconds.
+ * @param oRequest {Object} Request object.
+ * @param oCallback {Function} Handler function to receive the response.
+ * @param oCaller {Object} The Calling object that is making the request.
+ * @return {Number} Interval ID.
+ */
+YAHOO.util.DataSource.prototype.setInterval = function(nMsec, oRequest, oCallback, oCaller) {
+    //TODO: management and cleanup of interval IDs
+    try {
+        YAHOO.log("Enabling polling to live data for \"" + oRequest + "\" at interval " + nMsec, "info", this.toString());
+        var oSelf = this;
+        var nId = setInterval(function() {
+            oSelf.makeConnection(oRequest, oCallback, oCaller);
+        }, nMsec);
+        this._aIntervals.push(nId);
+        return nId;
+    }
+    catch(e) {
+        YAHOO.log("Could not enable polling to live data for \"" + oRequest + "\" at interval " + nMsec, "info", this.toString());
+    }
+};
+
+/**
+ * Disables polling mechanism associated with the given interval ID.
+ *
+ * @method clearInterval
+ * @param nId {Number} Interval ID.
+ */
+YAHOO.util.DataSource.prototype.clearInterval = function(nId) {
+    // Remove from tracker if there
+    var tracker = this._aIntervals || [];
+    for(var i=tracker.length-1; i>-1; i--) {
+        if(tracker[i] === nId) {
+            tracker.splice(i,1);
+            clearInterval(nId);
+        }
+    }
+};
+
+/**
+ * Disables all known polling intervals.
+ *
+ * @method clearAllIntervals
+ */
+YAHOO.util.DataSource.prototype.clearAllIntervals = function(nId) {
+    var tracker = this._aIntervals || [];
+    for(var i=tracker.length-1; i>-1; i--) {
+        tracker.splice(i,1);
+        clearInterval(nId);
+    }
+};
+
+/**
  * First looks for cached response, then sends request to live data.
  *
  * @method sendRequest
@@ -1109,36 +1178,44 @@
             // Cycle through each record, except the first which contains header info
             for(var i = recordsarray.length-1; i>-1; i--) {
                 var oResult = {};
+                var bError = false;
                 for(var j=fields.length-1; j>-1; j--) {
-                    // Split along field delimter to get each data value
-                    var fielddataarray = recordsarray[i].split(fieldDelim);
+                    try {
+                        // Split along field delimiter to get each data value
+                        var fielddataarray = recordsarray[i].split(fieldDelim);
 
-                    // Remove quotation marks from edges, if applicable
-                    var data = fielddataarray[j];
-                    if(data.charAt(0) == "\"") {
-                        data = data.substr(1);
+                        // Remove quotation marks from edges, if applicable
+                        var data = fielddataarray[j];
+                        if(data.charAt(0) == "\"") {
+                            data = data.substr(1);
+                        }
+                        if(data.charAt(data.length-1) == "\"") {
+                            data = data.substr(0,data.length-1);
+                        }
+                        var field = fields[j];
+                        var key = (YAHOO.lang.isValue(field.key)) ? field.key : field;
+                        // Backward compatibility
+                        if(!field.parser && field.converter) {
+                            field.parser = field.converter;
+                            YAHOO.log("The field property converter has been deprecated" +
+                                    " in favor of parser", "warn", this.toString());
+                        }
+                        if(field.parser) {
+                            data = field.parser.call(this, data);
+                        }
+                        // Safety measure
+                        if(data === undefined) {
+                            data = null;
+                        }
+                        oResult[key] = data;
                     }
-                    if(data.charAt(data.length-1) == "\"") {
-                        data = data.substr(0,data.length-1);
+                    catch(e) {
+                        bError = true;
                     }
-                    var field = fields[j];
-                    var key = (YAHOO.lang.isValue(field.key)) ? field.key : field;
-                    // Backward compatibility
-                    if(!field.parser && field.converter) {
-                        field.parser = field.converter;
-                        YAHOO.log("The field property converter has been deprecated" +
-                                " in favor of parser", "warn", this.toString());
-                    }
-                    if(field.parser) {
-                        data = field.parser.call(this, data);
-                    }
-                    // Safety measure
-                    if(data === undefined) {
-                        data = null;
-                    }
-                    oResult[key] = data;
                 }
-                oParsedResponse.results.unshift(oResult);
+                if(!bError) {
+                    oParsedResponse.results.unshift(oResult);
+                }
             }
         }
         YAHOO.log("Parsed text data is " +
@@ -1163,9 +1240,15 @@
 YAHOO.util.DataSource.prototype.parseXMLData = function(oRequest, oRawResponse) {
         var bError = false;
         var oParsedResponse = {};
-        var xmlList = (this.responseSchema.resultNode) ?
+        var xmlList = null;
+        // In case oRawResponse is something funky
+        try {
+            xmlList = (this.responseSchema.resultNode) ?
                 oRawResponse.getElementsByTagName(this.responseSchema.resultNode) :
                 null;
+        }
+        catch(e) {
+        }
         if(!xmlList || !YAHOO.lang.isArray(this.responseSchema.fields)) {
             bError = true;
         }
@@ -1253,6 +1336,14 @@
                     bError = true;
                 }
             }
+            // Check for YUI JSON lib but divert KHTML clients
+            else if(YAHOO.lang.JSON && isNotMac) {
+                // Use the JSON utility if available
+                jsonObj = YAHOO.lang.JSON.parse(oRawResponse);
+                if(!jsonObj) {
+                    bError = true;
+                }
+            }
             // Check for older JSON lib but divert KHTML clients
             else if(window.JSON && JSON.parse && isNotMac) {
                 // Use the JSON utility if available
@@ -1427,4 +1518,178 @@
         return oParsedResponse;
 };
 
-YAHOO.register("datasource", YAHOO.util.DataSource, {version: "2.3.1", build: "541"});
+/**
+ * The Number utility provides helper functions to deal with data of type Number.
+ *
+ * @namespace YAHOO.util
+ * @module number
+ * @requires datasource
+ * @title Number Utility
+ * @beta
+ */
+
+/****************************************************************************/
+/****************************************************************************/
+/****************************************************************************/
+
+/**
+ * The static Number class provides helper functions to deal with data of type
+ * Number.
+ *
+ * @class Number
+ * @static
+ */
+ YAHOO.util.Number = {
+ 
+     /**
+     * Takes a native JavaScript Number and formats to string for display to user.
+     *
+     * @method format
+     * @param nData {Number} Number.
+     * @param oConfig {Object} (Optional) Optional configuration values:
+     *  <dl>
+     *   <dt>prefix {String}</dd>
+     *   <dd>String prepended before each number, like a currency designator "$"</dd>
+     *   <dt>decimalPlaces {Number}</dd>
+     *   <dd>Number of decimal places to round.</dd>
+     *   <dt>decimalSeparator {String}</dd>
+     *   <dd>Decimal separator</dd>
+     *   <dt>thousandsSeparator {String}</dd>
+     *   <dd>Thousands separator</dd>
+     *   <dt>suffix {String}</dd>
+     *   <dd>String appended after each number, like " items" (note the space)</dd>
+     *  </dl>
+     * @return {String} Formatted number for display.
+     */
+    format: function(nData, oConfig) {
+        oConfig = oConfig || {};
+        
+        if(!YAHOO.lang.isNumber(nData)) {
+            nData *= 1;
+        }
+
+        if(YAHOO.lang.isNumber(nData)) {
+            var sOutput = nData + "";
+            var sDecimalSeparator = (oConfig.decimalSeparator) ? oConfig.decimalSeparator : ".";
+            var nDotIndex;
+
+            // Manage decimals
+            if(YAHOO.lang.isNumber(oConfig.decimalPlaces)) {
+                // Round to the correct decimal place
+                var nDecimalPlaces = oConfig.decimalPlaces;
+                var nDecimal = Math.pow(10, nDecimalPlaces);
+                sOutput = Math.round(nData*nDecimal)/nDecimal + "";
+                nDotIndex = sOutput.lastIndexOf(".");
+
+                if(nDecimalPlaces > 0) {
+                    // Add the decimal separator
+                    if(nDotIndex < 0) {
+                        sOutput += sDecimalSeparator;
+                        nDotIndex = sOutput.length-1;
+                    }
+                    // Replace the "."
+                    else if(sDecimalSeparator !== "."){
+                        sOutput = sOutput.replace(".",sDecimalSeparator);
+                    }
+                    // Add missing zeros
+                    while((sOutput.length - 1 - nDotIndex) < nDecimalPlaces) {
+                        sOutput += "0";
+                    }
+                }
+            }
+            
+            // Add the thousands separator
+            if(oConfig.thousandsSeparator) {
+                var sThousandsSeparator = oConfig.thousandsSeparator;
+                nDotIndex = sOutput.lastIndexOf(sDecimalSeparator);
+                nDotIndex = (nDotIndex > -1) ? nDotIndex : sOutput.length;
+                var sNewOutput = sOutput.substring(nDotIndex);
+                var nCount = -1;
+                for (var i=nDotIndex; i>0; i--) {
+                    nCount++;
+                    if ((nCount%3 === 0) && (i !== nDotIndex)) {
+                        sNewOutput = sThousandsSeparator + sNewOutput;
+                    }
+                    sNewOutput = sOutput.charAt(i-1) + sNewOutput;
+                }
+                sOutput = sNewOutput;
+            }
+
+            // Prepend prefix
+            sOutput = (oConfig.prefix) ? oConfig.prefix + sOutput : sOutput;
+
+            // Append suffix
+            sOutput = (oConfig.suffix) ? sOutput + oConfig.suffix : sOutput;
+
+            return sOutput;
+        }
+        // Still not a Number, just return unaltered
+        else {
+            return nData;
+        }
+    }
+ };
+
+
+
+/**
+ * The Date utility provides helper functions to deal with data of type Date.
+ *
+ * @namespace YAHOO.util
+ * @module date
+ * @requires datasource
+ * @title Date Utility
+ * @beta
+ */
+
+/****************************************************************************/
+/****************************************************************************/
+/****************************************************************************/
+
+/**
+ * The static Date class provides helper functions to deal with data of type
+ * Number.
+ *
+ * @class Date
+ * @static
+ */
+ YAHOO.util.Date = {
+     /**
+     * Takes a native JavaScript Date and formats to string for display to user.
+     *
+     * @method format
+     * @param oDate {Date} Date.
+     * @param oConfig {Object} (Optional) Optional configuration values:
+     *  <dl>
+     *   <dt>format {String}</dd>
+     *   <dd>Currently only the following formats are supported:
+     *   "MM/DD/YYYY", "YYYY/MM/DD", or "DD/MM/YYYY"</dd>
+     *  </dl>
+     * @return {String} Formatted date for display.
+     */
+    format: function(oDate, oConfig) {
+        oConfig = oConfig || {};
+        
+        if(oDate instanceof Date) {
+            var format = oConfig.format || "MM/DD/YYYY";
+            var mm = oDate.getMonth()+1;
+            var dd = oDate.getDate();
+            var yyyy = oDate.getFullYear();
+            
+            switch(format) {
+                case "YYYY/MM/DD":
+                    return yyyy + "/" + mm +"/" + dd;
+                case "DD/MM/YYYY":
+                    return dd + "/" + mm + "/" + yyyy;
+                default: // "MM/DD/YYYY"
+                    return mm + "/" + dd + "/" + yyyy;
+            }
+        }
+        else {
+            return YAHOO.lang.isValue(oDate) ? oDate : "";
+        }
+    }
+ };
+
+
+YAHOO.register("datasource", YAHOO.util.DataSource, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/datasource/datasource-beta-min.js
===================================================================
--- trunk/root/static/yui/datasource/datasource-beta-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/datasource/datasource-beta-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,8 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-YAHOO.util.DataSource=function(B,D){if(D&&(D.constructor==Object)){for(var C in D){if(C){this[C]=D[C];}}}if(!B){return ;}if(B.nodeType&&B.nodeType==9){this.dataType=YAHOO.util.DataSource.TYPE_XML;}else{if(YAHOO.lang.isArray(B)){this.dataType=YAHOO.util.DataSource.TYPE_JSARRAY;}else{if(YAHOO.lang.isString(B)){this.dataType=YAHOO.util.DataSource.TYPE_XHR;}else{if(YAHOO.lang.isFunction(B)){this.dataType=YAHOO.util.DataSource.TYPE_JSFUNCTION;}else{if(B.nodeName&&(B.nodeName.toLowerCase()=="table")){this.dataType=YAHOO.util.DataSource.TYPE_HTMLTABLE;}else{if(YAHOO.lang.isObject(B)){this.dataType=YAHOO.util.DataSource.TYPE_JSON;}else{this.dataType=YAHOO.util.DataSource.TYPE_UNKNOWN;}}}}}}this.liveData=B;this._oQueue={interval:null,conn:null,requests:[]};var A=this.maxCacheEntries;if(!YAHOO.lang.isNumber(A)||(A<0)){A=0;}if(A>0&&!this._aCache){this._aCache=[];}this._sName="DataSource instance"+YAHOO.util.DataSource._nIndex;YAHOO.util.DataSource._nIndex++;this.createEvent("cacheRequ!
 estEvent");this.createEvent("cacheResponseEvent");this.createEvent("requestEvent");this.createEvent("responseEvent");this.createEvent("responseParseEvent");this.createEvent("responseCacheEvent");this.createEvent("dataErrorEvent");this.createEvent("cacheFlushEvent");};YAHOO.augment(YAHOO.util.DataSource,YAHOO.util.EventProvider);YAHOO.util.DataSource.TYPE_UNKNOWN=-1;YAHOO.util.DataSource.TYPE_JSARRAY=0;YAHOO.util.DataSource.TYPE_JSFUNCTION=1;YAHOO.util.DataSource.TYPE_XHR=2;YAHOO.util.DataSource.TYPE_JSON=3;YAHOO.util.DataSource.TYPE_XML=4;YAHOO.util.DataSource.TYPE_TEXT=5;YAHOO.util.DataSource.TYPE_HTMLTABLE=6;YAHOO.util.DataSource.ERROR_DATAINVALID="Invalid data";YAHOO.util.DataSource.ERROR_DATANULL="Null data";YAHOO.util.DataSource._nIndex=0;YAHOO.util.DataSource._nTransactionId=0;YAHOO.util.DataSource.prototype._sName=null;YAHOO.util.DataSource.prototype._aCache=null;YAHOO.util.DataSource.prototype._oQueue=null;YAHOO.util.DataSource.prototype.maxCacheEntries=0;YAHOO.util!
 .DataSource.prototype.liveData=null;YAHOO.util.DataSource.prot!
 otype.da
taType=YAHOO.util.DataSource.TYPE_UNKNOWN;YAHOO.util.DataSource.prototype.responseType=YAHOO.util.DataSource.TYPE_UNKNOWN;YAHOO.util.DataSource.prototype.responseSchema=null;YAHOO.util.DataSource.prototype.connMgr=null;YAHOO.util.DataSource.prototype.connXhrMode="allowAll";YAHOO.util.DataSource.prototype.connMethodPost=false;YAHOO.util.DataSource.prototype.connTimeout=0;YAHOO.util.DataSource.parseString=function(B){if(!YAHOO.lang.isValue(B)){return null;}var A=B+"";if(YAHOO.lang.isString(A)){return A;}else{return null;}};YAHOO.util.DataSource.parseNumber=function(B){var A=B*1;if(YAHOO.lang.isNumber(A)){return A;}else{return null;}};YAHOO.util.DataSource.convertNumber=function(A){return YAHOO.util.DataSource.parseNumber(A);};YAHOO.util.DataSource.parseDate=function(B){var A=null;if(!(B instanceof Date)){A=new Date(B);}else{return B;}if(A instanceof Date){return A;}else{return null;}};YAHOO.util.DataSource.convertDate=function(A){return YAHOO.util.DataSource.parseDate(A);};YAH!
 OO.util.DataSource.prototype.toString=function(){return this._sName;};YAHOO.util.DataSource.prototype.getCachedResponse=function(H,B,G){var A=this._aCache;var D=(A)?A.length:0;var F=null;if((this.maxCacheEntries>0)&&A&&(D>0)){this.fireEvent("cacheRequestEvent",{request:H,callback:B,caller:G});for(var E=D-1;E>=0;E--){var C=A[E];if(this.isCacheHit(H,C.request)){F=C.response;A.splice(E,1);this.addToCache(H,F);this.fireEvent("cacheResponseEvent",{request:H,response:F,callback:B,caller:G});break;}}}return F;};YAHOO.util.DataSource.prototype.isCacheHit=function(A,B){return(A===B);};YAHOO.util.DataSource.prototype.addToCache=function(D,C){var A=this._aCache;if(!A){return ;}while(A.length>=this.maxCacheEntries){A.shift();}var B={request:D,response:C};A.push(B);this.fireEvent("responseCacheEvent",{request:D,response:C});};YAHOO.util.DataSource.prototype.flushCache=function(){if(this._aCache){this._aCache=[];this.fireEvent("cacheFlushEvent");}};YAHOO.util.DataSource.prototype.sendReq!
 uest=function(D,A,C){var B=this.getCachedResponse(D,A,C);if(B)!
 {A.call(
C,D,B);return null;}return this.makeConnection(D,A,C);};YAHOO.util.DataSource.prototype.makeConnection=function(A,P,K){this.fireEvent("requestEvent",{request:A,callback:P,caller:K});var D=null;var L=YAHOO.util.DataSource._nTransactionId++;switch(this.dataType){case YAHOO.util.DataSource.TYPE_JSFUNCTION:D=this.liveData(A);this.handleResponse(A,D,P,K,L);break;case YAHOO.util.DataSource.TYPE_XHR:var N=this;var C=this.connMgr||YAHOO.util.Connect;var G=this._oQueue;var J=function(Q){if(Q&&(this.connXhrMode=="ignoreStaleResponses")&&(Q.tId!=G.conn.tId)){return null;}else{if(!Q){this.fireEvent("dataErrorEvent",{request:A,callback:P,caller:K,message:YAHOO.util.DataSource.ERROR_DATANULL});P.call(K,A,Q,true);return null;}else{this.handleResponse(A,Q,P,K,L);}}};var O=function(Q){this.fireEvent("dataErrorEvent",{request:A,callback:P,caller:K,message:YAHOO.util.DataSource.ERROR_DATAINVALID});if((this.liveData.lastIndexOf("?")!==this.liveData.length-1)&&(A.indexOf("?")!==0)){}P.call(K,A,Q!
 ,true);return null;};var I={success:J,failure:O,scope:this};if(YAHOO.lang.isNumber(this.connTimeout)){I.timeout=this.connTimeout;}if(this.connXhrMode=="cancelStaleRequests"){if(G.conn){if(C.abort){C.abort(G.conn);G.conn=null;}else{}}}if(C&&C.asyncRequest){var B=this.liveData;var H=this.connMethodPost;var M=(H)?"POST":"GET";var E=(H)?B:B+A;var F=(H)?A:null;if(this.connXhrMode!="queueRequests"){G.conn=C.asyncRequest(M,E,I,F);}else{if(G.conn){G.requests.push({request:A,callback:I});if(!G.interval){G.interval=setInterval(function(){if(C.isCallInProgress(G.conn)){return ;}else{if(G.requests.length>0){E=(H)?B:B+G.requests[0].request;F=(H)?G.requests[0].request:null;G.conn=C.asyncRequest(M,E,G.requests[0].callback,F);G.requests.shift();}else{clearInterval(G.interval);G.interval=null;}}},50);}}else{G.conn=C.asyncRequest(M,E,I,F);}}}else{P.call(K,A,null,true);}break;default:D=this.liveData;this.handleResponse(A,D,P,K,L);
-break;}return L;};YAHOO.util.DataSource.prototype.handleResponse=function(E,C,B,D,H){this.fireEvent("responseEvent",{request:E,response:C,callback:B,caller:D,tId:H});var G=(this.dataType==YAHOO.util.DataSource.TYPE_XHR)?true:false;var F=null;var A=false;C=this.doBeforeParseData(E,C);switch(this.responseType){case YAHOO.util.DataSource.TYPE_JSARRAY:if(G&&C.responseText){C=C.responseText;}F=this.parseArrayData(E,C);break;case YAHOO.util.DataSource.TYPE_JSON:if(G&&C.responseText){C=C.responseText;}F=this.parseJSONData(E,C);break;case YAHOO.util.DataSource.TYPE_HTMLTABLE:if(G&&C.responseText){C=C.responseText;}F=this.parseHTMLTableData(E,C);break;case YAHOO.util.DataSource.TYPE_XML:if(G&&C.responseXML){C=C.responseXML;}F=this.parseXMLData(E,C);break;case YAHOO.util.DataSource.TYPE_TEXT:if(G&&C.responseText){C=C.responseText;}F=this.parseTextData(E,C);break;default:break;}if(F){F.tId=H;F=this.doBeforeCallback(E,C,F);this.fireEvent("responseParseEvent",{request:E,response:F,callb!
 ack:B,caller:D});this.addToCache(E,F);}else{this.fireEvent("dataErrorEvent",{request:E,callback:B,caller:D,message:YAHOO.util.DataSource.ERROR_DATANULL});F={error:true};}B.call(D,E,F);};YAHOO.util.DataSource.prototype.doBeforeParseData=function(B,A){return A;};YAHOO.util.DataSource.prototype.doBeforeCallback=function(B,A,C){return C;};YAHOO.util.DataSource.prototype.parseArrayData=function(A,B){if(YAHOO.lang.isArray(B)&&YAHOO.lang.isArray(this.responseSchema.fields)){var J={results:[]};var G=this.responseSchema.fields;for(var E=B.length-1;E>-1;E--){var F={};for(var C=G.length-1;C>-1;C--){var H=G[C];var I=(YAHOO.lang.isValue(H.key))?H.key:H;var D=(YAHOO.lang.isValue(B[E][C]))?B[E][C]:B[E][I];if(!H.parser&&H.converter){H.parser=H.converter;}if(H.parser){D=H.parser.call(this,D);}if(D===undefined){D=null;}F[I]=D;}J.results.unshift(F);}return J;}else{return null;}};YAHOO.util.DataSource.prototype.parseTextData=function(A,B){var N={};if(YAHOO.lang.isString(B)&&YAHOO.lang.isArray(!
 this.responseSchema.fields)&&YAHOO.lang.isString(this.response!
 Schema.r
ecordDelim)&&YAHOO.lang.isString(this.responseSchema.fieldDelim)){N.results=[];var K=this.responseSchema.recordDelim;var G=this.responseSchema.fieldDelim;var J=this.responseSchema.fields;if(B.length>0){var C=B.length-K.length;if(B.substr(C)==K){B=B.substr(0,C);}var O=B.split(K);for(var F=O.length-1;F>-1;F--){var I={};for(var D=J.length-1;D>-1;D--){var H=O[F].split(G);var E=H[D];if(E.charAt(0)=="\""){E=E.substr(1);}if(E.charAt(E.length-1)=="\""){E=E.substr(0,E.length-1);}var L=J[D];var M=(YAHOO.lang.isValue(L.key))?L.key:L;if(!L.parser&&L.converter){L.parser=L.converter;}if(L.parser){E=L.parser.call(this,E);}if(E===undefined){E=null;}I[M]=E;}N.results.unshift(I);}}}else{N.error=true;}return N;};YAHOO.util.DataSource.prototype.parseXMLData=function(A,C){var I=false;var M={};var D=(this.responseSchema.resultNode)?C.getElementsByTagName(this.responseSchema.resultNode):null;if(!D||!YAHOO.lang.isArray(this.responseSchema.fields)){I=true;}else{M.results=[];for(var F=D.length-1;F>=0!
 ;F--){var N=D.item(F);var H={};for(var E=this.responseSchema.fields.length-1;E>=0;E--){var J=this.responseSchema.fields[E];var L=(YAHOO.lang.isValue(J.key))?J.key:J;var G=null;var B=N.attributes.getNamedItem(L);if(B){G=B.value;}else{var K=N.getElementsByTagName(L);if(K&&K.item(0)&&K.item(0).firstChild){G=K.item(0).firstChild.nodeValue;}else{G="";}}if(!J.parser&&J.converter){J.parser=J.converter;}if(J.parser){G=J.parser.call(this,G);}if(G===undefined){G=null;}H[L]=G;}M.results.unshift(H);}}if(I){M.error=true;}else{}return M;};YAHOO.util.DataSource.prototype.parseJSONData=function(oRequest,oRawResponse){var oParsedResponse={};if(oRawResponse&&YAHOO.lang.isArray(this.responseSchema.fields)){var fields=this.responseSchema.fields;var bError=false;oParsedResponse.results=[];var jsonObj,jsonList;if(YAHOO.lang.isString(oRawResponse)){var isNotMac=(navigator.userAgent.toLowerCase().indexOf("khtml")==-1);if(oRawResponse.parseJSON&&isNotMac){jsonObj=oRawResponse.parseJSON();if(!jsonOb!
 j){bError=true;}}else{if(window.JSON&&JSON.parse&&isNotMac){js!
 onObj=JS
ON.parse(oRawResponse);if(!jsonObj){bError=true;}}else{try{while(oRawResponse.length>0&&(oRawResponse.charAt(0)!="{")&&(oRawResponse.charAt(0)!="[")){oRawResponse=oRawResponse.substring(1,oRawResponse.length);}if(oRawResponse.length>0){var objEnd=Math.max(oRawResponse.lastIndexOf("]"),oRawResponse.lastIndexOf("}"));oRawResponse=oRawResponse.substring(0,objEnd+1);jsonObj=eval("("+oRawResponse+")");if(!jsonObj){bError=true;}}else{jsonObj=null;bError=true;}}catch(e){bError=true;}}}}else{if(oRawResponse.constructor==Object){jsonObj=oRawResponse;}else{bError=true;}}if(jsonObj&&jsonObj.constructor==Object){try{jsonList=eval("jsonObj."+this.responseSchema.resultsList);}catch(e){bError=true;}}if(bError||!jsonList){oParsedResponse.error=true;}if(jsonList&&!YAHOO.lang.isArray(jsonList)){jsonList=[jsonList];}else{if(!jsonList){jsonList=[];}}for(var i=jsonList.length-1;i>=0;i--){var oResult={};var jsonResult=jsonList[i];for(var j=fields.length-1;j>=0;j--){var field=fields[j];var key=(YA!
 HOO.lang.isValue(field.key))?field.key:field;var data=eval("jsonResult."+key);if(!field.parser&&field.converter){field.parser=field.converter;}if(field.parser){data=field.parser.call(this,data);}if(data===undefined){data=null;}oResult[key]=data;}oParsedResponse.results.unshift(oResult);}}else{oParsedResponse.error=true;}return oParsedResponse;};YAHOO.util.DataSource.prototype.parseHTMLTableData=function(B,C){var K=false;var L=C;var J=this.responseSchema.fields;var O={};O.results=[];for(var H=0;H<L.tBodies.length;H++){var D=L.tBodies[H];for(var F=D.rows.length-1;F>-1;F--){var A=D.rows[F];var I={};for(var E=J.length-1;E>-1;E--){var M=J[E];var N=(YAHOO.lang.isValue(M.key))?M.key:M;var G=A.cells[E].innerHTML;if(!M.parser&&M.converter){M.parser=M.converter;}if(M.parser){G=M.parser.call(this,G);}if(G===undefined){G=null;}I[N]=G;}O.results.unshift(I);}}if(K){O.error=true;}else{}return O;};YAHOO.register("datasource",YAHOO.util.DataSource,{version:"2.3.1",build:"541"});
+YAHOO.util.DataSource=function(B,D){if(D&&(D.constructor==Object)){for(var C in D){if(C){this[C]=D[C];}}}if(!B){return ;}if(B.nodeType&&B.nodeType==9){this.dataType=YAHOO.util.DataSource.TYPE_XML;}else{if(YAHOO.lang.isArray(B)){this.dataType=YAHOO.util.DataSource.TYPE_JSARRAY;}else{if(YAHOO.lang.isString(B)){this.dataType=YAHOO.util.DataSource.TYPE_XHR;}else{if(YAHOO.lang.isFunction(B)){this.dataType=YAHOO.util.DataSource.TYPE_JSFUNCTION;}else{if(B.nodeName&&(B.nodeName.toLowerCase()=="table")){this.dataType=YAHOO.util.DataSource.TYPE_HTMLTABLE;}else{if(YAHOO.lang.isObject(B)){this.dataType=YAHOO.util.DataSource.TYPE_JSON;}else{this.dataType=YAHOO.util.DataSource.TYPE_UNKNOWN;}}}}}}this.liveData=B;this._oQueue={interval:null,conn:null,requests:[]};var A=this.maxCacheEntries;if(!YAHOO.lang.isNumber(A)||(A<0)){A=0;}if(A>0&&!this._aCache){this._aCache=[];}this._aIntervals=[];this._sName="DataSource instance"+YAHOO.util.DataSource._nIndex;YAHOO.util.DataSource._nIndex++;this.cr!
 eateEvent("cacheRequestEvent");this.createEvent("cacheResponseEvent");this.createEvent("requestEvent");this.createEvent("responseEvent");this.createEvent("responseParseEvent");this.createEvent("responseCacheEvent");this.createEvent("dataErrorEvent");this.createEvent("cacheFlushEvent");};YAHOO.augment(YAHOO.util.DataSource,YAHOO.util.EventProvider);YAHOO.util.DataSource.TYPE_UNKNOWN=-1;YAHOO.util.DataSource.TYPE_JSARRAY=0;YAHOO.util.DataSource.TYPE_JSFUNCTION=1;YAHOO.util.DataSource.TYPE_XHR=2;YAHOO.util.DataSource.TYPE_JSON=3;YAHOO.util.DataSource.TYPE_XML=4;YAHOO.util.DataSource.TYPE_TEXT=5;YAHOO.util.DataSource.TYPE_HTMLTABLE=6;YAHOO.util.DataSource.ERROR_DATAINVALID="Invalid data";YAHOO.util.DataSource.ERROR_DATANULL="Null data";YAHOO.util.DataSource._nIndex=0;YAHOO.util.DataSource._nTransactionId=0;YAHOO.util.DataSource.prototype._sName=null;YAHOO.util.DataSource.prototype._aCache=null;YAHOO.util.DataSource.prototype._oQueue=null;YAHOO.util.DataSource.prototype._aInterv!
 als=null;YAHOO.util.DataSource.prototype.maxCacheEntries=0;YAH!
 OO.util.
DataSource.prototype.liveData=null;YAHOO.util.DataSource.prototype.dataType=YAHOO.util.DataSource.TYPE_UNKNOWN;YAHOO.util.DataSource.prototype.responseType=YAHOO.util.DataSource.TYPE_UNKNOWN;YAHOO.util.DataSource.prototype.responseSchema=null;YAHOO.util.DataSource.prototype.connMgr=null;YAHOO.util.DataSource.prototype.connXhrMode="allowAll";YAHOO.util.DataSource.prototype.connMethodPost=false;YAHOO.util.DataSource.prototype.connTimeout=0;YAHOO.util.DataSource.parseString=function(B){if(!YAHOO.lang.isValue(B)){return null;}var A=B+"";if(YAHOO.lang.isString(A)){return A;}else{return null;}};YAHOO.util.DataSource.parseNumber=function(B){var A=B*1;if(YAHOO.lang.isNumber(A)){return A;}else{return null;}};YAHOO.util.DataSource.convertNumber=function(A){return YAHOO.util.DataSource.parseNumber(A);};YAHOO.util.DataSource.parseDate=function(B){var A=null;if(!(B instanceof Date)){A=new Date(B);}else{return B;}if(A instanceof Date){return A;}else{return null;}};YAHOO.util.DataSource.co!
 nvertDate=function(A){return YAHOO.util.DataSource.parseDate(A);};YAHOO.util.DataSource.prototype.toString=function(){return this._sName;};YAHOO.util.DataSource.prototype.getCachedResponse=function(H,B,G){var A=this._aCache;var D=(A)?A.length:0;var F=null;if((this.maxCacheEntries>0)&&A&&(D>0)){this.fireEvent("cacheRequestEvent",{request:H,callback:B,caller:G});for(var E=D-1;E>=0;E--){var C=A[E];if(this.isCacheHit(H,C.request)){F=C.response;A.splice(E,1);this.addToCache(H,F);this.fireEvent("cacheResponseEvent",{request:H,response:F,callback:B,caller:G});break;}}}return F;};YAHOO.util.DataSource.prototype.isCacheHit=function(A,B){return(A===B);};YAHOO.util.DataSource.prototype.addToCache=function(D,C){var A=this._aCache;if(!A){return ;}while(A.length>=this.maxCacheEntries){A.shift();}var B={request:D,response:C};A.push(B);this.fireEvent("responseCacheEvent",{request:D,response:C});};YAHOO.util.DataSource.prototype.flushCache=function(){if(this._aCache){this._aCache=[];this.fi!
 reEvent("cacheFlushEvent");}};YAHOO.util.DataSource.prototype.!
 setInter
val=function(D,F,B,E){try{var C=this;var A=setInterval(function(){C.makeConnection(F,B,E);},D);this._aIntervals.push(A);return A;}catch(G){}};YAHOO.util.DataSource.prototype.clearInterval=function(A){var C=this._aIntervals||[];for(var B=C.length-1;B>-1;B--){if(C[B]===A){C.splice(B,1);clearInterval(A);}}};YAHOO.util.DataSource.prototype.clearAllIntervals=function(A){var C=this._aIntervals||[];for(var B=C.length-1;B>-1;B--){C.splice(B,1);clearInterval(A);}};YAHOO.util.DataSource.prototype.sendRequest=function(D,A,C){var B=this.getCachedResponse(D,A,C);if(B){A.call(C,D,B);return null;}return this.makeConnection(D,A,C);};YAHOO.util.DataSource.prototype.makeConnection=function(A,P,K){this.fireEvent("requestEvent",{request:A,callback:P,caller:K});var D=null;var L=YAHOO.util.DataSource._nTransactionId++;switch(this.dataType){case YAHOO.util.DataSource.TYPE_JSFUNCTION:D=this.liveData(A);this.handleResponse(A,D,P,K,L);break;case YAHOO.util.DataSource.TYPE_XHR:var N=this;var C=this.co!
 nnMgr||YAHOO.util.Connect;var G=this._oQueue;var J=function(Q){if(Q&&(this.connXhrMode=="ignoreStaleResponses")&&(Q.tId!=G.conn.tId)){return null;}else{if(!Q){this.fireEvent("dataErrorEvent",{request:A,callback:P,caller:K,message:YAHOO.util.DataSource.ERROR_DATANULL});P.call(K,A,Q,true);return null;}else{this.handleResponse(A,Q,P,K,L);}}};var O=function(Q){this.fireEvent("dataErrorEvent",{request:A,callback:P,caller:K,message:YAHOO.util.DataSource.ERROR_DATAINVALID});if((this.liveData.lastIndexOf("?")!==this.liveData.length-1)&&(A.indexOf("?")!==0)){}P.call(K,A,Q,true);return null;};var I={success:J,failure:O,scope:this};if(YAHOO.lang.isNumber(this.connTimeout)){I.timeout=this.connTimeout;}if(this.connXhrMode=="cancelStaleRequests"){if(G.conn){if(C.abort){C.abort(G.conn);G.conn=null;}else{}}}if(C&&C.asyncRequest){var B=this.liveData;var H=this.connMethodPost;var M=(H)?"POST":"GET";var E=(H)?B:B+A;var F=(H)?A:null;
+if(this.connXhrMode!="queueRequests"){G.conn=C.asyncRequest(M,E,I,F);}else{if(G.conn){G.requests.push({request:A,callback:I});if(!G.interval){G.interval=setInterval(function(){if(C.isCallInProgress(G.conn)){return ;}else{if(G.requests.length>0){E=(H)?B:B+G.requests[0].request;F=(H)?G.requests[0].request:null;G.conn=C.asyncRequest(M,E,G.requests[0].callback,F);G.requests.shift();}else{clearInterval(G.interval);G.interval=null;}}},50);}}else{G.conn=C.asyncRequest(M,E,I,F);}}}else{P.call(K,A,null,true);}break;default:D=this.liveData;this.handleResponse(A,D,P,K,L);break;}return L;};YAHOO.util.DataSource.prototype.handleResponse=function(E,C,B,D,H){this.fireEvent("responseEvent",{request:E,response:C,callback:B,caller:D,tId:H});var G=(this.dataType==YAHOO.util.DataSource.TYPE_XHR)?true:false;var F=null;var A=false;C=this.doBeforeParseData(E,C);switch(this.responseType){case YAHOO.util.DataSource.TYPE_JSARRAY:if(G&&C.responseText){C=C.responseText;}F=this.parseArrayData(E,C);brea!
 k;case YAHOO.util.DataSource.TYPE_JSON:if(G&&C.responseText){C=C.responseText;}F=this.parseJSONData(E,C);break;case YAHOO.util.DataSource.TYPE_HTMLTABLE:if(G&&C.responseText){C=C.responseText;}F=this.parseHTMLTableData(E,C);break;case YAHOO.util.DataSource.TYPE_XML:if(G&&C.responseXML){C=C.responseXML;}F=this.parseXMLData(E,C);break;case YAHOO.util.DataSource.TYPE_TEXT:if(G&&C.responseText){C=C.responseText;}F=this.parseTextData(E,C);break;default:break;}if(F){F.tId=H;F=this.doBeforeCallback(E,C,F);this.fireEvent("responseParseEvent",{request:E,response:F,callback:B,caller:D});this.addToCache(E,F);}else{this.fireEvent("dataErrorEvent",{request:E,callback:B,caller:D,message:YAHOO.util.DataSource.ERROR_DATANULL});F={error:true};}B.call(D,E,F);};YAHOO.util.DataSource.prototype.doBeforeParseData=function(B,A){return A;};YAHOO.util.DataSource.prototype.doBeforeCallback=function(B,A,C){return C;};YAHOO.util.DataSource.prototype.parseArrayData=function(A,B){if(YAHOO.lang.isArray(B!
 )&&YAHOO.lang.isArray(this.responseSchema.fields)){var J={resu!
 lts:[]};
var G=this.responseSchema.fields;for(var E=B.length-1;E>-1;E--){var F={};for(var C=G.length-1;C>-1;C--){var H=G[C];var I=(YAHOO.lang.isValue(H.key))?H.key:H;var D=(YAHOO.lang.isValue(B[E][C]))?B[E][C]:B[E][I];if(!H.parser&&H.converter){H.parser=H.converter;}if(H.parser){D=H.parser.call(this,D);}if(D===undefined){D=null;}F[I]=D;}J.results.unshift(F);}return J;}else{return null;}};YAHOO.util.DataSource.prototype.parseTextData=function(A,B){var P={};if(YAHOO.lang.isString(B)&&YAHOO.lang.isArray(this.responseSchema.fields)&&YAHOO.lang.isString(this.responseSchema.recordDelim)&&YAHOO.lang.isString(this.responseSchema.fieldDelim)){P.results=[];var M=this.responseSchema.recordDelim;var G=this.responseSchema.fieldDelim;var J=this.responseSchema.fields;if(B.length>0){var C=B.length-M.length;if(B.substr(C)==M){B=B.substr(0,C);}var Q=B.split(M);for(var F=Q.length-1;F>-1;F--){var I={};var K=false;for(var D=J.length-1;D>-1;D--){try{var H=Q[F].split(G);var E=H[D];if(E.charAt(0)=="\""){E=E!
 .substr(1);}if(E.charAt(E.length-1)=="\""){E=E.substr(0,E.length-1);}var N=J[D];var O=(YAHOO.lang.isValue(N.key))?N.key:N;if(!N.parser&&N.converter){N.parser=N.converter;}if(N.parser){E=N.parser.call(this,E);}if(E===undefined){E=null;}I[O]=E;}catch(L){K=true;}}if(!K){P.results.unshift(I);}}}}else{P.error=true;}return P;};YAHOO.util.DataSource.prototype.parseXMLData=function(A,C){var I=false;var N={};var D=null;try{D=(this.responseSchema.resultNode)?C.getElementsByTagName(this.responseSchema.resultNode):null;}catch(J){}if(!D||!YAHOO.lang.isArray(this.responseSchema.fields)){I=true;}else{N.results=[];for(var F=D.length-1;F>=0;F--){var O=D.item(F);var H={};for(var E=this.responseSchema.fields.length-1;E>=0;E--){var K=this.responseSchema.fields[E];var M=(YAHOO.lang.isValue(K.key))?K.key:K;var G=null;var B=O.attributes.getNamedItem(M);if(B){G=B.value;}else{var L=O.getElementsByTagName(M);if(L&&L.item(0)&&L.item(0).firstChild){G=L.item(0).firstChild.nodeValue;}else{G="";}}if(!K.p!
 arser&&K.converter){K.parser=K.converter;}if(K.parser){G=K.par!
 ser.call
(this,G);}if(G===undefined){G=null;}H[M]=G;}N.results.unshift(H);}}if(I){N.error=true;}else{}return N;};YAHOO.util.DataSource.prototype.parseJSONData=function(oRequest,oRawResponse){var oParsedResponse={};if(oRawResponse&&YAHOO.lang.isArray(this.responseSchema.fields)){var fields=this.responseSchema.fields;var bError=false;oParsedResponse.results=[];var jsonObj,jsonList;if(YAHOO.lang.isString(oRawResponse)){var isNotMac=(navigator.userAgent.toLowerCase().indexOf("khtml")==-1);if(oRawResponse.parseJSON&&isNotMac){jsonObj=oRawResponse.parseJSON();if(!jsonObj){bError=true;}}else{if(YAHOO.lang.JSON&&isNotMac){jsonObj=YAHOO.lang.JSON.parse(oRawResponse);if(!jsonObj){bError=true;}}else{if(window.JSON&&JSON.parse&&isNotMac){jsonObj=JSON.parse(oRawResponse);if(!jsonObj){bError=true;}}else{try{while(oRawResponse.length>0&&(oRawResponse.charAt(0)!="{")&&(oRawResponse.charAt(0)!="[")){oRawResponse=oRawResponse.substring(1,oRawResponse.length);}if(oRawResponse.length>0){var objEnd=Math.!
 max(oRawResponse.lastIndexOf("]"),oRawResponse.lastIndexOf("}"));oRawResponse=oRawResponse.substring(0,objEnd+1);jsonObj=eval("("+oRawResponse+")");if(!jsonObj){bError=true;}}else{jsonObj=null;bError=true;}}catch(e){bError=true;}}}}}else{if(oRawResponse.constructor==Object){jsonObj=oRawResponse;}else{bError=true;}}if(jsonObj&&jsonObj.constructor==Object){try{jsonList=eval("jsonObj."+this.responseSchema.resultsList);}catch(e){bError=true;}}if(bError||!jsonList){oParsedResponse.error=true;}if(jsonList&&!YAHOO.lang.isArray(jsonList)){jsonList=[jsonList];}else{if(!jsonList){jsonList=[];}}for(var i=jsonList.length-1;i>=0;i--){var oResult={};var jsonResult=jsonList[i];for(var j=fields.length-1;j>=0;j--){var field=fields[j];var key=(YAHOO.lang.isValue(field.key))?field.key:field;var data=eval("jsonResult."+key);if(!field.parser&&field.converter){field.parser=field.converter;}if(field.parser){data=field.parser.call(this,data);
+}if(data===undefined){data=null;}oResult[key]=data;}oParsedResponse.results.unshift(oResult);}}else{oParsedResponse.error=true;}return oParsedResponse;};YAHOO.util.DataSource.prototype.parseHTMLTableData=function(B,C){var K=false;var L=C;var J=this.responseSchema.fields;var O={};O.results=[];for(var H=0;H<L.tBodies.length;H++){var D=L.tBodies[H];for(var F=D.rows.length-1;F>-1;F--){var A=D.rows[F];var I={};for(var E=J.length-1;E>-1;E--){var M=J[E];var N=(YAHOO.lang.isValue(M.key))?M.key:M;var G=A.cells[E].innerHTML;if(!M.parser&&M.converter){M.parser=M.converter;}if(M.parser){G=M.parser.call(this,G);}if(G===undefined){G=null;}I[N]=G;}O.results.unshift(I);}}if(K){O.error=true;}else{}return O;};YAHOO.util.Number={format:function(B,E){E=E||{};if(!YAHOO.lang.isNumber(B)){B*=1;}if(YAHOO.lang.isNumber(B)){var I=B+"";var F=(E.decimalSeparator)?E.decimalSeparator:".";var G;if(YAHOO.lang.isNumber(E.decimalPlaces)){var H=E.decimalPlaces;var C=Math.pow(10,H);I=Math.round(B*C)/C+"";G=I.!
 lastIndexOf(".");if(H>0){if(G<0){I+=F;G=I.length-1;}else{if(F!=="."){I=I.replace(".",F);}}while((I.length-1-G)<H){I+="0";}}}if(E.thousandsSeparator){var K=E.thousandsSeparator;G=I.lastIndexOf(F);G=(G>-1)?G:I.length;var J=I.substring(G);var A=-1;for(var D=G;D>0;D--){A++;if((A%3===0)&&(D!==G)){J=K+J;}J=I.charAt(D-1)+J;}I=J;}I=(E.prefix)?E.prefix+I:I;I=(E.suffix)?I+E.suffix:I;return I;}else{return B;}}};YAHOO.util.Date={format:function(C,B){B=B||{};if(C instanceof Date){var D=B.format||"MM/DD/YYYY";var E=C.getMonth()+1;var A=C.getDate();var F=C.getFullYear();switch(D){case"YYYY/MM/DD":return F+"/"+E+"/"+A;case"DD/MM/YYYY":return A+"/"+E+"/"+F;default:return E+"/"+A+"/"+F;}}else{return YAHOO.lang.isValue(C)?C:"";}}};YAHOO.register("datasource",YAHOO.util.DataSource,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/datasource/datasource-beta.js
===================================================================
--- trunk/root/static/yui/datasource/datasource-beta.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/datasource/datasource-beta.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * The DataSource utility provides a common configurable interface for widgets
@@ -83,6 +83,9 @@
     if(maxCacheEntries > 0 && !this._aCache) {
         this._aCache = [];
     }
+    
+    // Initialize interval tracker
+    this._aIntervals = [];
 
     this._sName = "DataSource instance" + YAHOO.util.DataSource._nIndex;
     YAHOO.util.DataSource._nIndex++;
@@ -340,6 +343,15 @@
  */
 YAHOO.util.DataSource.prototype._oQueue = null;
 
+/**
+ * Array of polling interval IDs that have been enabled, needed to clear all intervals.
+ *
+ * @property _aIntervals
+ * @type Array
+ * @private
+ */
+YAHOO.util.DataSource.prototype._aIntervals = null;
+
 /////////////////////////////////////////////////////////////////////////////
 //
 // Private methods
@@ -671,6 +683,61 @@
 };
 
 /**
+ * Sets up a polling mechanism to send requests at set intervals and forward
+ * responses to given callback.
+ *
+ * @method setInterval
+ * @param nMsec {Number} Length of interval in milliseconds.
+ * @param oRequest {Object} Request object.
+ * @param oCallback {Function} Handler function to receive the response.
+ * @param oCaller {Object} The Calling object that is making the request.
+ * @return {Number} Interval ID.
+ */
+YAHOO.util.DataSource.prototype.setInterval = function(nMsec, oRequest, oCallback, oCaller) {
+    //TODO: management and cleanup of interval IDs
+    try {
+        var oSelf = this;
+        var nId = setInterval(function() {
+            oSelf.makeConnection(oRequest, oCallback, oCaller);
+        }, nMsec);
+        this._aIntervals.push(nId);
+        return nId;
+    }
+    catch(e) {
+    }
+};
+
+/**
+ * Disables polling mechanism associated with the given interval ID.
+ *
+ * @method clearInterval
+ * @param nId {Number} Interval ID.
+ */
+YAHOO.util.DataSource.prototype.clearInterval = function(nId) {
+    // Remove from tracker if there
+    var tracker = this._aIntervals || [];
+    for(var i=tracker.length-1; i>-1; i--) {
+        if(tracker[i] === nId) {
+            tracker.splice(i,1);
+            clearInterval(nId);
+        }
+    }
+};
+
+/**
+ * Disables all known polling intervals.
+ *
+ * @method clearAllIntervals
+ */
+YAHOO.util.DataSource.prototype.clearAllIntervals = function(nId) {
+    var tracker = this._aIntervals || [];
+    for(var i=tracker.length-1; i>-1; i--) {
+        tracker.splice(i,1);
+        clearInterval(nId);
+    }
+};
+
+/**
  * First looks for cached response, then sends request to live data.
  *
  * @method sendRequest
@@ -1071,34 +1138,42 @@
             // Cycle through each record, except the first which contains header info
             for(var i = recordsarray.length-1; i>-1; i--) {
                 var oResult = {};
+                var bError = false;
                 for(var j=fields.length-1; j>-1; j--) {
-                    // Split along field delimter to get each data value
-                    var fielddataarray = recordsarray[i].split(fieldDelim);
+                    try {
+                        // Split along field delimiter to get each data value
+                        var fielddataarray = recordsarray[i].split(fieldDelim);
 
-                    // Remove quotation marks from edges, if applicable
-                    var data = fielddataarray[j];
-                    if(data.charAt(0) == "\"") {
-                        data = data.substr(1);
+                        // Remove quotation marks from edges, if applicable
+                        var data = fielddataarray[j];
+                        if(data.charAt(0) == "\"") {
+                            data = data.substr(1);
+                        }
+                        if(data.charAt(data.length-1) == "\"") {
+                            data = data.substr(0,data.length-1);
+                        }
+                        var field = fields[j];
+                        var key = (YAHOO.lang.isValue(field.key)) ? field.key : field;
+                        // Backward compatibility
+                        if(!field.parser && field.converter) {
+                            field.parser = field.converter;
+                        }
+                        if(field.parser) {
+                            data = field.parser.call(this, data);
+                        }
+                        // Safety measure
+                        if(data === undefined) {
+                            data = null;
+                        }
+                        oResult[key] = data;
                     }
-                    if(data.charAt(data.length-1) == "\"") {
-                        data = data.substr(0,data.length-1);
+                    catch(e) {
+                        bError = true;
                     }
-                    var field = fields[j];
-                    var key = (YAHOO.lang.isValue(field.key)) ? field.key : field;
-                    // Backward compatibility
-                    if(!field.parser && field.converter) {
-                        field.parser = field.converter;
-                    }
-                    if(field.parser) {
-                        data = field.parser.call(this, data);
-                    }
-                    // Safety measure
-                    if(data === undefined) {
-                        data = null;
-                    }
-                    oResult[key] = data;
                 }
-                oParsedResponse.results.unshift(oResult);
+                if(!bError) {
+                    oParsedResponse.results.unshift(oResult);
+                }
             }
         }
     }
@@ -1119,9 +1194,15 @@
 YAHOO.util.DataSource.prototype.parseXMLData = function(oRequest, oRawResponse) {
         var bError = false;
         var oParsedResponse = {};
-        var xmlList = (this.responseSchema.resultNode) ?
+        var xmlList = null;
+        // In case oRawResponse is something funky
+        try {
+            xmlList = (this.responseSchema.resultNode) ?
                 oRawResponse.getElementsByTagName(this.responseSchema.resultNode) :
                 null;
+        }
+        catch(e) {
+        }
         if(!xmlList || !YAHOO.lang.isArray(this.responseSchema.fields)) {
             bError = true;
         }
@@ -1203,6 +1284,14 @@
                     bError = true;
                 }
             }
+            // Check for YUI JSON lib but divert KHTML clients
+            else if(YAHOO.lang.JSON && isNotMac) {
+                // Use the JSON utility if available
+                jsonObj = YAHOO.lang.JSON.parse(oRawResponse);
+                if(!jsonObj) {
+                    bError = true;
+                }
+            }
             // Check for older JSON lib but divert KHTML clients
             else if(window.JSON && JSON.parse && isNotMac) {
                 // Use the JSON utility if available
@@ -1362,4 +1451,178 @@
         return oParsedResponse;
 };
 
-YAHOO.register("datasource", YAHOO.util.DataSource, {version: "2.3.1", build: "541"});
+/**
+ * The Number utility provides helper functions to deal with data of type Number.
+ *
+ * @namespace YAHOO.util
+ * @module number
+ * @requires datasource
+ * @title Number Utility
+ * @beta
+ */
+
+/****************************************************************************/
+/****************************************************************************/
+/****************************************************************************/
+
+/**
+ * The static Number class provides helper functions to deal with data of type
+ * Number.
+ *
+ * @class Number
+ * @static
+ */
+ YAHOO.util.Number = {
+ 
+     /**
+     * Takes a native JavaScript Number and formats to string for display to user.
+     *
+     * @method format
+     * @param nData {Number} Number.
+     * @param oConfig {Object} (Optional) Optional configuration values:
+     *  <dl>
+     *   <dt>prefix {String}</dd>
+     *   <dd>String prepended before each number, like a currency designator "$"</dd>
+     *   <dt>decimalPlaces {Number}</dd>
+     *   <dd>Number of decimal places to round.</dd>
+     *   <dt>decimalSeparator {String}</dd>
+     *   <dd>Decimal separator</dd>
+     *   <dt>thousandsSeparator {String}</dd>
+     *   <dd>Thousands separator</dd>
+     *   <dt>suffix {String}</dd>
+     *   <dd>String appended after each number, like " items" (note the space)</dd>
+     *  </dl>
+     * @return {String} Formatted number for display.
+     */
+    format: function(nData, oConfig) {
+        oConfig = oConfig || {};
+        
+        if(!YAHOO.lang.isNumber(nData)) {
+            nData *= 1;
+        }
+
+        if(YAHOO.lang.isNumber(nData)) {
+            var sOutput = nData + "";
+            var sDecimalSeparator = (oConfig.decimalSeparator) ? oConfig.decimalSeparator : ".";
+            var nDotIndex;
+
+            // Manage decimals
+            if(YAHOO.lang.isNumber(oConfig.decimalPlaces)) {
+                // Round to the correct decimal place
+                var nDecimalPlaces = oConfig.decimalPlaces;
+                var nDecimal = Math.pow(10, nDecimalPlaces);
+                sOutput = Math.round(nData*nDecimal)/nDecimal + "";
+                nDotIndex = sOutput.lastIndexOf(".");
+
+                if(nDecimalPlaces > 0) {
+                    // Add the decimal separator
+                    if(nDotIndex < 0) {
+                        sOutput += sDecimalSeparator;
+                        nDotIndex = sOutput.length-1;
+                    }
+                    // Replace the "."
+                    else if(sDecimalSeparator !== "."){
+                        sOutput = sOutput.replace(".",sDecimalSeparator);
+                    }
+                    // Add missing zeros
+                    while((sOutput.length - 1 - nDotIndex) < nDecimalPlaces) {
+                        sOutput += "0";
+                    }
+                }
+            }
+            
+            // Add the thousands separator
+            if(oConfig.thousandsSeparator) {
+                var sThousandsSeparator = oConfig.thousandsSeparator;
+                nDotIndex = sOutput.lastIndexOf(sDecimalSeparator);
+                nDotIndex = (nDotIndex > -1) ? nDotIndex : sOutput.length;
+                var sNewOutput = sOutput.substring(nDotIndex);
+                var nCount = -1;
+                for (var i=nDotIndex; i>0; i--) {
+                    nCount++;
+                    if ((nCount%3 === 0) && (i !== nDotIndex)) {
+                        sNewOutput = sThousandsSeparator + sNewOutput;
+                    }
+                    sNewOutput = sOutput.charAt(i-1) + sNewOutput;
+                }
+                sOutput = sNewOutput;
+            }
+
+            // Prepend prefix
+            sOutput = (oConfig.prefix) ? oConfig.prefix + sOutput : sOutput;
+
+            // Append suffix
+            sOutput = (oConfig.suffix) ? sOutput + oConfig.suffix : sOutput;
+
+            return sOutput;
+        }
+        // Still not a Number, just return unaltered
+        else {
+            return nData;
+        }
+    }
+ };
+
+
+
+/**
+ * The Date utility provides helper functions to deal with data of type Date.
+ *
+ * @namespace YAHOO.util
+ * @module date
+ * @requires datasource
+ * @title Date Utility
+ * @beta
+ */
+
+/****************************************************************************/
+/****************************************************************************/
+/****************************************************************************/
+
+/**
+ * The static Date class provides helper functions to deal with data of type
+ * Number.
+ *
+ * @class Date
+ * @static
+ */
+ YAHOO.util.Date = {
+     /**
+     * Takes a native JavaScript Date and formats to string for display to user.
+     *
+     * @method format
+     * @param oDate {Date} Date.
+     * @param oConfig {Object} (Optional) Optional configuration values:
+     *  <dl>
+     *   <dt>format {String}</dd>
+     *   <dd>Currently only the following formats are supported:
+     *   "MM/DD/YYYY", "YYYY/MM/DD", or "DD/MM/YYYY"</dd>
+     *  </dl>
+     * @return {String} Formatted date for display.
+     */
+    format: function(oDate, oConfig) {
+        oConfig = oConfig || {};
+        
+        if(oDate instanceof Date) {
+            var format = oConfig.format || "MM/DD/YYYY";
+            var mm = oDate.getMonth()+1;
+            var dd = oDate.getDate();
+            var yyyy = oDate.getFullYear();
+            
+            switch(format) {
+                case "YYYY/MM/DD":
+                    return yyyy + "/" + mm +"/" + dd;
+                case "DD/MM/YYYY":
+                    return dd + "/" + mm + "/" + yyyy;
+                default: // "MM/DD/YYYY"
+                    return mm + "/" + dd + "/" + yyyy;
+            }
+        }
+        else {
+            return YAHOO.lang.isValue(oDate) ? oDate : "";
+        }
+    }
+ };
+
+
+YAHOO.register("datasource", YAHOO.util.DataSource, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/datatable/README
===================================================================
--- trunk/root/static/yui/datatable/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/datatable/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,11 @@
 DataTable Release Notes
 
+*** version 2.4.0 ***
+
+* No changes.
+
+
+
 *** version 2.3.1 ***
 
 * For better support of resizeable Columns, the following core CSS changes have been

Modified: trunk/root/static/yui/datatable/assets/datatable-core.css
===================================================================
--- trunk/root/static/yui/datatable/assets/datatable-core.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/datatable/assets/datatable-core.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /*foundational css*/
 table.yui-dt-table {

Modified: trunk/root/static/yui/datatable/assets/datatable.css
===================================================================
--- trunk/root/static/yui/datatable/assets/datatable.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/datatable/assets/datatable.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /*foundational css*/
 .yui-dt-table th, .yui-dt-table td {

Modified: trunk/root/static/yui/datatable/assets/skins/sam/datatable-skin.css
===================================================================
--- trunk/root/static/yui/datatable/assets/skins/sam/datatable-skin.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/datatable/assets/skins/sam/datatable-skin.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* basic skin styles */
 .yui-skin-sam .yui-dt-table {margin:0;padding:0;font-family:arial;font-size:inherit;border-collapse:collapse;border:1px solid #7F7F7F;}

Modified: trunk/root/static/yui/datatable/assets/skins/sam/datatable.css
===================================================================
--- trunk/root/static/yui/datatable/assets/skins/sam/datatable.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/datatable/assets/skins/sam/datatable.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 table.yui-dt-table{table-layout:fixed;}th .yui-dt-header{position:relative;}th .yui-dt-label{position:relative;}th .yui-dt-resizer{position:absolute;margin-right:-6px;right:0;bottom:0;width:6px;height:100%;cursor:w-resize;cursor:col-resize;}.yui-dt-scrollable{*overflow-y:auto;}.yui-dt-scrollable thead{display:block;}.yui-dt-scrollable thead tr{position:relative;}.yui-dt-scrollbody{display:block;overflow:auto;}.yui-dt-editor{position:absolute;z-index:9000;}.yui-skin-sam .yui-dt-table{margin:0;padding:0;font-family:arial;font-size:inherit;border-collapse:collapse;border:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-table caption{padding-bottom:1em;text-align:left;}.yui-skin-sam .yui-dt-table th{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;}.yui-skin-sam .yui-dt-table th,.yui-skin-sam .yui-dt-table th a{font-weight:normal;text-decoration:none;color:#000;vertical-align:bottom;}.yui-skin-sam .yui-dt-table th,.yui-skin-sam .yui-dt-table td{padding:4px 10px 4px !
 10px;border-right:1px solid #CBCBCB;}.yui-skin-sam .yui-dt-table td{text-align:left;}.yui-skin-sam .yui-dt-table th.yui-dt-last,.yui-skin-sam .yui-dt-table td.yui-dt-last{border-right:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-list td{border-right:none;}.yui-skin-sam .yui-dt-table thead{border:1px solid #989898;}.yui-skin-sam .yui-dt-table tbody{border-left:1px solid #7F7F7F;border-right:1px solid #7F7F7F;border-bottom:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-loading{background-color:#FFF;}.yui-skin-sam .yui-dt-loading{background-color:#FFF;}.yui-skin-sam .yui-dt-sortable{cursor:pointer;}.yui-skin-sam th.yui-dt-sortable{padding-right:5px;}.yui-skin-sam th.yui-dt-sortable .yui-dt-label{margin-right:15px;}.yui-skin-sam th.yui-dt-asc,.yui-skin-sam th.yui-dt-desc{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -100px;}.yui-skin-sam th.yui-dt-asc .yui-dt-header{background:url(dt-arrow-up.png) no-repeat right;}.yui-skin-sam th.yui-dt-desc .yui-dt-header{backgroun!
 d:url(dt-arrow-dn.png) no-repeat right;}.yui-dt-editable{curso!
 r:pointe
r;}.yui-dt-editor{text-align:left;background-color:#F2F2F2;border:1px solid #808080;padding:6px;}.yui-dt-editor label{padding-left:4px;padding-right:6px;}.yui-dt-editor .yui-dt-button{padding-top:6px;text-align:right;}.yui-dt-editor .yui-dt-button button{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;border:1px solid #999;width:4em;height:1.8em;margin-left:6px;}.yui-dt-editor .yui-dt-button button.yui-dt-default{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1400px;background-color:#5584E0;border:1px solid #304369;color:#FFF}.yui-dt-editor .yui-dt-button button:hover{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1300px;color:#000;}.yui-dt-editor .yui-dt-button button:active{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1700px;color:#000;}.yui-skin-sam tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam tr.yui-dt-odd{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-asc,.yui-!
 skin-sam tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam tr.yui-dt-odd td.yui-dt-desc{background-color:#DBEAFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam .y!
 ui-dt-list tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam !
 .yui-dt-
list tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam tr.yui-dt-selected td,.yui-skin-sam tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-selected td,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-paginator{display:block;margin:6px 0;white-space:nowrap;}.yui-skin-sam .yui-dt-paginator .yui-dt-first,.yui-skin-sam .yui-dt-paginator .yui-dt-last,.yui-ski!
 n-sam .yui-dt-paginator .yui-dt-selected{padding:2px 6px;}.yui-skin-sam .yui-dt-paginator a.yui-dt-first,.yui-skin-sam .yui-dt-paginator a.yui-dt-last{text-decoration:none;}.yui-skin-sam .yui-dt-paginator .yui-dt-previous,.yui-skin-sam .yui-dt-paginator .yui-dt-next{display:none;}.yui-skin-sam a.yui-dt-page{border:1px solid #CBCBCB;padding:2px 6px;text-decoration:none;}

Modified: trunk/root/static/yui/datatable/datatable-beta-debug.js
===================================================================
--- trunk/root/static/yui/datatable/datatable-beta-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/datatable/datatable-beta-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * The DataTable widget provides a progressively enhanced DHTML control for
@@ -9535,4 +9535,4 @@
 };
 
 
-YAHOO.register("datatable", YAHOO.widget.DataTable, {version: "2.3.1", build: "541"});
+YAHOO.register("datatable", YAHOO.widget.DataTable, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/datatable/datatable-beta-min.js
===================================================================
--- trunk/root/static/yui/datatable/datatable-beta-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/datatable/datatable-beta-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 YAHOO.widget.DataTable=function(D,C,A,B){this._nIndex=YAHOO.widget.DataTable._nCount;this._sName="instance"+this._nIndex;this.id="yui-dt"+this._nIndex;this._initContainerEl(D);if(!this._elContainer){return ;}this._initConfigs(B);this._initColumnSet(C);if(!this._oColumnSet){return ;}this._initRecordSet();if(!this._oRecordSet){return ;}this._initDataSource(A);if(!this._oDataSource){return ;}if(this._oDataSource.dataType==YAHOO.util.DataSource.TYPE_HTMLTABLE){this._oDataSource.sendRequest(this.get("initialRequest"),this._onDataReturnEnhanceTable,this);}else{this._initTableEl();if(!this._elTable||!this._elThead||!this._elTbody){return ;}YAHOO.widget.DataTable.superclass.constructor.call(this,this._elContainer,this._oConfigs);if(this._oConfigs&&this._oConfigs.paginator){this.updatePaginator(this._oConfigs.paginator);}this._oDataSource.sendRequest(this.get("initialRequest"),this.onDataReturnInitializeTable,this);}this._initCellEditorEl();this._initColumnSort();this._initDomEvents!
 ();YAHOO.widget.DataTable._nCount++;};if(YAHOO.util.Element){YAHOO.lang.extend(YAHOO.widget.DataTable,YAHOO.util.Element);}else{}YAHOO.widget.DataTable.prototype.initAttributes=function(A){A=A||{};YAHOO.widget.DataTable.superclass.initAttributes.call(this,A);this.setAttributeConfig("summary",{value:null,validator:YAHOO.lang.isString,method:function(B){this._elTable.summary=B;}});this.setAttributeConfig("selectionMode",{value:"standard",validator:YAHOO.lang.isString});this.setAttributeConfig("initialRequest",{value:"",validator:YAHOO.lang.isString});this.setAttributeConfig("sortedBy",{value:null,validator:function(B){return(B&&(B.constructor==Object)&&B.key);},method:function(B){var C=this.get("sortedBy");if(C&&(C.constructor==Object)&&C.key){var E=this._oColumnSet.getColumn(C.key);var D=this.getThEl(E);YAHOO.util.Dom.removeClass(D,YAHOO.widget.DataTable.CLASS_ASC);YAHOO.util.Dom.removeClass(D,YAHOO.widget.DataTable.CLASS_DESC);}var F=(B.column)?B.column:this._oColumnSet.get!
 Column(B.key);if(F){var G=(B.dir&&(B.dir!="asc"))?YAHOO.widget!
 .DataTab
le.CLASS_DESC:YAHOO.widget.DataTable.CLASS_ASC;YAHOO.util.Dom.addClass(this.id+"-col"+F.getId(),G);}}});this.setAttributeConfig("paginator",{value:{rowsPerPage:500,currentPage:1,startRecordIndex:0,totalRecords:0,totalPages:0,rowsThisPage:0,pageLinks:0,pageLinksStart:1,dropdownOptions:null,containers:[],dropdowns:[],links:[]},validator:function(B){if(B&&(B.constructor==Object)){if((B.rowsPerPage!==undefined)&&(B.currentPage!==undefined)&&(B.startRecordIndex!==undefined)&&(B.totalRecords!==undefined)&&(B.totalPages!==undefined)&&(B.rowsThisPage!==undefined)&&(B.pageLinks!==undefined)&&(B.pageLinksStart!==undefined)&&(B.dropdownOptions!==undefined)&&(B.containers!==undefined)&&(B.dropdowns!==undefined)&&(B.links!==undefined)){if(YAHOO.lang.isNumber(B.rowsPerPage)&&YAHOO.lang.isNumber(B.currentPage)&&YAHOO.lang.isNumber(B.startRecordIndex)&&YAHOO.lang.isNumber(B.totalRecords)&&YAHOO.lang.isNumber(B.totalPages)&&YAHOO.lang.isNumber(B.rowsThisPage)&&YAHOO.lang.isNumber(B.pageLinks!
 )&&YAHOO.lang.isNumber(B.pageLinksStart)&&YAHOO.lang.isArray(B.dropdownOptions)&&YAHOO.lang.isArray(B.containers)&&YAHOO.lang.isArray(B.dropdowns)&&YAHOO.lang.isArray(B.links)){return true;}}}return false;}});this.setAttributeConfig("paginated",{value:false,validator:YAHOO.lang.isBoolean,method:function(B){var F=this.get("paginator");var E=F.containers;var D;if(B){if(E.length===0){var J=document.createElement("span");J.id=this.id+"-paginator0";YAHOO.util.Dom.addClass(J,YAHOO.widget.DataTable.CLASS_PAGINATOR);J=this._elContainer.insertBefore(J,this._elTable);E.push(J);var H=document.createElement("span");H.id=this.id+"-paginator1";YAHOO.util.Dom.addClass(H,YAHOO.widget.DataTable.CLASS_PAGINATOR);H=this._elContainer.insertBefore(H,this._elTable.nextSibling);E.push(H);this._configs.paginator.value.containers=[J,H];}else{for(D=0;D<E.length;D++){E[D].style.display="";}}if(F.pageLinks>-1){var I=F.links;if(I.length===0){for(D=0;D<E.length;D++){var G=document.createElement("span");!
 G.id="yui-dt-pagselect"+D;G=E[D].appendChild(G);YAHOO.util.Eve!
 nt.addLi
stener(G,"click",this._onPaginatorLinkClick,this);this._configs.paginator.value.links.push(G);}}}var K=F.dropdownOptions||[];for(D=0;D<E.length;D++){var C=document.createElement("select");YAHOO.util.Dom.addClass(C,YAHOO.widget.DataTable.CLASS_DROPDOWN);C=E[D].appendChild(C);C.id="yui-dt-pagselect"+D;YAHOO.util.Event.addListener(C,"change",this._onPaginatorDropdownChange,this);this._configs.paginator.value.dropdowns.push(C);if(!F.dropdownOptions){C.style.display="none";}}}else{if(E.length>0){for(D=0;D<E.length;D++){E[D].style.display="none";}}}}});this.setAttributeConfig("caption",{value:null,validator:YAHOO.lang.isString,method:function(B){if(!this._elCaption){if(!this._elTable.firstChild){this._elCaption=this._elTable.appendChild(document.createElement("caption"));}else{this._elCaption=this._elTable.insertBefore(document.createElement("caption"),this._elTable.firstChild);}}this._elCaption.innerHTML=B;}});this.setAttributeConfig("scrollable",{value:false,validator:function(B!
 ){return(YAHOO.lang.isBoolean(B)&&!YAHOO.lang.isString(this.get("caption")));},method:function(B){if(B){YAHOO.util.Dom.addClass(this._elContainer,YAHOO.widget.DataTable.CLASS_SCROLLABLE);YAHOO.util.Dom.addClass(this._elTbody,YAHOO.widget.DataTable.CLASS_SCROLLBODY);}else{YAHOO.util.Dom.removeClass(this._elContainer,YAHOO.widget.DataTable.CLASS_SCROLLABLE);YAHOO.util.Dom.removeClass(this._elTbody,YAHOO.widget.DataTable.CLASS_SCROLLBODY);}}});};YAHOO.widget.DataTable.CLASS_TABLE="yui-dt-table";YAHOO.widget.DataTable.CLASS_HEADER="yui-dt-header";YAHOO.widget.DataTable.CLASS_BODY="yui-dt-body";YAHOO.widget.DataTable.CLASS_SCROLLBODY="yui-dt-scrollbody";YAHOO.widget.DataTable.CLASS_LABEL="yui-dt-label";YAHOO.widget.DataTable.CLASS_RESIZER="yui-dt-resizer";YAHOO.widget.DataTable.CLASS_EDITOR="yui-dt-editor";YAHOO.widget.DataTable.CLASS_PAGINATOR="yui-dt-paginator";YAHOO.widget.DataTable.CLASS_PAGE="yui-dt-page";
 YAHOO.widget.DataTable.CLASS_DEFAULT="yui-dt-default";YAHOO.widget.DataTable.CLASS_PREVIOUS="yui-dt-previous";YAHOO.widget.DataTable.CLASS_NEXT="yui-dt-next";YAHOO.widget.DataTable.CLASS_FIRST="yui-dt-first";YAHOO.widget.DataTable.CLASS_LAST="yui-dt-last";YAHOO.widget.DataTable.CLASS_EVEN="yui-dt-even";YAHOO.widget.DataTable.CLASS_ODD="yui-dt-odd";YAHOO.widget.DataTable.CLASS_SELECTED="yui-dt-selected";YAHOO.widget.DataTable.CLASS_HIGHLIGHTED="yui-dt-highlighted";YAHOO.widget.DataTable.CLASS_DISABLED="yui-dt-disabled";YAHOO.widget.DataTable.CLASS_EMPTY="yui-dt-empty";YAHOO.widget.DataTable.CLASS_LOADING="yui-dt-loading";YAHOO.widget.DataTable.CLASS_ERROR="yui-dt-error";YAHOO.widget.DataTable.CLASS_EDITABLE="yui-dt-editable";YAHOO.widget.DataTable.CLASS_SCROLLABLE="yui-dt-scrollable";YAHOO.widget.DataTable.CLASS_SORTABLE="yui-dt-sortable";YAHOO.widget.DataTable.CLASS_ASC="yui-dt-asc";YAHOO.widget.DataTable.CLASS_DESC="yui-dt-desc";YAHOO.widget.DataTable.CLASS_BUTTON="yui-dt-!
 button";YAHOO.widget.DataTable.CLASS_CHECKBOX="yui-dt-checkbox";YAHOO.widget.DataTable.CLASS_DROPDOWN="yui-dt-dropdown";YAHOO.widget.DataTable.CLASS_RADIO="yui-dt-radio";YAHOO.widget.DataTable.MSG_EMPTY="No records found.";YAHOO.widget.DataTable.MSG_LOADING="Loading data...";YAHOO.widget.DataTable.MSG_ERROR="Data error.";YAHOO.widget.DataTable._nCount=0;YAHOO.widget.DataTable.prototype._nIndex=null;YAHOO.widget.DataTable.prototype._nTrCount=0;YAHOO.widget.DataTable.prototype._sName=null;YAHOO.widget.DataTable.prototype._elContainer=null;YAHOO.widget.DataTable.prototype._elCaption=null;YAHOO.widget.DataTable.prototype._elTable=null;YAHOO.widget.DataTable.prototype._elThead=null;YAHOO.widget.DataTable.prototype._elTbody=null;YAHOO.widget.DataTable.prototype._elMsgTbody=null;YAHOO.widget.DataTable.prototype._elMsgTbodyRow=null;YAHOO.widget.DataTable.prototype._elMsgTbodyCell=null;YAHOO.widget.DataTable.prototype._oDataSource=null;YAHOO.widget.DataTable.prototype._oColumnSet=nu!
 ll;YAHOO.widget.DataTable.prototype._oRecordSet=null;YAHOO.wid!
 get.Data
Table.prototype._sFirstLabelLinkId=null;YAHOO.widget.DataTable.prototype._sFirstTrId=null;YAHOO.widget.DataTable.prototype._sLastTrId=null;YAHOO.widget.DataTable.prototype._focusEl=function(A){A=A||this._elTable;setTimeout(function(){A.focus();},0);};YAHOO.widget.DataTable.prototype._initContainerEl=function(A){this._elContainer=null;A=YAHOO.util.Dom.get(A);if(A&&A.tagName&&(A.tagName.toLowerCase()=="div")){this._elContainer=A;}};YAHOO.widget.DataTable.prototype._initConfigs=function(A){if(A){if(A.constructor!=Object){A=null;}else{if(YAHOO.lang.isBoolean(A.paginator)){}}this._oConfigs=A;}};YAHOO.widget.DataTable.prototype._initColumnSet=function(A){this._oColumnSet=null;if(YAHOO.lang.isArray(A)){this._oColumnSet=new YAHOO.widget.ColumnSet(A);}else{if(A instanceof YAHOO.widget.ColumnSet){this._oColumnSet=A;}}};YAHOO.widget.DataTable.prototype._initDataSource=function(A){this._oDataSource=null;if(A&&(A instanceof YAHOO.util.DataSource)){this._oDataSource=A;}else{var B=null;var!
  F=this._elContainer;var C;if(F.hasChildNodes()){var E=F.childNodes;for(C=0;C<E.length;C++){if(E[C].tagName&&E[C].tagName.toLowerCase()=="table"){B=E[C];break;}}if(B){var D=[];for(C=0;C<this._oColumnSet.keys.length;C++){D.push({key:this._oColumnSet.keys[C].key});}this._oDataSource=new YAHOO.util.DataSource(B);this._oDataSource.responseType=YAHOO.util.DataSource.TYPE_HTMLTABLE;this._oDataSource.responseSchema={fields:D};}}}};YAHOO.widget.DataTable.prototype._initRecordSet=function(){if(this._oRecordSet){this._oRecordSet.reset();}else{this._oRecordSet=new YAHOO.widget.RecordSet();}};YAHOO.widget.DataTable.prototype._initTableEl=function(){YAHOO.util.Event.purgeElement(this._elContainer,true);this._elContainer.innerHTML="";this._elTable=this._elContainer.appendChild(document.createElement("table"));var C=this._elTable;C.tabIndex=0;C.id=this.id+"-table";YAHOO.util.Dom.addClass(C,YAHOO.widget.DataTable.CLASS_TABLE);this._initTheadEl(C,this._oColumnSet);var A=document.createEleme!
 nt("tbody");var B=A.appendChild(document.createElement("tr"));!
 YAHOO.ut
il.Dom.addClass(B,YAHOO.widget.DataTable.CLASS_FIRST);YAHOO.util.Dom.addClass(B,YAHOO.widget.DataTable.CLASS_LAST);this._elMsgRow=B;var D=B.appendChild(document.createElement("td"));D.colSpan=this._oColumnSet.keys.length;YAHOO.util.Dom.addClass(D,YAHOO.widget.DataTable.CLASS_FIRST);YAHOO.util.Dom.addClass(D,YAHOO.widget.DataTable.CLASS_LAST);this._elMsgTd=D;this._elMsgTbody=C.appendChild(A);this.showTableMessage(YAHOO.widget.DataTable.MSG_LOADING,YAHOO.widget.DataTable.CLASS_LOADING);this._elTbody=C.appendChild(document.createElement("tbody"));YAHOO.util.Dom.addClass(this._elTbody,YAHOO.widget.DataTable.CLASS_BODY);};YAHOO.widget.DataTable.prototype._initTheadEl=function(){var M,F,A;var Q=this._oColumnSet;this._sFirstLabelLinkId=null;var N=document.createElement("thead");var C=Q.tree;for(M=0;M<C.length;M++){var J=N.appendChild(document.createElement("tr"));J.id=this.id+"-hdrow"+M;var E;for(var K=0;K<C[M].length;K++){F=C[M][K];E=J.appendChild(document.createElement("th"));E.i!
 d=this.id+"-col"+F.getId();this._initThEl(E,F,M,K);}if(M===0){YAHOO.util.Dom.addClass(J,YAHOO.widget.DataTable.CLASS_FIRST);}if(M===(C.length-1)){YAHOO.util.Dom.addClass(J,YAHOO.widget.DataTable.CLASS_LAST);}}this._elThead=this._elTable.appendChild(N);var I=Q.headers[0];var D=Q.headers[Q.headers.length-1];for(M=0;M<I.length;M++){YAHOO.util.Dom.addClass(YAHOO.util.Dom.get(this.id+"-col"+I[M]),YAHOO.widget.DataTable.CLASS_FIRST);}for(M=0;M<D.length;M++){YAHOO.util.Dom.addClass(YAHOO.util.Dom.get(this.id+"-col"+D[M]),YAHOO.widget.DataTable.CLASS_LAST);}var H=(YAHOO.util.DD)?true:false;var P=false;for(M=0;M<this._oColumnSet.keys.length;M++){F=this._oColumnSet.keys[M];var R=F.getKey();var O=YAHOO.util.Dom.get(this.id+"-col"+F.getId());if(F.resizeable){if(H){if(!this.fixedWidth||(this.fixedWidth&&(F.getKeyIndex()!=this._oColumnSet.keys.length-1))){var S=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.DataTable.CLASS_HEADER,"div",O)[0];
@@ -18,4 +18,4 @@
 }}}}var B;if(window.getSelection){B=window.getSelection();}else{if(document.getSelection){B=document.getSelection();}else{if(document.selection){B=document.selection;}}}if(B){if(B.empty){B.empty();}else{if(B.removeAllRanges){B.removeAllRanges();}else{if(B.collapse){B.collapse();}}}}}else{}};YAHOO.widget.DataTable.prototype.onEventSelectCell=function(W){var Q=this.get("selectionMode");if((Q=="standard")||(Q=="single")){return ;}var L=W.event;var X=W.target;var G=L.shiftKey;var C=L.ctrlKey||((navigator.userAgent.toLowerCase().indexOf("mac")!=-1)&&L.metaKey);var U,T,Z,D,A;var B=this.getTdEl(X);if(B){var R,S,I,Y;var K=this.getTrEl(B);var E=this._elTbody.rows;var N=this.getRecord(K);var a=this._oRecordSet.getRecordIndex(N);var M=this.getColumn(B);var P=M.getKeyIndex();var J=this.getTrIndex(K);var F={record:N,column:M};var H=(this._oAnchorCell)?this._oAnchorCell.record:null;if(H){R=this._oRecordSet.getRecordIndex(H);I=this._oAnchorCell.column;Y=I.getKeyIndex();S=this.getTrIndex(H!
 );if(S===null){if(R<this.getRecordIndex(this.getFirstTrEl())){S=0;}else{S=this.getRecordIndex(this.getLastTrEl());}}}var V={record:H,column:I};if((Q!="singlecell")&&G&&C){if(H&&I){if(this.isSelected(this._oAnchorCell)){if(R===a){if(Y<P){for(U=Y+1;U<=P;U++){this.selectCell(E[J].cells[U]);}}else{if(P<Y){for(U=P;U<Y;U++){this.selectCell(E[J].cells[U]);}}}}else{if(R<a){if(Q=="cellrange"){for(U=Y+1;U<E[S].cells.length;U++){this.selectCell(E[S].cells[U]);}for(U=S+1;U<J;U++){for(T=0;T<E[U].cells.length;T++){this.selectCell(E[U].cells[T]);}}for(U=0;U<=P;U++){this.selectCell(E[J].cells[U]);}}else{if(Q=="cellblock"){D=Math.min(Y,P);A=Math.max(Y,P);for(U=S;U<=J;U++){for(T=D;T<=A;T++){this.selectCell(E[U].cells[T]);}}}}}else{if(Q=="cellrange"){for(U=P;U<E[J].cells.length;U++){this.selectCell(E[J].cells[U]);}for(U=J+1;U<S;U++){for(T=0;T<E[U].cells.length;T++){this.selectCell(E[U].cells[T]);}}for(U=0;U<Y;U++){this.selectCell(E[S].cells[U]);}}else{if(Q=="cellblock"){D=Math.min(S,P);A=Math!
 .max(S,P);for(U=S;U>=J;U--){for(T=A;T>=D;T--){this.selectCell(!
 E[U].cel
ls[T]);}}}}}}}else{if(R===a){if(Y<P){for(U=Y+1;U<P;U++){this.unselectCell(E[J].cells[U]);}}else{if(P<Y){for(U=P+1;U<Y;U++){this.unselectCell(E[J].cells[U]);}}}}if(R<a){for(U=S;U<=J;U++){Z=E[U];for(T=0;T<Z.cells.length;T++){if(Z.sectionRowIndex===S){if(T>Y){this.unselectCell(Z.cells[T]);}}else{if(Z.sectionRowIndex===J){if(T<P){this.unselectCell(Z.cells[T]);}}else{this.unselectCell(Z.cells[T]);}}}}}else{for(U=J;U<=S;U++){Z=E[U];for(T=0;T<Z.cells.length;T++){if(Z.sectionRowIndex==J){if(T>P){this.unselectCell(Z.cells[T]);}}else{if(Z.sectionRowIndex==S){if(T<Y){this.unselectCell(Z.cells[T]);}}else{this.unselectCell(Z.cells[T]);}}}}}this.selectCell(B);}}else{this._oAnchorCell=F;if(this.isSelected(F)){this.unselectCell(F);}else{this.selectCell(F);}}}else{if((Q!="singlecell")&&G){this.unselectAllCells();if(V){if(R===a){if(Y<P){for(U=Y;U<=P;U++){this.selectCell(E[J].cells[U]);}}else{if(P<Y){for(U=P;U<=Y;U++){this.selectCell(E[J].cells[U]);}}}}else{if(R<a){if(Q=="cellrange"){for(U=S;U!
 <=J;U++){Z=E[U];for(T=0;T<Z.cells.length;T++){if(Z.sectionRowIndex==S){if(T>=Y){this.selectCell(Z.cells[T]);}}else{if(Z.sectionRowIndex==J){if(T<=P){this.selectCell(Z.cells[T]);}}else{this.selectCell(Z.cells[T]);}}}}}else{if(Q=="cellblock"){D=Math.min(Y,P);A=Math.max(Y,P);for(U=S;U<=J;U++){for(T=D;T<=A;T++){this.selectCell(E[U].cells[T]);}}}}}else{if(Q=="cellrange"){for(U=J;U<=S;U++){Z=E[U];for(T=0;T<Z.cells.length;T++){if(Z.sectionRowIndex==J){if(T>=P){this.selectCell(Z.cells[T]);}}else{if(Z.sectionRowIndex==S){if(T<=Y){this.selectCell(Z.cells[T]);}}else{this.selectCell(Z.cells[T]);}}}}}else{if(Q=="cellblock"){D=Math.min(Y,P);A=Math.max(Y,P);for(U=J;U<=S;U++){for(T=D;T<=A;T++){this.selectCell(E[U].cells[T]);}}}}}}}else{this._oAnchorCell=F;this.selectCell(F);}}else{if((Q!="singlecell")&&C){this._oAnchorCell=F;if(this.isSelected(F)){this.unselectCell(F);}else{this.selectCell(F);}}else{this._oAnchorCell=F;this.unselectAllCells();this.selectCell(F);}}}var O;if(window.getSelect!
 ion){O=window.getSelection();}else{if(document.getSelection){O!
 =documen
t.getSelection();}else{if(document.selection){O=document.selection;}}}if(O){if(O.empty){O.empty();}else{if(O.removeAllRanges){O.removeAllRanges();}else{if(O.collapse){O.collapse();}}}}}else{}};YAHOO.widget.DataTable.prototype.onEventHighlightRow=function(B){var A=B.event;var C=B.target;this.highlightRow(C);};YAHOO.widget.DataTable.prototype.onEventUnhighlightRow=function(B){var A=B.event;var C=B.target;this.unhighlightRow(C);};YAHOO.widget.DataTable.prototype.onEventHighlightCell=function(B){var A=B.event;var C=B.target;this.highlightCell(C);};YAHOO.widget.DataTable.prototype.onEventUnhighlightCell=function(B){var A=B.event;var C=B.target;this.unhighlightCell(C);};YAHOO.widget.DataTable.prototype.onEventFormatCell=function(C){var A=C.event;var F=C.target;var B=F.tagName.toLowerCase();var D=this.getTdEl(F);if(D&&D.yuiColumnKey){var E=this.getColumn(D.yuiColumnKey);this.formatCell(D,this.getRecord(D),E);}else{}};YAHOO.widget.DataTable.prototype.onEventShowCellEditor=function(C!
 ){var A=C.event;var E=C.target;var B=E.tagName.toLowerCase();var D=this.getTdEl(E);if(D){this.showCellEditor(D);}else{}};YAHOO.widget.DataTable.prototype.onEventEditCell=function(A){this.onEventShowCellEditor(A);};YAHOO.widget.DataTable.prototype.onEventSaveCellEditor=function(A){this.saveCellEditor();};YAHOO.widget.DataTable.prototype._onDataReturnEnhanceTable=function(B,C){var A=this.doBeforeLoadData(B,C);if(A&&C&&!C.error&&YAHOO.lang.isArray(C.results)){this._oRecordSet.addRecords(C.results);this._initTableEl();if(!this._elTable||!this._elThead||!this._elTbody){return ;}YAHOO.widget.DataTable.superclass.constructor.call(this,this._elContainer,this._oConfigs);if(this._oConfigs.paginator){this.updatePaginator(this._oConfigs.paginator);}this.refreshView();}else{if(A&&C.error){this.showTableMessage(YAHOO.widget.DataTable.MSG_ERROR,YAHOO.widget.DataTable.CLASS_ERROR);}else{if(A){this.showTableMessage(YAHOO.widget.DataTable.MSG_EMPTY,YAHOO.widget.DataTable.CLASS_EMPTY);
 }}}};YAHOO.widget.DataTable.prototype.onDataReturnInitializeTable=function(B,C){this.fireEvent("dataReturnEvent",{request:B,response:C});var A=this.doBeforeLoadData(B,C);if(A&&C&&!C.error&&YAHOO.lang.isArray(C.results)){this.initializeTable(C.results);}else{if(A&&C.error){this.showTableMessage(YAHOO.widget.DataTable.MSG_ERROR,YAHOO.widget.DataTable.CLASS_ERROR);}else{if(A){this.showTableMessage(YAHOO.widget.DataTable.MSG_EMPTY,YAHOO.widget.DataTable.CLASS_EMPTY);}}}};YAHOO.widget.DataTable.prototype.onDataReturnReplaceRows=function(A,B){this.onDataReturnInitializeTable(A,B);};YAHOO.widget.DataTable.prototype.onDataReturnAppendRows=function(B,C){this.fireEvent("dataReturnEvent",{request:B,response:C});var A=this.doBeforeLoadData(B,C);if(A&&C&&!C.error&&YAHOO.lang.isArray(C.results)){this.addRows(C.results);}else{if(A&&C.error){this.showTableMessage(YAHOO.widget.DataTable.MSG_ERROR,YAHOO.widget.DataTable.CLASS_ERROR);}}};YAHOO.widget.DataTable.prototype.onDataReturnInsertRows!
 =function(B,C){this.fireEvent("dataReturnEvent",{request:B,response:C});var A=this.doBeforeLoadData(B,C);if(A&&C&&!C.error&&YAHOO.lang.isArray(C.results)){this.addRows(C.results,0);}else{if(A&&C.error){this.showTableMessage(YAHOO.widget.DataTable.MSG_ERROR,YAHOO.widget.DataTable.CLASS_ERROR);}}};YAHOO.widget.ColumnSet=function(F){this._sName="instance"+YAHOO.widget.ColumnSet._nCount;var K=[];var A=[];var I=[];var E=[];var C=-1;var H=this;var B=function(N,T){C++;if(!K[C]){K[C]=[];}for(var P=0;P<N.length;P++){var L=N[P];var R=new YAHOO.widget.Column(L);R._sId=YAHOO.widget.Column._nCount+"";R._sName="Column instance"+YAHOO.widget.Column._nCount;if(!YAHOO.lang.isValue(R.key)){R.key="yui-dt-col"+YAHOO.widget.Column._nCount;}YAHOO.widget.Column._nCount++;A.push(R);if(T){R.parent=T;}if(YAHOO.lang.isArray(L.children)){R.children=L.children;var S=0;var Q=function(W){var X=W.children;for(var V=0;V<X.length;V++){if(YAHOO.lang.isArray(X[V].children)){Q(X[V]);}else{S++;}}};Q(L);R._colsp!
 an=S;var U=L.children;for(var O=0;O<U.length;O++){var M=U[O];i!
 f(R.clas
sName&&(M.className===undefined)){M.className=R.className;}if(R.editor&&(M.editor===undefined)){M.editor=R.editor;}if(R.editorOptions&&(M.editorOptions===undefined)){M.editorOptions=R.editorOptions;}if(R.formatter&&(M.formatter===undefined)){M.formatter=R.formatter;}if(R.resizeable&&(M.resizeable===undefined)){M.resizeable=R.resizeable;}if(R.sortable&&(M.sortable===undefined)){M.sortable=R.sortable;}if(R.width&&(M.width===undefined)){M.width=R.width;}if(R.type&&(M.type===undefined)){M.type=R.type;}if(R.type&&!R.formatter){R.formatter=R.type;}if(R.text&&!YAHOO.lang.isValue(R.label)){R.label=R.text;}if(R.parser){}if(R.sortOptions&&((R.sortOptions.ascFunction)||(R.sortOptions.descFunction))){}}if(!K[C+1]){K[C+1]=[];}B(U,R);}else{R._nKeyIndex=I.length;R._colspan=1;I.push(R);}K[C].push(R);}C--;};if(YAHOO.lang.isArray(F)){B(F);}var D=function(M){var N=1;var P;var O;var Q=function(U,T){T=T||1;for(var V=0;V<U.length;V++){var S=U[V];if(YAHOO.lang.isArray(S.children)){T++;Q(S.children!
 ,T);T--;}else{if(T>N){N=T;}}}};for(var L=0;L<M.length;L++){P=M[L];Q(P);for(var R=0;R<P.length;R++){O=P[R];if(!YAHOO.lang.isArray(O.children)){O._rowspan=N;}else{O._rowspan=1;}}N=1;}};D(K);var J=function(L,M){E[L].push(M._sId);if(M.parent){J(L,M.parent);}};for(var G=0;G<I.length;G++){E[G]=[];J(G,I[G]);E[G]=E[G].reverse();}this.tree=K;this.flat=A;this.keys=I;this.headers=E;YAHOO.widget.ColumnSet._nCount++;};YAHOO.widget.ColumnSet._nCount=0;YAHOO.widget.ColumnSet.prototype._sName=null;YAHOO.widget.ColumnSet.prototype.tree=null;YAHOO.widget.ColumnSet.prototype.flat=null;YAHOO.widget.ColumnSet.prototype.keys=null;YAHOO.widget.ColumnSet.prototype.headers=null;YAHOO.widget.ColumnSet.prototype.toString=function(){return"ColumnSet "+this._sName;};YAHOO.widget.ColumnSet.prototype.getColumnById=function(C){if(YAHOO.lang.isString(C)){var A=this.flat;for(var B=A.length-1;B>-1;B--){if(A[B]._sId===C){return A[B];}}}return null;};YAHOO.widget.ColumnSet.prototype.getColumn=function(C){if(YA!
 HOO.lang.isNumber(C)&&this.keys[C]){return this.keys[C];}else{!
 if(YAHOO
.lang.isString(C)){var A=this.flat;var D=[];for(var B=0;B<A.length;B++){if(A[B].key===C){D.push(A[B]);}}if(D.length===1){return D[0];}else{if(D.length>1){return D;}}}}return null;};YAHOO.widget.Column=function(B){if(B&&(B.constructor==Object)){for(var A in B){if(A){this[A]=B[A];}}}};YAHOO.widget.Column._nCount=0;YAHOO.widget.Column.prototype._sName=null;YAHOO.widget.Column.prototype._sId=null;YAHOO.widget.Column.prototype._nKeyIndex=null;YAHOO.widget.Column.prototype._colspan=1;YAHOO.widget.Column.prototype._rowspan=1;YAHOO.widget.Column.prototype._parent=null;YAHOO.widget.Column.prototype._width=null;YAHOO.widget.Column.prototype._minWidth=null;YAHOO.widget.Column.prototype.key=null;YAHOO.widget.Column.prototype.label=null;YAHOO.widget.Column.prototype.abbr=null;YAHOO.widget.Column.prototype.children=null;YAHOO.widget.Column.prototype.width=null;YAHOO.widget.Column.prototype.className=null;YAHOO.widget.Column.prototype.formatter=null;YAHOO.widget.Column.prototype.editor=nul!
 l;YAHOO.widget.Column.prototype.editorOptions=null;YAHOO.widget.Column.prototype.resizeable=false;YAHOO.widget.Column.prototype.sortable=false;YAHOO.widget.Column.prototype.sortOptions=null;YAHOO.widget.Column.prototype.toString=function(){return this._sName;};YAHOO.widget.Column.prototype.getId=function(){return this._sId;};YAHOO.widget.Column.prototype.getKey=function(){return this.key;};YAHOO.widget.Column.prototype.getKeyIndex=function(){return this._nKeyIndex;};YAHOO.widget.Column.prototype.getParent=function(){return this._parent;};YAHOO.widget.Column.prototype.getColspan=function(){return this._colspan;};YAHOO.widget.Column.prototype.getColSpan=function(){return this.getColspan();};YAHOO.widget.Column.prototype.getRowspan=function(){return this._rowspan;};YAHOO.widget.Column.prototype.getIndex=function(){return this.getKeyIndex();};YAHOO.widget.Column.prototype.format=function(){};YAHOO.widget.Column.formatCheckbox=function(B,A,C,D){YAHOO.widget.DataTable.formatCheck!
 box(B,A,C,D);
 };YAHOO.widget.Column.formatCurrency=function(B,A,C,D){YAHOO.widget.DataTable.formatCurrency(B,A,C,D);};YAHOO.widget.Column.formatDate=function(B,A,C,D){YAHOO.widget.DataTable.formatDate(B,A,C,D);};YAHOO.widget.Column.formatEmail=function(B,A,C,D){YAHOO.widget.DataTable.formatEmail(B,A,C,D);};YAHOO.widget.Column.formatLink=function(B,A,C,D){YAHOO.widget.DataTable.formatLink(B,A,C,D);};YAHOO.widget.Column.formatNumber=function(B,A,C,D){YAHOO.widget.DataTable.formatNumber(B,A,C,D);};YAHOO.widget.Column.formatSelect=function(B,A,C,D){YAHOO.widget.DataTable.formatDropdown(B,A,C,D);};YAHOO.util.Sort={compare:function(B,A,C){if((B===null)||(typeof B=="undefined")){if((A===null)||(typeof A=="undefined")){return 0;}else{return 1;}}else{if((A===null)||(typeof A=="undefined")){return -1;}}if(B.constructor==String){B=B.toLowerCase();}if(A.constructor==String){A=A.toLowerCase();}if(B<A){return(C)?1:-1;}else{if(B>A){return(C)?-1:1;}else{return 0;}}}};YAHOO.util.ColumnResizer=function(F,!
 E,D,B,A,C){if(F&&E&&D&&B){this.datatable=F;this.column=E;this.cell=D;this.init(B,A,C);this.setYConstraint(0,0);}else{}};if(YAHOO.util.DD){YAHOO.extend(YAHOO.util.ColumnResizer,YAHOO.util.DD);}YAHOO.util.ColumnResizer.prototype.onMouseDown=function(F){this.startWidth=this.cell.offsetWidth;this.startPos=YAHOO.util.Dom.getX(this.getDragEl());if(this.datatable.fixedWidth){var B=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.DataTable.CLASS_LABEL,"span",this.cell)[0];this.minWidth=B.offsetWidth+6;var A=this.cell.nextSibling;var D=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.DataTable.CLASS_LABEL,"span",A)[0];this.sibMinWidth=D.offsetWidth+6;var E=((this.startWidth-this.minWidth)<0)?0:(this.startWidth-this.minWidth);var C=((A.offsetWidth-this.sibMinWidth)<0)?0:(A.offsetWidth-this.sibMinWidth);this.setXConstraint(E,C);}};YAHOO.util.ColumnResizer.prototype.onMouseUp=function(B){var A=YAHOO.util.Dom.get(this.handleElId).style;A.left="auto";A.right=0;A.marginRight="-6px";A.!
 width="6px";this.datatable.fireEvent("columnResizeEvent",{colu!
 mn:this.
column,target:this.cell});};YAHOO.util.ColumnResizer.prototype.onDrag=function(F){try{var G=YAHOO.util.Dom.getX(this.getDragEl());var E=G-this.startPos;var D=this.startWidth+E;if(D<this.minWidth){D=this.minWidth;}var I=this.datatable;var H=this.cell;if(I.fixedWidth){var B=H.nextSibling;var A=B.offsetWidth-E;if(A<this.sibMinWidth){A=this.sibMinWidth;}for(var C=0;C<I._oColumnSet.length;C++){}B.style.width=A;H.style.width=D+"px";}else{H.style.width=D+"px";}}catch(F){}};YAHOO.widget.RecordSet=function(A){this._sName="RecordSet instance"+YAHOO.widget.RecordSet._nCount;YAHOO.widget.RecordSet._nCount++;this._records=[];this._length=0;if(A){if(YAHOO.lang.isArray(A)){this.addRecords(A);}else{if(A.constructor==Object){this.addRecord(A);}}}this.createEvent("recordAddEvent");this.createEvent("recordsAddEvent");this.createEvent("recordUpdateEvent");this.createEvent("recordDeleteEvent");this.createEvent("recordsDeleteEvent");this.createEvent("resetEvent");this.createEvent("keyUpdateEvent"!
 );};if(YAHOO.util.EventProvider){YAHOO.augment(YAHOO.widget.RecordSet,YAHOO.util.EventProvider);}else{}YAHOO.widget.RecordSet._nCount=0;YAHOO.widget.RecordSet.prototype._sName=null;YAHOO.widget.RecordSet.prototype._length=null;YAHOO.widget.RecordSet.prototype._addRecord=function(C,A){var B=new YAHOO.widget.Record(C);if(YAHOO.lang.isNumber(A)&&(A>-1)){this._records.splice(A,0,B);}else{A=this.getLength();this._records.push(B);}this._length++;return B;};YAHOO.widget.RecordSet.prototype._deleteRecord=function(B,A){if(!YAHOO.lang.isNumber(A)||(A<0)){A=1;}this._records.splice(B,A);this._length=this._length-A;};YAHOO.widget.RecordSet.prototype.toString=function(){return this._sName;};YAHOO.widget.RecordSet.prototype.getLength=function(){return this._length;};YAHOO.widget.RecordSet.prototype.getRecord=function(A){var B;if(A instanceof YAHOO.widget.Record){for(B=0;B<this._records.length;B++){if(this._records[B]._sId===A._sId){return A;}}}else{if(YAHOO.lang.isNumber(A)){if((A>-1)&&(A!
 <this.getLength())){return this._records[A];}}else{if(YAHOO.la!
 ng.isStr
ing(A)){for(B=0;B<this._records.length;B++){if(this._records[B]._sId===A){return this._records[B];}}}}}return null;};YAHOO.widget.RecordSet.prototype.getRecords=function(B,A){if(!YAHOO.lang.isNumber(B)){return this._records;}if(!YAHOO.lang.isNumber(A)){return this._records.slice(B);}return this._records.slice(B,B+A);};YAHOO.widget.RecordSet.prototype.getRecordIndex=function(B){if(B){for(var A=this._records.length-1;A>-1;A--){if(B.getId()===this._records[A].getId()){return A;}}}return null;};YAHOO.widget.RecordSet.prototype.addRecord=function(C,A){if(C&&(C.constructor==Object)){var B=this._addRecord(C,A);this.fireEvent("recordAddEvent",{record:B,data:C});return B;}else{return null;}};YAHOO.widget.RecordSet.prototype.addRecords=function(C,B){if(YAHOO.lang.isArray(C)){var F=[];for(var D=0;D<C.length;D++){if(C[D]&&(C[D].constructor==Object)){var A=this._addRecord(C[D],B);F.push(A);}}this.fireEvent("recordsAddEvent",{records:F,data:C});return F;}else{if(C&&(C.constructor==Object)!
 ){var E=this._addRecord(C);this.fireEvent("recordsAddEvent",{records:[E],data:C});return E;}else{}}};YAHOO.widget.RecordSet.prototype.updateRecord=function(A,E){var C=this.getRecord(A);if(C&&E&&(E.constructor==Object)){var D={};for(var B in C._oData){D[B]=C._oData[B];}C._oData=E;this.fireEvent("recordUpdateEvent",{record:C,newData:E,oldData:D});return C;}else{return null;}};YAHOO.widget.RecordSet.prototype.updateKey=function(A,D,G){var C=this.getRecord(A);if(C){var F=null;var E=C._oData[D];if(E&&E.constructor==Object){F={};for(var B in E){F[B]=E[B];}}else{F=E;}C._oData[D]=G;this.fireEvent("keyUpdateEvent",{record:C,key:D,newData:G,oldData:F});}else{}};YAHOO.widget.RecordSet.prototype.replaceRecords=function(A){this.reset();return this.addRecords(A);};YAHOO.widget.RecordSet.prototype.sortRecords=function(A,B){return this._records.sort(function(D,C){return A(D,C,B);});};YAHOO.widget.RecordSet.prototype.deleteRecord=function(B){if(YAHOO.lang.isNumber(B)&&(B>-1)&&(B<this.getLen!
 gth())){var A=this.getRecord(B).getData();
-var D={};for(var C in A){D[C]=A[C];}this._deleteRecord(B);this.fireEvent("recordDeleteEvent",{data:D,index:B});return D;}else{return null;}};YAHOO.widget.RecordSet.prototype.deleteRecords=function(C,A){if(!YAHOO.lang.isNumber(A)){A=1;}if(YAHOO.lang.isNumber(C)&&(C>-1)&&(C<this.getLength())){var F=this.getRecords(C,A);var B=[];for(var E=0;E<F.length;E++){var G={};for(var D in F[E]){G[D]=F[E][D];}B.push(G);}this._deleteRecord(C,A);this.fireEvent("recordsDeleteEvent",{data:B,index:C});}else{}};YAHOO.widget.RecordSet.prototype.reset=function(){this._records=[];this._length=0;this.fireEvent("resetEvent");};YAHOO.widget.Record=function(A){this._sId=YAHOO.widget.Record._nCount+"";YAHOO.widget.Record._nCount++;this._oData={};if(A&&(A.constructor==Object)){for(var B in A){this._oData[B]=A[B];}}};YAHOO.widget.Record._nCount=0;YAHOO.widget.Record.prototype._sId=null;YAHOO.widget.Record.prototype._oData=null;YAHOO.widget.Record.prototype.getId=function(){return this._sId;};YAHOO.widget!
 .Record.prototype.getData=function(A){if(YAHOO.lang.isString(A)){return this._oData[A];}else{return this._oData;}};YAHOO.register("datatable",YAHOO.widget.DataTable,{version:"2.3.1",build:"541"});
\ No newline at end of file
+var D={};for(var C in A){D[C]=A[C];}this._deleteRecord(B);this.fireEvent("recordDeleteEvent",{data:D,index:B});return D;}else{return null;}};YAHOO.widget.RecordSet.prototype.deleteRecords=function(C,A){if(!YAHOO.lang.isNumber(A)){A=1;}if(YAHOO.lang.isNumber(C)&&(C>-1)&&(C<this.getLength())){var F=this.getRecords(C,A);var B=[];for(var E=0;E<F.length;E++){var G={};for(var D in F[E]){G[D]=F[E][D];}B.push(G);}this._deleteRecord(C,A);this.fireEvent("recordsDeleteEvent",{data:B,index:C});}else{}};YAHOO.widget.RecordSet.prototype.reset=function(){this._records=[];this._length=0;this.fireEvent("resetEvent");};YAHOO.widget.Record=function(A){this._sId=YAHOO.widget.Record._nCount+"";YAHOO.widget.Record._nCount++;this._oData={};if(A&&(A.constructor==Object)){for(var B in A){this._oData[B]=A[B];}}};YAHOO.widget.Record._nCount=0;YAHOO.widget.Record.prototype._sId=null;YAHOO.widget.Record.prototype._oData=null;YAHOO.widget.Record.prototype.getId=function(){return this._sId;};YAHOO.widget!
 .Record.prototype.getData=function(A){if(YAHOO.lang.isString(A)){return this._oData[A];}else{return this._oData;}};YAHOO.register("datatable",YAHOO.widget.DataTable,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/datatable/datatable-beta.js
===================================================================
--- trunk/root/static/yui/datatable/datatable-beta.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/datatable/datatable-beta.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * The DataTable widget provides a progressively enhanced DHTML control for
@@ -9359,4 +9359,4 @@
 };
 
 
-YAHOO.register("datatable", YAHOO.widget.DataTable, {version: "2.3.1", build: "541"});
+YAHOO.register("datatable", YAHOO.widget.DataTable, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/dom/README
===================================================================
--- trunk/root/static/yui/dom/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/dom/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,9 +2,20 @@
 
 ** Known Issues **
 * margin/padding/borders on HTML element cause getXY to misreport
-* margin on BODY causes Safari to misreport getXY
+* margin/borders on BODY element may cause getXY to misreport
 * Fixed postioning causes getXY to misreport in some cases
 
+----------------------------
+
+*** version 2.4.1 ***
+
+No change
+
+*** version 2.4.0 ***
+* no longer accounting for safari body margin when offsetParent == body
+* isAncestor and inDocument no longer use batch
+* added getClientRegion()
+
 *** version 2.3.1 ***
 * allow batch() to work on array-like object
 * return null from Dom.get(undefined)

Modified: trunk/root/static/yui/dom/dom-debug.js
===================================================================
--- trunk/root/static/yui/dom/dom-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/dom/dom-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * The dom module provides helper methods for manipulating Dom elements.
@@ -16,7 +16,8 @@
         setStyle,           // ditto
         id_counter = 0,     // for use with generateId
         propertyCache = {}, // for faster hyphen converts
-        reClassNameCache = {}; // cache regexes for className
+        reClassNameCache = {},          // cache regexes for className
+        document = window.document;     // cache for faster lookups
     
     // brower detection
     var isOpera = YAHOO.env.ua.opera,
@@ -131,7 +132,7 @@
             el.style[property] = val;
         };
     }
-    
+
     var testElement = function(node, method) {
         return node && node.nodeType == 1 && ( !method || method(node) );
     };
@@ -213,65 +214,15 @@
          */
         getXY: function(el) {
             var f = function(el) {
-    
-            // has to be part of document to have pageXY
+                // has to be part of document to have pageXY
                 if ( (el.parentNode === null || el.offsetParent === null ||
-                        this.getStyle(el, 'display') == 'none') && el != document.body) {
+                        this.getStyle(el, 'display') == 'none') && el != el.ownerDocument.body) {
                     YAHOO.log('getXY failed: element not available', 'error', 'Dom');
                     return false;
                 }
                 
-                var parentNode = null;
-                var pos = [];
-                var box;
-                var doc = el.ownerDocument; 
-
-                if (el.getBoundingClientRect) { // IE
-                    box = el.getBoundingClientRect();
-                    return [box.left + Y.Dom.getDocumentScrollLeft(el.ownerDocument), box.top + Y.Dom.getDocumentScrollTop(el.ownerDocument)];
-                }
-                else { // safari, opera, & gecko
-                    pos = [el.offsetLeft, el.offsetTop];
-                    parentNode = el.offsetParent;
-
-                    // safari: if el is abs or any parent is abs, subtract body offsets
-                    var hasAbs = this.getStyle(el, 'position') == 'absolute';
-
-                    if (parentNode != el) {
-                        while (parentNode) {
-                            pos[0] += parentNode.offsetLeft;
-                            pos[1] += parentNode.offsetTop;
-                            if (isSafari && !hasAbs && 
-                                    this.getStyle(parentNode,'position') == 'absolute' ) {
-                                hasAbs = true; // we need to offset if any parent is absolutely positioned
-                            }
-                            parentNode = parentNode.offsetParent;
-                        }
-                    }
-
-                    if (isSafari && hasAbs) { //safari doubles in this case
-                        pos[0] -= el.ownerDocument.body.offsetLeft;
-                        pos[1] -= el.ownerDocument.body.offsetTop;
-                    } 
-                }
-                
-                parentNode = el.parentNode;
-
-                // account for any scrolled ancestors
-                while ( parentNode.tagName && !patterns.ROOT_TAG.test(parentNode.tagName) ) 
-                {
-                   // work around opera inline/table scrollLeft/Top bug
-                   if (Y.Dom.getStyle(parentNode, 'display').search(/^inline|table-row.*$/i)) { 
-                        pos[0] -= parentNode.scrollLeft;
-                        pos[1] -= parentNode.scrollTop;
-                    }
-                    
-                    parentNode = parentNode.parentNode; 
-                }
-       
-                YAHOO.log('getXY returning ' + pos, 'info', 'Dom');
-                
-                return pos;
+                YAHOO.log('getXY returning ' + getXY(el), 'info', 'Dom');
+                return getXY(el);
             };
             
             return Y.Dom.batch(el, f, Y.Dom, true);
@@ -602,27 +553,27 @@
          */
         isAncestor: function(haystack, needle) {
             haystack = Y.Dom.get(haystack);
-            if (!haystack || !needle) { return false; }
+            needle = Y.Dom.get(needle);
             
-            var f = function(node) {
-                if (haystack.contains && node.nodeType && !isSafari) { // safari contains is broken
-                    YAHOO.log('isAncestor returning ' + haystack.contains(node), 'info', 'Dom');
-                    return haystack.contains(node);
-                }
-                else if ( haystack.compareDocumentPosition && node.nodeType ) {
-                    YAHOO.log('isAncestor returning ' + !!(haystack.compareDocumentPosition(node) & 16), 'info', 'Dom');
-                    return !!(haystack.compareDocumentPosition(node) & 16);
-                } else if (node.nodeType) {
-                    // fallback to crawling up (safari)
-                    return !!this.getAncestorBy(node, function(el) {
-                        return el == haystack; 
-                    }); 
-                }
-                YAHOO.log('isAncestor failed; most likely needle is not an HTMLElement', 'error', 'Dom');
+            if (!haystack || !needle) {
                 return false;
-            };
-            
-            return Y.Dom.batch(needle, f, Y.Dom, true);      
+            }
+
+            if (haystack.contains && needle.nodeType && !isSafari) { // safari contains is broken
+                YAHOO.log('isAncestor returning ' + haystack.contains(needle), 'info', 'Dom');
+                return haystack.contains(needle);
+            }
+            else if ( haystack.compareDocumentPosition && needle.nodeType ) {
+                YAHOO.log('isAncestor returning ' + !!(haystack.compareDocumentPosition(needle) & 16), 'info', 'Dom');
+                return !!(haystack.compareDocumentPosition(needle) & 16);
+            } else if (needle.nodeType) {
+                // fallback to crawling up (safari)
+                return !!this.getAncestorBy(needle, function(el) {
+                    return el == haystack; 
+                }); 
+            }
+            YAHOO.log('isAncestor failed; most likely needle is not an HTMLElement', 'error', 'Dom');
+            return false;
         },
         
         /**
@@ -632,19 +583,7 @@
          * @return {Boolean} Whether or not the element is present in the current document
          */
         inDocument: function(el) {
-            var f = function(el) { // safari contains fails for body so crawl up
-                if (isSafari) {
-                    while (el = el.parentNode) { // note assignment
-                        if (el == document.documentElement) {
-                            return true;
-                        }
-                    }
-                    return false;
-                }
-                return this.isAncestor(document.documentElement, el);
-            };
-            
-            return Y.Dom.batch(el, f, Y.Dom, true);
+            return this.isAncestor(document.documentElement, el);
         },
         
         /**
@@ -1061,8 +1000,76 @@
             } else {
                 return referenceNode.parentNode.appendChild(newNode);
             }
+        },
+
+        /**
+         * Creates a Region based on the viewport relative to the document. 
+         * @method getClientRegion
+         * @return {Region} A Region object representing the viewport which accounts for document scroll
+         */
+        getClientRegion: function() {
+            var t = Y.Dom.getDocumentScrollTop(),
+                l = Y.Dom.getDocumentScrollLeft(),
+                r = Y.Dom.getViewportWidth() + l,
+                b = Y.Dom.getViewportHeight() + t;
+
+            return new Y.Region(t, r, b, l);
         }
     };
+    
+    var getXY = function() {
+        if (document.documentElement.getBoundingClientRect) { // IE
+            return function(el) {
+                var box = el.getBoundingClientRect();
+
+                var rootNode = el.ownerDocument;
+                return [box.left + Y.Dom.getDocumentScrollLeft(rootNode), box.top +
+                        Y.Dom.getDocumentScrollTop(rootNode)];
+            };
+        } else {
+            return function(el) { // manually calculate by crawling up offsetParents
+                var pos = [el.offsetLeft, el.offsetTop];
+                var parentNode = el.offsetParent;
+
+                // safari: subtract body offsets if el is abs (or any offsetParent), unless body is offsetParent
+                var accountForBody = (isSafari &&
+                        Y.Dom.getStyle(el, 'position') == 'absolute' &&
+                        el.offsetParent == el.ownerDocument.body);
+
+                if (parentNode != el) {
+                    while (parentNode) {
+                        pos[0] += parentNode.offsetLeft;
+                        pos[1] += parentNode.offsetTop;
+                        if (!accountForBody && isSafari && 
+                                Y.Dom.getStyle(parentNode,'position') == 'absolute' ) { 
+                            accountForBody = true;
+                        }
+                        parentNode = parentNode.offsetParent;
+                    }
+                }
+
+                if (accountForBody) { //safari doubles in this case
+                    pos[0] -= el.ownerDocument.body.offsetLeft;
+                    pos[1] -= el.ownerDocument.body.offsetTop;
+                } 
+                parentNode = el.parentNode;
+
+                // account for any scrolled ancestors
+                while ( parentNode.tagName && !patterns.ROOT_TAG.test(parentNode.tagName) ) 
+                {
+                   // work around opera inline/table scrollLeft/Top bug
+                   if (Y.Dom.getStyle(parentNode, 'display').search(/^inline|table-row.*$/i)) { 
+                        pos[0] -= parentNode.scrollLeft;
+                        pos[1] -= parentNode.scrollTop;
+                    }
+                    
+                    parentNode = parentNode.parentNode; 
+                }
+
+                return pos;
+            };
+        }
+    }() // NOTE: Executing for loadtime branching
 })();
 /**
  * A region is a representation of an object on a grid.  It is defined
@@ -1250,4 +1257,4 @@
 
 YAHOO.util.Point.prototype = new YAHOO.util.Region();
 
-YAHOO.register("dom", YAHOO.util.Dom, {version: "2.3.1", build: "541"});
+YAHOO.register("dom", YAHOO.util.Dom, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/dom/dom-min.js
===================================================================
--- trunk/root/static/yui/dom/dom-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/dom/dom-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-(function(){var B=YAHOO.util,K,I,H=0,J={},F={};var C=YAHOO.env.ua.opera,L=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,G=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i};var M=function(O){if(!E.HYPHEN.test(O)){return O;}if(J[O]){return J[O];}var P=O;while(E.HYPHEN.exec(P)){P=P.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}J[O]=P;return P;};var N=function(P){var O=F[P];if(!O){O=new RegExp("(?:^|\\s+)"+P+"(?:\\s+|$)");F[P]=O;}return O;};if(document.defaultView&&document.defaultView.getComputedStyle){K=function(O,R){var Q=null;if(R=="float"){R="cssFloat";}var P=document.defaultView.getComputedStyle(O,"");if(P){Q=P[M(R)];}return O.style[R]||Q;};}else{if(document.documentElement.currentStyle&&G){K=function(O,Q){switch(M(Q)){case"opacity":var S=100;try{S=O.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(R){try{S=O.filters("alpha").opacity;}catch(R){}}return S/100;case"float":Q="styleFloat";default:var P=O.currentStyle?O.currentStyle[Q]:null;return!
 (O.style[Q]||P);}};}else{K=function(O,P){return O.style[P];};}}if(G){I=function(O,P,Q){switch(P){case"opacity":if(YAHOO.lang.isString(O.style.filter)){O.style.filter="alpha(opacity="+Q*100+")";if(!O.currentStyle||!O.currentStyle.hasLayout){O.style.zoom=1;}}break;case"float":P="styleFloat";default:O.style[P]=Q;}};}else{I=function(O,P,Q){if(P=="float"){P="cssFloat";}O.style[P]=Q;};}var D=function(O,P){return O&&O.nodeType==1&&(!P||P(O));};YAHOO.util.Dom={get:function(Q){if(Q&&(Q.tagName||Q.item)){return Q;}if(YAHOO.lang.isString(Q)||!Q){return document.getElementById(Q);}if(Q.length!==undefined){var R=[];for(var P=0,O=Q.length;P<O;++P){R[R.length]=B.Dom.get(Q[P]);}return R;}return Q;},getStyle:function(O,Q){Q=M(Q);var P=function(R){return K(R,Q);};return B.Dom.batch(O,P,B.Dom,true);},setStyle:function(O,Q,R){Q=M(Q);var P=function(S){I(S,Q,R);};B.Dom.batch(O,P,B.Dom,true);},getXY:function(O){var P=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"dis!
 play")=="none")&&R!=document.body){return false;}var Q=null;va!
 r V=[];v
ar S;var T=R.ownerDocument;if(R.getBoundingClientRect){S=R.getBoundingClientRect();return[S.left+B.Dom.getDocumentScrollLeft(R.ownerDocument),S.top+B.Dom.getDocumentScrollTop(R.ownerDocument)];}else{V=[R.offsetLeft,R.offsetTop];Q=R.offsetParent;var U=this.getStyle(R,"position")=="absolute";if(Q!=R){while(Q){V[0]+=Q.offsetLeft;V[1]+=Q.offsetTop;if(L&&!U&&this.getStyle(Q,"position")=="absolute"){U=true;}Q=Q.offsetParent;}}if(L&&U){V[0]-=R.ownerDocument.body.offsetLeft;V[1]-=R.ownerDocument.body.offsetTop;}}Q=R.parentNode;while(Q.tagName&&!E.ROOT_TAG.test(Q.tagName)){if(B.Dom.getStyle(Q,"display").search(/^inline|table-row.*$/i)){V[0]-=Q.scrollLeft;V[1]-=Q.scrollTop;}Q=Q.parentNode;}return V;};return B.Dom.batch(O,P,B.Dom,true);},getX:function(O){var P=function(Q){return B.Dom.getXY(Q)[0];};return B.Dom.batch(O,P,B.Dom,true);},getY:function(O){var P=function(Q){return B.Dom.getXY(Q)[1];};return B.Dom.batch(O,P,B.Dom,true);},setXY:function(O,R,Q){var P=function(U){var T=this.get!
 Style(U,"position");if(T=="static"){this.setStyle(U,"position","relative");T="relative";}var W=this.getXY(U);if(W===false){return false;}var V=[parseInt(this.getStyle(U,"left"),10),parseInt(this.getStyle(U,"top"),10)];if(isNaN(V[0])){V[0]=(T=="relative")?0:U.offsetLeft;}if(isNaN(V[1])){V[1]=(T=="relative")?0:U.offsetTop;}if(R[0]!==null){U.style.left=R[0]-W[0]+V[0]+"px";}if(R[1]!==null){U.style.top=R[1]-W[1]+V[1]+"px";}if(!Q){var S=this.getXY(U);if((R[0]!==null&&S[0]!=R[0])||(R[1]!==null&&S[1]!=R[1])){this.setXY(U,R,true);}}};B.Dom.batch(O,P,B.Dom,true);},setX:function(P,O){B.Dom.setXY(P,[O,null]);},setY:function(O,P){B.Dom.setXY(O,[null,P]);},getRegion:function(O){var P=function(Q){if((Q.parentNode===null||Q.offsetParent===null||this.getStyle(Q,"display")=="none")&&Q!=document.body){return false;}var R=B.Region.getRegion(Q);return R;};return B.Dom.batch(O,P,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getV!
 iewportHeight();},getElementsByClassName:function(S,W,T,U){W=W!
 ||"*";T=
(T)?B.Dom.get(T):null||document;if(!T){return[];}var P=[],O=T.getElementsByTagName(W),V=N(S);for(var Q=0,R=O.length;Q<R;++Q){if(V.test(O[Q].className)){P[P.length]=O[Q];if(U){U.call(O[Q],O[Q]);}}}return P;},hasClass:function(Q,P){var O=N(P);var R=function(S){return O.test(S.className);};return B.Dom.batch(Q,R,B.Dom,true);},addClass:function(P,O){var Q=function(R){if(this.hasClass(R,O)){return false;}R.className=YAHOO.lang.trim([R.className,O].join(" "));return true;};return B.Dom.batch(P,Q,B.Dom,true);},removeClass:function(Q,P){var O=N(P);var R=function(S){if(!this.hasClass(S,P)){return false;}var T=S.className;S.className=T.replace(O," ");if(this.hasClass(S,P)){this.removeClass(S,P);}S.className=YAHOO.lang.trim(S.className);return true;};return B.Dom.batch(Q,R,B.Dom,true);},replaceClass:function(R,P,O){if(!O||P===O){return false;}var Q=N(P);var S=function(T){if(!this.hasClass(T,P)){this.addClass(T,O);return true;}T.className=T.className.replace(Q," "+O+" ");if(this.hasClas!
 s(T,P)){this.replaceClass(T,P,O);}T.className=YAHOO.lang.trim(T.className);return true;};return B.Dom.batch(R,S,B.Dom,true);},generateId:function(O,Q){Q=Q||"yui-gen";var P=function(R){if(R&&R.id){return R.id;}var S=Q+H++;if(R){R.id=S;}return S;};return B.Dom.batch(O,P,B.Dom,true)||P.apply(B.Dom,arguments);},isAncestor:function(P,Q){P=B.Dom.get(P);if(!P||!Q){return false;}var O=function(R){if(P.contains&&R.nodeType&&!L){return P.contains(R);}else{if(P.compareDocumentPosition&&R.nodeType){return !!(P.compareDocumentPosition(R)&16);}else{if(R.nodeType){return !!this.getAncestorBy(R,function(S){return S==P;});}}}return false;};return B.Dom.batch(Q,O,B.Dom,true);},inDocument:function(O){var P=function(Q){if(L){while(Q=Q.parentNode){if(Q==document.documentElement){return true;}}return false;}return this.isAncestor(document.documentElement,Q);};return B.Dom.batch(O,P,B.Dom,true);},getElementsBy:function(V,P,Q,S){P=P||"*";
-Q=(Q)?B.Dom.get(Q):null||document;if(!Q){return[];}var R=[],U=Q.getElementsByTagName(P);for(var T=0,O=U.length;T<O;++T){if(V(U[T])){R[R.length]=U[T];if(S){S(U[T]);}}}return R;},batch:function(S,V,U,Q){S=(S&&(S.tagName||S.item))?S:B.Dom.get(S);if(!S||!V){return false;}var R=(Q)?U:window;if(S.tagName||S.length===undefined){return V.call(R,S,U);}var T=[];for(var P=0,O=S.length;P<O;++P){T[T.length]=V.call(R,S[P],U);}return T;},getDocumentHeight:function(){var P=(document.compatMode!="CSS1Compat")?document.body.scrollHeight:document.documentElement.scrollHeight;var O=Math.max(P,B.Dom.getViewportHeight());return O;},getDocumentWidth:function(){var P=(document.compatMode!="CSS1Compat")?document.body.scrollWidth:document.documentElement.scrollWidth;var O=Math.max(P,B.Dom.getViewportWidth());return O;},getViewportHeight:function(){var O=self.innerHeight;var P=document.compatMode;if((P||G)&&!C){O=(P=="CSS1Compat")?document.documentElement.clientHeight:document.body.clientHeight;}retu!
 rn O;},getViewportWidth:function(){var O=self.innerWidth;var P=document.compatMode;if(P||G){O=(P=="CSS1Compat")?document.documentElement.clientWidth:document.body.clientWidth;}return O;},getAncestorBy:function(O,P){while(O=O.parentNode){if(D(O,P)){return O;}}return null;},getAncestorByClassName:function(P,O){P=B.Dom.get(P);if(!P){return null;}var Q=function(R){return B.Dom.hasClass(R,O);};return B.Dom.getAncestorBy(P,Q);},getAncestorByTagName:function(P,O){P=B.Dom.get(P);if(!P){return null;}var Q=function(R){return R.tagName&&R.tagName.toUpperCase()==O.toUpperCase();};return B.Dom.getAncestorBy(P,Q);},getPreviousSiblingBy:function(O,P){while(O){O=O.previousSibling;if(D(O,P)){return O;}}return null;},getPreviousSibling:function(O){O=B.Dom.get(O);if(!O){return null;}return B.Dom.getPreviousSiblingBy(O);},getNextSiblingBy:function(O,P){while(O){O=O.nextSibling;if(D(O,P)){return O;}}return null;},getNextSibling:function(O){O=B.Dom.get(O);if(!O){return null;}return B.Dom.getNext!
 SiblingBy(O);},getFirstChildBy:function(O,Q){var P=(D(O.firstC!
 hild,Q))
?O.firstChild:null;return P||B.Dom.getNextSiblingBy(O.firstChild,Q);},getFirstChild:function(O,P){O=B.Dom.get(O);if(!O){return null;}return B.Dom.getFirstChildBy(O);},getLastChildBy:function(O,Q){if(!O){return null;}var P=(D(O.lastChild,Q))?O.lastChild:null;return P||B.Dom.getPreviousSiblingBy(O.lastChild,Q);},getLastChild:function(O){O=B.Dom.get(O);return B.Dom.getLastChildBy(O);},getChildrenBy:function(P,R){var Q=B.Dom.getFirstChildBy(P,R);var O=Q?[Q]:[];B.Dom.getNextSiblingBy(Q,function(S){if(!R||R(S)){O[O.length]=S;}return false;});return O;},getChildren:function(O){O=B.Dom.get(O);if(!O){}return B.Dom.getChildrenBy(O);},getDocumentScrollLeft:function(O){O=O||document;return Math.max(O.documentElement.scrollLeft,O.body.scrollLeft);},getDocumentScrollTop:function(O){O=O||document;return Math.max(O.documentElement.scrollTop,O.body.scrollTop);},insertBefore:function(P,O){P=B.Dom.get(P);O=B.Dom.get(O);if(!P||!O||!O.parentNode){return null;}return O.parentNode.insertBefore(P,O!
 );},insertAfter:function(P,O){P=B.Dom.get(P);O=B.Dom.get(O);if(!P||!O||!O.parentNode){return null;}if(O.nextSibling){return O.parentNode.insertBefore(P,O.nextSibling);}else{return O.parentNode.appendChild(P);}}};})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.mi!
 n(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YA!
 HOO.util
.Region.prototype.toString=function(){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.3.1",build:"541"});
\ No newline at end of file
+(function(){var B=YAHOO.util,L,J,H=0,K={},F={},N=window.document;var C=YAHOO.env.ua.opera,M=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,G=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i};var O=function(Q){if(!E.HYPHEN.test(Q)){return Q;}if(K[Q]){return K[Q];}var R=Q;while(E.HYPHEN.exec(R)){R=R.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}K[Q]=R;return R;};var P=function(R){var Q=F[R];if(!Q){Q=new RegExp("(?:^|\\s+)"+R+"(?:\\s+|$)");F[R]=Q;}return Q;};if(N.defaultView&&N.defaultView.getComputedStyle){L=function(Q,T){var S=null;if(T=="float"){T="cssFloat";}var R=N.defaultView.getComputedStyle(Q,"");if(R){S=R[O(T)];}return Q.style[T]||S;};}else{if(N.documentElement.currentStyle&&G){L=function(Q,S){switch(O(S)){case"opacity":var U=100;try{U=Q.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(T){try{U=Q.filters("alpha").opacity;}catch(T){}}return U/100;case"float":S="styleFloat";default:var R=Q.currentStyle?Q.currentStyle[S]:null;return(Q.style[S!
 ]||R);}};}else{L=function(Q,R){return Q.style[R];};}}if(G){J=function(Q,R,S){switch(R){case"opacity":if(YAHOO.lang.isString(Q.style.filter)){Q.style.filter="alpha(opacity="+S*100+")";if(!Q.currentStyle||!Q.currentStyle.hasLayout){Q.style.zoom=1;}}break;case"float":R="styleFloat";default:Q.style[R]=S;}};}else{J=function(Q,R,S){if(R=="float"){R="cssFloat";}Q.style[R]=S;};}var D=function(Q,R){return Q&&Q.nodeType==1&&(!R||R(Q));};YAHOO.util.Dom={get:function(S){if(S&&(S.tagName||S.item)){return S;}if(YAHOO.lang.isString(S)||!S){return N.getElementById(S);}if(S.length!==undefined){var T=[];for(var R=0,Q=S.length;R<Q;++R){T[T.length]=B.Dom.get(S[R]);}return T;}return S;},getStyle:function(Q,S){S=O(S);var R=function(T){return L(T,S);};return B.Dom.batch(Q,R,B.Dom,true);},setStyle:function(Q,S,T){S=O(S);var R=function(U){J(U,S,T);};B.Dom.batch(Q,R,B.Dom,true);},getXY:function(Q){var R=function(S){if((S.parentNode===null||S.offsetParent===null||this.getStyle(S,"display")=="none")&&!
 S!=S.ownerDocument.body){return false;}return I(S);};return B.!
 Dom.batc
h(Q,R,B.Dom,true);},getX:function(Q){var R=function(S){return B.Dom.getXY(S)[0];};return B.Dom.batch(Q,R,B.Dom,true);},getY:function(Q){var R=function(S){return B.Dom.getXY(S)[1];};return B.Dom.batch(Q,R,B.Dom,true);},setXY:function(Q,T,S){var R=function(W){var V=this.getStyle(W,"position");if(V=="static"){this.setStyle(W,"position","relative");V="relative";}var Y=this.getXY(W);if(Y===false){return false;}var X=[parseInt(this.getStyle(W,"left"),10),parseInt(this.getStyle(W,"top"),10)];if(isNaN(X[0])){X[0]=(V=="relative")?0:W.offsetLeft;}if(isNaN(X[1])){X[1]=(V=="relative")?0:W.offsetTop;}if(T[0]!==null){W.style.left=T[0]-Y[0]+X[0]+"px";}if(T[1]!==null){W.style.top=T[1]-Y[1]+X[1]+"px";}if(!S){var U=this.getXY(W);if((T[0]!==null&&U[0]!=T[0])||(T[1]!==null&&U[1]!=T[1])){this.setXY(W,T,true);}}};B.Dom.batch(Q,R,B.Dom,true);},setX:function(R,Q){B.Dom.setXY(R,[Q,null]);},setY:function(Q,R){B.Dom.setXY(Q,[null,R]);},getRegion:function(Q){var R=function(S){if((S.parentNode===null||S!
 .offsetParent===null||this.getStyle(S,"display")=="none")&&S!=N.body){return false;}var T=B.Region.getRegion(S);return T;};return B.Dom.batch(Q,R,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(U,Y,V,W){Y=Y||"*";V=(V)?B.Dom.get(V):null||N;if(!V){return[];}var R=[],Q=V.getElementsByTagName(Y),X=P(U);for(var S=0,T=Q.length;S<T;++S){if(X.test(Q[S].className)){R[R.length]=Q[S];if(W){W.call(Q[S],Q[S]);}}}return R;},hasClass:function(S,R){var Q=P(R);var T=function(U){return Q.test(U.className);};return B.Dom.batch(S,T,B.Dom,true);},addClass:function(R,Q){var S=function(T){if(this.hasClass(T,Q)){return false;}T.className=YAHOO.lang.trim([T.className,Q].join(" "));return true;};return B.Dom.batch(R,S,B.Dom,true);},removeClass:function(S,R){var Q=P(R);var T=function(U){if(!this.hasClass(U,R)){return false;}var V=U.className;U.className=V.replace(Q," ");if(this.hasC!
 lass(U,R)){this.removeClass(U,R);}U.className=YAHOO.lang.trim(!
 U.classN
ame);return true;};return B.Dom.batch(S,T,B.Dom,true);},replaceClass:function(T,R,Q){if(!Q||R===Q){return false;}var S=P(R);var U=function(V){if(!this.hasClass(V,R)){this.addClass(V,Q);return true;}V.className=V.className.replace(S," "+Q+" ");if(this.hasClass(V,R)){this.replaceClass(V,R,Q);}V.className=YAHOO.lang.trim(V.className);return true;};return B.Dom.batch(T,U,B.Dom,true);},generateId:function(Q,S){S=S||"yui-gen";var R=function(T){if(T&&T.id){return T.id;}var U=S+H++;if(T){T.id=U;}return U;};return B.Dom.batch(Q,R,B.Dom,true)||R.apply(B.Dom,arguments);},isAncestor:function(Q,R){Q=B.Dom.get(Q);R=B.Dom.get(R);if(!Q||!R){return false;}if(Q.contains&&R.nodeType&&!M){return Q.contains(R);}else{if(Q.compareDocumentPosition&&R.nodeType){return !!(Q.compareDocumentPosition(R)&16);}else{if(R.nodeType){return !!this.getAncestorBy(R,function(S){return S==Q;});}}}return false;},inDocument:function(Q){return this.isAncestor(N.documentElement,Q);},getElementsBy:function(X,R,S,U){R=!
 R||"*";S=(S)?B.Dom.get(S):null||N;if(!S){return[];}var T=[],W=S.getElementsByTagName(R);for(var V=0,Q=W.length;V<Q;++V){if(X(W[V])){T[T.length]=W[V];if(U){U(W[V]);}}}return T;},batch:function(U,X,W,S){U=(U&&(U.tagName||U.item))?U:B.Dom.get(U);if(!U||!X){return false;}var T=(S)?W:window;if(U.tagName||U.length===undefined){return X.call(T,U,W);}var V=[];for(var R=0,Q=U.length;R<Q;++R){V[V.length]=X.call(T,U[R],W);}return V;},getDocumentHeight:function(){var R=(N.compatMode!="CSS1Compat")?N.body.scrollHeight:N.documentElement.scrollHeight;var Q=Math.max(R,B.Dom.getViewportHeight());return Q;},getDocumentWidth:function(){var R=(N.compatMode!="CSS1Compat")?N.body.scrollWidth:N.documentElement.scrollWidth;var Q=Math.max(R,B.Dom.getViewportWidth());return Q;},getViewportHeight:function(){var Q=self.innerHeight;var R=N.compatMode;if((R||G)&&!C){Q=(R=="CSS1Compat")?N.documentElement.clientHeight:N.body.clientHeight;
+}return Q;},getViewportWidth:function(){var Q=self.innerWidth;var R=N.compatMode;if(R||G){Q=(R=="CSS1Compat")?N.documentElement.clientWidth:N.body.clientWidth;}return Q;},getAncestorBy:function(Q,R){while(Q=Q.parentNode){if(D(Q,R)){return Q;}}return null;},getAncestorByClassName:function(R,Q){R=B.Dom.get(R);if(!R){return null;}var S=function(T){return B.Dom.hasClass(T,Q);};return B.Dom.getAncestorBy(R,S);},getAncestorByTagName:function(R,Q){R=B.Dom.get(R);if(!R){return null;}var S=function(T){return T.tagName&&T.tagName.toUpperCase()==Q.toUpperCase();};return B.Dom.getAncestorBy(R,S);},getPreviousSiblingBy:function(Q,R){while(Q){Q=Q.previousSibling;if(D(Q,R)){return Q;}}return null;},getPreviousSibling:function(Q){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getPreviousSiblingBy(Q);},getNextSiblingBy:function(Q,R){while(Q){Q=Q.nextSibling;if(D(Q,R)){return Q;}}return null;},getNextSibling:function(Q){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getNextSiblingBy(Q);},g!
 etFirstChildBy:function(Q,S){var R=(D(Q.firstChild,S))?Q.firstChild:null;return R||B.Dom.getNextSiblingBy(Q.firstChild,S);},getFirstChild:function(Q,R){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getFirstChildBy(Q);},getLastChildBy:function(Q,S){if(!Q){return null;}var R=(D(Q.lastChild,S))?Q.lastChild:null;return R||B.Dom.getPreviousSiblingBy(Q.lastChild,S);},getLastChild:function(Q){Q=B.Dom.get(Q);return B.Dom.getLastChildBy(Q);},getChildrenBy:function(R,T){var S=B.Dom.getFirstChildBy(R,T);var Q=S?[S]:[];B.Dom.getNextSiblingBy(S,function(U){if(!T||T(U)){Q[Q.length]=U;}return false;});return Q;},getChildren:function(Q){Q=B.Dom.get(Q);if(!Q){}return B.Dom.getChildrenBy(Q);},getDocumentScrollLeft:function(Q){Q=Q||N;return Math.max(Q.documentElement.scrollLeft,Q.body.scrollLeft);},getDocumentScrollTop:function(Q){Q=Q||N;return Math.max(Q.documentElement.scrollTop,Q.body.scrollTop);},insertBefore:function(R,Q){R=B.Dom.get(R);Q=B.Dom.get(Q);if(!R||!Q||!Q.parentNode){return n!
 ull;}return Q.parentNode.insertBefore(R,Q);},insertAfter:funct!
 ion(R,Q)
{R=B.Dom.get(R);Q=B.Dom.get(Q);if(!R||!Q||!Q.parentNode){return null;}if(Q.nextSibling){return Q.parentNode.insertBefore(R,Q.nextSibling);}else{return Q.parentNode.appendChild(R);}},getClientRegion:function(){var S=B.Dom.getDocumentScrollTop(),R=B.Dom.getDocumentScrollLeft(),T=B.Dom.getViewportWidth()+R,Q=B.Dom.getViewportHeight()+S;return new B.Region(S,T,Q,R);}};var I=function(){if(N.documentElement.getBoundingClientRect){return function(R){var S=R.getBoundingClientRect();var Q=R.ownerDocument;return[S.left+B.Dom.getDocumentScrollLeft(Q),S.top+B.Dom.getDocumentScrollTop(Q)];};}else{return function(S){var T=[S.offsetLeft,S.offsetTop];var R=S.offsetParent;var Q=(M&&B.Dom.getStyle(S,"position")=="absolute"&&S.offsetParent==S.ownerDocument.body);if(R!=S){while(R){T[0]+=R.offsetLeft;T[1]+=R.offsetTop;if(!Q&&M&&B.Dom.getStyle(R,"position")=="absolute"){Q=true;}R=R.offsetParent;}}if(Q){T[0]-=S.ownerDocument.body.offsetLeft;T[1]-=S.ownerDocument.body.offsetTop;}R=S.parentNode;whil!
 e(R.tagName&&!E.ROOT_TAG.test(R.tagName)){if(B.Dom.getStyle(R,"display").search(/^inline|table-row.*$/i)){T[0]-=R.scrollLeft;T[1]-=R.scrollTop;}R=R.parentNode;}return T;};}}();})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO!
 .util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=f!
 unction(
){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/dom/dom.js
===================================================================
--- trunk/root/static/yui/dom/dom.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/dom/dom.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * The dom module provides helper methods for manipulating Dom elements.
@@ -16,7 +16,8 @@
         setStyle,           // ditto
         id_counter = 0,     // for use with generateId
         propertyCache = {}, // for faster hyphen converts
-        reClassNameCache = {}; // cache regexes for className
+        reClassNameCache = {},          // cache regexes for className
+        document = window.document;     // cache for faster lookups
     
     // brower detection
     var isOpera = YAHOO.env.ua.opera,
@@ -129,7 +130,7 @@
             el.style[property] = val;
         };
     }
-    
+
     var testElement = function(node, method) {
         return node && node.nodeType == 1 && ( !method || method(node) );
     };
@@ -210,63 +211,13 @@
          */
         getXY: function(el) {
             var f = function(el) {
-    
-            // has to be part of document to have pageXY
+                // has to be part of document to have pageXY
                 if ( (el.parentNode === null || el.offsetParent === null ||
-                        this.getStyle(el, 'display') == 'none') && el != document.body) {
+                        this.getStyle(el, 'display') == 'none') && el != el.ownerDocument.body) {
                     return false;
                 }
                 
-                var parentNode = null;
-                var pos = [];
-                var box;
-                var doc = el.ownerDocument; 
-
-                if (el.getBoundingClientRect) { // IE
-                    box = el.getBoundingClientRect();
-                    return [box.left + Y.Dom.getDocumentScrollLeft(el.ownerDocument), box.top + Y.Dom.getDocumentScrollTop(el.ownerDocument)];
-                }
-                else { // safari, opera, & gecko
-                    pos = [el.offsetLeft, el.offsetTop];
-                    parentNode = el.offsetParent;
-
-                    // safari: if el is abs or any parent is abs, subtract body offsets
-                    var hasAbs = this.getStyle(el, 'position') == 'absolute';
-
-                    if (parentNode != el) {
-                        while (parentNode) {
-                            pos[0] += parentNode.offsetLeft;
-                            pos[1] += parentNode.offsetTop;
-                            if (isSafari && !hasAbs && 
-                                    this.getStyle(parentNode,'position') == 'absolute' ) {
-                                hasAbs = true; // we need to offset if any parent is absolutely positioned
-                            }
-                            parentNode = parentNode.offsetParent;
-                        }
-                    }
-
-                    if (isSafari && hasAbs) { //safari doubles in this case
-                        pos[0] -= el.ownerDocument.body.offsetLeft;
-                        pos[1] -= el.ownerDocument.body.offsetTop;
-                    } 
-                }
-                
-                parentNode = el.parentNode;
-
-                // account for any scrolled ancestors
-                while ( parentNode.tagName && !patterns.ROOT_TAG.test(parentNode.tagName) ) 
-                {
-                   // work around opera inline/table scrollLeft/Top bug
-                   if (Y.Dom.getStyle(parentNode, 'display').search(/^inline|table-row.*$/i)) { 
-                        pos[0] -= parentNode.scrollLeft;
-                        pos[1] -= parentNode.scrollTop;
-                    }
-                    
-                    parentNode = parentNode.parentNode; 
-                }
-       
-                
-                return pos;
+                return getXY(el);
             };
             
             return Y.Dom.batch(el, f, Y.Dom, true);
@@ -587,24 +538,24 @@
          */
         isAncestor: function(haystack, needle) {
             haystack = Y.Dom.get(haystack);
-            if (!haystack || !needle) { return false; }
+            needle = Y.Dom.get(needle);
             
-            var f = function(node) {
-                if (haystack.contains && node.nodeType && !isSafari) { // safari contains is broken
-                    return haystack.contains(node);
-                }
-                else if ( haystack.compareDocumentPosition && node.nodeType ) {
-                    return !!(haystack.compareDocumentPosition(node) & 16);
-                } else if (node.nodeType) {
-                    // fallback to crawling up (safari)
-                    return !!this.getAncestorBy(node, function(el) {
-                        return el == haystack; 
-                    }); 
-                }
+            if (!haystack || !needle) {
                 return false;
-            };
-            
-            return Y.Dom.batch(needle, f, Y.Dom, true);      
+            }
+
+            if (haystack.contains && needle.nodeType && !isSafari) { // safari contains is broken
+                return haystack.contains(needle);
+            }
+            else if ( haystack.compareDocumentPosition && needle.nodeType ) {
+                return !!(haystack.compareDocumentPosition(needle) & 16);
+            } else if (needle.nodeType) {
+                // fallback to crawling up (safari)
+                return !!this.getAncestorBy(needle, function(el) {
+                    return el == haystack; 
+                }); 
+            }
+            return false;
         },
         
         /**
@@ -614,19 +565,7 @@
          * @return {Boolean} Whether or not the element is present in the current document
          */
         inDocument: function(el) {
-            var f = function(el) { // safari contains fails for body so crawl up
-                if (isSafari) {
-                    while (el = el.parentNode) { // note assignment
-                        if (el == document.documentElement) {
-                            return true;
-                        }
-                    }
-                    return false;
-                }
-                return this.isAncestor(document.documentElement, el);
-            };
-            
-            return Y.Dom.batch(el, f, Y.Dom, true);
+            return this.isAncestor(document.documentElement, el);
         },
         
         /**
@@ -1026,8 +965,76 @@
             } else {
                 return referenceNode.parentNode.appendChild(newNode);
             }
+        },
+
+        /**
+         * Creates a Region based on the viewport relative to the document. 
+         * @method getClientRegion
+         * @return {Region} A Region object representing the viewport which accounts for document scroll
+         */
+        getClientRegion: function() {
+            var t = Y.Dom.getDocumentScrollTop(),
+                l = Y.Dom.getDocumentScrollLeft(),
+                r = Y.Dom.getViewportWidth() + l,
+                b = Y.Dom.getViewportHeight() + t;
+
+            return new Y.Region(t, r, b, l);
         }
     };
+    
+    var getXY = function() {
+        if (document.documentElement.getBoundingClientRect) { // IE
+            return function(el) {
+                var box = el.getBoundingClientRect();
+
+                var rootNode = el.ownerDocument;
+                return [box.left + Y.Dom.getDocumentScrollLeft(rootNode), box.top +
+                        Y.Dom.getDocumentScrollTop(rootNode)];
+            };
+        } else {
+            return function(el) { // manually calculate by crawling up offsetParents
+                var pos = [el.offsetLeft, el.offsetTop];
+                var parentNode = el.offsetParent;
+
+                // safari: subtract body offsets if el is abs (or any offsetParent), unless body is offsetParent
+                var accountForBody = (isSafari &&
+                        Y.Dom.getStyle(el, 'position') == 'absolute' &&
+                        el.offsetParent == el.ownerDocument.body);
+
+                if (parentNode != el) {
+                    while (parentNode) {
+                        pos[0] += parentNode.offsetLeft;
+                        pos[1] += parentNode.offsetTop;
+                        if (!accountForBody && isSafari && 
+                                Y.Dom.getStyle(parentNode,'position') == 'absolute' ) { 
+                            accountForBody = true;
+                        }
+                        parentNode = parentNode.offsetParent;
+                    }
+                }
+
+                if (accountForBody) { //safari doubles in this case
+                    pos[0] -= el.ownerDocument.body.offsetLeft;
+                    pos[1] -= el.ownerDocument.body.offsetTop;
+                } 
+                parentNode = el.parentNode;
+
+                // account for any scrolled ancestors
+                while ( parentNode.tagName && !patterns.ROOT_TAG.test(parentNode.tagName) ) 
+                {
+                   // work around opera inline/table scrollLeft/Top bug
+                   if (Y.Dom.getStyle(parentNode, 'display').search(/^inline|table-row.*$/i)) { 
+                        pos[0] -= parentNode.scrollLeft;
+                        pos[1] -= parentNode.scrollTop;
+                    }
+                    
+                    parentNode = parentNode.parentNode; 
+                }
+
+                return pos;
+            };
+        }
+    }() // NOTE: Executing for loadtime branching
 })();
 /**
  * A region is a representation of an object on a grid.  It is defined
@@ -1214,4 +1221,4 @@
 
 YAHOO.util.Point.prototype = new YAHOO.util.Region();
 
-YAHOO.register("dom", YAHOO.util.Dom, {version: "2.3.1", build: "541"});
+YAHOO.register("dom", YAHOO.util.Dom, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/dragdrop/README
===================================================================
--- trunk/root/static/yui/dragdrop/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/dragdrop/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,19 @@
 Drag and Drop Release Notes
 
+2.4.1
+No change
+
+2.4.0
+  * Added configuration option called "dragOnly". If dragOnly is set to true,
+    all event in the fireEvents method will not fire. These events are:
+        onInvalidDrop
+        b4DragOut & onDragOut
+        onDragEnter
+        b4DragOver & onDragOver
+        b4DragDrop & onDragDrop
+    This config option should be used to drag elements that have no need for
+        drop interaction. They are elements that just need to move.
+
 2.3.1
   * No change
 

Modified: trunk/root/static/yui/dragdrop/dragdrop-debug.js
===================================================================
--- trunk/root/static/yui/dragdrop/dragdrop-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/dragdrop/dragdrop-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * The drag and drop utility provides a framework for building drag and drop
@@ -347,6 +347,16 @@
         startY: 0,
 
         /**
+         * Flag to determine if the drag event was fired from the click timeout and
+         * not the mouse move threshold.
+         * @property fromTimeout
+         * @type boolean
+         * @private
+         * @static
+         */
+        fromTimeout: false,
+
+        /**
          * Each DragDrop instance must be registered with the DragDropMgr.  
          * This is executed in DragDrop.init()
          * @method regDragDrop
@@ -548,7 +558,8 @@
             this.clickTimeout = setTimeout( 
                     function() { 
                         var DDM = YAHOO.util.DDM;
-                        DDM.startDrag(DDM.startX, DDM.startY); 
+                        DDM.startDrag(DDM.startX, DDM.startY);
+                        DDM.fromTimeout = true;
                     }, 
                     this.clickTimeThresh );
         },
@@ -588,6 +599,11 @@
 
                 if (this.dragThreshMet) {
                     YAHOO.log("mouseup detected - completing drag", "info", "DragDropMgr");
+                    if (this.fromTimeout) {
+                        YAHOO.log('fromTimeout is true (mouse didn\'t move), call handleMouseDown so we can get the dragOver event', 'info', 'DragDropMgr');
+                        this.handleMouseMove(e);
+                    }
+                    this.fromTimeout = false;
                     this.fireEvents(e, true);
                 } else {
                     YAHOO.log("drag threshold not met", "info", "DragDropMgr");
@@ -707,7 +723,7 @@
                 this.stopEvent(e);
             }
         },
-
+        
         /**
          * Iterates over all of the DragDrop elements to find ones we are 
          * hovering over or dropping on
@@ -722,7 +738,8 @@
 
             // If the user did the mouse up outside of the window, we could 
             // get here even though we have ended the drag.
-            if (!dc || dc.isLocked()) {
+            // If the config option dragOnly is true, bail out and don't fire the events
+            if (!dc || dc.isLocked() || dc.dragOnly) {
                 return;
             }
 
@@ -740,7 +757,9 @@
                 outEvts   = [],
                 overEvts  = [],
                 dropEvts  = [],
-                enterEvts = [];
+                enterEvts = [],
+                inGroupsObj  = {},
+                inGroups  = [];
 
 
             // Check to see if the object(s) we were hovering over is no longer 
@@ -752,7 +771,6 @@
                 if (! this.isTypeOfDD(ddo)) {
                     continue;
                 }
-
                 if (! this.isOverTarget(pt, ddo, this.mode, curRegion)) {
                     outEvts.push( ddo );
                 }
@@ -776,6 +794,7 @@
 
                     if (oDD.isTarget && !oDD.isLocked() && oDD != dc) {
                         if (this.isOverTarget(pt, oDD, this.mode, curRegion)) {
+                            inGroupsObj[sGroup] = true;
                             // look for drop interactions
                             if (isDrop) {
                                 dropEvts.push( oDD );
@@ -808,6 +827,11 @@
                 validDrop: isDrop
             };
 
+            
+            for (var inG in inGroupsObj) {
+                inGroups.push(inG);
+            }
+
             // notify about a drop that did not find a target
             if (isDrop && !dropEvts.length) {
                 YAHOO.log(dc.id + " dropped, but not on a target", "info", "DragDropMgr");
@@ -826,30 +850,30 @@
                 }
 
                 if (enterEvts.length) {
-                    YAHOO.log(dc.id+" onDragEnter: " + enterEvts, "info", "DragDropMgr");
+                    YAHOO.log(dc.id+" onDragEnter: " + enterEvts + " (group: " + inGroups + ")", "info", "DragDropMgr");
                     if (dc) {
-                        dc.onDragEnter(e, enterEvts);
+                        dc.onDragEnter(e, enterEvts, inGroups);
                     }
                 }
 
                 if (overEvts.length) {
-                    YAHOO.log(dc.id+" onDragOver: " + overEvts, "info", "DragDropMgr");
+                    YAHOO.log(dc.id+" onDragOver: " + overEvts + " (group: " + inGroups + ")", "info", "DragDropMgr");
                     if (dc) {
-                        dc.b4DragOver(e, overEvts);
+                        dc.b4DragOver(e, overEvts, inGroups);
                     }
 
                     if (dc) {
-                        dc.onDragOver(e, overEvts);
+                        dc.onDragOver(e, overEvts, inGroups);
                     }
                 }
 
                 if (dropEvts.length) {
-                    YAHOO.log(dc.id+" onDragDrop: " + dropEvts, "info", "DragDropMgr");
+                    YAHOO.log(dc.id+" onDragDrop: " + dropEvts + " (group: " + inGroups + ")", "info", "DragDropMgr");
                     if (dc) {
-                        dc.b4DragDrop(e, dropEvts);
+                        dc.b4DragDrop(e, dropEvts, inGroups);
                     }
                     if (dc) {
-                        dc.onDragDrop(e, dropEvts);
+                        dc.onDragDrop(e, dropEvts, inGroups);
                     }
                 }
 
@@ -859,42 +883,42 @@
                 for (i=0, len=outEvts.length; i<len; ++i) {
                     YAHOO.log(dc.id+" onDragOut: " + outEvts[i].id, "info", "DragDropMgr");
                     if (dc) {
-                        dc.b4DragOut(e, outEvts[i].id);
+                        dc.b4DragOut(e, outEvts[i].id, inGroups[0]);
                     }
                     if (dc) {
-                        dc.onDragOut(e, outEvts[i].id);
+                        dc.onDragOut(e, outEvts[i].id, inGroups[0]);
                     }
                 }
                  
                 // fire enter events
                 for (i=0,len=enterEvts.length; i<len; ++i) {
-                    YAHOO.log(dc.id + " onDragEnter " + enterEvts[i].id, "info", "DragDropMgr");
+                    YAHOO.log(dc.id + " onDragEnter " + enterEvts[i].id + " (group: " + inGroups + ")", "info", "DragDropMgr");
                     // dc.b4DragEnter(e, oDD.id);
 
                     if (dc) {
-                        dc.onDragEnter(e, enterEvts[i].id);
+                        dc.onDragEnter(e, enterEvts[i].id, inGroups[0]);
                     }
                 }
          
                 // fire over events
                 for (i=0,len=overEvts.length; i<len; ++i) {
-                    YAHOO.log(dc.id + " onDragOver " + overEvts[i].id, "info", "DragDropMgr");
+                    YAHOO.log(dc.id + " onDragOver " + overEvts[i].id + " (group: " + inGroups + ")", "info", "DragDropMgr");
                     if (dc) {
-                        dc.b4DragOver(e, overEvts[i].id);
+                        dc.b4DragOver(e, overEvts[i].id, inGroups[0]);
                     }
                     if (dc) {
-                        dc.onDragOver(e, overEvts[i].id);
+                        dc.onDragOver(e, overEvts[i].id, inGroups[0]);
                     }
                 }
 
                 // fire drop events
                 for (i=0, len=dropEvts.length; i<len; ++i) {
-                    YAHOO.log(dc.id + " dropped on " + dropEvts[i].id, "info", "DragDropMgr");
+                    YAHOO.log(dc.id + " dropped on " + dropEvts[i].id + " (group: " + inGroups + ")", "info", "DragDropMgr");
                     if (dc) {
-                        dc.b4DragDrop(e, dropEvts[i].id);
+                        dc.b4DragDrop(e, dropEvts[i].id, inGroups[0]);
                     }
                     if (dc) {
-                        dc.onDragDrop(e, dropEvts[i].id);
+                        dc.onDragDrop(e, dropEvts[i].id, inGroups[0]);
                     }
                 }
 
@@ -1620,7 +1644,7 @@
     /**
      * By default, all instances can be a drop target.  This can be disabled by
      * setting isTarget to false.
-     * @method isTarget
+     * @property isTarget
      * @type boolean
      */
     isTarget: true,
@@ -1628,10 +1652,16 @@
     /**
      * The padding configured for this drag and drop object for calculating
      * the drop zone intersection with this object.
-     * @method padding
+     * @property padding
      * @type int[]
      */
     padding: null,
+    /**
+     * If this flag is true, do not fire drop events. The element is a drag only element (for movement not dropping)
+     * @property dragOnly
+     * @type Boolean
+     */
+    dragOnly: false,
 
     /**
      * Cached reference to the linked element
@@ -2052,7 +2082,7 @@
         this.isTarget          = (this.config.isTarget !== false);
         this.maintainOffset    = (this.config.maintainOffset);
         this.primaryButtonOnly = (this.config.primaryButtonOnly !== false);
-
+        this.dragOnly = ((this.config.dragOnly === true) ? true : false);
     },
 
     /**
@@ -2264,9 +2294,14 @@
         this.logger.log("firing onMouseDown events");
 
         // firing the mousedown events prior to calculating positions
-        this.b4MouseDown(e);
-        this.onMouseDown(e);
+        var b4Return = this.b4MouseDown(e);
+        var mDownReturn = this.onMouseDown(e);
 
+        if ((b4Return === false) || (mDownReturn === false)) {
+            this.logger.log('b4MouseDown or onMouseDown returned false, exiting drag');
+            return;
+        }
+
         this.DDM.refreshCache(this.groups);
         // var self = this;
         // setTimeout( function() { self.DDM.refreshCache(self.groups); }, 0);
@@ -2302,6 +2337,13 @@
         }
     },
 
+    /**
+     * @method clickValidator
+     * @description Method validates that the clicked element
+     * was indeed the handle or a valid child of the handle
+     * @param {Event} e 
+     * @private
+     */
     clickValidator: function(e) {
         var target = Event.getTarget(e);
         return ( this.isValidHandleChild(target) &&
@@ -2769,10 +2811,16 @@
         } else {
             YAHOO.util.Dom.setStyle(el, "left", (oCoord.x + this.deltaSetXY[0]) + "px");
             YAHOO.util.Dom.setStyle(el, "top",  (oCoord.y + this.deltaSetXY[1]) + "px");
+            //el.style.left = (oCoord.x + this.deltaSetXY[0]) + "px";
+            //el.style.top = (oCoord.y + this.deltaSetXY[1]) + "px";
         }
         
         this.cachePosition(oCoord.x, oCoord.y);
-        this.autoScroll(oCoord.x, oCoord.y, el.offsetHeight, el.offsetWidth);
+        //DAV
+        var self = this;
+        setTimeout(function() {
+            self.autoScroll.call(self, oCoord.x, oCoord.y, el.offsetHeight, el.offsetWidth);
+        }, 0);
     },
 
     /**
@@ -3204,4 +3252,4 @@
         return ("DDTarget " + this.id);
     }
 });
-YAHOO.register("dragdrop", YAHOO.util.DragDropMgr, {version: "2.3.1", build: "541"});
+YAHOO.register("dragdrop", YAHOO.util.DragDropMgr, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/dragdrop/dragdrop-min.js
===================================================================
--- trunk/root/static/yui/dragdrop/dragdrop-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/dragdrop/dragdrop-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,9 +2,9 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(D,C){for(var E in this.ids){for(var B in this.ids[E]){var F=this.ids[E][B];if(!this.isTypeOfDD(F)){continue;}F[D].apply(F,C);}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:function(B){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet!
 :false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(C,B){if(!this.initialized){this.init();}if(!this.ids[B]){this.ids[B]={};}this.ids[B][C.id]=C;},removeDDFromGroup:function(D,B){if(!this.ids[B]){this.ids[B]={};}var C=this.ids[B];if(C&&C[D.id]){delete C[D.id];}},_remove:function(C){for(var B in C.groups){if(B&&this.ids[B][C.id]){delete this.ids[B][C.id];}}delete this.handleIds[C.id];},regHandle:function(C,B){if(!this.handleIds[C]){this.handleIds[C]={};}this.handleIds[C][B]=B;},isDragDrop:function(B){return(this.getDDById(B))?true:false;},getRelated:function(G,C){var F=[];for(var E in G.groups){for(var D in this.ids[E]){var B=this.ids[E][D];if(!this.isTypeOfDD(B)){continue;}if(!C||B.isTarget){F[F.length]=B;}}}return F;},isLegalTarget:function(F,E){var C=this.getRelated(F,true);for(var D=0,B=C.length;D<B;++D){if(C[D].id==E.id){return true;}}return false;},isTypeOfDD:function(B){return(B&&B.__ygDragDrop);},isHandle:function(C,B){return(this.handleIds[C]&&this.handl!
 eIds[C][B]);},getDDById:function(C){for(var B in this.ids){if(!
 this.ids
[B][C]){return this.ids[B][C];}}return null;},handleMouseDown:function(D,C){this.currentTarget=YAHOO.util.Event.getTarget(D);this.dragCurrent=C;var B=C.getEl();this.startX=YAHOO.util.Event.getPageX(D);this.startY=YAHOO.util.Event.getPageY(D);this.deltaX=this.startX-B.offsetLeft;this.deltaY=this.startY-B.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var E=YAHOO.util.DDM;E.startDrag(E.startX,E.startY);},this.clickTimeThresh);},startDrag:function(B,D){clearTimeout(this.clickTimeout);var C=this.dragCurrent;if(C){C.b4StartDrag(B,D);}if(C){C.startDrag(B,D);}this.dragThreshMet=true;},handleMouseUp:function(B){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(B,true);}else{}this.stopDrag(B);this.stopEvent(B);}},stopEvent:function(B){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(B);}if(this.preventDefault){YAHOO.util.Event.preventDefault(B);}},stopDrag:function(C,B){if(this.dragCurrent&&!B){if(this.dra!
 gThreshMet){this.dragCurrent.b4EndDrag(C);this.dragCurrent.endDrag(C);}this.dragCurrent.onMouseUp(C);}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(E){var B=this.dragCurrent;if(B){if(YAHOO.util.Event.isIE&&!E.button){this.stopEvent(E);return this.handleMouseUp(E);}if(!this.dragThreshMet){var D=Math.abs(this.startX-YAHOO.util.Event.getPageX(E));var C=Math.abs(this.startY-YAHOO.util.Event.getPageY(E));if(D>this.clickPixelThresh||C>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){B.b4Drag(E);if(B){B.onDrag(E);}if(B){this.fireEvents(E,false);}}this.stopEvent(E);}},fireEvents:function(Q,H){var S=this.dragCurrent;if(!S||S.isLocked()){return ;}var J=YAHOO.util.Event.getPageX(Q),I=YAHOO.util.Event.getPageY(Q),K=new YAHOO.util.Point(J,I),F=S.getTargetCoord(K.x,K.y),C=S.getDragEl(),P=new YAHOO.util.Region(F.y,F.x+C.offsetWidth,F.y+C.offsetHeight,F.x),E=[],G=[],B=[],R=[],O=[];for(var M in this.dragOvers){var T=this.dragOvers[!
 M];if(!this.isTypeOfDD(T)){continue;}if(!this.isOverTarget(K,T!
 ,this.mo
de,P)){G.push(T);}E[M]=true;delete this.dragOvers[M];}for(var L in S.groups){if("string"!=typeof L){continue;}for(M in this.ids[L]){var D=this.ids[L][M];if(!this.isTypeOfDD(D)){continue;}if(D.isTarget&&!D.isLocked()&&D!=S){if(this.isOverTarget(K,D,this.mode,P)){if(H){R.push(D);}else{if(!E[D.id]){O.push(D);}else{B.push(D);}this.dragOvers[D.id]=D;}}}}}this.interactionInfo={out:G,enter:O,over:B,drop:R,point:K,draggedRegion:P,sourceRegion:this.locationCache[S.id],validDrop:H};if(H&&!R.length){this.interactionInfo.validDrop=false;S.onInvalidDrop(Q);}if(this.mode){if(G.length){S.b4DragOut(Q,G);if(S){S.onDragOut(Q,G);}}if(O.length){if(S){S.onDragEnter(Q,O);}}if(B.length){if(S){S.b4DragOver(Q,B);}if(S){S.onDragOver(Q,B);}}if(R.length){if(S){S.b4DragDrop(Q,R);}if(S){S.onDragDrop(Q,R);}}}else{var N=0;for(M=0,N=G.length;M<N;++M){if(S){S.b4DragOut(Q,G[M].id);}if(S){S.onDragOut(Q,G[M].id);}}for(M=0,N=O.length;M<N;++M){if(S){S.onDragEnter(Q,O[M].id);}}for(M=0,N=B.length;M<N;++M){if(S){S.b!
 4DragOver(Q,B[M].id);}if(S){S.onDragOver(Q,B[M].id);}}for(M=0,N=R.length;M<N;++M){if(S){S.b4DragDrop(Q,R[M].id);}if(S){S.onDragDrop(Q,R[M].id);}}}},getBestMatch:function(D){var F=null;var C=D.length;if(C==1){F=D[0];}else{for(var E=0;E<C;++E){var B=D[E];if(this.mode==this.INTERSECT&&B.cursorIsOver){F=B;break;}else{if(!F||!F.overlap||(B.overlap&&F.overlap.getArea()<B.overlap.getArea())){F=B;}}}}return F;},refreshCache:function(C){var E=C||this.ids;for(var B in E){if("string"!=typeof B){continue;}for(var D in this.ids[B]){var F=this.ids[B][D];if(this.isTypeOfDD(F)){var G=this.getLocation(F);if(G){this.locationCache[F.id]=G;}else{delete this.locationCache[F.id];}}}}},verifyEl:function(C){try{if(C){var B=C.offsetParent;if(B){return true;}}}catch(D){}return false;},getLocation:function(G){if(!this.isTypeOfDD(G)){return null;}var E=G.getEl(),J,D,C,L,K,M,B,I,F;try{J=YAHOO.util.Dom.getXY(E);}catch(H){}if(!J){return null;
-}D=J[0];C=D+E.offsetWidth;L=J[1];K=L+E.offsetHeight;M=L-G.padding[0];B=C+G.padding[1];I=K+G.padding[2];F=D-G.padding[3];return new YAHOO.util.Region(M,B,I,F);},isOverTarget:function(J,B,D,E){var F=this.locationCache[B.id];if(!F||!this.useCache){F=this.getLocation(B);this.locationCache[B.id]=F;}if(!F){return false;}B.cursorIsOver=F.contains(J);var I=this.dragCurrent;if(!I||(!D&&!I.constrainX&&!I.constrainY)){return B.cursorIsOver;}B.overlap=null;if(!E){var G=I.getTargetCoord(J.x,J.y);var C=I.getDragEl();E=new YAHOO.util.Region(G.y,G.x+C.offsetWidth,G.y+C.offsetHeight,G.x);}var H=E.intersect(F);if(H){B.overlap=H;return(D)?true:B.cursorIsOver;}else{return false;}},_onUnload:function(C,B){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(C){var B=this.elementCache[C];if(!B||!B.el){B=this.elementCache[C]=new this.ElementWrapper(YAHOO.util.Dom.get(C));}r!
 eturn B;},getElement:function(B){return YAHOO.util.Dom.get(B);},getCss:function(C){var B=YAHOO.util.Dom.get(C);return(B)?B.style:null;},ElementWrapper:function(B){this.el=B||null;this.id=this.el&&B.id;this.css=this.el&&B.style;},getPosX:function(B){return YAHOO.util.Dom.getX(B);},getPosY:function(B){return YAHOO.util.Dom.getY(B);},swapNode:function(D,B){if(D.swapNode){D.swapNode(B);}else{var E=B.parentNode;var C=B.nextSibling;if(C==D){E.insertBefore(D,B);}else{if(B==D.nextSibling){E.insertBefore(B,D);}else{D.parentNode.replaceChild(B,D);E.insertBefore(D,C);}}}},getScroll:function(){var D,B,E=document.documentElement,C=document.body;if(E&&(E.scrollTop||E.scrollLeft)){D=E.scrollTop;B=E.scrollLeft;}else{if(C){D=C.scrollTop;B=C.scrollLeft;}else{}}return{top:D,left:B};},getStyle:function(C,B){return YAHOO.util.Dom.getStyle(C,B);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(B,D){var C=YAHOO.util.D!
 om.getXY(D);YAHOO.util.Dom.setXY(B,C);},getClientHeight:functi!
 on(){ret
urn YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(C,B){return(C-B);},_timeoutCount:0,_addListeners:function(){var B=YAHOO.util.DDM;if(YAHOO.util.Event&&document){B._onLoad();}else{if(B._timeoutCount>2000){}else{setTimeout(B._addListeners,10);if(document&&document.body){B._timeoutCount+=1;}}}},handleWasClicked:function(B,D){if(this.isHandle(D,B.id)){return true;}else{var C=B.parentNode;while(C){if(this.isHandle(D,C.id)){return true;}else{C=C.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},un!
 lock:function(){this.locked=false;},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id);}return this._domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(E,C,D){this.initTarget(E,C,D);A.on(this._domRef||this.id,"mousedown",thi!
 s.handleMouseDown,this,true);},initTarget:function(E,C,D){this!
 .config=
D||{};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){return ;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0]!
 ;this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(F,E){var C=F.which||F.button;
-if(this.primaryButtonOnly&&C>1){return ;}if(this.isLocked()){return ;}this.b4MouseDown(F);this.onMouseDown(F);this.DDM.refreshCache(this.groups);var D=new YAHOO.util.Point(A.getPageX(F),A.getPageY(F));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(D,this)){}else{if(this.clickValidator(F)){this.setStartPosition();this.DDM.handleMouseDown(F,this);this.DDM.stopEvent(F);}else{}}},clickValidator:function(D){var C=A.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX;}if(C>this.maxX){C=this.maxX;}}if(this.constrainY){if(F<this.minY){F=this.minY;}if(F>this.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.genera!
 teId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E];}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase();}catch(G){H=F.nodeName;}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D]);}return E;},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){th!
 is.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(t!
 his.DDM.
numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D!
 );}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.delt!
 aY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.!
 alignElW
ithMouse(A,C,B);},alignElWithMouse:function(B,F,E){var D=this.getTargetCoord(F,E);if(!this.deltaSetXY){var G=[D.x,D.y];YAHOO.util.Dom.setXY(B,G);var C=parseInt(YAHOO.util.Dom.getStyle(B,"left"),10);var A=parseInt(YAHOO.util.Dom.getStyle(B,"top"),10);this.deltaSetXY=[C-D.x,A-D.y];}else{YAHOO.util.Dom.setStyle(B,"left",(D.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(B,"top",(D.y+this.deltaSetXY[1])+"px");}this.cachePosition(D.x,D.y);this.autoScroll(D.x,D.y,B.offsetHeight,B.offsetWidth);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<!
 C){window.scrollTo(D,N-A);}if(M>B&&F<C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame();},50);return ;}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;
-D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.ge!
 tEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN(F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:function(A,B){this.showFrame(A,B);},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","");},toString:function(){ret!
 urn("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B!
 ){if(C){
this.initTarget(C,A,B);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.3.1",build:"541"});
\ No newline at end of file
+if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(D,C){for(var E in this.ids){for(var B in this.ids[E]){var F=this.ids[E][B];if(!this.isTypeOfDD(F)){continue;}F[D].apply(F,C);}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:function(B){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet!
 :false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(C,B){if(!this.initialized){this.init();}if(!this.ids[B]){this.ids[B]={};}this.ids[B][C.id]=C;},removeDDFromGroup:function(D,B){if(!this.ids[B]){this.ids[B]={};}var C=this.ids[B];if(C&&C[D.id]){delete C[D.id];}},_remove:function(C){for(var B in C.groups){if(B&&this.ids[B][C.id]){delete this.ids[B][C.id];}}delete this.handleIds[C.id];},regHandle:function(C,B){if(!this.handleIds[C]){this.handleIds[C]={};}this.handleIds[C][B]=B;},isDragDrop:function(B){return(this.getDDById(B))?true:false;},getRelated:function(G,C){var F=[];for(var E in G.groups){for(var D in this.ids[E]){var B=this.ids[E][D];if(!this.isTypeOfDD(B)){continue;}if(!C||B.isTarget){F[F.length]=B;}}}return F;},isLegalTarget:function(F,E){var C=this.getRelated(F,true);for(var D=0,B=C.length;D<B;++D){if(C[D].id==E.id){return true;}}return false;},isTypeOfDD:function(B){return(B&&B.__ygDragDrop);},isHandle:function(C,B){return(this.handle!
 Ids[C]&&this.handleIds[C][B]);},getDDById:function(C){for(var !
 B in thi
s.ids){if(this.ids[B][C]){return this.ids[B][C];}}return null;},handleMouseDown:function(D,C){this.currentTarget=YAHOO.util.Event.getTarget(D);this.dragCurrent=C;var B=C.getEl();this.startX=YAHOO.util.Event.getPageX(D);this.startY=YAHOO.util.Event.getPageY(D);this.deltaX=this.startX-B.offsetLeft;this.deltaY=this.startY-B.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var E=YAHOO.util.DDM;E.startDrag(E.startX,E.startY);E.fromTimeout=true;},this.clickTimeThresh);},startDrag:function(B,D){clearTimeout(this.clickTimeout);var C=this.dragCurrent;if(C){C.b4StartDrag(B,D);}if(C){C.startDrag(B,D);}this.dragThreshMet=true;},handleMouseUp:function(B){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.handleMouseMove(B);}this.fromTimeout=false;this.fireEvents(B,true);}else{}this.stopDrag(B);this.stopEvent(B);}},stopEvent:function(B){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(B);}if(this.prevent!
 Default){YAHOO.util.Event.preventDefault(B);}},stopDrag:function(C,B){if(this.dragCurrent&&!B){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(C);this.dragCurrent.endDrag(C);}this.dragCurrent.onMouseUp(C);}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(E){var B=this.dragCurrent;if(B){if(YAHOO.util.Event.isIE&&!E.button){this.stopEvent(E);return this.handleMouseUp(E);}if(!this.dragThreshMet){var D=Math.abs(this.startX-YAHOO.util.Event.getPageX(E));var C=Math.abs(this.startY-YAHOO.util.Event.getPageY(E));if(D>this.clickPixelThresh||C>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){B.b4Drag(E);if(B){B.onDrag(E);}if(B){this.fireEvents(E,false);}}this.stopEvent(E);}},fireEvents:function(T,J){var V=this.dragCurrent;if(!V||V.isLocked()||V.dragOnly){return ;}var L=YAHOO.util.Event.getPageX(T),K=YAHOO.util.Event.getPageY(T),M=new YAHOO.util.Point(L,K),H=V.getTargetCoord(M.x,M.y),E=V.getDragEl(),S=new YAHOO.util.Region(H.y!
 ,H.x+E.offsetWidth,H.y+E.offsetHeight,H.x),G=[],I=[],D=[],U=[]!
 ,R=[],C=
{},N=[];for(var P in this.dragOvers){var W=this.dragOvers[P];if(!this.isTypeOfDD(W)){continue;}if(!this.isOverTarget(M,W,this.mode,S)){I.push(W);}G[P]=true;delete this.dragOvers[P];}for(var O in V.groups){if("string"!=typeof O){continue;}for(P in this.ids[O]){var F=this.ids[O][P];if(!this.isTypeOfDD(F)){continue;}if(F.isTarget&&!F.isLocked()&&F!=V){if(this.isOverTarget(M,F,this.mode,S)){C[O]=true;if(J){U.push(F);}else{if(!G[F.id]){R.push(F);}else{D.push(F);}this.dragOvers[F.id]=F;}}}}}this.interactionInfo={out:I,enter:R,over:D,drop:U,point:M,draggedRegion:S,sourceRegion:this.locationCache[V.id],validDrop:J};for(var B in C){N.push(B);}if(J&&!U.length){this.interactionInfo.validDrop=false;V.onInvalidDrop(T);}if(this.mode){if(I.length){V.b4DragOut(T,I);if(V){V.onDragOut(T,I);}}if(R.length){if(V){V.onDragEnter(T,R,N);}}if(D.length){if(V){V.b4DragOver(T,D,N);}if(V){V.onDragOver(T,D,N);}}if(U.length){if(V){V.b4DragDrop(T,U,N);}if(V){V.onDragDrop(T,U,N);}}}else{var Q=0;for(P=0,Q=I.!
 length;P<Q;++P){if(V){V.b4DragOut(T,I[P].id,N[0]);}if(V){V.onDragOut(T,I[P].id,N[0]);}}for(P=0,Q=R.length;P<Q;++P){if(V){V.onDragEnter(T,R[P].id,N[0]);}}for(P=0,Q=D.length;P<Q;++P){if(V){V.b4DragOver(T,D[P].id,N[0]);}if(V){V.onDragOver(T,D[P].id,N[0]);}}for(P=0,Q=U.length;P<Q;++P){if(V){V.b4DragDrop(T,U[P].id,N[0]);}if(V){V.onDragDrop(T,U[P].id,N[0]);}}}},getBestMatch:function(D){var F=null;var C=D.length;if(C==1){F=D[0];}else{for(var E=0;E<C;++E){var B=D[E];if(this.mode==this.INTERSECT&&B.cursorIsOver){F=B;break;}else{if(!F||!F.overlap||(B.overlap&&F.overlap.getArea()<B.overlap.getArea())){F=B;}}}}return F;},refreshCache:function(C){var E=C||this.ids;for(var B in E){if("string"!=typeof B){continue;}for(var D in this.ids[B]){var F=this.ids[B][D];if(this.isTypeOfDD(F)){var G=this.getLocation(F);if(G){this.locationCache[F.id]=G;}else{delete this.locationCache[F.id];}}}}},verifyEl:function(C){try{if(C){var B=C.offsetParent;
+if(B){return true;}}}catch(D){}return false;},getLocation:function(G){if(!this.isTypeOfDD(G)){return null;}var E=G.getEl(),J,D,C,L,K,M,B,I,F;try{J=YAHOO.util.Dom.getXY(E);}catch(H){}if(!J){return null;}D=J[0];C=D+E.offsetWidth;L=J[1];K=L+E.offsetHeight;M=L-G.padding[0];B=C+G.padding[1];I=K+G.padding[2];F=D-G.padding[3];return new YAHOO.util.Region(M,B,I,F);},isOverTarget:function(J,B,D,E){var F=this.locationCache[B.id];if(!F||!this.useCache){F=this.getLocation(B);this.locationCache[B.id]=F;}if(!F){return false;}B.cursorIsOver=F.contains(J);var I=this.dragCurrent;if(!I||(!D&&!I.constrainX&&!I.constrainY)){return B.cursorIsOver;}B.overlap=null;if(!E){var G=I.getTargetCoord(J.x,J.y);var C=I.getDragEl();E=new YAHOO.util.Region(G.y,G.x+C.offsetWidth,G.y+C.offsetHeight,G.x);}var H=E.intersect(F);if(H){B.overlap=H;return(D)?true:B.cursorIsOver;}else{return false;}},_onUnload:function(C,B){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=n!
 ull;}this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(C){var B=this.elementCache[C];if(!B||!B.el){B=this.elementCache[C]=new this.ElementWrapper(YAHOO.util.Dom.get(C));}return B;},getElement:function(B){return YAHOO.util.Dom.get(B);},getCss:function(C){var B=YAHOO.util.Dom.get(C);return(B)?B.style:null;},ElementWrapper:function(B){this.el=B||null;this.id=this.el&&B.id;this.css=this.el&&B.style;},getPosX:function(B){return YAHOO.util.Dom.getX(B);},getPosY:function(B){return YAHOO.util.Dom.getY(B);},swapNode:function(D,B){if(D.swapNode){D.swapNode(B);}else{var E=B.parentNode;var C=B.nextSibling;if(C==D){E.insertBefore(D,B);}else{if(B==D.nextSibling){E.insertBefore(B,D);}else{D.parentNode.replaceChild(B,D);E.insertBefore(D,C);}}}},getScroll:function(){var D,B,E=document.documentElement,C=document.body;if(E&&(E.scrollTop||E.scrollLeft)){D=E.scrollTop;B=E.scrollLeft;}else{if(C){D=C.scrollTop;B=C.scrollLeft;}else{}}return{top:D,left:B};},getStyle:fu!
 nction(C,B){return YAHOO.util.Dom.getStyle(C,B);},getScrollTop!
 :functio
n(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(B,D){var C=YAHOO.util.Dom.getXY(D);YAHOO.util.Dom.setXY(B,C);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(C,B){return(C-B);},_timeoutCount:0,_addListeners:function(){var B=YAHOO.util.DDM;if(YAHOO.util.Event&&document){B._onLoad();}else{if(B._timeoutCount>2000){}else{setTimeout(B._addListeners,10);if(document&&document.body){B._timeoutCount+=1;}}}},handleWasClicked:function(B,D){if(this.isHandle(D,B.id)){return true;}else{var C=B.parentNode;while(C){if(this.isHandle(D,C.id)){return true;}else{C=C.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={id:null,c!
 onfig:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,dragOnly:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:f!
 unction(){if(!this._domRef){this._domRef=B.get(this.id);}retur!
 n this._
domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(E,C,D){this.initTarget(E,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);},initTarget:function(E,C,D){this.config=D||{};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding!
 =[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){return ;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);
+this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(H,G){var D=H.which||H.button;if(this.primaryButtonOnly&&D>1){return ;}if(this.isLocked()){return ;}var C=this.b4MouseDown(H);var E=this.onMouseDown(H);if((C===false)||(E===false)){return ;}this.DDM.refreshCache(this.groups);var F=new YAHOO.util.Point(A.getPageX(H),A.getPageY(H));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(F,this)){}else{if(this.clickValidator(H)){this.setStartPosition();this.DDM.handleMouseDown(H,this);this.DDM.stopEvent(H);}else{}}},clickValidator:function(D){var C=A.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX;}if(C>this.maxX){C=this.m!
 axX;}}if(this.constrainY){if(F<this.minY){F=this.minY;}if(F>this.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E];}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase();}catch(G){H=F.nodeName;}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.inv!
 alidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.inva!
 lidHandl
eClasses[D]);}return E;},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTic!
 ks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D);}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}!
 },toString:function(){return("DragDrop "+this.id);}};})();YAHO!
 O.util.D
D=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y];}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];!
 this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A);}if(M>B&&F<C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame();
+}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame();},50);return ;}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},s!
 howFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN(F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:function(A,B){this.showFrame(A,B!
 );},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDrag!
 El(),"vi
sibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/dragdrop/dragdrop.js
===================================================================
--- trunk/root/static/yui/dragdrop/dragdrop.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/dragdrop/dragdrop.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * The drag and drop utility provides a framework for building drag and drop
@@ -345,6 +345,16 @@
         startY: 0,
 
         /**
+         * Flag to determine if the drag event was fired from the click timeout and
+         * not the mouse move threshold.
+         * @property fromTimeout
+         * @type boolean
+         * @private
+         * @static
+         */
+        fromTimeout: false,
+
+        /**
          * Each DragDrop instance must be registered with the DragDropMgr.  
          * This is executed in DragDrop.init()
          * @method regDragDrop
@@ -545,7 +555,8 @@
             this.clickTimeout = setTimeout( 
                     function() { 
                         var DDM = YAHOO.util.DDM;
-                        DDM.startDrag(DDM.startX, DDM.startY); 
+                        DDM.startDrag(DDM.startX, DDM.startY);
+                        DDM.fromTimeout = true;
                     }, 
                     this.clickTimeThresh );
         },
@@ -583,6 +594,10 @@
                 clearTimeout(this.clickTimeout);
 
                 if (this.dragThreshMet) {
+                    if (this.fromTimeout) {
+                        this.handleMouseMove(e);
+                    }
+                    this.fromTimeout = false;
                     this.fireEvents(e, true);
                 } else {
                 }
@@ -692,7 +707,7 @@
                 this.stopEvent(e);
             }
         },
-
+        
         /**
          * Iterates over all of the DragDrop elements to find ones we are 
          * hovering over or dropping on
@@ -707,7 +722,8 @@
 
             // If the user did the mouse up outside of the window, we could 
             // get here even though we have ended the drag.
-            if (!dc || dc.isLocked()) {
+            // If the config option dragOnly is true, bail out and don't fire the events
+            if (!dc || dc.isLocked() || dc.dragOnly) {
                 return;
             }
 
@@ -725,7 +741,9 @@
                 outEvts   = [],
                 overEvts  = [],
                 dropEvts  = [],
-                enterEvts = [];
+                enterEvts = [],
+                inGroupsObj  = {},
+                inGroups  = [];
 
 
             // Check to see if the object(s) we were hovering over is no longer 
@@ -737,7 +755,6 @@
                 if (! this.isTypeOfDD(ddo)) {
                     continue;
                 }
-
                 if (! this.isOverTarget(pt, ddo, this.mode, curRegion)) {
                     outEvts.push( ddo );
                 }
@@ -760,6 +777,7 @@
 
                     if (oDD.isTarget && !oDD.isLocked() && oDD != dc) {
                         if (this.isOverTarget(pt, oDD, this.mode, curRegion)) {
+                            inGroupsObj[sGroup] = true;
                             // look for drop interactions
                             if (isDrop) {
                                 dropEvts.push( oDD );
@@ -792,6 +810,11 @@
                 validDrop: isDrop
             };
 
+            
+            for (var inG in inGroupsObj) {
+                inGroups.push(inG);
+            }
+
             // notify about a drop that did not find a target
             if (isDrop && !dropEvts.length) {
                 this.interactionInfo.validDrop = false;
@@ -809,26 +832,26 @@
 
                 if (enterEvts.length) {
                     if (dc) {
-                        dc.onDragEnter(e, enterEvts);
+                        dc.onDragEnter(e, enterEvts, inGroups);
                     }
                 }
 
                 if (overEvts.length) {
                     if (dc) {
-                        dc.b4DragOver(e, overEvts);
+                        dc.b4DragOver(e, overEvts, inGroups);
                     }
 
                     if (dc) {
-                        dc.onDragOver(e, overEvts);
+                        dc.onDragOver(e, overEvts, inGroups);
                     }
                 }
 
                 if (dropEvts.length) {
                     if (dc) {
-                        dc.b4DragDrop(e, dropEvts);
+                        dc.b4DragDrop(e, dropEvts, inGroups);
                     }
                     if (dc) {
-                        dc.onDragDrop(e, dropEvts);
+                        dc.onDragDrop(e, dropEvts, inGroups);
                     }
                 }
 
@@ -837,10 +860,10 @@
                 var len = 0;
                 for (i=0, len=outEvts.length; i<len; ++i) {
                     if (dc) {
-                        dc.b4DragOut(e, outEvts[i].id);
+                        dc.b4DragOut(e, outEvts[i].id, inGroups[0]);
                     }
                     if (dc) {
-                        dc.onDragOut(e, outEvts[i].id);
+                        dc.onDragOut(e, outEvts[i].id, inGroups[0]);
                     }
                 }
                  
@@ -849,27 +872,27 @@
                     // dc.b4DragEnter(e, oDD.id);
 
                     if (dc) {
-                        dc.onDragEnter(e, enterEvts[i].id);
+                        dc.onDragEnter(e, enterEvts[i].id, inGroups[0]);
                     }
                 }
          
                 // fire over events
                 for (i=0,len=overEvts.length; i<len; ++i) {
                     if (dc) {
-                        dc.b4DragOver(e, overEvts[i].id);
+                        dc.b4DragOver(e, overEvts[i].id, inGroups[0]);
                     }
                     if (dc) {
-                        dc.onDragOver(e, overEvts[i].id);
+                        dc.onDragOver(e, overEvts[i].id, inGroups[0]);
                     }
                 }
 
                 // fire drop events
                 for (i=0, len=dropEvts.length; i<len; ++i) {
                     if (dc) {
-                        dc.b4DragDrop(e, dropEvts[i].id);
+                        dc.b4DragDrop(e, dropEvts[i].id, inGroups[0]);
                     }
                     if (dc) {
-                        dc.onDragDrop(e, dropEvts[i].id);
+                        dc.onDragDrop(e, dropEvts[i].id, inGroups[0]);
                     }
                 }
 
@@ -1578,7 +1601,7 @@
     /**
      * By default, all instances can be a drop target.  This can be disabled by
      * setting isTarget to false.
-     * @method isTarget
+     * @property isTarget
      * @type boolean
      */
     isTarget: true,
@@ -1586,10 +1609,16 @@
     /**
      * The padding configured for this drag and drop object for calculating
      * the drop zone intersection with this object.
-     * @method padding
+     * @property padding
      * @type int[]
      */
     padding: null,
+    /**
+     * If this flag is true, do not fire drop events. The element is a drag only element (for movement not dropping)
+     * @property dragOnly
+     * @type Boolean
+     */
+    dragOnly: false,
 
     /**
      * Cached reference to the linked element
@@ -2005,7 +2034,7 @@
         this.isTarget          = (this.config.isTarget !== false);
         this.maintainOffset    = (this.config.maintainOffset);
         this.primaryButtonOnly = (this.config.primaryButtonOnly !== false);
-
+        this.dragOnly = ((this.config.dragOnly === true) ? true : false);
     },
 
     /**
@@ -2203,9 +2232,13 @@
 
 
         // firing the mousedown events prior to calculating positions
-        this.b4MouseDown(e);
-        this.onMouseDown(e);
+        var b4Return = this.b4MouseDown(e);
+        var mDownReturn = this.onMouseDown(e);
 
+        if ((b4Return === false) || (mDownReturn === false)) {
+            return;
+        }
+
         this.DDM.refreshCache(this.groups);
         // var self = this;
         // setTimeout( function() { self.DDM.refreshCache(self.groups); }, 0);
@@ -2238,6 +2271,13 @@
         }
     },
 
+    /**
+     * @method clickValidator
+     * @description Method validates that the clicked element
+     * was indeed the handle or a valid child of the handle
+     * @param {Event} e 
+     * @private
+     */
     clickValidator: function(e) {
         var target = Event.getTarget(e);
         return ( this.isValidHandleChild(target) &&
@@ -2678,10 +2718,16 @@
         } else {
             YAHOO.util.Dom.setStyle(el, "left", (oCoord.x + this.deltaSetXY[0]) + "px");
             YAHOO.util.Dom.setStyle(el, "top",  (oCoord.y + this.deltaSetXY[1]) + "px");
+            //el.style.left = (oCoord.x + this.deltaSetXY[0]) + "px";
+            //el.style.top = (oCoord.y + this.deltaSetXY[1]) + "px";
         }
         
         this.cachePosition(oCoord.x, oCoord.y);
-        this.autoScroll(oCoord.x, oCoord.y, el.offsetHeight, el.offsetWidth);
+        //DAV
+        var self = this;
+        setTimeout(function() {
+            self.autoScroll.call(self, oCoord.x, oCoord.y, el.offsetHeight, el.offsetWidth);
+        }, 0);
     },
 
     /**
@@ -3096,4 +3142,4 @@
         return ("DDTarget " + this.id);
     }
 });
-YAHOO.register("dragdrop", YAHOO.util.DragDropMgr, {version: "2.3.1", build: "541"});
+YAHOO.register("dragdrop", YAHOO.util.DragDropMgr, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/editor/README
===================================================================
--- trunk/root/static/yui/editor/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/editor/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,17 +1,57 @@
+
+**** version 2.4.1 ***
+
+No change
+
+**** version 2.4.0 ***
+
+* Performance enhancements and bug fixes.
+* Created a new base class called SimpleEditor. Editor now extends SimpleEditor
+* Created 2 new Toolbar Buttons
+    YAHOO.widget.ToolbarButton - No requirement for Button or Menu
+    YAHOO.widget.ToolbarButtonAdvanced - Still Required Button and Menu
+
+    *All
+        1. [1423860] - [SF 1774823] Change text size removes selection highlight
+        2. [1487601] - [SF 1796897] Font size issue
+        3. [1508412] - [SF 1799379] setEditorHTML strips title attribute
+        4. [1528759] - [SF 1810162] [example] Link Options Window appears behind the editor
+            Added a config option "limitCommands" when set to true, the editor will not execute a command that is not bound to a button.
+
+        5. [1544149] - [SF 1808154] add non-editable snippets to YUI-RTE
+            Added a config option "allowNoEdit", when set to true the "_isNonEditalble method is called at the beginning of all event handlers to check if this element or
+                a parent element has the class yui-noedit (this.CLASS_NOEDIT) applied. If it does, then this method will stop the event and return true. The event handlers
+                will then return false and stop the nodeChange from occurring. This method will also disable and enable the Editor's toolbar based on the noedit state.
+
+        6. [1544160] - [SF 1808102] Keep the content of invalidHTML
+            If you set the value of a key in this.invalidHTML to "{ keepContents: true }", then the element will be replaced with a yui-non span to be filtered out when 
+                cleanHTML is called. The only tag that is ignored here is the span tag as it will force the Editor into a loop and freeze the browser. However, all of
+                these tags will be removed in the cleanHTML routine
+
+        7. [1560982] - [SF 1818681] RTE converts input tags to emnput
+        8. [1508390] - [SF 1787357] Split into separate modules
+            Split the Editor into Editor and SimpleEditor. Also split out the execCommand support into several methods for easier overriding and extending.
+
+        9. [1508403] - [SF 1779516] Dirty flag for editor
+            You can now check the editorDirty property on the Editor instance. It will be default false and be set to true when something important happens.
+            You will need to manually change it back to false when you check it.
+
+    *Internet Explorer
+        1. [1508413] - [SF 1804028, 1810362] Omission of DocType at top of page
+            It appears that Internet Explorer doesn't like the page containing the Editor to not have a doctype if the page inside the editor does.
+                The Editor will now check for compatMode and if it is not in standards mode, it will omit the doctype from the editable area.
+                
+        2. [1528733] - [SF 1808818] IE6 reports security violation on secure pages
+        3. [1528766] - [SF 1810362] Will Not Work Without DTD header
+        4. [1496536] - yui editor indentation problem
+        5. [1465375] - [SF 1789702] RTE Image insertion creates timer error
+
+    *Firefox
+        1. [1492573] - Can not get focus on edit box in FF 1.5 on FreeBSD
+
 **** version 2.3.1 ***
 
-* New methods were added (show and hide) that need to be called when the Editor is placed inside an element that will be set to display: none.
-    For example: Placing an Editor inside of a TabView or Panel. You should now hook into the other widgets show/hide event and call myEditor.show() or myEditor.hide() when needed.
-* Dependency on the full Container family was removed, you can now use only the container-core package.
-* The editor CSS has changed to allow for easier customizing.
-* The CSS patch that was issued for the 2.3.0 release of the Editor should be removed when installing 2.3.1.
-* Safari performace issue: If you are experiencing extreme performance issues with Safari
-    (keys taking a long time to respond, enter key not working, CPU spiking).
-    Please check to see if you have AcidSearch from pozytron.com installed.
-    It has been determined that the latest release if AcidSearch is interfering
-    with the Rich Text Editor. Currently the only solution is to un-install
-    the plugin. The maker of AcidSearch has been notified of the issue and should respond soon.
-* Several performance enhancements and bug fixes.
+* Performance enhancements and bug fixes.
 
     *All
         1. [1406169] - Fixed Toolbar performance issues

Modified: trunk/root/static/yui/editor/assets/editor-core.css
===================================================================
--- trunk/root/static/yui/editor/assets/editor-core.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/editor/assets/editor-core.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,9 +2,9 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-/* Set the cusrsor to busy when we are doing something */
+/* Set the cursor to busy when we are doing something */
 .yui-busy {
     cursor: wait !important;
 }
@@ -193,16 +193,19 @@
 .yui-editor-container .yui-editor-editable-container {
     position: relative;
     z-index: 0;
+    width: 100%;
 }
 /* The disbled state of the Editor */
 .yui-editor-container .yui-editor-masked {
     background-color: #CCC;
 }
-/* Style the eidtable iframe to hide it */
+/* Style the editable iframe to hide it */
 .yui-editor-container iframe {
     border: 0px;
     padding: 0;
     margin: 0;
+    zoom: 1;
+    display: block;
 }
 /* Reset some padding on the editable iframes container */
 .yui-editor-container .yui-editor-editable {

Added: trunk/root/static/yui/editor/assets/simpleeditor-core.css
===================================================================
--- trunk/root/static/yui/editor/assets/simpleeditor-core.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/editor/assets/simpleeditor-core.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,529 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+/* Set the cursor to busy when we are doing something */
+.yui-busy {
+    cursor: wait !important;
+}
+
+/* Setup the container with some padding and zoom it for IE's hasLayout */
+.yui-toolbar-container .yui-toolbar-subcont {
+    padding: .25em 0;
+    zoom: 1;
+}
+/* When collapsed set the toolbars container to display none */
+.yui-toolbar-container-collapsed .yui-toolbar-subcont {
+    display: none;
+}
+/* Setup the :after so that compliant browsers don't loose the bounding box */
+.yui-toolbar-container .yui-toolbar-subcont:after { display: block; clear: both; visibility: hidden; content: '.'; height: 0;}
+
+/* Drag handle for the toolbar's draggable property */
+.yui-toolbar-container span.yui-toolbar-draghandle {
+    cursor: move;
+    border-left: 1px solid #999;
+    border-right: 1px solid #999;
+    overflow: hidden;
+    text-indent: 77777px;
+    width: 2px;
+    height: 20px;
+    display: block;
+    clear: none;
+    float: left;
+    margin: 0 0 0 .2em;
+}
+/* If the titlebar is draggable, the set the cursor */
+.yui-toolbar-container .yui-toolbar-titlebar.draggable {
+    cursor: move;
+}
+/* Set the titlebar to relative so we can position the collapse button */
+.yui-toolbar-container .yui-toolbar-titlebar {
+    position: relative;
+}
+/* Toolbar's titlebar styles */
+.yui-toolbar-container .yui-toolbar-titlebar h2 {
+    font-weight: bold;
+    letter-spacing: 0;
+    border: none;
+    color: #000;
+    margin: 0;
+    padding: .2em;
+}
+/* If the toolbar is grouped the draghandle needs to be bigger */
+.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle {
+    height: 40px;
+}
+
+/* Float the groups so they position nicely and zoom them for IE */
+.yui-toolbar-container .yui-toolbar-group {
+    float: left;
+    zoom: 1;
+}
+/* Setup the :after so that compliant browsers don't loose the bounding box */
+.yui-toolbar-container .yui-toolbar-group:after { display: block; clear: both; visibility: hidden; content: '.'; height: 0;}
+/* Grouped title styles */
+.yui-toolbar-container .yui-toolbar-group h3 {
+    font-size: 75%;
+    padding: 0 0 0 .25em;
+    margin: 0;
+}
+/* Style the separators with a left border */
+.yui-toolbar-container span.yui-toolbar-separator {
+    width: 2px;
+    height: 18px;
+    margin: .2em 0 .2em .1em;
+    display: block;
+    clear: none;
+    float: left;
+}
+/* Set the height of a grouped separator to a little bit bigger */
+.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator {
+    height: 35px;
+}
+
+/* Reset the height of a separator inside of a group */
+.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator {
+    height: 18px;
+}
+
+/* Kill the default styles of the list */
+.yui-toolbar-container ul li {
+    margin: 0;
+    padding: 0;
+    list-style-type: none;
+}
+/* Hide the group labels when the .yui-toolbar-nogrouplabels class is applied */
+.yui-toolbar-container .yui-toolbar-nogrouplabels h3 {
+    display: none;
+}
+
+/* Setup the default style of a button in the toolbar */
+.yui-toolbar-container .yui-push-button,
+.yui-toolbar-container .yui-color-button,
+.yui-toolbar-container .yui-menu-button {
+/*.yui-toolbar-container .yui-button {*/
+    position: relative;
+    cursor: pointer;
+}
+
+/* setup the default style of the A inside of the toolbar button */
+.yui-toolbar-container .yui-button .first-child, .yui-toolbar-container .yui-button .first-child a {
+    height: 100%;
+    width: 100%;
+    overflow: hidden;
+}
+
+/* Setup the disabled state of a button */
+.yui-toolbar-container .yui-button-disabled {
+    cursor: default;
+}
+/* Disable the icon too */
+.yui-toolbar-container .yui-button-disabled .yui-toolbar-icon {
+    opacity: .5;
+    filter: alpha(opacity=50);
+}
+/*Disabled Spin button arrows*/
+.yui-toolbar-container .yui-button-disabled .up,
+.yui-toolbar-container .yui-button-disabled .down {
+    opacity: .5;
+    filter: alpha(opacity=50);
+}
+/* remove any padding from the A */
+.yui-toolbar-container .yui-button a {
+    overflow: hidden;
+}
+
+/* Override the default Button style for select menu*/
+.yui-toolbar-container .yui-toolbar-select .first-child a {
+    cursor: pointer;
+}
+
+/* Font Family Menu Style - This styles the menu items and the selected menu item */
+.yui-toolbar-fontname-arial { font-family: Arial; }
+.yui-toolbar-fontname-arial-black { font-family: Arial Black; }
+.yui-toolbar-fontname-comic-sans-ms { font-family: Comic Sans MS; }
+.yui-toolbar-fontname-courier-new { font-family: Courier New; }
+.yui-toolbar-fontname-times-new-roman { font-family: Times New Roman; }
+.yui-toolbar-fontname-verdana { font-family: Verdana; }
+.yui-toolbar-fontname-impact { font-family: Impact; }
+.yui-toolbar-fontname-lucida-console { font-family: Lucida Console; }
+.yui-toolbar-fontname-tahoma { font-family: Tahoma; }
+.yui-toolbar-fontname-trebuchet-ms { font-family: Trebuchet MS; }
+
+/* Spin Button */
+.yui-toolbar-container .yui-toolbar-spinbutton {
+    position: relative;
+}
+
+/* Setup the default style for the A */
+.yui-toolbar-container .yui-toolbar-spinbutton .first-child a {
+    z-index: 0;
+    opacity: 1;
+}
+
+/* Setup the position and style for the up and down arrows */
+.yui-toolbar-container .yui-toolbar-spinbutton a.up, .yui-toolbar-container .yui-toolbar-spinbutton a.down {
+    position: absolute;
+    display: block
+    right: 0;
+    cursor: pointer;
+    z-index: 1;
+    padding: 0;
+    margin: 0;
+}
+/* Position all panels/overlays as absolute by default */
+.yui-toolbar-container .yui-overlay {
+    position: absolute;
+}
+/* Smash the default style for lists */
+.yui-toolbar-container .yui-overlay ul li {
+    margin: 0;
+    list-style-type: none;
+}
+
+/* Reset the z-index of the toolbar container so that menu's appear over the iframe in IE and Safari */
+.yui-toolbar-container {
+    z-index: 1;
+}
+
+/* The div around the iFrame */
+.yui-editor-container .yui-editor-editable-container {
+    position: relative;
+    z-index: 0;
+    width: 100%;
+}
+/* The disbled state of the Editor */
+.yui-editor-container .yui-editor-masked {
+    background-color: #CCC;
+}
+/* Style the editable iframe to hide it */
+.yui-editor-container iframe {
+    border: 0px;
+    padding: 0;
+    margin: 0;
+    zoom: 1;
+    display: block;
+}
+/* Reset some padding on the editable iframes container */
+.yui-editor-container .yui-editor-editable {
+    padding: 0;
+    margin: 0;
+}
+/* Style the dom path box at the bottom of the editor */
+.yui-editor-container .dompath {
+    font-size: 85%;
+}
+/* Header styles for the Property Editor */
+.yui-editor-panel .hd {
+    text-align: left;
+    position: relative;
+}
+/* Setup some padding around the h3 */
+.yui-editor-panel .hd h3 {
+    font-weight: bold;
+    padding: 0.25em 0pt 0.25em 0.25em;
+    margin: 0;
+}
+
+/* set it to relative so we can position the close button - Zoom it for IE */
+.yui-editor-panel .bd {
+    width: 100%;
+    zoom: 1;
+    position: relative;
+}
+/* Setup some padding for the body container - Zoom it for IE */
+.yui-editor-panel .bd div.yui-editor-body-cont {
+    padding: .25em .1em;
+    zoom: 1;
+}
+
+/* Setup the :after so that compliant browsers don't loose the bounding box */
+.yui-editor-panel .bd div.yui-editor-body-cont:after { display: block; clear: both; visibility: hidden; content: '.'; height: 0;}
+
+/* style the footer of the property editor */
+.yui-editor-panel .ft {
+    text-align: right;
+    width: 99%;
+    float: left;
+    clear: both;
+}
+
+/* Style the "tip" icon */
+.yui-editor-panel .ft span.tip {
+    display: block;
+    position: relative;
+    padding: .5em .5em .5em 23px;
+    text-align:left;
+    zoom: 1;
+}
+
+
+/* setup some form fields */
+.yui-editor-panel label {
+    clear: both;
+    float: left;
+    padding: 0;
+    width: 100%;
+    text-align: left;
+    zoom: 1;
+}
+/* This fixes the caret issue in Firefox */
+.yui-editor-panel .gecko label {
+    overflow: auto; 
+}
+/* more form fields */
+.yui-editor-panel label strong {
+    float: left;
+    width: 6em;
+}
+
+/* The remove link in the Link Property Editor */
+.yui-editor-panel .removeLink {
+    width: 80%;
+    text-align: right;
+}
+
+/* More form styling */
+.yui-editor-panel label input {
+    margin-left: .25em;
+    float: left;
+}
+
+/* Image Padding in the Property Editor */
+.yui-editor-panel .yui-toolbar-group-padding {
+}
+
+/* Image Border in the Property Editor */
+.yui-editor-panel .yui-toolbar-group-border {
+}
+
+/* Image Text Flow in the Property Editor */
+.yui-editor-panel .yui-toolbar-group-textflow {
+}
+
+/* Image Height/Width in the Property Editor */
+.yui-editor-panel .height-width {
+    float: left;
+}
+/* Image Height/Width title */
+.yui-editor-panel .height-width h3 {
+}
+/* Image Height/Width container */
+.yui-editor-panel .height-width span {
+    font-style: italic;
+    display: block;
+    float: left;
+    overflow:auto;
+}
+/* Image Height/Width original info container */
+.yui-editor-panel .height-width span.info {
+    font-size: 70%;
+}
+
+/* Border Size/Type button widths */
+.yui-editor-panel .yui-toolbar-bordersize, .yui-editor-panel .yui-toolbar-bordertype {
+    font-size: 75%;
+}
+
+/* Kill the separators in the Property Editor */
+.yui-editor-panel .yui-toolbar-container span.yui-toolbar-separator {
+    border: none;
+}
+
+/* Border Type solid */
+.yui-editor-panel .yui-toolbar-bordersize span a span,
+.yui-editor-panel .yui-toolbar-bordertype span a span {
+    display: block;
+    height: 8px;
+    left: 4px;
+    position: absolute;
+    top: 3px;
+    *top: -5px;
+    width: 24px;
+}
+/* Border Type solid */
+.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid {
+    border-bottom: 1px solid black;
+}
+/* Border Type dotted */
+.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted {
+    border-bottom: 1px dotted black;
+}
+/* Border Type dashed */
+.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed {
+    border-bottom: 1px dashed black;
+}
+/* Border Size 0 */
+.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0 {
+    *top: 0px;
+}
+/* Border Size 1 */
+.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1 {
+    border-bottom: 1px solid black;
+}
+/* Border Size 2 */
+.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2 {
+    border-bottom: 2px solid black;
+}
+/* Border Size 3 */
+.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3 {
+    top: 2px;
+    *top: -5px;
+    border-bottom: 3px solid black;
+}
+/* Border Size 4 */
+.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4 {
+    top: 1px;
+    *top: -5px;
+    border-bottom: 4px solid black;
+}
+/* Border Size 5 */
+.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5 {
+    top: 1px;
+    *top: -5px;
+    border-bottom: 5px solid black;
+}
+
+/* Border Size menu size */
+.yui-toolbar-container .yui-toolbar-bordersize-menu,
+.yui-toolbar-container .yui-toolbar-bordertype-menu {
+    width: 95px !important;
+}
+/* Border Size menu styles */
+.yui-toolbar-bordersize-menu .yuimenuitemlabel, .yui-toolbar-bordertype-menu .yuimenuitemlabel, 
+.yui-toolbar-bordersize-menu .yuimenuitemlabel, .yui-toolbar-bordertype-menu .yuimenuitemlabel:hover {
+    margin:0px 3px 7px 17px;
+}
+/* Border Size menu styles - Checked */
+.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator, .yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator {
+    position: absolute;
+    left: -12px;
+    *top: 14px;
+    *left: 0px;
+}
+
+/* Border Size 1 - Menu Item */
+.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a {
+    border-bottom: 1px solid black;
+    height: 14px;
+}
+/* Border Size 2 - Menu Item */
+.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a {
+    border-bottom: 2px solid black;
+    height: 14px;
+}
+/* Border Size 3 - Menu Item */
+.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-3 a {
+    border-bottom: 3px solid black;
+    height: 14px;
+}
+/* Border Size 4 - Menu Item */
+.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a {
+    border-bottom: 4px solid black;
+    height: 14px;
+}
+/* Border Size 5 - Menu Item */
+.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a {
+    border-bottom: 5px solid black;
+    height: 14px;
+}
+
+
+/* Border Type Solid - Menu Item */
+.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a {
+    border-bottom: 1px solid black;
+    height: 14px;
+}
+/* Border Type Dashed - Menu Item */
+.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a {
+    border-bottom: 1px dashed black;
+    height: 14px;
+}
+/* Border Type Dotted - Menu Item */
+.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a {
+    border-bottom: 1px dotted black;
+    height: 14px;
+}
+
+/* Hidden Headers for Accessibility */
+h2.yui-editor-skipheader, h3.yui-editor-skipheader {
+    height: 0;
+    margin: 0;
+    padding: 0;
+    border: none;
+    width: 0;
+    overflow: hidden;
+    position: absolute;
+}
+
+/* Setup the default look of a color menu and Zoom it for IE */
+.yui-toolbar-colors {
+    width: 133px;
+    zoom: 1;
+    display: none;
+    z-index: 100;
+    overflow: hidden;
+}
+
+/* Setup the :after so that compliant browsers don't loose the bounding box */
+.yui-toolbar-colors:after { display: block; clear: both; visibility: hidden; content: '.'; height: 0;}
+/* Style all of the A's so the float properly */
+.yui-toolbar-colors a {
+    height: 9px;
+    width: 9px;
+    float: left;
+    display: block;
+    overflow: hidden;
+    text-indent: 999px;
+    margin: 0;
+    cursor: pointer;
+    border: 1px solid #F6F7EE;
+}
+/* Put a little border around one that is hovered over */
+.yui-toolbar-colors a:hover {
+    border: 1px solid black;
+}
+
+/* Smash the inhertited Menu style */
+.yui-color-button-menu {
+    overflow: visible;
+    background-color: transparent;
+}
+
+/* This is the preview box at the bottom of the menu - Zoom it for IE */
+.yui-toolbar-colors span {
+    position: relative;
+    display: block;
+    padding: 3px;
+    overflow: hidden;
+    float: left;
+    width: 100%;
+    zoom: 1;
+}
+/* Setup the :after so that compliant browsers don't loose the bounding box */
+.yui-toolbar-colors span:after { display: block; clear: both; visibility: hidden; content: '.'; height: 0;}
+
+/* This is the box with the color preview in it */
+.yui-toolbar-colors span em {
+    height: 35px;
+    width: 30px;
+    float: left;
+    display: block;
+    overflow: hidden;
+    text-indent: 999px;
+    margin: 0.75px;
+    border: 1px solid black;
+}
+
+/* The container for the name and hex code */
+.yui-toolbar-colors span strong {
+    font-weight: normal;
+    padding-left: 3px;
+    display: block;
+    font-size: 85%;
+    float: left;
+    width: 65%;
+}

Modified: trunk/root/static/yui/editor/assets/skins/sam/editor-skin.css
===================================================================
--- trunk/root/static/yui/editor/assets/skins/sam/editor-skin.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/editor/assets/skins/sam/editor-skin.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* Place the border around the editor */
 .yui-skin-sam .yui-editor-container {
@@ -395,6 +395,11 @@
     bottom: 2px;
     background-position: 0 -1187px;
 }
+/* Handle plain Select Elements */
+.yui-skin-sam .yui-toolbar-container select {
+    height: 22px;
+    border: 1px solid #808080;
+}
 /* Pad and align the Select Menus */
 .yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a {
     padding-left: 5px;
@@ -549,10 +554,16 @@
 .yui-skin-sam .yui-editor-panel .yui-toolbar-group-border {
     width: 190px;
 }
+.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border {
+    width: 210px;
+}
 /* Give the padding group a width */
 .yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding {
     width: 203px;
 }
+.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding {
+    width: 172px;
+}
 /* Fix some margins for the H3's */
 .yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3 {
     margin-left: 25px;
@@ -594,6 +605,7 @@
 .yui-skin-sam .yui-editor-panel .ft span.tip {
     background-color: #EDF5FF;
     border-top: 1px solid #808080;
+    font-size: 85%;
 }
 /* Style the tip in the footer */
 .yui-skin-sam .yui-editor-panel .ft span.tip strong {

Modified: trunk/root/static/yui/editor/assets/skins/sam/editor.css
===================================================================
--- trunk/root/static/yui/editor/assets/skins/sam/editor.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/editor/assets/skins/sam/editor.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-.yui-busy{cursor:wait !important;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear!
 :both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;height:18px;margin:.2em 0 .2em .1em;display:block;clear:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:35px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .!
 yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-too!
 lbar-con
tainer .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container !
 .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;c!
 lear:both;visibility:hidden;content:'.';height:0;}.yui-editor-!
 panel .f
t{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group-padding{}.yui-editor-panel .yui-toolbar-group-border{}.yui-editor-panel .yui-toolbar-group-textflow{}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width h3{}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:auto;}.yui-editor-panel .height-width span.info{font-size:70%;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-panel .yui-toolbar-container span!
 .yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;*top:-5px;width:24px;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{top:2px;*top:-5px;border-bot!
 tom:3px solid black;}.yui-editor-panel .yui-toolbar-bordersize!
  span a 
span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px !important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0px 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersi!
 ze-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margi!
 n:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colo!
 rs a:hov
er{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font-size:100%;text-align:left;}.yui!
 -skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:.25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-top!
 :1px solid #808080;color:#999;text-align:left;padding:0.25em;}!
 .yui-ski
n-sam .yui-toolbar-container .collapse{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;margin:0;border-color:#808080;border-style:solid;border-width:1px 0;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:93%;line-height:2;display:block;color:#000000;overflow:hidden;}.yui-skin-sam .yui-toolbar-c!
 ontainer .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-b!
 utton .first-child{*left:0px;}.yui-skin-sam .yui-toolbar-conta!
 iner .yu
i-toolbar-fontname{width:135px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-containe!
 r .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container !
 .yui-toolbar-superscript span.yui-toolbar-icon{background-posi!
 tion:0 -
144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon{background-position:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;!
 }.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolb!
 ar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon!
 {backgro
und-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;backgroun!
 d-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url( editor-sprite.gif ) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0px;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;!
 padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.!
 yui-skin
-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yuimenu{}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:0.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel #createlink_target,.yui-skin-sam .yui-editor-panel #insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yu!
 i-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd s!
 pan.close{background:url(../../../../assets/skins/sam/sprite.p!
 ng) no-r
epeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url( editor-sprite.gif ) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url( editor-knob.gif ) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image!
 :none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#ffffff;}.yui-editor-blankimage{background-image:url( blankimage.png );}
+.yui-busy{cursor:wait !important;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear!
 :both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;height:18px;margin:.2em 0 .2em .1em;display:block;clear:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:35px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .!
 yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-too!
 lbar-con
tainer .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container !
 .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd div.yui-editor!
 -body-cont:after{display:block;clear:both;visibility:hidden;co!
 ntent:'.
';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group-padding{}.yui-editor-panel .yui-toolbar-group-border{}.yui-editor-panel .yui-toolbar-group-textflow{}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width h3{}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:auto;}.yui-editor-panel .height-width span.info{font-size:70%;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-p!
 anel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;*top:-5px;width:24px;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersiz!
 e-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-edit!
 or-panel
 .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px !important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0px 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-borders!
 ize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflo!
 w:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px !
 solid #F
6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font!
 -size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:.25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{bac!
 kground-color:#F2F2F2;border-top:1px solid #808080;color:#999;!
 text-ali
gn:left;padding:0.25em;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;margin:0;border-color:#808080;border-style:solid;border-width:1px 0;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:93%;line-height:2;display:block;color:#000000;overflow:hidd!
 en;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-s!
 am .yui-toolbar-container .yui-button .first-child{*left:0px;}!
 .yui-ski
n-sam .yui-toolbar-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yu!
 i-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-!
 skin-sam .yui-toolbar-container .yui-toolbar-superscript span.!
 yui-tool
bar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon{background-position:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{backgr!
 ound-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;le!
 ft:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hidd!
 enelemen
ts span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-s!
 pinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url( editor-sprite.gif ) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0px;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #8080!
 80;background:url(../../../../assets/skins/sam/sprite.png) rep!
 eat-x 0 
-200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yuimenu{}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:0.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel #cr!
 eatelink_target,.yui-skin-sam .yui-editor-panel #insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam !
 .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yu!
 i-skin-s
am .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd span.close{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url( editor-sprite.gif ) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px !
 -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url( editor-knob.gif ) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#ffffff;}.yui-editor-blankimage{background-image:url( blankimage.png );}

Added: trunk/root/static/yui/editor/assets/skins/sam/simpleeditor-skin.css
===================================================================
--- trunk/root/static/yui/editor/assets/skins/sam/simpleeditor-skin.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/editor/assets/skins/sam/simpleeditor-skin.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,663 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+/* Place the border around the editor */
+.yui-skin-sam .yui-editor-container {
+    border: 1px solid #808080;
+}
+/* Color the border of the container */
+.yui-skin-sam .yui-toolbar-container {
+    zoom: 1;
+}
+/* Load the background image on the Toolbars titlebar */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar {
+    background: url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -200px;
+    position: relative;
+}
+
+/* Give the titlebar some color and padding */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2 {
+    color: #000000;
+    font-weight: bold;
+    margin: 0;
+    padding: 0.3em 1em;
+    font-size: 100%;
+    text-align: left;
+}
+
+/* Give the toolbars groups titles some color and padding */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3 {
+    color: #808080;
+    font-size: 75%;
+    margin: 1em 0 0;
+    padding-bottom: 0;
+    padding-left: 0.25em;
+    text-align: left;
+}
+
+/* Hide all of the sepatators borders */
+.yui-toolbar-container span.yui-toolbar-separator {
+    border: none;
+    text-indent: 33px;
+    overflow: hidden;
+    margin: .25em;
+}
+
+/* Background color of the toolbar */
+.yui-skin-sam .yui-toolbar-container {
+    background-color: #F2F2F2;
+}
+
+/* Add some padding to the toolbars sub container */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont {
+    padding: 0 1em 0.35em;
+    border-bottom:1px solid #808080;
+}
+/* When the collapsed class is added, add a border to the bottom of the titlebar (since the toolbar itself is display none) */
+.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar {
+    border-bottom:1px solid #808080;
+}
+
+/* Remove the shadows from the menus in the toolbar - Menu.css override */
+.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow, .yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow {
+    display: none;
+}
+
+/* Remove padding/margin from lists */
+.yui-skin-sam .yui-editor-container ul {
+    list-style-type: none;
+    margin: 0;
+    padding: 0;
+}
+/* Remove padding/margin from list items */
+.yui-skin-sam .yui-editor-container ul li {
+    list-style-type: none;
+    margin: 0;
+    padding: 0;
+}
+/* Float the LI's that wrap the buttons */
+.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem {
+    float: left;
+}
+
+/* Set the color and the border of the dompath container at the bottom of the editor */
+.yui-skin-sam .yui-editor-container .dompath {
+    background-color: #F2F2F2;
+    border-top:1px solid #808080;
+    color: #999;
+    text-align: left;
+    padding: 0.25em;
+}
+
+/* Set the image for the collapse button on the toolbar */
+.yui-skin-sam .yui-toolbar-container .collapse {
+    background: url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -400px;
+}
+/* Position the image and the container */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse {
+    cursor: pointer;
+    position: absolute;
+    top: 4px;
+    right: 2px;
+    display: block;
+    overflow: hidden;
+    height: 15px;
+    width: 15px;
+    text-indent: 9999px;
+}
+
+/* Set the default styles for the buttons */
+.yui-skin-sam .yui-toolbar-container .yui-push-button,
+.yui-skin-sam .yui-toolbar-container .yui-color-button,
+.yui-skin-sam .yui-toolbar-container .yui-menu-button {
+    background: url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;
+    position: relative;
+    display: block;
+    height: 22px;
+    width: 30px;
+    margin: 0;
+    border-color: #808080;
+    border-style: solid;
+    border-width: 1px 0;
+}
+/* Set the height of the buttons and pad them on the left for the icon */
+.yui-skin-sam .yui-toolbar-container .yui-push-button a,
+.yui-skin-sam .yui-toolbar-container .yui-color-button a,
+.yui-skin-sam .yui-toolbar-container .yui-menu-button a {
+    padding-left: 35px;
+    height: 20px;
+    text-decoration: none;
+    font-size: 93%;
+    line-height: 2;
+    display: block;
+    color: #000000;
+    overflow: hidden;
+}
+/* Set the height of the buttons and pad them on the left for the icon */
+.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,
+.yui-skin-sam .yui-toolbar-container .yui-color-button .first-child,
+.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child {
+    border-color: #808080;
+    border-style: solid;
+    border-width: 0 1px;
+    margin: 0 -1px;
+    display: block;
+}
+.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,
+.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,
+.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child {
+    border-color: #ccc;
+}
+.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,
+.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,
+.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a {
+    color: #A6A6A6;
+    cursor: default;
+}
+.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,
+.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,
+.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled {
+    border-color: #ccc;
+}
+/* IE needs a little help positioning the first child */
+.yui-skin-sam .yui-toolbar-container .yui-button .first-child {
+    *left: 0px;
+}
+
+/* Font Family Drop Down */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-fontname {
+    width: 135px;
+}
+
+/* Header Drop Down */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-heading {
+    width: 92px;
+}
+
+/* Handle the hover state of the buttons */
+.yui-skin-sam .yui-toolbar-container .yui-button-hover {
+    background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1300px;
+    border-color: #808080;
+}
+
+/* Handle the selected state of the buttons */
+.yui-skin-sam .yui-toolbar-container .yui-button-selected {
+    background: url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1700px;
+    border-color: #808080;
+}
+/* When the nogrouplabels class is applied, set the h3's to display none */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3 {
+    display: none;
+}
+/* When not showing the h3 group labels, add some margin to make up for them*/
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group {
+	margin-top: .75em;
+}
+
+
+/* Handle the icon placeholder for the buttons
+    This is very important - position of this must be absolute.
+    If it is not positioned absolute, IE will place it over the a in the Toolbar
+    Doing this will cause the editor to loose focus and loose the selection.
+*/
+.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,
+.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,
+.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon {
+    display: block;
+    position: absolute;
+    top: 2px;
+    height: 18px;
+    width: 18px;
+    overflow: hidden;
+    background: url(editor-sprite.gif) no-repeat 30px 30px;
+}
+
+/* Swap out the image to an active image */
+.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon, .yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon {
+    background-image: url(editor-sprite-active.gif);
+}
+/* Change the defaults to make them look more like the editor */
+.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel {
+    cursor: pointer;
+    color: #000;
+    *position: relative;
+}
+
+/* Set the background color of all menu containers */
+.yui-skin-sam .yui-toolbar-container .yui-button-menu {
+    background-color: #fff;
+}
+/* Set the background of all menu items that are selected */
+.yui-skin-sam div.yuimenu li.selected {
+    background-color: #B3D4FF;
+}
+/* Set the color of the hrefs in a selected menu item */
+.yui-skin-sam div.yuimenu li.selected a.selected {
+    color: #000;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon {
+    background-position: 0 0;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon {
+    background-position: 0 -36px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon {
+    background-position: 0 -72px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon {
+    background-position: 0 -180px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon {
+    background-position: 0 -144px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon {
+    background-position: 0 -216px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon {
+    background-position: 0 -288px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon {
+    background-position: 0 -324px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon {
+    background-position: 0 -360px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon {
+    background-position: 0 -396px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon {
+    background-position: 0 -432px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon {
+    background-position: 0 -720px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon {
+    background-position: 0 -684px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon {
+    background-position: 0 -792px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon {
+    background-position: 1px -756px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon {
+    background-position: 0 -972px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon {
+    background-position: 0 -936px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon {
+    background-position: 0 -900px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon {
+    background-position: 0 -864px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon {
+    background-position: 0 -252px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon {
+    background-position: 0 -1080px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon {
+    background-position: 0 -1044px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon {
+    background-position: 0 -468px;
+    left: 5px;
+}
+/* Setting the background position of the sprite */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon {
+    background-position: 0 -504px;
+    left: 5px;
+}
+/* Set the width of the spin buttons */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child {
+    width: 35px;
+}
+/* Pad the first child */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a {
+    padding-left: 2px;
+    text-align: left;    
+}
+
+/* Spin Buttons - Remove the icon holder, they don't need it */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon {
+    display: none;
+}
+
+/* Spin Buttons - Prep the arrows */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down {
+    right: 2px;
+    background: url(editor-sprite.gif) no-repeat 0 -1222px;
+    overflow: hidden;
+    height: 6px;
+    width: 7px;
+    min-height: 0;
+    padding: 0;
+}
+/* Spin Buttons - The up arrow */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up {
+    top: 2px;
+    background-position: 0 -1222px;
+}
+/* Spin Buttons - The down arrow */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down {
+    bottom: 2px;
+    background-position: 0 -1187px;
+}
+/* Handle plain Select Elements */
+.yui-skin-sam .yui-toolbar-container select {
+    height: 22px;
+    border: 1px solid #808080;
+}
+/* Pad and align the Select Menus */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a {
+    padding-left: 5px;
+    text-align: left;    
+}
+/* Set the icon of the select menu for the drop down arrow */
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon {
+    background: url( editor-sprite.gif ) no-repeat 0 -1144px;
+    overflow: hidden;
+    right: -2px;
+    top: 0px;
+    height: 20px;
+}
+/* Fix the color menu background if it's inside a Property Editor */
+.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd {
+    background-color: transparent;
+    border: none;
+    width: 135px;
+}
+
+/* Place a border around the color menu */
+.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors {
+    border: 1px solid #808080;
+}
+
+
+/* Property Editor Panel styles */
+.yui-skin-sam .yui-editor-panel {
+    padding: 0;
+    margin: 0;
+    border: none;
+    background-color: transparent;
+    overflow: visible;
+}
+
+/* Margins on the header of the Property Editor */
+.yui-skin-sam .yui-editor-panel .hd {
+    margin: 10px 0 0;
+    padding: 0;
+    border: none;
+}
+/* Setup the background image on the title bar
+    We are styling the h3 instead if the div so we can make room
+    for the "knob" that floats on the top of the window.
+*/
+.yui-skin-sam .yui-editor-panel .hd h3 {
+    color: #000;
+    border: 1px solid #808080;
+    background: url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -200px;
+    width: 99%;
+    position: relative;
+    margin: 0;
+    padding: 3px 0 0 0;
+    font-size: 93%;
+    text-indent: 5px;
+    height: 20px;
+}
+/* Style the body of the Property Editor */
+.yui-skin-sam .yui-editor-panel .bd {
+    background-color: #F2F2F2;
+    border-left: 1px solid #808080;
+    border-right: 1px solid #808080;
+    width: 99%;
+    margin: 0;
+    padding: 0;
+    overflow: visible;
+}
+/* Remove the padding/margin on lists in the Property Editor */
+.yui-skin-sam .yui-editor-panel ul {
+    list-style-type: none;
+    margin: 0;
+    padding: 0;
+}
+
+/* Remove the padding/margin on list items in the Property Editor */
+.yui-skin-sam .yui-editor-panel ul li {
+    margin: 0;
+    padding: 0;
+}
+/* IE is havig trouble with our menu sizes here */
+.yui-skin-sam .yui-editor-panel .yuimenu {
+    /**width: 90px !important;*/
+}
+/* Remove the border from the toolbar's container and add some margin to it */
+.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont {
+    padding: 0;
+    border: none;
+    margin-top: 0.35em;
+}
+/* Set the width of the bordersize and bordertype menu buttons */
+.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize, .yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype {
+    width: 50px;
+}
+
+/* Form styling */
+.yui-skin-sam .yui-editor-panel label {
+    display: block;
+    float: none;
+    padding: 4px 0;
+    margin-bottom: 7px;
+}
+/* Form styling */
+.yui-skin-sam .yui-editor-panel label strong {
+    font-weight: normal;
+    font-size: 93%;
+    text-align: right;
+    padding-top: 2px;
+}
+
+/* Form styling */
+.yui-skin-sam .yui-editor-panel label input {
+    width: 75%;
+}
+/* Form styling */
+.yui-skin-sam .yui-editor-panel #createlink_target,
+.yui-skin-sam .yui-editor-panel #insertimage_target {
+    width: auto;
+    margin-right: 5px;
+}
+
+/* Form styling */
+.yui-skin-sam .yui-editor-panel .removeLink {
+    width: 98%;
+}
+/* Color the input yellow if it has the warning class applied */
+.yui-skin-sam .yui-editor-panel label input.warning {
+    background-color: #FFEE69;
+}
+
+/* Style the titles of the toolbar groups */
+.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3 {
+    color: #000;
+    float: left;
+    font-weight: normal;
+    font-size: 93%;
+    margin: 5px 0 0 0;
+    padding: 0 3px 0 0;
+    text-align: right;
+}
+/* Style the header for the Height and Width boxes */
+.yui-skin-sam .yui-editor-panel .height-width h3 {
+    margin: 3px 0 0 10px;
+}
+/* Style the height and width container */
+.yui-skin-sam .yui-editor-panel .height-width {
+    margin: 3px 0 0 35px;
+    *margin-left: 14px;
+    width: 42%;
+    *width: 44%;
+}
+/* Give the border group a width */
+.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border {
+    width: 190px;
+}
+.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border {
+    width: 210px;
+}
+/* Give the padding group a width */
+.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding {
+    width: 203px;
+}
+.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding {
+    width: 172px;
+}
+/* Fix some margins for the H3's */
+.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3 {
+    margin-left: 25px;
+    *margin-left: 12px;
+}
+/* Image Properties - Text flow container size */
+.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow {
+    width: 182px;
+}
+
+/* Remove the background image set in Panel.css */
+.yui-skin-sam .yui-editor-panel .hd {
+    background: none;
+}
+
+/* Give the footer som color and a border */
+.yui-skin-sam .yui-editor-panel .ft {
+    background-color: #F2F2F2;
+    border: 1px solid #808080;
+    border-top: none;
+    padding: 0;
+    margin: 0 0 2px 0;
+}
+
+/* Style the close button in the Property Editor */
+.yui-skin-sam .yui-editor-panel .hd span.close {
+    background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -300px;
+    cursor:pointer;
+    display:block;
+    height:16px;
+    overflow:hidden;
+    position:absolute;
+    right:5px;
+    text-indent:500px;
+    top:2px;
+    width:26px;
+}
+/* Style the tip in the footer */
+.yui-skin-sam .yui-editor-panel .ft span.tip {
+    background-color: #EDF5FF;
+    border-top: 1px solid #808080;
+    font-size: 85%;
+}
+/* Style the tip in the footer */
+.yui-skin-sam .yui-editor-panel .ft span.tip strong {
+    display: block;
+    float: left;
+    margin: 0 2px 8px 0;
+}
+
+
+/* Setup the icon for a tip */
+.yui-skin-sam .yui-editor-panel .ft span.tip span.icon {
+    background: url( editor-sprite.gif ) no-repeat 0 -1260px;
+    display: block;
+    height: 20px;
+    left: 2px;
+    position: absolute;
+    top: 8px;
+    width: 20px;
+}
+/* Setup the background image for an info icon */
+.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info {
+    background-position: 2px -1260px;
+}
+/* Setup the background image for a warning icon */
+.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn {
+    background-position: 2px -1296px;
+}
+
+/* Handle the knob that floats on top of the panel */
+.yui-skin-sam .yui-editor-panel .hd span.knob {
+    position: absolute;
+    height: 10px;
+    width: 28px;
+    top: -10px;
+    left: 25px;
+    text-indent: 9999px;
+    overflow: hidden;
+    background: url( editor-knob.gif ) no-repeat 0 0;
+}
+/* Reset some styles from the editor toolbar, when a toolbar is inside the Property Editor */
+.yui-skin-sam .yui-editor-panel .yui-toolbar-container {
+    float: left;
+    width: 100%;
+    background-image: none;
+    border: none;
+}
+/* Reset styles for menu buttons inside the Property Editor */
+.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd {
+    background-color: #ffffff;
+}
+
+/* This image is the one used to place the blankimage placeholder into the editor when you click on Insert an Image */
+.yui-editor-blankimage {
+    background-image: url( blankimage.png );
+}

Added: trunk/root/static/yui/editor/assets/skins/sam/simpleeditor.css
===================================================================
--- trunk/root/static/yui/editor/assets/skins/sam/simpleeditor.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/editor/assets/skins/sam/simpleeditor.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+.yui-busy{cursor:wait !important;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear!
 :both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;height:18px;margin:.2em 0 .2em .1em;display:block;clear:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:35px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .!
 yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-too!
 lbar-con
tainer .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container !
 .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd div.yui-editor!
 -body-cont:after{display:block;clear:both;visibility:hidden;co!
 ntent:'.
';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group-padding{}.yui-editor-panel .yui-toolbar-group-border{}.yui-editor-panel .yui-toolbar-group-textflow{}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width h3{}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:auto;}.yui-editor-panel .height-width span.info{font-size:70%;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-p!
 anel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;*top:-5px;width:24px;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersiz!
 e-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-edit!
 or-panel
 .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px !important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0px 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-borders!
 ize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflo!
 w:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px !
 solid #F
6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font!
 -size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:.25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{bac!
 kground-color:#F2F2F2;border-top:1px solid #808080;color:#999;!
 text-ali
gn:left;padding:0.25em;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;margin:0;border-color:#808080;border-style:solid;border-width:1px 0;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:93%;line-height:2;display:block;color:#000000;overflow:hidd!
 en;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-s!
 am .yui-toolbar-container .yui-button .first-child{*left:0px;}!
 .yui-ski
n-sam .yui-toolbar-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yu!
 i-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-!
 skin-sam .yui-toolbar-container .yui-toolbar-superscript span.!
 yui-tool
bar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon{background-position:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{backgr!
 ound-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;le!
 ft:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hidd!
 enelemen
ts span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-s!
 pinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url( editor-sprite.gif ) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0px;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #8080!
 80;background:url(../../../../assets/skins/sam/sprite.png) rep!
 eat-x 0 
-200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yuimenu{}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:0.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel #cr!
 eatelink_target,.yui-skin-sam .yui-editor-panel #insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam !
 .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yu!
 i-skin-s
am .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd span.close{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url( editor-sprite.gif ) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px !
 -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url( editor-knob.gif ) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#ffffff;}.yui-editor-blankimage{background-image:url( blankimage.png );}

Modified: trunk/root/static/yui/editor/editor-beta-debug.js
===================================================================
--- trunk/root/static/yui/editor/editor-beta-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/editor/editor-beta-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,19 +2,319 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-/*
-Copyright (c) 2007, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-*/
+(function() {
+    /**
+    * @private
+    **/
+var Dom = YAHOO.util.Dom,
+    Event = YAHOO.util.Event,
+    Lang = YAHOO.lang;
+    /**
+     * @description <p>Creates a rich custom Toolbar Button. Primarily used with the Rich Text Editor's Toolbar</p>
+     * @class ToolbarButtonAdvanced
+     * @namespace YAHOO.widget
+     * @requires yahoo, dom, element, event, container_core, menu, button
+     * @beta
+     * 
+     * Provides a toolbar button based on the button and menu widgets.
+     * @constructor
+     * @param {String/HTMLElement} el The element to turn into a button.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+    if (YAHOO.widget.Button) {
+        YAHOO.widget.ToolbarButtonAdvanced = YAHOO.widget.Button;
+        /**
+        * @property buttonType
+        * @private
+        * @description Tells if the Button is a Rich Button or a Simple Button
+        */
+        YAHOO.widget.ToolbarButtonAdvanced.prototype.buttonType = 'rich';
+        /**
+        * @method checkValue
+        * @param {String} value The value of the option that we want to mark as selected
+        * @description Select an option by value
+        */
+        YAHOO.widget.ToolbarButtonAdvanced.prototype.checkValue = function(value) {
+            var _menuItems = this.getMenu().getItems();
+            if (_menuItems.length === 0) {
+                this.getMenu()._onBeforeShow();
+                _menuItems = this.getMenu().getItems();
+            }
+            for (var i = 0; i < _menuItems.length; i++) {
+                _menuItems[i].cfg.setProperty('checked', false);
+                if (_menuItems[i].value == value) {
+                    _menuItems[i].cfg.setProperty('checked', true);
+                }
+            }      
+        };
+    } else {
+        YAHOO.widget.ToolbarButtonAdvanced = function() {};
+    }
+
+
+    /**
+     * @description <p>Creates a basic custom Toolbar Button. Primarily used with the Rich Text Editor's Toolbar</p>
+     * @class ToolbarButton
+     * @namespace YAHOO.widget
+     * @requires yahoo, dom, element, event
+     * @Extends YAHOO.util.Element
+     * @beta
+     * 
+     * Provides a toolbar button based on the button and menu widgets, <select> elements are used in place of menu's.
+     * @constructor
+     * @param {String/HTMLElement} el The element to turn into a button.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+
+    YAHOO.widget.ToolbarButton = function(el, attrs) {
+        YAHOO.log('ToolbarButton Initalizing', 'info', 'ToolbarButton');
+        YAHOO.log(arguments.length + ' arguments passed to constructor', 'info', 'Toolbar');
+        
+        if (Lang.isObject(arguments[0]) && !Dom.get(el).nodeType) {
+            attrs = el;
+        }
+        var local_attrs = (attrs || {});
+
+        var oConfig = {
+            element: null,
+            attributes: local_attrs
+        };
+
+        if (!oConfig.attributes.type) {
+            oConfig.attributes.type = 'push';
+        }
+        
+        oConfig.element = document.createElement('span');
+        oConfig.element.setAttribute('unselectable', 'on');
+        oConfig.element.className = 'yui-button yui-' + oConfig.attributes.type + '-button';
+        oConfig.element.innerHTML = '<span class="first-child"><a href="#">LABEL</a></span>';
+        oConfig.attributes.id = Dom.generateId();
+
+        YAHOO.widget.ToolbarButton.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
+    };
+
+    YAHOO.extend(YAHOO.widget.ToolbarButton, YAHOO.util.Element, {
+        /**
+        * @property buttonType
+        * @private
+        * @description Tells if the Button is a Rich Button or a Simple Button
+        */
+        buttonType: 'normal',
+        /**
+        * @method _handleMouseOver
+        * @private
+        * @description Adds classes to the button elements on mouseover (hover)
+        */
+        _handleMouseOver: function() {
+            if (!this.get('disabled')) {
+                this.addClass('yui-button-hover');
+                this.addClass('yui-' + this.get('type') + '-button-hover');
+            }
+        },
+        /**
+        * @method _handleMouseOut
+        * @private
+        * @description Removes classes from the button elements on mouseout (hover)
+        */
+        _handleMouseOut: function() {
+            this.removeClass('yui-button-hover');
+            this.removeClass('yui-' + this.get('type') + '-button-hover');
+        },
+        /**
+        * @method checkValue
+        * @param {String} value The value of the option that we want to mark as selected
+        * @description Select an option by value
+        */
+        checkValue: function(value) {
+            if (this.get('type') == 'menu') {
+                var opts = this._button.options;
+                for (var i = 0; i < opts.length; i++) {
+                    if (opts[i].value == value) {
+                        opts.selectedIndex = i;
+                    }
+                }
+            }
+        },
+        /** 
+        * @method init
+        * @description The ToolbarButton class's initialization method
+        */        
+        init: function(p_oElement, p_oAttributes) {
+            YAHOO.widget.ToolbarButton.superclass.init.call(this, p_oElement, p_oAttributes);
+
+            this.on('mouseover', this._handleMouseOver, this, true);
+            this.on('mouseout', this._handleMouseOut, this, true);
+        },
+        /**
+        * @method initAttributes
+        * @description Initializes all of the configuration attributes used to create 
+        * the toolbar.
+        * @param {Object} attr Object literal specifying a set of 
+        * configuration attributes used to create the toolbar.
+        */        
+        initAttributes: function(attr) {
+            YAHOO.widget.ToolbarButton.superclass.initAttributes.call(this, attr);
+            /**
+            * @attribute value
+            * @description The value of the button
+            * @type String
+            */            
+            this.setAttributeConfig('value', {
+                value: attr.value
+            });
+            /**
+            * @attribute menu
+            * @description The menu attribute, see YAHOO.widget.Button
+            * @type Object
+            */            
+            this.setAttributeConfig('menu', {
+                value: attr.menu || false
+            });
+            /**
+            * @attribute type
+            * @description The type of button to create: push, menu, color, select, spin
+            * @type String
+            */            
+            this.setAttributeConfig('type', {
+                value: attr.type,
+                writeOnce: true,
+                method: function(type) {
+                    var el, opt;
+                    if (!this._button) {
+                        this._button = this.get('element').getElementsByTagName('a')[0];
+                    }
+                    switch (type) {
+                        case 'select':
+                        case 'menu':
+                            el = document.createElement('select');
+                            var menu = this.get('menu');
+                            for (var i = 0; i < menu.length; i++) {
+                                opt = document.createElement('option');
+                                opt.innerHTML = menu[i].text;
+                                opt.value = menu[i].value;
+                                if (menu[i].checked) {
+                                    opt.selected = true;
+                                }
+                                el.appendChild(opt);
+                            }
+                            this._button.parentNode.replaceChild(el, this._button);
+                            Event.on(el, 'change', this._handleSelect, this, true);
+                            this._button = el;
+                            break;
+                    }
+                }
+            });
+
+            /**
+            * @attribute disabled
+            * @description Set the button into a disabled state
+            * @type String
+            */            
+            this.setAttributeConfig('disabled', {
+                value: attr.disabled || false,
+                method: function(disabled) {
+                    if (disabled) {
+                        this.addClass('yui-button-disabled');
+                        this.addClass('yui-' + this.get('type') + '-button-disabled');
+                    } else {
+                        this.removeClass('yui-button-disabled');
+                        this.removeClass('yui-' + this.get('type') + '-button-disabled');
+                    }
+                    if (this.get('type') == 'menu') {
+                        this._button.disabled = disabled;
+                    }
+                }
+            });
+
+            /**
+            * @attribute label
+            * @description The text label for the button
+            * @type String
+            */            
+            this.setAttributeConfig('label', {
+                value: attr.label,
+                method: function(label) {
+                    if (!this._button) {
+                        this._button = this.get('element').getElementsByTagName('a')[0];
+                    }
+                    if (this.get('type') == 'push') {
+                        this._button.innerHTML = label;
+                    }
+                }
+            });
+
+            /**
+            * @attribute title
+            * @description The title of the button
+            * @type String
+            */            
+            this.setAttributeConfig('title', {
+                value: attr.title
+            });
+
+            /**
+            * @config container
+            * @description The container that the button is rendered to, handled by Toolbar
+            * @type String
+            */            
+            this.setAttributeConfig('container', {
+                value: null,
+                writeOnce: true,
+                method: function(cont) {
+                    this.appendTo(cont);
+                }
+            });
+
+        },
+        /** 
+        * @private
+        * @method _handleSelect
+        * @description The event fired when a change event gets fired on a select element
+        * @param {Event} ev The change event.
+        */        
+        _handleSelect: function(ev) {
+            var tar = Event.getTarget(ev);
+            var value = tar.options[tar.selectedIndex].value;
+            this.fireEvent('change', {type: 'change', value: value });
+        },
+        /** 
+        * @method getMenu
+        * @description A stub function to mimic YAHOO.widget.Button's getMenu method
+        */        
+        getMenu: function() {
+            return this.get('menu');
+        },
+        /** 
+        * @method fireEvent
+        * @description Overridden fireEvent method to prevent DOM events from firing if the button is disabled.
+        */        
+        fireEvent: function (p_sType , p_aArgs) {
+            //  Disabled buttons should not respond to DOM events
+            if (this.DOM_EVENTS[p_sType] && this.get('disabled')) {
+                return;
+            }
+        
+            YAHOO.widget.ToolbarButton.superclass.fireEvent.call(this, p_sType, p_aArgs);
+        },
+        /**
+        * @method toString
+        * @description Returns a string representing the toolbar.
+        * @return {String}
+        */        
+        toString: function() {
+            return 'ToolbarButton (' + this.get('id') + ')';
+        }
+        
+    });
+})();
 /**
  * @description <p>Creates a rich Toolbar widget based on Button. Primarily used with the Rich Text Editor</p>
  * @class Toolbar
  * @namespace YAHOO.widget
- * @requires yahoo, dom, element, event
- * @optional container, menu, button, dragdrop
+ * @requires yahoo, dom, element, event, toolbarbutton
+ * @optional container_core, dragdrop
  * @beta
  */
 (function() {
@@ -106,6 +406,12 @@
 
     YAHOO.extend(YAHOO.widget.Toolbar, YAHOO.util.Element, {
         /** 
+        * @property buttonType
+        * @description The default button to use
+        * @type Object
+        */
+        buttonType: YAHOO.widget.ToolbarButton,
+        /** 
         * @property dd
         * @description The DragDrop instance associated with the Toolbar
         * @type Object
@@ -301,12 +607,6 @@
         */
         _titlebar: null,
         /** 
-        * @property _disabled
-        * @description Object to track button status when enabling/disabling the toolbar
-        * @type Object
-        */
-        _disabled: null,
-        /** 
         * @property browser
         * @description Standard browser detection
         * @type Object
@@ -405,10 +705,39 @@
         */
         initAttributes: function(attr) {
             YAHOO.widget.Toolbar.superclass.initAttributes.call(this, attr);
-            var el = this.get('element');
             this.addClass(this.CLASS_CONTAINER);
 
+            /**
+            * @attribute buttonType
+            * @description The buttonType to use (advanced or basic)
+            * @type String
+            */
+            this.setAttributeConfig('buttonType', {
+                value: attr.buttonType || 'basic',
+                writeOnce: true,
+                validator: function(type) {
+                    switch (type) {
+                        case 'advanced':
+                        case 'basic':
+                            return true;
+                    }
+                    return false;
+                },
+                method: function(type) {
+                    if (type == 'advanced') {
+                        if (YAHOO.widget.Button) {
+                            this.buttonType = YAHOO.widget.ToolbarButtonAdvanced;
+                        } else {
+                            YAHOO.log('Can not find YAHOO.widget.Button', 'error', 'Toolbar');
+                            this.buttonType = YAHOO.widget.ToolbarButton;
+                        }
+                    } else {
+                        this.buttonType = YAHOO.widget.ToolbarButton;
+                    }
+                }
+            });
 
+
             /**
             * @attribute buttons
             * @description Object specifying the buttons to include in the toolbar
@@ -459,49 +788,23 @@
                     if (this.get('disabled') === disabled) {
                         return false;
                     }
-                    if (!Lang.isObject(this._disabled)) {
-                        this._disabled = {};
-                    }
                     if (disabled) {
                         this.addClass(this.CLASS_DISABLED);
                         this.set('draggable', false);
+                        this.disableAllButtons();
                     } else {
                         this.removeClass(this.CLASS_DISABLED);
                         if (this._configs.draggable._initialConfig.value) {
                             //Draggable by default, set it back
                             this.set('draggable', true);
                         }
+                        this.resetAllButtons();
                     }
-                    var len = this._buttonList.length;
-                    for (var i = 0; i < len; i++) {
-                        if (disabled) {
-                            //If it's already disabled, flag it
-                            if (this._buttonList[i].get('disabled')) {
-                                this._disabled[i] = true;
-                            } else {
-                                this._disabled[i] = null;
-                            }
-                            this.disableButton(this._buttonList[i].get('id'));
-                        } else {
-                            //Check to see if it was disabled by default and skip it
-                            var _button = this._buttonList[i];
-                            var _check = _button._configs.disabled._initialConfig.value;
-                            if (this._disabled[i] === true) {
-                                _check = true;
-                            }
-                            if (!_check) {
-                                this.enableButton(_button.get('id'));
-                            }
-                        }
-                    }
-                    if (!disabled) {
-                        this._disabled = {};
-                    }
                 }
             });
 
             /**
-            * @attribute cont
+            * @config cont
             * @description The container for the toolbar.
             * @type HTMLElement
             */
@@ -619,8 +922,6 @@
             this.setAttributeConfig('draggable', {
                 value: (attr.draggable || false),
                 method: function(draggable) {
-                    var el = this.get('element');
-
                     if (draggable && !this.get('titlebar')) {
                         YAHOO.log('Dragging enabled', 'info', 'Toolbar');
                         if (!this._dragHandle) {
@@ -757,8 +1058,6 @@
             if (!this._buttonList) {
                 this._buttonList = [];
             }
-            //Add to .get('buttons') manually
-            this._configs.buttons.value[this._configs.buttons.value.length] = oButton;
             YAHOO.log('Adding button of type: ' + oButton.type, 'info', 'Toolbar');
             if (!oButton.container) {
                 oButton.container = this.get('cont');
@@ -785,7 +1084,7 @@
                     }
                 }
             }
-            var _oButton = {};
+            var _oButton = {}, skip = false;
             for (var o in oButton) {
                 if (Lang.hasOwnProperty(oButton, o)) {
                     if (!this._toolbarConfigs[o]) {
@@ -800,10 +1099,14 @@
                 _oButton.type = 'push';
             }
             if (_oButton.type == 'color') {
-                _oButton = this._makeColorButton(_oButton);
+                if (YAHOO.widget.Overlay) {
+                    _oButton = this._makeColorButton(_oButton);
+                } else {
+                    skip = true;
+                }
             }
             if (_oButton.menu) {
-                if (oButton.menu instanceof YAHOO.widget.Overlay) {
+                if ((YAHOO.widget.Overlay) && (oButton.menu instanceof YAHOO.widget.Overlay)) {
                     oButton.menu.showEvent.subscribe(function() {
                         this._button = _oButton;
                     });
@@ -818,153 +1121,203 @@
                     }
                 }
             }
-            var tmp = new YAHOO.widget.Button(_oButton);
-            if (this.get('disabled')) {
-                //Toolbar is disabled, disable the new button too!
-                tmp.set('disabled', true);
-            }
-            if (!oButton.id) {
-                oButton.id = tmp.get('id');
-            }
-            YAHOO.log('Button created (' + oButton.type + ')', 'info', 'Toolbar');
-            
-            if (after) {
-                var el = tmp.get('element');
-                var nextSib = null;
-                if (after.get) {
-                    nextSib = after.get('element').nextSibling;
-                } else if (after.nextSibling) {
-                    nextSib = after.nextSibling;
+            if (skip) {
+                oButton = false;
+            } else {
+                //Add to .get('buttons') manually
+                this._configs.buttons.value[this._configs.buttons.value.length] = oButton;
+
+                var tmp = new this.buttonType(_oButton);
+                if (!tmp.buttonType) {
+                    tmp.buttonType = 'rich';
+                    tmp.checkValue = function(value) {
+                        var _menuItems = this.getMenu().getItems();
+                        if (_menuItems.length === 0) {
+                            this.getMenu()._onBeforeShow();
+                            _menuItems = this.getMenu().getItems();
+                        }
+                        for (var i = 0; i < _menuItems.length; i++) {
+                            _menuItems[i].cfg.setProperty('checked', false);
+                            if (_menuItems[i].value == value) {
+                                _menuItems[i].cfg.setProperty('checked', true);
+                            }
+                        }      
+                    };
                 }
-                if (nextSib) {
-                    nextSib.parentNode.insertBefore(el, nextSib);
+                
+                if (this.get('disabled')) {
+                    //Toolbar is disabled, disable the new button too!
+                    tmp.set('disabled', true);
                 }
-            }
-            tmp.addClass(this.CLASS_PREFIX + '-' + tmp.get('value'));
-            var icon = document.createElement('span');
-            icon.className = this.CLASS_PREFIX + '-icon';
-            tmp.get('element').insertBefore(icon, tmp.get('firstChild'));
-            //Replace the Button HTML Element with an a href
-            var a = document.createElement('a');
-            a.innerHTML = tmp._button.innerHTML;
-            a.href = '#';
-            Event.on(a, 'click', function(ev) {
-                Event.stopEvent(ev);
-            });
-            tmp._button.parentNode.replaceChild(a, tmp._button);
-            tmp._button = a;
+                if (!oButton.id) {
+                    oButton.id = tmp.get('id');
+                }
+                YAHOO.log('Button created (' + oButton.type + ')', 'info', 'Toolbar');
+                
+                if (after) {
+                    var el = tmp.get('element');
+                    var nextSib = null;
+                    if (after.get) {
+                        nextSib = after.get('element').nextSibling;
+                    } else if (after.nextSibling) {
+                        nextSib = after.nextSibling;
+                    }
+                    if (nextSib) {
+                        nextSib.parentNode.insertBefore(el, nextSib);
+                    }
+                }
+                tmp.addClass(this.CLASS_PREFIX + '-' + tmp.get('value'));
 
-            if (oButton.type == 'select') {
-                tmp.addClass(this.CLASS_PREFIX + '-select');
-            }
-            if (oButton.type == 'spin') {
-                if (!Lang.isArray(oButton.range)) {
-                    oButton.range = [ 10, 100 ];
+                var icon = document.createElement('span');
+                icon.className = this.CLASS_PREFIX + '-icon';
+                tmp.get('element').insertBefore(icon, tmp.get('firstChild'));
+                if (tmp._button.tagName.toLowerCase() == 'button') {
+                    tmp.get('element').setAttribute('unselectable', 'on');
+                    //Replace the Button HTML Element with an a href if it exists
+                    var a = document.createElement('a');
+                    a.innerHTML = tmp._button.innerHTML;
+                    a.href = '#';
+                    Event.on(a, 'click', function(ev) {
+                        Event.stopEvent(ev);
+                    });
+                    tmp._button.parentNode.replaceChild(a, tmp._button);
+                    tmp._button = a;
                 }
-                this._makeSpinButton(tmp, oButton);
-            }
 
-            tmp.get('element').setAttribute('title', tmp.get('label'));
-
-            if (oButton.type != 'spin') {
-                if (_oButton.menu instanceof YAHOO.widget.Overlay) {
-                    var showPicker = function(ev) {
-                        var exec = true;
-                        if (ev.keyCode && (ev.keyCode == 9)) {
-                            exec = false;
-                        }
-                        if (exec) {
-                            this._colorPicker._button = oButton.value;
-                            var menuEL = tmp.getMenu().element;
-                            if (menuEL.style.visibility == 'hidden') {
-                                tmp.getMenu().show();
-                            } else {
-                                tmp.getMenu().hide();
+                if (oButton.type == 'select') {
+                    if (tmp._button.tagName.toLowerCase() == 'select') {
+                        icon.parentNode.removeChild(icon);
+                        var iel = tmp._button;
+                        var parEl = tmp.get('element');
+                        parEl.parentNode.replaceChild(iel, parEl);
+                    } else {
+                        //Don't put a class on it if it's a real select element
+                        tmp.addClass(this.CLASS_PREFIX + '-select');
+                    }
+                }
+                if (oButton.type == 'spin') {
+                    if (!Lang.isArray(oButton.range)) {
+                        oButton.range = [ 10, 100 ];
+                    }
+                    this._makeSpinButton(tmp, oButton);
+                }
+                tmp.get('element').setAttribute('title', tmp.get('label'));
+                if (oButton.type != 'spin') {
+                    if ((YAHOO.widget.Overlay) && (_oButton.menu instanceof YAHOO.widget.Overlay)) {
+                        var showPicker = function(ev) {
+                            var exec = true;
+                            if (ev.keyCode && (ev.keyCode == 9)) {
+                                exec = false;
                             }
+                            if (exec) {
+                                this._colorPicker._button = oButton.value;
+                                var menuEL = tmp.getMenu().element;
+                                if (Dom.getStyle(menuEL, 'visibility') == 'hidden') {
+                                    tmp.getMenu().show();
+                                } else {
+                                    tmp.getMenu().hide();
+                                }
+                            }
+                            YAHOO.util.Event.stopEvent(ev);
+                        };
+                        tmp.on('mousedown', showPicker, oButton, this);
+                        tmp.on('keydown', showPicker, oButton, this);
+                        
+                    } else if ((oButton.type != 'menu') && (oButton.type != 'select')) {
+                        tmp.on('keypress', this._buttonClick, oButton, this);
+                        tmp.on('mousedown', function(ev) {
+                            YAHOO.util.Event.stopEvent(ev);
+                            this._buttonClick(ev, oButton);
+                        }, oButton, this);
+                        tmp.on('click', function(ev) {
+                            YAHOO.util.Event.stopEvent(ev);
+                        });
+                    } else {
+                        //Stop the mousedown event so we can trap the selection in the editor!
+                        tmp.on('mousedown', function(ev) {
+                            YAHOO.util.Event.stopEvent(ev);
+                        });
+                        tmp.on('click', function(ev) {
+                            YAHOO.util.Event.stopEvent(ev);
+                        });
+                        tmp.on('change', function(ev) {
+                            if (!oButton.menucmd) {
+                                oButton.menucmd = oButton.value;
+                            }
+                            oButton.value = ev.value;
+                            this._buttonClick(ev, oButton);
+                        }, this, true);
+                        var self = this;
+                        //Hijack the mousedown event in the menu and make it fire a button click..
+                        if (tmp.getMenu().mouseDownEvent) {
+                            tmp.getMenu().mouseDownEvent.subscribe(function(ev, args) {
+                                YAHOO.log('mouseDownEvent', 'warn', 'Toolbar');
+                                var oMenu = args[1];
+                                YAHOO.util.Event.stopEvent(args[0]);
+                                tmp._onMenuClick(args[0], tmp);
+                                if (!oButton.menucmd) {
+                                    oButton.menucmd = oButton.value;
+                                }
+                                oButton.value = ((oMenu.value) ? oMenu.value : oMenu._oText.nodeValue);
+                                self._buttonClick.call(self, args[1], oButton);
+                                tmp._hideMenu();
+                                return false;
+                            });
+                            tmp.getMenu().clickEvent.subscribe(function(ev, args) {
+                                YAHOO.log('clickEvent', 'warn', 'Toolbar');
+                                YAHOO.util.Event.stopEvent(args[0]);
+                            });
+                            tmp.getMenu().mouseUpEvent.subscribe(function(ev, args) {
+                                YAHOO.log('mouseUpEvent', 'warn', 'Toolbar');
+                                YAHOO.util.Event.stopEvent(args[0]);
+                            });
                         }
-                        YAHOO.util.Event.stopEvent(ev);
-                    };
-                    tmp.on('mousedown', showPicker, oButton, this);
-                    tmp.on('keydown', showPicker, oButton, this);
-                    
-                } else if ((oButton.type != 'menu') && (oButton.type != 'select')) {
-                    tmp.on('keypress', this._buttonClick, oButton, this);
+                        
+                    }
+                } else {
+                    //Stop the mousedown event so we can trap the selection in the editor!
                     tmp.on('mousedown', function(ev) {
                         YAHOO.util.Event.stopEvent(ev);
-                        this._buttonClick(ev, oButton);
-                    }, oButton, this);
+                    });
                     tmp.on('click', function(ev) {
                         YAHOO.util.Event.stopEvent(ev);
                     });
-                } else {
-                    //Stop the mousedown event so we can trap the selection in the editor!
-                    tmp.on('mousedown', function(ev) {
+                }
+                if (this.browser.ie) {
+                    //Add a couple of new events for IE
+                    tmp.DOM_EVENTS.focusin = true;
+                    tmp.DOM_EVENTS.focusout = true;
+                    
+                    //Stop them so we don't loose focus in the Editor
+                    tmp.on('focusin', function(ev) {
                         YAHOO.util.Event.stopEvent(ev);
-                    });
+                    }, oButton, this);
+                    
+                    tmp.on('focusout', function(ev) {
+                        YAHOO.util.Event.stopEvent(ev);
+                    }, oButton, this);
                     tmp.on('click', function(ev) {
                         YAHOO.util.Event.stopEvent(ev);
-                    });
-                    var self = this;
-                    //Hijack the mousedown event in the menu and make it fire a button click..
-                    tmp.getMenu().mouseDownEvent.subscribe(function(ev, args) {
-                        YAHOO.log('mouseDownEvent', 'warn', 'Toolbar');
-                        var oMenu = args[1];
-                        YAHOO.util.Event.stopEvent(args[0]);
-                        tmp._onMenuClick(args[0], tmp);
-                        if (!oButton.menucmd) {
-                            oButton.menucmd = oButton.value;
+                    }, oButton, this);
+                }
+                if (this.browser.webkit) {
+                    //This will keep the document from gaining focus and the editor from loosing it..
+                    //Forcefully remove the focus calls in button!
+                    tmp.hasFocus = function() {
+                        return true;
+                    };
+                }
+                this._buttonList[this._buttonList.length] = tmp;
+                if ((oButton.type == 'menu') || (oButton.type == 'split') || (oButton.type == 'select')) {
+                    if (Lang.isArray(oButton.menu)) {
+                        YAHOO.log('Button type is (' + oButton.type + '), doing extra renderer work.', 'info', 'Toolbar');
+                        var menu = tmp.getMenu();
+                        if (menu.renderEvent) {
+                            menu.renderEvent.subscribe(_addMenuClasses, tmp);
+                            if (oButton.renderer) {
+                                menu.renderEvent.subscribe(oButton.renderer, tmp);
+                            }
                         }
-                        oButton.value = ((oMenu.value) ? oMenu.value : oMenu._oText.nodeValue);
-                        self._buttonClick.call(self, args[1], oButton);
-                        tmp._hideMenu();
-                        return false;
-                    });
-                    tmp.getMenu().clickEvent.subscribe(function(ev, args) {
-                        YAHOO.log('clickEvent', 'warn', 'Toolbar');
-                        YAHOO.util.Event.stopEvent(args[0]);
-                    });
-                }
-            } else {
-                //Stop the mousedown event so we can trap the selection in the editor!
-                tmp.on('mousedown', function(ev) {
-                    YAHOO.util.Event.stopEvent(ev);
-                });
-                tmp.on('click', function(ev) {
-                    YAHOO.util.Event.stopEvent(ev);
-                });
-            }
-            if (this.browser.ie) {
-                //Add a couple of new events for IE
-                tmp.DOM_EVENTS.focusin = true;
-                tmp.DOM_EVENTS.focusout = true;
-                
-                //Stop them so we don't loose focus in the Editor
-                tmp.on('focusin', function(ev) {
-                    YAHOO.util.Event.stopEvent(ev);
-                }, oButton, this);
-                
-                tmp.on('focusout', function(ev) {
-                    YAHOO.util.Event.stopEvent(ev);
-                }, oButton, this);
-                tmp.on('click', function(ev) {
-                    YAHOO.util.Event.stopEvent(ev);
-                }, oButton, this);
-            }
-            if (this.browser.webkit) {
-                //This will keep the document from gaining focus and the editor from loosing it..
-                //Forcefully remove the focus calls in button!
-                tmp.hasFocus = function() {
-                    return true;
-                };
-            }
-            this._buttonList[this._buttonList.length] = tmp;
-            if ((oButton.type == 'menu') || (oButton.type == 'split') || (oButton.type == 'select')) {
-                if (Lang.isArray(oButton.menu)) {
-                    YAHOO.log('Button type is (' + oButton.type + '), doing extra renderer work.', 'info', 'Toolbar');
-                    var menu = tmp.getMenu();
-                    menu.renderEvent.subscribe(_addMenuClasses, tmp);
-                    if (oButton.renderer) {
-                        menu.renderEvent.subscribe(oButton.renderer, tmp);
                     }
                 }
             }
@@ -1088,16 +1441,18 @@
         * @method _makeColorButton
         * @private
         * @description Called to turn a "color" button into a menu button with an Overlay for the menu.
-        * @param {Object} _oButton <a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a> reference
+        * @param {Object} _oButton <a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a> reference
         */
         _makeColorButton: function(_oButton) {
             if (!this._colorPicker) {   
                 this._createColorPicker(this.get('id'));
             }
             _oButton.type = 'color';
-            _oButton.menu = new YAHOO.widget.Overlay(this.get('id') + '_' + _oButton.value + '_menu', { visbile: false, position: 'absolute' });
+            _oButton.menu = new YAHOO.widget.Overlay(this.get('id') + '_' + _oButton.value + '_menu', { visible: false, position: 'absolute', iframe: true });
             _oButton.menu.setBody('');
             _oButton.menu.render(this.get('cont'));
+            Dom.addClass(_oButton.menu.element, 'yui-button-menu');
+            Dom.addClass(_oButton.menu.element, 'yui-color-button-menu');
             _oButton.menu.beforeShowEvent.subscribe(function() {
                 _oButton.menu.cfg.setProperty('zindex', 5); //Re Adjust the overlays zIndex.. not sure why.
                 _oButton.menu.cfg.setProperty('context', [this.getButtonById(_oButton.id).get('element'), 'tl', 'bl']); //Re Adjust the overlay.. not sure why.
@@ -1105,9 +1460,7 @@
                 this._resetColorPicker();
                 var _p = this._colorPicker;
                 if (_p.parentNode) {
-                    //if (_p.parentNode != _oButton.menu.body) {
-                        _p.parentNode.removeChild(_p);
-                    //}
+                    _p.parentNode.removeChild(_p);
                 }
                 _oButton.menu.setBody('');
                 _oButton.menu.appendToBody(_p);
@@ -1119,7 +1472,7 @@
         * @private
         * @method _makeSpinButton
         * @description Create a button similar to an OS Spin button.. It has an up/down arrow combo to scroll through a range of int values.
-        * @param {Object} _button <a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a> reference
+        * @param {Object} _button <a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a> reference
         * @param {Object} oButton Object literal containing the buttons initial config
         */
         _makeSpinButton: function(_button, oButton) {
@@ -1265,20 +1618,22 @@
 
                 if (info.type == 'select') {
                     var button = this.getButtonById(info.id);
-                    var txt = info.value;
-                    for (var i = 0; i < info.menu.length; i++) {
-                        if (info.menu[i].value == info.value) {
-                            txt = info.menu[i].text;
-                            break;
+                    if (button.buttonType == 'rich') {
+                        var txt = info.value;
+                        for (var i = 0; i < info.menu.length; i++) {
+                            if (info.menu[i].value == info.value) {
+                                txt = info.menu[i].text;
+                                break;
+                            }
                         }
-                    }
-                    button.set('label', '<span class="yui-toolbar-' + info.menucmd + '-' + (info.value).replace(/ /g, '-').toLowerCase() + '">' + txt + '</span>');
-                    var _items = button.getMenu().getItems();
-                    for (var m = 0; m < _items.length; m++) {
-                        if (_items[m].value.toLowerCase() == info.value.toLowerCase()) {
-                            _items[m].cfg.setProperty('checked', true);
-                        } else {
-                            _items[m].cfg.setProperty('checked', false);
+                        button.set('label', '<span class="yui-toolbar-' + info.menucmd + '-' + (info.value).replace(/ /g, '-').toLowerCase() + '">' + txt + '</span>');
+                        var _items = button.getMenu().getItems();
+                        for (var m = 0; m < _items.length; m++) {
+                            if (_items[m].value.toLowerCase() == info.value.toLowerCase()) {
+                                _items[m].cfg.setProperty('checked', true);
+                            } else {
+                                _items[m].cfg.setProperty('checked', false);
+                            }
                         }
                     }
                 }
@@ -1291,7 +1646,7 @@
         * @method getButtonById
         * @description Gets a button instance from the toolbar by is Dom id.
         * @param {String} id The Dom id to query for.
-        * @return {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}
+        * @return {<a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a>}
         */
         getButtonById: function(id) {
             var len = this._buttonList.length;
@@ -1306,7 +1661,7 @@
         * @method getButtonByValue
         * @description Gets a button instance or a menuitem instance from the toolbar by it's value.
         * @param {String} value The button value to query for.
-        * @return {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a> or <a href="YAHOO.widget.MenuItem.html">YAHOO.widget.MenuItem</a>}
+        * @return {<a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a> or <a href="YAHOO.widget.MenuItem.html">YAHOO.widget.MenuItem</a>}
         */
         getButtonByValue: function(value) {
             var _buttons = this.get('buttons');
@@ -1344,7 +1699,7 @@
         * @method getButtonByIndex
         * @description Gets a button instance from the toolbar by is index in _buttonList.
         * @param {Number} index The index of the button in _buttonList.
-        * @return {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}
+        * @return {<a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a>}
         */
         getButtonByIndex: function(index) {
             if (this._buttonList[index]) {
@@ -1375,10 +1730,10 @@
             if (Lang.isNumber(id)) {
                 button = this.getButtonByIndex(id);
             }
-            if (!(button instanceof YAHOO.widget.Button)) {
+            if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
                 button = this.getButtonByValue(id);
             }
-            if (button instanceof YAHOO.widget.Button) {
+            if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
                 button.set('disabled', true);
             } else {
                 return false;
@@ -1401,10 +1756,10 @@
             if (Lang.isNumber(id)) {
                 button = this.getButtonByIndex(id);
             }
-            if (!(button instanceof YAHOO.widget.Button)) {
+            if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
                 button = this.getButtonByValue(id);
             }
-            if (button instanceof YAHOO.widget.Button) {
+            if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
                 if (button.get('disabled')) {
                     button.set('disabled', false);
                 }
@@ -1427,20 +1782,22 @@
                 if (Lang.isNumber(id)) {
                     button = this.getButtonByIndex(id);
                 }
-                if (!(button instanceof YAHOO.widget.Button)) {
+                if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
                     button = this.getButtonByValue(id);
                 }
-                if (button instanceof YAHOO.widget.Button) {
+                if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
                     button.addClass('yui-button-selected');
                     button.addClass('yui-button-' + button.get('value') + '-selected');
                     if (value) {
-                        var _items = button.getMenu().getItems();
-                        for (var m = 0; m < _items.length; m++) {
-                            if (_items[m].value == value) {
-                                _items[m].cfg.setProperty('checked', true);
-                                button.set('label', '<span class="yui-toolbar-' + button.get('value') + '-' + (value).replace(/ /g, '-').toLowerCase() + '">' + _items[m]._oText.nodeValue + '</span>');
-                            } else {
-                                _items[m].cfg.setProperty('checked', false);
+                        if (button.buttonType == 'rich') {
+                            var _items = button.getMenu().getItems();
+                            for (var m = 0; m < _items.length; m++) {
+                                if (_items[m].value == value) {
+                                    _items[m].cfg.setProperty('checked', true);
+                                    button.set('label', '<span class="yui-toolbar-' + button.get('value') + '-' + (value).replace(/ /g, '-').toLowerCase() + '">' + _items[m]._oText.nodeValue + '</span>');
+                                } else {
+                                    _items[m].cfg.setProperty('checked', false);
+                                }
                             }
                         }
                     }
@@ -1463,10 +1820,10 @@
             if (Lang.isNumber(id)) {
                 button = this.getButtonByIndex(id);
             }
-            if (!(button instanceof YAHOO.widget.Button)) {
+            if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
                 button = this.getButtonByValue(id);
             }
-            if (button instanceof YAHOO.widget.Button) {
+            if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
                 button.removeClass('yui-button-selected');
                 button.removeClass('yui-button-' + button.get('value') + '-selected');
                 button.removeClass('yui-button-hover');
@@ -1557,10 +1914,10 @@
             if (Lang.isNumber(id)) {
                 button = this.getButtonByIndex(id);
             }
-            if (!(button instanceof YAHOO.widget.Button)) {
+            if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
                 button = this.getButtonByValue(id);
             }
-            if (button instanceof YAHOO.widget.Button) {
+            if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
                 var thisID = button.get('id');
                 button.destroy();
 
@@ -1653,17 +2010,11 @@
 * @type YAHOO.util.CustomEvent
 */
 })();
-/*
-Copyright (c) 2007, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-*/
 /**
- * @module editor
  * @description <p>The Rich Text Editor is a UI control that replaces a standard HTML textarea; it allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like bold and italic text, and drag-and-drop inclusion and sizing of images. The Rich Text Editor's toolbar is extensible via a plugin architecture so that advanced implementations can achieve a high degree of customization.</p>
  * @namespace YAHOO.widget
- * @requires yahoo, dom, element, event, toolbar, container, menu, button
- * @optional dragdrop, animation
+ * @requires yahoo, dom, element, event, toolbar
+ * @optional animation, container_core
  * @beta
  */
 
@@ -1676,14 +2027,14 @@
     /**
      * The Rich Text Editor is a UI control that replaces a standard HTML textarea; it allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like bold and italic text, and drag-and-drop inclusion and sizing of images. The Rich Text Editor's toolbar is extensible via a plugin architecture so that advanced implementations can achieve a high degree of customization.
      * @constructor
-     * @class Editor
+     * @class SimpleEditor
      * @extends YAHOO.util.Element
      * @param {String/HTMLElement} el The textarea element to turn into an editor.
      * @param {Object} attrs Object liternal containing configuration parameters.
     */
     
-    YAHOO.widget.Editor = function(el, attrs) {
-        YAHOO.log('Editor Initalizing', 'info', 'Editor');
+    YAHOO.widget.SimpleEditor = function(el, attrs) {
+        YAHOO.log('SimpleEditor Initalizing', 'info', 'SimpleEditor');
 
         var oConfig = {
             element: null,
@@ -1710,16 +2061,16 @@
             oConfig.attributes.toolbar_cont.id = id + '_toolbar';
             div.appendChild(oConfig.attributes.toolbar_cont);
         }
-        
         var editorWrapper = document.createElement('DIV');
         div.appendChild(editorWrapper);
         oConfig.attributes.editor_wrapper = editorWrapper;
 
-        YAHOO.widget.Editor.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
+        YAHOO.widget.SimpleEditor.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
     };
 
     /**
-    * @private _cleanClassName
+    * @private
+    * @method _cleanClassName
     * @description Makes a useable classname from dynamic data, by dropping it to lowercase and replacing spaces with -'s.
     * @param {String} str The classname to clean up
     * @returns {String}
@@ -1729,8 +2080,83 @@
     }
 
 
-    YAHOO.extend(YAHOO.widget.Editor, YAHOO.util.Element, {
+    YAHOO.extend(YAHOO.widget.SimpleEditor, YAHOO.util.Element, {
         /**
+        * @property _docType
+        * @description The DOCTYPE to use in the editable container.
+        * @type String
+        */
+        _docType: '<!DOCTYPE HTML PUBLIC "-/'+'/W3C/'+'/DTD HTML 4.01/'+'/EN" "http:/'+'/www.w3.org/TR/html4/strict.dtd">',
+        /**
+        * @property editorDirty
+        * @description This flag will be set when certain things in the Editor happen. It is to be used by the developer to check to see if content has changed.
+        * @type Boolean
+        */
+        editorDirty: false,
+        /**
+        * @property _defaultCSS
+        * @description The default CSS used in the config for 'css'. This way you can add to the config like this: { css: YAHOO.widget.SimpleEditor.prototype._defaultCSS + 'ADD MYY CSS HERE' }
+        * @type String
+        */
+        _defaultCSS: 'html { height: 95%; } body { height: 100%; padding: 7px; background-color: #fff; font:13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small; } a { color: blue; text-decoration: underline; cursor: pointer; } .warning-localfile { border-bottom: 1px dashed red !important; } .yui-busy { cursor: wait !important; } img.selected { border: 2px dotted #808080; } img { cursor: pointer !important; border: none; }',
+        /**
+        * @property _defaultToolbar
+        * @private
+        * @description Default toolbar config.
+        * @type Object
+        */
+        _defaultToolbar: {
+            collapse: true,
+            titlebar: 'Text Editing Tools',
+            draggable: false,
+            buttons: [
+                { group: 'fontstyle', label: 'Font Name and Size',
+                    buttons: [
+                        { type: 'select', label: 'Arial', value: 'fontname', disabled: true,
+                            menu: [
+                                { text: 'Arial', checked: true },
+                                { text: 'Arial Black' },
+                                { text: 'Comic Sans MS' },
+                                { text: 'Courier New' },
+                                { text: 'Lucida Console' },
+                                { text: 'Tahoma' },
+                                { text: 'Times New Roman' },
+                                { text: 'Trebuchet MS' },
+                                { text: 'Verdana' }
+                            ]
+                        },
+                        { type: 'spin', label: '13', value: 'fontsize', range: [ 9, 75 ], disabled: true }
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'textstyle', label: 'Font Style',
+                    buttons: [
+                        { type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' },
+                        { type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' },
+                        { type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' },
+                        { type: 'separator' },
+                        { type: 'color', label: 'Font Color', value: 'forecolor', disabled: true },
+                        { type: 'color', label: 'Background Color', value: 'backcolor', disabled: true }
+                        
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'indentlist', label: 'Lists',
+                    buttons: [
+                        { type: 'push', label: 'Create an Unordered List', value: 'insertunorderedlist' },
+                        { type: 'push', label: 'Create an Ordered List', value: 'insertorderedlist' }
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'insertitem', label: 'Insert Item',
+                    buttons: [
+                        { type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true },
+                        { type: 'push', label: 'Insert Image', value: 'insertimage' }
+                    ]
+                }
+            ]
+        },
+        /**
         * @property _lastButton
         * @private
         * @description The last button pressed, so we don't disable it.
@@ -1879,7 +2305,7 @@
         afterElement: null,
         /**
         * @property invalidHTML
-        * @description Contains a list of HTML elements that are invalid inside the editor. They will be removed when they are found.
+        * @description Contains a list of HTML elements that are invalid inside the editor. They will be removed when they are found. If you set the value of a key to "{ keepContents: true }", then the element will be replaced with a yui-non span to be filtered out when cleanHTML is called. The only tag that is ignored here is the span tag as it will force the Editor into a loop and freeze the browser. However.. all of these tags will be removed in the cleanHTML routine.
         * @type Object
         */
         invalidHTML: {
@@ -1919,21 +2345,21 @@
         * @description The Toolbar items that should be disabled if there is no selection present in the editor.
         * @type Array
         */
-        _disabled: [ 'createlink', 'forecolor', 'backcolor', 'fontname', 'fontsize', 'superscript', 'subscript', 'removeformat', 'heading', 'indent' ],
+        _disabled: [ 'createlink', 'fontname', 'fontsize', 'forecolor', 'backcolor' ],
         /**
         * @private
         * @property _alwaysDisabled
         * @description The Toolbar items that should ALWAYS be disabled event if there is a selection present in the editor.
         * @type Object
         */
-        _alwaysDisabled: { 'outdent': true },
+        _alwaysDisabled: { },
         /**
         * @private
         * @property _alwaysEnabled
         * @description The Toolbar items that should ALWAYS be enabled event if there isn't a selection present in the editor.
         * @type Object
         */
-        _alwaysEnabled: { hiddenelements: true },
+        _alwaysEnabled: { },
         /**
         * @private
         * @property _semantic
@@ -1987,11 +2413,13 @@
             }
             var isrc = 'javascript:;';
             if (this.browser.ie) {
-                isrc = 'about:blank';
+                if (window.location.href.toLowerCase().indexOf("https") !== 0) {
+                    isrc = 'about:blank';
+                }
             }
             ifrmDom.setAttribute('src', isrc);
             var ifrm = new YAHOO.util.Element(ifrmDom);
-            ifrm.setStyle('zIndex', '-1');
+            //ifrm.setStyle('zIndex', '-1');
             return ifrm;
         },
         /**
@@ -2011,6 +2439,30 @@
             return false;
         },
         /**
+        * @private _hasParent
+        * @description Checks to see if an Element reference or one of it's parents is a valid one and has a certain tag type
+        * @param {HTMLElement} el The element to check
+        * @param {String} tag The tag that the element needs to be
+        * @returns HTMLElement
+        */
+        _hasParent: function(el, tag) {
+            if (!el || !el.parentNode) {
+                return false;
+            }
+            
+            while (el.parentNode) {
+                if (this._isElement(el, tag)) {
+                    return el;
+                }
+                if (el.parentNode) {
+                    el = el.parentNode;
+                } else {
+                    return false;
+                }
+            }
+            return false;
+        },
+        /**
         * @private
         * @method _getDoc
         * @description Get the Document of the IFRAME
@@ -2161,12 +2613,20 @@
 
             if (this.browser.ie) {
                 try { //IE freaks out here sometimes..
-                    range = this.getDoc().body.createTextRange();
+                    range = this._getDoc().body.createTextRange();
                     range.moveToElementText(node);
                     range.select();
-                } catch (e) {}
+                } catch (e) {
+                    YAHOO.log('IE failed to select element: ' + node.tagName, 'warn', 'SimpleEditor');
+                }
             } else if (this.browser.webkit) {
 				sel.setBaseAndExtent(node, 0, node, node.innerText.length);
+            } else if (this.browser.opera) {
+                sel = this._getWindow().getSelection();
+                range = this._getDoc().createRange();
+                range.selectNode(node);
+                sel.removeAllRanges();
+                sel.addRange(range);
             } else {
                 range = this._getDoc().createRange();
                 range.selectNodeContents(node);
@@ -2225,7 +2685,7 @@
         * @returns {String} The state that it was set to.
         */
         _toggleDesignMode: function() {
-            var _dMode = this._getDoc().designMode,
+            var _dMode = this._getDoc().designMode.toLowerCase(),
                 _state = 'on';
             if (_dMode == 'on') {
                 _state = 'off';
@@ -2239,11 +2699,13 @@
         * @description This method is fired from _checkLoaded when the document is ready. It turns on designMode and set's up the listeners.
         */
         _initEditor: function() {
-            YAHOO.log('editorLoaded', 'info', 'Editor');
+            YAHOO.log('editorLoaded', 'info', 'SimpleEditor');
             if (this.browser.ie) {
                 this._getDoc().body.style.margin = '0';
             }
-            this._setDesignMode('on');
+            if (!this.get('disabled')) {
+                this._setDesignMode('on');
+            }
             
             this.toolbar.on('buttonClick', this._handleToolbarClick, this, true);
             //Setup Listeners on iFrame
@@ -2254,10 +2716,12 @@
             Event.on(this._getDoc(), 'keypress', this._handleKeyPress, this, true);
             Event.on(this._getDoc(), 'keyup', this._handleKeyUp, this, true);
             Event.on(this._getDoc(), 'keydown', this._handleKeyDown, this, true);
-            this.toolbar.set('disabled', false);
+            if (!this.get('disabled')) {
+                this.toolbar.set('disabled', false);
+            }
             this.fireEvent('editorContentLoaded', { type: 'editorLoaded', target: this });
             if (this.get('dompath')) {
-                YAHOO.log('Delayed DomPath write', 'info', 'Editor');
+                YAHOO.log('Delayed DomPath write', 'info', 'SimpleEditor');
                 var self = this;
                 setTimeout(function() {
                     self._writeDomPath.call(self);
@@ -2277,7 +2741,7 @@
                 clearTimeout(this._contentTimer);
             }
             if (this._contentTimerCounter > 250) {
-                YAHOO.log('ERROR: Body Did Not load', 'error', 'Editor');
+                YAHOO.log('ERROR: Body Did Not load', 'error', 'SimpleEditor');
                 return false;
             }
             var init = false;
@@ -2287,7 +2751,7 @@
                 }
             } catch (e) {
                 init = false;
-                YAHOO.log('checking body (e)' + e, 'error', 'Editor');
+                YAHOO.log('checking body (e)' + e, 'error', 'SimpleEditor');
             }
 
             if (init === true) {
@@ -2306,26 +2770,35 @@
         * @description This method will open the iframes content document and write the textareas value into it, then start the body.onload checking.
         */
         _setInitialContent: function() {
-            YAHOO.log('Populating editor body with contents of the text area', 'info', 'Editor');
+            YAHOO.log('Populating editor body with contents of the text area', 'info', 'SimpleEditor');
             var html = Lang.substitute(this.get('html'), {
                 TITLE: this.STR_TITLE,
-                CONTENT: this.get('element').value,
+                CONTENT: this._cleanIncomingHTML(this.get('element').value),
                 CSS: this.get('css'),
-                HIDDEN_CSS: this.get('hiddencss')
+                HIDDEN_CSS: ((this.get('hiddencss')) ? this.get('hiddencss') : '/* No Hidden CSS */'),
+                EXTRA_CSS: ((this.get('extracss')) ? this.get('extracss') : '/* No Extra CSS */')
             }),
             check = true;
-            if (this.browser.ie || this.browser.webkit || this.browser.opera) {
+            if (document.compatMode != 'BackCompat') {
+                YAHOO.log('Adding Doctype to editable area', 'info', 'SimpleEditor');
+                html = this._docType + "\n" + html;
+            } else {
+                YAHOO.log('DocType skipped because we are in BackCompat Mode.', 'warn', 'SimpleEditor');
+            }
+
+            if (this.browser.ie || this.browser.webkit || this.browser.opera || (navigator.userAgent.indexOf('Firefox/1.5') != -1)) {
+                //Firefox 1.5 doesn't like setting designMode on an document created with a data url
                 try {
                     this._getDoc().open();
                     this._getDoc().write(html);
                     this._getDoc().close();
                 } catch (e) {
-                    YAHOO.log('Setting doc failed.. (_setInitialContent)', 'error', 'Editor');
+                    YAHOO.log('Setting doc failed.. (_setInitialContent)', 'error', 'SimpleEditor');
                     //Safari will only be here if we are hidden
                     check = false;
                 }
             } else {
-                //This keeps Firefox from writing the iframe to history preserving the back buttons functionality
+                //This keeps Firefox 2 from writing the iframe to history preserving the back buttons functionality
                 this.get('iframe').get('element').src = 'data:text/html;charset=utf-8,' + encodeURIComponent(html);
             }
             if (check) {
@@ -2397,7 +2870,7 @@
                 if (!sel || !range) {
                     return null;
                 }
-                if (!this._hasSelection() && !this.browser.webkit) {
+                if (!this._hasSelection()) {
                     if (sel.anchorNode && (sel.anchorNode.nodeType == 3)) {
                         if (sel.anchorNode.parentNode) { //next check parentNode
                             elm = sel.anchorNode.parentNode;
@@ -2406,11 +2879,9 @@
                             elm = sel.anchorNode.nextSibling;
                         }
                     }
-                    
                     if (this._isElement(elm, 'br')) {
                         elm = null;
                     }
-                
                     if (!elm) {
                         elm = range.commonAncestorContainer;
                         if (!range.collapsed) {
@@ -2426,26 +2897,28 @@
                 }
             }
             if (this.currentEvent !== null) {
-                switch (this.currentEvent.type) {
-                    case 'click':
-                    case 'mousedown':
-                    case 'mouseup':
-                        elm = Event.getTarget(this.currentEvent);
-                        break;
-                    default:
-                        //Do nothing
-                        break;
+                try {
+                    switch (this.currentEvent.type) {
+                        case 'click':
+                        case 'mousedown':
+                        case 'mouseup':
+                            elm = Event.getTarget(this.currentEvent);
+                            break;
+                        default:
+                            //Do nothing
+                            break;
+                    }
+                } catch (e) {
+                    YAHOO.log('Firefox 1.5 errors here: ' + e, 'error', 'SimpleEditor');
                 }
             } else if (this.currentElement && this.currentElement[0]) {
                 elm = this.currentElement[0];
             }
-
             if (this.browser.opera || this.browser.webkit) {
                 if (this.currentEvent && !elm) {
                     elm = YAHOO.util.Event.getTarget(this.currentEvent);
                 }
             }
-
             if (!elm || !elm.tagName) {
                 elm = doc.body;
             }
@@ -2469,10 +2942,13 @@
         * @private
         * @method _getDomPath
         * @description This method will attempt to build the DOM path from the currently selected element.
+        * @param HTMLElement el The element to start with, if not provided _getSelectedElement is used
         * @returns {Array} An array of node references that will create the DOM Path.
         */
-        _getDomPath: function() {
-			var el = this._getSelectedElement();
+        _getDomPath: function(el) {
+            if (!el) {
+			    el = this._getSelectedElement();
+            }
 			var domPath = [];
             while (el !== null) {
                 if (el.ownerDocument != this._getDoc()) {
@@ -2533,8 +3009,8 @@
                     }
                     switch (tag) {
                         case 'a':
-                            if (path[i].getAttribute('href')) {
-                                pathStr += ':' + path[i].getAttribute('href').replace('mailto:', '').replace('http:/'+'/', '').replace('https:/'+'/', ''); //May need to add others here ftp
+                            if (path[i].getAttribute('href', 2)) {
+                                pathStr += ':' + path[i].getAttribute('href', 2).replace('mailto:', '').replace('http:/'+'/', '').replace('https:/'+'/', ''); //May need to add others here ftp
                             }
                             break;
                         case 'img':
@@ -2570,60 +3046,74 @@
         * @description Fix href and imgs as well as remove invalid HTML.
         */
         _fixNodes: function() {
+            var doc = this._getDoc(),
+                els = [];
+
             for (var v in this.invalidHTML) {
-                if (Lang.hasOwnProperty(this.invalidHTML, v)) {
-                    var tags = this._getDoc().body.getElementsByTagName(v);
-                    for (var h = 0; h < tags.length; h++) {
-                        if (tags[h].parentNode) {
-                            tags[h].parentNode.removeChild(tags[h]);
+                if (YAHOO.lang.hasOwnProperty(this.invalidHTML, v)) {
+                    if (v.toLowerCase() != 'span') {
+                        var tags = doc.body.getElementsByTagName(v);
+                        if (tags.length) {
+                            for (var i = 0; i < tags.length; i++) {
+                                els.push(tags[i]);
+                            }
                         }
                     }
                 }
             }
-            var imgs = this._getDoc().getElementsByTagName('img');
-            Dom.addClass(imgs, 'yui-img');
-            
-            var url = '';
-
-            for (var im = 0; im < imgs.length; im++) {
-                if (imgs[im].getAttribute('href', 2)) {
-                    url = imgs[im].getAttribute('src', 2);
-                    if (this._isLocalFile(url)) {
-                        Dom.addClass(imgs[im], this.CLASS_LOCAL_FILE);
+            for (var h = 0; h < els.length; h++) {
+                if (els[h].parentNode) {
+                    if (Lang.isObject(this.invalidHTML[els[h].tagName.toLowerCase()]) && this.invalidHTML[els[h].tagName.toLowerCase()].keepContents) {
+                        this._swapEl(els[h], 'span', function(el) {
+                            el.className = 'yui-non';
+                        });
                     } else {
-                        Dom.removeClass(imgs[im], this.CLASS_LOCAL_FILE);
+                        els[h].parentNode.removeChild(els[h]);
                     }
                 }
             }
-            var fakeAs = this._getDoc().body.getElementsByTagName('a');
-            for (var a = 0; a < fakeAs.length; a++) {
-                if (fakeAs[a].getAttribute('href', 2)) {
-                    url = fakeAs[a].getAttribute('href', 2);
-                    if (this._isLocalFile(url)) {
-                        Dom.addClass(fakeAs[a], this.CLASS_LOCAL_FILE);
-                    } else {
-                        Dom.removeClass(fakeAs[a], this.CLASS_LOCAL_FILE);
-                    }
-                }
-            }
+            var imgs = this._getDoc().getElementsByTagName('img');
+            Dom.addClass(imgs, 'yui-img');   
         },
         /**
         * @private
-        * @method _showHidden
-        * @description Toggle on/off the hidden.css file.
+        * @method _isNonEditable
+        * @param Event ev The Dom event being checked
+        * @description Method is called at the beginning of all event handlers to check if this element or a parent element has the class yui-noedit (this.CLASS_NOEDIT) applied.
+        * If it does, then this method will stop the event and return true. The event handlers will then return false and stop the nodeChange from occuring. This method will also
+        * disable and enable the Editor's toolbar based on the noedit state.
+        * @returns Boolean
         */
-        _showHidden: function() {
-            if (this._showingHiddenElements) {
-                YAHOO.log('Enabling hidden CSS File', 'info', 'Editor');
-                this._showingHiddenElements = false;
-                this.toolbar.deselectButton('hiddenelements');
-                Dom.removeClass(this._getDoc().body, this.CLASS_HIDDEN);
-            } else {
-                YAHOO.log('Disabling hidden CSS File', 'info', 'Editor');
-                this._showingHiddenElements = true;
-                Dom.addClass(this._getDoc().body, this.CLASS_HIDDEN);
-                this.toolbar.selectButton('hiddenelements');
+        _isNonEditable: function(ev) {
+            if (this.get('allowNoEdit')) {
+                var el = Event.getTarget(ev);
+                if (this._isElement(el, 'html')) {
+                    el = null;
+                }
+                var path = this._getDomPath(el);
+                for (var i = (path.length - 1); i > -1; i--) {
+                    if (Dom.hasClass(path[i], this.CLASS_NOEDIT)) {
+                        //if (this.toolbar.get('disabled') === false) {
+                        //    this.toolbar.set('disabled', true);
+                        //}
+                        try {
+                             this._getDoc().execCommand('enableObjectResizing', false, 'false');
+                        } catch (e) {}
+                        this.nodeChange();
+                        Event.stopEvent(ev);
+                        YAHOO.log('CLASS_NOEDIT found in DOM Path, stopping event', 'info', 'SimpleEditor');
+                        return true;
+                    }
+                }
+                //if (this.toolbar.get('disabled') === true) {
+                    //Should only happen once..
+                    //this.toolbar.set('disabled', false);
+                    try {
+                         this._getDoc().execCommand('enableObjectResizing', false, 'true');
+                    } catch (e) {}
+                //}
             }
+            return false;
         },
         /**
         * @private
@@ -2641,6 +3131,9 @@
         * @description Handles all click events inside the iFrame document.
         */
         _handleClick: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
             this._setCurrentEvent(ev);
             if (this.currentWindow) {
                 this.closeWindow();
@@ -2665,7 +3158,12 @@
         * @description Handles all mouseup events inside the iFrame document.
         */
         _handleMouseUp: function(ev) {
-            this._setCurrentEvent(ev);
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            //Don't set current event for mouseup.
+            //It get's fired after a menu is closed and gives up a bogus event to work with
+            //this._setCurrentEvent(ev);
             var self = this;
             if (this.browser.opera) {
                 /**
@@ -2703,6 +3201,9 @@
         * @description Handles all mousedown events inside the iFrame document.
         */
         _handleMouseDown: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
             this._setCurrentEvent(ev);
             var sel = Event.getTarget(ev);
             if (this.browser.webkit && this._hasSelection()) {
@@ -2736,18 +3237,22 @@
         * @description Handles all doubleclick events inside the iFrame document.
         */
         _handleDoubleClick: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
             this._setCurrentEvent(ev);
             var sel = Event.getTarget(ev);
             if (this._isElement(sel, 'img')) {
                 this.currentElement[0] = sel;
                 this.toolbar.fireEvent('insertimageClick', { type: 'insertimageClick', target: this.toolbar });
                 this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
-            } else if (this._isElement(sel, 'a')) {
-                this.currentElement[0] = sel;
+            } else if (this._hasParent(sel, 'a')) { //Handle elements inside an a
+                this.currentElement[0] = this._hasParent(sel, 'a');
                 this.toolbar.fireEvent('createlinkClick', { type: 'createlinkClick', target: this.toolbar });
                 this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
             }
             this.nodeChange();
+            this.editorDirty = false;
             this.fireEvent('editorDoubleClick', { type: 'editorDoubleClick', target: this, ev: ev });
         },
         /**
@@ -2757,6 +3262,9 @@
         * @description Handles all keyup events inside the iFrame document.
         */
         _handleKeyUp: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
             this._setCurrentEvent(ev);
             switch (ev.keyCode) {
                 case 37: //Left Arrow
@@ -2781,6 +3289,7 @@
                         } else {
                             this.nodeChange();
                         }
+                        this.editorDirty = true;
                     }
                     break;
             }
@@ -2793,16 +3302,184 @@
         * @description Handles all keypress events inside the iFrame document.
         */
         _handleKeyPress: function(ev) {
+            if (this.get('allowNoEdit')) {
+                if (ev && ev.keyCode && ((ev.keyCode == 46) || ev.keyCode == 63272)) {
+                    //Forward delete key
+                    YAHOO.log('allowNoEdit is set, forward delete key has been disabled', 'warn', 'SimpleEditor');
+                    Event.stopEvent(ev);
+                }
+            }
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
             this._setCurrentEvent(ev);
+            if (this.browser.webkit) {
+                if (!this.browser.webkit3) {
+                    if (ev.keyCode && (ev.keyCode == 122) && (ev.metaKey)) {
+                        //This is CMD + z (for undo)
+                        if (this._hasParent(this._getSelectedElement(), 'li')) {
+                            YAHOO.log('We are in an LI and we found CMD + z, stopping the event', 'warn', 'SimpleEditor');
+                            Event.stopEvent(ev);
+                        }
+                    }
+                }
+                /* This was removed because it crashes Safari 2.x in some cases
+                if (ev.keyCode && (ev.keyCode == 8)) {
+                    //Delete Key
+                    if (this._isElement(this._getSelectedElement(), 'br')) {
+                        var el = this._getSelectedElement();
+                        el.parentNode.removeChild(el);
+                    }
+                }
+                */
+                this._listFix(ev);
+            }
             this.fireEvent('editorKeyPress', { type: 'editorKeyPress', target: this, ev: ev });
         },
         /**
         * @private
+        * @method _listFix
+        * @param {Event} ev The event we are working on.
+        * @description Handles the Enter key, Tab Key and Shift + Tab keys for List Items.
+        */
+        _listFix: function(ev) {
+            //YAHOO.log('Lists Fix (' + ev.keyCode + ')', 'info', 'SimpleEditor');
+            var testLi = null, par = null, preContent = false, range = null;
+            //Enter Key
+            if (this.browser.webkit) {
+                if (ev.keyCode && (ev.keyCode == 13)) {
+                    if (this._hasParent(this._getSelectedElement(), 'li')) {
+                        var tar = this._hasParent(this._getSelectedElement(), 'li');
+                        var li = this._getDoc().createElement('li');
+                        li.innerHTML = '<span class="yui-non"> </span> ';
+                        if (tar.nextSibling) {
+                            tar.parentNode.insertBefore(li, tar.nextSibling);
+                        } else {
+                            tar.parentNode.appendChild(li);
+                        }
+                        this.currentElement[0] = li;
+                        this._selectNode(li.firstChild);
+                        if (!this.browser.webkit3) {
+                            tar.parentNode.style.display = 'list-item';
+                            setTimeout(function() {
+                                tar.parentNode.style.display = 'block';
+                            }, 1);
+                        }
+                        Event.stopEvent(ev);
+                    }
+                }
+            }
+            //Shift + Tab Key
+            if (ev.keyCode && ((!this.browser.webkit3 && (ev.keyCode == 25)) || ((this.browser.webkit3 || !this.browser.webkit) && ((ev.keyCode == 9) && ev.shiftKey)))) {
+                testLi = this._getSelectedElement();
+                if (this._hasParent(testLi, 'li')) {
+                    testLi = this._hasParent(testLi, 'li');
+                    YAHOO.log('We have a SHIFT tab in an LI, reverse it..', 'info', 'SimpleEditor');
+                    if (this._hasParent(testLi, 'ul') || this._hasParent(testLi, 'ol')) {
+                        YAHOO.log('We have a double parent, move up a level', 'info', 'SimpleEditor');
+                        par = this._hasParent(testLi, 'ul');
+                        if (!par) {
+                            par = this._hasParent(testLi, 'ol');
+                        }
+                        //YAHOO.log(par.previousSibling + ' :: ' + par.previousSibling.innerHTML);
+                        if (this._isElement(par.previousSibling, 'li')) {
+                            par.removeChild(testLi);
+                            par.parentNode.insertBefore(testLi, par.nextSibling);
+                            if (this.browser.ie) {
+                                range = this._getDoc().body.createTextRange();
+                                range.moveToElementText(testLi);
+                                range.collapse(false);
+                                range.select();
+                            }
+                            if (this.browser.webkit) {
+                                if (!this.browser.webkit3) {
+                                    par.style.display = 'list-item';
+                                    par.parentNode.style.display = 'list-item';
+                                    setTimeout(function() {
+                                        par.style.display = 'block';
+                                        par.parentNode.style.display = 'block';
+                                    }, 1);
+                                }
+                            }
+                            Event.stopEvent(ev);
+                        }
+                    }
+                }
+            }
+            //Tab Key
+            if (ev.keyCode && ((ev.keyCode == 9) && (!ev.shiftKey))) {
+                YAHOO.log('List Fix - Tab', 'info', 'SimpleEditor');
+                var preLi = this._getSelectedElement();
+                if (this._hasParent(preLi, 'li')) {
+                    preContent = this._hasParent(preLi, 'li').innerHTML;
+                }
+                //YAHOO.log('preLI: ' + preLi.tagName + ' :: ' + preLi.innerHTML);
+                if (this.browser.webkit) {
+                    this._getDoc().execCommand('inserttext', false, '\t');
+                }
+                testLi = this._getSelectedElement();
+                if (this._hasParent(testLi, 'li')) {
+                    YAHOO.log('We have a tab in an LI', 'info', 'SimpleEditor');
+                    par = this._hasParent(testLi, 'li');
+                    YAHOO.log('parLI: ' + par.tagName + ' :: ' + par.innerHTML);
+                    var newUl = this._getDoc().createElement(par.parentNode.tagName.toLowerCase());
+                    if (this.browser.webkit) {
+                        var span = Dom.getElementsByClassName('Apple-tab-span', 'span', par);
+                        //Remove the span element that Safari puts in
+                        if (span[0]) {
+                            par.removeChild(span[0]);
+                            par.innerHTML = Lang.trim(par.innerHTML);
+                            //Put the HTML from the LI into this new LI
+                            if (preContent) {
+                                par.innerHTML = '<span class="yui-non">' + preContent + '</span> ';
+                            } else {
+                                par.innerHTML = '<span class="yui-non"> </span> ';
+                            }
+                        }
+                    } else {
+                        if (preContent) {
+                            par.innerHTML = preContent + ' ';
+                        } else {
+                            par.innerHTML = ' ';
+                        }
+                    }
+
+                    par.parentNode.replaceChild(newUl, par);
+                    newUl.appendChild(par);
+                    if (this.browser.webkit) {
+                        this._getSelection().setBaseAndExtent(par.firstChild, 1, par.firstChild, par.firstChild.innerText.length);
+                        if (!this.browser.webkit3) {
+                            par.parentNode.parentNode.style.display = 'list-item';
+                            setTimeout(function() {
+                                par.parentNode.parentNode.style.display = 'block';
+                            }, 1);
+                        }
+                    } else if (this.browser.ie) {
+                        range = this._getDoc().body.createTextRange();
+                        range.moveToElementText(par);
+                        range.collapse(false);
+                        range.select();
+                    } else {
+                        this._selectNode(par);
+                    }
+                    Event.stopEvent(ev);
+                }
+                if (this.browser.webkit) {
+                    Event.stopEvent(ev);
+                }
+                this.nodeChange();
+            }
+        },
+        /**
+        * @private
         * @method _handleKeyDown
         * @param {Event} ev The event we are working on.
         * @description Handles all keydown events inside the iFrame document.
         */
         _handleKeyDown: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
             this._setCurrentEvent(ev);
             if (this.currentWindow) {
                 this.closeWindow();
@@ -2832,22 +3509,22 @@
                         exec = false;
                     }
                     break;
-                case 219: //Left
-                    action = 'justifyleft';
-                    break;
-                case 220: //Center
-                    action = 'justifycenter';
-                    break;
-                case 221: //Right
-                    action = 'justifyright';
-                    break;
                 case 76: //L
                     if (this._hasSelection()) {
                         if (ev.shiftKey && ev.ctrlKey) {
-                            this.execCommand('createlink', '');
-                            this.toolbar.fireEvent('createlinkClick', { type: 'createlinkClick', target: this.toolbar });
-                            this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
-                            doExec = false;
+                            var makeLink = true;
+                            if (this.get('limitCommands')) {
+                                if (!this.toolbar.getButtonByValue('createlink')) {
+                                    YAHOO.log('Toolbar Button for (createlink) was not found, skipping exec.', 'info', 'SimpleEditor');
+                                    makeLink = false;
+                                }
+                            }
+                            if (makeLink) {
+                                this.execCommand('createlink', '');
+                                this.toolbar.fireEvent('createlinkClick', { type: 'createlinkClick', target: this.toolbar });
+                                this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
+                                doExec = false;
+                            }
                         }
                     }
                     break;
@@ -2867,12 +3544,6 @@
                 case 85: //U
                     action = 'underline';
                     break;
-                case 9: //Tab Key
-                    if (this.browser.safari) {
-                        this._getDoc().execCommand('inserttext', false, '\t');
-                        Event.stopEvent(ev);
-                    }
-                    break;
                 case 13:
                     if (this.browser.ie) {
                         //Insert a <br> instead of a <p></p> in Internet Explorer
@@ -2888,6 +3559,10 @@
                         }
                     }
             }
+            //if (!this.browser.gecko && !this.browser.webkit) {
+            if (this.browser.ie) {
+                this._listFix(ev);
+            }
             if (doExec && action) {
                 this.execCommand(action, null);
                 Event.stopEvent(ev);
@@ -2906,6 +3581,7 @@
             if (force === true) {
                 this._lastNodeChange = 0;
             }
+            
             if ((this._lastNodeChange + threshold) < thisNodeChange) {
                 var self = this;
                 if (this._fixNodesTimer === null) {
@@ -2940,6 +3616,10 @@
                         fn_button = this.toolbar.getButtonByValue('fontname'),
                         fs_button = this.toolbar.getButtonByValue('fontsize');
 
+                    if (force !== true) {
+                        this.editorDirty = true;
+                    }
+
                     //Handle updating the toolbar with active buttons
                     var _ex = {};
                     if (this._lastButton) {
@@ -2983,7 +3663,7 @@
                         }
                     }
                     var path = this._getDomPath();
-                    var olType = null, tag = null, cmd = null;
+                    var tag = null, cmd = null;
                     for (var i = 0; i < path.length; i++) {
                         tag = path[i].tagName.toLowerCase();
                         if (path[i].getAttribute('tag')) {
@@ -3068,17 +3748,7 @@
                 tbar = this.toolbar;
             }
             var _button = tbar.getButtonByValue(button);
-            var _menuItems = _button.getMenu().getItems();
-            if (_menuItems.length === 0) {
-                _button.getMenu()._onBeforeShow();
-                _menuItems = _button.getMenu().getItems();
-            }
-            for (var i = 0; i < _menuItems.length; i++) {
-                _menuItems[i].cfg.setProperty('checked', false);
-                if (_menuItems[i].value == value) {
-                    _menuItems[i].cfg.setProperty('checked', true);
-                }
-            }
+            _button.checkValue(value);
         },
         /**
         * @private
@@ -3096,8 +3766,8 @@
             }
             this._lastButton = ev.button;
             if (this.STOP_EXEC_COMMAND) {
-                YAHOO.log('execCommand skipped because we found the STOP_EXEC_COMMAND flag set to true', 'warn', 'Editor');
-                YAHOO.log('NOEXEC::execCommand::(' + cmd + '), (' + value + ')', 'warn', 'Editor');
+                YAHOO.log('execCommand skipped because we found the STOP_EXEC_COMMAND flag set to true', 'warn', 'SimpleEditor');
+                YAHOO.log('NOEXEC::execCommand::(' + cmd + '), (' + value + ')', 'warn', 'SimpleEditor');
                 this.STOP_EXEC_COMMAND = false;
                 return false;
             } else {
@@ -3126,6 +3796,45 @@
             }
         },
         /**
+        * @private
+        * @method _disableEditor
+        * @param {Boolean} disabled Pass true to disable, false to enable
+        * @description Creates a mask to place over the Editor.
+        */
+        _disableEditor: function(disabled) {
+            if (disabled) {
+                if (!this._mask) {
+                    this._setDesignMode('off');
+                    if (this.toolbar) {
+                        this.toolbar.set('disabled', true);
+                    }
+                    this._mask = document.createElement('DIV');
+                    Dom.setStyle(this._mask, 'height', '100%');
+                    Dom.setStyle(this._mask, 'width', '100%');
+                    Dom.setStyle(this._mask, 'position', 'absolute');
+                    Dom.setStyle(this._mask, 'top', '0');
+                    Dom.setStyle(this._mask, 'left', '0');
+                    Dom.setStyle(this._mask, 'opacity', '.5');
+                    Dom.addClass(this._mask, 'yui-editor-masked');
+                    this.get('iframe').get('parentNode').appendChild(this._mask);
+                }
+            } else {
+                if (this._mask) {
+                    this._mask.parentNode.removeChild(this._mask);
+                    this._mask = null;
+                    if (this.toolbar) {
+                        this.toolbar.set('disabled', false);
+                    }
+                    this._setDesignMode('on');
+                    this._focusWindow();
+                    var self = this;
+                    window.setTimeout(function() {
+                        self.nodeChange.call(self);
+                    }, 100);
+                }
+            }
+        },
+        /**
         * @property EDITOR_PANEL_ID
         * @description HTML id to give the properties window in the DOM.
         * @type String
@@ -3148,20 +3857,8 @@
         * @description The accessibility string for the element before the iFrame
         * @type String
         */
-        STR_BEFORE_EDITOR: 'This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Control + Shift + T to place focus on the toolbar and navigate between option heading names. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift [ aligns text left</li> <li>Control Shift | centers text</li> <li>Control Shift ] aligns text right</li> <li>Control Shift L adds an HTML link</li> <li>To exit this text editor use the keyboard shortcut Control + Shift + ESC.</li></ul>',
+        STR_BEFORE_EDITOR: 'This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Control + Shift + T to place focus on the toolbar and navigate between option heading names. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift L adds an HTML link</li> <li>To exit this text editor use the keyboard shortcut Control + Shift + ESC.</li></ul>',
         /**
-        * @property STR_CLOSE_WINDOW
-        * @description The Title of the close button in the Editor Window
-        * @type String
-        */
-        STR_CLOSE_WINDOW: 'Close Window',
-        /**
-        * @property STR_CLOSE_WINDOW_NOTE
-        * @description A note appearing in the Editor Window to tell the user that the Escape key will close the window
-        * @type String
-        */
-        STR_CLOSE_WINDOW_NOTE: 'To close this window use the Control + Shift + W key',
-        /**
         * @property STR_TITLE
         * @description The Title of the HTML document that is created in the iFrame
         * @type String
@@ -3174,96 +3871,12 @@
         */
         STR_IMAGE_HERE: 'Image Url Here',
         /**
-        * @property STR_IMAGE_PROP_TITLE
-        * @description The title for the Image Property Editor Window
-        * @type String
-        */
-        STR_IMAGE_PROP_TITLE: 'Image Options',
-        /**
-        * @property STR_IMAGE_URL
-        * @description The label string for Image URL
-        * @type String
-        */
-        STR_IMAGE_URL: 'Image Url',
-        /**
-        * @property STR_IMAGE_TITLE
-        * @description The label string for Image Description
-        * @type String
-        */
-        STR_IMAGE_TITLE: 'Description',
-        /**
-        * @property STR_IMAGE_SIZE
-        * @description The label string for Image Size
-        * @type String
-        */
-        STR_IMAGE_SIZE: 'Size',
-        /**
-        * @property STR_IMAGE_ORIG_SIZE
-        * @description The label string for Original Image Size
-        * @type String
-        */
-        STR_IMAGE_ORIG_SIZE: 'Original Size',
-        /**
-        * @property STR_IMAGE_COPY
-        * @description The label string for the image copy and paste message for Opera and Safari
-        * @type String
-        */
-        STR_IMAGE_COPY: '<span class="tip"><span class="icon icon-info"></span><strong>Note:</strong>To move this image just highlight it, cut, and paste where ever you\'d like.</span>',
-        /**
-        * @property STR_IMAGE_PADDING
-        * @description The label string for the image padding.
-        * @type String
-        */
-        STR_IMAGE_PADDING: 'Padding',
-        /**
-        * @property STR_IMAGE_BORDER
-        * @description The label string for the image border.
-        * @type String
-        */
-        STR_IMAGE_BORDER: 'Border',
-        /**
-        * @property STR_IMAGE_TEXTFLOW
-        * @description The label string for the image text flow.
-        * @type String
-        */
-        STR_IMAGE_TEXTFLOW: 'Text Flow',
-        /**
-        * @property STR_LOCAL_FILE_WARNING
-        * @description The label string for the local file warning.
-        * @type String
-        */
-        STR_LOCAL_FILE_WARNING: '<span class="tip"><span class="icon icon-warn"></span><strong>Note:</strong>This image/link points to a file on your computer and will not be accessible to others on the internet.</span>',
-        /**
-        * @property STR_LINK_PROP_TITLE
-        * @description The label string for the Link Property Editor Window.
-        * @type String
-        */
-        STR_LINK_PROP_TITLE: 'Link Options',
-        /**
-        * @property STR_LINK_PROP_REMOVE
-        * @description The label string for the Remove link from text link inside the property editor.
-        * @type String
-        */
-        STR_LINK_PROP_REMOVE: 'Remove link from text',
-        /**
         * @property STR_LINK_URL
         * @description The label string for the Link URL.
         * @type String
         */
         STR_LINK_URL: 'Link URL',
         /**
-        * @property STR_LINK_NEW_WINDOW
-        * @description The string for the open in a new window label.
-        * @type String
-        */
-        STR_LINK_NEW_WINDOW: 'Open in a new window.',
-        /**
-        * @property STR_LINK_TITLE
-        * @description The string for the link description.
-        * @type String
-        */
-        STR_LINK_TITLE: 'Description',
-        /**
         * @protected
         * @property STOP_EXEC_COMMAND
         * @description Set to true when you want the default execCommand function to not process anything
@@ -3279,20 +3892,13 @@
         STOP_NODE_CHANGE: false,
         /**
         * @protected
-        * @property CLASS_HIDDEN
-        * @description CSS class applied to the body when the hiddenelements button is pressed.
+        * @property CLASS_NOEDIT
+        * @description CSS class applied to elements that are not editable.
         * @type String
         */
-        CLASS_HIDDEN: 'hidden',
+        CLASS_NOEDIT: 'yui-noedit',
         /**
         * @protected
-        * @property CLASS_LOCAL_FILE
-        * @description CSS class applied to an element when it's found to have a local url.
-        * @type String
-        */
-        CLASS_LOCAL_FILE: 'warning-localfile',
-        /**
-        * @protected
         * @property CLASS_CONTAINER
         * @description Default CSS class to apply to the editors container element
         * @type String
@@ -3339,14 +3945,15 @@
         * @description The Editor class' initialization method
         */
         init: function(p_oElement, p_oAttributes) {
-            YAHOO.log('init', 'info', 'Editor');
-            YAHOO.widget.Editor.superclass.init.call(this, p_oElement, p_oAttributes);
+            YAHOO.log('init', 'info', 'SimpleEditor');
+            YAHOO.widget.SimpleEditor.superclass.init.call(this, p_oElement, p_oAttributes);
             YAHOO.widget.EditorInfo._instances[this.get('id')] = this;
 
             this.on('contentReady', function() {
                 this.DOMReady = true;
                 this.fireQueue();
             }, this, true);
+
         },
         /**
         * @method initAttributes
@@ -3356,12 +3963,12 @@
         * configuration attributes used to create the editor.
         */
         initAttributes: function(attr) {
-            YAHOO.widget.Editor.superclass.initAttributes.call(this, attr);
+            YAHOO.widget.SimpleEditor.superclass.initAttributes.call(this, attr);
             var self = this;
 
             /**
             * @private
-            * @attribute iframe
+            * @config iframe
             * @description Internal config for holding the iframe element.
             * @default null
             * @type HTMLElement
@@ -3372,7 +3979,7 @@
             /**
             * @private
             * @depreciated
-            * @attribute textarea
+            * @config textarea
             * @description Internal config for holding the textarea element (replaced with element).
             * @default null
             * @type HTMLElement
@@ -3382,7 +3989,7 @@
                 writeOnce: true
             });
             /**
-            * @attribute nodeChangeThreshold
+            * @config nodeChangeThreshold
             * @description The number of seconds that need to be in between nodeChange processing
             * @default 3
             * @type Number
@@ -3392,7 +3999,28 @@
                 validator: YAHOO.lang.isNumber
             });
             /**
-            * @attribute element_cont
+            * @config allowNoEdit
+            * @description Should the editor check for non-edit fields. It should be noted that this technique is not perfect. If the user does the right things, they will still be able to make changes.
+            * Such as highlighting an element below and above the content and hitting a toolbar button or a shortcut key.
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('allowNoEdit', {
+                value: attr.allowNoEdit || false,
+                validator: YAHOO.lang.isBoolean
+            });
+            /**
+            * @config limitCommands
+            * @description Should the Editor limit the allowed execCommands to the ones available in the toolbar. If true, then execCommand and keyboard shortcuts will fail if they are not defined in the toolbar.
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('limitCommands', {
+                value: attr.limitCommands || false,
+                validator: YAHOO.lang.isBoolean
+            });
+            /**
+            * @config element_cont
             * @description Internal config for the editors container
             * @default false
             * @type HTMLElement
@@ -3402,7 +4030,7 @@
             });
             /**
             * @private
-            * @attribute editor_wrapper
+            * @config editor_wrapper
             * @description The outter wrapper for the entire editor.
             * @default null
             * @type HTMLElement
@@ -3462,33 +4090,14 @@
                         
             /**
             * @attribute blankimage
-            * @description The CSS used to show/hide hidden elements on the page
-            * @default 'assets/blankimage.png'
+            * @description The URL for the image placeholder to put in when inserting an image.
+            * @default The yahooapis.com address for the current release + 'assets/blankimage.png'
             * @type String
             */            
             this.setAttributeConfig('blankimage', {
                 value: attr.blankimage || this._getBlankImage()
             });
             /**
-            * @attribute hiddencss
-            * @description The CSS used to show/hide hidden elements on the page, these rules must be prefixed with the class provided in <code>this.CLASS_HIDDEN</code>
-            * @default <code><pre>
-            .hidden font, .hidden strong, .hidden b, .hidden em, .hidden i, .hidden u, .hidden div, .hidden p, .hidden span, .hidden img, .hidden ul, .hidden ol, .hidden li, .hidden table {
-                border: 1px dotted #ccc;
-            }
-            .hidden .yui-non {
-                border: none;
-            }
-            .hidden img {
-                padding: 2px;
-            }</pre></code>
-            * @type String
-            */            
-            this.setAttributeConfig('hiddencss', {
-                value: attr.hiddencss || '.hidden font, .hidden strong, .hidden b, .hidden em, .hidden i, .hidden u, .hidden div,.hidden p,.hidden span,.hidden img, .hidden ul, .hidden ol, .hidden li, .hidden table { border: 1px dotted #ccc; } .hidden .yui-non { border: none; } .hidden img { padding: 2px; }',
-                writeOnce: true
-            });
-            /**
             * @attribute css
             * @description The Base CSS used to format the content of the editor
             * @default <code><pre>html {
@@ -3520,18 +4129,17 @@
             * @type String
             */            
             this.setAttributeConfig('css', {
-                value: attr.css || 'html { height: 95%; } body { height: 100%; padding: 7px; background-color: #fff; font:13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small; } a { color: blue; text-decoration: underline; cursor: pointer; } .warning-localfile { border-bottom: 1px dashed red !important; } .yui-busy { cursor: wait !important; } img.selected { border: 2px dotted #808080; } img { cursor: pointer !important; border: none; }',
+                value: attr.css || this._defaultCSS,
                 writeOnce: true
             });
             /**
             * @attribute html
-            * @description The default HTML to be written to the iframe document before the contents are loaded
+            * @description The default HTML to be written to the iframe document before the contents are loaded (Note that the DOCTYPE attr will be added at render item)
             * @default This HTML requires a few things if you are to override:
-                <p><code>{TITLE}, {CSS}, {HIDDEN_CSS}</code> and <code>{CONTENT}</code> need to be there, they are passed to YAHOO.lang.substitute to be replace with other strings.<p>
+                <p><code>{TITLE}, {CSS}, {HIDDEN_CSS}, {EXTRA_CSS}</code> and <code>{CONTENT}</code> need to be there, they are passed to YAHOO.lang.substitute to be replace with other strings.<p>
                 <p><code>onload="document.body._rteLoaded = true;"</code> : the onload statement must be there or the editor will not finish loading.</p>
                 <code>
                 <pre>
-                <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
                 <html>
                     <head>
                         <title>{TITLE}</title>
@@ -3542,6 +4150,9 @@
                         <style>
                         {HIDDEN_CSS}
                         </style>
+                        <style>
+                        {EXTRA_CSS}
+                        </style>
                     </head>
                 <body onload="document.body._rteLoaded = true;">
                 {CONTENT}
@@ -3552,11 +4163,22 @@
             * @type String
             */            
             this.setAttributeConfig('html', {
-                value: attr.html || '<!DOCTYPE HTML PUBLIC "-/'+'/W3C/'+'/DTD HTML 4.01/'+'/EN" "http:/'+'/www.w3.org/TR/html4/strict.dtd"><html><head><title>{TITLE}</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><base href="' + this._baseHREF + '"><style>{CSS}</style><style>{HIDDEN_CSS}</style></head><body onload="document.body._rteLoaded = true;">{CONTENT}</body></html>',
+                value: attr.html || '<html><head><title>{TITLE}</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><base href="' + this._baseHREF + '"><style>{CSS}</style><style>{HIDDEN_CSS}</style><style>{EXTRA_CSS}</style></head><body onload="document.body._rteLoaded = true;">{CONTENT}</body></html>',
                 writeOnce: true
             });
 
             /**
+            * @attribute extracss
+            * @description Extra user defined css to load after the default SimpleEditor CSS
+            * @default ''
+            * @type String
+            */            
+            this.setAttributeConfig('extracss', {
+                value: attr.css || '',
+                writeOnce: true
+            });
+
+            /**
             * @attribute handleSubmit
             * @description Config handles if the editor will attach itself to the textareas parent form's submit handler.
             If it is set to true, the editor will attempt to attach a submit listener to the textareas parent form.
@@ -3595,33 +4217,13 @@
             this.setAttributeConfig('disabled', {
                 value: false,
                 method: function(disabled) {
-                    if (disabled) {
-                        if (!this._mask) {
-                            this._setDesignMode('off');
-                            this.toolbar.set('disabled', true);
-                            this._mask = document.createElement('DIV');
-                            Dom.setStyle(this._mask, 'height', '100%');
-                            Dom.setStyle(this._mask, 'width', '100%');
-                            Dom.setStyle(this._mask, 'position', 'absolute');
-                            Dom.setStyle(this._mask, 'top', '0');
-                            Dom.setStyle(this._mask, 'left', '0');
-                            Dom.setStyle(this._mask, 'opacity', '.5');
-                            Dom.addClass(this._mask, 'yui-editor-masked');
-                            this.get('iframe').get('parentNode').appendChild(this._mask);
-                        }
-                    } else {
-                        if (this._mask) {
-                            this._mask.parentNode.removeChild(this._mask);
-                            this._mask = null;
-                            this.toolbar.set('disabled', false);
-                            this._setDesignMode('on');
-                            this._focusWindow();
-                        }
+                    if (this._rendered) {
+                        this._disableEditor(disabled);
                     }
                 }
             });
             /**
-            * @attribute toolbar_cont
+            * @config toolbar_cont
             * @description Internal config for the toolbars container
             * @default false
             * @type Boolean
@@ -3633,97 +4235,16 @@
             /**
             * @attribute toolbar
             * @description The default toolbar config.
-            * @default This config is too large to display here, view the code to see it: <a href="editor.js.html"></a>
             * @type Object
             */            
             this.setAttributeConfig('toolbar', {
-                value: attr.toolbar || {
-                    /* {{{ Defaut Toolbar Config */
-                    collapse: true,
-                    titlebar: 'Text Editing Tools',
-                    draggable: false,
-                    buttons: [
-                        { group: 'fontstyle', label: 'Font Name and Size',
-                            buttons: [
-                                { type: 'select', label: 'Arial', value: 'fontname', disabled: true,
-                                    menu: [
-                                        { text: 'Arial', checked: true },
-                                        { text: 'Arial Black' },
-                                        { text: 'Comic Sans MS' },
-                                        { text: 'Courier New' },
-                                        { text: 'Lucida Console' },
-                                        { text: 'Tahoma' },
-                                        { text: 'Times New Roman' },
-                                        { text: 'Trebuchet MS' },
-                                        { text: 'Verdana' }
-                                    ]
-                                },
-                                { type: 'spin', label: '13', value: 'fontsize', range: [ 9, 75 ], disabled: true }
-                            ]
-                        },
-                        { type: 'separator' },
-                        { group: 'textstyle', label: 'Font Style',
-                            buttons: [
-                                { type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' },
-                                { type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' },
-                                { type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' },
-                                { type: 'separator' },
-                                { type: 'push', label: 'Subscript', value: 'subscript', disabled: true },
-                                { type: 'push', label: 'Superscript', value: 'superscript', disabled: true },
-                                { type: 'separator' },
-                                { type: 'color', label: 'Font Color', value: 'forecolor', disabled: true },
-                                { type: 'color', label: 'Background Color', value: 'backcolor', disabled: true },
-                                { type: 'separator' },
-                                { type: 'push', label: 'Remove Formatting', value: 'removeformat', disabled: true },
-                                { type: 'push', label: 'Show/Hide Hidden Elements', value: 'hiddenelements' }
-                            ]
-                        },
-                        { type: 'separator' },
-                        { group: 'alignment', label: 'Alignment',
-                            buttons: [
-                                { type: 'push', label: 'Align Left CTRL + SHIFT + [', value: 'justifyleft' },
-                                { type: 'push', label: 'Align Center CTRL + SHIFT + |', value: 'justifycenter' },
-                                { type: 'push', label: 'Align Right CTRL + SHIFT + ]', value: 'justifyright' },
-                                { type: 'push', label: 'Justify', value: 'justifyfull' }
-                            ]
-                        },
-                        { type: 'separator' },
-                        { group: 'parastyle', label: 'Paragraph Style',
-                            buttons: [
-                            { type: 'select', label: 'Normal', value: 'heading', disabled: true,
-                                menu: [
-                                    { text: 'Normal', value: 'none', checked: true },
-                                    { text: 'Header 1', value: 'h1' },
-                                    { text: 'Header 2', value: 'h2' },
-                                    { text: 'Header 3', value: 'h3' },
-                                    { text: 'Header 4', value: 'h4' },
-                                    { text: 'Header 5', value: 'h5' },
-                                    { text: 'Header 6', value: 'h6' }
-                                ]
-                            }
-                            ]
-                        },
-                        { type: 'separator' },
-                        { group: 'indentlist', label: 'Indenting and Lists',
-                            buttons: [
-                                { type: 'push', label: 'Indent', value: 'indent', disabled: true },
-                                { type: 'push', label: 'Outdent', value: 'outdent', disabled: true },
-                                { type: 'push', label: 'Create an Unordered List', value: 'insertunorderedlist' },
-                                { type: 'push', label: 'Create an Ordered List', value: 'insertorderedlist' }
-                            ]
-                        },
-                        { type: 'separator' },
-                        { group: 'insertitem', label: 'Insert Item',
-                            buttons: [
-                                { type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true },
-                                { type: 'push', label: 'Insert Image', value: 'insertimage' }
-                            ]
-                        }
-                    ]
-                    /* }}} */
-                },
+                value: attr.toolbar || this._defaultToolbar,
                 writeOnce: true,
                 method: function(toolbar) {
+                    if (!toolbar.buttonType) {
+                        toolbar.buttonType = this._defaultToolbar.buttonType;
+                    }
+                    this._defaultToolbar = toolbar;
                 }
             });
             /**
@@ -3733,7 +4254,7 @@
             * @type Boolean
             */            
             this.setAttributeConfig('animate', {
-                value: false,
+                value: ((attr.animate) ? ((YAHOO.util.Anim) ? true : false) : false),
                 validator: function(value) {
                     var ret = true;
                     if (!YAHOO.util.Anim) {
@@ -3743,7 +4264,7 @@
                 }               
             });
             /**
-            * @attribute panel
+            * @config panel
             * @description A reference to the panel we are using for windows.
             * @default false
             * @type Boolean
@@ -3760,15 +4281,6 @@
                 }               
             });
             /**
-            * @attribute localFileWarning
-            * @description Should we throw the warning if we detect a file that is local to their machine?
-            * @default true
-            * @type Boolean
-            */            
-            this.setAttributeConfig('localFileWarning', {
-                value: attr.locaFileWarning || true
-            });
-            /**
             * @attribute focusAtStart
             * @description Should we focus the window when the content is ready?
             * @default false
@@ -3782,6 +4294,7 @@
                         var self = this;
                         setTimeout(function() {
                             self._focusWindow.call(self, true);
+                            self.editorDirty = false;
                         }, 400);
                     }, this, true);
                 }
@@ -3887,7 +4400,6 @@
         },
         /**
         * @private
-        * @method _handleColorPicker
         * @description Handles the colorpicker buttons in the toolbar.
         * @param {Object} o Object returned from Toolbar's buttonClick Event
         */
@@ -3905,7 +4417,6 @@
         * @param {Object} o Object returned from Toolbar's buttonClick Event
         */
         _handleAlign: function(o) {
-            var button = this.toolbar.getButtonById(o.button.id);
             var cmd = null;
             for (var i = 0; i < o.button.menu.length; i++) {
                 if (o.button.menu[i].value == o.button.value) {
@@ -3991,18 +4502,23 @@
                 this.toolbar.enableButton('backcolor');
             }
             if (this._isElement(elm, 'img')) {
-                this.toolbar.enableButton('createlink');
+                if (YAHOO.widget.Overlay) {
+                    this.toolbar.enableButton('createlink');
+                }
             }
             if (this._isElement(elm, 'blockquote')) {
                 this.toolbar.selectButton('indent');
                 this.toolbar.disableButton('indent');
                 this.toolbar.enableButton('outdent');
             }
+            //if (this._isElement(elm, 'ol') || this._isElement(elm, 'ul') || this._isElement(elm, 'li')) {
+            if (this._hasParent(elm, 'ol') || this._hasParent(elm, 'ul')) {
+                this.toolbar.disableButton('indent');
+            }
             this._lastButton = null;
             
         },
         _setBusy: function(off) {
-            /*
             if (off) {
                 Dom.removeClass(document.body, 'yui-busy');
                 Dom.removeClass(this._getDoc().body, 'yui-busy');
@@ -4010,7 +4526,6 @@
                 Dom.addClass(document.body, 'yui-busy');
                 Dom.addClass(this._getDoc().body, 'yui-busy');
             }
-            */
         },
         /**
         * @private
@@ -4018,25 +4533,17 @@
         * @description Opens the Image Properties Window when the insert Image button is clicked or an Image is Double Clicked.
         */
         _handleInsertImageClick: function() {
-            this._setBusy();
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue('insertimage')) {
+                    YAHOO.log('Toolbar Button for (insertimage) was not found, skipping exec.', 'info', 'SimpleEditor');
+                    return false;
+                }
+            }
+        
+            this.toolbar.set('disabled', true); //Disable the toolbar when the prompt is showing
             this.on('afterExecCommand', function() {
                 var el = this.currentElement[0],
-                    body = null,
-                    link = '',
-                    target = '',
-                    title = '',
-                    src = '',
-                    align = '',
-                    height = 75,
-                    width = 75,
-                    padding = 0,
-                    oheight = 0,
-                    owidth = 0,
-                    blankimage = false,
-                    win = new YAHOO.widget.EditorWindow('insertimage', {
-                        width: '415px'
-                    });
-
+                    src = 'http://';
                 if (!el) {
                     el = this._getSelectedElement();
                 }
@@ -4045,339 +4552,19 @@
                         src = el.getAttribute('src', 2);
                         if (src.indexOf(this.get('blankimage')) != -1) {
                             src = this.STR_IMAGE_HERE;
-                            blankimage = true;
                         }
                     }
-                    if (el.getAttribute('alt', 2)) {
-                        title = el.getAttribute('alt', 2);
-                    }
-                    if (el.getAttribute('title', 2)) {
-                        title = el.getAttribute('title', 2);
-                    }
-
-                    if (el.parentNode && this._isElement(el.parentNode, 'a')) {
-                        link = el.parentNode.getAttribute('href');
-                        if (el.parentNode.getAttribute('target') !== null) {
-                            target = el.parentNode.getAttribute('target');
-                        }
-                    }
-                    height = parseInt(el.height, 10);
-                    width = parseInt(el.width, 10);
-                    if (el.style.height) {
-                        height = parseInt(el.style.height, 10);
-                    }
-                    if (el.style.width) {
-                        width = parseInt(el.style.width, 10);
-                    }
-                    if (el.style.margin) {
-                        padding = parseInt(el.style.margin, 10);
-                    }
-                    if (!el._height) {
-                        el._height = height;
-                    }
-                    if (!el._width) {
-                        el._width = width;
-                    }
-                    oheight = el._height;
-                    owidth = el._width;
                 }
-                var str = '<label for="insertimage_url"><strong>' + this.STR_IMAGE_URL + ':</strong> <input type="text" id="insertimage_url" value="' + src + '" size="40"></label>';
-                body = document.createElement('div');
-                body.innerHTML = str;
-
-                var tbarCont = document.createElement('div');
-                tbarCont.id = 'img_toolbar';
-                body.appendChild(tbarCont);
-
-                var str2 = '<label for="insertimage_title"><strong>' + this.STR_IMAGE_TITLE + ':</strong> <input type="text" id="insertimage_title" value="' + title + '" size="40"></label>';
-                str2 += '<label for="insertimage_link"><strong>' + this.STR_LINK_URL + ':</strong> <input type="text" name="insertimage_link" id="insertimage_link" value="' + link + '"></label>';
-                str2 += '<label for="insertimage_target"><strong> </strong><input type="checkbox" name="insertimage_target_" id="insertimage_target" value="_blank"' + ((target) ? ' checked' : '') + '> ' + this.STR_LINK_NEW_WINDOW + '</label>';
-                var div = document.createElement('div');
-                div.innerHTML = str2;
-                body.appendChild(div);
-                win.cache = body;
-
-                var tbar = new YAHOO.widget.Toolbar(tbarCont, {
-                    /* {{{ */ 
-                    buttons: [
-                        { group: 'textflow', label: this.STR_IMAGE_TEXTFLOW + ':',
-                            buttons: [
-                                { type: 'push', label: 'Left', value: 'left' },
-                                { type: 'push', label: 'Inline', value: 'inline' },
-                                { type: 'push', label: 'Block', value: 'block' },
-                                { type: 'push', label: 'Right', value: 'right' }
-                            ]
-                        },
-                        { type: 'separator' },
-                        { group: 'padding', label: this.STR_IMAGE_PADDING + ':',
-                            buttons: [
-                                { type: 'spin', label: ''+padding, value: 'padding', range: [0, 50] }
-                            ]
-                        },
-                        { type: 'separator' },
-                        { group: 'border', label: this.STR_IMAGE_BORDER + ':',
-                            buttons: [
-                                { type: 'select', label: 'Border Size', value: 'bordersize',
-                                    menu: [
-                                        { text: 'none', value: '0', checked: true },
-                                        { text: ' ', value: '1' },
-                                        { text: ' ', value: '2' },
-                                        { text: ' ', value: '3' },
-                                        { text: ' ', value: '4' },
-                                        { text: ' ', value: '5' }
-                                    ]
-                                },
-                                { type: 'select', label: 'Border Type', value: 'bordertype', disabled: true,
-                                    menu: [
-                                        { text: ' ', value: 'solid', checked: true },
-                                        { text: ' ', value: 'dashed' },
-                                        { text: ' ', value: 'dotted' }
-                                    ]
-                                },
-                                { type: 'color', label: 'Border Color', value: 'bordercolor', disabled: true }
-                            ]
-                        }
-                    ]
-                    /* }}} */
-                });
-                
-                var bsize = '0';
-                var btype = 'solid';
-                if (el.style.borderLeftWidth) {
-                    bsize = parseInt(el.style.borderLeftWidth, 10);
+                var str = prompt(this.STR_LINK_URL + ': ', src);
+                if ((str !== '') && (str !== null)) {
+                    el.setAttribute('src', str);
+                } else if (str !== null) {
+                    el.parentNode.removeChild(el);
+                    this.currentElement = [];
                 }
-                if (el.style.borderLeftStyle) {
-                    btype = el.style.borderLeftStyle;
-                }
-                var bs_button = tbar.getButtonByValue('bordersize');
-                var bSizeStr = ((parseInt(bsize, 10) > 0) ? '' : 'none');
-                bs_button.set('label', '<span class="yui-toolbar-bordersize-' + bsize + '">'+bSizeStr+'</span>');
-                this._updateMenuChecked('bordersize', bsize, tbar);
-
-                var bt_button = tbar.getButtonByValue('bordertype');
-                bt_button.set('label', '<span class="yui-toolbar-bordertype-' + btype + '"></span>');
-                this._updateMenuChecked('bordertype', btype, tbar);
-                if (parseInt(bsize, 10) > 0) {
-                    tbar.enableButton(bt_button);
-                    tbar.enableButton(bs_button);
-                }
-
-                var cont = tbar.get('cont');
-                var hw = document.createElement('div');
-                hw.className = 'yui-toolbar-group yui-toolbar-group-height-width height-width';
-                hw.innerHTML = '<h3>' + this.STR_IMAGE_SIZE + ':</h3>';
-                var orgSize = '';
-                if ((height != oheight) || (width != owidth)) {
-                    orgSize = '<span class="info">' + this.STR_IMAGE_ORIG_SIZE + '<br>'+ owidth +' x ' + oheight + '</span>';
-                }
-                hw.innerHTML += '<span><input type="text" size="3" value="'+width+'" id="insertimage_width"> x <input type="text" size="3" value="'+height+'" id="insertimage_height"></span>' + orgSize;
-                cont.insertBefore(hw, cont.firstChild);
-
-                Event.onAvailable('insertimage_width', function() {
-                    Event.on('insertimage_width', 'blur', function() {
-                        var value = parseInt(Dom.get('insertimage_width').value, 10);
-                        if (value > 5) {
-                            el.style.width = value + 'px';
-                            this.moveWindow();
-                        }
-                    }, this, true);
-                }, this, true);
-                Event.onAvailable('insertimage_height', function() {
-                    Event.on('insertimage_height', 'blur', function() {
-                        var value = parseInt(Dom.get('insertimage_height').value, 10);
-                        if (value > 5) {
-                            el.style.height = value + 'px';
-                            this.moveWindow();
-                        }
-                    }, this, true);
-                }, this, true);
-
-                if ((el.align == 'right') || (el.align == 'left')) {
-                    tbar.selectButton(el.align);
-                } else if (el.style.display == 'block') {
-                    tbar.selectButton('block');
-                } else {
-                    tbar.selectButton('inline');
-                }
-                if (parseInt(el.style.marginLeft, 10) > 0) {
-                     tbar.getButtonByValue('padding').set('label', ''+parseInt(el.style.marginLeft, 10));
-                }
-                if (el.style.borderSize) {
-                    tbar.selectButton('bordersize');
-                    tbar.selectButton(parseInt(el.style.borderSize, 10));
-                }
-
-                tbar.on('colorPickerClicked', function(o) {
-                    var size = '1', type = 'solid', color = 'black';
-
-                    if (el.style.borderLeftWidth) {
-                        size = parseInt(el.style.borderLeftWidth, 10);
-                    }
-                    if (el.style.borderLeftStyle) {
-                        type = el.style.borderLeftStyle;
-                    }
-                    if (el.style.borderLeftColor) {
-                        color = el.style.borderLeftColor;
-                    }
-                    var borderString = size + 'px ' + type + ' #' + o.color;
-                    el.style.border = borderString;
-                }, this.toolbar, true);
-
-                tbar.on('buttonClick', function(o) {
-                    var value = o.button.value,
-                        borderString = '';
-                    if (o.button.menucmd) {
-                        value = o.button.menucmd;
-                    }
-                    var size = '1', type = 'solid', color = 'black';
-
-                    /* All border calcs are done on the left border
-                        since our default interface only supports
-                        one border size/type and color */
-                    if (el.style.borderLeftWidth) {
-                        size = parseInt(el.style.borderLeftWidth, 10);
-                    }
-                    if (el.style.borderLeftStyle) {
-                        type = el.style.borderLeftStyle;
-                    }
-                    if (el.style.borderLeftColor) {
-                        color = el.style.borderLeftColor;
-                    }
-                    switch(value) {
-                        case 'bordersize':
-                            if (this.browser.webkit && this._lastImage) {
-                                Dom.removeClass(this._lastImage, 'selected');
-                                this._lastImage = null;
-                            }
-
-                            borderString = parseInt(o.button.value, 10) + 'px ' + type + ' ' + color;
-                            el.style.border = borderString;
-                            if (parseInt(o.button.value, 10) > 0) {
-                                tbar.enableButton('bordertype');
-                                tbar.enableButton('bordercolor');
-                            } else {
-                                tbar.disableButton('bordertype');
-                                tbar.disableButton('bordercolor');
-                            }
-                            break;
-                        case 'bordertype':
-                            if (this.browser.webkit && this._lastImage) {
-                                Dom.removeClass(this._lastImage, 'selected');
-                                this._lastImage = null;
-                            }
-                            borderString = size + 'px ' + o.button.value + ' ' + color;
-                            el.style.border = borderString;
-                            break;
-                        case 'right':
-                        case 'left':
-                            tbar.deselectAllButtons();
-                            el.style.display = '';
-                            el.align = o.button.value;
-                            break;
-                        case 'inline':
-                            tbar.deselectAllButtons();
-                            el.style.display = '';
-                            el.align = '';
-                            break;
-                        case 'block':
-                            tbar.deselectAllButtons();
-                            el.style.display = 'block';
-                            el.align = 'center';
-                            break;
-                        case 'padding':
-                            var _button = tbar.getButtonById(o.button.id);
-                            el.style.margin = _button.get('label') + 'px';
-                            break;
-                    }
-                    tbar.selectButton(o.button.value);
-                    this.moveWindow();
-                }, this, true);
-
-                win.setHeader(this.STR_IMAGE_PROP_TITLE);
-                win.setBody(body);
-                if ((this.browser.webkit && !this.browser.webkit3) || this.browser.opera) {
-                    win.setFooter(this.STR_IMAGE_COPY);
-                }
-                this.openWindow(win);
-
-                //Set event after openWindow..
-                Event.onAvailable('insertimage_url', function() {
-
-                    this.toolbar.selectButton('insertimage');
-
-                    window.setTimeout(function() {
-                        YAHOO.util.Dom.get('insertimage_url').focus();
-                        if (blankimage) {
-                            YAHOO.util.Dom.get('insertimage_url').select();
-                        }
-                    }, 50);
-                    
-                    if (this.get('localFileWarning')) {
-                        Event.on('insertimage_link', 'blur', function() {
-                            var url = Dom.get('insertimage_link');
-                            if (this._isLocalFile(url.value)) {
-                                //Local File throw Warning
-                                Dom.addClass(url, 'warning');
-                                YAHOO.log('Local file reference found, show local warning', 'warn', 'Editor');
-                                this.get('panel').setFooter(this.STR_LOCAL_FILE_WARNING);
-                            } else {
-                                Dom.removeClass(url, 'warning');
-                                this.get('panel').setFooter(' ');
-                                if ((this.browser.webkit && !this.browser.webkit3) || this.browser.opera) {
-                                    this.get('panel').setFooter(this.STR_IMAGE_COPY);
-                                }
-                            }
-                        }, this, true);
-
-                        Event.on('insertimage_url', 'blur', function() {
-                            var url = Dom.get('insertimage_url');
-                            if (this._isLocalFile(url.value)) {
-                                //Local File throw Warning
-                                Dom.addClass(url, 'warning');
-                                YAHOO.log('Local file reference found, show local warning', 'warn', 'Editor');
-                                this.get('panel').setFooter(this.STR_LOCAL_FILE_WARNING);
-                            } else {
-                                Dom.removeClass(url, 'warning');
-                                this.get('panel').setFooter(' ');
-                                if ((this.browser.webkit && !this.browser.webkit3) || this.browser.opera) {
-                                    this.get('panel').setFooter(this.STR_IMAGE_COPY);
-                                }
-                                
-                                if (url && url.value && (url.value != this.STR_IMAGE_HERE)) {
-                                    this.currentElement[0].setAttribute('src', url.value);
-                                    var self = this,
-                                        img = new Image();
-
-                                    img.onerror = function() {
-                                        url.value = self.STR_IMAGE_HERE;
-                                        img.setAttribute('src', self.get('blankimage'));
-                                        self.currentElement[0].setAttribute('src', self.get('blankimage'));
-                                        YAHOO.util.Dom.get('insertimage_height').value = img.height;
-                                        YAHOO.util.Dom.get('insertimage_width').value = img.width;
-                                    };
-                                    window.setTimeout(function() {
-                                        YAHOO.util.Dom.get('insertimage_height').value = img.height;
-                                        YAHOO.util.Dom.get('insertimage_width').value = img.width;
-                                        if (self.currentElement && self.currentElement[0]) {
-                                            if (!self.currentElement[0]._height) {
-                                                self.currentElement[0]._height = img.height;
-                                            }
-                                            if (!self.currentElement[0]._width) {
-                                                self.currentElement[0]._width = img.width;
-                                            }
-                                        }
-                                        self.moveWindow();
-                                    }, 200);
-
-                                    if (url.value != this.STR_IMAGE_HERE) {
-                                        img.src = url.value;
-                                    }
-                                }
-                            }
-                        }, this, true);
-                    }
-                }, this, true);
-            });
+                this.closeWindow();
+                this.toolbar.set('disabled', false);
+            }, this, true);
         },
         /**
         * @private
@@ -4385,55 +4572,6 @@
         * @description Handles the closing of the Image Properties Window.
         */
         _handleInsertImageWindowClose: function() {
-            var url = Dom.get('insertimage_url');
-            var title = Dom.get('insertimage_title');
-            var link = Dom.get('insertimage_link');
-            var target = Dom.get('insertimage_target');
-            var el = this.currentElement[0];
-            if (url && url.value && (url.value != this.STR_IMAGE_HERE)) {
-                el.setAttribute('src', url.value);
-                el.setAttribute('title', title.value);
-                el.setAttribute('alt', title.value);
-                var par = el.parentNode;
-                if (link.value) {
-                    var urlValue = link.value;
-                    if ((urlValue.indexOf(':/'+'/') == -1) && (urlValue.substring(0,1) != '/') && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
-                        if ((urlValue.indexOf('@') != -1) && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
-                            //Found an @ sign, prefix with mailto:
-                            urlValue = 'mailto:' + urlValue;
-                        } else {
-                            /* :// not found adding */
-                            urlValue = 'http:/'+'/' + urlValue;
-                        }
-                    }
-                    if (par && this._isElement(par, 'a')) {
-                        par.setAttribute('href', urlValue);
-                        if (target.checked) {
-                            par.setAttribute('target', target.value);
-                        } else {
-                            par.setAttribute('target', '');
-                        }
-                    } else {
-                        var _a = this._getDoc().createElement('a');
-                        _a.setAttribute('href', urlValue);
-                        if (target.checked) {
-                            _a.setAttribute('target', target.value);
-                        } else {
-                            _a.setAttribute('target', '');
-                        }
-                        el.parentNode.replaceChild(_a, el);
-                        _a.appendChild(el);
-                    }
-                } else {
-                    if (par && this._isElement(par, 'a')) {
-                        par.parentNode.replaceChild(el, par);
-                    }
-                }
-            } else {
-                //No url/src given, remove the node from the document
-                el.parentNode.removeChild(el);
-            }
-            this.currentElement = [];
             this.nodeChange();
         },
         /**
@@ -4454,89 +4592,46 @@
         * @description Handles the opening of the Link Properties Window when the Create Link button is clicked or an href is doubleclicked.
         */
         _handleCreateLinkClick: function() {
-            var el = this._getSelectedElement();
-            if (this._isElement(el, 'img')) {
-                this.STOP_EXEC_COMMAND = true;
-                this.currentElement[0] = el;
-                this.toolbar.fireEvent('insertimageClick', { type: 'insertimageClick', target: this.toolbar });
-                this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
-                return false;
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue('createlink')) {
+                    YAHOO.log('Toolbar Button for (createlink) was not found, skipping exec.', 'info', 'SimpleEditor');
+                    return false;
+                }
             }
+        
+            this.toolbar.set('disabled', true); //Disable the toolbar when the prompt is showing
             this.on('afterExecCommand', function() {
+                var el = this.currentElement[0],
+                    url = '';
 
-                var win = new YAHOO.widget.EditorWindow('createlink', {
-                    width: '350px'
-                });
-                
-                var el = this.currentElement[0],
-                    url = '',
-                    title = '',
-                    target = '',
-                    localFile = false;
                 if (el) {
-                    if (el.getAttribute('href') !== null) {
-                        url = el.getAttribute('href');
-                        if (this._isLocalFile(url)) {
-                            //Local File throw Warning
-                            YAHOO.log('Local file reference found, show local warning', 'warn', 'Editor');
-                            win.setFooter(this.STR_LOCAL_FILE_WARNING);
-                            localFile = true;
+                    if (el.getAttribute('href', 2) !== null) {
+                        url = el.getAttribute('href', 2);
+                    }
+                }
+                var str = prompt(this.STR_LINK_URL + ': ', url);
+                if ((str !== '') && (str !== null)) {
+                    var urlValue = str;
+                    if ((urlValue.indexOf(':/'+'/') == -1) && (urlValue.substring(0,1) != '/') && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                        if ((urlValue.indexOf('@') != -1) && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                            //Found an @ sign, prefix with mailto:
+                            urlValue = 'mailto:' + urlValue;
                         } else {
-                            win.setFooter(' ');
+                            /* :// not found adding */
+                            if (urlValue.substring(0, 1) != '#') {
+                                urlValue = 'http:/'+'/' + urlValue;
+                            }
                         }
                     }
-                    if (el.getAttribute('title') !== null) {
-                        title = el.getAttribute('title');
-                    }
-                    if (el.getAttribute('target') !== null) {
-                        target = el.getAttribute('target');
-                    }
+                    el.setAttribute('href', urlValue);
+                } else if (str !== null) {
+                    var _span = this._getDoc().createElement('span');
+                    _span.innerHTML = el.innerHTML;
+                    Dom.addClass(_span, 'yui-non');
+                    el.parentNode.replaceChild(_span, el);
                 }
-                var str = '<label for="createlink_url"><strong>' + this.STR_LINK_URL + ':</strong> <input type="text" name="createlink_url" id="createlink_url" value="' + url + '"' + ((localFile) ? ' class="warning"' : '') + '></label>';
-                str += '<label for="createlink_target"><strong> </strong><input type="checkbox" name="createlink_target_" id="createlink_target" value="_blank"' + ((target) ? ' checked' : '') + '> ' + this.STR_LINK_NEW_WINDOW + '</label>';
-                str += '<label for="createlink_title"><strong>' + this.STR_LINK_TITLE + ':</strong> <input type="text" name="createlink_title" id="createlink_title" value="' + title + '"></label>';
-                
-                var body = document.createElement('div');
-                body.innerHTML = str;
-
-                var unlinkCont = document.createElement('div');
-                unlinkCont.className = 'removeLink';
-                var unlink = document.createElement('a');
-                unlink.href = '#';
-                unlink.innerHTML = this.STR_LINK_PROP_REMOVE;
-                unlink.title = this.STR_LINK_PROP_REMOVE;
-                Event.on(unlink, 'click', function(ev) {
-                    Event.stopEvent(ev);
-                    this.execCommand('unlink');
-                    this.closeWindow();
-                }, this, true);
-                unlinkCont.appendChild(unlink);
-                body.appendChild(unlinkCont);
-
-                win.setHeader(this.STR_LINK_PROP_TITLE);
-                win.setBody(body);
-
-                Event.onAvailable('createlink_url', function() {
-                    window.setTimeout(function() {
-                        try {
-                            YAHOO.util.Dom.get('createlink_url').focus();
-                        } catch (e) {}
-                    }, 50);
-                    Event.on('createlink_url', 'blur', function() {
-                        var url = Dom.get('createlink_url');
-                        if (this._isLocalFile(url.value)) {
-                            //Local File throw Warning
-                            Dom.addClass(url, 'warning');
-                            YAHOO.log('Local file reference found, show local warning', 'warn', 'Editor');
-                            this.get('panel').setFooter(this.STR_LOCAL_FILE_WARNING);
-                        } else {
-                            Dom.removeClass(url, 'warning');
-                            this.get('panel').setFooter(' ');
-                        }
-                    }, this, true);
-                }, this, true);
-
-                this.openWindow(win);
+                this.closeWindow();
+                this.toolbar.set('disabled', false);
             });
         },
         /**
@@ -4545,36 +4640,6 @@
         * @description Handles the closing of the Link Properties Window.
         */
         _handleCreateLinkWindowClose: function() {
-            var url = Dom.get('createlink_url'),
-                target = Dom.get('createlink_target'),
-                title = Dom.get('createlink_title'),
-                el = this.currentElement[0],
-                a = el;
-            if (url && url.value) {
-                var urlValue = url.value;
-                if ((urlValue.indexOf(':/'+'/') == -1) && (urlValue.substring(0,1) != '/') && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
-                    if ((urlValue.indexOf('@') != -1) && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
-                        //Found an @ sign, prefix with mailto:
-                        urlValue = 'mailto:' + urlValue;
-                    } else {
-                        /* :// not found adding */
-                        urlValue = 'http:/'+'/' + urlValue;
-                    }
-                }
-                el.setAttribute('href', urlValue);
-                if (target.checked) {
-                    el.setAttribute('target', target.value);
-                } else {
-                    el.setAttribute('target', '');
-                }
-                el.setAttribute('title', ((title.value) ? title.value : ''));
-
-            } else {
-                var _span = this._getDoc().createElement('span');
-                _span.innerHTML = el.innerHTML;
-                Dom.addClass(_span, 'yui-non');
-                el.parentNode.replaceChild(_span, el);
-            }
             this.nodeChange();
             this.currentElement = [];
         },
@@ -4586,7 +4651,7 @@
             if (this._rendered) {
                 return false;
             }
-            YAHOO.log('Render', 'info', 'Editor');
+            YAHOO.log('Render', 'info', 'SimpleEditor');
             if (!this.DOMReady) {
                 this._queue[this._queue.length] = ['render', arguments];
                 return false;
@@ -4606,16 +4671,24 @@
             }, 10);
 
             this.get('editor_wrapper').appendChild(this.get('iframe').get('element'));
-            Dom.addClass(this.get('iframe').get('parentNode'), this.CLASS_EDITABLE_CONT);
-            this.get('iframe').addClass(this.CLASS_EDITABLE);
 
+            if (this.get('disabled')) {
+                this._disableEditor(true);
+            }
 
             var tbarConf = this.get('toolbar');
-            //Set the toolbar to disabled until content is loaded
-            tbarConf.disabled = true;
             //Create Toolbar instance
-            this.toolbar = new Toolbar(this.get('toolbar_cont'), tbarConf);
-            YAHOO.log('fireEvent::toolbarLoaded', 'info', 'Editor');
+            if (tbarConf instanceof Toolbar) {
+                this.toolbar = tbarConf;
+                //Set the toolbar to disabled until content is loaded
+                this.toolbar.set('disabled', true);
+            } else {
+                //Set the toolbar to disabled until content is loaded
+                tbarConf.disabled = true;
+                this.toolbar = new Toolbar(this.get('toolbar_cont'), tbarConf);
+            }
+
+            YAHOO.log('fireEvent::toolbarLoaded', 'info', 'SimpleEditor');
             this.fireEvent('toolbarLoaded', { type: 'toolbarLoaded', target: this.toolbar });
 
             
@@ -4655,13 +4728,13 @@
             this.on('windowcreatelinkClose', function() {
                 this._handleCreateLinkWindowClose();
             }, this, true);
+            
 
-
             //Replace Textarea with editable area
             
             this.get('parentNode').replaceChild(this.get('element_cont').get('element'), this.get('element'));
 
-
+            
             if (!this.beforeElement) {
                 this.beforeElement = document.createElement('h2');
                 this.beforeElement.className = 'yui-editor-skipheader';
@@ -4669,6 +4742,7 @@
                 this.beforeElement.innerHTML = this.STR_BEFORE_EDITOR;
                 this.get('element_cont').get('firstChild').insertBefore(this.beforeElement, this.toolbar.get('nextSibling'));
             }
+
             this.setStyle('visibility', 'hidden');
             this.setStyle('position', 'absolute');
             this.setStyle('top', '-9999px');
@@ -4677,14 +4751,19 @@
             this.get('element_cont').setStyle('display', 'block');
 
 
+            Dom.addClass(this.get('iframe').get('parentNode'), this.CLASS_EDITABLE_CONT);
+            this.get('iframe').addClass(this.CLASS_EDITABLE);
+
             //Set height and width of editor container
             this.get('element_cont').setStyle('width', this.get('width'));
             Dom.setStyle(this.get('iframe').get('parentNode'), 'height', this.get('height'));
 
             this.get('iframe').setStyle('width', '100%'); //WIDTH
-            //this.get('iframe').setStyle('_width', '99%'); //WIDTH
             this.get('iframe').setStyle('height', '100%');
 
+            if (this.browser.ie == 7) {
+            }
+
             this.fireEvent('afterRender', { type: 'afterRender', target: this });
         },
         /**
@@ -4703,420 +4782,377 @@
             if (this.browser.ie) {
                 this._getWindow().focus();
             }
+            var exec = true;
+            
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue(action)) {
+                    YAHOO.log('Toolbar Button for (' + action + ') was not found, skipping exec.', 'info', 'SimpleEditor');
+                    exec = false;
+                }
+            }
+
+            this.editorDirty = true;
+            
+            if ((typeof this['cmd_' + action.toLowerCase()] == 'function') && exec) {
+                YAHOO.log('Found execCommand override method: (cmd_' + action.toLowerCase() + ')', 'info', 'SimpleEditor');
+                var retValue = this['cmd_' + action.toLowerCase()](value);
+                exec = retValue[0];
+                if (retValue[1]) {
+                    action = retValue[1];
+                }
+                if (retValue[2]) {
+                    value = retValue[2];
+                }
+            }
+            if (exec) {
+                YAHOO.log('execCommand::(' + action + '), (' + value + ')', 'info', 'SimpleEditor');
+                try {
+                    this._getDoc().execCommand(action, false, value);
+                } catch(e) {
+                    YAHOO.log('execCommand Failed', 'error', 'SimpleEditor');
+                }
+            } else {
+                YAHOO.log('OVERRIDE::execCommand::(' + action + '),(' + value + ') skipped', 'warn', 'SimpleEditor');
+            }
+            this.on('afterExecCommand', function() {
+                this.unsubscribeAll('afterExecCommand');
+                this.nodeChange();
+            });
+            this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
+            
+        },
+    /* {{{  Command Overrides */
+
+        /**
+        * @method cmd_backcolor
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('backcolor') is used.
+        */
+        cmd_backcolor: function(value) {
             var exec = true,
-                selEl = null,
-                el = null,
-                tag = '',
-                str = '',
-                _span = null,
-                _sel = this._getSelection(),
-                _range = this._getRange(),
-                _selEl = this._getSelectedElement();
+                el = this._getSelectedElement(),
+                action = 'backcolor';
 
-            if (_selEl) {
-                _sel = _selEl;
+            if (this.browser.gecko || this.browser.opera) {
+                this._setEditorStyle(true);
+                action = 'hilitecolor';
             }
-            switch (action.toLowerCase()) {
-                case 'heading':
-                    if (this.browser.ie) {
-                        action = 'formatblock';
-                    }
-                    var h = 0;
-                    if (value == 'none') {
-                        if ((_sel && _sel.tagName && (_sel.tagName.toLowerCase().substring(0,1) == 'h')) || (_sel && _sel.parentNode && _sel.parentNode.tagName && (_sel.parentNode.tagName.toLowerCase().substring(0,1) == 'h'))) {
-                            if (_sel.parentNode.tagName.toLowerCase().substring(0,1) == 'h') {
-                                if (!this._isElement(_sel.parentNode, 'html')) {
-                                    _sel = _sel.parentNode;
-                                }
-                            }
-                            if (this._isElement(_sel, 'body')) {
-                                YAHOO.log('Could not find header element', 'error', 'Editor');
-                                return false;
-                            }
-                            for (h = 0; h < this.currentElement.length; h++) {
-                                if (this._isElement(this.currentElement[h], 'h1') || this._isElement(this.currentElement[h], 'h2') || this._isElement(this.currentElement[h], 'h3') || this._isElement(this.currentElement[h], 'h4') || this._isElement(this.currentElement[h], 'h5') || this._isElement(this.currentElement[h], 'h6')) {
-                                    el = this._swapEl(this.currentElement[h], 'span', function(el) {
-                                        el.className = 'yui-non';
-                                        el.innerHTML = el.innerHTML.replace(new RegExp('<span class="yui-non">(.*?)<\/span>', 'gi'), '$1');
-                                    });
-                                    this.currentElement[h] = el;
-                                }
-                                if (this.currentElement[h].nextSibling && !this._isElement(this.currentElement[h].nextSibling, 'br')) {
-                                    var _br = this._getDoc().createElement('br');
-                                    this.currentElement[h].parentNode.insertBefore(_br, this.currentElement[h].nextSibling);
-                                }
-                            }
-                        }
-                        exec = false;
-                    } else {
-                        if (this._isElement(_selEl, 'h1') || this._isElement(_selEl, 'h2') || this._isElement(_selEl, 'h3') || this._isElement(_selEl, 'h4') || this._isElement(_selEl, 'h5') || this._isElement(_selEl, 'h6')) {
-                            el = this._swapEl(_selEl, value);
-                            this._selectNode(el);
-                            this.currentElement[0] = el;
-                        } else {
-                            this._createCurrentElement(value);
-                            this._selectNode(this.currentElement[0]);
-                            //If the next sibling is a br, remove it
-                            for (h = 0; h < this.currentElement.length; h++) {
-                                if (this.currentElement[h].nextSibling && this._isElement(this.currentElement[h].nextSibling, 'br')) {
-                                    this.currentElement[h].nextSibling.parentNode.removeChild(this.currentElement[h].nextSibling);
-                                }
-                            }
-                        }
-                        exec = false;
-                    }
-                    break;
-                case 'backcolor':
-                    if (this.browser.gecko || this.browser.opera) {
-                        this._setEditorStyle(true);
-                        action = 'hilitecolor';
-                    }
-                    /**
-                    * @browser opera
-                    * @knownissue - Opera fails to assign a background color on an element that already has one.
-                    */
-                    el = this._getSelectedElement();
-                    if (this.browser.opera) {
-                        if (!this._isElement(el, 'body') && Dom.getStyle(el, 'background-color')) {
-                            Dom.setStyle(el, 'background-color', value);
-                        } else {
-                            this._createCurrentElement('span', { backgroundColor: value });
-                        }
-                        exec = false;
-                    } else if (!this._hasSelection()) {
-                        if (el !== this._getDoc().body) {
-                            Dom.setStyle(el, 'background-color', value);
-                            exec = false;
-                        }
-                    }
-                    break;
-                case 'forecolor':
-                    el = this._getSelectedElement();
-                    if ((el !== this._getDoc().body) && (!this._hasSelection())) {
-                        Dom.setStyle(el, 'color', value);
-                        exec = false;
-                    }
-                    break;
-                case 'hiddenelements':
-                    this._showHidden();
+            /**
+            * @browser opera
+            * @knownissue - Opera fails to assign a background color on an element that already has one.
+            *
+            if (this.browser.opera) {
+                if (!this._isElement(el, 'body') && Dom.getStyle(el, 'background-color')) {
+                    Dom.setStyle(el, 'background-color', value);
+                } else {
+                    this._createCurrentElement('span', { backgroundColor: value });
+                }
+                exec = false;
+            //} else if (!this._hasSelection()) {
+            } else if (el !== this._getDoc().body) {
+                Dom.setStyle(el, 'background-color', value);
+                this._selectNode(el);
+                exec = false;
+            } else {
+                this._createCurrentElement('span', { backgroundColor: value });
+                this._selectNode(this.currentElement[0]);
+                exec = false;
+            }*/
+
+            if (!this._isElement(el, 'body')) {
+                Dom.setStyle(el, 'background-color', value);
+                this._selectNode(el);
+                exec = false;
+            } else {
+                this._createCurrentElement('span', { backgroundColor: value });
+                this._selectNode(this.currentElement[0]);
+                exec = false;
+            }
+
+            return [exec, action];
+        },
+        /**
+        * @method cmd_forecolor
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('forecolor') is used.
+        */
+        cmd_forecolor: function(value) {
+            var exec = true,
+                el = this._getSelectedElement();
+
+                if (!this._isElement(el, 'body')) {
+                    Dom.setStyle(el, 'color', value);
+                    this._selectNode(el);
                     exec = false;
-                    break;
-                case 'unlink':
-                    el = this._swapEl(this.currentElement[0], 'span', function(el) {
-                        el.className = 'yui-non';
-                    });
+                } else {
+                    this._createCurrentElement('span', { color: value });
+                    this._selectNode(this.currentElement[0]);
                     exec = false;
-                    break;
-                case 'createlink':
-                    el = this._getSelectedElement();
-                    var _a = null;
-                    if (!this._isElement(el, 'a')) {
-                        this._createCurrentElement('a');
-                        _a = this._swapEl(this.currentElement[0], 'a');
-                        this.currentElement[0] = _a;
-                    } else {
-                        this.currentElement[0] = el;
+                }
+                return [exec];
+        },
+        /**
+        * @method cmd_unlink
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('unlink') is used.
+        */
+        cmd_unlink: function(value) {
+            this._swapEl(this.currentElement[0], 'span', function(el) {
+                el.className = 'yui-non';
+            });
+            return [false];
+        },
+        /**
+        * @method cmd_createlink
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('createlink') is used.
+        */
+        cmd_createlink: function(value) {
+            var el = this._getSelectedElement(), _a = null;
+            if (this._hasParent(el, 'a')) {
+                this.currentElement[0] = this._hasParent(el, 'a');
+            } else if (!this._isElement(el, 'a')) {
+                this._createCurrentElement('a');
+                _a = this._swapEl(this.currentElement[0], 'a');
+                this.currentElement[0] = _a;
+            } else {
+                this.currentElement[0] = el;
+            }
+            return [false];
+        },
+        /**
+        * @method cmd_insertimage
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('insertimage') is used.
+        */
+        cmd_insertimage: function(value) {
+            var exec = true, _img = null, action = 'insertimage',
+                el = this._getSelectedElement();
+
+            if (value === '') {
+                value = this.get('blankimage');
+            }
+
+            /**
+            * @knownissue
+            * @browser Safari 2.x
+            * @description The issue here is that we have no way of knowing where the cursor position is
+            * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
+            */
+            
+            YAHOO.log('InsertImage: ' + el.tagName, 'info', 'SimpleEditor');
+            if (this._isElement(el, 'img')) {
+                this.currentElement[0] = el;
+                exec = false;
+            } else {
+                if (this._getDoc().queryCommandEnabled(action)) {
+                    this._getDoc().execCommand('insertimage', false, value);
+                    var imgs = this._getDoc().getElementsByTagName('img');
+                    for (var i = 0; i < imgs.length; i++) {
+                        if (!YAHOO.util.Dom.hasClass(imgs[i], 'yui-img')) {
+                            YAHOO.util.Dom.addClass(imgs[i], 'yui-img');
+                            this.currentElement[0] = imgs[i];
+                        }
                     }
                     exec = false;
-                    break;
-                case 'insertimage':
-                    if (value === '') {
-                        value = this.get('blankimage');
-                    }
-                    /**
-                    * @knownissue
-                    * @browser Safari 2.x
-                    * @description The issue here is that we have no way of knowing where the cursor position is
-                    * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
-                    */
-                    
-                    el = this._getSelectedElement();
-                    YAHOO.log('InsertImage: ' + el.tagName, 'info', 'Editor');
-                    if (this._isElement(el, 'img')) {
-                        this.currentElement[0] = el;
-                        exec = false;
+                } else {
+                    if (el == this._getDoc().body) {
+                        _img = this._getDoc().createElement('img');
+                        _img.setAttribute('src', value);
+                        YAHOO.util.Dom.addClass(_img, 'yui-img');
+                        this._getDoc().body.appendChild(_img);
                     } else {
-                        if (this._getDoc().queryCommandEnabled(action)) {
-                            this._getDoc().execCommand('insertimage', false, value);
-                            var imgs = this._getDoc().getElementsByTagName('img');
-                            for (var i = 0; i < imgs.length; i++) {
-                                if (!YAHOO.util.Dom.hasClass(imgs[i], 'yui-img')) {
-                                    YAHOO.util.Dom.addClass(imgs[i], 'yui-img');
-                                    this.currentElement[0] = imgs[i];
-                                }
-                            }
-                            exec = false;
-                        } else {
-                            var _img = null;
-                            if (el == this._getDoc().body) {
-                                _img = this._getDoc().createElement('img');
-                                _img.setAttribute('src', value);
-                                YAHOO.util.Dom.addClass(_img, 'yui-img');
-                                this._getDoc().body.appendChild(_img);
-                            } else {
-                                this._createCurrentElement('img');
-                                _img = this._getDoc().createElement('img');
-                                _img.setAttribute('src', value);
-                                YAHOO.util.Dom.addClass(_img, 'yui-img');
-                                this.currentElement[0].parentNode.replaceChild(_img, this.currentElement[0]);
-                            }
-                            this.currentElement[0] = _img;
-                            exec = false;
-                        }
-                    }
-                    
-                    break;
-                case 'inserthtml':
-                    /**
-                    * @knownissue
-                    * @browser Safari 2.x
-                    * @description The issue here is that we have no way of knowing where the cursor position is
-                    * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
-                    */
-                    if (this.browser.webkit && !this._getDoc().queryCommandEnabled(action)) {
-                        YAHOO.log('More Safari DOM tricks (inserthtml)', 'info', 'EditorSafari');
                         this._createCurrentElement('img');
-                        _span = this._getDoc().createElement('span');
-                        _span.innerHTML = value;
-                        this.currentElement[0].parentNode.replaceChild(_span, this.currentElement[0]);
-                        exec = false;
-                    } else if (this.browser.ie) {
-                        _range = this._getRange();
-                        if (_range.item) {
-                            _range.item(0).outerHTML = value;
-                        } else {
-                            _range.pasteHTML(value);
-                        }
-                        exec = false;                    
+                        _img = this._getDoc().createElement('img');
+                        _img.setAttribute('src', value);
+                        YAHOO.util.Dom.addClass(_img, 'yui-img');
+                        this.currentElement[0].parentNode.replaceChild(_img, this.currentElement[0]);
                     }
-                    break;
-                case 'removeformat':
-                    /**
-                    * @knownissue Remove Format issue
-                    * @browser Safari 2.x
-                    * @description There is an issue here with Safari, that it may not always remove the format of the item that is selected.
-                    * Due to the way that Safari 2.x handles ranges, it is very difficult to determine what the selection holds.
-                    * So here we are making the best possible guess and acting on it.
-                    */
-                    if (this.browser.webkit && !this._getDoc().queryCommandEnabled(action)) {
-                        this._createCurrentElement('span');
-                        YAHOO.util.Dom.addClass(this.currentElement[0], 'yui-non');
-                        var re= /<\S[^><]*>/g;
-                        str = this.currentElement[0].innerHTML.replace(re, '');
-                        var _txt = this._getDoc().createTextNode(str);
-                        this.currentElement[0].parentNode.parentNode.replaceChild(_txt, this.currentElement[0].parentNode);
-                        
-                        exec = false;
+                    this.currentElement[0] = _img;
+                    exec = false;
+                }
+            }
+            return [exec];
+        },
+        /**
+        * @method cmd_inserthtml
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('inserthtml') is used.
+        */
+        cmd_inserthtml: function(value) {
+            var exec = true, action = 'inserthtml', _span = null, _range = null;
+            /**
+            * @knownissue
+            * @browser Safari 2.x
+            * @description The issue here is that we have no way of knowing where the cursor position is
+            * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
+            */
+            if (this.browser.webkit && !this._getDoc().queryCommandEnabled(action)) {
+                YAHOO.log('More Safari DOM tricks (inserthtml)', 'info', 'EditorSafari');
+                this._createCurrentElement('img');
+                _span = this._getDoc().createElement('span');
+                _span.innerHTML = value;
+                this.currentElement[0].parentNode.replaceChild(_span, this.currentElement[0]);
+                exec = false;
+            } else if (this.browser.ie) {
+                _range = this._getRange();
+                if (_range.item) {
+                    _range.item(0).outerHTML = value;
+                } else {
+                    _range.pasteHTML(value);
+                }
+                exec = false;                    
+            }
+            return [exec];
+        },
+        /**
+        * @method cmd_list
+        * @param tag The tag of the list you want to create (eg, ul or ol)
+        * @description This is a combined execCommand override method. It is called from the cmd_insertorderedlist and cmd_insertunorderedlist methods.
+        */
+        cmd_list: function(tag) {
+            var exec = true, list = null, li = 0, el = null, str = '',
+                selEl = this._getSelectedElement(), action = 'insertorderedlist';
+                if (tag == 'ul') {
+                    action = 'insertunorderedlist';
+                }
+            /**
+            * @knownissue Safari 2.+ doesn't support ordered and unordered lists
+            * @browser Safari 2.x
+            * The issue with this workaround is that when applied to a set of text
+            * that has BR's in it, Safari may or may not pick up the individual items as
+            * list items. This is fixed in WebKit (Safari 3)
+            */
+            if ((this.browser.webkit && !this._getDoc().queryCommandEnabled(action))) {
+                if (this._isElement(selEl, 'li') && this._isElement(selEl.parentNode, tag)) {
+                    YAHOO.log('We already have a list, undo it', 'info', 'SimpleEditor');
+                    el = selEl.parentNode;
+                    list = this._getDoc().createElement('span');
+                    YAHOO.util.Dom.addClass(list, 'yui-non');
+                    str = '';
+                    var lis = el.getElementsByTagName('li');
+                    for (li = 0; li < lis.length; li++) {
+                        str += '<div>' + lis[li].innerHTML + '</div>';
                     }
-                    break;
-                case 'superscript':
-                case 'subscript':
-                    if (this.browser.webkit) {
-                        YAHOO.log('Safari dom fun again (' + action + ')..', 'info', 'EditorSafari');
-                        tag = action.toLowerCase().substring(0, 3);
-                        if (this._isElement(_selEl, tag)) {
-                            YAHOO.log('we are a child of tag (' + tag + '), reverse process', 'info', 'EditorSafari');
-                            _span = this._swapEl(this.currentElement[0], 'span', function(el) {
-                                el.className = 'yui-non';
-                            });
-                            this._selectNode(_span);
-                        } else {
-                            this._createCurrentElement(tag);
-                            var _sub = this._swapEl(this.currentElement[0], tag);
-                            this._selectNode(_sub);
-                            this.currentElement[0] = _sub;
+                    list.innerHTML = str;
+                    this.currentElement[0] = el;
+                    this.currentElement[0].parentNode.replaceChild(list, this.currentElement[0]);
+                } else {
+                    YAHOO.log('Create list item', 'info', 'SimpleEditor');
+                    this._createCurrentElement(tag.toLowerCase());
+                    list = this._getDoc().createElement(tag);
+                    for (li = 0; li < this.currentElement.length; li++) {
+                        var newli = this._getDoc().createElement('li');
+                        newli.innerHTML = this.currentElement[li].innerHTML + '<span class="yui-non"> </span> ';
+                        list.appendChild(newli);
+                        if (li > 0) {
+                            this.currentElement[li].parentNode.removeChild(this.currentElement[li]);
                         }
-                        exec = false;
                     }
-                    break;
-                case 'formatblock':
-                    value = 'blockquote';
-                    if (this.browser.webkit) {
-                        this._createCurrentElement('blockquote');
-                        if (YAHOO.util.Dom.hasClass(this.currentElement[0].parentNode, 'yui-tag-blockquote')) {
-                            _span = this._getDoc().createElement('span');
-                            _span.innerHTML = this.currentElement[0].innerHTML;
-                            YAHOO.util.Dom.addClass(_span, 'yui-non');
-                            this.currentElement[0].parentNode.parentNode.replaceChild(_span, this.currentElement[0].parentNode);
+                    this.currentElement[0].parentNode.replaceChild(list, this.currentElement[0]);
+                    this.currentElement[0] = list;
+                    var _h = this.currentElement[0].firstChild;
+                    _h = Dom.getElementsByClassName('yui-non', 'span', _h)[0];
+                    this._getSelection().setBaseAndExtent(_h, 1, _h, _h.innerText.length);
+                }
+                exec = false;
+            } else {
+                el = this._getSelectedElement();
+                if (this._isElement(el, 'li') && this._isElement(el.parentNode, tag) || (this.browser.ie && this._isElement(this._getRange().parentElement, 'li'))) { //we are in a list..
+                    YAHOO.log('We already have a list, undo it', 'info', 'SimpleEditor');
+                    if (this.browser.ie) {
+                        YAHOO.log('Undo IE', 'info', 'SimpleEditor');
+                        str = '';
+                        var lis2 = el.parentNode.getElementsByTagName('li');
+                        for (var j = 0; j < lis2.length; j++) {
+                            str += lis2[j].innerHTML + '<br>';
                         }
-                        exec = false;
+                        var newEl = this._getDoc().createElement('span');
+                        newEl.innerHTML = str;
+                        el.parentNode.parentNode.replaceChild(newEl, el.parentNode);
                     } else {
-                        var tar = Event.getTarget(this.currentEvent);
-                        if (this._isElement(tar, 'blockquote')) {
-                            _span = this._getDoc().createElement('span');
-                            _span.innerHTML = tar.innerHTML;
-                            YAHOO.util.Dom.addClass(_span, 'yui-non');
-                            tar.parentNode.replaceChild(_span, tar);
-                            exec = false;
-                        }
+                        this.nodeChange();
+                        this._getDoc().execCommand(action, '', el.parentNode);
+                        this.nodeChange();
                     }
-                    break;
-                case 'indent':
-                case 'outdent':
-                    if (this.browser.webkit || this.browser.ie || this.browser.gecko) {
-                        selEl = this._getSelectedElement();
-                        var _bq = null;
-                        if (this._isElement(selEl, 'blockquote')) {
-                            if (action == 'indent') {
-                                _bq = this._getDoc().createElement('blockquote');
-                                _bq.innerHTML = selEl.innerHTML;
-                                selEl.innerHTML = '';
-                                selEl.appendChild(_bq);
-                                this._selectNode(_bq);
-                            } else {
-                                var par = selEl.parentNode;
-                                if (this._isElement(selEl.parentNode, 'blockquote')) {
-                                    par.innerHTML = selEl.innerHTML;
-                                    this._selectNode(par);
-                                } else {
-                                    _span = this._getDoc().createElement('span');
-                                    _span.innerHTML = selEl.innerHTML;
-                                    YAHOO.util.Dom.addClass(_span, 'yui-non');
-                                    par.replaceChild(_span, selEl);
-                                    this._selectNode(_span);
-                                }
+                    exec = false;
+                }
+                if (this.browser.opera) {
+                    var self = this;
+                    window.setTimeout(function() {
+                        var liso = self._getDoc().getElementsByTagName('li');
+                        for (var i = 0; i < liso.length; i++) {
+                            if (liso[i].innerHTML.toLowerCase() == '<br>') {
+                                liso[i].parentNode.parentNode.removeChild(liso[i].parentNode);
                             }
-                        } else {
-                            if (action == 'indent') {
-                                this._createCurrentElement('blockquote');
-                                _bq = this._getDoc().createElement('blockquote');
-                                _bq.innerHTML = this.currentElement[0].innerHTML;
-                                this.currentElement[0].parentNode.replaceChild(_bq, this.currentElement[0]);
-                                this.currentElement[0] = _bq;
-                                this._selectNode(_bq);
-                            } else {
-                                YAHOO.log('Can not outdent, we are not inside a blockquote', 'warn', 'Editor');
-                            }
                         }
-                        exec = false;
+                    },30);
+                }
+                if (this.browser.ie && exec) {
+                    var html = '';
+                    if (this._getRange().html) {
+                        html = '<li>' + this._getRange().html+ '</li>';
                     } else {
-                        //action = 'formatblock';
-                        value = 'blockquote';
+                        html = '<li>' + this._getRange().text + '</li>';
                     }
-                    break;
-                case 'insertorderedlist':
-                case 'insertunorderedlist':
-                    /**
-                    * @knownissue Safari 2.+ doesn't support ordered and unordered lists
-                    * @browser Safari 2.x
-                    * The issue with this workaround is that when applied to a set of text
-                    * that has BR's in it, Safari may or may not pick up the individual items as
-                    * list items. This is fixed in WebKit (Safari 3)
-                    */
-                    tag = ((action.toLowerCase() == 'insertorderedlist') ? 'ol' : 'ul');
-                    if ((this.browser.webkit && !this._getDoc().queryCommandEnabled(action))) {
-                        var list = null;
-                        selEl = this._getSelectedElement();
-                        var li = 0;
-                        if (this._isElement(selEl, 'li') && this._isElement(selEl.parentNode, tag)) {
-                            YAHOO.log('We already have a list, undo it', 'info', 'Editor');
-                            el = selEl.parentNode;
-                            list = this._getDoc().createElement('span');
-                            YAHOO.util.Dom.addClass(list, 'yui-non');
-                            str = '';
-                            var lis = el.getElementsByTagName('li');
-                            for (li = 0; li < lis.length; li++) {
-                                str += '<div>' + lis[li].innerHTML + '</div>';
-                            }
-                            list.innerHTML = str;
-                            this.currentElement[0] = el;
-                        } else {
-                            YAHOO.log('Create list item', 'info', 'Editor');
-                            this._createCurrentElement(tag.toLowerCase());
-                            list = this._getDoc().createElement(tag);
-                            var els = this.currentElement;
-                            for (li = 0; li < this.currentElement.length; li++) {
-                                var newli = this._getDoc().createElement('li');
-                                newli.innerHTML = this.currentElement[li].innerHTML + ' ';
-                                list.appendChild(newli);
-                                if (li > 0) {
-                                    this.currentElement[li].parentNode.removeChild(this.currentElement[li]);
-                                }
-                            }
-                        }
-                        this.currentElement[0].parentNode.replaceChild(list, this.currentElement[0]);
-                        exec = false;
-                    } else {
-                        el = this._getSelectedElement();
-                        if (this._isElement(el, 'li') && this._isElement(el.parentNode, tag) || (this.browser.ie && this._isElement(this._getRange().parentElement, 'li'))) { //we are in a list..
-                            YAHOO.log('We already have a list, undo it', 'info', 'Editor');
-                            if (this.browser.ie) {
-                                YAHOO.log('Undo IE', 'info', 'Editor');
-                                str = '';
-                                var lis2 = el.parentNode.getElementsByTagName('li');
-                                for (var j = 0; j < lis2.length; j++) {
-                                    str += lis2[j].innerHTML + '<br>';
-                                }
-                                var newEl = this._getDoc().createElement('span');
-                                newEl.innerHTML = str;
-                                el.parentNode.parentNode.replaceChild(newEl, el.parentNode);
-                            } else {
-                                this.nodeChange();
-                                this._getDoc().execCommand(action, '', el.parentNode);
-                                this.nodeChange();
-                            }
-                            exec = false;
-                        }
-                        if (this.browser.opera) {
-                            var self = this;
-                            window.setTimeout(function() {
-                                var liso = self._getDoc().getElementsByTagName('li');
-                                for (var i = 0; i < liso.length; i++) {
-                                    if (liso[i].innerHTML.toLowerCase() == '<br>') {
-                                        liso[i].parentNode.parentNode.removeChild(liso[i].parentNode);
-                                    }
-                                }
-                            },30);
-                        }
-                        if (this.browser.ie && exec) {
-                            var html = '';
-                            if (this._getRange().html) {
-                                html = '<li>' + this._getRange().html+ '</li>';
-                            } else {
-                                html = '<li>' + this._getRange().text + '</li>';
-                            }
 
-                            this._getRange().pasteHTML('<' + tag + '>' + html + '</' + tag + '>');
-                            exec = false;
-                        }
-                    }
-                    break;
-                case 'fontname':
-                    selEl = this._getSelectedElement();
-                    this.currentFont = value;
-                    if (selEl && selEl.tagName && !this._hasSelection()) {
-                        YAHOO.util.Dom.setStyle(selEl, 'font-family', value);
-                        exec = false;
-                    }
-                    break;
-                case 'fontsize':
-                    if ((this.currentElement.length > 0) && (!this._hasSelection())) {
-                        YAHOO.util.Dom.setStyle(this.currentElement, 'fontSize', value);
-                    } else if (!this._isElement(this._getSelectedElement(), 'body')) {
-                        YAHOO.util.Dom.setStyle(this._getSelectedElement(), 'fontSize', value);
-                    } else {
-                        this._createCurrentElement('span', {'fontSize': value });
-                    }
+                    this._getRange().pasteHTML('<' + tag + '>' + html + '</' + tag + '>');
                     exec = false;
-                    break;
+                }
             }
-            if (exec) {
-                YAHOO.log('execCommand::(' + action + '), (' + value + ')', 'info', 'Editor');
-                try {
-                    this._getDoc().execCommand(action, false, value);
-                } catch(e) {
-                    YAHOO.log('execCommand Failed', 'error', 'Editor');
-                }
+            return exec;
+        },
+        /**
+        * @method cmd_insertorderedlist
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('insertorderedlist ') is used.
+        */
+        cmd_insertorderedlist: function(value) {
+            return [this.cmd_list('ol')];
+        },
+        /**
+        * @method cmd_insertunorderedlist 
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('insertunorderedlist') is used.
+        */
+        cmd_insertunorderedlist: function(value) {
+            return [this.cmd_list('ul')];
+        },
+        /**
+        * @method cmd_fontname
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('fontname') is used.
+        */
+        cmd_fontname: function(value) {
+            var exec = true,
+                selEl = this._getSelectedElement();
+
+            this.currentFont = value;
+            if (selEl && selEl.tagName && !this._hasSelection()) {
+                YAHOO.util.Dom.setStyle(selEl, 'font-family', value);
+                exec = false;
+            }
+            return [exec];
+        },
+        /**
+        * @method cmd_fontsize
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('fontsize') is used.
+        */
+        cmd_fontsize: function(value) {
+            if ((this.currentElement.length > 0) && (!this._hasSelection())) {
+                YAHOO.util.Dom.setStyle(this.currentElement, 'fontSize', value);
+            } else if (!this._isElement(this._getSelectedElement(), 'body')) {
+                var el = this._getSelectedElement();
+                YAHOO.util.Dom.setStyle(el, 'fontSize', value);
+                this._selectNode(el);
             } else {
-                YAHOO.log('OVERRIDE::execCommand::(' + action + '),(' + value + ') skipped', 'warn', 'Editor');
+                this._createCurrentElement('span', {'fontSize': value });
+                this._selectNode(this.currentElement[0]);
             }
-            this.on('afterExecCommand', function() {
-                this.unsubscribeAll('afterExecCommand');
-                this.nodeChange();
-            });
-            this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
-            
+            return [false];
         },
+    /* }}} */
         /**
         * @private
         * @method _swapEl
@@ -5145,8 +5181,7 @@
         */
         _createCurrentElement: function(tagName, tagStyle) {
             tagName = ((tagName) ? tagName : 'a');
-            var sel = this._getSelection(),
-                tar = null,
+            var tar = null,
                 el = [],
                 _doc = this._getDoc();
             
@@ -5213,7 +5248,10 @@
                     * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
                     */
                     el = _elCreate();
-                    if (this._isElement(tar, 'body')) {
+                    if (this._isElement(tar, 'body') || this._isElement(tar, 'html')) {
+                        if (this._isElement(tar, 'html')) {
+                            tar = this._getDoc().body;
+                        }
                         tar.appendChild(el);
                     } else if (tar.nextSibling) {
                         tar.parentNode.insertBefore(el, tar.nextSibling);
@@ -5331,6 +5369,7 @@
         * @description Loads HTML into the editors body
         */
         setEditorHTML: function(html) {
+            html = this._cleanIncomingHTML(html);
             this._getDoc().body.innerHTML = html;
             this.nodeChange();
         },
@@ -5387,6 +5426,19 @@
             this.get('iframe').setStyle('left', '-9999px');
         },
         /**
+        * @method _cleanIncomingHTML
+        * @param {String} html The unfiltered HTML
+        * @description Process the HTML with a few regexes to clean it up and stabilize the input
+        * @returns {String} The filtered HTML
+        */
+        _cleanIncomingHTML: function(html) {
+            html = html.replace(/<strong([^>]*)>/gi, '<b$1>');
+            html = html.replace(/<\/strong>/gi, '</b>');   
+            html = html.replace(/<em([^>]*)>/gi, '<i$1>');
+            html = html.replace(/<\/em>/gi, '</i>');
+            return html;
+        },
+        /**
         * @method cleanHTML
         * @param {String} html The unfiltered HTML
         * @description Process the HTML with a few regexes to clean it up and stabilize the output
@@ -5400,19 +5452,14 @@
             }
             var markup = this.get('markup');
             //Make some backups...
-            if (this.browser.webkit) {
-		        html = html.replace(/<br class="khtml-block-placeholder">/gi, '<YUI_BR>');
-		        html = html.replace(/<br class="webkit-block-placeholder">/gi, '<YUI_BR>');
-            }
-		    html = html.replace(/<br>/gi, '<YUI_BR>');
-		    html = html.replace(/<br\/>/gi, '<YUI_BR>');
-		    html = html.replace(/<br \/>/gi, '<YUI_BR>');
-		    html = html.replace(/<div><YUI_BR><\/div>/gi, '<YUI_BR>');
-		    html = html.replace(/<p>( | )<\/p>/g, '<YUI_BR>');            
-		    html = html.replace(/<p><br> <\/p>/gi, '<YUI_BR>');
-		    html = html.replace(/<p> <\/p>/gi, '<YUI_BR>');
+            html = this.pre_filter_linebreaks(html, markup);
+
 		    html = html.replace(/<img([^>]*)\/>/gi, '<YUI_IMG$1>');
 		    html = html.replace(/<img([^>]*)>/gi, '<YUI_IMG$1>');
+
+		    html = html.replace(/<input([^>]*)\/>/gi, '<YUI_INPUT$1>');
+		    html = html.replace(/<input([^>]*)>/gi, '<YUI_INPUT$1>');
+
 		    html = html.replace(/<ul([^>]*)>/gi, '<YUI_UL$1>');
 		    html = html.replace(/<\/ul>/gi, '<\/YUI_UL>');
 		    html = html.replace(/<blockquote([^>]*)>/gi, '<YUI_BQ$1>');
@@ -5454,28 +5501,117 @@
 		    html = html.replace(/\/ol>/gi, '/ol>');
 		    html = html.replace(/<li/gi, '<li');
 		    html = html.replace(/\/li>/gi, '/li>');
+            html = this.filter_safari(html);
 
-            //Fix stuff we don't want
-	        html = html.replace(/<\/?(body|head|html)[^>]*>/gi, '');
-            //Fix last BR
-	        html = html.replace(/<YUI_BR>$/, '');
-            //Fix last BR in P
-	        html = html.replace(/<YUI_BR><\/p>/g, '</p>');
-            //Fix last BR in LI
-		    html = html.replace(/<YUI_BR><\/li>/gi, '</li>');
+            html = this.filter_internals(html);
 
-            //Safari only regexes
+            html = this.filter_all_rgb(html);
+
+            //Replace our backups with the real thing
+            html = this.post_filter_linebreaks(html, markup);
+
+            if (markup == 'xhtml') {
+		        html = html.replace(/<YUI_IMG([^>]*)>/g, '<img $1/>');
+		        html = html.replace(/<YUI_INPUT([^>]*)>/g, '<input $1/>');
+            } else {
+		        html = html.replace(/<YUI_IMG([^>]*)>/g, '<img $1>');
+		        html = html.replace(/<YUI_INPUT([^>]*)>/g, '<input $1>');
+            }
+		    html = html.replace(/<YUI_UL([^>]*)>/g, '<ul$1>');
+		    html = html.replace(/<\/YUI_UL>/g, '<\/ul>');
+
+            html = this.filter_invalid_lists(html);
+
+		    html = html.replace(/<YUI_BQ([^>]*)>/g, '<blockquote$1>');
+		    html = html.replace(/<\/YUI_BQ>/g, '<\/blockquote>');
+
+            //Trim the output, removing whitespace from the beginning and end
+            html = YAHOO.lang.trim(html);
+
+            if (this.get('removeLineBreaks')) {
+                html = html.replace(/\n/g, '').replace(/\r/g, '');
+                html = html.replace(/  /gi, ' '); //Replace all double spaces and replace with a single
+            }
+            
+            //First empty span
+            if (html.substring(0, 6).toLowerCase() == '<span>')  {
+                html = html.substring(6);
+            }
+            //Last empty span
+            if (html.substring(html.length - 7, html.length).toLowerCase() == '</span>')  {
+                html = html.substring(0, html.length - 7);
+            }
+
+
+            for (var v in this.invalidHTML) {
+                if (YAHOO.lang.hasOwnProperty(this.invalidHTML, v)) {
+                    if (Lang.isObject(v) && v.keepContents) {
+                        html = html.replace(new RegExp('<' + v + '([^>]*)>(.*?)<\/' + v + '>', 'gi'), '$1');
+                    } else {
+                        html = html.replace(new RegExp('<' + v + '([^>]*)>(.*?)<\/' + v + '>', 'gi'), '');
+                    }
+                }
+            }
+
+            this.fireEvent('cleanHTML', { type: 'cleanHTML', target: this, html: html });
+
+            return html;
+        },
+        /**
+        * @method filter_invalid_lists
+        * @param String html The HTML string to filter
+        * @description Filters invalid ol and ul list markup, converts this: <li></li><ol>..</ol> to this: <li></li><li><ol>..</ol></li>
+        * @returns String
+        */
+        filter_invalid_lists: function(html) {
+            html = html.replace(/<\/li>\n/gi, '</li>');
+
+            html = html.replace(/<\/li><ol>/gi, '</li><li><ol>');
+            html = html.replace(/<\/ol>/gi, '</ol></li>');
+            html = html.replace(/<\/ol><\/li>\n/gi, "</ol>\n");
+
+            html = html.replace(/<\/li><ul>/gi, '</li><li><ul>');
+            html = html.replace(/<\/ul>/gi, '</ul></li>');
+            html = html.replace(/<\/ul><\/li>\n/gi, "</ul>\n");
+
+            html = html.replace(/<\/li>/gi, "</li>\n");
+            html = html.replace(/<\/ol>/gi, "</ol>\n");
+            html = html.replace(/<ol>/gi, "<ol>\n");
+            html = html.replace(/<ul>/gi, "<ul>\n");
+            return html;
+        },
+        /**
+        * @method filter_safari
+        * @param String html The HTML string to filter
+        * @description Filters strings specific to Safari
+        * @returns String
+        */
+        filter_safari: function(html) {
             if (this.browser.webkit) {
-                //<DIV><SPAN class="Apple-style-span" style="line-height: normal;">Test THis</SPAN></DIV>
                 html = html.replace(/Apple-style-span/gi, '');
                 html = html.replace(/style="line-height: normal;"/gi, '');
                 //Remove bogus LI's
                 html = html.replace(/<li><\/li>/gi, '');
                 html = html.replace(/<li> <\/li>/gi, '');
+                html = html.replace(/<li>  <\/li>/gi, '');
                 //Remove bogus DIV's
                 html = html.replace(/<div><\/div>/gi, '');
                 html = html.replace(/<div> <\/div>/gi, '');
             }
+            return html;
+        },
+        /**
+        * @method filter_internals
+        * @param String html The HTML string to filter
+        * @description Filters internal RTE strings and bogus attrs we don't want
+        * @returns String
+        */
+        filter_internals: function(html) {
+		    html = html.replace(/\r/g, '');
+            //Fix stuff we don't want
+	        html = html.replace(/<\/?(body|head|html)[^>]*>/gi, '');
+            //Fix last BR in LI
+		    html = html.replace(/<YUI_BR><\/li>/gi, '</li>');
 
 		    html = html.replace(/yui-tag-span/gi, '');
 		    html = html.replace(/yui-tag/gi, '');
@@ -5488,9 +5624,6 @@
 		    html = html.replace(/ class="  "/gi, '');
 		    html = html.replace(/ target=""/gi, '');
 		    html = html.replace(/ title=""/gi, '');
-            for (var i = 0; i < 5; i++) {
-                html = html.replace(new RegExp('<span>(.*?)<\/span>', 'gi'), '$1');
-            }
 
             if (this.browser.ie) {
 		        html = html.replace(/ class= /gi, '');
@@ -5499,26 +5632,90 @@
 		        html = html.replace(/_width="([^>])"/gi, '');
             }
             
-            //Replace our backups with the real thing
+            return html;
+        },
+        /**
+        * @method filter_all_rgb
+        * @param String str The HTML string to filter
+        * @description Converts all RGB color strings found in passed string to a hex color, example: style="color: rgb(0, 255, 0)" converts to style="color: #00ff00"
+        * @returns String
+        */
+        filter_all_rgb: function(str) {
+            var exp = new RegExp("rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)", "gi");
+            var arr = str.match(exp);
+            if (Lang.isArray(arr)) {
+                for (var i = 0; i < arr.length; i++) {
+                    var color = this.filter_rgb(arr[i]);
+                    str = str.replace(arr[i].toString(), color);
+                }
+            }
+            
+            return str;
+        },
+        /**
+        * @method filter_rgb
+        * @param String css The CSS string containing rgb(#,#,#);
+        * @description Converts an RGB color string to a hex color, example: rgb(0, 255, 0) converts to #00ff00
+        * @returns String
+        */
+        filter_rgb: function(css) {
+            if (css.toLowerCase().indexOf('rgb') != -1) {
+                var exp = new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)", "gi");
+                var rgb = css.replace(exp, "$1,$2,$3,$4,$5").split(',');
+            
+                if (rgb.length == 5) {
+                    var r = parseInt(rgb[1], 10).toString(16);
+                    var g = parseInt(rgb[2], 10).toString(16);
+                    var b = parseInt(rgb[3], 10).toString(16);
+
+                    r = r.length == 1 ? '0' + r : r;
+                    g = g.length == 1 ? '0' + g : g;
+                    b = b.length == 1 ? '0' + b : b;
+
+                    css = "#" + r + g + b;
+                }
+            }
+            return css;
+        },
+        /**
+        * @method pre_filter_linebreaks
+        * @param String html The HTML to filter
+        * @param String markup The markup type to filter to
+        * @description HTML Pre Filter
+        * @returns String
+        */
+        pre_filter_linebreaks: function(html, markup) {
+            if (this.browser.webkit) {
+		        html = html.replace(/<br class="khtml-block-placeholder">/gi, '<YUI_BR>');
+		        html = html.replace(/<br class="webkit-block-placeholder">/gi, '<YUI_BR>');
+            }
+		    html = html.replace(/<br>/gi, '<YUI_BR>');
+		    html = html.replace(/<br (.*?)>/gi, '<YUI_BR>');
+		    html = html.replace(/<br\/>/gi, '<YUI_BR>');
+		    html = html.replace(/<br \/>/gi, '<YUI_BR>');
+		    html = html.replace(/<div><YUI_BR><\/div>/gi, '<YUI_BR>');
+		    html = html.replace(/<p>( | )<\/p>/g, '<YUI_BR>');            
+		    html = html.replace(/<p><br> <\/p>/gi, '<YUI_BR>');
+		    html = html.replace(/<p> <\/p>/gi, '<YUI_BR>');
+            //Fix last BR
+	        html = html.replace(/<YUI_BR>$/, '');
+            //Fix last BR in P
+	        html = html.replace(/<YUI_BR><\/p>/g, '</p>');
+            return html;
+        },
+        /**
+        * @method post_filter_linebreaks
+        * @param String html The HTML to filter
+        * @param String markup The markup type to filter to
+        * @description HTML Pre Filter
+        * @returns String
+        */
+        post_filter_linebreaks: function(html, markup) {
             if (markup == 'xhtml') {
 		        html = html.replace(/<YUI_BR>/g, '<br/>');
-		        html = html.replace(/<YUI_IMG([^>]*)>/g, '<img $1/>');
             } else {
 		        html = html.replace(/<YUI_BR>/g, '<br>');
-		        html = html.replace(/<YUI_IMG([^>]*)>/g, '<img $1>');
             }
-		    html = html.replace(/<YUI_UL([^>]*)>/g, '<ul$1>');
-		    html = html.replace(/<\/YUI_UL>/g, '<\/ul>');
-		    html = html.replace(/<YUI_BQ([^>]*)>/g, '<blockquote$1>');
-		    html = html.replace(/<\/YUI_BQ>/g, '<\/blockquote>');
-
-            //Trim the output, removing whitespace from the beginning and end
-            html = html.replace(/^\s+/g, '').replace(/\s+$/g, '');
-
-            if (this.get('removeLineBreaks')) {
-                html = html.replace(/\n/g, '').replace(/\r/g, '');
-                html = html.replace(/  /gi, ' '); //Replace all double spaces and replace with a single
-            }
             return html;
         },
         /**
@@ -5531,6 +5728,1176 @@
         /**
         * @private
         * @method _renderPanel
+        * @description Override Method for Advanced Editor
+        */
+        _renderPanel: function() {
+        },
+        /**
+        * @method openWindow
+        * @description Override Method for Advanced Editor
+        */
+        openWindow: function(win) {
+        },
+        /**
+        * @method moveWindow
+        * @description Override Method for Advanced Editor
+        */
+        moveWindow: function() {
+        },
+        /**
+        * @private
+        * @method _closeWindow
+        * @description Override Method for Advanced Editor
+        */
+        _closeWindow: function() {
+        },
+        /**
+        * @method closeWindow
+        * @description Override Method for Advanced Editor
+        */
+        closeWindow: function() {
+            this.unsubscribeAll('afterExecCommand');
+            this.toolbar.resetAllButtons();
+            this._focusWindow();        
+        },
+        /**
+        * @method destroy
+        * @description Destroys the editor, all of it's elements and objects.
+        * @return {Boolean}
+        */
+        destroy: function() {
+            this.saveHTML();
+            this.toolbar.destroy();
+            this.setStyle('visibility', 'hidden');
+            this.setStyle('position', 'absolute');
+            this.setStyle('top', '-9999px');
+            this.setStyle('left', '-9999px');
+            var textArea = this.get('element');
+            this.get('element_cont').get('parentNode').replaceChild(textArea, this.get('element_cont').get('element'));
+            this.get('element_cont').get('element').innerHTML = '';
+            //Brutal Object Destroy
+            for (var i in this) {
+                if (Lang.hasOwnProperty(this, i)) {
+                    this[i] = null;
+                }
+            }
+            return true;
+        },        
+        /**
+        * @method toString
+        * @description Returns a string representing the editor.
+        * @return {String}
+        */
+        toString: function() {
+            var str = 'SimpleEditor';
+            if (this.get && this.get('element_cont')) {
+                str = 'SimpleEditor (#' + this.get('element_cont').get('id') + ')' + ((this.get('disabled') ? ' Disabled' : ''));
+            }
+            return str;
+        }
+    });
+
+/**
+* @event toolbarLoaded
+* @description Event is fired during the render process directly after the Toolbar is loaded. Allowing you to attach events to the toolbar. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event cleanHTML
+* @description Event is fired after the cleanHTML method is called.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event afterRender
+* @description Event is fired after the render process finishes. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorContentLoaded
+* @description Event is fired after the editor iframe's document fully loads and fires it's onload event. From here you can start injecting your own things into the document. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorMouseUp
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorMouseDown
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorDoubleClick
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorKeyUp
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorKeyPress
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorKeyDown
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event beforeNodeChange
+* @description Event fires at the beginning of the nodeChange process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event afterNodeChange
+* @description Event fires at the end of the nodeChange process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event beforeExecCommand
+* @description Event fires at the beginning of the execCommand process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event afterExecCommand
+* @description Event fires at the end of the execCommand process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+
+/**
+     * @description Singleton object used to track the open window objects and panels across the various open editors
+     * @class EditorInfo
+     * @static
+    */
+    YAHOO.widget.EditorInfo = {
+        /**
+        * @private
+        * @property _instances
+        * @description A reference to all editors on the page.
+        * @type Object
+        */
+        _instances: {},
+        /**
+        * @private
+        * @property window
+        * @description A reference to the currently open window object in any editor on the page.
+        * @type Object <a href="YAHOO.widget.EditorWindow.html">YAHOO.widget.EditorWindow</a>
+        */
+        window: {},
+        /**
+        * @private
+        * @property panel
+        * @description A reference to the currently open panel in any editor on the page.
+        * @type Object <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>
+        */
+        panel: null,
+        /**
+        * @method getEditorById
+        * @description Returns a reference to the Editor object associated with the given textarea
+        * @param {String/HTMLElement} id The id or reference of the textarea to return the Editor instance of
+        * @returns Object <a href="YAHOO.widget.Editor.html">YAHOO.widget.Editor</a>
+        */
+        getEditorById: function(id) {
+            if (!YAHOO.lang.isString(id)) {
+                //Not a string, assume a node Reference
+                id = id.id;
+            }
+            if (this._instances[id]) {
+                return this._instances[id];
+            }
+            return false;
+        },
+        /**
+        * @method toString
+        * @description Returns a string representing the EditorInfo.
+        * @return {String}
+        */
+        toString: function() {
+            var len = 0;
+            for (var i in this._instances) {
+                len++;
+            }
+            return 'Editor Info (' + len + ' registered intance' + ((len > 1) ? 's' : '') + ')';
+        }
+    };
+
+
+
+    
+})();
+/**
+ * @module editor
+ * @description <p>The Rich Text Editor is a UI control that replaces a standard HTML textarea; it allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like bold and italic text, and drag-and-drop inclusion and sizing of images. The Rich Text Editor's toolbar is extensible via a plugin architecture so that advanced implementations can achieve a high degree of customization.</p>
+ * @namespace YAHOO.widget
+ * @requires yahoo, dom, element, event, container_core, simpleeditor
+ * @optional dragdrop, animation, menu, button
+ * @beta
+ */
+
+(function() {
+var Dom = YAHOO.util.Dom,
+    Event = YAHOO.util.Event,
+    Lang = YAHOO.lang,
+    Toolbar = YAHOO.widget.Toolbar;
+
+    /**
+     * The Rich Text Editor is a UI control that replaces a standard HTML textarea; it allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like bold and italic text, and drag-and-drop inclusion and sizing of images. The Rich Text Editor's toolbar is extensible via a plugin architecture so that advanced implementations can achieve a high degree of customization.
+     * @constructor
+     * @class Editor
+     * @extends YAHOO.widget.SimpleEditor
+     * @param {String/HTMLElement} el The textarea element to turn into an editor.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+    
+    YAHOO.widget.Editor = function(el, attrs) {
+        YAHOO.log('Editor Initalizing', 'info', 'Editor');
+        
+        var oConfig = {
+            element: null,
+            attributes: (attrs || {})
+        }, id = null;
+
+        if (Lang.isString(el)) {
+            id = el;
+        } else {
+            id = el.id;
+        }
+        oConfig.element = el;
+        YAHOO.widget.Editor.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
+    };
+
+    /**
+    * @private
+    * @method _cleanClassName
+    * @description Makes a useable classname from dynamic data, by dropping it to lowercase and replacing spaces with -'s.
+    * @param {String} str The classname to clean up
+    * @returns {String}
+    */
+    function _cleanClassName(str) {
+        return str.replace(/ /g, '-').toLowerCase();
+    }
+
+
+    YAHOO.extend(YAHOO.widget.Editor, YAHOO.widget.SimpleEditor, {
+        /**
+        * @property STR_BEFORE_EDITOR
+        * @description The accessibility string for the element before the iFrame
+        * @type String
+        */
+        STR_BEFORE_EDITOR: 'This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Control + Shift + T to place focus on the toolbar and navigate between option heading names. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift [ aligns text left</li> <li>Control Shift | centers text</li> <li>Control Shift ] aligns text right</li> <li>Control Shift L adds an HTML link</li> <li>To exit this text editor use the keyboard shortcut Control + Shift + ESC.</li></ul>',    
+        /**
+        * @property STR_CLOSE_WINDOW
+        * @description The Title of the close button in the Editor Window
+        * @type String
+        */
+        STR_CLOSE_WINDOW: 'Close Window',
+        /**
+        * @property STR_CLOSE_WINDOW_NOTE
+        * @description A note appearing in the Editor Window to tell the user that the Escape key will close the window
+        * @type String
+        */
+        STR_CLOSE_WINDOW_NOTE: 'To close this window use the Control + Shift + W key',
+        /**
+        * @property STR_IMAGE_PROP_TITLE
+        * @description The title for the Image Property Editor Window
+        * @type String
+        */
+        STR_IMAGE_PROP_TITLE: 'Image Options',
+        /**
+        * @property STR_IMAGE_URL
+        * @description The label string for Image URL
+        * @type String
+        */
+        STR_IMAGE_URL: 'Image Url',
+        /**
+        * @property STR_IMAGE_TITLE
+        * @description The label string for Image Description
+        * @type String
+        */
+        STR_IMAGE_TITLE: 'Description',
+        /**
+        * @property STR_IMAGE_SIZE
+        * @description The label string for Image Size
+        * @type String
+        */
+        STR_IMAGE_SIZE: 'Size',
+        /**
+        * @property STR_IMAGE_ORIG_SIZE
+        * @description The label string for Original Image Size
+        * @type String
+        */
+        STR_IMAGE_ORIG_SIZE: 'Original Size',
+        /**
+        * @property STR_IMAGE_COPY
+        * @description The label string for the image copy and paste message for Opera and Safari
+        * @type String
+        */
+        STR_IMAGE_COPY: '<span class="tip"><span class="icon icon-info"></span><strong>Note:</strong>To move this image just highlight it, cut, and paste where ever you\'d like.</span>',
+        /**
+        * @property STR_IMAGE_PADDING
+        * @description The label string for the image padding.
+        * @type String
+        */
+        STR_IMAGE_PADDING: 'Padding',
+        /**
+        * @property STR_IMAGE_BORDER
+        * @description The label string for the image border.
+        * @type String
+        */
+        STR_IMAGE_BORDER: 'Border',
+        /**
+        * @property STR_IMAGE_TEXTFLOW
+        * @description The label string for the image text flow.
+        * @type String
+        */
+        STR_IMAGE_TEXTFLOW: 'Text Flow',
+        /**
+        * @property STR_LOCAL_FILE_WARNING
+        * @description The label string for the local file warning.
+        * @type String
+        */
+        STR_LOCAL_FILE_WARNING: '<span class="tip"><span class="icon icon-warn"></span><strong>Note:</strong>This image/link points to a file on your computer and will not be accessible to others on the internet.</span>',
+        /**
+        * @property STR_LINK_PROP_TITLE
+        * @description The label string for the Link Property Editor Window.
+        * @type String
+        */
+        STR_LINK_PROP_TITLE: 'Link Options',
+        /**
+        * @property STR_LINK_PROP_REMOVE
+        * @description The label string for the Remove link from text link inside the property editor.
+        * @type String
+        */
+        STR_LINK_PROP_REMOVE: 'Remove link from text',
+        /**
+        * @property STR_LINK_NEW_WINDOW
+        * @description The string for the open in a new window label.
+        * @type String
+        */
+        STR_LINK_NEW_WINDOW: 'Open in a new window.',
+        /**
+        * @property STR_LINK_TITLE
+        * @description The string for the link description.
+        * @type String
+        */
+        STR_LINK_TITLE: 'Description',
+        /**
+        * @protected
+        * @property CLASS_LOCAL_FILE
+        * @description CSS class applied to an element when it's found to have a local url.
+        * @type String
+        */
+        CLASS_LOCAL_FILE: 'warning-localfile',
+        /**
+        * @protected
+        * @property CLASS_HIDDEN
+        * @description CSS class applied to the body when the hiddenelements button is pressed.
+        * @type String
+        */
+        CLASS_HIDDEN: 'yui-hidden',
+        /** 
+        * @method init
+        * @description The Editor class' initialization method
+        */
+        init: function(p_oElement, p_oAttributes) {
+            YAHOO.log('init', 'info', 'Editor');
+            YAHOO.widget.Editor.superclass.init.call(this, p_oElement, p_oAttributes);
+        },
+        /**
+        * @method initAttributes
+        * @description Initializes all of the configuration attributes used to create 
+        * the editor.
+        * @param {Object} attr Object literal specifying a set of 
+        * configuration attributes used to create the editor.
+        */
+        initAttributes: function(attr) {
+            YAHOO.widget.Editor.superclass.initAttributes.call(this, attr);
+
+            /**
+            * @attribute localFileWarning
+            * @description Should we throw the warning if we detect a file that is local to their machine?
+            * @default true
+            * @type Boolean
+            */            
+            this.setAttributeConfig('localFileWarning', {
+                value: attr.locaFileWarning || true
+            });
+
+            /**
+            * @attribute hiddencss
+            * @description The CSS used to show/hide hidden elements on the page, these rules must be prefixed with the class provided in <code>this.CLASS_HIDDEN</code>
+            * @default <code><pre>
+            .yui-hidden font, .yui-hidden strong, .yui-hidden b, .yui-hidden em, .yui-hidden i, .yui-hidden u, .yui-hidden div, .yui-hidden p, .yui-hidden span, .yui-hidden img, .yui-hidden ul, .yui-hidden ol, .yui-hidden li, .yui-hidden table {
+                border: 1px dotted #ccc;
+            }
+            .yui-hidden .yui-non {
+                border: none;
+            }
+            .yui-hidden img {
+                padding: 2px;
+            }</pre></code>
+            * @type String
+            */            
+            this.setAttributeConfig('hiddencss', {
+                value: attr.hiddencss || '.yui-hidden font, .yui-hidden strong, .yui-hidden b, .yui-hidden em, .yui-hidden i, .yui-hidden u, .yui-hidden div,.yui-hidden p,.yui-hidden span,.yui-hidden img, .yui-hidden ul, .yui-hidden ol, .yui-hidden li, .yui-hidden table { border: 1px dotted #ccc; } .yui-hidden .yui-non { border: none; } .yui-hidden img { padding: 2px; }',
+                writeOnce: true
+            });
+           
+        },
+        /**
+        * @private
+        * @method _fixNodes
+        * @description Fix href and imgs as well as remove invalid HTML.
+        */
+        _fixNodes: function() {
+            YAHOO.widget.Editor.superclass._fixNodes.call(this);
+            var url = '';
+
+            var imgs = this._getDoc().getElementsByTagName('img');
+            for (var im = 0; im < imgs.length; im++) {
+                if (imgs[im].getAttribute('href', 2)) {
+                    url = imgs[im].getAttribute('src', 2);
+                    if (this._isLocalFile(url)) {
+                        Dom.addClass(imgs[im], this.CLASS_LOCAL_FILE);
+                    } else {
+                        Dom.removeClass(imgs[im], this.CLASS_LOCAL_FILE);
+                    }
+                }
+            }
+            var fakeAs = this._getDoc().body.getElementsByTagName('a');
+            for (var a = 0; a < fakeAs.length; a++) {
+                if (fakeAs[a].getAttribute('href', 2)) {
+                    url = fakeAs[a].getAttribute('href', 2);
+                    if (this._isLocalFile(url)) {
+                        Dom.addClass(fakeAs[a], this.CLASS_LOCAL_FILE);
+                    } else {
+                        Dom.removeClass(fakeAs[a], this.CLASS_LOCAL_FILE);
+                    }
+                }
+            }
+        },
+        /**
+        * @private
+        * @property _disabled
+        * @description The Toolbar items that should be disabled if there is no selection present in the editor.
+        * @type Array
+        */
+        _disabled: [ 'createlink', 'forecolor', 'backcolor', 'fontname', 'fontsize', 'superscript', 'subscript', 'removeformat', 'heading', 'indent' ],
+        /**
+        * @private
+        * @property _alwaysDisabled
+        * @description The Toolbar items that should ALWAYS be disabled event if there is a selection present in the editor.
+        * @type Object
+        */
+        _alwaysDisabled: { 'outdent': true },
+        /**
+        * @private
+        * @property _alwaysEnabled
+        * @description The Toolbar items that should ALWAYS be enabled event if there isn't a selection present in the editor.
+        * @type Object
+        */
+        _alwaysEnabled: { hiddenelements: true },
+        /**
+        * @property _defaultToolbar
+        * @private
+        * @description Default toolbar config.
+        * @type Object
+        */
+        _defaultToolbar: {
+            collapse: true,
+            titlebar: 'Text Editing Tools',
+            draggable: false,
+            buttonType: 'advanced',
+            buttons: [
+                { group: 'fontstyle', label: 'Font Name and Size',
+                    buttons: [
+                        { type: 'select', label: 'Arial', value: 'fontname', disabled: true,
+                            menu: [
+                                { text: 'Arial', checked: true },
+                                { text: 'Arial Black' },
+                                { text: 'Comic Sans MS' },
+                                { text: 'Courier New' },
+                                { text: 'Lucida Console' },
+                                { text: 'Tahoma' },
+                                { text: 'Times New Roman' },
+                                { text: 'Trebuchet MS' },
+                                { text: 'Verdana' }
+                            ]
+                        },
+                        { type: 'spin', label: '13', value: 'fontsize', range: [ 9, 75 ], disabled: true }
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'textstyle', label: 'Font Style',
+                    buttons: [
+                        { type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' },
+                        { type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' },
+                        { type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' },
+                        { type: 'separator' },
+                        { type: 'push', label: 'Subscript', value: 'subscript', disabled: true },
+                        { type: 'push', label: 'Superscript', value: 'superscript', disabled: true },
+                        { type: 'separator' },
+                        { type: 'color', label: 'Font Color', value: 'forecolor', disabled: true },
+                        { type: 'color', label: 'Background Color', value: 'backcolor', disabled: true },
+                        { type: 'separator' },
+                        { type: 'push', label: 'Remove Formatting', value: 'removeformat', disabled: true },
+                        { type: 'push', label: 'Show/Hide Hidden Elements', value: 'hiddenelements' }
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'alignment', label: 'Alignment',
+                    buttons: [
+                        { type: 'push', label: 'Align Left CTRL + SHIFT + [', value: 'justifyleft' },
+                        { type: 'push', label: 'Align Center CTRL + SHIFT + |', value: 'justifycenter' },
+                        { type: 'push', label: 'Align Right CTRL + SHIFT + ]', value: 'justifyright' },
+                        { type: 'push', label: 'Justify', value: 'justifyfull' }
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'parastyle', label: 'Paragraph Style',
+                    buttons: [
+                    { type: 'select', label: 'Normal', value: 'heading', disabled: true,
+                        menu: [
+                            { text: 'Normal', value: 'none', checked: true },
+                            { text: 'Header 1', value: 'h1' },
+                            { text: 'Header 2', value: 'h2' },
+                            { text: 'Header 3', value: 'h3' },
+                            { text: 'Header 4', value: 'h4' },
+                            { text: 'Header 5', value: 'h5' },
+                            { text: 'Header 6', value: 'h6' }
+                        ]
+                    }
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'indentlist', label: 'Indenting and Lists',
+                    buttons: [
+                        { type: 'push', label: 'Indent', value: 'indent', disabled: true },
+                        { type: 'push', label: 'Outdent', value: 'outdent', disabled: true },
+                        { type: 'push', label: 'Create an Unordered List', value: 'insertunorderedlist' },
+                        { type: 'push', label: 'Create an Ordered List', value: 'insertorderedlist' }
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'insertitem', label: 'Insert Item',
+                    buttons: [
+                        { type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true },
+                        { type: 'push', label: 'Insert Image', value: 'insertimage' }
+                    ]
+                }
+            ]
+        },
+        /**
+        * @private
+        * @method _handleKeyDown
+        * @param {Event} ev The event we are working on.
+        * @description Override method that handles some new keydown events inside the iFrame document.
+        */
+        _handleKeyDown: function(ev) {
+            YAHOO.widget.Editor.superclass._handleKeyDown.call(this, ev);
+            var doExec = false,
+                action = null,
+                exec = false;
+
+            if (ev.shiftKey && ev.ctrlKey) {
+                doExec = true;
+            }
+            switch (ev.keyCode) {
+                case 219: //Left
+                    action = 'justifyleft';
+                    break;
+                case 220: //Center
+                    action = 'justifycenter';
+                    break;
+                case 221: //Right
+                    action = 'justifyright';
+                    break;
+            }
+            if (doExec && action) {
+                this.execCommand(action, null);
+                Event.stopEvent(ev);
+                this.nodeChange();
+            }
+        },        
+        _handleCreateLinkClick: function() {
+            var el = this._getSelectedElement();
+            if (this._isElement(el, 'img')) {
+                this.STOP_EXEC_COMMAND = true;
+                this.currentElement[0] = el;
+                this.toolbar.fireEvent('insertimageClick', { type: 'insertimageClick', target: this.toolbar });
+                this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
+                return false;
+            }
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue('createlink')) {
+                    YAHOO.log('Toolbar Button for (createlink) was not found, skipping exec.', 'info', 'Editor');
+                    return false;
+                }
+            }
+            
+            this.on('afterExecCommand', function() {
+
+                var win = new YAHOO.widget.EditorWindow('createlink', {
+                    width: '350px'
+                });
+                
+                var el = this.currentElement[0],
+                    url = '',
+                    title = '',
+                    target = '',
+                    localFile = false;
+                if (el) {
+                    if (el.getAttribute('href', 2) !== null) {
+                        url = el.getAttribute('href', 2);
+                        if (this._isLocalFile(url)) {
+                            //Local File throw Warning
+                            YAHOO.log('Local file reference found, show local warning', 'warn', 'Editor');
+                            win.setFooter(this.STR_LOCAL_FILE_WARNING);
+                            localFile = true;
+                        } else {
+                            win.setFooter(' ');
+                        }
+                    }
+                    if (el.getAttribute('title') !== null) {
+                        title = el.getAttribute('title');
+                    }
+                    if (el.getAttribute('target') !== null) {
+                        target = el.getAttribute('target');
+                    }
+                }
+                var str = '<label for="createlink_url"><strong>' + this.STR_LINK_URL + ':</strong> <input type="text" name="createlink_url" id="createlink_url" value="' + url + '"' + ((localFile) ? ' class="warning"' : '') + '></label>';
+                str += '<label for="createlink_target"><strong> </strong><input type="checkbox" name="createlink_target_" id="createlink_target" value="_blank"' + ((target) ? ' checked' : '') + '> ' + this.STR_LINK_NEW_WINDOW + '</label>';
+                str += '<label for="createlink_title"><strong>' + this.STR_LINK_TITLE + ':</strong> <input type="text" name="createlink_title" id="createlink_title" value="' + title + '"></label>';
+                
+                var body = document.createElement('div');
+                body.innerHTML = str;
+
+                var unlinkCont = document.createElement('div');
+                unlinkCont.className = 'removeLink';
+                var unlink = document.createElement('a');
+                unlink.href = '#';
+                unlink.innerHTML = this.STR_LINK_PROP_REMOVE;
+                unlink.title = this.STR_LINK_PROP_REMOVE;
+                Event.on(unlink, 'click', function(ev) {
+                    Event.stopEvent(ev);
+                    this.execCommand('unlink');
+                    this.closeWindow();
+                }, this, true);
+                unlinkCont.appendChild(unlink);
+                body.appendChild(unlinkCont);
+
+                win.setHeader(this.STR_LINK_PROP_TITLE);
+                win.setBody(body);
+
+                Event.onAvailable('createlink_url', function() {
+                    window.setTimeout(function() {
+                        try {
+                            YAHOO.util.Dom.get('createlink_url').focus();
+                        } catch (e) {}
+                    }, 50);
+                    Event.on('createlink_url', 'blur', function() {
+                        var url = Dom.get('createlink_url');
+                        if (this._isLocalFile(url.value)) {
+                            //Local File throw Warning
+                            Dom.addClass(url, 'warning');
+                            YAHOO.log('Local file reference found, show local warning', 'warn', 'Editor');
+                            this.get('panel').setFooter(this.STR_LOCAL_FILE_WARNING);
+                        } else {
+                            Dom.removeClass(url, 'warning');
+                            this.get('panel').setFooter(' ');
+                        }
+                    }, this, true);
+                }, this, true);
+
+                this.openWindow(win);
+            });
+        },
+        /**
+        * @private
+        * @method _handleCreateLinkWindowClose
+        * @description Handles the closing of the Link Properties Window.
+        */
+        _handleCreateLinkWindowClose: function() {
+            var url = Dom.get('createlink_url'),
+                target = Dom.get('createlink_target'),
+                title = Dom.get('createlink_title'),
+                el = this.currentElement[0],
+                a = el;
+            if (url && url.value) {
+                var urlValue = url.value;
+                if ((urlValue.indexOf(':/'+'/') == -1) && (urlValue.substring(0,1) != '/') && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                    if ((urlValue.indexOf('@') != -1) && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                        //Found an @ sign, prefix with mailto:
+                        urlValue = 'mailto:' + urlValue;
+                    } else {
+                        /* :// not found adding */
+                        if (urlValue.substring(0, 1) != '#') {
+                            urlValue = 'http:/'+'/' + urlValue;
+                        }
+                        
+                    }
+                }
+                el.setAttribute('href', urlValue);
+                if (target.checked) {
+                    el.setAttribute('target', target.value);
+                } else {
+                    el.setAttribute('target', '');
+                }
+                el.setAttribute('title', ((title.value) ? title.value : ''));
+
+            } else {
+                var _span = this._getDoc().createElement('span');
+                _span.innerHTML = el.innerHTML;
+                Dom.addClass(_span, 'yui-non');
+                el.parentNode.replaceChild(_span, el);
+            }
+            this.nodeChange();
+            this.currentElement = [];
+        },
+        /**
+        * @private
+        * @method _handleInsertImageClick
+        * @description Opens the Image Properties Window when the insert Image button is clicked or an Image is Double Clicked.
+        */
+        _handleInsertImageClick: function() {
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue('insertimage')) {
+                    YAHOO.log('Toolbar Button for (insertimage) was not found, skipping exec.', 'info', 'Editor');
+                    return false;
+                }
+            }
+            this._setBusy();
+            this.on('afterExecCommand', function() {
+                var el = this.currentElement[0],
+                    body = null,
+                    link = '',
+                    target = '',
+                    title = '',
+                    src = '',
+                    align = '',
+                    height = 75,
+                    width = 75,
+                    padding = 0,
+                    oheight = 0,
+                    owidth = 0,
+                    blankimage = false,
+                    win = new YAHOO.widget.EditorWindow('insertimage', {
+                        width: '415px'
+                    });
+
+                if (!el) {
+                    el = this._getSelectedElement();
+                }
+                if (el) {
+                    if (el.getAttribute('src')) {
+                        src = el.getAttribute('src', 2);
+                        if (src.indexOf(this.get('blankimage')) != -1) {
+                            src = this.STR_IMAGE_HERE;
+                            blankimage = true;
+                        }
+                    }
+                    if (el.getAttribute('alt', 2)) {
+                        title = el.getAttribute('alt', 2);
+                    }
+                    if (el.getAttribute('title', 2)) {
+                        title = el.getAttribute('title', 2);
+                    }
+
+                    if (el.parentNode && this._isElement(el.parentNode, 'a')) {
+                        link = el.parentNode.getAttribute('href', 2);
+                        if (el.parentNode.getAttribute('target') !== null) {
+                            target = el.parentNode.getAttribute('target');
+                        }
+                    }
+                    height = parseInt(el.height, 10);
+                    width = parseInt(el.width, 10);
+                    if (el.style.height) {
+                        height = parseInt(el.style.height, 10);
+                    }
+                    if (el.style.width) {
+                        width = parseInt(el.style.width, 10);
+                    }
+                    if (el.style.margin) {
+                        padding = parseInt(el.style.margin, 10);
+                    }
+                    if (!el._height) {
+                        el._height = height;
+                    }
+                    if (!el._width) {
+                        el._width = width;
+                    }
+                    oheight = el._height;
+                    owidth = el._width;
+                }
+                var str = '<label for="insertimage_url"><strong>' + this.STR_IMAGE_URL + ':</strong> <input type="text" id="insertimage_url" value="' + src + '" size="40"></label>';
+                body = document.createElement('div');
+                body.innerHTML = str;
+
+                var tbarCont = document.createElement('div');
+                tbarCont.id = 'img_toolbar';
+                body.appendChild(tbarCont);
+
+                var str2 = '<label for="insertimage_title"><strong>' + this.STR_IMAGE_TITLE + ':</strong> <input type="text" id="insertimage_title" value="' + title + '" size="40"></label>';
+                str2 += '<label for="insertimage_link"><strong>' + this.STR_LINK_URL + ':</strong> <input type="text" name="insertimage_link" id="insertimage_link" value="' + link + '"></label>';
+                str2 += '<label for="insertimage_target"><strong> </strong><input type="checkbox" name="insertimage_target_" id="insertimage_target" value="_blank"' + ((target) ? ' checked' : '') + '> ' + this.STR_LINK_NEW_WINDOW + '</label>';
+                var div = document.createElement('div');
+                div.innerHTML = str2;
+                body.appendChild(div);
+                win.cache = body;
+
+                var tbar = new YAHOO.widget.Toolbar(tbarCont, {
+                    /* {{{ */ 
+                    buttonType: this._defaultToolbar.buttonType,
+                    buttons: [
+                        { group: 'textflow', label: this.STR_IMAGE_TEXTFLOW + ':',
+                            buttons: [
+                                { type: 'push', label: 'Left', value: 'left' },
+                                { type: 'push', label: 'Inline', value: 'inline' },
+                                { type: 'push', label: 'Block', value: 'block' },
+                                { type: 'push', label: 'Right', value: 'right' }
+                            ]
+                        },
+                        { type: 'separator' },
+                        { group: 'padding', label: this.STR_IMAGE_PADDING + ':',
+                            buttons: [
+                                { type: 'spin', label: ''+padding, value: 'padding', range: [0, 50] }
+                            ]
+                        },
+                        { type: 'separator' },
+                        { group: 'border', label: this.STR_IMAGE_BORDER + ':',
+                            buttons: [
+                                { type: 'select', label: 'Border Size', value: 'bordersize',
+                                    menu: [
+                                        { text: 'none', value: '0', checked: true },
+                                        { text: '1px', value: '1' },
+                                        { text: '2px', value: '2' },
+                                        { text: '3px', value: '3' },
+                                        { text: '4px', value: '4' },
+                                        { text: '5px', value: '5' }
+                                    ]
+                                },
+                                { type: 'select', label: 'Border Type', value: 'bordertype', disabled: true,
+                                    menu: [
+                                        { text: 'Solid', value: 'solid', checked: true },
+                                        { text: 'Dashed', value: 'dashed' },
+                                        { text: 'Dotted', value: 'dotted' }
+                                    ]
+                                },
+                                { type: 'color', label: 'Border Color', value: 'bordercolor', disabled: true }
+                            ]
+                        }
+                    ]
+                    /* }}} */
+                });
+                
+                var bsize = '0';
+                var btype = 'solid';
+                if (el.style.borderLeftWidth) {
+                    bsize = parseInt(el.style.borderLeftWidth, 10);
+                }
+                if (el.style.borderLeftStyle) {
+                    btype = el.style.borderLeftStyle;
+                }
+                var bs_button = tbar.getButtonByValue('bordersize');
+                var bSizeStr = ((parseInt(bsize, 10) > 0) ? '' : 'none');
+                bs_button.set('label', '<span class="yui-toolbar-bordersize-' + bsize + '">'+bSizeStr+'</span>');
+                this._updateMenuChecked('bordersize', bsize, tbar);
+
+                var bt_button = tbar.getButtonByValue('bordertype');
+                bt_button.set('label', '<span class="yui-toolbar-bordertype-' + btype + '"></span>');
+                this._updateMenuChecked('bordertype', btype, tbar);
+                if (parseInt(bsize, 10) > 0) {
+                    tbar.enableButton(bt_button);
+                    tbar.enableButton(bs_button);
+                }
+
+                var cont = tbar.get('cont');
+                var hw = document.createElement('div');
+                hw.className = 'yui-toolbar-group yui-toolbar-group-height-width height-width';
+                hw.innerHTML = '<h3>' + this.STR_IMAGE_SIZE + ':</h3>';
+                var orgSize = '';
+                if ((height != oheight) || (width != owidth)) {
+                    orgSize = '<span class="info">' + this.STR_IMAGE_ORIG_SIZE + '<br>'+ owidth +' x ' + oheight + '</span>';
+                }
+                hw.innerHTML += '<span><input type="text" size="3" value="'+width+'" id="insertimage_width"> x <input type="text" size="3" value="'+height+'" id="insertimage_height"></span>' + orgSize;
+                cont.insertBefore(hw, cont.firstChild);
+
+                Event.onAvailable('insertimage_width', function() {
+                    Event.on('insertimage_width', 'blur', function() {
+                        var value = parseInt(Dom.get('insertimage_width').value, 10);
+                        if (value > 5) {
+                            el.style.width = value + 'px';
+                            this.moveWindow();
+                        }
+                    }, this, true);
+                }, this, true);
+                Event.onAvailable('insertimage_height', function() {
+                    Event.on('insertimage_height', 'blur', function() {
+                        var value = parseInt(Dom.get('insertimage_height').value, 10);
+                        if (value > 5) {
+                            el.style.height = value + 'px';
+                            this.moveWindow();
+                        }
+                    }, this, true);
+                }, this, true);
+
+                if ((el.align == 'right') || (el.align == 'left')) {
+                    tbar.selectButton(el.align);
+                } else if (el.style.display == 'block') {
+                    tbar.selectButton('block');
+                } else {
+                    tbar.selectButton('inline');
+                }
+                if (parseInt(el.style.marginLeft, 10) > 0) {
+                     tbar.getButtonByValue('padding').set('label', ''+parseInt(el.style.marginLeft, 10));
+                }
+                if (el.style.borderSize) {
+                    tbar.selectButton('bordersize');
+                    tbar.selectButton(parseInt(el.style.borderSize, 10));
+                }
+
+                tbar.on('colorPickerClicked', function(o) {
+                    var size = '1', type = 'solid', color = 'black';
+
+                    if (el.style.borderLeftWidth) {
+                        size = parseInt(el.style.borderLeftWidth, 10);
+                    }
+                    if (el.style.borderLeftStyle) {
+                        type = el.style.borderLeftStyle;
+                    }
+                    if (el.style.borderLeftColor) {
+                        color = el.style.borderLeftColor;
+                    }
+                    var borderString = size + 'px ' + type + ' #' + o.color;
+                    el.style.border = borderString;
+                }, this.toolbar, true);
+
+                tbar.on('buttonClick', function(o) {
+                    var value = o.button.value,
+                        borderString = '';
+                    if (o.button.menucmd) {
+                        value = o.button.menucmd;
+                    }
+                    var size = '1', type = 'solid', color = 'black';
+
+                    /* All border calcs are done on the left border
+                        since our default interface only supports
+                        one border size/type and color */
+                    if (el.style.borderLeftWidth) {
+                        size = parseInt(el.style.borderLeftWidth, 10);
+                    }
+                    if (el.style.borderLeftStyle) {
+                        type = el.style.borderLeftStyle;
+                    }
+                    if (el.style.borderLeftColor) {
+                        color = el.style.borderLeftColor;
+                    }
+                    switch(value) {
+                        case 'bordersize':
+                            if (this.browser.webkit && this._lastImage) {
+                                Dom.removeClass(this._lastImage, 'selected');
+                                this._lastImage = null;
+                            }
+
+                            borderString = parseInt(o.button.value, 10) + 'px ' + type + ' ' + color;
+                            el.style.border = borderString;
+                            if (parseInt(o.button.value, 10) > 0) {
+                                tbar.enableButton('bordertype');
+                                tbar.enableButton('bordercolor');
+                            } else {
+                                tbar.disableButton('bordertype');
+                                tbar.disableButton('bordercolor');
+                            }
+                            break;
+                        case 'bordertype':
+                            if (this.browser.webkit && this._lastImage) {
+                                Dom.removeClass(this._lastImage, 'selected');
+                                this._lastImage = null;
+                            }
+                            borderString = size + 'px ' + o.button.value + ' ' + color;
+                            el.style.border = borderString;
+                            break;
+                        case 'right':
+                        case 'left':
+                            tbar.deselectAllButtons();
+                            el.style.display = '';
+                            el.align = o.button.value;
+                            break;
+                        case 'inline':
+                            tbar.deselectAllButtons();
+                            el.style.display = '';
+                            el.align = '';
+                            break;
+                        case 'block':
+                            tbar.deselectAllButtons();
+                            el.style.display = 'block';
+                            el.align = 'center';
+                            break;
+                        case 'padding':
+                            var _button = tbar.getButtonById(o.button.id);
+                            el.style.margin = _button.get('label') + 'px';
+                            break;
+                    }
+                    tbar.selectButton(o.button.value);
+                    this.moveWindow();
+                }, this, true);
+
+                win.setHeader(this.STR_IMAGE_PROP_TITLE);
+                win.setBody(body);
+                if ((this.browser.webkit && !this.browser.webkit3) || this.browser.opera) {
+                    win.setFooter(this.STR_IMAGE_COPY);
+                }
+                this.openWindow(win);
+
+                //Set event after openWindow..
+                Event.onAvailable('insertimage_url', function() {
+
+                    this.toolbar.selectButton('insertimage');
+
+                    window.setTimeout(function() {
+                        YAHOO.util.Dom.get('insertimage_url').focus();
+                        if (blankimage) {
+                            YAHOO.util.Dom.get('insertimage_url').select();
+                        }
+                    }, 50);
+                    
+                    if (this.get('localFileWarning')) {
+                        Event.on('insertimage_link', 'blur', function() {
+                            var url = Dom.get('insertimage_link');
+                            if (this._isLocalFile(url.value)) {
+                                //Local File throw Warning
+                                Dom.addClass(url, 'warning');
+                                YAHOO.log('Local file reference found, show local warning', 'warn', 'Editor');
+                                this.get('panel').setFooter(this.STR_LOCAL_FILE_WARNING);
+                            } else {
+                                Dom.removeClass(url, 'warning');
+                                this.get('panel').setFooter(' ');
+                                if ((this.browser.webkit && !this.browser.webkit3) || this.browser.opera) {
+                                    this.get('panel').setFooter(this.STR_IMAGE_COPY);
+                                }
+                            }
+                        }, this, true);
+
+                        Event.on('insertimage_url', 'blur', function() {
+                            var url = Dom.get('insertimage_url');
+                            if (this._isLocalFile(url.value)) {
+                                //Local File throw Warning
+                                Dom.addClass(url, 'warning');
+                                YAHOO.log('Local file reference found, show local warning', 'warn', 'Editor');
+                                this.get('panel').setFooter(this.STR_LOCAL_FILE_WARNING);
+                            } else if (this.currentElement[0]) {
+                                Dom.removeClass(url, 'warning');
+                                this.get('panel').setFooter(' ');
+                                if ((this.browser.webkit && !this.browser.webkit3) || this.browser.opera) {
+                                    this.get('panel').setFooter(this.STR_IMAGE_COPY);
+                                }
+                                
+                                if (url && url.value && (url.value != this.STR_IMAGE_HERE)) {
+                                    this.currentElement[0].setAttribute('src', url.value);
+                                    var self = this,
+                                        img = new Image();
+
+                                    img.onerror = function() {
+                                        url.value = self.STR_IMAGE_HERE;
+                                        img.setAttribute('src', self.get('blankimage'));
+                                        self.currentElement[0].setAttribute('src', self.get('blankimage'));
+                                        YAHOO.util.Dom.get('insertimage_height').value = img.height;
+                                        YAHOO.util.Dom.get('insertimage_width').value = img.width;
+                                    };
+                                    window.setTimeout(function() {
+                                        YAHOO.util.Dom.get('insertimage_height').value = img.height;
+                                        YAHOO.util.Dom.get('insertimage_width').value = img.width;
+                                        if (self.currentElement && self.currentElement[0]) {
+                                            if (!self.currentElement[0]._height) {
+                                                self.currentElement[0]._height = img.height;
+                                            }
+                                            if (!self.currentElement[0]._width) {
+                                                self.currentElement[0]._width = img.width;
+                                            }
+                                        }
+                                        self.moveWindow();
+                                    }, 200);
+
+                                    if (url.value != this.STR_IMAGE_HERE) {
+                                        img.src = url.value;
+                                    }
+                                }
+                            }
+                        }, this, true);
+                    }
+                }, this, true);
+            });
+        },
+        /**
+        * @private
+        * @method _handleInsertImageWindowClose
+        * @description Handles the closing of the Image Properties Window.
+        */
+        _handleInsertImageWindowClose: function() {
+            var url = Dom.get('insertimage_url');
+            var title = Dom.get('insertimage_title');
+            var link = Dom.get('insertimage_link');
+            var target = Dom.get('insertimage_target');
+            var el = this.currentElement[0];
+            if (url && url.value && (url.value != this.STR_IMAGE_HERE)) {
+                el.setAttribute('src', url.value);
+                el.setAttribute('title', title.value);
+                el.setAttribute('alt', title.value);
+                var par = el.parentNode;
+                if (link.value) {
+                    var urlValue = link.value;
+                    if ((urlValue.indexOf(':/'+'/') == -1) && (urlValue.substring(0,1) != '/') && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                        if ((urlValue.indexOf('@') != -1) && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                            //Found an @ sign, prefix with mailto:
+                            urlValue = 'mailto:' + urlValue;
+                        } else {
+                            /* :// not found adding */
+                            urlValue = 'http:/'+'/' + urlValue;
+                        }
+                    }
+                    if (par && this._isElement(par, 'a')) {
+                        par.setAttribute('href', urlValue);
+                        if (target.checked) {
+                            par.setAttribute('target', target.value);
+                        } else {
+                            par.setAttribute('target', '');
+                        }
+                    } else {
+                        var _a = this._getDoc().createElement('a');
+                        _a.setAttribute('href', urlValue);
+                        if (target.checked) {
+                            _a.setAttribute('target', target.value);
+                        } else {
+                            _a.setAttribute('target', '');
+                        }
+                        el.parentNode.replaceChild(_a, el);
+                        _a.appendChild(el);
+                    }
+                } else {
+                    if (par && this._isElement(par, 'a')) {
+                        par.parentNode.replaceChild(el, par);
+                    }
+                }
+            } else {
+                //No url/src given, remove the node from the document
+                el.parentNode.removeChild(el);
+            }
+            this.currentElement = [];
+            this.nodeChange();
+        },
+        /**
+        * @private
+        * @method _renderPanel
         * @description Renders the panel used for Editor Windows to the document so we can start using it..
         * @returns {<a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>}
         */
@@ -5602,6 +6969,7 @@
                     break;
                 }
             }
+            Dom.addClass(body, ((YAHOO.widget.Button && (this._defaultToolbar.buttonType == 'advanced')) ? 'good-button' : 'no-button'));
 
             var _note = document.createElement('h3');
             _note.className = 'yui-editor-skipheader';
@@ -5846,206 +7214,229 @@
             this._focusWindow();
             Event.removeListener(document, 'keypress', this._closeWindow);
         },
+        /* {{{  Command Overrides - These commands are only over written when we are using the advanced version */
         /**
-        * @method destroy
-        * @description Destroys the editor, all of it's elements and objects.
-        * @return {Boolean}
+        * @method cmd_heading
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('heading') is used.
         */
-        destroy: function() {
-            this.saveHTML();
-            this.toolbar.destroy();
-            this.setStyle('visibility', 'hidden');
-            this.setStyle('position', 'absolute');
-            this.setStyle('top', '-9999px');
-            this.setStyle('left', '-9999px');
-            var textArea = this.get('element');
-            this.get('element_cont').get('parentNode').replaceChild(textArea, this.get('element_cont').get('element'));
-            this.get('element_cont').get('element').innerHTML = '';
-            //Brutal Object Destroy
-            for (var i in this) {
-                if (Lang.hasOwnProperty(this, i)) {
-                    this[i] = null;
+        cmd_heading: function(value) {
+            var exec = true,
+                el = null,
+                action = 'heading',
+                _sel = this._getSelection(),
+                _selEl = this._getSelectedElement();
+
+            if (_selEl) {
+                _sel = _selEl;
+            }
+            
+            if (this.browser.ie) {
+                action = 'formatblock';
+            }
+            if (value == 'none') {
+                if ((_sel && _sel.tagName && (_sel.tagName.toLowerCase().substring(0,1) == 'h')) || (_sel && _sel.parentNode && _sel.parentNode.tagName && (_sel.parentNode.tagName.toLowerCase().substring(0,1) == 'h'))) {
+                    if (_sel.parentNode.tagName.toLowerCase().substring(0,1) == 'h') {
+                        _sel = _sel.parentNode;
+                    }
+                    if (this._isElement(_sel, 'html')) {
+                        return [false];
+                    }
+                    el = this._swapEl(_selEl, 'span', function(el) {
+                        el.className = 'yui-non';
+                    });
+                    this._selectNode(el);
+                    this.currentElement[0] = el;
                 }
+                exec = false;
+            } else {
+                if (this._isElement(_selEl, 'h1') || this._isElement(_selEl, 'h2') || this._isElement(_selEl, 'h3') || this._isElement(_selEl, 'h4') || this._isElement(_selEl, 'h5') || this._isElement(_selEl, 'h6')) {
+                    el = this._swapEl(_selEl, value);
+                    this._selectNode(el);
+                    this.currentElement[0] = el;
+                } else {
+                    this._createCurrentElement(value);
+                    this._selectNode(this.currentElement[0]);
+                }
+                exec = false;
             }
-            return true;
-        },        
+            return [exec, action];
+        },
         /**
-        * @method toString
-        * @description Returns a string representing the editor.
-        * @return {String}
+        * @method cmd_hiddenelements
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('hiddenelements') is used.
         */
-        toString: function() {
-            var str = 'Editor';
-            if (this.get && this.get('element_cont')) {
-                str = 'Editor (#' + this.get('element_cont').get('id') + ')' + ((this.get('disabled') ? ' Disabled' : ''));
+        cmd_hiddenelements: function(value) {
+            if (this._showingHiddenElements) {
+                //Don't auto highlight the hidden button
+                this._lastButton = null;
+                YAHOO.log('Enabling hidden CSS File', 'info', 'SimpleEditor');
+                this._showingHiddenElements = false;
+                this.toolbar.deselectButton('hiddenelements');
+                Dom.removeClass(this._getDoc().body, this.CLASS_HIDDEN);
+            } else {
+                YAHOO.log('Disabling hidden CSS File', 'info', 'SimpleEditor');
+                this._showingHiddenElements = true;
+                Dom.addClass(this._getDoc().body, this.CLASS_HIDDEN);
+                this.toolbar.selectButton('hiddenelements');
             }
-            return str;
-        }
-    });
+            return [false];
+        },
+        /**
+        * @method cmd_removeformat
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('removeformat') is used.
+        */
+        cmd_removeformat: function(value) {
+            var exec = true;
+            /**
+            * @knownissue Remove Format issue
+            * @browser Safari 2.x
+            * @description There is an issue here with Safari, that it may not always remove the format of the item that is selected.
+            * Due to the way that Safari 2.x handles ranges, it is very difficult to determine what the selection holds.
+            * So here we are making the best possible guess and acting on it.
+            */
+            if (this.browser.webkit && !this._getDoc().queryCommandEnabled('removeformat')) {
+                var _txt = this._getSelection()+'';
+                this._createCurrentElement('span');
+                this.currentElement[0].className = 'yui-non';
+                this.currentElement[0].innerHTML = _txt;
+                for (var i = 1; i < this.currentElement.length; i++) {
+                    this.currentElement[i].parentNode.removeChild(this.currentElement[i]);
+                }
+                /*
+                this._createCurrentElement('span');
+                YAHOO.util.Dom.addClass(this.currentElement[0], 'yui-non');
+                var re= /<\S[^><]*>/g;
+                var str = this.currentElement[0].innerHTML.replace(re, '');
+                var _txt = this._getDoc().createTextNode(str);
+                this.currentElement[0].parentNode.parentNode.replaceChild(_txt, this.currentElement[0].parentNode);
+                */
+                
+                exec = false;
+            }
+            return [exec];
+        },
+        /**
+        * @method cmd_script
+        * @param action action passed from the execCommand method
+        * @param value Value passed from the execCommand method
+        * @description This is a combined execCommand override method. It is called from the cmd_superscript and cmd_subscript methods.
+        */
+        cmd_script: function(action, value) {
+            var exec = true, tag = action.toLowerCase().substring(0, 3),
+                _span = null, _selEl = this._getSelectedElement();
 
-/**
-* @event toolbarLoaded
-* @description Event is fired during the render process directly after the Toolbar is loaded. Allowing you to attach events to the toolbar. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event afterRender
-* @description Event is fired after the render process finishes. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event editorContentLoaded
-* @description Event is fired after the editor iframe's document fully loads and fires it's onload event. From here you can start injecting your own things into the document. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event editorMouseUp
-* @param {Event} ev The DOM Event that occured
-* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event editorMouseDown
-* @param {Event} ev The DOM Event that occured
-* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event editorDoubleClick
-* @param {Event} ev The DOM Event that occured
-* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event editorKeyUp
-* @param {Event} ev The DOM Event that occured
-* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event editorKeyPress
-* @param {Event} ev The DOM Event that occured
-* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event editorKeyDown
-* @param {Event} ev The DOM Event that occured
-* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event beforeNodeChange
-* @description Event fires at the beginning of the nodeChange process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event afterNodeChange
-* @description Event fires at the end of the nodeChange process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event beforeExecCommand
-* @description Event fires at the beginning of the execCommand process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event afterExecCommand
-* @description Event fires at the end of the execCommand process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event beforeOpenWindow
-* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
-* @param {Overlay} panel The Overlay object that is used to create the window.
-* @description Event fires before an Editor Window is opened. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event afterOpenWindow
-* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
-* @param {Overlay} panel The Overlay object that is used to create the window.
-* @description Event fires after an Editor Window is opened. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event closeWindow
-* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
-* @description Event fires after an Editor Window is closed. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event windowCMDOpen
-* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
-* @param {Overlay} panel The Overlay object that is used to create the window.
-* @description Dynamic event fired when an <a href="YAHOO.widget.EditorWindow.html">EditorWindow</a> is opened.. The dynamic event is based on the name of the window. Example Window: createlink, opening this window would fire the windowcreatelinkOpen event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event windowCMDClose
-* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
-* @param {Overlay} panel The Overlay object that is used to create the window.
-* @description Dynamic event fired when an <a href="YAHOO.widget.EditorWindow.html">EditorWindow</a> is closed.. The dynamic event is based on the name of the window. Example Window: createlink, opening this window would fire the windowcreatelinkClose event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-
-/**
-     * @description Singleton object used to track the open window objects and panels across the various open editors
-     * @class EditorInfo
-     * @static
-    */
-    YAHOO.widget.EditorInfo = {
+            if (this.browser.webkit) {
+                YAHOO.log('Safari dom fun again (' + action + ')..', 'info', 'EditorSafari');
+                if (this._isElement(_selEl, tag)) {
+                    YAHOO.log('we are a child of tag (' + tag + '), reverse process', 'info', 'EditorSafari');
+                    _span = this._swapEl(this.currentElement[0], 'span', function(el) {
+                        el.className = 'yui-non';
+                    });
+                    this._selectNode(_span);
+                } else {
+                    this._createCurrentElement(tag);
+                    var _sub = this._swapEl(this.currentElement[0], tag);
+                    this._selectNode(_sub);
+                    this.currentElement[0] = _sub;
+                }
+                exec = false;
+            }
+            return exec;
+        },
         /**
-        * @private
-        * @property _instances
-        * @description A reference to all editors on the page.
-        * @type Object
+        * @method cmd_superscript
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('superscript') is used.
         */
-        _instances: {},
+        cmd_superscript: function(value) {
+            return [this.cmd_script('superscript', value)];
+        },
         /**
-        * @private
-        * @property window
-        * @description A reference to the currently open window object in any editor on the page.
-        * @type Object <a href="YAHOO.widget.EditorWindow.html">YAHOO.widget.EditorWindow</a>
+        * @method cmd_subscript
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('subscript') is used.
         */
-        window: {},
+        cmd_subscript: function(value) {
+            return [this.cmd_script('subscript', value)];
+        },
         /**
-        * @private
-        * @property panel
-        * @description A reference to the currently open panel in any editor on the page.
-        * @type Object <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>
+        * @method cmd_indent
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('indent') is used.
         */
-        panel: null,
+        cmd_indent: function(value) {
+            var exec = true, selEl = this._getSelectedElement(), _bq = null;
+
+            if (this.browser.webkit || this.browser.ie || this.browser.gecko) {
+                if (this._isElement(selEl, 'blockquote')) {
+                    _bq = this._getDoc().createElement('blockquote');
+                    _bq.innerHTML = selEl.innerHTML;
+                    selEl.innerHTML = '';
+                    selEl.appendChild(_bq);
+                    this._selectNode(_bq);
+                } else {
+                    this._createCurrentElement('blockquote');
+                    for (var i = 0; i < this.currentElement.length; i++) {
+                        _bq = this._getDoc().createElement('blockquote');
+                        _bq.innerHTML = this.currentElement[i].innerHTML;
+                        this.currentElement[i].parentNode.replaceChild(_bq, this.currentElement[i]);
+                        this.currentElement[i] = _bq;
+                    }
+                    this._selectNode(this.currentElement[0]);
+                }
+                exec = false;
+            } else {
+                value = 'blockquote';
+            }
+            return [exec, 'indent', value];
+        },
         /**
-        * @method getEditorById
-        * @description Returns a reference to the Editor object associated with the given textarea
-        * @param {String/HTMLElement} id The id or reference of the textarea to return the Editor instance of
-        * @returns Object <a href="YAHOO.widget.Editor.html">YAHOO.widget.Editor</a>
+        * @method cmd_outdent
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('outdent') is used.
         */
-        getEditorById: function(id) {
-            if (!YAHOO.lang.isString(id)) {
-                //Not a string, assume a node Reference
-                id = id.id;
+        cmd_outdent: function(value) {
+            var exec = true, selEl = this._getSelectedElement(), _bq = null, _span = null;
+            if (this.browser.webkit || this.browser.ie || this.browser.gecko) {
+                selEl = this._getSelectedElement();
+                if (this._isElement(selEl, 'blockquote')) {
+                    var par = selEl.parentNode;
+                    if (this._isElement(selEl.parentNode, 'blockquote')) {
+                        par.innerHTML = selEl.innerHTML;
+                        this._selectNode(par);
+                    } else {
+                        _span = this._getDoc().createElement('span');
+                        _span.innerHTML = selEl.innerHTML;
+                        YAHOO.util.Dom.addClass(_span, 'yui-non');
+                        par.replaceChild(_span, selEl);
+                        this._selectNode(_span);
+                    }
+                } else {
+                    YAHOO.log('Can not outdent, we are not inside a blockquote', 'warn', 'Editor');
+                }
+                exec = false;
+            } else {
+                value = 'blockquote';
             }
-            if (this._instances[id]) {
-                return this._instances[id];
-            }
-            return false;
+            return [exec, 'indent', value];
         },
+        /* }}}*/        
         /**
         * @method toString
-        * @description Returns a string representing the EditorInfo.
+        * @description Returns a string representing the editor.
         * @return {String}
         */
         toString: function() {
-            var len = 0;
-            for (var i in this._instances) {
-                len++;
+            var str = 'Editor';
+            if (this.get && this.get('element_cont')) {
+                str = 'Editor (#' + this.get('element_cont').get('id') + ')' + ((this.get('disabled') ? ' Disabled' : ''));
             }
-            return 'Editor Info (' + len + ' registered intance' + ((len > 1) ? 's' : '') + ')';
+            return str;
         }
-    };
-
+    });
     /**
      * @description Class to hold Window information between uses. We use the same panel to show the windows, so using this will allow you to configure a window before it is shown.
      * This is what you pass to Editor.openWindow();. These parameters will not take effect until the openWindow() is called in the editor.
@@ -6126,8 +7517,40 @@
             return 'Editor Window (' + this.name + ')';
         }
     };
+/**
+* @event beforeOpenWindow
+* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
+* @param {Overlay} panel The Overlay object that is used to create the window.
+* @description Event fires before an Editor Window is opened. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event afterOpenWindow
+* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
+* @param {Overlay} panel The Overlay object that is used to create the window.
+* @description Event fires after an Editor Window is opened. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event closeWindow
+* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
+* @description Event fires after an Editor Window is closed. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event windowCMDOpen
+* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
+* @param {Overlay} panel The Overlay object that is used to create the window.
+* @description Dynamic event fired when an <a href="YAHOO.widget.EditorWindow.html">EditorWindow</a> is opened.. The dynamic event is based on the name of the window. Example Window: createlink, opening this window would fire the windowcreatelinkOpen event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event windowCMDClose
+* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
+* @param {Overlay} panel The Overlay object that is used to create the window.
+* @description Dynamic event fired when an <a href="YAHOO.widget.EditorWindow.html">EditorWindow</a> is closed.. The dynamic event is based on the name of the window. Example Window: createlink, opening this window would fire the windowcreatelinkClose event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
 
-
-    
 })();
-YAHOO.register("editor", YAHOO.widget.Editor, {version: "2.3.1", build: "541"});
+YAHOO.register("editor", YAHOO.widget.Editor, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/editor/editor-beta-min.js
===================================================================
--- trunk/root/static/yui/editor/editor-beta-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/editor/editor-beta-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,21 +2,24 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-(function(){var B=YAHOO.util.Dom,A=YAHOO.util.Event,D=YAHOO.lang;YAHOO.widget.Toolbar=function(G,F){if(D.isObject(arguments[0])&&!B.get(G).nodeType){F=G;}var I=(F||{});var H={element:null,attributes:I};if(D.isString(G)&&B.get(G)){H.element=B.get(G);}else{if(D.isObject(G)&&B.get(G)&&B.get(G).nodeType){H.element=B.get(G);}}if(!H.element){H.element=document.createElement("DIV");H.element.id=B.generateId();if(I.container&&B.get(I.container)){B.get(I.container).appendChild(H.element);}}if(!H.element.id){H.element.id=((D.isString(G))?G:B.generateId());}var E=document.createElement("DIV");H.attributes.cont=E;B.addClass(E,"yui-toolbar-subcont");H.element.appendChild(E);H.attributes.element=H.element;H.attributes.id=H.element.id;YAHOO.widget.Toolbar.superclass.constructor.call(this,H.element,H.attributes);};function C(H,E,I){B.addClass(this.element,"yui-toolbar-"+I.get("value")+"-menu");if(B.hasClass(I._button.parentNode.parentNode,"yui-toolbar-select")){B.addClass(this.element,"yui!
 -toolbar-select-menu");}var F=this.getItems();for(var G=0;G<F.length;G++){B.addClass(F[G].element,"yui-toolbar-"+I.get("value")+"-"+((F[G].value)?F[G].value.replace(/ /g,"-").toLowerCase():F[G]._oText.nodeValue.replace(/ /g,"-").toLowerCase()));B.addClass(F[G].element,"yui-toolbar-"+I.get("value")+"-"+((F[G].value)?F[G].value.replace(/ /g,"-"):F[G]._oText.nodeValue.replace(/ /g,"-")));}}YAHOO.extend(YAHOO.widget.Toolbar,YAHOO.util.Element,{dd:null,_colorData:{"#111111":"Obsidian","#2D2D2D":"Dark Gray","#434343":"Shale","#5B5B5B":"Flint","#737373":"Gray","#8B8B8B":"Concrete","#A2A2A2":"Gray","#B9B9B9":"Titanium","#000000":"Black","#D0D0D0":"Light Gray","#E6E6E6":"Silver","#FFFFFF":"White","#BFBF00":"Pumpkin","#FFFF00":"Yellow","#FFFF40":"Banana","#FFFF80":"Pale Yellow","#FFFFBF":"Butter","#525330":"Raw Siena","#898A49":"Mildew","#AEA945":"Olive","#7F7F00":"Paprika","#C3BE71":"Earth","#E0DCAA":"Khaki","#FCFAE1":"Cream","#60BF00":"Cactus","#80FF00":"Chartreuse","#A0FF40":"Gree!
 n","#C0FF80":"Pale Lime","#DFFFBF":"Light Mint","#3B5738":"Gre!
 en","#66
8F5A":"Lime Gray","#7F9757":"Yellow","#407F00":"Clover","#8A9B55":"Pistachio","#B7C296":"Light Jade","#E6EBD5":"Breakwater","#00BF00":"Spring Frost","#00FF80":"Pastel Green","#40FFA0":"Light Emerald","#80FFC0":"Sea Foam","#BFFFDF":"Sea Mist","#033D21":"Dark Forrest","#438059":"Moss","#7FA37C":"Medium Green","#007F40":"Pine","#8DAE94":"Yellow Gray Green","#ACC6B5":"Aqua Lung","#DDEBE2":"Sea Vapor","#00BFBF":"Fog","#00FFFF":"Cyan","#40FFFF":"Turquoise Blue","#80FFFF":"Light Aqua","#BFFFFF":"Pale Cyan","#033D3D":"Dark Teal","#347D7E":"Gray Turquoise","#609A9F":"Green Blue","#007F7F":"Seaweed","#96BDC4":"Green Gray","#B5D1D7":"Soapstone","#E2F1F4":"Light Turquoise","#0060BF":"Summer Sky","#0080FF":"Sky Blue","#40A0FF":"Electric Blue","#80C0FF":"Light Azure","#BFDFFF":"Ice Blue","#1B2C48":"Navy","#385376":"Biscay","#57708F":"Dusty Blue","#00407F":"Sea Blue","#7792AC":"Sky Blue Gray","#A8BED1":"Morning Sky","#DEEBF6":"Vapor","#0000BF":"Deep Blue","#0000FF":"Blue","#4040FF":"Cerule!
 an Blue","#8080FF":"Evening Blue","#BFBFFF":"Light Blue","#212143":"Deep Indigo","#373E68":"Sea Blue","#444F75":"Night Blue","#00007F":"Indigo Blue","#585E82":"Dockside","#8687A4":"Blue Gray","#D2D1E1":"Light Blue Gray","#6000BF":"Neon Violet","#8000FF":"Blue Violet","#A040FF":"Violet Purple","#C080FF":"Violet Dusk","#DFBFFF":"Pale Lavender","#302449":"Cool Shale","#54466F":"Dark Indigo","#655A7F":"Dark Violet","#40007F":"Violet","#726284":"Smoky Violet","#9E8FA9":"Slate Gray","#DCD1DF":"Violet White","#BF00BF":"Royal Violet","#FF00FF":"Fuchsia","#FF40FF":"Magenta","#FF80FF":"Orchid","#FFBFFF":"Pale Magenta","#4A234A":"Dark Purple","#794A72":"Medium Purple","#936386":"Cool Granite","#7F007F":"Purple","#9D7292":"Purple Moon","#C0A0B6":"Pale Purple","#ECDAE5":"Pink Cloud","#BF005F":"Hot Pink","#FF007F":"Deep Pink","#FF409F":"Grape","#FF80BF":"Electric Pink","#FFBFDF":"Pink","#451528":"Purple Red","#823857":"Purple Dino","#A94A76":"Purple Gray","#7F003F":"Rose","#BC6F95":"Anti!
 que Mauve","#D8A5BB":"Cool Marble","#F7DDE9":"Pink Granite","#!
 C00000":
"Apple","#FF0000":"Fire Truck","#FF4040":"Pale Red","#FF8080":"Salmon","#FFC0C0":"Warm Pink","#441415":"Sepia","#82393C":"Rust","#AA4D4E":"Brick","#800000":"Brick Red","#BC6E6E":"Mauve","#D8A3A4":"Shrimp Pink","#F8DDDD":"Shell Pink","#BF5F00":"Dark Orange","#FF7F00":"Orange","#FF9F40":"Grapefruit","#FFBF80":"Canteloupe","#FFDFBF":"Wax","#482C1B":"Dark Brick","#855A40":"Dirt","#B27C51":"Tan","#7F3F00":"Nutmeg","#C49B71":"Mustard","#E1C4A8":"Pale Tan","#FDEEE0":"Marble"},_colorPicker:null,STR_COLLAPSE:"Collapse Toolbar",STR_SPIN_LABEL:"Spin Button with value {VALUE}. Use Control Shift Up Arrow and Control Shift Down arrow keys to increase or decrease the value.",STR_SPIN_UP:"Click to increase the value of this input",STR_SPIN_DOWN:"Click to decrease the value of this input",_titlebar:null,_disabled:null,browser:YAHOO.env.ua,_buttonList:null,_buttonGroupList:null,_sep:null,_sepCount:null,_dragHandle:null,_toolbarConfigs:{renderer:true},CLASS_CONTAINER:"yui-toolbar-container",CL!
 ASS_DRAGHANDLE:"yui-toolbar-draghandle",CLASS_SEPARATOR:"yui-toolbar-separator",CLASS_DISABLED:"yui-toolbar-disabled",CLASS_PREFIX:"yui-toolbar",init:function(F,E){YAHOO.widget.Toolbar.superclass.init.call(this,F,E);},initAttributes:function(E){YAHOO.widget.Toolbar.superclass.initAttributes.call(this,E);var F=this.get("element");this.addClass(this.CLASS_CONTAINER);this.setAttributeConfig("buttons",{value:[],writeOnce:true,method:function(H){for(var G in H){if(D.hasOwnProperty(H,G)){if(H[G].type=="separator"){this.addSeparator();}else{if(H[G].group!==undefined){this.addButtonGroup(H[G]);}else{this.addButton(H[G]);}}}}}});this.setAttributeConfig("disabled",{value:false,method:function(I){if(this.get("disabled")===I){return false;}if(!D.isObject(this._disabled)){this._disabled={};}if(I){this.addClass(this.CLASS_DISABLED);this.set("draggable",false);}else{this.removeClass(this.CLASS_DISABLED);if(this._configs.draggable._initialConfig.value){this.set("draggable",true);
-}}var G=this._buttonList.length;for(var H=0;H<G;H++){if(I){if(this._buttonList[H].get("disabled")){this._disabled[H]=true;}else{this._disabled[H]=null;}this.disableButton(this._buttonList[H].get("id"));}else{var K=this._buttonList[H];var J=K._configs.disabled._initialConfig.value;if(this._disabled[H]===true){J=true;}if(!J){this.enableButton(K.get("id"));}}}if(!I){this._disabled={};}}});this.setAttributeConfig("cont",{value:E.cont,readOnly:true});this.setAttributeConfig("grouplabels",{value:E.grouplabels||true,method:function(G){if(G){B.removeClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"));}else{B.addClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"));}}});this.setAttributeConfig("titlebar",{value:false,method:function(H){if(H){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar);}this._titlebar=document.createElement("DIV");B.addClass(this._titlebar,this.CLASS_PREFIX+"-titlebar");if(D.isString(H)){var G=do!
 cument.createElement("h2");G.tabIndex="-1";G.innerHTML=H;this._titlebar.appendChild(G);}if(this.get("firstChild")){this.insertBefore(this._titlebar,this.get("firstChild"));}else{this.appendChild(this._titlebar);}if(this.get("collapse")){this.set("collapse",true);}}else{if(this._titlebar){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar);}}}}});this.setAttributeConfig("collapse",{value:false,method:function(I){var H=null;var G=B.getElementsByClassName("collapse","span",this._titlebar);if(I){if(G.length>0){return true;}H=document.createElement("SPAN");H.innerHTML="X";H.title=this.STR_COLLAPSE;B.addClass(H,"collapse");this._titlebar.appendChild(H);A.addListener(H,"click",function(){if(B.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false);}else{this.collapse();}},this,true);}else{H=B.getElementsByClassName("collapse","span",this._titlebar);if(H[0]){if(B.hasClass(this.get("cont").parentNo!
 de,"yui-toolbar-container-collapsed")){this.collapse(false);}H!
 [0].pare
ntNode.removeChild(H[0]);}}}});this.setAttributeConfig("draggable",{value:(E.draggable||false),method:function(G){var H=this.get("element");if(G&&!this.get("titlebar")){if(!this._dragHandle){this._dragHandle=document.createElement("SPAN");this._dragHandle.innerHTML="|";this._dragHandle.setAttribute("title","Click to drag the toolbar");this._dragHandle.id=this.get("id")+"_draghandle";B.addClass(this._dragHandle,this.CLASS_DRAGHANDLE);if(this.get("cont").hasChildNodes()){this.get("cont").insertBefore(this._dragHandle,this.get("cont").firstChild);}else{this.get("cont").appendChild(this._dragHandle);}this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._dragHandle.id);}}else{if(this._dragHandle){this._dragHandle.parentNode.removeChild(this._dragHandle);this._dragHandle=null;this.dd=null;}}if(this._titlebar){if(G){this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._titlebar);B.addClass(this._titlebar,"draggable");}else{B.removeClass(this._titleba!
 r,"draggable");if(this.dd){this.dd.unreg();this.dd=null;}}}},validator:function(H){var G=true;if(!YAHOO.util.DD){G=false;}return G;}});},addButtonGroup:function(I){if(!this.get("element")){this._queue[this._queue.length]=["addButtonGroup",arguments];return false;}if(!this.hasClass(this.CLASS_PREFIX+"-grouped")){this.addClass(this.CLASS_PREFIX+"-grouped");}var J=document.createElement("DIV");B.addClass(J,this.CLASS_PREFIX+"-group");B.addClass(J,this.CLASS_PREFIX+"-group-"+I.group);if(I.label){var F=document.createElement("h3");F.innerHTML=I.label;J.appendChild(F);}if(!this.get("grouplabels")){B.addClass(this.get("cont"),this.CLASS_PREFIX,"-nogrouplabels");}this.get("cont").appendChild(J);var H=document.createElement("ul");J.appendChild(H);if(!this._buttonGroupList){this._buttonGroupList={};}this._buttonGroupList[I.group]=H;for(var G=0;G<I.buttons.length;G++){var E=document.createElement("li");E.className=this.CLASS_PREFIX+"-groupitem";H.appendChild(E);if((I.buttons[G].type!=!
 =undefined)&&I.buttons[G].type=="separator"){this.addSeparator!
 (E);}els
e{I.buttons[G].container=E;this.addButton(I.buttons[G]);}}},addButtonToGroup:function(G,H,I){var F=this._buttonGroupList[H];var E=document.createElement("li");E.className=this.CLASS_PREFIX+"-groupitem";G.container=E;this.addButton(G,I);F.appendChild(E);},addButton:function(P,E){if(!this.get("element")){this._queue[this._queue.length]=["addButton",arguments];return false;}if(!this._buttonList){this._buttonList=[];}this._configs.buttons.value[this._configs.buttons.value.length]=P;if(!P.container){P.container=this.get("cont");}if((P.type=="menu")||(P.type=="split")||(P.type=="select")){if(D.isArray(P.menu)){for(var K in P.menu){if(D.hasOwnProperty(P.menu,K)){var S={fn:function(V,T,U){if(!P.menucmd){P.menucmd=P.value;}P.value=((U.value)?U.value:U._oText.nodeValue);},scope:this};P.menu[K].onclick=S;}}}}var N={};for(var I in P){if(D.hasOwnProperty(P,I)){if(!this._toolbarConfigs[I]){N[I]=P[I];}}}if(P.type=="select"){N.type="menu";}if(P.type=="spin"){N.type="push";}if(N.type=="color!
 "){N=this._makeColorButton(N);}if(N.menu){if(P.menu instanceof YAHOO.widget.Overlay){P.menu.showEvent.subscribe(function(){this._button=N;});}else{for(var J=0;J<N.menu.length;J++){if(!N.menu[J].value){N.menu[J].value=N.menu[J].text;}}if(this.browser.webkit){N.focusmenu=false;}}}var L=new YAHOO.widget.Button(N);if(this.get("disabled")){L.set("disabled",true);}if(!P.id){P.id=L.get("id");}if(E){var H=L.get("element");var F=null;if(E.get){F=E.get("element").nextSibling;}else{if(E.nextSibling){F=E.nextSibling;}}if(F){F.parentNode.insertBefore(H,F);}}L.addClass(this.CLASS_PREFIX+"-"+L.get("value"));var O=document.createElement("span");O.className=this.CLASS_PREFIX+"-icon";L.get("element").insertBefore(O,L.get("firstChild"));var Q=document.createElement("a");Q.innerHTML=L._button.innerHTML;Q.href="#";A.on(Q,"click",function(T){A.stopEvent(T);});L._button.parentNode.replaceChild(Q,L._button);L._button=Q;if(P.type=="select"){L.addClass(this.CLASS_PREFIX+"-select");
-}if(P.type=="spin"){if(!D.isArray(P.range)){P.range=[10,100];}this._makeSpinButton(L,P);}L.get("element").setAttribute("title",L.get("label"));if(P.type!="spin"){if(N.menu instanceof YAHOO.widget.Overlay){var M=function(V){var T=true;if(V.keyCode&&(V.keyCode==9)){T=false;}if(T){this._colorPicker._button=P.value;var U=L.getMenu().element;if(U.style.visibility=="hidden"){L.getMenu().show();}else{L.getMenu().hide();}}YAHOO.util.Event.stopEvent(V);};L.on("mousedown",M,P,this);L.on("keydown",M,P,this);}else{if((P.type!="menu")&&(P.type!="select")){L.on("keypress",this._buttonClick,P,this);L.on("mousedown",function(T){YAHOO.util.Event.stopEvent(T);this._buttonClick(T,P);},P,this);L.on("click",function(T){YAHOO.util.Event.stopEvent(T);});}else{L.on("mousedown",function(T){YAHOO.util.Event.stopEvent(T);});L.on("click",function(T){YAHOO.util.Event.stopEvent(T);});var R=this;L.getMenu().mouseDownEvent.subscribe(function(V,U){var T=U[1];YAHOO.util.Event.stopEvent(U[0]);L._onMenuClick(!
 U[0],L);if(!P.menucmd){P.menucmd=P.value;}P.value=((T.value)?T.value:T._oText.nodeValue);R._buttonClick.call(R,U[1],P);L._hideMenu();return false;});L.getMenu().clickEvent.subscribe(function(U,T){YAHOO.util.Event.stopEvent(T[0]);});}}}else{L.on("mousedown",function(T){YAHOO.util.Event.stopEvent(T);});L.on("click",function(T){YAHOO.util.Event.stopEvent(T);});}if(this.browser.ie){L.DOM_EVENTS.focusin=true;L.DOM_EVENTS.focusout=true;L.on("focusin",function(T){YAHOO.util.Event.stopEvent(T);},P,this);L.on("focusout",function(T){YAHOO.util.Event.stopEvent(T);},P,this);L.on("click",function(T){YAHOO.util.Event.stopEvent(T);},P,this);}if(this.browser.webkit){L.hasFocus=function(){return true;};}this._buttonList[this._buttonList.length]=L;if((P.type=="menu")||(P.type=="split")||(P.type=="select")){if(D.isArray(P.menu)){var G=L.getMenu();G.renderEvent.subscribe(C,L);if(P.renderer){G.renderEvent.subscribe(P.renderer,L);}}}return P;},addSeparator:function(E,H){if(!this.get("element")){!
 this._queue[this._queue.length]=["addSeparator",arguments];ret!
 urn fals
e;}var F=((E)?E:this.get("cont"));if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false;}if(this._sepCount===null){this._sepCount=0;}if(!this._sep){this._sep=document.createElement("SPAN");B.addClass(this._sep,this.CLASS_SEPARATOR);this._sep.innerHTML="|";}var G=this._sep.cloneNode(true);this._sepCount++;B.addClass(G,this.CLASS_SEPARATOR+"-"+this._sepCount);if(H){var I=null;if(H.get){I=H.get("element").nextSibling;}else{if(H.nextSibling){I=H.nextSibling;}else{I=H;}}if(I){if(I==H){I.parentNode.appendChild(G);}else{I.parentNode.insertBefore(G,I);}}}else{F.appendChild(G);}return G;},_createColorPicker:function(J){if(B.get(J+"_colors")){B.get(J+"_colors").parentNode.removeChild(B.get(J+"_colors"));}var F=document.createElement("div");F.className="yui-toolbar-colors";F.id=J+"_colors";F.style.display="none";A.on(window,"load",function(){document.body.appendChild(F);},this,true);this._colorPicker=F;var I="";for(var H in this._colorData){if!
 (D.hasOwnProperty(this._colorData,H)){I+="<a style=\"background-color: "+H+"\" href=\"#\">"+H.replace("#","")+"</a>";}}I+="<span><em>X</em><strong></strong></span>";F.innerHTML=I;var G=F.getElementsByTagName("em")[0];var E=F.getElementsByTagName("strong")[0];A.on(F,"mouseover",function(L){var K=A.getTarget(L);if(K.tagName.toLowerCase()=="a"){G.style.backgroundColor=K.style.backgroundColor;E.innerHTML=this._colorData["#"+K.innerHTML]+"<br>"+K.innerHTML;}},this,true);A.on(F,"focus",function(K){A.stopEvent(K);});A.on(F,"click",function(K){A.stopEvent(K);});A.on(F,"mousedown",function(L){A.stopEvent(L);var K=A.getTarget(L);if(K.tagName.toLowerCase()=="a"){this.fireEvent("colorPickerClicked",{type:"colorPickerClicked",target:this,button:this._colorPicker._button,color:K.innerHTML,colorName:this._colorData["#"+K.innerHTML]});this.getButtonByValue(this._colorPicker._button).getMenu().hide();}},this,true);},_resetColorPicker:function(){var F=this._colorPicker.getElementsByTagName("!
 em")[0];var E=this._colorPicker.getElementsByTagName("strong")!
 [0];F.st
yle.backgroundColor="transparent";E.innerHTML="";},_makeColorButton:function(E){if(!this._colorPicker){this._createColorPicker(this.get("id"));}E.type="color";E.menu=new YAHOO.widget.Overlay(this.get("id")+"_"+E.value+"_menu",{visbile:false,position:"absolute"});E.menu.setBody("");E.menu.render(this.get("cont"));E.menu.beforeShowEvent.subscribe(function(){E.menu.cfg.setProperty("zindex",5);E.menu.cfg.setProperty("context",[this.getButtonById(E.id).get("element"),"tl","bl"]);this._resetColorPicker();var F=this._colorPicker;if(F.parentNode){F.parentNode.removeChild(F);}E.menu.setBody("");E.menu.appendToBody(F);this._colorPicker.style.display="block";},this,true);return E;},_makeSpinButton:function(R,L){R.addClass(this.CLASS_PREFIX+"-spinbutton");var S=this,N=R._button.parentNode.parentNode,I=L.range,H=document.createElement("a"),G=document.createElement("a");H.href="#";G.href="#";H.className="up";H.title=this.STR_SPIN_UP;H.innerHTML=this.STR_SPIN_UP;G.className="down";G.title=!
 this.STR_SPIN_DOWN;G.innerHTML=this.STR_SPIN_DOWN;N.appendChild(H);N.appendChild(G);var M=YAHOO.lang.substitute(this.STR_SPIN_LABEL,{VALUE:R.get("label")});R.set("title",M);var Q=function(T){T=((T<I[0])?I[0]:T);T=((T>I[1])?I[1]:T);return T;};var P=this.browser;var F=false;var K=this.STR_SPIN_LABEL;if(this._titlebar&&this._titlebar.firstChild){F=this._titlebar.firstChild;}var E=function(U){YAHOO.util.Event.stopEvent(U);if(!R.get("disabled")&&(U.keyCode!=9)){var V=parseInt(R.get("label"),10);V++;V=Q(V);R.set("label",""+V);var T=YAHOO.lang.substitute(K,{VALUE:R.get("label")});R.set("title",T);if(!P.webkit&&F){}S._buttonClick(U,L);}};var O=function(U){YAHOO.util.Event.stopEvent(U);if(!R.get("disabled")&&(U.keyCode!=9)){var V=parseInt(R.get("label"),10);V--;V=Q(V);R.set("label",""+V);var T=YAHOO.lang.substitute(K,{VALUE:R.get("label")});R.set("title",T);if(!P.webkit&&F){}S._buttonClick(U,L);}};var J=function(T){if(T.keyCode==38){E(T);
-}else{if(T.keyCode==40){O(T);}else{if(T.keyCode==107&&T.shiftKey){E(T);}else{if(T.keyCode==109&&T.shiftKey){O(T);}}}}};R.on("keydown",J,this,true);A.on(H,"mousedown",function(T){A.stopEvent(T);},this,true);A.on(G,"mousedown",function(T){A.stopEvent(T);},this,true);A.on(H,"click",E,this,true);A.on(G,"click",O,this,true);},_buttonClick:function(L,F){var E=true;if(L&&L.type=="keypress"){if(L.keyCode==9){E=false;}else{if((L.keyCode===13)||(L.keyCode===0)||(L.keyCode===32)){}else{E=false;}}}if(E){var N=true,H=false;if(F.value){H=this.fireEvent(F.value+"Click",{type:F.value+"Click",target:this.get("element"),button:F});if(H===false){N=false;}}if(F.menucmd&&N){H=this.fireEvent(F.menucmd+"Click",{type:F.menucmd+"Click",target:this.get("element"),button:F});if(H===false){N=false;}}if(N){this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:F});}if(F.type=="select"){var K=this.getButtonById(F.id);var J=F.value;for(var I=0;I<F.menu.length;I++){if(F.menu[I]!
 .value==F.value){J=F.menu[I].text;break;}}K.set("label","<span class=\"yui-toolbar-"+F.menucmd+"-"+(F.value).replace(/ /g,"-").toLowerCase()+"\">"+J+"</span>");var M=K.getMenu().getItems();for(var G=0;G<M.length;G++){if(M[G].value.toLowerCase()==F.value.toLowerCase()){M[G].cfg.setProperty("checked",true);}else{M[G].cfg.setProperty("checked",false);}}}}if(L){A.stopEvent(L);}},getButtonById:function(G){var E=this._buttonList.length;for(var F=0;F<E;F++){if(this._buttonList[F].get("id")==G){return this._buttonList[F];}}return false;},getButtonByValue:function(K){var H=this.get("buttons");var F=H.length;for(var I=0;I<F;I++){if(H[I].group!==undefined){for(var E=0;E<H[I].buttons.length;E++){if((H[I].buttons[E].value==K)||(H[I].buttons[E].menucmd==K)){return this.getButtonById(H[I].buttons[E].id);}if(H[I].buttons[E].menu){for(var J=0;J<H[I].buttons[E].menu.length;J++){if(H[I].buttons[E].menu[J].value==K){return this.getButtonById(H[I].buttons[E].id);}}}}}else{if((H[I].value==K)||(H!
 [I].menucmd==K)){return this.getButtonById(H[I].id);}if(H[I].m!
 enu){for
(var G=0;G<H[I].menu.length;G++){if(H[I].menu[G].value==K){return this.getButtonById(H[I].id);}}}}}return false;},getButtonByIndex:function(E){if(this._buttonList[E]){return this._buttonList[E];}else{return false;}},getButtons:function(){return this._buttonList;},disableButton:function(F){var E=F;if(D.isString(F)){E=this.getButtonById(F);}if(D.isNumber(F)){E=this.getButtonByIndex(F);}if(!(E instanceof YAHOO.widget.Button)){E=this.getButtonByValue(F);}if(E instanceof YAHOO.widget.Button){E.set("disabled",true);}else{return false;}},enableButton:function(F){if(this.get("disabled")){return false;}var E=F;if(D.isString(F)){E=this.getButtonById(F);}if(D.isNumber(F)){E=this.getButtonByIndex(F);}if(!(E instanceof YAHOO.widget.Button)){E=this.getButtonByValue(F);}if(E instanceof YAHOO.widget.Button){if(E.get("disabled")){E.set("disabled",false);}}else{return false;}},selectButton:function(I,G){var F=I;if(I){if(D.isString(I)){F=this.getButtonById(I);}if(D.isNumber(I)){F=this.getButto!
 nByIndex(I);}if(!(F instanceof YAHOO.widget.Button)){F=this.getButtonByValue(I);}if(F instanceof YAHOO.widget.Button){F.addClass("yui-button-selected");F.addClass("yui-button-"+F.get("value")+"-selected");if(G){var H=F.getMenu().getItems();for(var E=0;E<H.length;E++){if(H[E].value==G){H[E].cfg.setProperty("checked",true);F.set("label","<span class=\"yui-toolbar-"+F.get("value")+"-"+(G).replace(/ /g,"-").toLowerCase()+"\">"+H[E]._oText.nodeValue+"</span>");}else{H[E].cfg.setProperty("checked",false);}}}}else{return false;}}},deselectButton:function(F){var E=F;if(D.isString(F)){E=this.getButtonById(F);}if(D.isNumber(F)){E=this.getButtonByIndex(F);}if(!(E instanceof YAHOO.widget.Button)){E=this.getButtonByValue(F);}if(E instanceof YAHOO.widget.Button){E.removeClass("yui-button-selected");E.removeClass("yui-button-"+E.get("value")+"-selected");E.removeClass("yui-button-hover");}else{return false;}},deselectAllButtons:function(){var E=this._buttonList.length;for(var F=0;F<E;F++)!
 {this.deselectButton(this._buttonList[F]);}},disableAllButtons!
 :functio
n(){if(this.get("disabled")){return false;}var E=this._buttonList.length;for(var F=0;F<E;F++){this.disableButton(this._buttonList[F]);}},enableAllButtons:function(){if(this.get("disabled")){return false;}var E=this._buttonList.length;for(var F=0;F<E;F++){this.enableButton(this._buttonList[F]);}},resetAllButtons:function(I){if(!D.isObject(I)){I={};}if(this.get("disabled")){return false;}var E=this._buttonList.length;for(var F=0;F<E;F++){var H=this._buttonList[F];var G=H._configs.disabled._initialConfig.value;if(I[H.get("id")]){this.enableButton(H);this.selectButton(H);}else{if(G){this.disableButton(H);}else{this.enableButton(H);}this.deselectButton(H);}}},destroyButton:function(I){var G=I;if(D.isString(I)){G=this.getButtonById(I);}if(D.isNumber(I)){G=this.getButtonByIndex(I);}if(!(G instanceof YAHOO.widget.Button)){G=this.getButtonByValue(I);}if(G instanceof YAHOO.widget.Button){var H=G.get("id");G.destroy();var E=this._buttonList.length;for(var F=0;F<E;F++){if(this._buttonLi!
 st[F].get("id")==H){this._buttonList[F]=null;}}}else{return false;}},destroy:function(){this.get("element").innerHTML="";this.get("element").className="";for(var E in this){if(D.hasOwnProperty(this,E)){this[E]=null;}}return true;},collapse:function(F){var E=B.getElementsByClassName("collapse","span",this._titlebar);if(F===false){B.removeClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");if(E[0]){B.removeClass(E[0],"collapsed");}this.fireEvent("toolbarExpanded",{type:"toolbarExpanded",target:this});}else{if(E[0]){B.addClass(E[0],"collapsed");}B.addClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");this.fireEvent("toolbarCollapsed",{type:"toolbarCollapsed",target:this});}},toString:function(){return"Toolbar (#"+this.get("element").id+") with "+this._buttonList.length+" buttons.";}});})();(function(){var C=YAHOO.util.Dom,A=YAHOO.util.Event,D=YAHOO.lang,B=YAHOO.widget.Toolbar;
-YAHOO.widget.Editor=function(H,F){var J={element:null,attributes:(F||{})},L=null;if(D.isString(H)){L=H;}else{L=H.id;}J.element=H;var G=document.createElement("DIV");J.attributes.element_cont=new YAHOO.util.Element(G,{id:L+"_container"});var K=document.createElement("div");C.addClass(K,"first-child");J.attributes.element_cont.appendChild(K);if(!J.attributes.toolbar_cont){J.attributes.toolbar_cont=document.createElement("DIV");J.attributes.toolbar_cont.id=L+"_toolbar";K.appendChild(J.attributes.toolbar_cont);}var I=document.createElement("DIV");K.appendChild(I);J.attributes.editor_wrapper=I;YAHOO.widget.Editor.superclass.constructor.call(this,J.element,J.attributes);};function E(F){return F.replace(/ /g,"-").toLowerCase();}YAHOO.extend(YAHOO.widget.Editor,YAHOO.util.Element,{_lastButton:null,_baseHREF:function(){var F=document.location.href;if(F.indexOf("?")!==-1){F=F.substring(0,F.indexOf("?"));}F=F.substring(0,F.lastIndexOf("/"))+"/";return F;}(),_lastImage:null,_blankImage!
 Loaded:false,_fixNodesTimer:null,_nodeChangeTimer:null,_lastNodeChangeEvent:null,_lastNodeChange:0,_rendered:false,DOMReady:null,_selection:null,_mask:null,_showingHiddenElements:null,currentWindow:null,currentEvent:null,operaEvent:null,currentFont:null,currentElement:[],dompath:null,beforeElement:null,afterElement:null,invalidHTML:{form:true,input:true,button:true,select:true,link:true,html:true,body:true,script:true,style:true,textarea:true},toolbar:null,_contentTimer:null,_contentTimerCounter:0,_disabled:["createlink","forecolor","backcolor","fontname","fontsize","superscript","subscript","removeformat","heading","indent"],_alwaysDisabled:{"outdent":true},_alwaysEnabled:{hiddenelements:true},_semantic:{"bold":true,"italic":true,"underline":true},_tag2cmd:{"b":"bold","strong":"bold","i":"italic","em":"italic","u":"underline","sup":"superscript","sub":"subscript","img":"insertimage","a":"createlink","ul":"insertunorderedlist","ol":"insertorderedlist"},_createIframe:functio!
 n(){var J=document.createElement("iframe");J.id=this.get("id")!
 +"_edito
r";var H={border:"0",frameBorder:"0",marginWidth:"0",marginHeight:"0",leftMargin:"0",topMargin:"0",allowTransparency:"true",width:"100%"};for(var I in H){if(D.hasOwnProperty(H,I)){J.setAttribute(I,H[I]);}}var G="javascript:;";if(this.browser.ie){G="about:blank";}J.setAttribute("src",G);var F=new YAHOO.util.Element(J);F.setStyle("zIndex","-1");return F;},_isElement:function(G,F){if(G&&G.tagName&&(G.tagName.toLowerCase()==F)){return true;}if(G&&G.getAttribute&&(G.getAttribute("tag")==F)){return true;}return false;},_getDoc:function(){var F=false;if(this.get){if(this.get("iframe")){if(this.get("iframe").get){if(this.get("iframe").get("element")){try{if(this.get("iframe").get("element").contentWindow){if(this.get("iframe").get("element").contentWindow.document){F=this.get("iframe").get("element").contentWindow.document;return F;}}}catch(G){}}}}}return false;},_getWindow:function(){return this.get("iframe").get("element").contentWindow;},_focusWindow:function(F){if(this.browser.w!
 ebkit){if(F){this._getSelection().setBaseAndExtent(this._getDoc().body.firstChild,0,this._getDoc().body.firstChild,1);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(false);}}else{this._getSelection().setBaseAndExtent(this._getDoc().body,1,this._getDoc().body,1);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(false);}}this._getWindow().focus();}else{this._getWindow().focus();}},_hasSelection:function(){var H=this._getSelection();var F=this._getRange();var G=false;if(this.browser.ie||this.browser.opera){if(F.text){G=true;}if(F.html){G=true;}}else{if(this.browser.webkit){if(H+""!==""){G=true;}}else{if(H&&(H.toString()!=="")&&(H!==undefined)){G=true;}}}return G;},_getSelection:function(){var F=null;if(this._getDoc()&&this._getWindow()){if(this._getDoc().selection){F=this._getDoc().selection;}else{F=this._getWindow().getSelection();}if(this.browser.webkit){if(F.baseNode){this!
 ._selection={};this._selection.baseNode=F.baseNode;this._selec!
 tion.bas
eOffset=F.baseOffset;this._selection.extentNode=F.extentNode;this._selection.extentOffset=F.extentOffset;}else{if(this._selection!==null){F=this._getWindow().getSelection();F.setBaseAndExtent(this._selection.baseNode,this._selection.baseOffset,this._selection.extentNode,this._selection.extentOffset);this._selection=null;}}}}return F;},_selectNode:function(G){if(!G){return false;}var H=this._getSelection(),F=null;if(this.browser.ie){try{F=this.getDoc().body.createTextRange();F.moveToElementText(G);F.select();}catch(I){}}else{if(this.browser.webkit){H.setBaseAndExtent(G,0,G,G.innerText.length);}else{F=this._getDoc().createRange();F.selectNodeContents(G);H.removeAllRanges();H.addRange(F);}}},_getRange:function(){var F=this._getSelection();if(F===null){return null;}if(this.browser.webkit&&!F.getRangeAt){var H=this._getDoc().createRange();try{H.setStart(F.anchorNode,F.anchorOffset);H.setEnd(F.focusNode,F.focusOffset);}catch(G){H=this._getWindow().getSelection()+"";}return H;}if(t!
 his.browser.ie||this.browser.opera){return F.createRange();}if(F.rangeCount>0){return F.getRangeAt(0);}return null;},_setDesignMode:function(F){try{this._getDoc().designMode=F;}catch(G){}},_toggleDesignMode:function(){var G=this._getDoc().designMode,F="on";if(G=="on"){F="off";}this._setDesignMode(F);return F;},_initEditor:function(){if(this.browser.ie){this._getDoc().body.style.margin="0";}this._setDesignMode("on");this.toolbar.on("buttonClick",this._handleToolbarClick,this,true);A.on(this._getDoc(),"mouseup",this._handleMouseUp,this,true);A.on(this._getDoc(),"mousedown",this._handleMouseDown,this,true);A.on(this._getDoc(),"click",this._handleClick,this,true);A.on(this._getDoc(),"dblclick",this._handleDoubleClick,this,true);A.on(this._getDoc(),"keypress",this._handleKeyPress,this,true);A.on(this._getDoc(),"keyup",this._handleKeyUp,this,true);A.on(this._getDoc(),"keydown",this._handleKeyDown,this,true);this.toolbar.set("disabled",false);
-this.fireEvent("editorContentLoaded",{type:"editorLoaded",target:this});if(this.get("dompath")){var F=this;setTimeout(function(){F._writeDomPath.call(F);},150);}this.nodeChange(true);this._setBusy(true);},_checkLoaded:function(){this._contentTimerCounter++;if(this._contentTimer){clearTimeout(this._contentTimer);}if(this._contentTimerCounter>250){return false;}var H=false;try{if(this._getDoc()&&this._getDoc().body&&(this._getDoc().body._rteLoaded===true)){H=true;}}catch(G){H=false;}if(H===true){this._initEditor();}else{var F=this;this._contentTimer=setTimeout(function(){F._checkLoaded.call(F);},20);}},_setInitialContent:function(){var G=D.substitute(this.get("html"),{TITLE:this.STR_TITLE,CONTENT:this.get("element").value,CSS:this.get("css"),HIDDEN_CSS:this.get("hiddencss")}),F=true;if(this.browser.ie||this.browser.webkit||this.browser.opera){try{this._getDoc().open();this._getDoc().write(G);this._getDoc().close();}catch(H){F=false;}}else{this.get("iframe").get("element").src!
 ="data:text/html;charset=utf-8,"+encodeURIComponent(G);}if(F){this._checkLoaded();}},_setMarkupType:function(F){switch(this.get("markup")){case"css":this._setEditorStyle(true);break;case"default":this._setEditorStyle(false);break;case"semantic":case"xhtml":if(this._semantic[F]){this._setEditorStyle(false);}else{this._setEditorStyle(true);}break;}},_setEditorStyle:function(G){try{this._getDoc().execCommand("useCSS",false,!G);}catch(F){}},_getSelectedElement:function(){var H=this._getDoc(),F=null,G=null,I=null;if(this.browser.ie){this.currentEvent=this._getWindow().event;F=this._getRange();if(F){I=F.item?F.item(0):F.parentElement();if(I==H.body){I=null;}}if((this.currentEvent!==null)&&(this.currentEvent.keyCode===0)){I=A.getTarget(this.currentEvent);}}else{G=this._getSelection();F=this._getRange();if(!G||!F){return null;}if(!this._hasSelection()&&!this.browser.webkit){if(G.anchorNode&&(G.anchorNode.nodeType==3)){if(G.anchorNode.parentNode){I=G.anchorNode.parentNode;}if(G.anch!
 orNode.nextSibling!=G.focusNode.nextSibling){I=G.anchorNode.ne!
 xtSiblin
g;}}if(this._isElement(I,"br")){I=null;}if(!I){I=F.commonAncestorContainer;if(!F.collapsed){if(F.startContainer==F.endContainer){if(F.startOffset-F.endOffset<2){if(F.startContainer.hasChildNodes()){I=F.startContainer.childNodes[F.startOffset];}}}}}}}if(this.currentEvent!==null){switch(this.currentEvent.type){case"click":case"mousedown":case"mouseup":I=A.getTarget(this.currentEvent);break;default:break;}}else{if(this.currentElement&&this.currentElement[0]){I=this.currentElement[0];}}if(this.browser.opera||this.browser.webkit){if(this.currentEvent&&!I){I=YAHOO.util.Event.getTarget(this.currentEvent);}}if(!I||!I.tagName){I=H.body;}if(this._isElement(I,"html")){I=H.body;}if(this._isElement(I,"body")){I=H.body;}if(I&&!I.parentNode){I=H.body;}if(I===undefined){I=null;}return I;},_getDomPath:function(){var F=this._getSelectedElement();var G=[];while(F!==null){if(F.ownerDocument!=this._getDoc()){F=null;break;}if(F.nodeName&&F.nodeType&&(F.nodeType==1)){G[G.length]=F;}if(this._isElem!
 ent(F,"body")){break;}F=F.parentNode;}if(G.length===0){if(this._getDoc()&&this._getDoc().body){G[0]=this._getDoc().body;}}return G.reverse();},_writeDomPath:function(){var L=this._getDomPath(),J=[],H="",M="";for(var F=0;F<L.length;F++){var N=L[F].tagName.toLowerCase();if((N=="ol")&&(L[F].type)){N+=":"+L[F].type;}if(C.hasClass(L[F],"yui-tag")){N=L[F].getAttribute("tag");}if((this.get("markup")=="semantic")||(this.get("markup")=="xhtml")){switch(N){case"b":N="strong";break;case"i":N="em";break;}}if(!C.hasClass(L[F],"yui-non")){if(C.hasClass(L[F],"yui-tag")){M=N;}else{H=((L[F].className!=="")?"."+L[F].className.replace(/ /g,"."):"");if((H.indexOf("yui")!=-1)||(H.toLowerCase().indexOf("apple-style-span")!=-1)){H="";}M=N+((L[F].id)?"#"+L[F].id:"")+H;}switch(N){case"a":if(L[F].getAttribute("href")){M+=":"+L[F].getAttribute("href").replace("mailto:","").replace("http://","").replace("https://","");}break;case"img":var G=L[F].height;var K=L[F].width;if(L[F].style.height){G=parseInt!
 (L[F].style.height,10);}if(L[F].style.width){K=parseInt(L[F].s!
 tyle.wid
th,10);}M+="("+G+"x"+K+")";break;}if(M.length>10){M="<span title=\""+M+"\">"+M.substring(0,10)+"...</span>";}else{M="<span title=\""+M+"\">"+M+"</span>";}J[J.length]=M;}}var I=J.join(" "+this.SEP_DOMPATH+" ");if(this.dompath.innerHTML!=I){this.dompath.innerHTML=I;}},_fixNodes:function(){for(var I in this.invalidHTML){if(D.hasOwnProperty(this.invalidHTML,I)){var K=this._getDoc().body.getElementsByTagName(I);for(var L=0;L<K.length;L++){if(K[L].parentNode){K[L].parentNode.removeChild(K[L]);}}}}var M=this._getDoc().getElementsByTagName("img");C.addClass(M,"yui-img");var J="";for(var G=0;G<M.length;G++){if(M[G].getAttribute("href",2)){J=M[G].getAttribute("src",2);if(this._isLocalFile(J)){C.addClass(M[G],this.CLASS_LOCAL_FILE);}else{C.removeClass(M[G],this.CLASS_LOCAL_FILE);}}}var H=this._getDoc().body.getElementsByTagName("a");for(var F=0;F<H.length;F++){if(H[F].getAttribute("href",2)){J=H[F].getAttribute("href",2);if(this._isLocalFile(J)){C.addClass(H[F],this.CLASS_LOCAL_FILE);}!
 else{C.removeClass(H[F],this.CLASS_LOCAL_FILE);}}}},_showHidden:function(){if(this._showingHiddenElements){this._showingHiddenElements=false;this.toolbar.deselectButton("hiddenelements");C.removeClass(this._getDoc().body,this.CLASS_HIDDEN);}else{this._showingHiddenElements=true;C.addClass(this._getDoc().body,this.CLASS_HIDDEN);this.toolbar.selectButton("hiddenelements");}},_setCurrentEvent:function(F){this.currentEvent=F;},_handleClick:function(G){this._setCurrentEvent(G);if(this.currentWindow){this.closeWindow();}if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}if(this.browser.webkit){var F=A.getTarget(G);if(this._isElement(F,"a")||this._isElement(F.parentNode,"a")){A.stopEvent(G);this.nodeChange();}}else{this.nodeChange();}},_handleMouseUp:function(G){this._setCurrentEvent(G);var F=this;
-if(this.browser.opera){var H=A.getTarget(G);if(this._isElement(H,"img")){this.nodeChange();if(this.operaEvent){clearTimeout(this.operaEvent);this.operaEvent=null;this._handleDoubleClick(G);}else{this.operaEvent=window.setTimeout(function(){F.operaEvent=false;},700);}}}if(this.browser.webkit||this.browser.opera){if(this.browser.webkit){A.stopEvent(G);}}this.nodeChange();this.fireEvent("editorMouseUp",{type:"editorMouseUp",target:this,ev:G});},_handleMouseDown:function(F){this._setCurrentEvent(F);var G=A.getTarget(F);if(this.browser.webkit&&this._hasSelection()){var H=this._getSelection();if(!this.browser.webkit3){H.collapse(true);}else{H.collapseToStart();}}if(this.browser.webkit&&this._lastImage){C.removeClass(this._lastImage,"selected");this._lastImage=null;}if(this._isElement(G,"img")||this._isElement(G,"a")){if(this.browser.webkit){A.stopEvent(F);if(this._isElement(G,"img")){C.addClass(G,"selected");this._lastImage=G;}}this.nodeChange();}this.fireEvent("editorMouseDown",!
 {type:"editorMouseDown",target:this,ev:F});},_handleDoubleClick:function(F){this._setCurrentEvent(F);var G=A.getTarget(F);if(this._isElement(G,"img")){this.currentElement[0]=G;this.toolbar.fireEvent("insertimageClick",{type:"insertimageClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});}else{if(this._isElement(G,"a")){this.currentElement[0]=G;this.toolbar.fireEvent("createlinkClick",{type:"createlinkClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});}}this.nodeChange();this.fireEvent("editorDoubleClick",{type:"editorDoubleClick",target:this,ev:F});},_handleKeyUp:function(G){this._setCurrentEvent(G);switch(G.keyCode){case 37:case 38:case 39:case 40:case 46:case 8:case 87:if((G.keyCode==87)&&this.currentWindow&&G.shiftKey&&G.ctrlKey){this.closeWindow();}else{if(!this.browser.ie){if(this._nodeChangeTimer){clearTimeout(this._nodeChangeTimer);}var F=this;this._nodeChangeTimer=se!
 tTimeout(function(){F._nodeChangeTimer=null;F.nodeChange.call(!
 F);},100
);}else{this.nodeChange();}}break;}this.fireEvent("editorKeyUp",{type:"editorKeyUp",target:this,ev:G});},_handleKeyPress:function(F){this._setCurrentEvent(F);this.fireEvent("editorKeyPress",{type:"editorKeyPress",target:this,ev:F});},_handleKeyDown:function(I){this._setCurrentEvent(I);if(this.currentWindow){this.closeWindow();}if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}var H=false,J=null,G=false;if(I.shiftKey&&I.ctrlKey){H=true;}switch(I.keyCode){case 84:if(I.shiftKey&&I.ctrlKey){this.toolbar._titlebar.firstChild.focus();A.stopEvent(I);H=false;}break;case 27:if(I.shiftKey){this.afterElement.focus();A.stopEvent(I);G=false;}break;case 219:J="justifyleft";break;case 220:J="justifycenter";break;case 221:J="justifyright";break;case 76:if(this._hasSelection()){if(I.shiftKey&&I.ctrlKey){this.execCommand("createlink","");this.toolbar.fireEvent("createlinkCli!
 ck",{type:"createlinkClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});H=false;}}break;case 65:if(I.metaKey&&this.browser.webkit){A.stopEvent(I);this._getSelection().setBaseAndExtent(this._getDoc().body,1,this._getDoc().body,this._getDoc().body.innerHTML.length);}break;case 66:J="bold";break;case 73:J="italic";break;case 85:J="underline";break;case 9:if(this.browser.safari){this._getDoc().execCommand("inserttext",false,"\t");A.stopEvent(I);}break;case 13:if(this.browser.ie){var K=this._getRange();var F=this._getSelectedElement();if(!this._isElement(F,"li")){if(K){K.pasteHTML("<br>");K.collapse(false);K.select();}A.stopEvent(I);}}}if(H&&J){this.execCommand(J,null);A.stopEvent(I);this.nodeChange();}this.fireEvent("editorKeyDown",{type:"editorKeyDown",target:this,ev:I});},nodeChange:function(G){var H=parseInt(this.get("nodeChangeThreshold"),10);var N=Math.round(new Date().getTime()/1000);if(G===true){this._lastNodeChange=0;}i!
 f((this._lastNodeChange+H)<N){var Q=this;if(this._fixNodesTime!
 r===null
){this._fixNodesTimer=window.setTimeout(function(){Q._fixNodes.call(Q);Q._fixNodesTimer=null;},0);}}this._lastNodeChange=N;if(this.currentEvent){this._lastNodeChangeEvent=this.currentEvent.type;}var Z=this.fireEvent("beforeNodeChange",{type:"beforeNodeChange",target:this});if(Z===false){return false;}if(this.get("dompath")){this._writeDomPath();}if(!this.get("disabled")){if(this.STOP_NODE_CHANGE){this.STOP_NODE_CHANGE=false;return false;}else{var T=this._getSelection(),P=this._getRange(),F=this._getSelectedElement(),L=this.toolbar.getButtonByValue("fontname"),K=this.toolbar.getButtonByValue("fontsize");var M={};if(this._lastButton){M[this._lastButton.id]=true;}if(!this._isElement(F,"body")){if(L){M[L.get("id")]=true;}if(K){M[K.get("id")]=true;}}this.toolbar.resetAllButtons(M);for(var a=0;a<this._disabled.length;a++){var O=this.toolbar.getButtonByValue(this._disabled[a]);if(O&&O.get){if(this._lastButton&&(O.get("id")===this._lastButton.id)){}else{if(!this._hasSelection()){swi!
 tch(this._disabled[a]){case"fontname":case"fontsize":break;default:this.toolbar.disableButton(O);}}else{if(!this._alwaysDisabled[this._disabled[a]]){this.toolbar.enableButton(O);}}if(!this._alwaysEnabled[this._disabled[a]]){this.toolbar.deselectButton(O);}}}}var R=this._getDomPath();var S=null,b=null,W=null;for(var X=0;X<R.length;X++){b=R[X].tagName.toLowerCase();if(R[X].getAttribute("tag")){b=R[X].getAttribute("tag").toLowerCase();}W=this._tag2cmd[b];if(W===undefined){W=[];}if(!D.isArray(W)){W=[W];}if(R[X].style.fontWeight.toLowerCase()=="bold"){W[W.length]="bold";}if(R[X].style.fontStyle.toLowerCase()=="italic"){W[W.length]="italic";}if(R[X].style.textDecoration.toLowerCase()=="underline"){W[W.length]="underline";}if(W.length>0){for(var V=0;V<W.length;V++){this.toolbar.selectButton(W[V]);this.toolbar.enableButton(W[V]);}}switch(R[X].style.textAlign.toLowerCase()){case"left":case"right":case"center":case"justify":var U=R[X].style.textAlign.toLowerCase();
-if(R[X].style.textAlign.toLowerCase()=="justify"){U="full";}this.toolbar.selectButton("justify"+U);this.toolbar.enableButton("justify"+U);break;}}if(L){var Y=L._configs.label._initialConfig.value;L.set("label","<span class=\"yui-toolbar-fontname-"+E(Y)+"\">"+Y+"</span>");this._updateMenuChecked("fontname",Y);}if(K){K.set("label",K._configs.label._initialConfig.value);}var J=this.toolbar.getButtonByValue("heading");if(J){J.set("label",J._configs.label._initialConfig.value);this._updateMenuChecked("heading","none");}var I=this.toolbar.getButtonByValue("insertimage");if(I&&this.currentWindow&&(this.currentWindow.name=="insertimage")){this.toolbar.disableButton(I);}}}this.fireEvent("afterNodeChange",{type:"afterNodeChange",target:this});},_updateMenuChecked:function(H,I,K){if(!K){K=this.toolbar;}var J=K.getButtonByValue(H);var G=J.getMenu().getItems();if(G.length===0){J.getMenu()._onBeforeShow();G=J.getMenu().getItems();}for(var F=0;F<G.length;F++){G[F].cfg.setProperty("checked!
 ",false);if(G[F].value==I){G[F].cfg.setProperty("checked",true);}}},_handleToolbarClick:function(G){var I="";var J="";var H=G.button.value;if(G.button.menucmd){I=H;H=G.button.menucmd;}this._lastButton=G.button;if(this.STOP_EXEC_COMMAND){this.STOP_EXEC_COMMAND=false;return false;}else{this.execCommand(H,I);if(!this.browser.webkit){var F=this;setTimeout(function(){F._focusWindow.call(F);},5);}}A.stopEvent(G);},_setupAfterElement:function(){if(!this.afterElement){this.afterElement=document.createElement("h2");this.afterElement.className="yui-editor-skipheader";this.afterElement.tabIndex="-1";this.afterElement.innerHTML=this.STR_LEAVE_EDITOR;this.get("element_cont").get("firstChild").appendChild(this.afterElement);}},EDITOR_PANEL_ID:"yui-editor-panel",SEP_DOMPATH:"<",STR_LEAVE_EDITOR:"You have left the Rich Text Editor.",STR_BEFORE_EDITOR:"This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Control + Shift +!
  T to place focus on the toolbar and navigate between option h!
 eading n
ames. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift [ aligns text left</li> <li>Control Shift | centers text</li> <li>Control Shift ] aligns text right</li> <li>Control Shift L adds an HTML link</li> <li>To exit this text editor use the keyboard shortcut Control + Shift + ESC.</li></ul>",STR_CLOSE_WINDOW:"Close Window",STR_CLOSE_WINDOW_NOTE:"To close this window use the Control + Shift + W key",STR_TITLE:"Rich Text Area.",STR_IMAGE_HERE:"Image Url Here",STR_IMAGE_PROP_TITLE:"Image Options",STR_IMAGE_URL:"Image Url",STR_IMAGE_TITLE:"Description",STR_IMAGE_SIZE:"Size",STR_IMAGE_ORIG_SIZE:"Original Size",STR_IMAGE_COPY:"<span class=\"tip\"><span class=\"icon icon-info\"></span><strong>Note:</strong>To move this image just highlight it, cut, and paste where ever you'd like.</span>",STR_IMAGE_PADDING:"Padding",STR_IMAGE_BORDER:"Bor!
 der",STR_IMAGE_TEXTFLOW:"Text Flow",STR_LOCAL_FILE_WARNING:"<span class=\"tip\"><span class=\"icon icon-warn\"></span><strong>Note:</strong>This image/link points to a file on your computer and will not be accessible to others on the internet.</span>",STR_LINK_PROP_TITLE:"Link Options",STR_LINK_PROP_REMOVE:"Remove link from text",STR_LINK_URL:"Link URL",STR_LINK_NEW_WINDOW:"Open in a new window.",STR_LINK_TITLE:"Description",STOP_EXEC_COMMAND:false,STOP_NODE_CHANGE:false,CLASS_HIDDEN:"hidden",CLASS_LOCAL_FILE:"warning-localfile",CLASS_CONTAINER:"yui-editor-container",CLASS_EDITABLE:"yui-editor-editable",CLASS_EDITABLE_CONT:"yui-editor-editable-container",CLASS_PREFIX:"yui-editor",browser:function(){var F=YAHOO.env.ua;if(F.webkit>420){F.webkit3=F.webkit;}else{F.webkit3=0;}return F;}(),init:function(G,F){YAHOO.widget.Editor.superclass.init.call(this,G,F);YAHOO.widget.EditorInfo._instances[this.get("id")]=this;this.on("contentReady",function(){this.DOMReady=true;this.fireQueue!
 ();},this,true);},initAttributes:function(F){YAHOO.widget.Edit!
 or.super
class.initAttributes.call(this,F);var G=this;this.setAttributeConfig("iframe",{value:null});this.setAttributeConfig("textarea",{value:null,writeOnce:true});this.setAttributeConfig("nodeChangeThreshold",{value:F.nodeChangeThreshold||3,validator:YAHOO.lang.isNumber});this.setAttributeConfig("element_cont",{value:F.element_cont});this.setAttributeConfig("editor_wrapper",{value:F.editor_wrapper||null,writeOnce:true});this.setAttributeConfig("height",{value:F.height||C.getStyle(G.get("element"),"height"),method:function(H){if(this._rendered){if(this.get("animate")){var I=new YAHOO.util.Anim(this.get("iframe").get("parentNode"),{height:{to:parseInt(H,10)}},0.5);I.animate();}else{C.setStyle(this.get("iframe").get("parentNode"),"height",H);}}}});this.setAttributeConfig("width",{value:F.width||C.getStyle(this.get("element"),"width"),method:function(H){if(this._rendered){if(this.get("animate")){var I=new YAHOO.util.Anim(this.get("element_cont").get("element"),{width:{to:parseInt(H,10)!
 }},0.5);I.animate();}else{this.get("element_cont").setStyle("width",H);}}}});this.setAttributeConfig("blankimage",{value:F.blankimage||this._getBlankImage()});this.setAttributeConfig("hiddencss",{value:F.hiddencss||".hidden font, .hidden strong, .hidden b, .hidden em, .hidden i, .hidden u, .hidden div,.hidden p,.hidden span,.hidden img, .hidden ul, .hidden ol, .hidden li, .hidden table { border: 1px dotted #ccc; } .hidden .yui-non { border: none; } .hidden img { padding: 2px; }",writeOnce:true});this.setAttributeConfig("css",{value:F.css||"html { height: 95%; } body { height: 100%; padding: 7px; background-color: #fff; font:13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small; } a { color: blue; text-decoration: underline; cursor: pointer; } .warning-localfile { border-bottom: 1px dashed red !important; } .yui-busy { cursor: wait !important; } img.selected { border: 2px dotted #808080; } img { cursor: pointer !important; border: none; }",writeOnce:true}!
 );
-this.setAttributeConfig("html",{value:F.html||"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\"><html><head><title>{TITLE}</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" /><base href=\""+this._baseHREF+"\"><style>{CSS}</style><style>{HIDDEN_CSS}</style></head><body onload=\"document.body._rteLoaded = true;\">{CONTENT}</body></html>",writeOnce:true});this.setAttributeConfig("handleSubmit",{value:false,writeOnce:true,method:function(H){if(H){var J=this.get("element");if(J.form){var I=function(K){A.stopEvent(K);this.saveHTML();window.setTimeout(function(){YAHOO.util.Event.removeListener(J.form,"submit",I);J.form.submit();},200);};A.on(J.form,"submit",I,this,true);}}}});this.setAttributeConfig("disabled",{value:false,method:function(H){if(H){if(!this._mask){this._setDesignMode("off");this.toolbar.set("disabled",true);this._mask=document.createElement("DIV");C.setStyle(this._mask,"height","100%");C.setSt!
 yle(this._mask,"width","100%");C.setStyle(this._mask,"position","absolute");C.setStyle(this._mask,"top","0");C.setStyle(this._mask,"left","0");C.setStyle(this._mask,"opacity",".5");C.addClass(this._mask,"yui-editor-masked");this.get("iframe").get("parentNode").appendChild(this._mask);}}else{if(this._mask){this._mask.parentNode.removeChild(this._mask);this._mask=null;this.toolbar.set("disabled",false);this._setDesignMode("on");this._focusWindow();}}}});this.setAttributeConfig("toolbar_cont",{value:null,writeOnce:true});this.setAttributeConfig("toolbar",{value:F.toolbar||{collapse:true,titlebar:"Text Editing Tools",draggable:false,buttons:[{group:"fontstyle",label:"Font Name and Size",buttons:[{type:"select",label:"Arial",value:"fontname",disabled:true,menu:[{text:"Arial",checked:true},{text:"Arial Black"},{text:"Comic Sans MS"},{text:"Courier New"},{text:"Lucida Console"},{text:"Tahoma"},{text:"Times New Roman"},{text:"Trebuchet MS"},{text:"Verdana"}]},{type:"spin",label:"13!
 ",value:"fontsize",range:[9,75],disabled:true}]},{type:"separa!
 tor"},{g
roup:"textstyle",label:"Font Style",buttons:[{type:"push",label:"Bold CTRL + SHIFT + B",value:"bold"},{type:"push",label:"Italic CTRL + SHIFT + I",value:"italic"},{type:"push",label:"Underline CTRL + SHIFT + U",value:"underline"},{type:"separator"},{type:"push",label:"Subscript",value:"subscript",disabled:true},{type:"push",label:"Superscript",value:"superscript",disabled:true},{type:"separator"},{type:"color",label:"Font Color",value:"forecolor",disabled:true},{type:"color",label:"Background Color",value:"backcolor",disabled:true},{type:"separator"},{type:"push",label:"Remove Formatting",value:"removeformat",disabled:true},{type:"push",label:"Show/Hide Hidden Elements",value:"hiddenelements"}]},{type:"separator"},{group:"alignment",label:"Alignment",buttons:[{type:"push",label:"Align Left CTRL + SHIFT + [",value:"justifyleft"},{type:"push",label:"Align Center CTRL + SHIFT + |",value:"justifycenter"},{type:"push",label:"Align Right CTRL + SHIFT + ]",value:"justifyright"},{ty!
 pe:"push",label:"Justify",value:"justifyfull"}]},{type:"separator"},{group:"parastyle",label:"Paragraph Style",buttons:[{type:"select",label:"Normal",value:"heading",disabled:true,menu:[{text:"Normal",value:"none",checked:true},{text:"Header 1",value:"h1"},{text:"Header 2",value:"h2"},{text:"Header 3",value:"h3"},{text:"Header 4",value:"h4"},{text:"Header 5",value:"h5"},{text:"Header 6",value:"h6"}]}]},{type:"separator"},{group:"indentlist",label:"Indenting and Lists",buttons:[{type:"push",label:"Indent",value:"indent",disabled:true},{type:"push",label:"Outdent",value:"outdent",disabled:true},{type:"push",label:"Create an Unordered List",value:"insertunorderedlist"},{type:"push",label:"Create an Ordered List",value:"insertorderedlist"}]},{type:"separator"},{group:"insertitem",label:"Insert Item",buttons:[{type:"push",label:"HTML Link CTRL + SHIFT + L",value:"createlink",disabled:true},{type:"push",label:"Insert Image",value:"insertimage"}]}]},writeOnce:true,method:function(!
 H){}});this.setAttributeConfig("animate",{value:false,validato!
 r:functi
on(I){var H=true;if(!YAHOO.util.Anim){H=false;}return H;}});this.setAttributeConfig("panel",{value:null,writeOnce:true,validator:function(I){var H=true;if(!YAHOO.widget.Overlay){H=false;}return H;}});this.setAttributeConfig("localFileWarning",{value:F.locaFileWarning||true});this.setAttributeConfig("focusAtStart",{value:F.focusAtStart||false,writeOnce:true,method:function(){this.on("editorContentLoaded",function(){var H=this;setTimeout(function(){H._focusWindow.call(H,true);},400);},this,true);}});this.setAttributeConfig("dompath",{value:F.dompath||false,method:function(H){if(H&&!this.dompath){this.dompath=document.createElement("DIV");this.dompath.id=this.get("id")+"_dompath";C.addClass(this.dompath,"dompath");this.get("element_cont").get("firstChild").appendChild(this.dompath);if(this.get("iframe")){this._writeDomPath();}}else{if(!H&&this.dompath){this.dompath.parentNode.removeChild(this.dompath);this.dompath=null;}}this._setupAfterElement();}});this.setAttributeConfig("ma!
 rkup",{value:F.markup||"semantic",validator:function(H){switch(H.toLowerCase()){case"semantic":case"css":case"default":case"xhtml":return true;}return false;}});this.setAttributeConfig("removeLineBreaks",{value:F.removeLineBreaks||false,validator:YAHOO.lang.isBoolean});this.on("afterRender",function(){this._renderPanel();});},_getBlankImage:function(){if(!this.DOMReady){this._queue[this._queue.length]=["_getBlankImage",arguments];return"";}var F="";if(!this._blankImageLoaded){var G=document.createElement("div");G.style.position="absolute";G.style.top="-9999px";G.style.left="-9999px";G.className=this.CLASS_PREFIX+"-blankimage";document.body.appendChild(G);F=YAHOO.util.Dom.getStyle(G,"background-image");F=F.replace("url(","").replace(")","").replace(/"/g,"");this.set("blankimage",F);this._blankImageLoaded=true;}else{F=this.get("blankimage");}return F;},_handleFontSize:function(H){var F=this.toolbar.getButtonById(H.button.id);
-var G=F.get("label")+"px";this.execCommand("fontsize",G);this.STOP_EXEC_COMMAND=true;},_handleColorPicker:function(H){var G=H.button;var F="#"+H.color;if((G=="forecolor")||(G=="backcolor")){this.execCommand(G,F);}},_handleAlign:function(J){var G=this.toolbar.getButtonById(J.button.id);var I=null;for(var F=0;F<J.button.menu.length;F++){if(J.button.menu[F].value==J.button.value){I=J.button.menu[F].value;}}var H=this._getSelection();this.execCommand(I,H);this.STOP_EXEC_COMMAND=true;},_handleAfterNodeChange:function(){var R=this._getDomPath(),M=null,I=null,N=null,G=false;var K=this.toolbar.getButtonByValue("fontname");var L=this.toolbar.getButtonByValue("fontsize");var F=this.toolbar.getButtonByValue("heading");for(var H=0;H<R.length;H++){M=R[H];var Q=M.tagName.toLowerCase();if(M.getAttribute("tag")){Q=M.getAttribute("tag");}I=M.getAttribute("face");if(C.getStyle(M,"font-family")){I=C.getStyle(M,"font-family");}if(Q.substring(0,1)=="h"){if(F){for(var J=0;J<F._configs.menu.value!
 .length;J++){if(F._configs.menu.value[J].value.toLowerCase()==Q){F.set("label",F._configs.menu.value[J].text);}}this._updateMenuChecked("heading",Q);}}}if(K){for(var P=0;P<K._configs.menu.value.length;P++){if(I&&K._configs.menu.value[P].text.toLowerCase()==I.toLowerCase()){G=true;I=K._configs.menu.value[P].text;}}if(!G){I=K._configs.label._initialConfig.value;}var O="<span class=\"yui-toolbar-fontname-"+E(I)+"\">"+I+"</span>";if(K.get("label")!=O){K.set("label",O);this._updateMenuChecked("fontname",I);}}if(L){N=parseInt(C.getStyle(M,"fontSize"),10);if((N===null)||isNaN(N)){N=L._configs.label._initialConfig.value;}L.set("label",""+N);}if(!this._isElement(M,"body")&&!this._isElement(M,"img")){this.toolbar.enableButton(K);this.toolbar.enableButton(L);this.toolbar.enableButton("forecolor");this.toolbar.enableButton("backcolor");}if(this._isElement(M,"img")){this.toolbar.enableButton("createlink");}if(this._isElement(M,"blockquote")){this.toolbar.selectButton("indent");this.tool!
 bar.disableButton("indent");this.toolbar.enableButton("outdent!
 ");}this
._lastButton=null;},_setBusy:function(F){},_handleInsertImageClick:function(){this._setBusy();this.on("afterExecCommand",function(){var I=this.currentElement[0],S=null,P="",e="",f="",O="",b="",V=75,Y=75,U=0,Q=0,N=0,W=false,M=new YAHOO.widget.EditorWindow("insertimage",{width:"415px"});if(!I){I=this._getSelectedElement();}if(I){if(I.getAttribute("src")){O=I.getAttribute("src",2);if(O.indexOf(this.get("blankimage"))!=-1){O=this.STR_IMAGE_HERE;W=true;}}if(I.getAttribute("alt",2)){f=I.getAttribute("alt",2);}if(I.getAttribute("title",2)){f=I.getAttribute("title",2);}if(I.parentNode&&this._isElement(I.parentNode,"a")){P=I.parentNode.getAttribute("href");if(I.parentNode.getAttribute("target")!==null){e=I.parentNode.getAttribute("target");}}V=parseInt(I.height,10);Y=parseInt(I.width,10);if(I.style.height){V=parseInt(I.style.height,10);}if(I.style.width){Y=parseInt(I.style.width,10);}if(I.style.margin){U=parseInt(I.style.margin,10);}if(!I._height){I._height=V;}if(!I._width){I._width=!
 Y;}Q=I._height;N=I._width;}var Z="<label for=\"insertimage_url\"><strong>"+this.STR_IMAGE_URL+":</strong> <input type=\"text\" id=\"insertimage_url\" value=\""+O+"\" size=\"40\"></label>";S=document.createElement("div");S.innerHTML=Z;var K=document.createElement("div");K.id="img_toolbar";S.appendChild(K);var F="<label for=\"insertimage_title\"><strong>"+this.STR_IMAGE_TITLE+":</strong> <input type=\"text\" id=\"insertimage_title\" value=\""+f+"\" size=\"40\"></label>";F+="<label for=\"insertimage_link\"><strong>"+this.STR_LINK_URL+":</strong> <input type=\"text\" name=\"insertimage_link\" id=\"insertimage_link\" value=\""+P+"\"></label>";F+="<label for=\"insertimage_target\"><strong> </strong><input type=\"checkbox\" name=\"insertimage_target_\" id=\"insertimage_target\" value=\"_blank\""+((e)?" checked":"")+"> "+this.STR_LINK_NEW_WINDOW+"</label>";var T=document.createElement("div");T.innerHTML=F;S.appendChild(T);M.cache=S;var H=new YAHOO.widget.Toolbar(K,{buttons:[{g!
 roup:"textflow",label:this.STR_IMAGE_TEXTFLOW+":",buttons:[{ty!
 pe:"push
",label:"Left",value:"left"},{type:"push",label:"Inline",value:"inline"},{type:"push",label:"Block",value:"block"},{type:"push",label:"Right",value:"right"}]},{type:"separator"},{group:"padding",label:this.STR_IMAGE_PADDING+":",buttons:[{type:"spin",label:""+U,value:"padding",range:[0,50]}]},{type:"separator"},{group:"border",label:this.STR_IMAGE_BORDER+":",buttons:[{type:"select",label:"Border Size",value:"bordersize",menu:[{text:"none",value:"0",checked:true},{text:" ",value:"1"},{text:" ",value:"2"},{text:" ",value:"3"},{text:" ",value:"4"},{text:" ",value:"5"}]},{type:"select",label:"Border Type",value:"bordertype",disabled:true,menu:[{text:" ",value:"solid",checked:true},{text:" ",value:"dashed"},{text:" ",value:"dotted"}]},{type:"color",label:"Border Color",value:"bordercolor",disabled:true}]}]});var G="0";var X="solid";if(I.style.borderLeftWidth){G=parseInt(I.style.borderLeftWidth,10);}if(I.style.borderLeftStyle){X=I.style.borderLeftStyle;}var d=H.getButtonByValue("bo!
 rdersize");var a=((parseInt(G,10)>0)?"":"none");d.set("label","<span class=\"yui-toolbar-bordersize-"+G+"\">"+a+"</span>");this._updateMenuChecked("bordersize",G,H);var R=H.getButtonByValue("bordertype");R.set("label","<span class=\"yui-toolbar-bordertype-"+X+"\"></span>");this._updateMenuChecked("bordertype",X,H);if(parseInt(G,10)>0){H.enableButton(R);H.enableButton(d);}var J=H.get("cont");var c=document.createElement("div");c.className="yui-toolbar-group yui-toolbar-group-height-width height-width";c.innerHTML="<h3>"+this.STR_IMAGE_SIZE+":</h3>";var L="";if((V!=Q)||(Y!=N)){L="<span class=\"info\">"+this.STR_IMAGE_ORIG_SIZE+"<br>"+N+" x "+Q+"</span>";}c.innerHTML+="<span><input type=\"text\" size=\"3\" value=\""+Y+"\" id=\"insertimage_width\"> x <input type=\"text\" size=\"3\" value=\""+V+"\" id=\"insertimage_height\"></span>"+L;J.insertBefore(c,J.firstChild);A.onAvailable("insertimage_width",function(){A.on("insertimage_width","blur",function(){var g=parseInt(C.get("inser!
 timage_width").value,10);
-if(g>5){I.style.width=g+"px";this.moveWindow();}},this,true);},this,true);A.onAvailable("insertimage_height",function(){A.on("insertimage_height","blur",function(){var g=parseInt(C.get("insertimage_height").value,10);if(g>5){I.style.height=g+"px";this.moveWindow();}},this,true);},this,true);if((I.align=="right")||(I.align=="left")){H.selectButton(I.align);}else{if(I.style.display=="block"){H.selectButton("block");}else{H.selectButton("inline");}}if(parseInt(I.style.marginLeft,10)>0){H.getButtonByValue("padding").set("label",""+parseInt(I.style.marginLeft,10));}if(I.style.borderSize){H.selectButton("bordersize");H.selectButton(parseInt(I.style.borderSize,10));}H.on("colorPickerClicked",function(k){var h="1",j="solid",g="black";if(I.style.borderLeftWidth){h=parseInt(I.style.borderLeftWidth,10);}if(I.style.borderLeftStyle){j=I.style.borderLeftStyle;}if(I.style.borderLeftColor){g=I.style.borderLeftColor;}var i=h+"px "+j+" #"+k.color;I.style.border=i;},this.toolbar,true);H.on("b!
 uttonClick",function(m){var k=m.button.value,j="";if(m.button.menucmd){k=m.button.menucmd;}var h="1",i="solid",g="black";if(I.style.borderLeftWidth){h=parseInt(I.style.borderLeftWidth,10);}if(I.style.borderLeftStyle){i=I.style.borderLeftStyle;}if(I.style.borderLeftColor){g=I.style.borderLeftColor;}switch(k){case"bordersize":if(this.browser.webkit&&this._lastImage){C.removeClass(this._lastImage,"selected");this._lastImage=null;}j=parseInt(m.button.value,10)+"px "+i+" "+g;I.style.border=j;if(parseInt(m.button.value,10)>0){H.enableButton("bordertype");H.enableButton("bordercolor");}else{H.disableButton("bordertype");H.disableButton("bordercolor");}break;case"bordertype":if(this.browser.webkit&&this._lastImage){C.removeClass(this._lastImage,"selected");this._lastImage=null;}j=h+"px "+m.button.value+" "+g;I.style.border=j;break;case"right":case"left":H.deselectAllButtons();I.style.display="";I.align=m.button.value;break;case"inline":H.deselectAllButtons();I.style.display="";I.al!
 ign="";break;case"block":H.deselectAllButtons();I.style.displa!
 y="block
";I.align="center";break;case"padding":var l=H.getButtonById(m.button.id);I.style.margin=l.get("label")+"px";break;}H.selectButton(m.button.value);this.moveWindow();},this,true);M.setHeader(this.STR_IMAGE_PROP_TITLE);M.setBody(S);if((this.browser.webkit&&!this.browser.webkit3)||this.browser.opera){M.setFooter(this.STR_IMAGE_COPY);}this.openWindow(M);A.onAvailable("insertimage_url",function(){this.toolbar.selectButton("insertimage");window.setTimeout(function(){YAHOO.util.Dom.get("insertimage_url").focus();if(W){YAHOO.util.Dom.get("insertimage_url").select();}},50);if(this.get("localFileWarning")){A.on("insertimage_link","blur",function(){var g=C.get("insertimage_link");if(this._isLocalFile(g.value)){C.addClass(g,"warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING);}else{C.removeClass(g,"warning");this.get("panel").setFooter(" ");if((this.browser.webkit&&!this.browser.webkit3)||this.browser.opera){this.get("panel").setFooter(this.STR_IMAGE_COPY);}}},this,true);!
 A.on("insertimage_url","blur",function(){var i=C.get("insertimage_url");if(this._isLocalFile(i.value)){C.addClass(i,"warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING);}else{C.removeClass(i,"warning");this.get("panel").setFooter(" ");if((this.browser.webkit&&!this.browser.webkit3)||this.browser.opera){this.get("panel").setFooter(this.STR_IMAGE_COPY);}if(i&&i.value&&(i.value!=this.STR_IMAGE_HERE)){this.currentElement[0].setAttribute("src",i.value);var h=this,g=new Image();g.onerror=function(){i.value=h.STR_IMAGE_HERE;g.setAttribute("src",h.get("blankimage"));h.currentElement[0].setAttribute("src",h.get("blankimage"));YAHOO.util.Dom.get("insertimage_height").value=g.height;YAHOO.util.Dom.get("insertimage_width").value=g.width;};window.setTimeout(function(){YAHOO.util.Dom.get("insertimage_height").value=g.height;YAHOO.util.Dom.get("insertimage_width").value=g.width;if(h.currentElement&&h.currentElement[0]){if(!h.currentElement[0]._height){h.currentElement[0]._h!
 eight=g.height;}if(!h.currentElement[0]._width){h.currentEleme!
 nt[0]._w
idth=g.width;}}h.moveWindow();},200);if(i.value!=this.STR_IMAGE_HERE){g.src=i.value;}}}},this,true);}},this,true);});},_handleInsertImageWindowClose:function(){var F=C.get("insertimage_url");var M=C.get("insertimage_title");var J=C.get("insertimage_link");var K=C.get("insertimage_target");var I=this.currentElement[0];if(F&&F.value&&(F.value!=this.STR_IMAGE_HERE)){I.setAttribute("src",F.value);I.setAttribute("title",M.value);I.setAttribute("alt",M.value);var H=I.parentNode;if(J.value){var L=J.value;if((L.indexOf("://")==-1)&&(L.substring(0,1)!="/")&&(L.substring(0,6).toLowerCase()!="mailto")){if((L.indexOf("@")!=-1)&&(L.substring(0,6).toLowerCase()!="mailto")){L="mailto:"+L;}else{L="http://"+L;}}if(H&&this._isElement(H,"a")){H.setAttribute("href",L);if(K.checked){H.setAttribute("target",K.value);}else{H.setAttribute("target","");}}else{var G=this._getDoc().createElement("a");G.setAttribute("href",L);if(K.checked){G.setAttribute("target",K.value);}else{G.setAttribute("target",!
 "");}I.parentNode.replaceChild(G,I);G.appendChild(I);}}else{if(H&&this._isElement(H,"a")){H.parentNode.replaceChild(I,H);}}}else{I.parentNode.removeChild(I);}this.currentElement=[];this.nodeChange();},_isLocalFile:function(F){if((F!=="")&&((F.indexOf("file:/")!=-1)||(F.indexOf(":\\")!=-1))){return true;}return false;},_handleCreateLinkClick:function(){var F=this._getSelectedElement();if(this._isElement(F,"img")){this.STOP_EXEC_COMMAND=true;this.currentElement[0]=F;this.toolbar.fireEvent("insertimageClick",{type:"insertimageClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});return false;}this.on("afterExecCommand",function(){var M=new YAHOO.widget.EditorWindow("createlink",{width:"350px"});var J=this.currentElement[0],I="",P="",N="",K=false;if(J){if(J.getAttribute("href")!==null){I=J.getAttribute("href");if(this._isLocalFile(I)){M.setFooter(this.STR_LOCAL_FILE_WARNING);
-K=true;}else{M.setFooter(" ");}}if(J.getAttribute("title")!==null){P=J.getAttribute("title");}if(J.getAttribute("target")!==null){N=J.getAttribute("target");}}var O="<label for=\"createlink_url\"><strong>"+this.STR_LINK_URL+":</strong> <input type=\"text\" name=\"createlink_url\" id=\"createlink_url\" value=\""+I+"\""+((K)?" class=\"warning\"":"")+"></label>";O+="<label for=\"createlink_target\"><strong> </strong><input type=\"checkbox\" name=\"createlink_target_\" id=\"createlink_target\" value=\"_blank\""+((N)?" checked":"")+"> "+this.STR_LINK_NEW_WINDOW+"</label>";O+="<label for=\"createlink_title\"><strong>"+this.STR_LINK_TITLE+":</strong> <input type=\"text\" name=\"createlink_title\" id=\"createlink_title\" value=\""+P+"\"></label>";var L=document.createElement("div");L.innerHTML=O;var H=document.createElement("div");H.className="removeLink";var G=document.createElement("a");G.href="#";G.innerHTML=this.STR_LINK_PROP_REMOVE;G.title=this.STR_LINK_PROP_REMOVE;A.on(G!
 ,"click",function(Q){A.stopEvent(Q);this.execCommand("unlink");this.closeWindow();},this,true);H.appendChild(G);L.appendChild(H);M.setHeader(this.STR_LINK_PROP_TITLE);M.setBody(L);A.onAvailable("createlink_url",function(){window.setTimeout(function(){try{YAHOO.util.Dom.get("createlink_url").focus();}catch(Q){}},50);A.on("createlink_url","blur",function(){var Q=C.get("createlink_url");if(this._isLocalFile(Q.value)){C.addClass(Q,"warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING);}else{C.removeClass(Q,"warning");this.get("panel").setFooter(" ");}},this,true);},this,true);this.openWindow(M);});},_handleCreateLinkWindowClose:function(){var H=C.get("createlink_url"),J=C.get("createlink_target"),L=C.get("createlink_title"),I=this.currentElement[0],F=I;if(H&&H.value){var K=H.value;if((K.indexOf("://")==-1)&&(K.substring(0,1)!="/")&&(K.substring(0,6).toLowerCase()!="mailto")){if((K.indexOf("@")!=-1)&&(K.substring(0,6).toLowerCase()!="mailto")){K="mailto:"+K;}else{K=!
 "http://"+K;}}I.setAttribute("href",K);if(J.checked){I.setAttr!
 ibute("t
arget",J.value);}else{I.setAttribute("target","");}I.setAttribute("title",((L.value)?L.value:""));}else{var G=this._getDoc().createElement("span");G.innerHTML=I.innerHTML;C.addClass(G,"yui-non");I.parentNode.replaceChild(G,I);}this.nodeChange();this.currentElement=[];},render:function(){if(this._rendered){return false;}if(!this.DOMReady){this._queue[this._queue.length]=["render",arguments];return false;}this._setBusy();this._rendered=true;var F=this;this.set("textarea",this.get("element"));this.get("element_cont").setStyle("display","none");this.get("element_cont").addClass(this.CLASS_CONTAINER);this.set("iframe",this._createIframe());window.setTimeout(function(){F._setInitialContent.call(F);},10);this.get("editor_wrapper").appendChild(this.get("iframe").get("element"));C.addClass(this.get("iframe").get("parentNode"),this.CLASS_EDITABLE_CONT);this.get("iframe").addClass(this.CLASS_EDITABLE);var G=this.get("toolbar");G.disabled=true;this.toolbar=new B(this.get("toolbar_cont")!
 ,G);this.fireEvent("toolbarLoaded",{type:"toolbarLoaded",target:this.toolbar});this.toolbar.on("toolbarCollapsed",function(){if(this.currentWindow){this.moveWindow();}},this,true);this.toolbar.on("toolbarExpanded",function(){if(this.currentWindow){this.moveWindow();}},this,true);this.toolbar.on("fontsizeClick",function(H){this._handleFontSize(H);},this,true);this.toolbar.on("colorPickerClicked",function(H){this._handleColorPicker(H);},this,true);this.toolbar.on("alignClick",function(H){this._handleAlign(H);},this,true);this.on("afterNodeChange",function(){this._handleAfterNodeChange();},this,true);this.toolbar.on("insertimageClick",function(){this._handleInsertImageClick();},this,true);this.on("windowinsertimageClose",function(){this._handleInsertImageWindowClose();},this,true);this.toolbar.on("createlinkClick",function(){this._handleCreateLinkClick();},this,true);this.on("windowcreatelinkClose",function(){this._handleCreateLinkWindowClose();},this,true);this.get("parentNod!
 e").replaceChild(this.get("element_cont").get("element"),this.!
 get("ele
ment"));if(!this.beforeElement){this.beforeElement=document.createElement("h2");this.beforeElement.className="yui-editor-skipheader";this.beforeElement.tabIndex="-1";this.beforeElement.innerHTML=this.STR_BEFORE_EDITOR;this.get("element_cont").get("firstChild").insertBefore(this.beforeElement,this.toolbar.get("nextSibling"));}this.setStyle("visibility","hidden");this.setStyle("position","absolute");this.setStyle("top","-9999px");this.setStyle("left","-9999px");this.get("element_cont").appendChild(this.get("element"));this.get("element_cont").setStyle("display","block");this.get("element_cont").setStyle("width",this.get("width"));C.setStyle(this.get("iframe").get("parentNode"),"height",this.get("height"));this.get("iframe").setStyle("width","100%");this.get("iframe").setStyle("height","100%");this.fireEvent("afterRender",{type:"afterRender",target:this});},execCommand:function(d,Y){var Z=this.fireEvent("beforeExecCommand",{type:"beforeExecCommand",target:this,args:arguments});!
 if((Z===false)||(this.STOP_EXEC_COMMAND)){this.STOP_EXEC_COMMAND=false;return false;}this._setMarkupType(d);if(this.browser.ie){this._getWindow().focus();}var c=true,q=null,G=null,r="",a="",N=null,o=this._getSelection(),H=this._getRange(),S=this._getSelectedElement();if(S){o=S;}switch(d.toLowerCase()){case"heading":if(this.browser.ie){d="formatblock";}var l=0;if(Y=="none"){if((o&&o.tagName&&(o.tagName.toLowerCase().substring(0,1)=="h"))||(o&&o.parentNode&&o.parentNode.tagName&&(o.parentNode.tagName.toLowerCase().substring(0,1)=="h"))){if(o.parentNode.tagName.toLowerCase().substring(0,1)=="h"){if(!this._isElement(o.parentNode,"html")){o=o.parentNode;}}if(this._isElement(o,"body")){return false;}for(l=0;l<this.currentElement.length;l++){if(this._isElement(this.currentElement[l],"h1")||this._isElement(this.currentElement[l],"h2")||this._isElement(this.currentElement[l],"h3")||this._isElement(this.currentElement[l],"h4")||this._isElement(this.currentElement[l],"h5")||this._isEl!
 ement(this.currentElement[l],"h6")){G=this._swapEl(this.curren!
 tElement
[l],"span",function(e){e.className="yui-non";
-e.innerHTML=e.innerHTML.replace(new RegExp("<span class=\"yui-non\">(.*?)</span>","gi"),"$1");});this.currentElement[l]=G;}if(this.currentElement[l].nextSibling&&!this._isElement(this.currentElement[l].nextSibling,"br")){var P=this._getDoc().createElement("br");this.currentElement[l].parentNode.insertBefore(P,this.currentElement[l].nextSibling);}}}c=false;}else{if(this._isElement(S,"h1")||this._isElement(S,"h2")||this._isElement(S,"h3")||this._isElement(S,"h4")||this._isElement(S,"h5")||this._isElement(S,"h6")){G=this._swapEl(S,Y);this._selectNode(G);this.currentElement[0]=G;}else{this._createCurrentElement(Y);this._selectNode(this.currentElement[0]);for(l=0;l<this.currentElement.length;l++){if(this.currentElement[l].nextSibling&&this._isElement(this.currentElement[l].nextSibling,"br")){this.currentElement[l].nextSibling.parentNode.removeChild(this.currentElement[l].nextSibling);}}}c=false;}break;case"backcolor":if(this.browser.gecko||this.browser.opera){this._setEditorStyl!
 e(true);d="hilitecolor";}G=this._getSelectedElement();if(this.browser.opera){if(!this._isElement(G,"body")&&C.getStyle(G,"background-color")){C.setStyle(G,"background-color",Y);}else{this._createCurrentElement("span",{backgroundColor:Y});}c=false;}else{if(!this._hasSelection()){if(G!==this._getDoc().body){C.setStyle(G,"background-color",Y);c=false;}}}break;case"forecolor":G=this._getSelectedElement();if((G!==this._getDoc().body)&&(!this._hasSelection())){C.setStyle(G,"color",Y);c=false;}break;case"hiddenelements":this._showHidden();c=false;break;case"unlink":G=this._swapEl(this.currentElement[0],"span",function(e){e.className="yui-non";});c=false;break;case"createlink":G=this._getSelectedElement();var M=null;if(!this._isElement(G,"a")){this._createCurrentElement("a");M=this._swapEl(this.currentElement[0],"a");this.currentElement[0]=M;}else{this.currentElement[0]=G;}c=false;break;case"insertimage":if(Y===""){Y=this.get("blankimage");}G=this._getSelectedElement();if(this._isE!
 lement(G,"img")){this.currentElement[0]=G;c=false;}else{if(thi!
 s._getDo
c().queryCommandEnabled(d)){this._getDoc().execCommand("insertimage",false,Y);var V=this._getDoc().getElementsByTagName("img");for(var k=0;k<V.length;k++){if(!YAHOO.util.Dom.hasClass(V[k],"yui-img")){YAHOO.util.Dom.addClass(V[k],"yui-img");this.currentElement[0]=V[k];}}c=false;}else{var I=null;if(G==this._getDoc().body){I=this._getDoc().createElement("img");I.setAttribute("src",Y);YAHOO.util.Dom.addClass(I,"yui-img");this._getDoc().body.appendChild(I);}else{this._createCurrentElement("img");I=this._getDoc().createElement("img");I.setAttribute("src",Y);YAHOO.util.Dom.addClass(I,"yui-img");this.currentElement[0].parentNode.replaceChild(I,this.currentElement[0]);}this.currentElement[0]=I;c=false;}}break;case"inserthtml":if(this.browser.webkit&&!this._getDoc().queryCommandEnabled(d)){this._createCurrentElement("img");N=this._getDoc().createElement("span");N.innerHTML=Y;this.currentElement[0].parentNode.replaceChild(N,this.currentElement[0]);c=false;}else{if(this.browser.ie){H=th!
 is._getRange();if(H.item){H.item(0).outerHTML=Y;}else{H.pasteHTML(Y);}c=false;}}break;case"removeformat":if(this.browser.webkit&&!this._getDoc().queryCommandEnabled(d)){this._createCurrentElement("span");YAHOO.util.Dom.addClass(this.currentElement[0],"yui-non");var X=/<\S[^><]*>/g;a=this.currentElement[0].innerHTML.replace(X,"");var b=this._getDoc().createTextNode(a);this.currentElement[0].parentNode.parentNode.replaceChild(b,this.currentElement[0].parentNode);c=false;}break;case"superscript":case"subscript":if(this.browser.webkit){r=d.toLowerCase().substring(0,3);if(this._isElement(S,r)){N=this._swapEl(this.currentElement[0],"span",function(e){e.className="yui-non";});this._selectNode(N);}else{this._createCurrentElement(r);var R=this._swapEl(this.currentElement[0],r);this._selectNode(R);this.currentElement[0]=R;}c=false;}break;case"formatblock":Y="blockquote";if(this.browser.webkit){this._createCurrentElement("blockquote");if(YAHOO.util.Dom.hasClass(this.currentElement[0].!
 parentNode,"yui-tag-blockquote")){N=this._getDoc().createEleme!
 nt("span
");N.innerHTML=this.currentElement[0].innerHTML;YAHOO.util.Dom.addClass(N,"yui-non");this.currentElement[0].parentNode.parentNode.replaceChild(N,this.currentElement[0].parentNode);}c=false;}else{var g=A.getTarget(this.currentEvent);if(this._isElement(g,"blockquote")){N=this._getDoc().createElement("span");N.innerHTML=g.innerHTML;YAHOO.util.Dom.addClass(N,"yui-non");g.parentNode.replaceChild(N,g);c=false;}}break;case"indent":case"outdent":if(this.browser.webkit||this.browser.ie||this.browser.gecko){q=this._getSelectedElement();var Q=null;if(this._isElement(q,"blockquote")){if(d=="indent"){Q=this._getDoc().createElement("blockquote");Q.innerHTML=q.innerHTML;q.innerHTML="";q.appendChild(Q);this._selectNode(Q);}else{var U=q.parentNode;if(this._isElement(q.parentNode,"blockquote")){U.innerHTML=q.innerHTML;this._selectNode(U);}else{N=this._getDoc().createElement("span");N.innerHTML=q.innerHTML;YAHOO.util.Dom.addClass(N,"yui-non");U.replaceChild(N,q);this._selectNode(N);}}}else{if(!
 d=="indent"){this._createCurrentElement("blockquote");Q=this._getDoc().createElement("blockquote");Q.innerHTML=this.currentElement[0].innerHTML;this.currentElement[0].parentNode.replaceChild(Q,this.currentElement[0]);this.currentElement[0]=Q;this._selectNode(Q);}else{}}c=false;}else{Y="blockquote";}break;case"insertorderedlist":case"insertunorderedlist":r=((d.toLowerCase()=="insertorderedlist")?"ol":"ul");if((this.browser.webkit&&!this._getDoc().queryCommandEnabled(d))){var n=null;q=this._getSelectedElement();var T=0;if(this._isElement(q,"li")&&this._isElement(q.parentNode,r)){G=q.parentNode;n=this._getDoc().createElement("span");YAHOO.util.Dom.addClass(n,"yui-non");a="";var F=G.getElementsByTagName("li");for(T=0;T<F.length;T++){a+="<div>"+F[T].innerHTML+"</div>";}n.innerHTML=a;this.currentElement[0]=G;}else{this._createCurrentElement(r.toLowerCase());n=this._getDoc().createElement(r);var J=this.currentElement;
-for(T=0;T<this.currentElement.length;T++){var L=this._getDoc().createElement("li");L.innerHTML=this.currentElement[T].innerHTML+" ";n.appendChild(L);if(T>0){this.currentElement[T].parentNode.removeChild(this.currentElement[T]);}}}this.currentElement[0].parentNode.replaceChild(n,this.currentElement[0]);c=false;}else{G=this._getSelectedElement();if(this._isElement(G,"li")&&this._isElement(G.parentNode,r)||(this.browser.ie&&this._isElement(this._getRange().parentElement,"li"))){if(this.browser.ie){a="";var K=G.parentNode.getElementsByTagName("li");for(var f=0;f<K.length;f++){a+=K[f].innerHTML+"<br>";}var p=this._getDoc().createElement("span");p.innerHTML=a;G.parentNode.parentNode.replaceChild(p,G.parentNode);}else{this.nodeChange();this._getDoc().execCommand(d,"",G.parentNode);this.nodeChange();}c=false;}if(this.browser.opera){var W=this;window.setTimeout(function(){var e=W._getDoc().getElementsByTagName("li");for(var h=0;h<e.length;h++){if(e[h].innerHTML.toLowerCase()=="!
 <br>"){e[h].parentNode.parentNode.removeChild(e[h].parentNode);}}},30);}if(this.browser.ie&&c){var O="";if(this._getRange().html){O="<li>"+this._getRange().html+"</li>";}else{O="<li>"+this._getRange().text+"</li>";}this._getRange().pasteHTML("<"+r+">"+O+"</"+r+">");c=false;}}break;case"fontname":q=this._getSelectedElement();this.currentFont=Y;if(q&&q.tagName&&!this._hasSelection()){YAHOO.util.Dom.setStyle(q,"font-family",Y);c=false;}break;case"fontsize":if((this.currentElement.length>0)&&(!this._hasSelection())){YAHOO.util.Dom.setStyle(this.currentElement,"fontSize",Y);}else{if(!this._isElement(this._getSelectedElement(),"body")){YAHOO.util.Dom.setStyle(this._getSelectedElement(),"fontSize",Y);}else{this._createCurrentElement("span",{"fontSize":Y});}}c=false;break;}if(c){try{this._getDoc().execCommand(d,false,Y);}catch(m){}}else{}this.on("afterExecCommand",function(){this.unsubscribeAll("afterExecCommand");this.nodeChange();});this.fireEvent("afterExecCommand",{type:"afterE!
 xecCommand",target:this});},_swapEl:function(G,F,I){var H=this!
 ._getDoc
().createElement(F);H.innerHTML=G.innerHTML;if(typeof I=="function"){I.call(this,H);}G.parentNode.replaceChild(H,G);return H;},_createCurrentElement:function(H,U){H=((H)?H:"a");var Z=this._getSelection(),c=null,G=[],I=this._getDoc();if(this.currentFont){if(!U){U={};}U.fontFamily=this.currentFont;this.currentFont=null;}this.currentElement=[];var X=function(){var g=null;switch(H){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":g=I.createElement(H);break;default:g=I.createElement("span");YAHOO.util.Dom.addClass(g,"yui-tag-"+H);YAHOO.util.Dom.addClass(g,"yui-tag");g.setAttribute("tag",H);for(var e in U){if(YAHOO.util.Lang.hasOwnProperty(U,e)){g.style[e]=U[e];}}break;}return g;};if(!this._hasSelection()){if(this._getDoc().queryCommandEnabled("insertimage")){this._getDoc().execCommand("insertimage",false,"yui-tmp-img");var W=this._getDoc().getElementsByTagName("img");for(var a=0;a<W.length;a++){if(W[a].getAttribute("src",2)=="yui-tmp-img"){G=X();W[a].parentNode.replaceChild(!
 G,W[a]);this.currentElement[this.currentElement.length]=G;}}}else{if(this.currentEvent){c=YAHOO.util.Event.getTarget(this.currentEvent);}else{c=this._getDoc().body;}}if(c){G=X();if(this._isElement(c,"body")){c.appendChild(G);}else{if(c.nextSibling){c.parentNode.insertBefore(G,c.nextSibling);}else{c.parentNode.appendChild(G);}}this.currentElement[this.currentElement.length]=G;this.currentEvent=null;if(this.browser.webkit){this._getSelection().setBaseAndExtent(G,0,G,0);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(true);}}}}else{this._setEditorStyle(true);this._getDoc().execCommand("fontname",false,"yui-tmp");var F=[];var R=this._getDoc().getElementsByTagName("font");var P=this._getDoc().getElementsByTagName(this._getSelectedElement().tagName);var N=this._getDoc().getElementsByTagName("span");var L=this._getDoc().getElementsByTagName("i");var K=this._getDoc().getElementsByTagName("b");var J=this._getDoc().getElementsByTagN!
 ame(this._getSelectedElement().parentNode.tagName);for(var V=0!
 ;V<R.len
gth;V++){F[F.length]=R[V];}for(var M=0;M<J.length;M++){F[F.length]=J[M];}for(var T=0;T<P.length;T++){F[F.length]=P[T];}for(var S=0;S<N.length;S++){F[F.length]=N[S];}for(var Q=0;Q<L.length;Q++){F[F.length]=L[Q];}for(var O=0;O<K.length;O++){F[F.length]=K[O];}for(var b=0;b<F.length;b++){if((YAHOO.util.Dom.getStyle(F[b],"font-family")=="yui-tmp")||(F[b].face&&(F[b].face=="yui-tmp"))){G=X();G.innerHTML=F[b].innerHTML;if(this._isElement(F[b],"ol")||(this._isElement(F[b],"ul"))){var Y=F[b].getElementsByTagName("li")[0];F[b].style.fontFamily="inherit";Y.style.fontFamily="inherit";G.innerHTML=Y.innerHTML;Y.innerHTML="";Y.appendChild(G);this.currentElement[this.currentElement.length]=G;}else{if(this._isElement(F[b],"li")){F[b].innerHTML="";F[b].appendChild(G);F[b].style.fontFamily="inherit";this.currentElement[this.currentElement.length]=G;}else{if(F[b].parentNode){F[b].parentNode.replaceChild(G,F[b]);this.currentElement[this.currentElement.length]=G;this.currentEvent=null;if(this.bro!
 wser.webkit){this._getSelection().setBaseAndExtent(G,0,G,0);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(true);}}if(this.browser.ie&&U&&U.fontSize){this._getSelection().empty();}if(this.browser.gecko){this._getSelection().collapseToStart();}}}}}}var d=this.currentElement.length;for(var f=0;f<d;f++){if((f+1)!=d){if(this.currentElement[f]&&this.currentElement[f].nextSibling){if(this._isElement(this.currentElement[f],"br")){this.currentElement[this.currentElement.length]=this.currentElement[f].nextSibling;}}}}}},saveHTML:function(){var F=this.cleanHTML();this.get("element").value=F;return F;},setEditorHTML:function(F){this._getDoc().body.innerHTML=F;this.nodeChange();},getEditorHTML:function(){return this._getDoc().body.innerHTML;},show:function(){if(this.browser.gecko){this._setDesignMode("on");this._focusWindow();}if(this.browser.webkit){var F=this;window.setTimeout(function(){F._setInitialContent.call(F);
-},10);}if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}this.get("iframe").setStyle("position","static");this.get("iframe").setStyle("left","");},hide:function(){if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}if(this._fixNodesTimer){clearTimeout(this._fixNodesTimer);this._fixNodesTimer=null;}if(this._nodeChangeTimer){clearTimeout(this._nodeChangeTimer);this._nodeChangeTimer=null;}this._lastNodeChange=0;this.get("iframe").setStyle("position","absolute");this.get("iframe").setStyle("left","-9999px");},cleanHTML:function(H){if(!H){H=this.getEditorHTML();}var F=this.get("markup");if(this.browser.webkit){H=H.replace(/<br class="khtml-block-placeholder">/gi,"<YUI_BR>");H=H.replace(/<br class="webkit-block-placeholder">/gi,"<YUI_BR>");}H=H.r!
 eplace(/<br>/gi,"<YUI_BR>");H=H.replace(/<br\/>/gi,"<YUI_BR>");H=H.replace(/<br \/>/gi,"<YUI_BR>");H=H.replace(/<div><YUI_BR><\/div>/gi,"<YUI_BR>");H=H.replace(/<p>( | )<\/p>/g,"<YUI_BR>");H=H.replace(/<p><br> <\/p>/gi,"<YUI_BR>");H=H.replace(/<p> <\/p>/gi,"<YUI_BR>");H=H.replace(/<img([^>]*)\/>/gi,"<YUI_IMG$1>");H=H.replace(/<img([^>]*)>/gi,"<YUI_IMG$1>");H=H.replace(/<ul([^>]*)>/gi,"<YUI_UL$1>");H=H.replace(/<\/ul>/gi,"</YUI_UL>");H=H.replace(/<blockquote([^>]*)>/gi,"<YUI_BQ$1>");H=H.replace(/<\/blockquote>/gi,"</YUI_BQ>");if((F=="semantic")||(F=="xhtml")){H=H.replace(/<i([^>]*)>/gi,"<em$1>");H=H.replace(/<\/i>/gi,"</em>");H=H.replace(/<b([^>]*)>/gi,"<strong$1>");H=H.replace(/<\/b>/gi,"</strong>");}H=H.replace(/<font/gi,"<font");H=H.replace(/<\/font>/gi,"</font>");H=H.replace(/<span/gi,"<span");H=H.replace(/<\/span>/gi,"</span>");if((F=="semantic")||(F=="xhtml")||(F=="css")){H=H.replace(new RegExp("<font([^>]*)face=\"([^>]*)\">(.*?)</font>","gi"),"<spa!
 n $1 style=\"font-family: $2;\">$3</span>");H=H.replace(/<u/gi!
 ,"<span 
style=\"text-decoration: underline;\"");H=H.replace(/\/u>/gi,"/span>");if(F=="css"){H=H.replace(/<em([^>]*)>/gi,"<i$1>");H=H.replace(/<\/em>/gi,"</i>");H=H.replace(/<strong([^>]*)>/gi,"<b$1>");H=H.replace(/<\/strong>/gi,"</b>");H=H.replace(/<b/gi,"<span style=\"font-weight: bold;\"");H=H.replace(/\/b>/gi,"/span>");H=H.replace(/<i/gi,"<span style=\"font-style: italic;\"");H=H.replace(/\/i>/gi,"/span>");}H=H.replace(/  /gi," ");}else{H=H.replace(/<u/gi,"<u");H=H.replace(/\/u>/gi,"/u>");}H=H.replace(/<ol([^>]*)>/gi,"<ol$1>");H=H.replace(/\/ol>/gi,"/ol>");H=H.replace(/<li/gi,"<li");H=H.replace(/\/li>/gi,"/li>");H=H.replace(/<\/?(body|head|html)[^>]*>/gi,"");H=H.replace(/<YUI_BR>$/,"");H=H.replace(/<YUI_BR><\/p>/g,"</p>");H=H.replace(/<YUI_BR><\/li>/gi,"</li>");if(this.browser.webkit){H=H.replace(/Apple-style-span/gi,"");H=H.replace(/style="line-height: normal;"/gi,"");H=H.replace(/<li><\/li>/gi,"");H=H.replace(/<li> <\/li>/gi,"");H=H.replace(/<div><\/div>/gi,"");H=H.replace(/<di!
 v> <\/div>/gi,"");}H=H.replace(/yui-tag-span/gi,"");H=H.replace(/yui-tag/gi,"");H=H.replace(/yui-non/gi,"");H=H.replace(/yui-img/gi,"");H=H.replace(/ tag="span"/gi,"");H=H.replace(/ class=""/gi,"");H=H.replace(/ style=""/gi,"");H=H.replace(/ class=" "/gi,"");H=H.replace(/ class="  "/gi,"");H=H.replace(/ target=""/gi,"");H=H.replace(/ title=""/gi,"");for(var G=0;G<5;G++){H=H.replace(new RegExp("<span>(.*?)</span>","gi"),"$1");}if(this.browser.ie){H=H.replace(/ class= /gi,"");H=H.replace(/ class= >/gi,"");H=H.replace(/_height="([^>])"/gi,"");H=H.replace(/_width="([^>])"/gi,"");}if(F=="xhtml"){H=H.replace(/<YUI_BR>/g,"<br/>");H=H.replace(/<YUI_IMG([^>]*)>/g,"<img $1/>");}else{H=H.replace(/<YUI_BR>/g,"<br>");H=H.replace(/<YUI_IMG([^>]*)>/g,"<img $1>");}H=H.replace(/<YUI_UL([^>]*)>/g,"<ul$1>");H=H.replace(/<\/YUI_UL>/g,"</ul>");H=H.replace(/<YUI_BQ([^>]*)>/g,"<blockquote$1>");H=H.replace(/<\/YUI_BQ>/g,"</blockquote>");H=H.replace(/^\s+/g,"").replace(/\s+$/g,"");if(this.get("remo!
 veLineBreaks")){H=H.replace(/\n/g,"").replace(/\r/g,"");H=H.re!
 place(/ 
 /gi," ");}return H;},clearEditorDoc:function(){this._getDoc().body.innerHTML=" ";},_renderPanel:function(){var F=null;if(!YAHOO.widget.EditorInfo.panel){F=new YAHOO.widget.Overlay(this.EDITOR_PANEL_ID,{width:"300px",iframe:true,visible:false,underlay:"none",draggable:false,close:false});YAHOO.widget.EditorInfo.panel=F;}else{F=YAHOO.widget.EditorInfo.panel;}this.set("panel",F);this.get("panel").setBody("---");this.get("panel").setHeader(" ");this.get("panel").setFooter(" ");if(this.DOMReady){this.get("panel").render(document.body);C.addClass(this.get("panel").element,"yui-editor-panel");}else{A.onDOMReady(function(){this.get("panel").render(document.body);C.addClass(this.get("panel").element,"yui-editor-panel");},this,true);}this.get("panel").showEvent.subscribe(function(){YAHOO.util.Dom.setStyle(this.element,"display","block");});return this.get("panel");},openWindow:function(K){this.toolbar.set("disabled",true);A.on(document,"keypress",this._closeWindow,this,true);if(!
 YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}YAHOO.widget.EditorInfo.window.win=K;YAHOO.widget.EditorInfo.window.scope=this;var P=this,L=C.getXY(this.currentElement[0]),U=C.getXY(this.get("iframe").get("element")),N=this.get("panel"),T=[(L[0]+U[0]-20),(L[1]+U[1]+10)],O=(parseInt(K.attrs.width,10)/2),R="center",M=null;this.fireEvent("beforeOpenWindow",{type:"beforeOpenWindow",win:K,panel:N});M=document.createElement("div");M.className=this.CLASS_PREFIX+"-body-cont";for(var V in this.browser){if(this.browser[V]){C.addClass(M,V);break;}}var S=document.createElement("h3");S.className="yui-editor-skipheader";S.innerHTML=this.STR_CLOSE_WINDOW_NOTE;M.appendChild(S);form=document.createElement("form");form.setAttribute("method","GET");var W=K.name;A.on(form,"submit",function(Y){var X="window"+W+"Submit";
-P.fireEvent(X,{type:X,target:this});A.stopEvent(Y);},this,true);M.appendChild(form);if(D.isObject(K.body)){form.appendChild(K.body);}else{var F=document.createElement("div");F.innerHTML=K.body;form.appendChild(F);}var J=document.createElement("span");J.innerHTML="X";J.title=this.STR_CLOSE_WINDOW;J.className="close";A.on(J,"click",function(){this.closeWindow();},this,true);var H=document.createElement("span");H.innerHTML="^";H.className="knob";K._knob=H;var I=document.createElement("h3");I.innerHTML=K.header;N.cfg.setProperty("width",K.attrs.width);N.setHeader(" ");N.appendToHeader(I);I.appendChild(J);I.appendChild(H);N.setBody(" ");N.setFooter(" ");if(K.footer!==null){N.setFooter(K.footer);C.addClass(N.footer,"open");}else{C.removeClass(N.footer,"open");}N.appendToBody(M);var Q=function(){N.bringToTop();A.on(N.element,"click",function(X){A.stopPropagation(X);});this._setBusy(true);N.showEvent.unsubscribe(Q);};N.showEvent.subscribe(Q,this,true);var G=function(){this.currentW!
 indow=null;var X="window"+W+"Close";this.fireEvent(X,{type:X,target:this});N.hideEvent.unsubscribe(G);};N.hideEvent.subscribe(G,this,true);this.currentWindow=K;this.moveWindow(true);N.show();this.fireEvent("afterOpenWindow",{type:"afterOpenWindow",win:K,panel:N});},moveWindow:function(G){if(!this.currentWindow){return false;}var I=this.currentWindow,J=C.getXY(this.currentElement[0]),Z=C.getXY(this.get("iframe").get("element")),O=this.get("panel"),X=[(J[0]+Z[0]),(J[1]+Z[1])],Q=(parseInt(I.attrs.width,10)/2),T="center",P=O.cfg.getProperty("xy"),H=I._knob,W=0,L=0,S=false;X[0]=((X[0]-Q)+20);X[0]=X[0]-C.getDocumentScrollLeft(this._getDoc());X[1]=X[1]-C.getDocumentScrollTop(this._getDoc());if(this._isElement(this.currentElement[0],"img")){if(this.currentElement[0].src.indexOf(this.get("blankimage"))!=-1){X[0]=(X[0]+(75/2));X[1]=(X[1]+75);}else{var N=parseInt(this.currentElement[0].width,10);var V=parseInt(this.currentElement[0].height,10);X[0]=(X[0]+(N/2));X[1]=(X[1]+V);}X[1]=X[1!
 ]+15;}else{var K=C.getStyle(this.currentElement[0],"fontSize")!
 ;if(K&&K
.indexOf&&K.indexOf("px")!=-1){X[1]=X[1]+parseInt(C.getStyle(this.currentElement[0],"fontSize"),10)+5;}else{X[1]=X[1]+20;}}if(X[0]<Z[0]){X[0]=Z[0]+5;T="left";}if((X[0]+(Q*2))>(Z[0]+parseInt(this.get("iframe").get("element").clientWidth,10))){X[0]=((Z[0]+parseInt(this.get("iframe").get("element").clientWidth,10))-(Q*2)-5);T="right";}try{W=(X[0]-P[0]);L=(X[1]-P[1]);}catch(a){}W=((W<0)?(W*-1):W);L=((L<0)?(L*-1):L);if(((W>10)||(L>10))||G){var R=0,U=0;if(this.currentElement[0].width){U=(parseInt(this.currentElement[0].width,10)/2);}var M=J[0]+Z[0]+U;R=M-X[0];if(R>(parseInt(I.attrs.width,10)-40)){R=parseInt(I.attrs.width,10)-40;}else{if(R<40){R=40;}}if(isNaN(R)){R=40;}if(G){if(H){H.style.left=R+"px";}if(this.get("animate")){C.setStyle(O.element,"opacity","0");S=new YAHOO.util.Anim(O.element,{opacity:{from:0,to:1}},0.1,YAHOO.util.Easing.easeOut);O.cfg.setProperty("xy",X);S.onComplete.subscribe(function(){if(this.browser.ie){O.element.style.filter="none";}},this,true);S.animate();}e!
 lse{O.cfg.setProperty("xy",X);}}else{if(this.get("animate")){S=new YAHOO.util.Anim(O.element,{},0.5,YAHOO.util.Easing.easeOut);S.attributes={top:{to:X[1]},left:{to:X[0]}};S.onComplete.subscribe(function(){O.cfg.setProperty("xy",X);});var Y=new YAHOO.util.Anim(O.iframe,S.attributes,0.5,YAHOO.util.Easing.easeOut);var F=new YAHOO.util.Anim(H,{left:{to:R}},0.6,YAHOO.util.Easing.easeOut);S.animate();Y.animate();F.animate();}else{H.style.left=R+"px";O.cfg.setProperty("xy",X);}}}},_closeWindow:function(F){if((F.charCode==87)&&F.shiftKey&&F.ctrlKey){if(this.currentWindow){this.closeWindow();}}},closeWindow:function(){YAHOO.widget.EditorInfo.window={};this.fireEvent("closeWindow",{type:"closeWindow",win:this.currentWindow});this.currentWindow=null;this.get("panel").hide();this.get("panel").cfg.setProperty("xy",[-900,-900]);this.get("panel").syncIframe();this.unsubscribeAll("afterExecCommand");this.toolbar.set("disabled",false);this.toolbar.resetAllButtons();this._focusWindow();A.rem!
 oveListener(document,"keypress",this._closeWindow);},destroy:f!
 unction(
){this.saveHTML();this.toolbar.destroy();this.setStyle("visibility","hidden");this.setStyle("position","absolute");this.setStyle("top","-9999px");this.setStyle("left","-9999px");var G=this.get("element");this.get("element_cont").get("parentNode").replaceChild(G,this.get("element_cont").get("element"));this.get("element_cont").get("element").innerHTML="";for(var F in this){if(D.hasOwnProperty(this,F)){this[F]=null;}}return true;},toString:function(){var F="Editor";if(this.get&&this.get("element_cont")){F="Editor (#"+this.get("element_cont").get("id")+")"+((this.get("disabled")?" Disabled":""));}return F;}});YAHOO.widget.EditorInfo={_instances:{},window:{},panel:null,getEditorById:function(F){if(!YAHOO.lang.isString(F)){F=F.id;}if(this._instances[F]){return this._instances[F];}return false;},toString:function(){var F=0;for(var G in this._instances){F++;}return"Editor Info ("+F+" registered intance"+((F>1)?"s":"")+")";}};YAHOO.widget.EditorWindow=function(G,F){this.name=G.repla!
 ce(" ","_");this.attrs=F;};YAHOO.widget.EditorWindow.prototype={_cache:null,header:null,body:null,footer:null,setHeader:function(F){this.header=F;},setBody:function(F){this.body=F;},setFooter:function(F){this.footer=F;},toString:function(){return"Editor Window ("+this.name+")";}};})();YAHOO.register("editor",YAHOO.widget.Editor,{version:"2.3.1",build:"541"});
\ No newline at end of file
+(function(){var B=YAHOO.util.Dom,A=YAHOO.util.Event,C=YAHOO.lang;if(YAHOO.widget.Button){YAHOO.widget.ToolbarButtonAdvanced=YAHOO.widget.Button;YAHOO.widget.ToolbarButtonAdvanced.prototype.buttonType="rich";YAHOO.widget.ToolbarButtonAdvanced.prototype.checkValue=function(F){var E=this.getMenu().getItems();if(E.length===0){this.getMenu()._onBeforeShow();E=this.getMenu().getItems();}for(var D=0;D<E.length;D++){E[D].cfg.setProperty("checked",false);if(E[D].value==F){E[D].cfg.setProperty("checked",true);}}};}else{YAHOO.widget.ToolbarButtonAdvanced=function(){};}YAHOO.widget.ToolbarButton=function(E,D){if(C.isObject(arguments[0])&&!B.get(E).nodeType){D=E;}var G=(D||{});var F={element:null,attributes:G};if(!F.attributes.type){F.attributes.type="push";}F.element=document.createElement("span");F.element.setAttribute("unselectable","on");F.element.className="yui-button yui-"+F.attributes.type+"-button";F.element.innerHTML="<span class=\"first-child\"><a href=\"#\">LABEL</a></span>";!
 F.attributes.id=B.generateId();YAHOO.widget.ToolbarButton.superclass.constructor.call(this,F.element,F.attributes);};YAHOO.extend(YAHOO.widget.ToolbarButton,YAHOO.util.Element,{buttonType:"normal",_handleMouseOver:function(){if(!this.get("disabled")){this.addClass("yui-button-hover");this.addClass("yui-"+this.get("type")+"-button-hover");}},_handleMouseOut:function(){this.removeClass("yui-button-hover");this.removeClass("yui-"+this.get("type")+"-button-hover");},checkValue:function(F){if(this.get("type")=="menu"){var E=this._button.options;for(var D=0;D<E.length;D++){if(E[D].value==F){E.selectedIndex=D;}}}},init:function(E,D){YAHOO.widget.ToolbarButton.superclass.init.call(this,E,D);this.on("mouseover",this._handleMouseOver,this,true);this.on("mouseout",this._handleMouseOut,this,true);},initAttributes:function(D){YAHOO.widget.ToolbarButton.superclass.initAttributes.call(this,D);this.setAttributeConfig("value",{value:D.value});this.setAttributeConfig("menu",{value:D.menu||fa!
 lse});this.setAttributeConfig("type",{value:D.type,writeOnce:t!
 rue,meth
od:function(H){var G,F;if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0];}switch(H){case"select":case"menu":G=document.createElement("select");var I=this.get("menu");for(var E=0;E<I.length;E++){F=document.createElement("option");F.innerHTML=I[E].text;F.value=I[E].value;if(I[E].checked){F.selected=true;}G.appendChild(F);}this._button.parentNode.replaceChild(G,this._button);A.on(G,"change",this._handleSelect,this,true);this._button=G;break;}}});this.setAttributeConfig("disabled",{value:D.disabled||false,method:function(E){if(E){this.addClass("yui-button-disabled");this.addClass("yui-"+this.get("type")+"-button-disabled");}else{this.removeClass("yui-button-disabled");this.removeClass("yui-"+this.get("type")+"-button-disabled");}if(this.get("type")=="menu"){this._button.disabled=E;}}});this.setAttributeConfig("label",{value:D.label,method:function(E){if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0];}if(this.get("type")!
 =="push"){this._button.innerHTML=E;}}});this.setAttributeConfig("title",{value:D.title});this.setAttributeConfig("container",{value:null,writeOnce:true,method:function(E){this.appendTo(E);}});},_handleSelect:function(E){var D=A.getTarget(E);var F=D.options[D.selectedIndex].value;this.fireEvent("change",{type:"change",value:F});},getMenu:function(){return this.get("menu");},fireEvent:function(E,D){if(this.DOM_EVENTS[E]&&this.get("disabled")){return ;}YAHOO.widget.ToolbarButton.superclass.fireEvent.call(this,E,D);},toString:function(){return"ToolbarButton ("+this.get("id")+")";}});})();(function(){var B=YAHOO.util.Dom,A=YAHOO.util.Event,D=YAHOO.lang;YAHOO.widget.Toolbar=function(G,F){if(D.isObject(arguments[0])&&!B.get(G).nodeType){F=G;}var I=(F||{});var H={element:null,attributes:I};if(D.isString(G)&&B.get(G)){H.element=B.get(G);}else{if(D.isObject(G)&&B.get(G)&&B.get(G).nodeType){H.element=B.get(G);}}if(!H.element){H.element=document.createElement("DIV");H.element.id=B.gene!
 rateId();if(I.container&&B.get(I.container)){B.get(I.container!
 ).append
Child(H.element);}}if(!H.element.id){H.element.id=((D.isString(G))?G:B.generateId());}var E=document.createElement("DIV");H.attributes.cont=E;B.addClass(E,"yui-toolbar-subcont");H.element.appendChild(E);H.attributes.element=H.element;H.attributes.id=H.element.id;YAHOO.widget.Toolbar.superclass.constructor.call(this,H.element,H.attributes);};function C(H,E,I){B.addClass(this.element,"yui-toolbar-"+I.get("value")+"-menu");if(B.hasClass(I._button.parentNode.parentNode,"yui-toolbar-select")){B.addClass(this.element,"yui-toolbar-select-menu");}var F=this.getItems();for(var G=0;G<F.length;G++){B.addClass(F[G].element,"yui-toolbar-"+I.get("value")+"-"+((F[G].value)?F[G].value.replace(/ /g,"-").toLowerCase():F[G]._oText.nodeValue.replace(/ /g,"-").toLowerCase()));B.addClass(F[G].element,"yui-toolbar-"+I.get("value")+"-"+((F[G].value)?F[G].value.replace(/ /g,"-"):F[G]._oText.nodeValue.replace(/ /g,"-")));}}YAHOO.extend(YAHOO.widget.Toolbar,YAHOO.util.Element,{buttonType:YAHOO.widget.!
 ToolbarButton,dd:null,_colorData:{"#111111":"Obsidian","#2D2D2D":"Dark Gray","#434343":"Shale","#5B5B5B":"Flint","#737373":"Gray","#8B8B8B":"Concrete","#A2A2A2":"Gray","#B9B9B9":"Titanium","#000000":"Black","#D0D0D0":"Light Gray","#E6E6E6":"Silver","#FFFFFF":"White","#BFBF00":"Pumpkin","#FFFF00":"Yellow","#FFFF40":"Banana","#FFFF80":"Pale Yellow","#FFFFBF":"Butter","#525330":"Raw Siena","#898A49":"Mildew","#AEA945":"Olive","#7F7F00":"Paprika","#C3BE71":"Earth","#E0DCAA":"Khaki","#FCFAE1":"Cream","#60BF00":"Cactus","#80FF00":"Chartreuse","#A0FF40":"Green","#C0FF80":"Pale Lime","#DFFFBF":"Light Mint","#3B5738":"Green","#668F5A":"Lime Gray","#7F9757":"Yellow","#407F00":"Clover","#8A9B55":"Pistachio","#B7C296":"Light Jade","#E6EBD5":"Breakwater","#00BF00":"Spring Frost","#00FF80":"Pastel Green","#40FFA0":"Light Emerald","#80FFC0":"Sea Foam","#BFFFDF":"Sea Mist","#033D21":"Dark Forrest","#438059":"Moss","#7FA37C":"Medium Green","#007F40":"Pine","#8DAE94":"Yellow Gray Green","#AC!
 C6B5":"Aqua Lung","#DDEBE2":"Sea Vapor","#00BFBF":"Fog","#00FF!
 FF":"Cya
n","#40FFFF":"Turquoise Blue","#80FFFF":"Light Aqua","#BFFFFF":"Pale Cyan","#033D3D":"Dark Teal","#347D7E":"Gray Turquoise","#609A9F":"Green Blue","#007F7F":"Seaweed","#96BDC4":"Green Gray","#B5D1D7":"Soapstone","#E2F1F4":"Light Turquoise","#0060BF":"Summer Sky","#0080FF":"Sky Blue","#40A0FF":"Electric Blue","#80C0FF":"Light Azure","#BFDFFF":"Ice Blue","#1B2C48":"Navy","#385376":"Biscay","#57708F":"Dusty Blue","#00407F":"Sea Blue","#7792AC":"Sky Blue Gray","#A8BED1":"Morning Sky","#DEEBF6":"Vapor","#0000BF":"Deep Blue","#0000FF":"Blue","#4040FF":"Cerulean Blue","#8080FF":"Evening Blue","#BFBFFF":"Light Blue","#212143":"Deep Indigo","#373E68":"Sea Blue","#444F75":"Night Blue","#00007F":"Indigo Blue","#585E82":"Dockside","#8687A4":"Blue Gray","#D2D1E1":"Light Blue Gray","#6000BF":"Neon Violet","#8000FF":"Blue Violet","#A040FF":"Violet Purple","#C080FF":"Violet Dusk","#DFBFFF":"Pale Lavender","#302449":"Cool Shale","#54466F":"Dark Indigo","#655A7F":"Dark Violet","#40007F":"Viol!
 et","#726284":"Smoky Violet","#9E8FA9":"Slate Gray","#DCD1DF":"Violet White","#BF00BF":"Royal Violet","#FF00FF":"Fuchsia","#FF40FF":"Magenta","#FF80FF":"Orchid","#FFBFFF":"Pale Magenta","#4A234A":"Dark Purple","#794A72":"Medium Purple","#936386":"Cool Granite","#7F007F":"Purple","#9D7292":"Purple Moon","#C0A0B6":"Pale Purple","#ECDAE5":"Pink Cloud","#BF005F":"Hot Pink","#FF007F":"Deep Pink","#FF409F":"Grape","#FF80BF":"Electric Pink","#FFBFDF":"Pink","#451528":"Purple Red","#823857":"Purple Dino","#A94A76":"Purple Gray","#7F003F":"Rose","#BC6F95":"Antique Mauve","#D8A5BB":"Cool Marble","#F7DDE9":"Pink Granite","#C00000":"Apple","#FF0000":"Fire Truck","#FF4040":"Pale Red","#FF8080":"Salmon","#FFC0C0":"Warm Pink","#441415":"Sepia","#82393C":"Rust","#AA4D4E":"Brick","#800000":"Brick Red","#BC6E6E":"Mauve","#D8A3A4":"Shrimp Pink","#F8DDDD":"Shell Pink","#BF5F00":"Dark Orange","#FF7F00":"Orange","#FF9F40":"Grapefruit","#FFBF80":"Canteloupe","#FFDFBF":"Wax","#482C1B":"Dark Brick"!
 ,"#855A40":"Dirt","#B27C51":"Tan","#7F3F00":"Nutmeg","#C49B71"!
 :"Mustar
d","#E1C4A8":"Pale Tan","#FDEEE0":"Marble"},_colorPicker:null,STR_COLLAPSE:"Collapse Toolbar",STR_SPIN_LABEL:"Spin Button with value {VALUE}. Use Control Shift Up Arrow and Control Shift Down arrow keys to increase or decrease the value.",STR_SPIN_UP:"Click to increase the value of this input",STR_SPIN_DOWN:"Click to decrease the value of this input",_titlebar:null,browser:YAHOO.env.ua,_buttonList:null,_buttonGroupList:null,_sep:null,_sepCount:null,_dragHandle:null,_toolbarConfigs:{renderer:true},CLASS_CONTAINER:"yui-toolbar-container",CLASS_DRAGHANDLE:"yui-toolbar-draghandle",CLASS_SEPARATOR:"yui-toolbar-separator",CLASS_DISABLED:"yui-toolbar-disabled",CLASS_PREFIX:"yui-toolbar",init:function(F,E){YAHOO.widget.Toolbar.superclass.init.call(this,F,E);
+},initAttributes:function(E){YAHOO.widget.Toolbar.superclass.initAttributes.call(this,E);this.addClass(this.CLASS_CONTAINER);this.setAttributeConfig("buttonType",{value:E.buttonType||"basic",writeOnce:true,validator:function(F){switch(F){case"advanced":case"basic":return true;}return false;},method:function(F){if(F=="advanced"){if(YAHOO.widget.Button){this.buttonType=YAHOO.widget.ToolbarButtonAdvanced;}else{this.buttonType=YAHOO.widget.ToolbarButton;}}else{this.buttonType=YAHOO.widget.ToolbarButton;}}});this.setAttributeConfig("buttons",{value:[],writeOnce:true,method:function(G){for(var F in G){if(D.hasOwnProperty(G,F)){if(G[F].type=="separator"){this.addSeparator();}else{if(G[F].group!==undefined){this.addButtonGroup(G[F]);}else{this.addButton(G[F]);}}}}}});this.setAttributeConfig("disabled",{value:false,method:function(F){if(this.get("disabled")===F){return false;}if(F){this.addClass(this.CLASS_DISABLED);this.set("draggable",false);this.disableAllButtons();}else{this.rem!
 oveClass(this.CLASS_DISABLED);if(this._configs.draggable._initialConfig.value){this.set("draggable",true);}this.resetAllButtons();}}});this.setAttributeConfig("cont",{value:E.cont,readOnly:true});this.setAttributeConfig("grouplabels",{value:E.grouplabels||true,method:function(F){if(F){B.removeClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"));}else{B.addClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"));}}});this.setAttributeConfig("titlebar",{value:false,method:function(G){if(G){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar);}this._titlebar=document.createElement("DIV");B.addClass(this._titlebar,this.CLASS_PREFIX+"-titlebar");if(D.isString(G)){var F=document.createElement("h2");F.tabIndex="-1";F.innerHTML=G;this._titlebar.appendChild(F);}if(this.get("firstChild")){this.insertBefore(this._titlebar,this.get("firstChild"));}else{this.appendChild(this._titlebar);}if(this.get("collapse")){this.set("collaps!
 e",true);}}else{if(this._titlebar){if(this._titlebar&&this._ti!
 tlebar.p
arentNode){this._titlebar.parentNode.removeChild(this._titlebar);}}}}});this.setAttributeConfig("collapse",{value:false,method:function(H){var G=null;var F=B.getElementsByClassName("collapse","span",this._titlebar);if(H){if(F.length>0){return true;}G=document.createElement("SPAN");G.innerHTML="X";G.title=this.STR_COLLAPSE;B.addClass(G,"collapse");this._titlebar.appendChild(G);A.addListener(G,"click",function(){if(B.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false);}else{this.collapse();}},this,true);}else{G=B.getElementsByClassName("collapse","span",this._titlebar);if(G[0]){if(B.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false);}G[0].parentNode.removeChild(G[0]);}}}});this.setAttributeConfig("draggable",{value:(E.draggable||false),method:function(F){if(F&&!this.get("titlebar")){if(!this._dragHandle){this._dragHandle=document.createElement("SPAN");this._dragHandle.innerHTML="|";this._dragH!
 andle.setAttribute("title","Click to drag the toolbar");this._dragHandle.id=this.get("id")+"_draghandle";B.addClass(this._dragHandle,this.CLASS_DRAGHANDLE);if(this.get("cont").hasChildNodes()){this.get("cont").insertBefore(this._dragHandle,this.get("cont").firstChild);}else{this.get("cont").appendChild(this._dragHandle);}this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._dragHandle.id);}}else{if(this._dragHandle){this._dragHandle.parentNode.removeChild(this._dragHandle);this._dragHandle=null;this.dd=null;}}if(this._titlebar){if(F){this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._titlebar);B.addClass(this._titlebar,"draggable");}else{B.removeClass(this._titlebar,"draggable");if(this.dd){this.dd.unreg();this.dd=null;}}}},validator:function(G){var F=true;if(!YAHOO.util.DD){F=false;}return F;}});},addButtonGroup:function(I){if(!this.get("element")){this._queue[this._queue.length]=["addButtonGroup",arguments];return false;}if(!this.hasClas!
 s(this.CLASS_PREFIX+"-grouped")){this.addClass(this.CLASS_PREF!
 IX+"-gro
uped");}var J=document.createElement("DIV");B.addClass(J,this.CLASS_PREFIX+"-group");B.addClass(J,this.CLASS_PREFIX+"-group-"+I.group);if(I.label){var F=document.createElement("h3");F.innerHTML=I.label;J.appendChild(F);}if(!this.get("grouplabels")){B.addClass(this.get("cont"),this.CLASS_PREFIX,"-nogrouplabels");}this.get("cont").appendChild(J);var H=document.createElement("ul");J.appendChild(H);if(!this._buttonGroupList){this._buttonGroupList={};}this._buttonGroupList[I.group]=H;for(var G=0;G<I.buttons.length;G++){var E=document.createElement("li");E.className=this.CLASS_PREFIX+"-groupitem";H.appendChild(E);if((I.buttons[G].type!==undefined)&&I.buttons[G].type=="separator"){this.addSeparator(E);}else{I.buttons[G].container=E;this.addButton(I.buttons[G]);}}},addButtonToGroup:function(G,H,I){var F=this._buttonGroupList[H];var E=document.createElement("li");E.className=this.CLASS_PREFIX+"-groupitem";G.container=E;this.addButton(G,I);F.appendChild(E);},addButton:function(J,I){if!
 (!this.get("element")){this._queue[this._queue.length]=["addButton",arguments];return false;}if(!this._buttonList){this._buttonList=[];}if(!J.container){J.container=this.get("cont");}if((J.type=="menu")||(J.type=="split")||(J.type=="select")){if(D.isArray(J.menu)){for(var P in J.menu){if(D.hasOwnProperty(J.menu,P)){var V={fn:function(Y,W,X){if(!J.menucmd){J.menucmd=J.value;}J.value=((X.value)?X.value:X._oText.nodeValue);},scope:this};J.menu[P].onclick=V;}}}}var Q={},N=false;for(var L in J){if(D.hasOwnProperty(J,L)){if(!this._toolbarConfigs[L]){Q[L]=J[L];}}}if(J.type=="select"){Q.type="menu";}if(J.type=="spin"){Q.type="push";}if(Q.type=="color"){if(YAHOO.widget.Overlay){Q=this._makeColorButton(Q);}else{N=true;}}if(Q.menu){if((YAHOO.widget.Overlay)&&(J.menu instanceof YAHOO.widget.Overlay)){J.menu.showEvent.subscribe(function(){this._button=Q;});}else{for(var O=0;O<Q.menu.length;O++){if(!Q.menu[O].value){Q.menu[O].value=Q.menu[O].text;
+}}if(this.browser.webkit){Q.focusmenu=false;}}}if(N){J=false;}else{this._configs.buttons.value[this._configs.buttons.value.length]=J;var T=new this.buttonType(Q);if(!T.buttonType){T.buttonType="rich";T.checkValue=function(Y){var X=this.getMenu().getItems();if(X.length===0){this.getMenu()._onBeforeShow();X=this.getMenu().getItems();}for(var W=0;W<X.length;W++){X[W].cfg.setProperty("checked",false);if(X[W].value==Y){X[W].cfg.setProperty("checked",true);}}};}if(this.get("disabled")){T.set("disabled",true);}if(!J.id){J.id=T.get("id");}if(I){var F=T.get("element");var M=null;if(I.get){M=I.get("element").nextSibling;}else{if(I.nextSibling){M=I.nextSibling;}}if(M){M.parentNode.insertBefore(F,M);}}T.addClass(this.CLASS_PREFIX+"-"+T.get("value"));var S=document.createElement("span");S.className=this.CLASS_PREFIX+"-icon";T.get("element").insertBefore(S,T.get("firstChild"));if(T._button.tagName.toLowerCase()=="button"){T.get("element").setAttribute("unselectable","on");var U=document.!
 createElement("a");U.innerHTML=T._button.innerHTML;U.href="#";A.on(U,"click",function(W){A.stopEvent(W);});T._button.parentNode.replaceChild(U,T._button);T._button=U;}if(J.type=="select"){if(T._button.tagName.toLowerCase()=="select"){S.parentNode.removeChild(S);var G=T._button;var R=T.get("element");R.parentNode.replaceChild(G,R);}else{T.addClass(this.CLASS_PREFIX+"-select");}}if(J.type=="spin"){if(!D.isArray(J.range)){J.range=[10,100];}this._makeSpinButton(T,J);}T.get("element").setAttribute("title",T.get("label"));if(J.type!="spin"){if((YAHOO.widget.Overlay)&&(Q.menu instanceof YAHOO.widget.Overlay)){var H=function(Y){var W=true;if(Y.keyCode&&(Y.keyCode==9)){W=false;}if(W){this._colorPicker._button=J.value;var X=T.getMenu().element;if(B.getStyle(X,"visibility")=="hidden"){T.getMenu().show();}else{T.getMenu().hide();}}YAHOO.util.Event.stopEvent(Y);};T.on("mousedown",H,J,this);T.on("keydown",H,J,this);}else{if((J.type!="menu")&&(J.type!="select")){T.on("keypress",this._butt!
 onClick,J,this);T.on("mousedown",function(W){YAHOO.util.Event.!
 stopEven
t(W);this._buttonClick(W,J);},J,this);T.on("click",function(W){YAHOO.util.Event.stopEvent(W);});}else{T.on("mousedown",function(W){YAHOO.util.Event.stopEvent(W);});T.on("click",function(W){YAHOO.util.Event.stopEvent(W);});T.on("change",function(W){if(!J.menucmd){J.menucmd=J.value;}J.value=W.value;this._buttonClick(W,J);},this,true);var K=this;if(T.getMenu().mouseDownEvent){T.getMenu().mouseDownEvent.subscribe(function(Y,X){var W=X[1];YAHOO.util.Event.stopEvent(X[0]);T._onMenuClick(X[0],T);if(!J.menucmd){J.menucmd=J.value;}J.value=((W.value)?W.value:W._oText.nodeValue);K._buttonClick.call(K,X[1],J);T._hideMenu();return false;});T.getMenu().clickEvent.subscribe(function(X,W){YAHOO.util.Event.stopEvent(W[0]);});T.getMenu().mouseUpEvent.subscribe(function(X,W){YAHOO.util.Event.stopEvent(W[0]);});}}}}else{T.on("mousedown",function(W){YAHOO.util.Event.stopEvent(W);});T.on("click",function(W){YAHOO.util.Event.stopEvent(W);});}if(this.browser.ie){T.DOM_EVENTS.focusin=true;T.DOM_EVEN!
 TS.focusout=true;T.on("focusin",function(W){YAHOO.util.Event.stopEvent(W);},J,this);T.on("focusout",function(W){YAHOO.util.Event.stopEvent(W);},J,this);T.on("click",function(W){YAHOO.util.Event.stopEvent(W);},J,this);}if(this.browser.webkit){T.hasFocus=function(){return true;};}this._buttonList[this._buttonList.length]=T;if((J.type=="menu")||(J.type=="split")||(J.type=="select")){if(D.isArray(J.menu)){var E=T.getMenu();if(E.renderEvent){E.renderEvent.subscribe(C,T);if(J.renderer){E.renderEvent.subscribe(J.renderer,T);}}}}}return J;},addSeparator:function(E,H){if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false;}var F=((E)?E:this.get("cont"));if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false;}if(this._sepCount===null){this._sepCount=0;}if(!this._sep){this._sep=document.createElement("SPAN");B.addClass(this._sep,this.CLASS_SEPARATOR);this._sep.innerHTML="|";}var G=this._sep.cloneNode(t!
 rue);this._sepCount++;B.addClass(G,this.CLASS_SEPARATOR+"-"+th!
 is._sepC
ount);if(H){var I=null;if(H.get){I=H.get("element").nextSibling;}else{if(H.nextSibling){I=H.nextSibling;}else{I=H;}}if(I){if(I==H){I.parentNode.appendChild(G);}else{I.parentNode.insertBefore(G,I);}}}else{F.appendChild(G);}return G;},_createColorPicker:function(J){if(B.get(J+"_colors")){B.get(J+"_colors").parentNode.removeChild(B.get(J+"_colors"));}var F=document.createElement("div");F.className="yui-toolbar-colors";F.id=J+"_colors";F.style.display="none";A.on(window,"load",function(){document.body.appendChild(F);},this,true);this._colorPicker=F;var I="";for(var H in this._colorData){if(D.hasOwnProperty(this._colorData,H)){I+="<a style=\"background-color: "+H+"\" href=\"#\">"+H.replace("#","")+"</a>";}}I+="<span><em>X</em><strong></strong></span>";F.innerHTML=I;var G=F.getElementsByTagName("em")[0];var E=F.getElementsByTagName("strong")[0];A.on(F,"mouseover",function(L){var K=A.getTarget(L);if(K.tagName.toLowerCase()=="a"){G.style.backgroundColor=K.style.backgroundColor;E.inn!
 erHTML=this._colorData["#"+K.innerHTML]+"<br>"+K.innerHTML;}},this,true);A.on(F,"focus",function(K){A.stopEvent(K);});A.on(F,"click",function(K){A.stopEvent(K);});A.on(F,"mousedown",function(L){A.stopEvent(L);var K=A.getTarget(L);if(K.tagName.toLowerCase()=="a"){this.fireEvent("colorPickerClicked",{type:"colorPickerClicked",target:this,button:this._colorPicker._button,color:K.innerHTML,colorName:this._colorData["#"+K.innerHTML]});this.getButtonByValue(this._colorPicker._button).getMenu().hide();}},this,true);},_resetColorPicker:function(){var F=this._colorPicker.getElementsByTagName("em")[0];var E=this._colorPicker.getElementsByTagName("strong")[0];F.style.backgroundColor="transparent";E.innerHTML="";},_makeColorButton:function(E){if(!this._colorPicker){this._createColorPicker(this.get("id"));}E.type="color";E.menu=new YAHOO.widget.Overlay(this.get("id")+"_"+E.value+"_menu",{visible:false,position:"absolute",iframe:true});
+E.menu.setBody("");E.menu.render(this.get("cont"));B.addClass(E.menu.element,"yui-button-menu");B.addClass(E.menu.element,"yui-color-button-menu");E.menu.beforeShowEvent.subscribe(function(){E.menu.cfg.setProperty("zindex",5);E.menu.cfg.setProperty("context",[this.getButtonById(E.id).get("element"),"tl","bl"]);this._resetColorPicker();var F=this._colorPicker;if(F.parentNode){F.parentNode.removeChild(F);}E.menu.setBody("");E.menu.appendToBody(F);this._colorPicker.style.display="block";},this,true);return E;},_makeSpinButton:function(R,L){R.addClass(this.CLASS_PREFIX+"-spinbutton");var S=this,N=R._button.parentNode.parentNode,I=L.range,H=document.createElement("a"),G=document.createElement("a");H.href="#";G.href="#";H.className="up";H.title=this.STR_SPIN_UP;H.innerHTML=this.STR_SPIN_UP;G.className="down";G.title=this.STR_SPIN_DOWN;G.innerHTML=this.STR_SPIN_DOWN;N.appendChild(H);N.appendChild(G);var M=YAHOO.lang.substitute(this.STR_SPIN_LABEL,{VALUE:R.get("label")});R.set("tit!
 le",M);var Q=function(T){T=((T<I[0])?I[0]:T);T=((T>I[1])?I[1]:T);return T;};var P=this.browser;var F=false;var K=this.STR_SPIN_LABEL;if(this._titlebar&&this._titlebar.firstChild){F=this._titlebar.firstChild;}var E=function(U){YAHOO.util.Event.stopEvent(U);if(!R.get("disabled")&&(U.keyCode!=9)){var V=parseInt(R.get("label"),10);V++;V=Q(V);R.set("label",""+V);var T=YAHOO.lang.substitute(K,{VALUE:R.get("label")});R.set("title",T);if(!P.webkit&&F){}S._buttonClick(U,L);}};var O=function(U){YAHOO.util.Event.stopEvent(U);if(!R.get("disabled")&&(U.keyCode!=9)){var V=parseInt(R.get("label"),10);V--;V=Q(V);R.set("label",""+V);var T=YAHOO.lang.substitute(K,{VALUE:R.get("label")});R.set("title",T);if(!P.webkit&&F){}S._buttonClick(U,L);}};var J=function(T){if(T.keyCode==38){E(T);}else{if(T.keyCode==40){O(T);}else{if(T.keyCode==107&&T.shiftKey){E(T);}else{if(T.keyCode==109&&T.shiftKey){O(T);}}}}};R.on("keydown",J,this,true);A.on(H,"mousedown",function(T){A.stopEvent(T);},this,true);A.on(!
 G,"mousedown",function(T){A.stopEvent(T);},this,true);A.on(H,"!
 click",E
,this,true);A.on(G,"click",O,this,true);},_buttonClick:function(L,F){var E=true;if(L&&L.type=="keypress"){if(L.keyCode==9){E=false;}else{if((L.keyCode===13)||(L.keyCode===0)||(L.keyCode===32)){}else{E=false;}}}if(E){var N=true,H=false;if(F.value){H=this.fireEvent(F.value+"Click",{type:F.value+"Click",target:this.get("element"),button:F});if(H===false){N=false;}}if(F.menucmd&&N){H=this.fireEvent(F.menucmd+"Click",{type:F.menucmd+"Click",target:this.get("element"),button:F});if(H===false){N=false;}}if(N){this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:F});}if(F.type=="select"){var K=this.getButtonById(F.id);if(K.buttonType=="rich"){var J=F.value;for(var I=0;I<F.menu.length;I++){if(F.menu[I].value==F.value){J=F.menu[I].text;break;}}K.set("label","<span class=\"yui-toolbar-"+F.menucmd+"-"+(F.value).replace(/ /g,"-").toLowerCase()+"\">"+J+"</span>");var M=K.getMenu().getItems();for(var G=0;G<M.length;G++){if(M[G].value.toLowerCase()==F.value.toL!
 owerCase()){M[G].cfg.setProperty("checked",true);}else{M[G].cfg.setProperty("checked",false);}}}}}if(L){A.stopEvent(L);}},getButtonById:function(G){var E=this._buttonList.length;for(var F=0;F<E;F++){if(this._buttonList[F].get("id")==G){return this._buttonList[F];}}return false;},getButtonByValue:function(K){var H=this.get("buttons");var F=H.length;for(var I=0;I<F;I++){if(H[I].group!==undefined){for(var E=0;E<H[I].buttons.length;E++){if((H[I].buttons[E].value==K)||(H[I].buttons[E].menucmd==K)){return this.getButtonById(H[I].buttons[E].id);}if(H[I].buttons[E].menu){for(var J=0;J<H[I].buttons[E].menu.length;J++){if(H[I].buttons[E].menu[J].value==K){return this.getButtonById(H[I].buttons[E].id);}}}}}else{if((H[I].value==K)||(H[I].menucmd==K)){return this.getButtonById(H[I].id);}if(H[I].menu){for(var G=0;G<H[I].menu.length;G++){if(H[I].menu[G].value==K){return this.getButtonById(H[I].id);}}}}}return false;},getButtonByIndex:function(E){if(this._buttonList[E]){return this._button!
 List[E];}else{return false;}},getButtons:function(){return thi!
 s._butto
nList;},disableButton:function(F){var E=F;if(D.isString(F)){E=this.getButtonById(F);}if(D.isNumber(F)){E=this.getButtonByIndex(F);}if((!(E instanceof YAHOO.widget.ToolbarButton))&&(!(E instanceof YAHOO.widget.ToolbarButtonAdvanced))){E=this.getButtonByValue(F);}if((E instanceof YAHOO.widget.ToolbarButton)||(E instanceof YAHOO.widget.ToolbarButtonAdvanced)){E.set("disabled",true);}else{return false;}},enableButton:function(F){if(this.get("disabled")){return false;}var E=F;if(D.isString(F)){E=this.getButtonById(F);}if(D.isNumber(F)){E=this.getButtonByIndex(F);}if((!(E instanceof YAHOO.widget.ToolbarButton))&&(!(E instanceof YAHOO.widget.ToolbarButtonAdvanced))){E=this.getButtonByValue(F);}if((E instanceof YAHOO.widget.ToolbarButton)||(E instanceof YAHOO.widget.ToolbarButtonAdvanced)){if(E.get("disabled")){E.set("disabled",false);}}else{return false;}},selectButton:function(I,G){var F=I;if(I){if(D.isString(I)){F=this.getButtonById(I);}if(D.isNumber(I)){F=this.getButtonByIndex(I!
 );}if((!(F instanceof YAHOO.widget.ToolbarButton))&&(!(F instanceof YAHOO.widget.ToolbarButtonAdvanced))){F=this.getButtonByValue(I);}if((F instanceof YAHOO.widget.ToolbarButton)||(F instanceof YAHOO.widget.ToolbarButtonAdvanced)){F.addClass("yui-button-selected");F.addClass("yui-button-"+F.get("value")+"-selected");if(G){if(F.buttonType=="rich"){var H=F.getMenu().getItems();for(var E=0;E<H.length;E++){if(H[E].value==G){H[E].cfg.setProperty("checked",true);F.set("label","<span class=\"yui-toolbar-"+F.get("value")+"-"+(G).replace(/ /g,"-").toLowerCase()+"\">"+H[E]._oText.nodeValue+"</span>");}else{H[E].cfg.setProperty("checked",false);}}}}}else{return false;}}},deselectButton:function(F){var E=F;if(D.isString(F)){E=this.getButtonById(F);}if(D.isNumber(F)){E=this.getButtonByIndex(F);}if((!(E instanceof YAHOO.widget.ToolbarButton))&&(!(E instanceof YAHOO.widget.ToolbarButtonAdvanced))){E=this.getButtonByValue(F);
+}if((E instanceof YAHOO.widget.ToolbarButton)||(E instanceof YAHOO.widget.ToolbarButtonAdvanced)){E.removeClass("yui-button-selected");E.removeClass("yui-button-"+E.get("value")+"-selected");E.removeClass("yui-button-hover");}else{return false;}},deselectAllButtons:function(){var E=this._buttonList.length;for(var F=0;F<E;F++){this.deselectButton(this._buttonList[F]);}},disableAllButtons:function(){if(this.get("disabled")){return false;}var E=this._buttonList.length;for(var F=0;F<E;F++){this.disableButton(this._buttonList[F]);}},enableAllButtons:function(){if(this.get("disabled")){return false;}var E=this._buttonList.length;for(var F=0;F<E;F++){this.enableButton(this._buttonList[F]);}},resetAllButtons:function(I){if(!D.isObject(I)){I={};}if(this.get("disabled")){return false;}var E=this._buttonList.length;for(var F=0;F<E;F++){var H=this._buttonList[F];var G=H._configs.disabled._initialConfig.value;if(I[H.get("id")]){this.enableButton(H);this.selectButton(H);}else{if(G){this.!
 disableButton(H);}else{this.enableButton(H);}this.deselectButton(H);}}},destroyButton:function(I){var G=I;if(D.isString(I)){G=this.getButtonById(I);}if(D.isNumber(I)){G=this.getButtonByIndex(I);}if((!(G instanceof YAHOO.widget.ToolbarButton))&&(!(G instanceof YAHOO.widget.ToolbarButtonAdvanced))){G=this.getButtonByValue(I);}if((G instanceof YAHOO.widget.ToolbarButton)||(G instanceof YAHOO.widget.ToolbarButtonAdvanced)){var H=G.get("id");G.destroy();var E=this._buttonList.length;for(var F=0;F<E;F++){if(this._buttonList[F].get("id")==H){this._buttonList[F]=null;}}}else{return false;}},destroy:function(){this.get("element").innerHTML="";this.get("element").className="";for(var E in this){if(D.hasOwnProperty(this,E)){this[E]=null;}}return true;},collapse:function(F){var E=B.getElementsByClassName("collapse","span",this._titlebar);if(F===false){B.removeClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");if(E[0]){B.removeClass(E[0],"collapsed");}this.fireEvent("t!
 oolbarExpanded",{type:"toolbarExpanded",target:this});}else{if!
 (E[0]){B
.addClass(E[0],"collapsed");}B.addClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");this.fireEvent("toolbarCollapsed",{type:"toolbarCollapsed",target:this});}},toString:function(){return"Toolbar (#"+this.get("element").id+") with "+this._buttonList.length+" buttons.";}});})();(function(){var C=YAHOO.util.Dom,A=YAHOO.util.Event,D=YAHOO.lang,B=YAHOO.widget.Toolbar;YAHOO.widget.SimpleEditor=function(H,F){var J={element:null,attributes:(F||{})},L=null;if(D.isString(H)){L=H;}else{L=H.id;}J.element=H;var G=document.createElement("DIV");J.attributes.element_cont=new YAHOO.util.Element(G,{id:L+"_container"});var K=document.createElement("div");C.addClass(K,"first-child");J.attributes.element_cont.appendChild(K);if(!J.attributes.toolbar_cont){J.attributes.toolbar_cont=document.createElement("DIV");J.attributes.toolbar_cont.id=L+"_toolbar";K.appendChild(J.attributes.toolbar_cont);}var I=document.createElement("DIV");K.appendChild(I);J.attributes.editor_wrapper=I;YAH!
 OO.widget.SimpleEditor.superclass.constructor.call(this,J.element,J.attributes);};function E(F){return F.replace(/ /g,"-").toLowerCase();}YAHOO.extend(YAHOO.widget.SimpleEditor,YAHOO.util.Element,{_docType:"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">",editorDirty:false,_defaultCSS:"html { height: 95%; } body { height: 100%; padding: 7px; background-color: #fff; font:13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small; } a { color: blue; text-decoration: underline; cursor: pointer; } .warning-localfile { border-bottom: 1px dashed red !important; } .yui-busy { cursor: wait !important; } img.selected { border: 2px dotted #808080; } img { cursor: pointer !important; border: none; }",_defaultToolbar:{collapse:true,titlebar:"Text Editing Tools",draggable:false,buttons:[{group:"fontstyle",label:"Font Name and Size",buttons:[{type:"select",label:"Arial",value:"fontname",disabled:true,menu:[{text:"Arial",checke!
 d:true},{text:"Arial Black"},{text:"Comic Sans MS"},{text:"Cou!
 rier New
"},{text:"Lucida Console"},{text:"Tahoma"},{text:"Times New Roman"},{text:"Trebuchet MS"},{text:"Verdana"}]},{type:"spin",label:"13",value:"fontsize",range:[9,75],disabled:true}]},{type:"separator"},{group:"textstyle",label:"Font Style",buttons:[{type:"push",label:"Bold CTRL + SHIFT + B",value:"bold"},{type:"push",label:"Italic CTRL + SHIFT + I",value:"italic"},{type:"push",label:"Underline CTRL + SHIFT + U",value:"underline"},{type:"separator"},{type:"color",label:"Font Color",value:"forecolor",disabled:true},{type:"color",label:"Background Color",value:"backcolor",disabled:true}]},{type:"separator"},{group:"indentlist",label:"Lists",buttons:[{type:"push",label:"Create an Unordered List",value:"insertunorderedlist"},{type:"push",label:"Create an Ordered List",value:"insertorderedlist"}]},{type:"separator"},{group:"insertitem",label:"Insert Item",buttons:[{type:"push",label:"HTML Link CTRL + SHIFT + L",value:"createlink",disabled:true},{type:"push",label:"Insert Image",value!
 :"insertimage"}]}]},_lastButton:null,_baseHREF:function(){var F=document.location.href;if(F.indexOf("?")!==-1){F=F.substring(0,F.indexOf("?"));}F=F.substring(0,F.lastIndexOf("/"))+"/";return F;}(),_lastImage:null,_blankImageLoaded:false,_fixNodesTimer:null,_nodeChangeTimer:null,_lastNodeChangeEvent:null,_lastNodeChange:0,_rendered:false,DOMReady:null,_selection:null,_mask:null,_showingHiddenElements:null,currentWindow:null,currentEvent:null,operaEvent:null,currentFont:null,currentElement:[],dompath:null,beforeElement:null,afterElement:null,invalidHTML:{form:true,input:true,button:true,select:true,link:true,html:true,body:true,script:true,style:true,textarea:true},toolbar:null,_contentTimer:null,_contentTimerCounter:0,_disabled:["createlink","fontname","fontsize","forecolor","backcolor"],_alwaysDisabled:{},_alwaysEnabled:{},_semantic:{"bold":true,"italic":true,"underline":true},_tag2cmd:{"b":"bold","strong":"bold","i":"italic","em":"italic","u":"underline","sup":"superscript!
 ","sub":"subscript","img":"insertimage","a":"createlink","ul":!
 "insertu
norderedlist","ol":"insertorderedlist"},_createIframe:function(){var J=document.createElement("iframe");
+J.id=this.get("id")+"_editor";var H={border:"0",frameBorder:"0",marginWidth:"0",marginHeight:"0",leftMargin:"0",topMargin:"0",allowTransparency:"true",width:"100%"};for(var I in H){if(D.hasOwnProperty(H,I)){J.setAttribute(I,H[I]);}}var G="javascript:;";if(this.browser.ie){if(window.location.href.toLowerCase().indexOf("https")!==0){G="about:blank";}}J.setAttribute("src",G);var F=new YAHOO.util.Element(J);return F;},_isElement:function(G,F){if(G&&G.tagName&&(G.tagName.toLowerCase()==F)){return true;}if(G&&G.getAttribute&&(G.getAttribute("tag")==F)){return true;}return false;},_hasParent:function(G,F){if(!G||!G.parentNode){return false;}while(G.parentNode){if(this._isElement(G,F)){return G;}if(G.parentNode){G=G.parentNode;}else{return false;}}return false;},_getDoc:function(){var F=false;if(this.get){if(this.get("iframe")){if(this.get("iframe").get){if(this.get("iframe").get("element")){try{if(this.get("iframe").get("element").contentWindow){if(this.get("iframe").get("element"!
 ).contentWindow.document){F=this.get("iframe").get("element").contentWindow.document;return F;}}}catch(G){}}}}}return false;},_getWindow:function(){return this.get("iframe").get("element").contentWindow;},_focusWindow:function(F){if(this.browser.webkit){if(F){this._getSelection().setBaseAndExtent(this._getDoc().body.firstChild,0,this._getDoc().body.firstChild,1);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(false);}}else{this._getSelection().setBaseAndExtent(this._getDoc().body,1,this._getDoc().body,1);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(false);}}this._getWindow().focus();}else{this._getWindow().focus();}},_hasSelection:function(){var H=this._getSelection();var F=this._getRange();var G=false;if(this.browser.ie||this.browser.opera){if(F.text){G=true;}if(F.html){G=true;}}else{if(this.browser.webkit){if(H+""!==""){G=true;}}else{if(H&&(H.toString()!=="")&&(H!==u!
 ndefined)){G=true;}}}return G;},_getSelection:function(){var F!
 =null;if
(this._getDoc()&&this._getWindow()){if(this._getDoc().selection){F=this._getDoc().selection;}else{F=this._getWindow().getSelection();}if(this.browser.webkit){if(F.baseNode){this._selection={};this._selection.baseNode=F.baseNode;this._selection.baseOffset=F.baseOffset;this._selection.extentNode=F.extentNode;this._selection.extentOffset=F.extentOffset;}else{if(this._selection!==null){F=this._getWindow().getSelection();F.setBaseAndExtent(this._selection.baseNode,this._selection.baseOffset,this._selection.extentNode,this._selection.extentOffset);this._selection=null;}}}}return F;},_selectNode:function(G){if(!G){return false;}var H=this._getSelection(),F=null;if(this.browser.ie){try{F=this._getDoc().body.createTextRange();F.moveToElementText(G);F.select();}catch(I){}}else{if(this.browser.webkit){H.setBaseAndExtent(G,0,G,G.innerText.length);}else{if(this.browser.opera){H=this._getWindow().getSelection();F=this._getDoc().createRange();F.selectNode(G);H.removeAllRanges();H.addRange(!
 F);}else{F=this._getDoc().createRange();F.selectNodeContents(G);H.removeAllRanges();H.addRange(F);}}}},_getRange:function(){var F=this._getSelection();if(F===null){return null;}if(this.browser.webkit&&!F.getRangeAt){var H=this._getDoc().createRange();try{H.setStart(F.anchorNode,F.anchorOffset);H.setEnd(F.focusNode,F.focusOffset);}catch(G){H=this._getWindow().getSelection()+"";}return H;}if(this.browser.ie||this.browser.opera){return F.createRange();}if(F.rangeCount>0){return F.getRangeAt(0);}return null;},_setDesignMode:function(F){try{this._getDoc().designMode=F;}catch(G){}},_toggleDesignMode:function(){var G=this._getDoc().designMode.toLowerCase(),F="on";if(G=="on"){F="off";}this._setDesignMode(F);return F;},_initEditor:function(){if(this.browser.ie){this._getDoc().body.style.margin="0";}if(!this.get("disabled")){this._setDesignMode("on");}this.toolbar.on("buttonClick",this._handleToolbarClick,this,true);A.on(this._getDoc(),"mouseup",this._handleMouseUp,this,true);A.on(th!
 is._getDoc(),"mousedown",this._handleMouseDown,this,true);A.on!
 (this._g
etDoc(),"click",this._handleClick,this,true);A.on(this._getDoc(),"dblclick",this._handleDoubleClick,this,true);A.on(this._getDoc(),"keypress",this._handleKeyPress,this,true);A.on(this._getDoc(),"keyup",this._handleKeyUp,this,true);A.on(this._getDoc(),"keydown",this._handleKeyDown,this,true);if(!this.get("disabled")){this.toolbar.set("disabled",false);}this.fireEvent("editorContentLoaded",{type:"editorLoaded",target:this});if(this.get("dompath")){var F=this;setTimeout(function(){F._writeDomPath.call(F);},150);}this.nodeChange(true);this._setBusy(true);},_checkLoaded:function(){this._contentTimerCounter++;if(this._contentTimer){clearTimeout(this._contentTimer);}if(this._contentTimerCounter>250){return false;}var H=false;try{if(this._getDoc()&&this._getDoc().body&&(this._getDoc().body._rteLoaded===true)){H=true;}}catch(G){H=false;}if(H===true){this._initEditor();}else{var F=this;this._contentTimer=setTimeout(function(){F._checkLoaded.call(F);},20);}},_setInitialContent:function!
 (){var G=D.substitute(this.get("html"),{TITLE:this.STR_TITLE,CONTENT:this._cleanIncomingHTML(this.get("element").value),CSS:this.get("css"),HIDDEN_CSS:((this.get("hiddencss"))?this.get("hiddencss"):"/* No Hidden CSS */"),EXTRA_CSS:((this.get("extracss"))?this.get("extracss"):"/* No Extra CSS */")}),F=true;if(document.compatMode!="BackCompat"){G=this._docType+"\n"+G;}else{}if(this.browser.ie||this.browser.webkit||this.browser.opera||(navigator.userAgent.indexOf("Firefox/1.5")!=-1)){try{this._getDoc().open();this._getDoc().write(G);this._getDoc().close();}catch(H){F=false;}}else{this.get("iframe").get("element").src="data:text/html;charset=utf-8,"+encodeURIComponent(G);}if(F){this._checkLoaded();}},_setMarkupType:function(F){switch(this.get("markup")){case"css":this._setEditorStyle(true);break;case"default":this._setEditorStyle(false);break;case"semantic":case"xhtml":if(this._semantic[F]){this._setEditorStyle(false);
+}else{this._setEditorStyle(true);}break;}},_setEditorStyle:function(G){try{this._getDoc().execCommand("useCSS",false,!G);}catch(F){}},_getSelectedElement:function(){var I=this._getDoc(),F=null,G=null,J=null;if(this.browser.ie){this.currentEvent=this._getWindow().event;F=this._getRange();if(F){J=F.item?F.item(0):F.parentElement();if(J==I.body){J=null;}}if((this.currentEvent!==null)&&(this.currentEvent.keyCode===0)){J=A.getTarget(this.currentEvent);}}else{G=this._getSelection();F=this._getRange();if(!G||!F){return null;}if(!this._hasSelection()){if(G.anchorNode&&(G.anchorNode.nodeType==3)){if(G.anchorNode.parentNode){J=G.anchorNode.parentNode;}if(G.anchorNode.nextSibling!=G.focusNode.nextSibling){J=G.anchorNode.nextSibling;}}if(this._isElement(J,"br")){J=null;}if(!J){J=F.commonAncestorContainer;if(!F.collapsed){if(F.startContainer==F.endContainer){if(F.startOffset-F.endOffset<2){if(F.startContainer.hasChildNodes()){J=F.startContainer.childNodes[F.startOffset];}}}}}}}if(this.c!
 urrentEvent!==null){try{switch(this.currentEvent.type){case"click":case"mousedown":case"mouseup":J=A.getTarget(this.currentEvent);break;default:break;}}catch(H){}}else{if(this.currentElement&&this.currentElement[0]){J=this.currentElement[0];}}if(this.browser.opera||this.browser.webkit){if(this.currentEvent&&!J){J=YAHOO.util.Event.getTarget(this.currentEvent);}}if(!J||!J.tagName){J=I.body;}if(this._isElement(J,"html")){J=I.body;}if(this._isElement(J,"body")){J=I.body;}if(J&&!J.parentNode){J=I.body;}if(J===undefined){J=null;}return J;},_getDomPath:function(F){if(!F){F=this._getSelectedElement();}var G=[];while(F!==null){if(F.ownerDocument!=this._getDoc()){F=null;break;}if(F.nodeName&&F.nodeType&&(F.nodeType==1)){G[G.length]=F;}if(this._isElement(F,"body")){break;}F=F.parentNode;}if(G.length===0){if(this._getDoc()&&this._getDoc().body){G[0]=this._getDoc().body;}}return G.reverse();},_writeDomPath:function(){var L=this._getDomPath(),J=[],H="",M="";for(var F=0;F<L.length;F++){va!
 r N=L[F].tagName.toLowerCase();if((N=="ol")&&(L[F].type)){N+="!
 :"+L[F].
type;}if(C.hasClass(L[F],"yui-tag")){N=L[F].getAttribute("tag");}if((this.get("markup")=="semantic")||(this.get("markup")=="xhtml")){switch(N){case"b":N="strong";break;case"i":N="em";break;}}if(!C.hasClass(L[F],"yui-non")){if(C.hasClass(L[F],"yui-tag")){M=N;}else{H=((L[F].className!=="")?"."+L[F].className.replace(/ /g,"."):"");if((H.indexOf("yui")!=-1)||(H.toLowerCase().indexOf("apple-style-span")!=-1)){H="";}M=N+((L[F].id)?"#"+L[F].id:"")+H;}switch(N){case"a":if(L[F].getAttribute("href",2)){M+=":"+L[F].getAttribute("href",2).replace("mailto:","").replace("http://","").replace("https://","");}break;case"img":var G=L[F].height;var K=L[F].width;if(L[F].style.height){G=parseInt(L[F].style.height,10);}if(L[F].style.width){K=parseInt(L[F].style.width,10);}M+="("+G+"x"+K+")";break;}if(M.length>10){M="<span title=\""+M+"\">"+M.substring(0,10)+"...</span>";}else{M="<span title=\""+M+"\">"+M+"</span>";}J[J.length]=M;}}var I=J.join(" "+this.SEP_DOMPATH+" ");if(this.dompath.innerHTML!!
 =I){this.dompath.innerHTML=I;}},_fixNodes:function(){var K=this._getDoc(),I=[];for(var F in this.invalidHTML){if(YAHOO.lang.hasOwnProperty(this.invalidHTML,F)){if(F.toLowerCase()!="span"){var G=K.body.getElementsByTagName(F);if(G.length){for(var H=0;H<G.length;H++){I.push(G[H]);}}}}}for(var J=0;J<I.length;J++){if(I[J].parentNode){if(D.isObject(this.invalidHTML[I[J].tagName.toLowerCase()])&&this.invalidHTML[I[J].tagName.toLowerCase()].keepContents){this._swapEl(I[J],"span",function(M){M.className="yui-non";});}else{I[J].parentNode.removeChild(I[J]);}}}var L=this._getDoc().getElementsByTagName("img");C.addClass(L,"yui-img");},_isNonEditable:function(H){if(this.get("allowNoEdit")){var G=A.getTarget(H);if(this._isElement(G,"html")){G=null;}var J=this._getDomPath(G);for(var F=(J.length-1);F>-1;F--){if(C.hasClass(J[F],this.CLASS_NOEDIT)){try{this._getDoc().execCommand("enableObjectResizing",false,"false");}catch(I){}this.nodeChange();A.stopEvent(H);return true;}}try{this._getDoc(!
 ).execCommand("enableObjectResizing",false,"true");}catch(I){}!
 }return 
false;},_setCurrentEvent:function(F){this.currentEvent=F;},_handleClick:function(G){if(this._isNonEditable(G)){return false;}this._setCurrentEvent(G);if(this.currentWindow){this.closeWindow();}if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}if(this.browser.webkit){var F=A.getTarget(G);if(this._isElement(F,"a")||this._isElement(F.parentNode,"a")){A.stopEvent(G);this.nodeChange();}}else{this.nodeChange();}},_handleMouseUp:function(G){if(this._isNonEditable(G)){return false;}var F=this;if(this.browser.opera){var H=A.getTarget(G);if(this._isElement(H,"img")){this.nodeChange();if(this.operaEvent){clearTimeout(this.operaEvent);this.operaEvent=null;this._handleDoubleClick(G);}else{this.operaEvent=window.setTimeout(function(){F.operaEvent=false;},700);}}}if(this.browser.webkit||this.browser.opera){if(this.browser.webkit){A.stopEvent(G);}}this.nodeChange();this.fi!
 reEvent("editorMouseUp",{type:"editorMouseUp",target:this,ev:G});},_handleMouseDown:function(F){if(this._isNonEditable(F)){return false;}this._setCurrentEvent(F);var G=A.getTarget(F);if(this.browser.webkit&&this._hasSelection()){var H=this._getSelection();if(!this.browser.webkit3){H.collapse(true);}else{H.collapseToStart();}}if(this.browser.webkit&&this._lastImage){C.removeClass(this._lastImage,"selected");this._lastImage=null;}if(this._isElement(G,"img")||this._isElement(G,"a")){if(this.browser.webkit){A.stopEvent(F);if(this._isElement(G,"img")){C.addClass(G,"selected");this._lastImage=G;}}this.nodeChange();}this.fireEvent("editorMouseDown",{type:"editorMouseDown",target:this,ev:F});},_handleDoubleClick:function(F){if(this._isNonEditable(F)){return false;}this._setCurrentEvent(F);var G=A.getTarget(F);if(this._isElement(G,"img")){this.currentElement[0]=G;this.toolbar.fireEvent("insertimageClick",{type:"insertimageClick",target:this.toolbar});
+this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});}else{if(this._hasParent(G,"a")){this.currentElement[0]=this._hasParent(G,"a");this.toolbar.fireEvent("createlinkClick",{type:"createlinkClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});}}this.nodeChange();this.editorDirty=false;this.fireEvent("editorDoubleClick",{type:"editorDoubleClick",target:this,ev:F});},_handleKeyUp:function(G){if(this._isNonEditable(G)){return false;}this._setCurrentEvent(G);switch(G.keyCode){case 37:case 38:case 39:case 40:case 46:case 8:case 87:if((G.keyCode==87)&&this.currentWindow&&G.shiftKey&&G.ctrlKey){this.closeWindow();}else{if(!this.browser.ie){if(this._nodeChangeTimer){clearTimeout(this._nodeChangeTimer);}var F=this;this._nodeChangeTimer=setTimeout(function(){F._nodeChangeTimer=null;F.nodeChange.call(F);},100);}else{this.nodeChange();}this.editorDirty=true;}break;}this.fireEvent("editorKeyUp",{type:"editorKeyUp",targ!
 et:this,ev:G});},_handleKeyPress:function(F){if(this.get("allowNoEdit")){if(F&&F.keyCode&&((F.keyCode==46)||F.keyCode==63272)){A.stopEvent(F);}}if(this._isNonEditable(F)){return false;}this._setCurrentEvent(F);if(this.browser.webkit){if(!this.browser.webkit3){if(F.keyCode&&(F.keyCode==122)&&(F.metaKey)){if(this._hasParent(this._getSelectedElement(),"li")){A.stopEvent(F);}}}this._listFix(F);}this.fireEvent("editorKeyPress",{type:"editorKeyPress",target:this,ev:F});},_listFix:function(L){var O=null,J=null,F=false,H=null;if(this.browser.webkit){if(L.keyCode&&(L.keyCode==13)){if(this._hasParent(this._getSelectedElement(),"li")){var I=this._hasParent(this._getSelectedElement(),"li");var N=this._getDoc().createElement("li");N.innerHTML="<span class=\"yui-non\"> </span> ";if(I.nextSibling){I.parentNode.insertBefore(N,I.nextSibling);}else{I.parentNode.appendChild(N);}this.currentElement[0]=N;this._selectNode(N.firstChild);if(!this.browser.webkit3){I.parentNode.style.displ!
 ay="list-item";setTimeout(function(){I.parentNode.style.displa!
 y="block
";},1);}A.stopEvent(L);}}}if(L.keyCode&&((!this.browser.webkit3&&(L.keyCode==25))||((this.browser.webkit3||!this.browser.webkit)&&((L.keyCode==9)&&L.shiftKey)))){O=this._getSelectedElement();if(this._hasParent(O,"li")){O=this._hasParent(O,"li");if(this._hasParent(O,"ul")||this._hasParent(O,"ol")){J=this._hasParent(O,"ul");if(!J){J=this._hasParent(O,"ol");}if(this._isElement(J.previousSibling,"li")){J.removeChild(O);J.parentNode.insertBefore(O,J.nextSibling);if(this.browser.ie){H=this._getDoc().body.createTextRange();H.moveToElementText(O);H.collapse(false);H.select();}if(this.browser.webkit){if(!this.browser.webkit3){J.style.display="list-item";J.parentNode.style.display="list-item";setTimeout(function(){J.style.display="block";J.parentNode.style.display="block";},1);}}A.stopEvent(L);}}}}if(L.keyCode&&((L.keyCode==9)&&(!L.shiftKey))){var G=this._getSelectedElement();if(this._hasParent(G,"li")){F=this._hasParent(G,"li").innerHTML;}if(this.browser.webkit){this._getDoc().execCo!
 mmand("inserttext",false,"\t");}O=this._getSelectedElement();if(this._hasParent(O,"li")){J=this._hasParent(O,"li");var K=this._getDoc().createElement(J.parentNode.tagName.toLowerCase());if(this.browser.webkit){var M=C.getElementsByClassName("Apple-tab-span","span",J);if(M[0]){J.removeChild(M[0]);J.innerHTML=D.trim(J.innerHTML);if(F){J.innerHTML="<span class=\"yui-non\">"+F+"</span> ";}else{J.innerHTML="<span class=\"yui-non\"> </span> ";}}}else{if(F){J.innerHTML=F+" ";}else{J.innerHTML=" ";}}J.parentNode.replaceChild(K,J);K.appendChild(J);if(this.browser.webkit){this._getSelection().setBaseAndExtent(J.firstChild,1,J.firstChild,J.firstChild.innerText.length);if(!this.browser.webkit3){J.parentNode.parentNode.style.display="list-item";setTimeout(function(){J.parentNode.parentNode.style.display="block";},1);}}else{if(this.browser.ie){H=this._getDoc().body.createTextRange();H.moveToElementText(J);H.collapse(false);H.select();}else{this._selectNode(J);}}A!
 .stopEvent(L);}if(this.browser.webkit){A.stopEvent(L);}this.no!
 deChange
();}},_handleKeyDown:function(J){if(this._isNonEditable(J)){return false;}this._setCurrentEvent(J);if(this.currentWindow){this.closeWindow();}if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}var I=false,K=null,H=false;if(J.shiftKey&&J.ctrlKey){I=true;}switch(J.keyCode){case 84:if(J.shiftKey&&J.ctrlKey){this.toolbar._titlebar.firstChild.focus();A.stopEvent(J);I=false;}break;case 27:if(J.shiftKey){this.afterElement.focus();A.stopEvent(J);H=false;}break;case 76:if(this._hasSelection()){if(J.shiftKey&&J.ctrlKey){var G=true;if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("createlink")){G=false;}}if(G){this.execCommand("createlink","");this.toolbar.fireEvent("createlinkClick",{type:"createlinkClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});I=false;}}}break;case 65:if(J.metaKey&&this.browser.we!
 bkit){A.stopEvent(J);this._getSelection().setBaseAndExtent(this._getDoc().body,1,this._getDoc().body,this._getDoc().body.innerHTML.length);}break;case 66:K="bold";break;case 73:K="italic";break;case 85:K="underline";break;case 13:if(this.browser.ie){var L=this._getRange();var F=this._getSelectedElement();if(!this._isElement(F,"li")){if(L){L.pasteHTML("<br>");L.collapse(false);L.select();}A.stopEvent(J);}}}if(this.browser.ie){this._listFix(J);}if(I&&K){this.execCommand(K,null);A.stopEvent(J);this.nodeChange();}this.fireEvent("editorKeyDown",{type:"editorKeyDown",target:this,ev:J});},nodeChange:function(G){var H=parseInt(this.get("nodeChangeThreshold"),10);var N=Math.round(new Date().getTime()/1000);if(G===true){this._lastNodeChange=0;}if((this._lastNodeChange+H)<N){var Q=this;if(this._fixNodesTimer===null){this._fixNodesTimer=window.setTimeout(function(){Q._fixNodes.call(Q);Q._fixNodesTimer=null;},0);}}this._lastNodeChange=N;
+if(this.currentEvent){this._lastNodeChangeEvent=this.currentEvent.type;}var Y=this.fireEvent("beforeNodeChange",{type:"beforeNodeChange",target:this});if(Y===false){return false;}if(this.get("dompath")){this._writeDomPath();}if(!this.get("disabled")){if(this.STOP_NODE_CHANGE){this.STOP_NODE_CHANGE=false;return false;}else{var S=this._getSelection(),P=this._getRange(),F=this._getSelectedElement(),L=this.toolbar.getButtonByValue("fontname"),K=this.toolbar.getButtonByValue("fontsize");if(G!==true){this.editorDirty=true;}var M={};if(this._lastButton){M[this._lastButton.id]=true;}if(!this._isElement(F,"body")){if(L){M[L.get("id")]=true;}if(K){M[K.get("id")]=true;}}this.toolbar.resetAllButtons(M);for(var Z=0;Z<this._disabled.length;Z++){var O=this.toolbar.getButtonByValue(this._disabled[Z]);if(O&&O.get){if(this._lastButton&&(O.get("id")===this._lastButton.id)){}else{if(!this._hasSelection()){switch(this._disabled[Z]){case"fontname":case"fontsize":break;default:this.toolbar.disabl!
 eButton(O);}}else{if(!this._alwaysDisabled[this._disabled[Z]]){this.toolbar.enableButton(O);}}if(!this._alwaysEnabled[this._disabled[Z]]){this.toolbar.deselectButton(O);}}}}var R=this._getDomPath();var a=null,V=null;for(var W=0;W<R.length;W++){a=R[W].tagName.toLowerCase();if(R[W].getAttribute("tag")){a=R[W].getAttribute("tag").toLowerCase();}V=this._tag2cmd[a];if(V===undefined){V=[];}if(!D.isArray(V)){V=[V];}if(R[W].style.fontWeight.toLowerCase()=="bold"){V[V.length]="bold";}if(R[W].style.fontStyle.toLowerCase()=="italic"){V[V.length]="italic";}if(R[W].style.textDecoration.toLowerCase()=="underline"){V[V.length]="underline";}if(V.length>0){for(var U=0;U<V.length;U++){this.toolbar.selectButton(V[U]);this.toolbar.enableButton(V[U]);}}switch(R[W].style.textAlign.toLowerCase()){case"left":case"right":case"center":case"justify":var T=R[W].style.textAlign.toLowerCase();if(R[W].style.textAlign.toLowerCase()=="justify"){T="full";}this.toolbar.selectButton("justify"+T);this.toolbar.!
 enableButton("justify"+T);break;}}if(L){var X=L._configs.label!
 ._initia
lConfig.value;L.set("label","<span class=\"yui-toolbar-fontname-"+E(X)+"\">"+X+"</span>");this._updateMenuChecked("fontname",X);}if(K){K.set("label",K._configs.label._initialConfig.value);}var J=this.toolbar.getButtonByValue("heading");if(J){J.set("label",J._configs.label._initialConfig.value);this._updateMenuChecked("heading","none");}var I=this.toolbar.getButtonByValue("insertimage");if(I&&this.currentWindow&&(this.currentWindow.name=="insertimage")){this.toolbar.disableButton(I);}}}this.fireEvent("afterNodeChange",{type:"afterNodeChange",target:this});},_updateMenuChecked:function(F,G,I){if(!I){I=this.toolbar;}var H=I.getButtonByValue(F);H.checkValue(G);},_handleToolbarClick:function(G){var I="";var J="";var H=G.button.value;if(G.button.menucmd){I=H;H=G.button.menucmd;}this._lastButton=G.button;if(this.STOP_EXEC_COMMAND){this.STOP_EXEC_COMMAND=false;return false;}else{this.execCommand(H,I);if(!this.browser.webkit){var F=this;setTimeout(function(){F._focusWindow.call(F);},!
 5);}}A.stopEvent(G);},_setupAfterElement:function(){if(!this.afterElement){this.afterElement=document.createElement("h2");this.afterElement.className="yui-editor-skipheader";this.afterElement.tabIndex="-1";this.afterElement.innerHTML=this.STR_LEAVE_EDITOR;this.get("element_cont").get("firstChild").appendChild(this.afterElement);}},_disableEditor:function(G){if(G){if(!this._mask){this._setDesignMode("off");if(this.toolbar){this.toolbar.set("disabled",true);}this._mask=document.createElement("DIV");C.setStyle(this._mask,"height","100%");C.setStyle(this._mask,"width","100%");C.setStyle(this._mask,"position","absolute");C.setStyle(this._mask,"top","0");C.setStyle(this._mask,"left","0");C.setStyle(this._mask,"opacity",".5");C.addClass(this._mask,"yui-editor-masked");this.get("iframe").get("parentNode").appendChild(this._mask);}}else{if(this._mask){this._mask.parentNode.removeChild(this._mask);this._mask=null;if(this.toolbar){this.toolbar.set("disabled",false);}this._setDesignMod!
 e("on");this._focusWindow();var F=this;window.setTimeout(funct!
 ion(){F.
nodeChange.call(F);},100);}}},EDITOR_PANEL_ID:"yui-editor-panel",SEP_DOMPATH:"<",STR_LEAVE_EDITOR:"You have left the Rich Text Editor.",STR_BEFORE_EDITOR:"This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Control + Shift + T to place focus on the toolbar and navigate between option heading names. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift L adds an HTML link</li> <li>To exit this text editor use the keyboard shortcut Control + Shift + ESC.</li></ul>",STR_TITLE:"Rich Text Area.",STR_IMAGE_HERE:"Image Url Here",STR_LINK_URL:"Link URL",STOP_EXEC_COMMAND:false,STOP_NODE_CHANGE:false,CLASS_NOEDIT:"yui-noedit",CLASS_CONTAINER:"yui-editor-container",CLASS_EDITABLE:"yui-editor-editable",CLASS_EDITABLE_CONT:"yui-editor-editable-container",CLASS_PREFIX:"yui-edit!
 or",browser:function(){var F=YAHOO.env.ua;if(F.webkit>420){F.webkit3=F.webkit;}else{F.webkit3=0;}return F;}(),init:function(G,F){YAHOO.widget.SimpleEditor.superclass.init.call(this,G,F);YAHOO.widget.EditorInfo._instances[this.get("id")]=this;this.on("contentReady",function(){this.DOMReady=true;this.fireQueue();},this,true);},initAttributes:function(F){YAHOO.widget.SimpleEditor.superclass.initAttributes.call(this,F);var G=this;this.setAttributeConfig("iframe",{value:null});this.setAttributeConfig("textarea",{value:null,writeOnce:true});this.setAttributeConfig("nodeChangeThreshold",{value:F.nodeChangeThreshold||3,validator:YAHOO.lang.isNumber});this.setAttributeConfig("allowNoEdit",{value:F.allowNoEdit||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("limitCommands",{value:F.limitCommands||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("element_cont",{value:F.element_cont});this.setAttributeConfig("editor_wrapper",{value:F.editor_wrapper||null,w!
 riteOnce:true});
+this.setAttributeConfig("height",{value:F.height||C.getStyle(G.get("element"),"height"),method:function(H){if(this._rendered){if(this.get("animate")){var I=new YAHOO.util.Anim(this.get("iframe").get("parentNode"),{height:{to:parseInt(H,10)}},0.5);I.animate();}else{C.setStyle(this.get("iframe").get("parentNode"),"height",H);}}}});this.setAttributeConfig("width",{value:F.width||C.getStyle(this.get("element"),"width"),method:function(H){if(this._rendered){if(this.get("animate")){var I=new YAHOO.util.Anim(this.get("element_cont").get("element"),{width:{to:parseInt(H,10)}},0.5);I.animate();}else{this.get("element_cont").setStyle("width",H);}}}});this.setAttributeConfig("blankimage",{value:F.blankimage||this._getBlankImage()});this.setAttributeConfig("css",{value:F.css||this._defaultCSS,writeOnce:true});this.setAttributeConfig("html",{value:F.html||"<html><head><title>{TITLE}</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" /><base href=\""+this._base!
 HREF+"\"><style>{CSS}</style><style>{HIDDEN_CSS}</style><style>{EXTRA_CSS}</style></head><body onload=\"document.body._rteLoaded = true;\">{CONTENT}</body></html>",writeOnce:true});this.setAttributeConfig("extracss",{value:F.css||"",writeOnce:true});this.setAttributeConfig("handleSubmit",{value:false,writeOnce:true,method:function(H){if(H){var J=this.get("element");if(J.form){var I=function(K){A.stopEvent(K);this.saveHTML();window.setTimeout(function(){YAHOO.util.Event.removeListener(J.form,"submit",I);J.form.submit();},200);};A.on(J.form,"submit",I,this,true);}}}});this.setAttributeConfig("disabled",{value:false,method:function(H){if(this._rendered){this._disableEditor(H);}}});this.setAttributeConfig("toolbar_cont",{value:null,writeOnce:true});this.setAttributeConfig("toolbar",{value:F.toolbar||this._defaultToolbar,writeOnce:true,method:function(H){if(!H.buttonType){H.buttonType=this._defaultToolbar.buttonType;}this._defaultToolbar=H;}});this.setAttributeConfig("animate",{!
 value:((F.animate)?((YAHOO.util.Anim)?true:false):false),valid!
 ator:fun
ction(I){var H=true;if(!YAHOO.util.Anim){H=false;}return H;}});this.setAttributeConfig("panel",{value:null,writeOnce:true,validator:function(I){var H=true;if(!YAHOO.widget.Overlay){H=false;}return H;}});this.setAttributeConfig("focusAtStart",{value:F.focusAtStart||false,writeOnce:true,method:function(){this.on("editorContentLoaded",function(){var H=this;setTimeout(function(){H._focusWindow.call(H,true);H.editorDirty=false;},400);},this,true);}});this.setAttributeConfig("dompath",{value:F.dompath||false,method:function(H){if(H&&!this.dompath){this.dompath=document.createElement("DIV");this.dompath.id=this.get("id")+"_dompath";C.addClass(this.dompath,"dompath");this.get("element_cont").get("firstChild").appendChild(this.dompath);if(this.get("iframe")){this._writeDomPath();}}else{if(!H&&this.dompath){this.dompath.parentNode.removeChild(this.dompath);this.dompath=null;}}this._setupAfterElement();}});this.setAttributeConfig("markup",{value:F.markup||"semantic",validator:function(!
 H){switch(H.toLowerCase()){case"semantic":case"css":case"default":case"xhtml":return true;}return false;}});this.setAttributeConfig("removeLineBreaks",{value:F.removeLineBreaks||false,validator:YAHOO.lang.isBoolean});this.on("afterRender",function(){this._renderPanel();});},_getBlankImage:function(){if(!this.DOMReady){this._queue[this._queue.length]=["_getBlankImage",arguments];return"";}var F="";if(!this._blankImageLoaded){var G=document.createElement("div");G.style.position="absolute";G.style.top="-9999px";G.style.left="-9999px";G.className=this.CLASS_PREFIX+"-blankimage";document.body.appendChild(G);F=YAHOO.util.Dom.getStyle(G,"background-image");F=F.replace("url(","").replace(")","").replace(/"/g,"");this.set("blankimage",F);this._blankImageLoaded=true;}else{F=this.get("blankimage");}return F;},_handleFontSize:function(H){var F=this.toolbar.getButtonById(H.button.id);var G=F.get("label")+"px";this.execCommand("fontsize",G);this.STOP_EXEC_COMMAND=true;},_handleColorPicke!
 r:function(H){var G=H.button;var F="#"+H.color;if((G=="forecol!
 or")||(G
=="backcolor")){this.execCommand(G,F);}},_handleAlign:function(I){var H=null;for(var F=0;F<I.button.menu.length;F++){if(I.button.menu[F].value==I.button.value){H=I.button.menu[F].value;}}var G=this._getSelection();this.execCommand(H,G);this.STOP_EXEC_COMMAND=true;},_handleAfterNodeChange:function(){var R=this._getDomPath(),M=null,I=null,N=null,G=false;var K=this.toolbar.getButtonByValue("fontname");var L=this.toolbar.getButtonByValue("fontsize");var F=this.toolbar.getButtonByValue("heading");for(var H=0;H<R.length;H++){M=R[H];var Q=M.tagName.toLowerCase();if(M.getAttribute("tag")){Q=M.getAttribute("tag");}I=M.getAttribute("face");if(C.getStyle(M,"font-family")){I=C.getStyle(M,"font-family");}if(Q.substring(0,1)=="h"){if(F){for(var J=0;J<F._configs.menu.value.length;J++){if(F._configs.menu.value[J].value.toLowerCase()==Q){F.set("label",F._configs.menu.value[J].text);}}this._updateMenuChecked("heading",Q);}}}if(K){for(var P=0;P<K._configs.menu.value.length;P++){if(I&&K._config!
 s.menu.value[P].text.toLowerCase()==I.toLowerCase()){G=true;I=K._configs.menu.value[P].text;}}if(!G){I=K._configs.label._initialConfig.value;}var O="<span class=\"yui-toolbar-fontname-"+E(I)+"\">"+I+"</span>";if(K.get("label")!=O){K.set("label",O);this._updateMenuChecked("fontname",I);}}if(L){N=parseInt(C.getStyle(M,"fontSize"),10);if((N===null)||isNaN(N)){N=L._configs.label._initialConfig.value;}L.set("label",""+N);}if(!this._isElement(M,"body")&&!this._isElement(M,"img")){this.toolbar.enableButton(K);this.toolbar.enableButton(L);this.toolbar.enableButton("forecolor");this.toolbar.enableButton("backcolor");}if(this._isElement(M,"img")){if(YAHOO.widget.Overlay){this.toolbar.enableButton("createlink");}}if(this._isElement(M,"blockquote")){this.toolbar.selectButton("indent");this.toolbar.disableButton("indent");this.toolbar.enableButton("outdent");}if(this._hasParent(M,"ol")||this._hasParent(M,"ul")){this.toolbar.disableButton("indent");
+}this._lastButton=null;},_setBusy:function(F){if(F){C.removeClass(document.body,"yui-busy");C.removeClass(this._getDoc().body,"yui-busy");}else{C.addClass(document.body,"yui-busy");C.addClass(this._getDoc().body,"yui-busy");}},_handleInsertImageClick:function(){if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("insertimage")){return false;}}this.toolbar.set("disabled",true);this.on("afterExecCommand",function(){var F=this.currentElement[0],H="http://";if(!F){F=this._getSelectedElement();}if(F){if(F.getAttribute("src")){H=F.getAttribute("src",2);if(H.indexOf(this.get("blankimage"))!=-1){H=this.STR_IMAGE_HERE;}}}var G=prompt(this.STR_LINK_URL+": ",H);if((G!=="")&&(G!==null)){F.setAttribute("src",G);}else{if(G!==null){F.parentNode.removeChild(F);this.currentElement=[];}}this.closeWindow();this.toolbar.set("disabled",false);},this,true);},_handleInsertImageWindowClose:function(){this.nodeChange();},_isLocalFile:function(F){if((F!=="")&&((F.indexOf("file:/")!=-1)||!
 (F.indexOf(":\\")!=-1))){return true;}return false;},_handleCreateLinkClick:function(){if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("createlink")){return false;}}this.toolbar.set("disabled",true);this.on("afterExecCommand",function(){var H=this.currentElement[0],G="";if(H){if(H.getAttribute("href",2)!==null){G=H.getAttribute("href",2);}}var J=prompt(this.STR_LINK_URL+": ",G);if((J!=="")&&(J!==null)){var I=J;if((I.indexOf("://")==-1)&&(I.substring(0,1)!="/")&&(I.substring(0,6).toLowerCase()!="mailto")){if((I.indexOf("@")!=-1)&&(I.substring(0,6).toLowerCase()!="mailto")){I="mailto:"+I;}else{if(I.substring(0,1)!="#"){I="http://"+I;}}}H.setAttribute("href",I);}else{if(J!==null){var F=this._getDoc().createElement("span");F.innerHTML=H.innerHTML;C.addClass(F,"yui-non");H.parentNode.replaceChild(F,H);}}this.closeWindow();this.toolbar.set("disabled",false);});},_handleCreateLinkWindowClose:function(){this.nodeChange();this.currentElement=[];},render:function(){if!
 (this._rendered){return false;}if(!this.DOMReady){this._queue[!
 this._qu
eue.length]=["render",arguments];return false;}this._setBusy();this._rendered=true;var F=this;this.set("textarea",this.get("element"));this.get("element_cont").setStyle("display","none");this.get("element_cont").addClass(this.CLASS_CONTAINER);this.set("iframe",this._createIframe());window.setTimeout(function(){F._setInitialContent.call(F);},10);this.get("editor_wrapper").appendChild(this.get("iframe").get("element"));if(this.get("disabled")){this._disableEditor(true);}var G=this.get("toolbar");if(G instanceof B){this.toolbar=G;this.toolbar.set("disabled",true);}else{G.disabled=true;this.toolbar=new B(this.get("toolbar_cont"),G);}this.fireEvent("toolbarLoaded",{type:"toolbarLoaded",target:this.toolbar});this.toolbar.on("toolbarCollapsed",function(){if(this.currentWindow){this.moveWindow();}},this,true);this.toolbar.on("toolbarExpanded",function(){if(this.currentWindow){this.moveWindow();}},this,true);this.toolbar.on("fontsizeClick",function(H){this._handleFontSize(H);},this,t!
 rue);this.toolbar.on("colorPickerClicked",function(H){this._handleColorPicker(H);},this,true);this.toolbar.on("alignClick",function(H){this._handleAlign(H);},this,true);this.on("afterNodeChange",function(){this._handleAfterNodeChange();},this,true);this.toolbar.on("insertimageClick",function(){this._handleInsertImageClick();},this,true);this.on("windowinsertimageClose",function(){this._handleInsertImageWindowClose();},this,true);this.toolbar.on("createlinkClick",function(){this._handleCreateLinkClick();},this,true);this.on("windowcreatelinkClose",function(){this._handleCreateLinkWindowClose();},this,true);this.get("parentNode").replaceChild(this.get("element_cont").get("element"),this.get("element"));if(!this.beforeElement){this.beforeElement=document.createElement("h2");this.beforeElement.className="yui-editor-skipheader";this.beforeElement.tabIndex="-1";this.beforeElement.innerHTML=this.STR_BEFORE_EDITOR;this.get("element_cont").get("firstChild").insertBefore(this.beforeE!
 lement,this.toolbar.get("nextSibling"));}this.setStyle("visibi!
 lity","h
idden");this.setStyle("position","absolute");this.setStyle("top","-9999px");this.setStyle("left","-9999px");this.get("element_cont").appendChild(this.get("element"));this.get("element_cont").setStyle("display","block");C.addClass(this.get("iframe").get("parentNode"),this.CLASS_EDITABLE_CONT);this.get("iframe").addClass(this.CLASS_EDITABLE);this.get("element_cont").setStyle("width",this.get("width"));C.setStyle(this.get("iframe").get("parentNode"),"height",this.get("height"));this.get("iframe").setStyle("width","100%");this.get("iframe").setStyle("height","100%");if(this.browser.ie==7){}this.fireEvent("afterRender",{type:"afterRender",target:this});},execCommand:function(H,G){var K=this.fireEvent("beforeExecCommand",{type:"beforeExecCommand",target:this,args:arguments});if((K===false)||(this.STOP_EXEC_COMMAND)){this.STOP_EXEC_COMMAND=false;return false;}this._setMarkupType(H);if(this.browser.ie){this._getWindow().focus();}var F=true;if(this.get("limitCommands")){if(!this.tool!
 bar.getButtonByValue(H)){F=false;}}this.editorDirty=true;if((typeof this["cmd_"+H.toLowerCase()]=="function")&&F){var J=this["cmd_"+H.toLowerCase()](G);F=J[0];if(J[1]){H=J[1];}if(J[2]){G=J[2];}}if(F){try{this._getDoc().execCommand(H,false,G);}catch(I){}}else{}this.on("afterExecCommand",function(){this.unsubscribeAll("afterExecCommand");this.nodeChange();});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});},cmd_backcolor:function(I){var F=true,G=this._getSelectedElement(),H="backcolor";if(this.browser.gecko||this.browser.opera){this._setEditorStyle(true);H="hilitecolor";}if(!this._isElement(G,"body")){C.setStyle(G,"background-color",I);this._selectNode(G);F=false;}else{this._createCurrentElement("span",{backgroundColor:I});this._selectNode(this.currentElement[0]);F=false;}return[F,H];},cmd_forecolor:function(H){var F=true,G=this._getSelectedElement();if(!this._isElement(G,"body")){C.setStyle(G,"color",H);
+this._selectNode(G);F=false;}else{this._createCurrentElement("span",{color:H});this._selectNode(this.currentElement[0]);F=false;}return[F];},cmd_unlink:function(F){this._swapEl(this.currentElement[0],"span",function(G){G.className="yui-non";});return[false];},cmd_createlink:function(H){var G=this._getSelectedElement(),F=null;if(this._hasParent(G,"a")){this.currentElement[0]=this._hasParent(G,"a");}else{if(!this._isElement(G,"a")){this._createCurrentElement("a");F=this._swapEl(this.currentElement[0],"a");this.currentElement[0]=F;}else{this.currentElement[0]=G;}}return[false];},cmd_insertimage:function(K){var F=true,G=null,J="insertimage",I=this._getSelectedElement();if(K===""){K=this.get("blankimage");}if(this._isElement(I,"img")){this.currentElement[0]=I;F=false;}else{if(this._getDoc().queryCommandEnabled(J)){this._getDoc().execCommand("insertimage",false,K);var L=this._getDoc().getElementsByTagName("img");for(var H=0;H<L.length;H++){if(!YAHOO.util.Dom.hasClass(L[H],"yui-im!
 g")){YAHOO.util.Dom.addClass(L[H],"yui-img");this.currentElement[0]=L[H];}}F=false;}else{if(I==this._getDoc().body){G=this._getDoc().createElement("img");G.setAttribute("src",K);YAHOO.util.Dom.addClass(G,"yui-img");this._getDoc().body.appendChild(G);}else{this._createCurrentElement("img");G=this._getDoc().createElement("img");G.setAttribute("src",K);YAHOO.util.Dom.addClass(G,"yui-img");this.currentElement[0].parentNode.replaceChild(G,this.currentElement[0]);}this.currentElement[0]=G;F=false;}}return[F];},cmd_inserthtml:function(I){var F=true,H="inserthtml",G=null,J=null;if(this.browser.webkit&&!this._getDoc().queryCommandEnabled(H)){this._createCurrentElement("img");G=this._getDoc().createElement("span");G.innerHTML=I;this.currentElement[0].parentNode.replaceChild(G,this.currentElement[0]);F=false;}else{if(this.browser.ie){J=this._getRange();if(J.item){J.item(0).outerHTML=I;}else{J.pasteHTML(I);}F=false;}}return[F];},cmd_list:function(U){var H=true,O=null,R=0,F=null,P="",L=!
 this._getSelectedElement(),I="insertorderedlist";if(U=="ul"){I!
 ="insert
unorderedlist";}if((this.browser.webkit&&!this._getDoc().queryCommandEnabled(I))){if(this._isElement(L,"li")&&this._isElement(L.parentNode,U)){F=L.parentNode;O=this._getDoc().createElement("span");YAHOO.util.Dom.addClass(O,"yui-non");P="";var T=F.getElementsByTagName("li");for(R=0;R<T.length;R++){P+="<div>"+T[R].innerHTML+"</div>";}O.innerHTML=P;this.currentElement[0]=F;this.currentElement[0].parentNode.replaceChild(O,this.currentElement[0]);}else{this._createCurrentElement(U.toLowerCase());O=this._getDoc().createElement(U);for(R=0;R<this.currentElement.length;R++){var Q=this._getDoc().createElement("li");Q.innerHTML=this.currentElement[R].innerHTML+"<span class=\"yui-non\"> </span> ";O.appendChild(Q);if(R>0){this.currentElement[R].parentNode.removeChild(this.currentElement[R]);}}this.currentElement[0].parentNode.replaceChild(O,this.currentElement[0]);this.currentElement[0]=O;var K=this.currentElement[0].firstChild;K=C.getElementsByClassName("yui-non","span",K)[0];!
 this._getSelection().setBaseAndExtent(K,1,K,K.innerText.length);}H=false;}else{F=this._getSelectedElement();if(this._isElement(F,"li")&&this._isElement(F.parentNode,U)||(this.browser.ie&&this._isElement(this._getRange().parentElement,"li"))){if(this.browser.ie){P="";var N=F.parentNode.getElementsByTagName("li");for(var J=0;J<N.length;J++){P+=N[J].innerHTML+"<br>";}var G=this._getDoc().createElement("span");G.innerHTML=P;F.parentNode.parentNode.replaceChild(G,F.parentNode);}else{this.nodeChange();this._getDoc().execCommand(I,"",F.parentNode);this.nodeChange();}H=false;}if(this.browser.opera){var S=this;window.setTimeout(function(){var V=S._getDoc().getElementsByTagName("li");for(var W=0;W<V.length;W++){if(V[W].innerHTML.toLowerCase()=="<br>"){V[W].parentNode.parentNode.removeChild(V[W].parentNode);}}},30);}if(this.browser.ie&&H){var M="";if(this._getRange().html){M="<li>"+this._getRange().html+"</li>";}else{M="<li>"+this._getRange().text+"</li>";}this._getRange().pasteHTML("!
 <"+U+">"+M+"</"+U+">");H=false;}}return H;},cmd_insertorderedl!
 ist:func
tion(F){return[this.cmd_list("ol")];},cmd_insertunorderedlist:function(F){return[this.cmd_list("ul")];},cmd_fontname:function(H){var F=true,G=this._getSelectedElement();this.currentFont=H;if(G&&G.tagName&&!this._hasSelection()){YAHOO.util.Dom.setStyle(G,"font-family",H);F=false;}return[F];},cmd_fontsize:function(G){if((this.currentElement.length>0)&&(!this._hasSelection())){YAHOO.util.Dom.setStyle(this.currentElement,"fontSize",G);}else{if(!this._isElement(this._getSelectedElement(),"body")){var F=this._getSelectedElement();YAHOO.util.Dom.setStyle(F,"fontSize",G);this._selectNode(F);}else{this._createCurrentElement("span",{"fontSize":G});this._selectNode(this.currentElement[0]);}}return[false];},_swapEl:function(G,F,I){var H=this._getDoc().createElement(F);H.innerHTML=G.innerHTML;if(typeof I=="function"){I.call(this,H);}G.parentNode.replaceChild(H,G);return H;},_createCurrentElement:function(H,U){H=((H)?H:"a");var b=null,G=[],I=this._getDoc();if(this.currentFont){if(!U){U={}!
 ;}U.fontFamily=this.currentFont;this.currentFont=null;}this.currentElement=[];var X=function(){var f=null;switch(H){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":f=I.createElement(H);break;default:f=I.createElement("span");YAHOO.util.Dom.addClass(f,"yui-tag-"+H);YAHOO.util.Dom.addClass(f,"yui-tag");f.setAttribute("tag",H);for(var e in U){if(YAHOO.util.Lang.hasOwnProperty(U,e)){f.style[e]=U[e];}}break;}return f;};if(!this._hasSelection()){if(this._getDoc().queryCommandEnabled("insertimage")){this._getDoc().execCommand("insertimage",false,"yui-tmp-img");var W=this._getDoc().getElementsByTagName("img");for(var Z=0;Z<W.length;Z++){if(W[Z].getAttribute("src",2)=="yui-tmp-img"){G=X();W[Z].parentNode.replaceChild(G,W[Z]);this.currentElement[this.currentElement.length]=G;}}}else{if(this.currentEvent){b=YAHOO.util.Event.getTarget(this.currentEvent);}else{b=this._getDoc().body;}}if(b){G=X();if(this._isElement(b,"body")||this._isElement(b,"html")){if(this._isElement(b,"html"))!
 {b=this._getDoc().body;
+}b.appendChild(G);}else{if(b.nextSibling){b.parentNode.insertBefore(G,b.nextSibling);}else{b.parentNode.appendChild(G);}}this.currentElement[this.currentElement.length]=G;this.currentEvent=null;if(this.browser.webkit){this._getSelection().setBaseAndExtent(G,0,G,0);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(true);}}}}else{this._setEditorStyle(true);this._getDoc().execCommand("fontname",false,"yui-tmp");var F=[];var R=this._getDoc().getElementsByTagName("font");var P=this._getDoc().getElementsByTagName(this._getSelectedElement().tagName);var M=this._getDoc().getElementsByTagName("span");var L=this._getDoc().getElementsByTagName("i");var K=this._getDoc().getElementsByTagName("b");var J=this._getDoc().getElementsByTagName(this._getSelectedElement().parentNode.tagName);for(var V=0;V<R.length;V++){F[F.length]=R[V];}for(var N=0;N<J.length;N++){F[F.length]=J[N];}for(var T=0;T<P.length;T++){F[F.length]=P[T];}for(var S=0;S<M.le!
 ngth;S++){F[F.length]=M[S];}for(var Q=0;Q<L.length;Q++){F[F.length]=L[Q];}for(var O=0;O<K.length;O++){F[F.length]=K[O];}for(var a=0;a<F.length;a++){if((YAHOO.util.Dom.getStyle(F[a],"font-family")=="yui-tmp")||(F[a].face&&(F[a].face=="yui-tmp"))){G=X();G.innerHTML=F[a].innerHTML;if(this._isElement(F[a],"ol")||(this._isElement(F[a],"ul"))){var Y=F[a].getElementsByTagName("li")[0];F[a].style.fontFamily="inherit";Y.style.fontFamily="inherit";G.innerHTML=Y.innerHTML;Y.innerHTML="";Y.appendChild(G);this.currentElement[this.currentElement.length]=G;}else{if(this._isElement(F[a],"li")){F[a].innerHTML="";F[a].appendChild(G);F[a].style.fontFamily="inherit";this.currentElement[this.currentElement.length]=G;}else{if(F[a].parentNode){F[a].parentNode.replaceChild(G,F[a]);this.currentElement[this.currentElement.length]=G;this.currentEvent=null;if(this.browser.webkit){this._getSelection().setBaseAndExtent(G,0,G,0);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._!
 getSelection().collapse(true);}}if(this.browser.ie&&U&&U.fontS!
 ize){thi
s._getSelection().empty();}if(this.browser.gecko){this._getSelection().collapseToStart();}}}}}}var c=this.currentElement.length;for(var d=0;d<c;d++){if((d+1)!=c){if(this.currentElement[d]&&this.currentElement[d].nextSibling){if(this._isElement(this.currentElement[d],"br")){this.currentElement[this.currentElement.length]=this.currentElement[d].nextSibling;}}}}}},saveHTML:function(){var F=this.cleanHTML();this.get("element").value=F;return F;},setEditorHTML:function(F){F=this._cleanIncomingHTML(F);this._getDoc().body.innerHTML=F;this.nodeChange();},getEditorHTML:function(){return this._getDoc().body.innerHTML;},show:function(){if(this.browser.gecko){this._setDesignMode("on");this._focusWindow();}if(this.browser.webkit){var F=this;window.setTimeout(function(){F._setInitialContent.call(F);},10);}if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}this.get("iframe!
 ").setStyle("position","static");this.get("iframe").setStyle("left","");},hide:function(){if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}if(this._fixNodesTimer){clearTimeout(this._fixNodesTimer);this._fixNodesTimer=null;}if(this._nodeChangeTimer){clearTimeout(this._nodeChangeTimer);this._nodeChangeTimer=null;}this._lastNodeChange=0;this.get("iframe").setStyle("position","absolute");this.get("iframe").setStyle("left","-9999px");},_cleanIncomingHTML:function(F){F=F.replace(/<strong([^>]*)>/gi,"<b$1>");F=F.replace(/<\/strong>/gi,"</b>");F=F.replace(/<em([^>]*)>/gi,"<i$1>");F=F.replace(/<\/em>/gi,"</i>");return F;},cleanHTML:function(H){if(!H){H=this.getEditorHTML();}var G=this.get("markup");H=this.pre_filter_linebreaks(H,G);H=H.replace(/<img([^>]*)\/>/gi,"<YUI_IMG$1>");H=H.replace(/<img([^>]*)>/gi,"<YUI_IMG$1>");H=H.replace(/<input([^>]*)\/>/gi,"<YUI_INPUT!
 $1>");H=H.replace(/<input([^>]*)>/gi,"<YUI_INPUT$1>");H=H.repl!
 ace(/<ul
([^>]*)>/gi,"<YUI_UL$1>");H=H.replace(/<\/ul>/gi,"</YUI_UL>");H=H.replace(/<blockquote([^>]*)>/gi,"<YUI_BQ$1>");H=H.replace(/<\/blockquote>/gi,"</YUI_BQ>");if((G=="semantic")||(G=="xhtml")){H=H.replace(/<i([^>]*)>/gi,"<em$1>");H=H.replace(/<\/i>/gi,"</em>");H=H.replace(/<b([^>]*)>/gi,"<strong$1>");H=H.replace(/<\/b>/gi,"</strong>");}H=H.replace(/<font/gi,"<font");H=H.replace(/<\/font>/gi,"</font>");H=H.replace(/<span/gi,"<span");H=H.replace(/<\/span>/gi,"</span>");if((G=="semantic")||(G=="xhtml")||(G=="css")){H=H.replace(new RegExp("<font([^>]*)face=\"([^>]*)\">(.*?)</font>","gi"),"<span $1 style=\"font-family: $2;\">$3</span>");H=H.replace(/<u/gi,"<span style=\"text-decoration: underline;\"");H=H.replace(/\/u>/gi,"/span>");if(G=="css"){H=H.replace(/<em([^>]*)>/gi,"<i$1>");H=H.replace(/<\/em>/gi,"</i>");H=H.replace(/<strong([^>]*)>/gi,"<b$1>");H=H.replace(/<\/strong>/gi,"</b>");H=H.replace(/<b/gi,"<span style=\"font-weight: bold;\"");H=H.replace(/\/b>/gi,"/span>");H=H.replac!
 e(/<i/gi,"<span style=\"font-style: italic;\"");H=H.replace(/\/i>/gi,"/span>");}H=H.replace(/  /gi," ");}else{H=H.replace(/<u/gi,"<u");H=H.replace(/\/u>/gi,"/u>");}H=H.replace(/<ol([^>]*)>/gi,"<ol$1>");H=H.replace(/\/ol>/gi,"/ol>");H=H.replace(/<li/gi,"<li");H=H.replace(/\/li>/gi,"/li>");H=this.filter_safari(H);H=this.filter_internals(H);H=this.filter_all_rgb(H);H=this.post_filter_linebreaks(H,G);if(G=="xhtml"){H=H.replace(/<YUI_IMG([^>]*)>/g,"<img $1/>");H=H.replace(/<YUI_INPUT([^>]*)>/g,"<input $1/>");}else{H=H.replace(/<YUI_IMG([^>]*)>/g,"<img $1>");H=H.replace(/<YUI_INPUT([^>]*)>/g,"<input $1>");}H=H.replace(/<YUI_UL([^>]*)>/g,"<ul$1>");H=H.replace(/<\/YUI_UL>/g,"</ul>");H=this.filter_invalid_lists(H);H=H.replace(/<YUI_BQ([^>]*)>/g,"<blockquote$1>");H=H.replace(/<\/YUI_BQ>/g,"</blockquote>");H=YAHOO.lang.trim(H);if(this.get("removeLineBreaks")){H=H.replace(/\n/g,"").replace(/\r/g,"");H=H.replace(/  /gi," ");
+}if(H.substring(0,6).toLowerCase()=="<span>"){H=H.substring(6);}if(H.substring(H.length-7,H.length).toLowerCase()=="</span>"){H=H.substring(0,H.length-7);}for(var F in this.invalidHTML){if(YAHOO.lang.hasOwnProperty(this.invalidHTML,F)){if(D.isObject(F)&&F.keepContents){H=H.replace(new RegExp("<"+F+"([^>]*)>(.*?)</"+F+">","gi"),"$1");}else{H=H.replace(new RegExp("<"+F+"([^>]*)>(.*?)</"+F+">","gi"),"");}}}this.fireEvent("cleanHTML",{type:"cleanHTML",target:this,html:H});return H;},filter_invalid_lists:function(F){F=F.replace(/<\/li>\n/gi,"</li>");F=F.replace(/<\/li><ol>/gi,"</li><li><ol>");F=F.replace(/<\/ol>/gi,"</ol></li>");F=F.replace(/<\/ol><\/li>\n/gi,"</ol>\n");F=F.replace(/<\/li><ul>/gi,"</li><li><ul>");F=F.replace(/<\/ul>/gi,"</ul></li>");F=F.replace(/<\/ul><\/li>\n/gi,"</ul>\n");F=F.replace(/<\/li>/gi,"</li>\n");F=F.replace(/<\/ol>/gi,"</ol>\n");F=F.replace(/<ol>/gi,"<ol>\n");F=F.replace(/<ul>/gi,"<ul>\n");return F;},filter_safari:function(F){if(this.browser.webkit){!
 F=F.replace(/Apple-style-span/gi,"");F=F.replace(/style="line-height: normal;"/gi,"");F=F.replace(/<li><\/li>/gi,"");F=F.replace(/<li> <\/li>/gi,"");F=F.replace(/<li>  <\/li>/gi,"");F=F.replace(/<div><\/div>/gi,"");F=F.replace(/<div> <\/div>/gi,"");}return F;},filter_internals:function(F){F=F.replace(/\r/g,"");F=F.replace(/<\/?(body|head|html)[^>]*>/gi,"");F=F.replace(/<YUI_BR><\/li>/gi,"</li>");F=F.replace(/yui-tag-span/gi,"");F=F.replace(/yui-tag/gi,"");F=F.replace(/yui-non/gi,"");F=F.replace(/yui-img/gi,"");F=F.replace(/ tag="span"/gi,"");F=F.replace(/ class=""/gi,"");F=F.replace(/ style=""/gi,"");F=F.replace(/ class=" "/gi,"");F=F.replace(/ class="  "/gi,"");F=F.replace(/ target=""/gi,"");F=F.replace(/ title=""/gi,"");if(this.browser.ie){F=F.replace(/ class= /gi,"");F=F.replace(/ class= >/gi,"");F=F.replace(/_height="([^>])"/gi,"");F=F.replace(/_width="([^>])"/gi,"");}return F;},filter_all_rgb:function(J){var I=new RegExp("rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\!
 s*?([0-9]+).*?\\)","gi");var F=J.match(I);if(D.isArray(F)){for!
 (var H=0
;H<F.length;H++){var G=this.filter_rgb(F[H]);J=J.replace(F[H].toString(),G);}}return J;},filter_rgb:function(H){if(H.toLowerCase().indexOf("rgb")!=-1){var K=new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)","gi");var G=H.replace(K,"$1,$2,$3,$4,$5").split(",");if(G.length==5){var J=parseInt(G[1],10).toString(16);var I=parseInt(G[2],10).toString(16);var F=parseInt(G[3],10).toString(16);J=J.length==1?"0"+J:J;I=I.length==1?"0"+I:I;F=F.length==1?"0"+F:F;H="#"+J+I+F;}}return H;},pre_filter_linebreaks:function(G,F){if(this.browser.webkit){G=G.replace(/<br class="khtml-block-placeholder">/gi,"<YUI_BR>");G=G.replace(/<br class="webkit-block-placeholder">/gi,"<YUI_BR>");}G=G.replace(/<br>/gi,"<YUI_BR>");G=G.replace(/<br (.*?)>/gi,"<YUI_BR>");G=G.replace(/<br\/>/gi,"<YUI_BR>");G=G.replace(/<br \/>/gi,"<YUI_BR>");G=G.replace(/<div><YUI_BR><\/div>/gi,"<YUI_BR>");G=G.replace(/<p>( | )<\/p>/g,"<YUI_BR>");G=G.replace(/<p><br> <\/p>/gi,"<Y!
 UI_BR>");G=G.replace(/<p> <\/p>/gi,"<YUI_BR>");G=G.replace(/<YUI_BR>$/,"");G=G.replace(/<YUI_BR><\/p>/g,"</p>");return G;},post_filter_linebreaks:function(G,F){if(F=="xhtml"){G=G.replace(/<YUI_BR>/g,"<br/>");}else{G=G.replace(/<YUI_BR>/g,"<br>");}return G;},clearEditorDoc:function(){this._getDoc().body.innerHTML=" ";},_renderPanel:function(){},openWindow:function(F){},moveWindow:function(){},_closeWindow:function(){},closeWindow:function(){this.unsubscribeAll("afterExecCommand");this.toolbar.resetAllButtons();this._focusWindow();},destroy:function(){this.saveHTML();this.toolbar.destroy();this.setStyle("visibility","hidden");this.setStyle("position","absolute");this.setStyle("top","-9999px");this.setStyle("left","-9999px");var G=this.get("element");this.get("element_cont").get("parentNode").replaceChild(G,this.get("element_cont").get("element"));this.get("element_cont").get("element").innerHTML="";for(var F in this){if(D.hasOwnProperty(this,F)){this[F]=null;}}retur!
 n true;},toString:function(){var F="SimpleEditor";if(this.get&!
 &this.ge
t("element_cont")){F="SimpleEditor (#"+this.get("element_cont").get("id")+")"+((this.get("disabled")?" Disabled":""));}return F;}});YAHOO.widget.EditorInfo={_instances:{},window:{},panel:null,getEditorById:function(F){if(!YAHOO.lang.isString(F)){F=F.id;}if(this._instances[F]){return this._instances[F];}return false;},toString:function(){var F=0;for(var G in this._instances){F++;}return"Editor Info ("+F+" registered intance"+((F>1)?"s":"")+")";}};})();(function(){var C=YAHOO.util.Dom,A=YAHOO.util.Event,D=YAHOO.lang,B=YAHOO.widget.Toolbar;YAHOO.widget.Editor=function(G,F){var H={element:null,attributes:(F||{})},I=null;if(D.isString(G)){I=G;}else{I=G.id;}H.element=G;YAHOO.widget.Editor.superclass.constructor.call(this,H.element,H.attributes);};function E(F){return F.replace(/ /g,"-").toLowerCase();}YAHOO.extend(YAHOO.widget.Editor,YAHOO.widget.SimpleEditor,{STR_BEFORE_EDITOR:"This text field can contain stylized text and graphics. To cycle through all formatting options, use th!
 e keyboard shortcut Control + Shift + T to place focus on the toolbar and navigate between option heading names. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift [ aligns text left</li> <li>Control Shift | centers text</li> <li>Control Shift ] aligns text right</li> <li>Control Shift L adds an HTML link</li> <li>To exit this text editor use the keyboard shortcut Control + Shift + ESC.</li></ul>",STR_CLOSE_WINDOW:"Close Window",STR_CLOSE_WINDOW_NOTE:"To close this window use the Control + Shift + W key",STR_IMAGE_PROP_TITLE:"Image Options",STR_IMAGE_URL:"Image Url",STR_IMAGE_TITLE:"Description",STR_IMAGE_SIZE:"Size",STR_IMAGE_ORIG_SIZE:"Original Size",STR_IMAGE_COPY:"<span class=\"tip\"><span class=\"icon icon-info\"></span><strong>Note:</strong>To move this image just highlight it, cut, and paste where ever you'd like.</span>",S!
 TR_IMAGE_PADDING:"Padding",STR_IMAGE_BORDER:"Border",STR_IMAGE!
 _TEXTFLO
W:"Text Flow",STR_LOCAL_FILE_WARNING:"<span class=\"tip\"><span class=\"icon icon-warn\"></span><strong>Note:</strong>This image/link points to a file on your computer and will not be accessible to others on the internet.</span>",STR_LINK_PROP_TITLE:"Link Options",STR_LINK_PROP_REMOVE:"Remove link from text",STR_LINK_NEW_WINDOW:"Open in a new window.",STR_LINK_TITLE:"Description",CLASS_LOCAL_FILE:"warning-localfile",CLASS_HIDDEN:"yui-hidden",init:function(G,F){YAHOO.widget.Editor.superclass.init.call(this,G,F);
+},initAttributes:function(F){YAHOO.widget.Editor.superclass.initAttributes.call(this,F);this.setAttributeConfig("localFileWarning",{value:F.locaFileWarning||true});this.setAttributeConfig("hiddencss",{value:F.hiddencss||".yui-hidden font, .yui-hidden strong, .yui-hidden b, .yui-hidden em, .yui-hidden i, .yui-hidden u, .yui-hidden div,.yui-hidden p,.yui-hidden span,.yui-hidden img, .yui-hidden ul, .yui-hidden ol, .yui-hidden li, .yui-hidden table { border: 1px dotted #ccc; } .yui-hidden .yui-non { border: none; } .yui-hidden img { padding: 2px; }",writeOnce:true});},_fixNodes:function(){YAHOO.widget.Editor.superclass._fixNodes.call(this);var I="";var J=this._getDoc().getElementsByTagName("img");for(var G=0;G<J.length;G++){if(J[G].getAttribute("href",2)){I=J[G].getAttribute("src",2);if(this._isLocalFile(I)){C.addClass(J[G],this.CLASS_LOCAL_FILE);}else{C.removeClass(J[G],this.CLASS_LOCAL_FILE);}}}var H=this._getDoc().body.getElementsByTagName("a");for(var F=0;F<H.length;F++){i!
 f(H[F].getAttribute("href",2)){I=H[F].getAttribute("href",2);if(this._isLocalFile(I)){C.addClass(H[F],this.CLASS_LOCAL_FILE);}else{C.removeClass(H[F],this.CLASS_LOCAL_FILE);}}}},_disabled:["createlink","forecolor","backcolor","fontname","fontsize","superscript","subscript","removeformat","heading","indent"],_alwaysDisabled:{"outdent":true},_alwaysEnabled:{hiddenelements:true},_defaultToolbar:{collapse:true,titlebar:"Text Editing Tools",draggable:false,buttonType:"advanced",buttons:[{group:"fontstyle",label:"Font Name and Size",buttons:[{type:"select",label:"Arial",value:"fontname",disabled:true,menu:[{text:"Arial",checked:true},{text:"Arial Black"},{text:"Comic Sans MS"},{text:"Courier New"},{text:"Lucida Console"},{text:"Tahoma"},{text:"Times New Roman"},{text:"Trebuchet MS"},{text:"Verdana"}]},{type:"spin",label:"13",value:"fontsize",range:[9,75],disabled:true}]},{type:"separator"},{group:"textstyle",label:"Font Style",buttons:[{type:"push",label:"Bold CTRL + SHIFT + B",v!
 alue:"bold"},{type:"push",label:"Italic CTRL + SHIFT + I",valu!
 e:"itali
c"},{type:"push",label:"Underline CTRL + SHIFT + U",value:"underline"},{type:"separator"},{type:"push",label:"Subscript",value:"subscript",disabled:true},{type:"push",label:"Superscript",value:"superscript",disabled:true},{type:"separator"},{type:"color",label:"Font Color",value:"forecolor",disabled:true},{type:"color",label:"Background Color",value:"backcolor",disabled:true},{type:"separator"},{type:"push",label:"Remove Formatting",value:"removeformat",disabled:true},{type:"push",label:"Show/Hide Hidden Elements",value:"hiddenelements"}]},{type:"separator"},{group:"alignment",label:"Alignment",buttons:[{type:"push",label:"Align Left CTRL + SHIFT + [",value:"justifyleft"},{type:"push",label:"Align Center CTRL + SHIFT + |",value:"justifycenter"},{type:"push",label:"Align Right CTRL + SHIFT + ]",value:"justifyright"},{type:"push",label:"Justify",value:"justifyfull"}]},{type:"separator"},{group:"parastyle",label:"Paragraph Style",buttons:[{type:"select",label:"Normal",value:"he!
 ading",disabled:true,menu:[{text:"Normal",value:"none",checked:true},{text:"Header 1",value:"h1"},{text:"Header 2",value:"h2"},{text:"Header 3",value:"h3"},{text:"Header 4",value:"h4"},{text:"Header 5",value:"h5"},{text:"Header 6",value:"h6"}]}]},{type:"separator"},{group:"indentlist",label:"Indenting and Lists",buttons:[{type:"push",label:"Indent",value:"indent",disabled:true},{type:"push",label:"Outdent",value:"outdent",disabled:true},{type:"push",label:"Create an Unordered List",value:"insertunorderedlist"},{type:"push",label:"Create an Ordered List",value:"insertorderedlist"}]},{type:"separator"},{group:"insertitem",label:"Insert Item",buttons:[{type:"push",label:"HTML Link CTRL + SHIFT + L",value:"createlink",disabled:true},{type:"push",label:"Insert Image",value:"insertimage"}]}]},_handleKeyDown:function(H){YAHOO.widget.Editor.superclass._handleKeyDown.call(this,H);var G=false,I=null,F=false;if(H.shiftKey&&H.ctrlKey){G=true;}switch(H.keyCode){case 219:I="justifyleft";!
 break;case 220:I="justifycenter";break;case 221:I="justifyrigh!
 t";break
;}if(G&&I){this.execCommand(I,null);A.stopEvent(H);this.nodeChange();}},_handleCreateLinkClick:function(){var F=this._getSelectedElement();if(this._isElement(F,"img")){this.STOP_EXEC_COMMAND=true;this.currentElement[0]=F;this.toolbar.fireEvent("insertimageClick",{type:"insertimageClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});return false;}if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("createlink")){return false;}}this.on("afterExecCommand",function(){var M=new YAHOO.widget.EditorWindow("createlink",{width:"350px"});var J=this.currentElement[0],I="",P="",N="",K=false;if(J){if(J.getAttribute("href",2)!==null){I=J.getAttribute("href",2);if(this._isLocalFile(I)){M.setFooter(this.STR_LOCAL_FILE_WARNING);K=true;}else{M.setFooter(" ");}}if(J.getAttribute("title")!==null){P=J.getAttribute("title");}if(J.getAttribute("target")!==null){N=J.getAttribute("target");}}var O="<label for=\"createlink_url\"><strong>"+t!
 his.STR_LINK_URL+":</strong> <input type=\"text\" name=\"createlink_url\" id=\"createlink_url\" value=\""+I+"\""+((K)?" class=\"warning\"":"")+"></label>";O+="<label for=\"createlink_target\"><strong> </strong><input type=\"checkbox\" name=\"createlink_target_\" id=\"createlink_target\" value=\"_blank\""+((N)?" checked":"")+"> "+this.STR_LINK_NEW_WINDOW+"</label>";O+="<label for=\"createlink_title\"><strong>"+this.STR_LINK_TITLE+":</strong> <input type=\"text\" name=\"createlink_title\" id=\"createlink_title\" value=\""+P+"\"></label>";var L=document.createElement("div");L.innerHTML=O;var H=document.createElement("div");H.className="removeLink";var G=document.createElement("a");G.href="#";G.innerHTML=this.STR_LINK_PROP_REMOVE;G.title=this.STR_LINK_PROP_REMOVE;A.on(G,"click",function(Q){A.stopEvent(Q);this.execCommand("unlink");this.closeWindow();},this,true);H.appendChild(G);L.appendChild(H);M.setHeader(this.STR_LINK_PROP_TITLE);
+M.setBody(L);A.onAvailable("createlink_url",function(){window.setTimeout(function(){try{YAHOO.util.Dom.get("createlink_url").focus();}catch(Q){}},50);A.on("createlink_url","blur",function(){var Q=C.get("createlink_url");if(this._isLocalFile(Q.value)){C.addClass(Q,"warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING);}else{C.removeClass(Q,"warning");this.get("panel").setFooter(" ");}},this,true);},this,true);this.openWindow(M);});},_handleCreateLinkWindowClose:function(){var H=C.get("createlink_url"),J=C.get("createlink_target"),L=C.get("createlink_title"),I=this.currentElement[0],F=I;if(H&&H.value){var K=H.value;if((K.indexOf("://")==-1)&&(K.substring(0,1)!="/")&&(K.substring(0,6).toLowerCase()!="mailto")){if((K.indexOf("@")!=-1)&&(K.substring(0,6).toLowerCase()!="mailto")){K="mailto:"+K;}else{if(K.substring(0,1)!="#"){K="http://"+K;}}}I.setAttribute("href",K);if(J.checked){I.setAttribute("target",J.value);}else{I.setAttribute("target","");}I.setAttribute("tit!
 le",((L.value)?L.value:""));}else{var G=this._getDoc().createElement("span");G.innerHTML=I.innerHTML;C.addClass(G,"yui-non");I.parentNode.replaceChild(G,I);}this.nodeChange();this.currentElement=[];},_handleInsertImageClick:function(){if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("insertimage")){return false;}}this._setBusy();this.on("afterExecCommand",function(){var I=this.currentElement[0],S=null,P="",e="",f="",O="",b="",V=75,Y=75,U=0,Q=0,N=0,W=false,M=new YAHOO.widget.EditorWindow("insertimage",{width:"415px"});if(!I){I=this._getSelectedElement();}if(I){if(I.getAttribute("src")){O=I.getAttribute("src",2);if(O.indexOf(this.get("blankimage"))!=-1){O=this.STR_IMAGE_HERE;W=true;}}if(I.getAttribute("alt",2)){f=I.getAttribute("alt",2);}if(I.getAttribute("title",2)){f=I.getAttribute("title",2);}if(I.parentNode&&this._isElement(I.parentNode,"a")){P=I.parentNode.getAttribute("href",2);if(I.parentNode.getAttribute("target")!==null){e=I.parentNode.getAttribute("ta!
 rget");}}V=parseInt(I.height,10);Y=parseInt(I.width,10);if(I.s!
 tyle.hei
ght){V=parseInt(I.style.height,10);}if(I.style.width){Y=parseInt(I.style.width,10);}if(I.style.margin){U=parseInt(I.style.margin,10);}if(!I._height){I._height=V;}if(!I._width){I._width=Y;}Q=I._height;N=I._width;}var Z="<label for=\"insertimage_url\"><strong>"+this.STR_IMAGE_URL+":</strong> <input type=\"text\" id=\"insertimage_url\" value=\""+O+"\" size=\"40\"></label>";S=document.createElement("div");S.innerHTML=Z;var K=document.createElement("div");K.id="img_toolbar";S.appendChild(K);var F="<label for=\"insertimage_title\"><strong>"+this.STR_IMAGE_TITLE+":</strong> <input type=\"text\" id=\"insertimage_title\" value=\""+f+"\" size=\"40\"></label>";F+="<label for=\"insertimage_link\"><strong>"+this.STR_LINK_URL+":</strong> <input type=\"text\" name=\"insertimage_link\" id=\"insertimage_link\" value=\""+P+"\"></label>";F+="<label for=\"insertimage_target\"><strong> </strong><input type=\"checkbox\" name=\"insertimage_target_\" id=\"insertimage_target\" value=\"_blank\""!
 +((e)?" checked":"")+"> "+this.STR_LINK_NEW_WINDOW+"</label>";var T=document.createElement("div");T.innerHTML=F;S.appendChild(T);M.cache=S;var H=new YAHOO.widget.Toolbar(K,{buttonType:this._defaultToolbar.buttonType,buttons:[{group:"textflow",label:this.STR_IMAGE_TEXTFLOW+":",buttons:[{type:"push",label:"Left",value:"left"},{type:"push",label:"Inline",value:"inline"},{type:"push",label:"Block",value:"block"},{type:"push",label:"Right",value:"right"}]},{type:"separator"},{group:"padding",label:this.STR_IMAGE_PADDING+":",buttons:[{type:"spin",label:""+U,value:"padding",range:[0,50]}]},{type:"separator"},{group:"border",label:this.STR_IMAGE_BORDER+":",buttons:[{type:"select",label:"Border Size",value:"bordersize",menu:[{text:"none",value:"0",checked:true},{text:"1px",value:"1"},{text:"2px",value:"2"},{text:"3px",value:"3"},{text:"4px",value:"4"},{text:"5px",value:"5"}]},{type:"select",label:"Border Type",value:"bordertype",disabled:true,menu:[{text:"Solid",value:"solid",checke!
 d:true},{text:"Dashed",value:"dashed"},{text:"Dotted",value:"d!
 otted"}]
},{type:"color",label:"Border Color",value:"bordercolor",disabled:true}]}]});var G="0";var X="solid";if(I.style.borderLeftWidth){G=parseInt(I.style.borderLeftWidth,10);}if(I.style.borderLeftStyle){X=I.style.borderLeftStyle;}var d=H.getButtonByValue("bordersize");var a=((parseInt(G,10)>0)?"":"none");d.set("label","<span class=\"yui-toolbar-bordersize-"+G+"\">"+a+"</span>");this._updateMenuChecked("bordersize",G,H);var R=H.getButtonByValue("bordertype");R.set("label","<span class=\"yui-toolbar-bordertype-"+X+"\"></span>");this._updateMenuChecked("bordertype",X,H);if(parseInt(G,10)>0){H.enableButton(R);H.enableButton(d);}var J=H.get("cont");var c=document.createElement("div");c.className="yui-toolbar-group yui-toolbar-group-height-width height-width";c.innerHTML="<h3>"+this.STR_IMAGE_SIZE+":</h3>";var L="";if((V!=Q)||(Y!=N)){L="<span class=\"info\">"+this.STR_IMAGE_ORIG_SIZE+"<br>"+N+" x "+Q+"</span>";}c.innerHTML+="<span><input type=\"text\" size=\"3\" value=\""+Y+"\" id=\"ins!
 ertimage_width\"> x <input type=\"text\" size=\"3\" value=\""+V+"\" id=\"insertimage_height\"></span>"+L;J.insertBefore(c,J.firstChild);A.onAvailable("insertimage_width",function(){A.on("insertimage_width","blur",function(){var g=parseInt(C.get("insertimage_width").value,10);if(g>5){I.style.width=g+"px";this.moveWindow();}},this,true);},this,true);A.onAvailable("insertimage_height",function(){A.on("insertimage_height","blur",function(){var g=parseInt(C.get("insertimage_height").value,10);if(g>5){I.style.height=g+"px";this.moveWindow();}},this,true);},this,true);if((I.align=="right")||(I.align=="left")){H.selectButton(I.align);}else{if(I.style.display=="block"){H.selectButton("block");}else{H.selectButton("inline");}}if(parseInt(I.style.marginLeft,10)>0){H.getButtonByValue("padding").set("label",""+parseInt(I.style.marginLeft,10));}if(I.style.borderSize){H.selectButton("bordersize");H.selectButton(parseInt(I.style.borderSize,10));
+}H.on("colorPickerClicked",function(k){var h="1",j="solid",g="black";if(I.style.borderLeftWidth){h=parseInt(I.style.borderLeftWidth,10);}if(I.style.borderLeftStyle){j=I.style.borderLeftStyle;}if(I.style.borderLeftColor){g=I.style.borderLeftColor;}var i=h+"px "+j+" #"+k.color;I.style.border=i;},this.toolbar,true);H.on("buttonClick",function(m){var k=m.button.value,j="";if(m.button.menucmd){k=m.button.menucmd;}var h="1",i="solid",g="black";if(I.style.borderLeftWidth){h=parseInt(I.style.borderLeftWidth,10);}if(I.style.borderLeftStyle){i=I.style.borderLeftStyle;}if(I.style.borderLeftColor){g=I.style.borderLeftColor;}switch(k){case"bordersize":if(this.browser.webkit&&this._lastImage){C.removeClass(this._lastImage,"selected");this._lastImage=null;}j=parseInt(m.button.value,10)+"px "+i+" "+g;I.style.border=j;if(parseInt(m.button.value,10)>0){H.enableButton("bordertype");H.enableButton("bordercolor");}else{H.disableButton("bordertype");H.disableButton("bordercolor");}break;case"bor!
 dertype":if(this.browser.webkit&&this._lastImage){C.removeClass(this._lastImage,"selected");this._lastImage=null;}j=h+"px "+m.button.value+" "+g;I.style.border=j;break;case"right":case"left":H.deselectAllButtons();I.style.display="";I.align=m.button.value;break;case"inline":H.deselectAllButtons();I.style.display="";I.align="";break;case"block":H.deselectAllButtons();I.style.display="block";I.align="center";break;case"padding":var l=H.getButtonById(m.button.id);I.style.margin=l.get("label")+"px";break;}H.selectButton(m.button.value);this.moveWindow();},this,true);M.setHeader(this.STR_IMAGE_PROP_TITLE);M.setBody(S);if((this.browser.webkit&&!this.browser.webkit3)||this.browser.opera){M.setFooter(this.STR_IMAGE_COPY);}this.openWindow(M);A.onAvailable("insertimage_url",function(){this.toolbar.selectButton("insertimage");window.setTimeout(function(){YAHOO.util.Dom.get("insertimage_url").focus();if(W){YAHOO.util.Dom.get("insertimage_url").select();}},50);if(this.get("localFileWarn!
 ing")){A.on("insertimage_link","blur",function(){var g=C.get("!
 insertim
age_link");if(this._isLocalFile(g.value)){C.addClass(g,"warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING);}else{C.removeClass(g,"warning");this.get("panel").setFooter(" ");if((this.browser.webkit&&!this.browser.webkit3)||this.browser.opera){this.get("panel").setFooter(this.STR_IMAGE_COPY);}}},this,true);A.on("insertimage_url","blur",function(){var i=C.get("insertimage_url");if(this._isLocalFile(i.value)){C.addClass(i,"warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING);}else{if(this.currentElement[0]){C.removeClass(i,"warning");this.get("panel").setFooter(" ");if((this.browser.webkit&&!this.browser.webkit3)||this.browser.opera){this.get("panel").setFooter(this.STR_IMAGE_COPY);}if(i&&i.value&&(i.value!=this.STR_IMAGE_HERE)){this.currentElement[0].setAttribute("src",i.value);var h=this,g=new Image();g.onerror=function(){i.value=h.STR_IMAGE_HERE;g.setAttribute("src",h.get("blankimage"));h.currentElement[0].setAttribute("src",h.get("blankimage"));!
 YAHOO.util.Dom.get("insertimage_height").value=g.height;YAHOO.util.Dom.get("insertimage_width").value=g.width;};window.setTimeout(function(){YAHOO.util.Dom.get("insertimage_height").value=g.height;YAHOO.util.Dom.get("insertimage_width").value=g.width;if(h.currentElement&&h.currentElement[0]){if(!h.currentElement[0]._height){h.currentElement[0]._height=g.height;}if(!h.currentElement[0]._width){h.currentElement[0]._width=g.width;}}h.moveWindow();},200);if(i.value!=this.STR_IMAGE_HERE){g.src=i.value;}}}}},this,true);}},this,true);});},_handleInsertImageWindowClose:function(){var F=C.get("insertimage_url");var M=C.get("insertimage_title");var J=C.get("insertimage_link");var K=C.get("insertimage_target");var I=this.currentElement[0];if(F&&F.value&&(F.value!=this.STR_IMAGE_HERE)){I.setAttribute("src",F.value);I.setAttribute("title",M.value);I.setAttribute("alt",M.value);var H=I.parentNode;if(J.value){var L=J.value;if((L.indexOf("://")==-1)&&(L.substring(0,1)!="/")&&(L.substring(0!
 ,6).toLowerCase()!="mailto")){if((L.indexOf("@")!=-1)&&(L.subs!
 tring(0,
6).toLowerCase()!="mailto")){L="mailto:"+L;}else{L="http://"+L;}}if(H&&this._isElement(H,"a")){H.setAttribute("href",L);if(K.checked){H.setAttribute("target",K.value);}else{H.setAttribute("target","");}}else{var G=this._getDoc().createElement("a");G.setAttribute("href",L);if(K.checked){G.setAttribute("target",K.value);}else{G.setAttribute("target","");}I.parentNode.replaceChild(G,I);G.appendChild(I);}}else{if(H&&this._isElement(H,"a")){H.parentNode.replaceChild(I,H);}}}else{I.parentNode.removeChild(I);}this.currentElement=[];this.nodeChange();},_renderPanel:function(){var F=null;if(!YAHOO.widget.EditorInfo.panel){F=new YAHOO.widget.Overlay(this.EDITOR_PANEL_ID,{width:"300px",iframe:true,visible:false,underlay:"none",draggable:false,close:false});YAHOO.widget.EditorInfo.panel=F;}else{F=YAHOO.widget.EditorInfo.panel;}this.set("panel",F);this.get("panel").setBody("---");this.get("panel").setHeader(" ");this.get("panel").setFooter(" ");if(this.DOMReady){this.get("panel").render(!
 document.body);C.addClass(this.get("panel").element,"yui-editor-panel");}else{A.onDOMReady(function(){this.get("panel").render(document.body);C.addClass(this.get("panel").element,"yui-editor-panel");},this,true);}this.get("panel").showEvent.subscribe(function(){YAHOO.util.Dom.setStyle(this.element,"display","block");});return this.get("panel");},openWindow:function(K){this.toolbar.set("disabled",true);A.on(document,"keypress",this._closeWindow,this,true);if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}YAHOO.widget.EditorInfo.window.win=K;YAHOO.widget.EditorInfo.window.scope=this;var P=this,L=C.getXY(this.currentElement[0]),U=C.getXY(this.get("iframe").get("element")),N=this.get("panel"),T=[(L[0]+U[0]-20),(L[1]+U[1]+10)],O=(parseInt(K.attrs.width,10)/2),R="center",M=null;this.fireEvent("beforeOpenWindow",{type:"beforeOpenWindow",win:K,panel:N});
+M=document.createElement("div");M.className=this.CLASS_PREFIX+"-body-cont";for(var V in this.browser){if(this.browser[V]){C.addClass(M,V);break;}}C.addClass(M,((YAHOO.widget.Button&&(this._defaultToolbar.buttonType=="advanced"))?"good-button":"no-button"));var S=document.createElement("h3");S.className="yui-editor-skipheader";S.innerHTML=this.STR_CLOSE_WINDOW_NOTE;M.appendChild(S);form=document.createElement("form");form.setAttribute("method","GET");var W=K.name;A.on(form,"submit",function(Y){var X="window"+W+"Submit";P.fireEvent(X,{type:X,target:this});A.stopEvent(Y);},this,true);M.appendChild(form);if(D.isObject(K.body)){form.appendChild(K.body);}else{var F=document.createElement("div");F.innerHTML=K.body;form.appendChild(F);}var J=document.createElement("span");J.innerHTML="X";J.title=this.STR_CLOSE_WINDOW;J.className="close";A.on(J,"click",function(){this.closeWindow();},this,true);var H=document.createElement("span");H.innerHTML="^";H.className="knob";K._knob=H;var I=d!
 ocument.createElement("h3");I.innerHTML=K.header;N.cfg.setProperty("width",K.attrs.width);N.setHeader(" ");N.appendToHeader(I);I.appendChild(J);I.appendChild(H);N.setBody(" ");N.setFooter(" ");if(K.footer!==null){N.setFooter(K.footer);C.addClass(N.footer,"open");}else{C.removeClass(N.footer,"open");}N.appendToBody(M);var Q=function(){N.bringToTop();A.on(N.element,"click",function(X){A.stopPropagation(X);});this._setBusy(true);N.showEvent.unsubscribe(Q);};N.showEvent.subscribe(Q,this,true);var G=function(){this.currentWindow=null;var X="window"+W+"Close";this.fireEvent(X,{type:X,target:this});N.hideEvent.unsubscribe(G);};N.hideEvent.subscribe(G,this,true);this.currentWindow=K;this.moveWindow(true);N.show();this.fireEvent("afterOpenWindow",{type:"afterOpenWindow",win:K,panel:N});},moveWindow:function(G){if(!this.currentWindow){return false;}var I=this.currentWindow,J=C.getXY(this.currentElement[0]),Z=C.getXY(this.get("iframe").get("element")),O=this.get("panel"),X=[(J[0]+Z[0]!
 ),(J[1]+Z[1])],Q=(parseInt(I.attrs.width,10)/2),T="center",P=O!
 .cfg.get
Property("xy"),H=I._knob,W=0,L=0,S=false;X[0]=((X[0]-Q)+20);X[0]=X[0]-C.getDocumentScrollLeft(this._getDoc());X[1]=X[1]-C.getDocumentScrollTop(this._getDoc());if(this._isElement(this.currentElement[0],"img")){if(this.currentElement[0].src.indexOf(this.get("blankimage"))!=-1){X[0]=(X[0]+(75/2));X[1]=(X[1]+75);}else{var N=parseInt(this.currentElement[0].width,10);var V=parseInt(this.currentElement[0].height,10);X[0]=(X[0]+(N/2));X[1]=(X[1]+V);}X[1]=X[1]+15;}else{var K=C.getStyle(this.currentElement[0],"fontSize");if(K&&K.indexOf&&K.indexOf("px")!=-1){X[1]=X[1]+parseInt(C.getStyle(this.currentElement[0],"fontSize"),10)+5;}else{X[1]=X[1]+20;}}if(X[0]<Z[0]){X[0]=Z[0]+5;T="left";}if((X[0]+(Q*2))>(Z[0]+parseInt(this.get("iframe").get("element").clientWidth,10))){X[0]=((Z[0]+parseInt(this.get("iframe").get("element").clientWidth,10))-(Q*2)-5);T="right";}try{W=(X[0]-P[0]);L=(X[1]-P[1]);}catch(a){}W=((W<0)?(W*-1):W);L=((L<0)?(L*-1):L);if(((W>10)||(L>10))||G){var R=0,U=0;if(this.curren!
 tElement[0].width){U=(parseInt(this.currentElement[0].width,10)/2);}var M=J[0]+Z[0]+U;R=M-X[0];if(R>(parseInt(I.attrs.width,10)-40)){R=parseInt(I.attrs.width,10)-40;}else{if(R<40){R=40;}}if(isNaN(R)){R=40;}if(G){if(H){H.style.left=R+"px";}if(this.get("animate")){C.setStyle(O.element,"opacity","0");S=new YAHOO.util.Anim(O.element,{opacity:{from:0,to:1}},0.1,YAHOO.util.Easing.easeOut);O.cfg.setProperty("xy",X);S.onComplete.subscribe(function(){if(this.browser.ie){O.element.style.filter="none";}},this,true);S.animate();}else{O.cfg.setProperty("xy",X);}}else{if(this.get("animate")){S=new YAHOO.util.Anim(O.element,{},0.5,YAHOO.util.Easing.easeOut);S.attributes={top:{to:X[1]},left:{to:X[0]}};S.onComplete.subscribe(function(){O.cfg.setProperty("xy",X);});var Y=new YAHOO.util.Anim(O.iframe,S.attributes,0.5,YAHOO.util.Easing.easeOut);var F=new YAHOO.util.Anim(H,{left:{to:R}},0.6,YAHOO.util.Easing.easeOut);S.animate();Y.animate();F.animate();}else{H.style.left=R+"px";O.cfg.setPropert!
 y("xy",X);}}}},_closeWindow:function(F){if((F.charCode==87)&&F!
 .shiftKe
y&&F.ctrlKey){if(this.currentWindow){this.closeWindow();}}},closeWindow:function(){YAHOO.widget.EditorInfo.window={};this.fireEvent("closeWindow",{type:"closeWindow",win:this.currentWindow});this.currentWindow=null;this.get("panel").hide();this.get("panel").cfg.setProperty("xy",[-900,-900]);this.get("panel").syncIframe();this.unsubscribeAll("afterExecCommand");this.toolbar.set("disabled",false);this.toolbar.resetAllButtons();this._focusWindow();A.removeListener(document,"keypress",this._closeWindow);},cmd_heading:function(J){var G=true,H=null,I="heading",K=this._getSelection(),F=this._getSelectedElement();if(F){K=F;}if(this.browser.ie){I="formatblock";}if(J=="none"){if((K&&K.tagName&&(K.tagName.toLowerCase().substring(0,1)=="h"))||(K&&K.parentNode&&K.parentNode.tagName&&(K.parentNode.tagName.toLowerCase().substring(0,1)=="h"))){if(K.parentNode.tagName.toLowerCase().substring(0,1)=="h"){K=K.parentNode;}if(this._isElement(K,"html")){return[false];}H=this._swapEl(F,"span",funct!
 ion(L){L.className="yui-non";});this._selectNode(H);this.currentElement[0]=H;}G=false;}else{if(this._isElement(F,"h1")||this._isElement(F,"h2")||this._isElement(F,"h3")||this._isElement(F,"h4")||this._isElement(F,"h5")||this._isElement(F,"h6")){H=this._swapEl(F,J);this._selectNode(H);this.currentElement[0]=H;}else{this._createCurrentElement(J);this._selectNode(this.currentElement[0]);}G=false;}return[G,I];},cmd_hiddenelements:function(F){if(this._showingHiddenElements){this._lastButton=null;this._showingHiddenElements=false;this.toolbar.deselectButton("hiddenelements");C.removeClass(this._getDoc().body,this.CLASS_HIDDEN);}else{this._showingHiddenElements=true;C.addClass(this._getDoc().body,this.CLASS_HIDDEN);this.toolbar.selectButton("hiddenelements");}return[false];},cmd_removeformat:function(I){var G=true;if(this.browser.webkit&&!this._getDoc().queryCommandEnabled("removeformat")){var F=this._getSelection()+"";
+this._createCurrentElement("span");this.currentElement[0].className="yui-non";this.currentElement[0].innerHTML=F;for(var H=1;H<this.currentElement.length;H++){this.currentElement[H].parentNode.removeChild(this.currentElement[H]);}G=false;}return[G];},cmd_script:function(L,K){var H=true,F=L.toLowerCase().substring(0,3),I=null,G=this._getSelectedElement();if(this.browser.webkit){if(this._isElement(G,F)){I=this._swapEl(this.currentElement[0],"span",function(M){M.className="yui-non";});this._selectNode(I);}else{this._createCurrentElement(F);var J=this._swapEl(this.currentElement[0],F);this._selectNode(J);this.currentElement[0]=J;}H=false;}return H;},cmd_superscript:function(F){return[this.cmd_script("superscript",F)];},cmd_subscript:function(F){return[this.cmd_script("subscript",F)];},cmd_indent:function(I){var F=true,H=this._getSelectedElement(),J=null;if(this.browser.webkit||this.browser.ie||this.browser.gecko){if(this._isElement(H,"blockquote")){J=this._getDoc().createElemen!
 t("blockquote");J.innerHTML=H.innerHTML;H.innerHTML="";H.appendChild(J);this._selectNode(J);}else{this._createCurrentElement("blockquote");for(var G=0;G<this.currentElement.length;G++){J=this._getDoc().createElement("blockquote");J.innerHTML=this.currentElement[G].innerHTML;this.currentElement[G].parentNode.replaceChild(J,this.currentElement[G]);this.currentElement[G]=J;}this._selectNode(this.currentElement[0]);}F=false;}else{I="blockquote";}return[F,"indent",I];},cmd_outdent:function(J){var F=true,I=this._getSelectedElement(),K=null,G=null;if(this.browser.webkit||this.browser.ie||this.browser.gecko){I=this._getSelectedElement();if(this._isElement(I,"blockquote")){var H=I.parentNode;if(this._isElement(I.parentNode,"blockquote")){H.innerHTML=I.innerHTML;this._selectNode(H);}else{G=this._getDoc().createElement("span");G.innerHTML=I.innerHTML;YAHOO.util.Dom.addClass(G,"yui-non");H.replaceChild(G,I);this._selectNode(G);}}else{}F=false;}else{J="blockquote";}return[F,"indent",J];!
 },toString:function(){var F="Editor";if(this.get&&this.get("el!
 ement_co
nt")){F="Editor (#"+this.get("element_cont").get("id")+")"+((this.get("disabled")?" Disabled":""));}return F;}});YAHOO.widget.EditorWindow=function(G,F){this.name=G.replace(" ","_");this.attrs=F;};YAHOO.widget.EditorWindow.prototype={_cache:null,header:null,body:null,footer:null,setHeader:function(F){this.header=F;},setBody:function(F){this.body=F;},setFooter:function(F){this.footer=F;},toString:function(){return"Editor Window ("+this.name+")";}};})();YAHOO.register("editor",YAHOO.widget.Editor,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/editor/editor-beta.js
===================================================================
--- trunk/root/static/yui/editor/editor-beta.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/editor/editor-beta.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,19 +2,317 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-/*
-Copyright (c) 2007, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-*/
+(function() {
+    /**
+    * @private
+    **/
+var Dom = YAHOO.util.Dom,
+    Event = YAHOO.util.Event,
+    Lang = YAHOO.lang;
+    /**
+     * @description <p>Creates a rich custom Toolbar Button. Primarily used with the Rich Text Editor's Toolbar</p>
+     * @class ToolbarButtonAdvanced
+     * @namespace YAHOO.widget
+     * @requires yahoo, dom, element, event, container_core, menu, button
+     * @beta
+     * 
+     * Provides a toolbar button based on the button and menu widgets.
+     * @constructor
+     * @param {String/HTMLElement} el The element to turn into a button.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+    if (YAHOO.widget.Button) {
+        YAHOO.widget.ToolbarButtonAdvanced = YAHOO.widget.Button;
+        /**
+        * @property buttonType
+        * @private
+        * @description Tells if the Button is a Rich Button or a Simple Button
+        */
+        YAHOO.widget.ToolbarButtonAdvanced.prototype.buttonType = 'rich';
+        /**
+        * @method checkValue
+        * @param {String} value The value of the option that we want to mark as selected
+        * @description Select an option by value
+        */
+        YAHOO.widget.ToolbarButtonAdvanced.prototype.checkValue = function(value) {
+            var _menuItems = this.getMenu().getItems();
+            if (_menuItems.length === 0) {
+                this.getMenu()._onBeforeShow();
+                _menuItems = this.getMenu().getItems();
+            }
+            for (var i = 0; i < _menuItems.length; i++) {
+                _menuItems[i].cfg.setProperty('checked', false);
+                if (_menuItems[i].value == value) {
+                    _menuItems[i].cfg.setProperty('checked', true);
+                }
+            }      
+        };
+    } else {
+        YAHOO.widget.ToolbarButtonAdvanced = function() {};
+    }
+
+
+    /**
+     * @description <p>Creates a basic custom Toolbar Button. Primarily used with the Rich Text Editor's Toolbar</p>
+     * @class ToolbarButton
+     * @namespace YAHOO.widget
+     * @requires yahoo, dom, element, event
+     * @Extends YAHOO.util.Element
+     * @beta
+     * 
+     * Provides a toolbar button based on the button and menu widgets, <select> elements are used in place of menu's.
+     * @constructor
+     * @param {String/HTMLElement} el The element to turn into a button.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+
+    YAHOO.widget.ToolbarButton = function(el, attrs) {
+        
+        if (Lang.isObject(arguments[0]) && !Dom.get(el).nodeType) {
+            attrs = el;
+        }
+        var local_attrs = (attrs || {});
+
+        var oConfig = {
+            element: null,
+            attributes: local_attrs
+        };
+
+        if (!oConfig.attributes.type) {
+            oConfig.attributes.type = 'push';
+        }
+        
+        oConfig.element = document.createElement('span');
+        oConfig.element.setAttribute('unselectable', 'on');
+        oConfig.element.className = 'yui-button yui-' + oConfig.attributes.type + '-button';
+        oConfig.element.innerHTML = '<span class="first-child"><a href="#">LABEL</a></span>';
+        oConfig.attributes.id = Dom.generateId();
+
+        YAHOO.widget.ToolbarButton.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
+    };
+
+    YAHOO.extend(YAHOO.widget.ToolbarButton, YAHOO.util.Element, {
+        /**
+        * @property buttonType
+        * @private
+        * @description Tells if the Button is a Rich Button or a Simple Button
+        */
+        buttonType: 'normal',
+        /**
+        * @method _handleMouseOver
+        * @private
+        * @description Adds classes to the button elements on mouseover (hover)
+        */
+        _handleMouseOver: function() {
+            if (!this.get('disabled')) {
+                this.addClass('yui-button-hover');
+                this.addClass('yui-' + this.get('type') + '-button-hover');
+            }
+        },
+        /**
+        * @method _handleMouseOut
+        * @private
+        * @description Removes classes from the button elements on mouseout (hover)
+        */
+        _handleMouseOut: function() {
+            this.removeClass('yui-button-hover');
+            this.removeClass('yui-' + this.get('type') + '-button-hover');
+        },
+        /**
+        * @method checkValue
+        * @param {String} value The value of the option that we want to mark as selected
+        * @description Select an option by value
+        */
+        checkValue: function(value) {
+            if (this.get('type') == 'menu') {
+                var opts = this._button.options;
+                for (var i = 0; i < opts.length; i++) {
+                    if (opts[i].value == value) {
+                        opts.selectedIndex = i;
+                    }
+                }
+            }
+        },
+        /** 
+        * @method init
+        * @description The ToolbarButton class's initialization method
+        */        
+        init: function(p_oElement, p_oAttributes) {
+            YAHOO.widget.ToolbarButton.superclass.init.call(this, p_oElement, p_oAttributes);
+
+            this.on('mouseover', this._handleMouseOver, this, true);
+            this.on('mouseout', this._handleMouseOut, this, true);
+        },
+        /**
+        * @method initAttributes
+        * @description Initializes all of the configuration attributes used to create 
+        * the toolbar.
+        * @param {Object} attr Object literal specifying a set of 
+        * configuration attributes used to create the toolbar.
+        */        
+        initAttributes: function(attr) {
+            YAHOO.widget.ToolbarButton.superclass.initAttributes.call(this, attr);
+            /**
+            * @attribute value
+            * @description The value of the button
+            * @type String
+            */            
+            this.setAttributeConfig('value', {
+                value: attr.value
+            });
+            /**
+            * @attribute menu
+            * @description The menu attribute, see YAHOO.widget.Button
+            * @type Object
+            */            
+            this.setAttributeConfig('menu', {
+                value: attr.menu || false
+            });
+            /**
+            * @attribute type
+            * @description The type of button to create: push, menu, color, select, spin
+            * @type String
+            */            
+            this.setAttributeConfig('type', {
+                value: attr.type,
+                writeOnce: true,
+                method: function(type) {
+                    var el, opt;
+                    if (!this._button) {
+                        this._button = this.get('element').getElementsByTagName('a')[0];
+                    }
+                    switch (type) {
+                        case 'select':
+                        case 'menu':
+                            el = document.createElement('select');
+                            var menu = this.get('menu');
+                            for (var i = 0; i < menu.length; i++) {
+                                opt = document.createElement('option');
+                                opt.innerHTML = menu[i].text;
+                                opt.value = menu[i].value;
+                                if (menu[i].checked) {
+                                    opt.selected = true;
+                                }
+                                el.appendChild(opt);
+                            }
+                            this._button.parentNode.replaceChild(el, this._button);
+                            Event.on(el, 'change', this._handleSelect, this, true);
+                            this._button = el;
+                            break;
+                    }
+                }
+            });
+
+            /**
+            * @attribute disabled
+            * @description Set the button into a disabled state
+            * @type String
+            */            
+            this.setAttributeConfig('disabled', {
+                value: attr.disabled || false,
+                method: function(disabled) {
+                    if (disabled) {
+                        this.addClass('yui-button-disabled');
+                        this.addClass('yui-' + this.get('type') + '-button-disabled');
+                    } else {
+                        this.removeClass('yui-button-disabled');
+                        this.removeClass('yui-' + this.get('type') + '-button-disabled');
+                    }
+                    if (this.get('type') == 'menu') {
+                        this._button.disabled = disabled;
+                    }
+                }
+            });
+
+            /**
+            * @attribute label
+            * @description The text label for the button
+            * @type String
+            */            
+            this.setAttributeConfig('label', {
+                value: attr.label,
+                method: function(label) {
+                    if (!this._button) {
+                        this._button = this.get('element').getElementsByTagName('a')[0];
+                    }
+                    if (this.get('type') == 'push') {
+                        this._button.innerHTML = label;
+                    }
+                }
+            });
+
+            /**
+            * @attribute title
+            * @description The title of the button
+            * @type String
+            */            
+            this.setAttributeConfig('title', {
+                value: attr.title
+            });
+
+            /**
+            * @config container
+            * @description The container that the button is rendered to, handled by Toolbar
+            * @type String
+            */            
+            this.setAttributeConfig('container', {
+                value: null,
+                writeOnce: true,
+                method: function(cont) {
+                    this.appendTo(cont);
+                }
+            });
+
+        },
+        /** 
+        * @private
+        * @method _handleSelect
+        * @description The event fired when a change event gets fired on a select element
+        * @param {Event} ev The change event.
+        */        
+        _handleSelect: function(ev) {
+            var tar = Event.getTarget(ev);
+            var value = tar.options[tar.selectedIndex].value;
+            this.fireEvent('change', {type: 'change', value: value });
+        },
+        /** 
+        * @method getMenu
+        * @description A stub function to mimic YAHOO.widget.Button's getMenu method
+        */        
+        getMenu: function() {
+            return this.get('menu');
+        },
+        /** 
+        * @method fireEvent
+        * @description Overridden fireEvent method to prevent DOM events from firing if the button is disabled.
+        */        
+        fireEvent: function (p_sType , p_aArgs) {
+            //  Disabled buttons should not respond to DOM events
+            if (this.DOM_EVENTS[p_sType] && this.get('disabled')) {
+                return;
+            }
+        
+            YAHOO.widget.ToolbarButton.superclass.fireEvent.call(this, p_sType, p_aArgs);
+        },
+        /**
+        * @method toString
+        * @description Returns a string representing the toolbar.
+        * @return {String}
+        */        
+        toString: function() {
+            return 'ToolbarButton (' + this.get('id') + ')';
+        }
+        
+    });
+})();
 /**
  * @description <p>Creates a rich Toolbar widget based on Button. Primarily used with the Rich Text Editor</p>
  * @class Toolbar
  * @namespace YAHOO.widget
- * @requires yahoo, dom, element, event
- * @optional container, menu, button, dragdrop
+ * @requires yahoo, dom, element, event, toolbarbutton
+ * @optional container_core, dragdrop
  * @beta
  */
 (function() {
@@ -100,6 +398,12 @@
 
     YAHOO.extend(YAHOO.widget.Toolbar, YAHOO.util.Element, {
         /** 
+        * @property buttonType
+        * @description The default button to use
+        * @type Object
+        */
+        buttonType: YAHOO.widget.ToolbarButton,
+        /** 
         * @property dd
         * @description The DragDrop instance associated with the Toolbar
         * @type Object
@@ -295,12 +599,6 @@
         */
         _titlebar: null,
         /** 
-        * @property _disabled
-        * @description Object to track button status when enabling/disabling the toolbar
-        * @type Object
-        */
-        _disabled: null,
-        /** 
         * @property browser
         * @description Standard browser detection
         * @type Object
@@ -399,10 +697,38 @@
         */
         initAttributes: function(attr) {
             YAHOO.widget.Toolbar.superclass.initAttributes.call(this, attr);
-            var el = this.get('element');
             this.addClass(this.CLASS_CONTAINER);
 
+            /**
+            * @attribute buttonType
+            * @description The buttonType to use (advanced or basic)
+            * @type String
+            */
+            this.setAttributeConfig('buttonType', {
+                value: attr.buttonType || 'basic',
+                writeOnce: true,
+                validator: function(type) {
+                    switch (type) {
+                        case 'advanced':
+                        case 'basic':
+                            return true;
+                    }
+                    return false;
+                },
+                method: function(type) {
+                    if (type == 'advanced') {
+                        if (YAHOO.widget.Button) {
+                            this.buttonType = YAHOO.widget.ToolbarButtonAdvanced;
+                        } else {
+                            this.buttonType = YAHOO.widget.ToolbarButton;
+                        }
+                    } else {
+                        this.buttonType = YAHOO.widget.ToolbarButton;
+                    }
+                }
+            });
 
+
             /**
             * @attribute buttons
             * @description Object specifying the buttons to include in the toolbar
@@ -453,49 +779,23 @@
                     if (this.get('disabled') === disabled) {
                         return false;
                     }
-                    if (!Lang.isObject(this._disabled)) {
-                        this._disabled = {};
-                    }
                     if (disabled) {
                         this.addClass(this.CLASS_DISABLED);
                         this.set('draggable', false);
+                        this.disableAllButtons();
                     } else {
                         this.removeClass(this.CLASS_DISABLED);
                         if (this._configs.draggable._initialConfig.value) {
                             //Draggable by default, set it back
                             this.set('draggable', true);
                         }
+                        this.resetAllButtons();
                     }
-                    var len = this._buttonList.length;
-                    for (var i = 0; i < len; i++) {
-                        if (disabled) {
-                            //If it's already disabled, flag it
-                            if (this._buttonList[i].get('disabled')) {
-                                this._disabled[i] = true;
-                            } else {
-                                this._disabled[i] = null;
-                            }
-                            this.disableButton(this._buttonList[i].get('id'));
-                        } else {
-                            //Check to see if it was disabled by default and skip it
-                            var _button = this._buttonList[i];
-                            var _check = _button._configs.disabled._initialConfig.value;
-                            if (this._disabled[i] === true) {
-                                _check = true;
-                            }
-                            if (!_check) {
-                                this.enableButton(_button.get('id'));
-                            }
-                        }
-                    }
-                    if (!disabled) {
-                        this._disabled = {};
-                    }
                 }
             });
 
             /**
-            * @attribute cont
+            * @config cont
             * @description The container for the toolbar.
             * @type HTMLElement
             */
@@ -613,8 +913,6 @@
             this.setAttributeConfig('draggable', {
                 value: (attr.draggable || false),
                 method: function(draggable) {
-                    var el = this.get('element');
-
                     if (draggable && !this.get('titlebar')) {
                         if (!this._dragHandle) {
                             this._dragHandle = document.createElement('SPAN');
@@ -749,8 +1047,6 @@
             if (!this._buttonList) {
                 this._buttonList = [];
             }
-            //Add to .get('buttons') manually
-            this._configs.buttons.value[this._configs.buttons.value.length] = oButton;
             if (!oButton.container) {
                 oButton.container = this.get('cont');
             }
@@ -776,7 +1072,7 @@
                     }
                 }
             }
-            var _oButton = {};
+            var _oButton = {}, skip = false;
             for (var o in oButton) {
                 if (Lang.hasOwnProperty(oButton, o)) {
                     if (!this._toolbarConfigs[o]) {
@@ -791,10 +1087,14 @@
                 _oButton.type = 'push';
             }
             if (_oButton.type == 'color') {
-                _oButton = this._makeColorButton(_oButton);
+                if (YAHOO.widget.Overlay) {
+                    _oButton = this._makeColorButton(_oButton);
+                } else {
+                    skip = true;
+                }
             }
             if (_oButton.menu) {
-                if (oButton.menu instanceof YAHOO.widget.Overlay) {
+                if ((YAHOO.widget.Overlay) && (oButton.menu instanceof YAHOO.widget.Overlay)) {
                     oButton.menu.showEvent.subscribe(function() {
                         this._button = _oButton;
                     });
@@ -809,149 +1109,198 @@
                     }
                 }
             }
-            var tmp = new YAHOO.widget.Button(_oButton);
-            if (this.get('disabled')) {
-                //Toolbar is disabled, disable the new button too!
-                tmp.set('disabled', true);
-            }
-            if (!oButton.id) {
-                oButton.id = tmp.get('id');
-            }
-            
-            if (after) {
-                var el = tmp.get('element');
-                var nextSib = null;
-                if (after.get) {
-                    nextSib = after.get('element').nextSibling;
-                } else if (after.nextSibling) {
-                    nextSib = after.nextSibling;
+            if (skip) {
+                oButton = false;
+            } else {
+                //Add to .get('buttons') manually
+                this._configs.buttons.value[this._configs.buttons.value.length] = oButton;
+
+                var tmp = new this.buttonType(_oButton);
+                if (!tmp.buttonType) {
+                    tmp.buttonType = 'rich';
+                    tmp.checkValue = function(value) {
+                        var _menuItems = this.getMenu().getItems();
+                        if (_menuItems.length === 0) {
+                            this.getMenu()._onBeforeShow();
+                            _menuItems = this.getMenu().getItems();
+                        }
+                        for (var i = 0; i < _menuItems.length; i++) {
+                            _menuItems[i].cfg.setProperty('checked', false);
+                            if (_menuItems[i].value == value) {
+                                _menuItems[i].cfg.setProperty('checked', true);
+                            }
+                        }      
+                    };
                 }
-                if (nextSib) {
-                    nextSib.parentNode.insertBefore(el, nextSib);
+                
+                if (this.get('disabled')) {
+                    //Toolbar is disabled, disable the new button too!
+                    tmp.set('disabled', true);
                 }
-            }
-            tmp.addClass(this.CLASS_PREFIX + '-' + tmp.get('value'));
-            var icon = document.createElement('span');
-            icon.className = this.CLASS_PREFIX + '-icon';
-            tmp.get('element').insertBefore(icon, tmp.get('firstChild'));
-            //Replace the Button HTML Element with an a href
-            var a = document.createElement('a');
-            a.innerHTML = tmp._button.innerHTML;
-            a.href = '#';
-            Event.on(a, 'click', function(ev) {
-                Event.stopEvent(ev);
-            });
-            tmp._button.parentNode.replaceChild(a, tmp._button);
-            tmp._button = a;
+                if (!oButton.id) {
+                    oButton.id = tmp.get('id');
+                }
+                
+                if (after) {
+                    var el = tmp.get('element');
+                    var nextSib = null;
+                    if (after.get) {
+                        nextSib = after.get('element').nextSibling;
+                    } else if (after.nextSibling) {
+                        nextSib = after.nextSibling;
+                    }
+                    if (nextSib) {
+                        nextSib.parentNode.insertBefore(el, nextSib);
+                    }
+                }
+                tmp.addClass(this.CLASS_PREFIX + '-' + tmp.get('value'));
 
-            if (oButton.type == 'select') {
-                tmp.addClass(this.CLASS_PREFIX + '-select');
-            }
-            if (oButton.type == 'spin') {
-                if (!Lang.isArray(oButton.range)) {
-                    oButton.range = [ 10, 100 ];
+                var icon = document.createElement('span');
+                icon.className = this.CLASS_PREFIX + '-icon';
+                tmp.get('element').insertBefore(icon, tmp.get('firstChild'));
+                if (tmp._button.tagName.toLowerCase() == 'button') {
+                    tmp.get('element').setAttribute('unselectable', 'on');
+                    //Replace the Button HTML Element with an a href if it exists
+                    var a = document.createElement('a');
+                    a.innerHTML = tmp._button.innerHTML;
+                    a.href = '#';
+                    Event.on(a, 'click', function(ev) {
+                        Event.stopEvent(ev);
+                    });
+                    tmp._button.parentNode.replaceChild(a, tmp._button);
+                    tmp._button = a;
                 }
-                this._makeSpinButton(tmp, oButton);
-            }
 
-            tmp.get('element').setAttribute('title', tmp.get('label'));
-
-            if (oButton.type != 'spin') {
-                if (_oButton.menu instanceof YAHOO.widget.Overlay) {
-                    var showPicker = function(ev) {
-                        var exec = true;
-                        if (ev.keyCode && (ev.keyCode == 9)) {
-                            exec = false;
-                        }
-                        if (exec) {
-                            this._colorPicker._button = oButton.value;
-                            var menuEL = tmp.getMenu().element;
-                            if (menuEL.style.visibility == 'hidden') {
-                                tmp.getMenu().show();
-                            } else {
-                                tmp.getMenu().hide();
+                if (oButton.type == 'select') {
+                    if (tmp._button.tagName.toLowerCase() == 'select') {
+                        icon.parentNode.removeChild(icon);
+                        var iel = tmp._button;
+                        var parEl = tmp.get('element');
+                        parEl.parentNode.replaceChild(iel, parEl);
+                    } else {
+                        //Don't put a class on it if it's a real select element
+                        tmp.addClass(this.CLASS_PREFIX + '-select');
+                    }
+                }
+                if (oButton.type == 'spin') {
+                    if (!Lang.isArray(oButton.range)) {
+                        oButton.range = [ 10, 100 ];
+                    }
+                    this._makeSpinButton(tmp, oButton);
+                }
+                tmp.get('element').setAttribute('title', tmp.get('label'));
+                if (oButton.type != 'spin') {
+                    if ((YAHOO.widget.Overlay) && (_oButton.menu instanceof YAHOO.widget.Overlay)) {
+                        var showPicker = function(ev) {
+                            var exec = true;
+                            if (ev.keyCode && (ev.keyCode == 9)) {
+                                exec = false;
                             }
+                            if (exec) {
+                                this._colorPicker._button = oButton.value;
+                                var menuEL = tmp.getMenu().element;
+                                if (Dom.getStyle(menuEL, 'visibility') == 'hidden') {
+                                    tmp.getMenu().show();
+                                } else {
+                                    tmp.getMenu().hide();
+                                }
+                            }
+                            YAHOO.util.Event.stopEvent(ev);
+                        };
+                        tmp.on('mousedown', showPicker, oButton, this);
+                        tmp.on('keydown', showPicker, oButton, this);
+                        
+                    } else if ((oButton.type != 'menu') && (oButton.type != 'select')) {
+                        tmp.on('keypress', this._buttonClick, oButton, this);
+                        tmp.on('mousedown', function(ev) {
+                            YAHOO.util.Event.stopEvent(ev);
+                            this._buttonClick(ev, oButton);
+                        }, oButton, this);
+                        tmp.on('click', function(ev) {
+                            YAHOO.util.Event.stopEvent(ev);
+                        });
+                    } else {
+                        //Stop the mousedown event so we can trap the selection in the editor!
+                        tmp.on('mousedown', function(ev) {
+                            YAHOO.util.Event.stopEvent(ev);
+                        });
+                        tmp.on('click', function(ev) {
+                            YAHOO.util.Event.stopEvent(ev);
+                        });
+                        tmp.on('change', function(ev) {
+                            if (!oButton.menucmd) {
+                                oButton.menucmd = oButton.value;
+                            }
+                            oButton.value = ev.value;
+                            this._buttonClick(ev, oButton);
+                        }, this, true);
+                        var self = this;
+                        //Hijack the mousedown event in the menu and make it fire a button click..
+                        if (tmp.getMenu().mouseDownEvent) {
+                            tmp.getMenu().mouseDownEvent.subscribe(function(ev, args) {
+                                var oMenu = args[1];
+                                YAHOO.util.Event.stopEvent(args[0]);
+                                tmp._onMenuClick(args[0], tmp);
+                                if (!oButton.menucmd) {
+                                    oButton.menucmd = oButton.value;
+                                }
+                                oButton.value = ((oMenu.value) ? oMenu.value : oMenu._oText.nodeValue);
+                                self._buttonClick.call(self, args[1], oButton);
+                                tmp._hideMenu();
+                                return false;
+                            });
+                            tmp.getMenu().clickEvent.subscribe(function(ev, args) {
+                                YAHOO.util.Event.stopEvent(args[0]);
+                            });
+                            tmp.getMenu().mouseUpEvent.subscribe(function(ev, args) {
+                                YAHOO.util.Event.stopEvent(args[0]);
+                            });
                         }
-                        YAHOO.util.Event.stopEvent(ev);
-                    };
-                    tmp.on('mousedown', showPicker, oButton, this);
-                    tmp.on('keydown', showPicker, oButton, this);
-                    
-                } else if ((oButton.type != 'menu') && (oButton.type != 'select')) {
-                    tmp.on('keypress', this._buttonClick, oButton, this);
+                        
+                    }
+                } else {
+                    //Stop the mousedown event so we can trap the selection in the editor!
                     tmp.on('mousedown', function(ev) {
                         YAHOO.util.Event.stopEvent(ev);
-                        this._buttonClick(ev, oButton);
-                    }, oButton, this);
+                    });
                     tmp.on('click', function(ev) {
                         YAHOO.util.Event.stopEvent(ev);
                     });
-                } else {
-                    //Stop the mousedown event so we can trap the selection in the editor!
-                    tmp.on('mousedown', function(ev) {
+                }
+                if (this.browser.ie) {
+                    //Add a couple of new events for IE
+                    tmp.DOM_EVENTS.focusin = true;
+                    tmp.DOM_EVENTS.focusout = true;
+                    
+                    //Stop them so we don't loose focus in the Editor
+                    tmp.on('focusin', function(ev) {
                         YAHOO.util.Event.stopEvent(ev);
-                    });
+                    }, oButton, this);
+                    
+                    tmp.on('focusout', function(ev) {
+                        YAHOO.util.Event.stopEvent(ev);
+                    }, oButton, this);
                     tmp.on('click', function(ev) {
                         YAHOO.util.Event.stopEvent(ev);
-                    });
-                    var self = this;
-                    //Hijack the mousedown event in the menu and make it fire a button click..
-                    tmp.getMenu().mouseDownEvent.subscribe(function(ev, args) {
-                        var oMenu = args[1];
-                        YAHOO.util.Event.stopEvent(args[0]);
-                        tmp._onMenuClick(args[0], tmp);
-                        if (!oButton.menucmd) {
-                            oButton.menucmd = oButton.value;
+                    }, oButton, this);
+                }
+                if (this.browser.webkit) {
+                    //This will keep the document from gaining focus and the editor from loosing it..
+                    //Forcefully remove the focus calls in button!
+                    tmp.hasFocus = function() {
+                        return true;
+                    };
+                }
+                this._buttonList[this._buttonList.length] = tmp;
+                if ((oButton.type == 'menu') || (oButton.type == 'split') || (oButton.type == 'select')) {
+                    if (Lang.isArray(oButton.menu)) {
+                        var menu = tmp.getMenu();
+                        if (menu.renderEvent) {
+                            menu.renderEvent.subscribe(_addMenuClasses, tmp);
+                            if (oButton.renderer) {
+                                menu.renderEvent.subscribe(oButton.renderer, tmp);
+                            }
                         }
-                        oButton.value = ((oMenu.value) ? oMenu.value : oMenu._oText.nodeValue);
-                        self._buttonClick.call(self, args[1], oButton);
-                        tmp._hideMenu();
-                        return false;
-                    });
-                    tmp.getMenu().clickEvent.subscribe(function(ev, args) {
-                        YAHOO.util.Event.stopEvent(args[0]);
-                    });
-                }
-            } else {
-                //Stop the mousedown event so we can trap the selection in the editor!
-                tmp.on('mousedown', function(ev) {
-                    YAHOO.util.Event.stopEvent(ev);
-                });
-                tmp.on('click', function(ev) {
-                    YAHOO.util.Event.stopEvent(ev);
-                });
-            }
-            if (this.browser.ie) {
-                //Add a couple of new events for IE
-                tmp.DOM_EVENTS.focusin = true;
-                tmp.DOM_EVENTS.focusout = true;
-                
-                //Stop them so we don't loose focus in the Editor
-                tmp.on('focusin', function(ev) {
-                    YAHOO.util.Event.stopEvent(ev);
-                }, oButton, this);
-                
-                tmp.on('focusout', function(ev) {
-                    YAHOO.util.Event.stopEvent(ev);
-                }, oButton, this);
-                tmp.on('click', function(ev) {
-                    YAHOO.util.Event.stopEvent(ev);
-                }, oButton, this);
-            }
-            if (this.browser.webkit) {
-                //This will keep the document from gaining focus and the editor from loosing it..
-                //Forcefully remove the focus calls in button!
-                tmp.hasFocus = function() {
-                    return true;
-                };
-            }
-            this._buttonList[this._buttonList.length] = tmp;
-            if ((oButton.type == 'menu') || (oButton.type == 'split') || (oButton.type == 'select')) {
-                if (Lang.isArray(oButton.menu)) {
-                    var menu = tmp.getMenu();
-                    menu.renderEvent.subscribe(_addMenuClasses, tmp);
-                    if (oButton.renderer) {
-                        menu.renderEvent.subscribe(oButton.renderer, tmp);
                     }
                 }
             }
@@ -1073,16 +1422,18 @@
         * @method _makeColorButton
         * @private
         * @description Called to turn a "color" button into a menu button with an Overlay for the menu.
-        * @param {Object} _oButton <a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a> reference
+        * @param {Object} _oButton <a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a> reference
         */
         _makeColorButton: function(_oButton) {
             if (!this._colorPicker) {   
                 this._createColorPicker(this.get('id'));
             }
             _oButton.type = 'color';
-            _oButton.menu = new YAHOO.widget.Overlay(this.get('id') + '_' + _oButton.value + '_menu', { visbile: false, position: 'absolute' });
+            _oButton.menu = new YAHOO.widget.Overlay(this.get('id') + '_' + _oButton.value + '_menu', { visible: false, position: 'absolute', iframe: true });
             _oButton.menu.setBody('');
             _oButton.menu.render(this.get('cont'));
+            Dom.addClass(_oButton.menu.element, 'yui-button-menu');
+            Dom.addClass(_oButton.menu.element, 'yui-color-button-menu');
             _oButton.menu.beforeShowEvent.subscribe(function() {
                 _oButton.menu.cfg.setProperty('zindex', 5); //Re Adjust the overlays zIndex.. not sure why.
                 _oButton.menu.cfg.setProperty('context', [this.getButtonById(_oButton.id).get('element'), 'tl', 'bl']); //Re Adjust the overlay.. not sure why.
@@ -1090,9 +1441,7 @@
                 this._resetColorPicker();
                 var _p = this._colorPicker;
                 if (_p.parentNode) {
-                    //if (_p.parentNode != _oButton.menu.body) {
-                        _p.parentNode.removeChild(_p);
-                    //}
+                    _p.parentNode.removeChild(_p);
                 }
                 _oButton.menu.setBody('');
                 _oButton.menu.appendToBody(_p);
@@ -1104,7 +1453,7 @@
         * @private
         * @method _makeSpinButton
         * @description Create a button similar to an OS Spin button.. It has an up/down arrow combo to scroll through a range of int values.
-        * @param {Object} _button <a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a> reference
+        * @param {Object} _button <a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a> reference
         * @param {Object} oButton Object literal containing the buttons initial config
         */
         _makeSpinButton: function(_button, oButton) {
@@ -1247,20 +1596,22 @@
 
                 if (info.type == 'select') {
                     var button = this.getButtonById(info.id);
-                    var txt = info.value;
-                    for (var i = 0; i < info.menu.length; i++) {
-                        if (info.menu[i].value == info.value) {
-                            txt = info.menu[i].text;
-                            break;
+                    if (button.buttonType == 'rich') {
+                        var txt = info.value;
+                        for (var i = 0; i < info.menu.length; i++) {
+                            if (info.menu[i].value == info.value) {
+                                txt = info.menu[i].text;
+                                break;
+                            }
                         }
-                    }
-                    button.set('label', '<span class="yui-toolbar-' + info.menucmd + '-' + (info.value).replace(/ /g, '-').toLowerCase() + '">' + txt + '</span>');
-                    var _items = button.getMenu().getItems();
-                    for (var m = 0; m < _items.length; m++) {
-                        if (_items[m].value.toLowerCase() == info.value.toLowerCase()) {
-                            _items[m].cfg.setProperty('checked', true);
-                        } else {
-                            _items[m].cfg.setProperty('checked', false);
+                        button.set('label', '<span class="yui-toolbar-' + info.menucmd + '-' + (info.value).replace(/ /g, '-').toLowerCase() + '">' + txt + '</span>');
+                        var _items = button.getMenu().getItems();
+                        for (var m = 0; m < _items.length; m++) {
+                            if (_items[m].value.toLowerCase() == info.value.toLowerCase()) {
+                                _items[m].cfg.setProperty('checked', true);
+                            } else {
+                                _items[m].cfg.setProperty('checked', false);
+                            }
                         }
                     }
                 }
@@ -1273,7 +1624,7 @@
         * @method getButtonById
         * @description Gets a button instance from the toolbar by is Dom id.
         * @param {String} id The Dom id to query for.
-        * @return {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}
+        * @return {<a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a>}
         */
         getButtonById: function(id) {
             var len = this._buttonList.length;
@@ -1288,7 +1639,7 @@
         * @method getButtonByValue
         * @description Gets a button instance or a menuitem instance from the toolbar by it's value.
         * @param {String} value The button value to query for.
-        * @return {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a> or <a href="YAHOO.widget.MenuItem.html">YAHOO.widget.MenuItem</a>}
+        * @return {<a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a> or <a href="YAHOO.widget.MenuItem.html">YAHOO.widget.MenuItem</a>}
         */
         getButtonByValue: function(value) {
             var _buttons = this.get('buttons');
@@ -1326,7 +1677,7 @@
         * @method getButtonByIndex
         * @description Gets a button instance from the toolbar by is index in _buttonList.
         * @param {Number} index The index of the button in _buttonList.
-        * @return {<a href="YAHOO.widget.Button.html">YAHOO.widget.Button</a>}
+        * @return {<a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a>}
         */
         getButtonByIndex: function(index) {
             if (this._buttonList[index]) {
@@ -1357,10 +1708,10 @@
             if (Lang.isNumber(id)) {
                 button = this.getButtonByIndex(id);
             }
-            if (!(button instanceof YAHOO.widget.Button)) {
+            if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
                 button = this.getButtonByValue(id);
             }
-            if (button instanceof YAHOO.widget.Button) {
+            if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
                 button.set('disabled', true);
             } else {
                 return false;
@@ -1383,10 +1734,10 @@
             if (Lang.isNumber(id)) {
                 button = this.getButtonByIndex(id);
             }
-            if (!(button instanceof YAHOO.widget.Button)) {
+            if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
                 button = this.getButtonByValue(id);
             }
-            if (button instanceof YAHOO.widget.Button) {
+            if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
                 if (button.get('disabled')) {
                     button.set('disabled', false);
                 }
@@ -1409,20 +1760,22 @@
                 if (Lang.isNumber(id)) {
                     button = this.getButtonByIndex(id);
                 }
-                if (!(button instanceof YAHOO.widget.Button)) {
+                if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
                     button = this.getButtonByValue(id);
                 }
-                if (button instanceof YAHOO.widget.Button) {
+                if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
                     button.addClass('yui-button-selected');
                     button.addClass('yui-button-' + button.get('value') + '-selected');
                     if (value) {
-                        var _items = button.getMenu().getItems();
-                        for (var m = 0; m < _items.length; m++) {
-                            if (_items[m].value == value) {
-                                _items[m].cfg.setProperty('checked', true);
-                                button.set('label', '<span class="yui-toolbar-' + button.get('value') + '-' + (value).replace(/ /g, '-').toLowerCase() + '">' + _items[m]._oText.nodeValue + '</span>');
-                            } else {
-                                _items[m].cfg.setProperty('checked', false);
+                        if (button.buttonType == 'rich') {
+                            var _items = button.getMenu().getItems();
+                            for (var m = 0; m < _items.length; m++) {
+                                if (_items[m].value == value) {
+                                    _items[m].cfg.setProperty('checked', true);
+                                    button.set('label', '<span class="yui-toolbar-' + button.get('value') + '-' + (value).replace(/ /g, '-').toLowerCase() + '">' + _items[m]._oText.nodeValue + '</span>');
+                                } else {
+                                    _items[m].cfg.setProperty('checked', false);
+                                }
                             }
                         }
                     }
@@ -1445,10 +1798,10 @@
             if (Lang.isNumber(id)) {
                 button = this.getButtonByIndex(id);
             }
-            if (!(button instanceof YAHOO.widget.Button)) {
+            if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
                 button = this.getButtonByValue(id);
             }
-            if (button instanceof YAHOO.widget.Button) {
+            if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
                 button.removeClass('yui-button-selected');
                 button.removeClass('yui-button-' + button.get('value') + '-selected');
                 button.removeClass('yui-button-hover');
@@ -1539,10 +1892,10 @@
             if (Lang.isNumber(id)) {
                 button = this.getButtonByIndex(id);
             }
-            if (!(button instanceof YAHOO.widget.Button)) {
+            if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
                 button = this.getButtonByValue(id);
             }
-            if (button instanceof YAHOO.widget.Button) {
+            if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
                 var thisID = button.get('id');
                 button.destroy();
 
@@ -1635,17 +1988,11 @@
 * @type YAHOO.util.CustomEvent
 */
 })();
-/*
-Copyright (c) 2007, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-*/
 /**
- * @module editor
  * @description <p>The Rich Text Editor is a UI control that replaces a standard HTML textarea; it allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like bold and italic text, and drag-and-drop inclusion and sizing of images. The Rich Text Editor's toolbar is extensible via a plugin architecture so that advanced implementations can achieve a high degree of customization.</p>
  * @namespace YAHOO.widget
- * @requires yahoo, dom, element, event, toolbar, container, menu, button
- * @optional dragdrop, animation
+ * @requires yahoo, dom, element, event, toolbar
+ * @optional animation, container_core
  * @beta
  */
 
@@ -1658,13 +2005,13 @@
     /**
      * The Rich Text Editor is a UI control that replaces a standard HTML textarea; it allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like bold and italic text, and drag-and-drop inclusion and sizing of images. The Rich Text Editor's toolbar is extensible via a plugin architecture so that advanced implementations can achieve a high degree of customization.
      * @constructor
-     * @class Editor
+     * @class SimpleEditor
      * @extends YAHOO.util.Element
      * @param {String/HTMLElement} el The textarea element to turn into an editor.
      * @param {Object} attrs Object liternal containing configuration parameters.
     */
     
-    YAHOO.widget.Editor = function(el, attrs) {
+    YAHOO.widget.SimpleEditor = function(el, attrs) {
 
         var oConfig = {
             element: null,
@@ -1691,16 +2038,16 @@
             oConfig.attributes.toolbar_cont.id = id + '_toolbar';
             div.appendChild(oConfig.attributes.toolbar_cont);
         }
-        
         var editorWrapper = document.createElement('DIV');
         div.appendChild(editorWrapper);
         oConfig.attributes.editor_wrapper = editorWrapper;
 
-        YAHOO.widget.Editor.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
+        YAHOO.widget.SimpleEditor.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
     };
 
     /**
-    * @private _cleanClassName
+    * @private
+    * @method _cleanClassName
     * @description Makes a useable classname from dynamic data, by dropping it to lowercase and replacing spaces with -'s.
     * @param {String} str The classname to clean up
     * @returns {String}
@@ -1710,8 +2057,83 @@
     }
 
 
-    YAHOO.extend(YAHOO.widget.Editor, YAHOO.util.Element, {
+    YAHOO.extend(YAHOO.widget.SimpleEditor, YAHOO.util.Element, {
         /**
+        * @property _docType
+        * @description The DOCTYPE to use in the editable container.
+        * @type String
+        */
+        _docType: '<!DOCTYPE HTML PUBLIC "-/'+'/W3C/'+'/DTD HTML 4.01/'+'/EN" "http:/'+'/www.w3.org/TR/html4/strict.dtd">',
+        /**
+        * @property editorDirty
+        * @description This flag will be set when certain things in the Editor happen. It is to be used by the developer to check to see if content has changed.
+        * @type Boolean
+        */
+        editorDirty: false,
+        /**
+        * @property _defaultCSS
+        * @description The default CSS used in the config for 'css'. This way you can add to the config like this: { css: YAHOO.widget.SimpleEditor.prototype._defaultCSS + 'ADD MYY CSS HERE' }
+        * @type String
+        */
+        _defaultCSS: 'html { height: 95%; } body { height: 100%; padding: 7px; background-color: #fff; font:13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small; } a { color: blue; text-decoration: underline; cursor: pointer; } .warning-localfile { border-bottom: 1px dashed red !important; } .yui-busy { cursor: wait !important; } img.selected { border: 2px dotted #808080; } img { cursor: pointer !important; border: none; }',
+        /**
+        * @property _defaultToolbar
+        * @private
+        * @description Default toolbar config.
+        * @type Object
+        */
+        _defaultToolbar: {
+            collapse: true,
+            titlebar: 'Text Editing Tools',
+            draggable: false,
+            buttons: [
+                { group: 'fontstyle', label: 'Font Name and Size',
+                    buttons: [
+                        { type: 'select', label: 'Arial', value: 'fontname', disabled: true,
+                            menu: [
+                                { text: 'Arial', checked: true },
+                                { text: 'Arial Black' },
+                                { text: 'Comic Sans MS' },
+                                { text: 'Courier New' },
+                                { text: 'Lucida Console' },
+                                { text: 'Tahoma' },
+                                { text: 'Times New Roman' },
+                                { text: 'Trebuchet MS' },
+                                { text: 'Verdana' }
+                            ]
+                        },
+                        { type: 'spin', label: '13', value: 'fontsize', range: [ 9, 75 ], disabled: true }
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'textstyle', label: 'Font Style',
+                    buttons: [
+                        { type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' },
+                        { type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' },
+                        { type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' },
+                        { type: 'separator' },
+                        { type: 'color', label: 'Font Color', value: 'forecolor', disabled: true },
+                        { type: 'color', label: 'Background Color', value: 'backcolor', disabled: true }
+                        
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'indentlist', label: 'Lists',
+                    buttons: [
+                        { type: 'push', label: 'Create an Unordered List', value: 'insertunorderedlist' },
+                        { type: 'push', label: 'Create an Ordered List', value: 'insertorderedlist' }
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'insertitem', label: 'Insert Item',
+                    buttons: [
+                        { type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true },
+                        { type: 'push', label: 'Insert Image', value: 'insertimage' }
+                    ]
+                }
+            ]
+        },
+        /**
         * @property _lastButton
         * @private
         * @description The last button pressed, so we don't disable it.
@@ -1860,7 +2282,7 @@
         afterElement: null,
         /**
         * @property invalidHTML
-        * @description Contains a list of HTML elements that are invalid inside the editor. They will be removed when they are found.
+        * @description Contains a list of HTML elements that are invalid inside the editor. They will be removed when they are found. If you set the value of a key to "{ keepContents: true }", then the element will be replaced with a yui-non span to be filtered out when cleanHTML is called. The only tag that is ignored here is the span tag as it will force the Editor into a loop and freeze the browser. However.. all of these tags will be removed in the cleanHTML routine.
         * @type Object
         */
         invalidHTML: {
@@ -1900,21 +2322,21 @@
         * @description The Toolbar items that should be disabled if there is no selection present in the editor.
         * @type Array
         */
-        _disabled: [ 'createlink', 'forecolor', 'backcolor', 'fontname', 'fontsize', 'superscript', 'subscript', 'removeformat', 'heading', 'indent' ],
+        _disabled: [ 'createlink', 'fontname', 'fontsize', 'forecolor', 'backcolor' ],
         /**
         * @private
         * @property _alwaysDisabled
         * @description The Toolbar items that should ALWAYS be disabled event if there is a selection present in the editor.
         * @type Object
         */
-        _alwaysDisabled: { 'outdent': true },
+        _alwaysDisabled: { },
         /**
         * @private
         * @property _alwaysEnabled
         * @description The Toolbar items that should ALWAYS be enabled event if there isn't a selection present in the editor.
         * @type Object
         */
-        _alwaysEnabled: { hiddenelements: true },
+        _alwaysEnabled: { },
         /**
         * @private
         * @property _semantic
@@ -1968,11 +2390,13 @@
             }
             var isrc = 'javascript:;';
             if (this.browser.ie) {
-                isrc = 'about:blank';
+                if (window.location.href.toLowerCase().indexOf("https") !== 0) {
+                    isrc = 'about:blank';
+                }
             }
             ifrmDom.setAttribute('src', isrc);
             var ifrm = new YAHOO.util.Element(ifrmDom);
-            ifrm.setStyle('zIndex', '-1');
+            //ifrm.setStyle('zIndex', '-1');
             return ifrm;
         },
         /**
@@ -1992,6 +2416,30 @@
             return false;
         },
         /**
+        * @private _hasParent
+        * @description Checks to see if an Element reference or one of it's parents is a valid one and has a certain tag type
+        * @param {HTMLElement} el The element to check
+        * @param {String} tag The tag that the element needs to be
+        * @returns HTMLElement
+        */
+        _hasParent: function(el, tag) {
+            if (!el || !el.parentNode) {
+                return false;
+            }
+            
+            while (el.parentNode) {
+                if (this._isElement(el, tag)) {
+                    return el;
+                }
+                if (el.parentNode) {
+                    el = el.parentNode;
+                } else {
+                    return false;
+                }
+            }
+            return false;
+        },
+        /**
         * @private
         * @method _getDoc
         * @description Get the Document of the IFRAME
@@ -2142,12 +2590,19 @@
 
             if (this.browser.ie) {
                 try { //IE freaks out here sometimes..
-                    range = this.getDoc().body.createTextRange();
+                    range = this._getDoc().body.createTextRange();
                     range.moveToElementText(node);
                     range.select();
-                } catch (e) {}
+                } catch (e) {
+                }
             } else if (this.browser.webkit) {
 				sel.setBaseAndExtent(node, 0, node, node.innerText.length);
+            } else if (this.browser.opera) {
+                sel = this._getWindow().getSelection();
+                range = this._getDoc().createRange();
+                range.selectNode(node);
+                sel.removeAllRanges();
+                sel.addRange(range);
             } else {
                 range = this._getDoc().createRange();
                 range.selectNodeContents(node);
@@ -2206,7 +2661,7 @@
         * @returns {String} The state that it was set to.
         */
         _toggleDesignMode: function() {
-            var _dMode = this._getDoc().designMode,
+            var _dMode = this._getDoc().designMode.toLowerCase(),
                 _state = 'on';
             if (_dMode == 'on') {
                 _state = 'off';
@@ -2223,7 +2678,9 @@
             if (this.browser.ie) {
                 this._getDoc().body.style.margin = '0';
             }
-            this._setDesignMode('on');
+            if (!this.get('disabled')) {
+                this._setDesignMode('on');
+            }
             
             this.toolbar.on('buttonClick', this._handleToolbarClick, this, true);
             //Setup Listeners on iFrame
@@ -2234,7 +2691,9 @@
             Event.on(this._getDoc(), 'keypress', this._handleKeyPress, this, true);
             Event.on(this._getDoc(), 'keyup', this._handleKeyUp, this, true);
             Event.on(this._getDoc(), 'keydown', this._handleKeyDown, this, true);
-            this.toolbar.set('disabled', false);
+            if (!this.get('disabled')) {
+                this.toolbar.set('disabled', false);
+            }
             this.fireEvent('editorContentLoaded', { type: 'editorLoaded', target: this });
             if (this.get('dompath')) {
                 var self = this;
@@ -2285,12 +2744,19 @@
         _setInitialContent: function() {
             var html = Lang.substitute(this.get('html'), {
                 TITLE: this.STR_TITLE,
-                CONTENT: this.get('element').value,
+                CONTENT: this._cleanIncomingHTML(this.get('element').value),
                 CSS: this.get('css'),
-                HIDDEN_CSS: this.get('hiddencss')
+                HIDDEN_CSS: ((this.get('hiddencss')) ? this.get('hiddencss') : '/* No Hidden CSS */'),
+                EXTRA_CSS: ((this.get('extracss')) ? this.get('extracss') : '/* No Extra CSS */')
             }),
             check = true;
-            if (this.browser.ie || this.browser.webkit || this.browser.opera) {
+            if (document.compatMode != 'BackCompat') {
+                html = this._docType + "\n" + html;
+            } else {
+            }
+
+            if (this.browser.ie || this.browser.webkit || this.browser.opera || (navigator.userAgent.indexOf('Firefox/1.5') != -1)) {
+                //Firefox 1.5 doesn't like setting designMode on an document created with a data url
                 try {
                     this._getDoc().open();
                     this._getDoc().write(html);
@@ -2300,7 +2766,7 @@
                     check = false;
                 }
             } else {
-                //This keeps Firefox from writing the iframe to history preserving the back buttons functionality
+                //This keeps Firefox 2 from writing the iframe to history preserving the back buttons functionality
                 this.get('iframe').get('element').src = 'data:text/html;charset=utf-8,' + encodeURIComponent(html);
             }
             if (check) {
@@ -2372,7 +2838,7 @@
                 if (!sel || !range) {
                     return null;
                 }
-                if (!this._hasSelection() && !this.browser.webkit) {
+                if (!this._hasSelection()) {
                     if (sel.anchorNode && (sel.anchorNode.nodeType == 3)) {
                         if (sel.anchorNode.parentNode) { //next check parentNode
                             elm = sel.anchorNode.parentNode;
@@ -2381,11 +2847,9 @@
                             elm = sel.anchorNode.nextSibling;
                         }
                     }
-                    
                     if (this._isElement(elm, 'br')) {
                         elm = null;
                     }
-                
                     if (!elm) {
                         elm = range.commonAncestorContainer;
                         if (!range.collapsed) {
@@ -2401,26 +2865,27 @@
                 }
             }
             if (this.currentEvent !== null) {
-                switch (this.currentEvent.type) {
-                    case 'click':
-                    case 'mousedown':
-                    case 'mouseup':
-                        elm = Event.getTarget(this.currentEvent);
-                        break;
-                    default:
-                        //Do nothing
-                        break;
+                try {
+                    switch (this.currentEvent.type) {
+                        case 'click':
+                        case 'mousedown':
+                        case 'mouseup':
+                            elm = Event.getTarget(this.currentEvent);
+                            break;
+                        default:
+                            //Do nothing
+                            break;
+                    }
+                } catch (e) {
                 }
             } else if (this.currentElement && this.currentElement[0]) {
                 elm = this.currentElement[0];
             }
-
             if (this.browser.opera || this.browser.webkit) {
                 if (this.currentEvent && !elm) {
                     elm = YAHOO.util.Event.getTarget(this.currentEvent);
                 }
             }
-
             if (!elm || !elm.tagName) {
                 elm = doc.body;
             }
@@ -2444,10 +2909,13 @@
         * @private
         * @method _getDomPath
         * @description This method will attempt to build the DOM path from the currently selected element.
+        * @param HTMLElement el The element to start with, if not provided _getSelectedElement is used
         * @returns {Array} An array of node references that will create the DOM Path.
         */
-        _getDomPath: function() {
-			var el = this._getSelectedElement();
+        _getDomPath: function(el) {
+            if (!el) {
+			    el = this._getSelectedElement();
+            }
 			var domPath = [];
             while (el !== null) {
                 if (el.ownerDocument != this._getDoc()) {
@@ -2508,8 +2976,8 @@
                     }
                     switch (tag) {
                         case 'a':
-                            if (path[i].getAttribute('href')) {
-                                pathStr += ':' + path[i].getAttribute('href').replace('mailto:', '').replace('http:/'+'/', '').replace('https:/'+'/', ''); //May need to add others here ftp
+                            if (path[i].getAttribute('href', 2)) {
+                                pathStr += ':' + path[i].getAttribute('href', 2).replace('mailto:', '').replace('http:/'+'/', '').replace('https:/'+'/', ''); //May need to add others here ftp
                             }
                             break;
                         case 'img':
@@ -2545,58 +3013,73 @@
         * @description Fix href and imgs as well as remove invalid HTML.
         */
         _fixNodes: function() {
+            var doc = this._getDoc(),
+                els = [];
+
             for (var v in this.invalidHTML) {
-                if (Lang.hasOwnProperty(this.invalidHTML, v)) {
-                    var tags = this._getDoc().body.getElementsByTagName(v);
-                    for (var h = 0; h < tags.length; h++) {
-                        if (tags[h].parentNode) {
-                            tags[h].parentNode.removeChild(tags[h]);
+                if (YAHOO.lang.hasOwnProperty(this.invalidHTML, v)) {
+                    if (v.toLowerCase() != 'span') {
+                        var tags = doc.body.getElementsByTagName(v);
+                        if (tags.length) {
+                            for (var i = 0; i < tags.length; i++) {
+                                els.push(tags[i]);
+                            }
                         }
                     }
                 }
             }
-            var imgs = this._getDoc().getElementsByTagName('img');
-            Dom.addClass(imgs, 'yui-img');
-            
-            var url = '';
-
-            for (var im = 0; im < imgs.length; im++) {
-                if (imgs[im].getAttribute('href', 2)) {
-                    url = imgs[im].getAttribute('src', 2);
-                    if (this._isLocalFile(url)) {
-                        Dom.addClass(imgs[im], this.CLASS_LOCAL_FILE);
+            for (var h = 0; h < els.length; h++) {
+                if (els[h].parentNode) {
+                    if (Lang.isObject(this.invalidHTML[els[h].tagName.toLowerCase()]) && this.invalidHTML[els[h].tagName.toLowerCase()].keepContents) {
+                        this._swapEl(els[h], 'span', function(el) {
+                            el.className = 'yui-non';
+                        });
                     } else {
-                        Dom.removeClass(imgs[im], this.CLASS_LOCAL_FILE);
+                        els[h].parentNode.removeChild(els[h]);
                     }
                 }
             }
-            var fakeAs = this._getDoc().body.getElementsByTagName('a');
-            for (var a = 0; a < fakeAs.length; a++) {
-                if (fakeAs[a].getAttribute('href', 2)) {
-                    url = fakeAs[a].getAttribute('href', 2);
-                    if (this._isLocalFile(url)) {
-                        Dom.addClass(fakeAs[a], this.CLASS_LOCAL_FILE);
-                    } else {
-                        Dom.removeClass(fakeAs[a], this.CLASS_LOCAL_FILE);
-                    }
-                }
-            }
+            var imgs = this._getDoc().getElementsByTagName('img');
+            Dom.addClass(imgs, 'yui-img');   
         },
         /**
         * @private
-        * @method _showHidden
-        * @description Toggle on/off the hidden.css file.
+        * @method _isNonEditable
+        * @param Event ev The Dom event being checked
+        * @description Method is called at the beginning of all event handlers to check if this element or a parent element has the class yui-noedit (this.CLASS_NOEDIT) applied.
+        * If it does, then this method will stop the event and return true. The event handlers will then return false and stop the nodeChange from occuring. This method will also
+        * disable and enable the Editor's toolbar based on the noedit state.
+        * @returns Boolean
         */
-        _showHidden: function() {
-            if (this._showingHiddenElements) {
-                this._showingHiddenElements = false;
-                this.toolbar.deselectButton('hiddenelements');
-                Dom.removeClass(this._getDoc().body, this.CLASS_HIDDEN);
-            } else {
-                this._showingHiddenElements = true;
-                Dom.addClass(this._getDoc().body, this.CLASS_HIDDEN);
-                this.toolbar.selectButton('hiddenelements');
+        _isNonEditable: function(ev) {
+            if (this.get('allowNoEdit')) {
+                var el = Event.getTarget(ev);
+                if (this._isElement(el, 'html')) {
+                    el = null;
+                }
+                var path = this._getDomPath(el);
+                for (var i = (path.length - 1); i > -1; i--) {
+                    if (Dom.hasClass(path[i], this.CLASS_NOEDIT)) {
+                        //if (this.toolbar.get('disabled') === false) {
+                        //    this.toolbar.set('disabled', true);
+                        //}
+                        try {
+                             this._getDoc().execCommand('enableObjectResizing', false, 'false');
+                        } catch (e) {}
+                        this.nodeChange();
+                        Event.stopEvent(ev);
+                        return true;
+                    }
+                }
+                //if (this.toolbar.get('disabled') === true) {
+                    //Should only happen once..
+                    //this.toolbar.set('disabled', false);
+                    try {
+                         this._getDoc().execCommand('enableObjectResizing', false, 'true');
+                    } catch (e) {}
+                //}
             }
+            return false;
         },
         /**
         * @private
@@ -2614,6 +3097,9 @@
         * @description Handles all click events inside the iFrame document.
         */
         _handleClick: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
             this._setCurrentEvent(ev);
             if (this.currentWindow) {
                 this.closeWindow();
@@ -2638,7 +3124,12 @@
         * @description Handles all mouseup events inside the iFrame document.
         */
         _handleMouseUp: function(ev) {
-            this._setCurrentEvent(ev);
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            //Don't set current event for mouseup.
+            //It get's fired after a menu is closed and gives up a bogus event to work with
+            //this._setCurrentEvent(ev);
             var self = this;
             if (this.browser.opera) {
                 /**
@@ -2676,6 +3167,9 @@
         * @description Handles all mousedown events inside the iFrame document.
         */
         _handleMouseDown: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
             this._setCurrentEvent(ev);
             var sel = Event.getTarget(ev);
             if (this.browser.webkit && this._hasSelection()) {
@@ -2709,18 +3203,22 @@
         * @description Handles all doubleclick events inside the iFrame document.
         */
         _handleDoubleClick: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
             this._setCurrentEvent(ev);
             var sel = Event.getTarget(ev);
             if (this._isElement(sel, 'img')) {
                 this.currentElement[0] = sel;
                 this.toolbar.fireEvent('insertimageClick', { type: 'insertimageClick', target: this.toolbar });
                 this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
-            } else if (this._isElement(sel, 'a')) {
-                this.currentElement[0] = sel;
+            } else if (this._hasParent(sel, 'a')) { //Handle elements inside an a
+                this.currentElement[0] = this._hasParent(sel, 'a');
                 this.toolbar.fireEvent('createlinkClick', { type: 'createlinkClick', target: this.toolbar });
                 this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
             }
             this.nodeChange();
+            this.editorDirty = false;
             this.fireEvent('editorDoubleClick', { type: 'editorDoubleClick', target: this, ev: ev });
         },
         /**
@@ -2730,6 +3228,9 @@
         * @description Handles all keyup events inside the iFrame document.
         */
         _handleKeyUp: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
             this._setCurrentEvent(ev);
             switch (ev.keyCode) {
                 case 37: //Left Arrow
@@ -2754,6 +3255,7 @@
                         } else {
                             this.nodeChange();
                         }
+                        this.editorDirty = true;
                     }
                     break;
             }
@@ -2766,16 +3268,174 @@
         * @description Handles all keypress events inside the iFrame document.
         */
         _handleKeyPress: function(ev) {
+            if (this.get('allowNoEdit')) {
+                if (ev && ev.keyCode && ((ev.keyCode == 46) || ev.keyCode == 63272)) {
+                    //Forward delete key
+                    Event.stopEvent(ev);
+                }
+            }
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
             this._setCurrentEvent(ev);
+            if (this.browser.webkit) {
+                if (!this.browser.webkit3) {
+                    if (ev.keyCode && (ev.keyCode == 122) && (ev.metaKey)) {
+                        //This is CMD + z (for undo)
+                        if (this._hasParent(this._getSelectedElement(), 'li')) {
+                            Event.stopEvent(ev);
+                        }
+                    }
+                }
+                /* This was removed because it crashes Safari 2.x in some cases
+                if (ev.keyCode && (ev.keyCode == 8)) {
+                    //Delete Key
+                    if (this._isElement(this._getSelectedElement(), 'br')) {
+                        var el = this._getSelectedElement();
+                        el.parentNode.removeChild(el);
+                    }
+                }
+                */
+                this._listFix(ev);
+            }
             this.fireEvent('editorKeyPress', { type: 'editorKeyPress', target: this, ev: ev });
         },
         /**
         * @private
+        * @method _listFix
+        * @param {Event} ev The event we are working on.
+        * @description Handles the Enter key, Tab Key and Shift + Tab keys for List Items.
+        */
+        _listFix: function(ev) {
+            var testLi = null, par = null, preContent = false, range = null;
+            //Enter Key
+            if (this.browser.webkit) {
+                if (ev.keyCode && (ev.keyCode == 13)) {
+                    if (this._hasParent(this._getSelectedElement(), 'li')) {
+                        var tar = this._hasParent(this._getSelectedElement(), 'li');
+                        var li = this._getDoc().createElement('li');
+                        li.innerHTML = '<span class="yui-non"> </span> ';
+                        if (tar.nextSibling) {
+                            tar.parentNode.insertBefore(li, tar.nextSibling);
+                        } else {
+                            tar.parentNode.appendChild(li);
+                        }
+                        this.currentElement[0] = li;
+                        this._selectNode(li.firstChild);
+                        if (!this.browser.webkit3) {
+                            tar.parentNode.style.display = 'list-item';
+                            setTimeout(function() {
+                                tar.parentNode.style.display = 'block';
+                            }, 1);
+                        }
+                        Event.stopEvent(ev);
+                    }
+                }
+            }
+            //Shift + Tab Key
+            if (ev.keyCode && ((!this.browser.webkit3 && (ev.keyCode == 25)) || ((this.browser.webkit3 || !this.browser.webkit) && ((ev.keyCode == 9) && ev.shiftKey)))) {
+                testLi = this._getSelectedElement();
+                if (this._hasParent(testLi, 'li')) {
+                    testLi = this._hasParent(testLi, 'li');
+                    if (this._hasParent(testLi, 'ul') || this._hasParent(testLi, 'ol')) {
+                        par = this._hasParent(testLi, 'ul');
+                        if (!par) {
+                            par = this._hasParent(testLi, 'ol');
+                        }
+                        if (this._isElement(par.previousSibling, 'li')) {
+                            par.removeChild(testLi);
+                            par.parentNode.insertBefore(testLi, par.nextSibling);
+                            if (this.browser.ie) {
+                                range = this._getDoc().body.createTextRange();
+                                range.moveToElementText(testLi);
+                                range.collapse(false);
+                                range.select();
+                            }
+                            if (this.browser.webkit) {
+                                if (!this.browser.webkit3) {
+                                    par.style.display = 'list-item';
+                                    par.parentNode.style.display = 'list-item';
+                                    setTimeout(function() {
+                                        par.style.display = 'block';
+                                        par.parentNode.style.display = 'block';
+                                    }, 1);
+                                }
+                            }
+                            Event.stopEvent(ev);
+                        }
+                    }
+                }
+            }
+            //Tab Key
+            if (ev.keyCode && ((ev.keyCode == 9) && (!ev.shiftKey))) {
+                var preLi = this._getSelectedElement();
+                if (this._hasParent(preLi, 'li')) {
+                    preContent = this._hasParent(preLi, 'li').innerHTML;
+                }
+                if (this.browser.webkit) {
+                    this._getDoc().execCommand('inserttext', false, '\t');
+                }
+                testLi = this._getSelectedElement();
+                if (this._hasParent(testLi, 'li')) {
+                    par = this._hasParent(testLi, 'li');
+                    var newUl = this._getDoc().createElement(par.parentNode.tagName.toLowerCase());
+                    if (this.browser.webkit) {
+                        var span = Dom.getElementsByClassName('Apple-tab-span', 'span', par);
+                        //Remove the span element that Safari puts in
+                        if (span[0]) {
+                            par.removeChild(span[0]);
+                            par.innerHTML = Lang.trim(par.innerHTML);
+                            //Put the HTML from the LI into this new LI
+                            if (preContent) {
+                                par.innerHTML = '<span class="yui-non">' + preContent + '</span> ';
+                            } else {
+                                par.innerHTML = '<span class="yui-non"> </span> ';
+                            }
+                        }
+                    } else {
+                        if (preContent) {
+                            par.innerHTML = preContent + ' ';
+                        } else {
+                            par.innerHTML = ' ';
+                        }
+                    }
+
+                    par.parentNode.replaceChild(newUl, par);
+                    newUl.appendChild(par);
+                    if (this.browser.webkit) {
+                        this._getSelection().setBaseAndExtent(par.firstChild, 1, par.firstChild, par.firstChild.innerText.length);
+                        if (!this.browser.webkit3) {
+                            par.parentNode.parentNode.style.display = 'list-item';
+                            setTimeout(function() {
+                                par.parentNode.parentNode.style.display = 'block';
+                            }, 1);
+                        }
+                    } else if (this.browser.ie) {
+                        range = this._getDoc().body.createTextRange();
+                        range.moveToElementText(par);
+                        range.collapse(false);
+                        range.select();
+                    } else {
+                        this._selectNode(par);
+                    }
+                    Event.stopEvent(ev);
+                }
+                if (this.browser.webkit) {
+                    Event.stopEvent(ev);
+                }
+                this.nodeChange();
+            }
+        },
+        /**
+        * @private
         * @method _handleKeyDown
         * @param {Event} ev The event we are working on.
         * @description Handles all keydown events inside the iFrame document.
         */
         _handleKeyDown: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
             this._setCurrentEvent(ev);
             if (this.currentWindow) {
                 this.closeWindow();
@@ -2805,22 +3465,21 @@
                         exec = false;
                     }
                     break;
-                case 219: //Left
-                    action = 'justifyleft';
-                    break;
-                case 220: //Center
-                    action = 'justifycenter';
-                    break;
-                case 221: //Right
-                    action = 'justifyright';
-                    break;
                 case 76: //L
                     if (this._hasSelection()) {
                         if (ev.shiftKey && ev.ctrlKey) {
-                            this.execCommand('createlink', '');
-                            this.toolbar.fireEvent('createlinkClick', { type: 'createlinkClick', target: this.toolbar });
-                            this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
-                            doExec = false;
+                            var makeLink = true;
+                            if (this.get('limitCommands')) {
+                                if (!this.toolbar.getButtonByValue('createlink')) {
+                                    makeLink = false;
+                                }
+                            }
+                            if (makeLink) {
+                                this.execCommand('createlink', '');
+                                this.toolbar.fireEvent('createlinkClick', { type: 'createlinkClick', target: this.toolbar });
+                                this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
+                                doExec = false;
+                            }
                         }
                     }
                     break;
@@ -2840,12 +3499,6 @@
                 case 85: //U
                     action = 'underline';
                     break;
-                case 9: //Tab Key
-                    if (this.browser.safari) {
-                        this._getDoc().execCommand('inserttext', false, '\t');
-                        Event.stopEvent(ev);
-                    }
-                    break;
                 case 13:
                     if (this.browser.ie) {
                         //Insert a <br> instead of a <p></p> in Internet Explorer
@@ -2861,6 +3514,10 @@
                         }
                     }
             }
+            //if (!this.browser.gecko && !this.browser.webkit) {
+            if (this.browser.ie) {
+                this._listFix(ev);
+            }
             if (doExec && action) {
                 this.execCommand(action, null);
                 Event.stopEvent(ev);
@@ -2879,6 +3536,7 @@
             if (force === true) {
                 this._lastNodeChange = 0;
             }
+            
             if ((this._lastNodeChange + threshold) < thisNodeChange) {
                 var self = this;
                 if (this._fixNodesTimer === null) {
@@ -2913,6 +3571,10 @@
                         fn_button = this.toolbar.getButtonByValue('fontname'),
                         fs_button = this.toolbar.getButtonByValue('fontsize');
 
+                    if (force !== true) {
+                        this.editorDirty = true;
+                    }
+
                     //Handle updating the toolbar with active buttons
                     var _ex = {};
                     if (this._lastButton) {
@@ -2956,7 +3618,7 @@
                         }
                     }
                     var path = this._getDomPath();
-                    var olType = null, tag = null, cmd = null;
+                    var tag = null, cmd = null;
                     for (var i = 0; i < path.length; i++) {
                         tag = path[i].tagName.toLowerCase();
                         if (path[i].getAttribute('tag')) {
@@ -3041,17 +3703,7 @@
                 tbar = this.toolbar;
             }
             var _button = tbar.getButtonByValue(button);
-            var _menuItems = _button.getMenu().getItems();
-            if (_menuItems.length === 0) {
-                _button.getMenu()._onBeforeShow();
-                _menuItems = _button.getMenu().getItems();
-            }
-            for (var i = 0; i < _menuItems.length; i++) {
-                _menuItems[i].cfg.setProperty('checked', false);
-                if (_menuItems[i].value == value) {
-                    _menuItems[i].cfg.setProperty('checked', true);
-                }
-            }
+            _button.checkValue(value);
         },
         /**
         * @private
@@ -3097,6 +3749,45 @@
             }
         },
         /**
+        * @private
+        * @method _disableEditor
+        * @param {Boolean} disabled Pass true to disable, false to enable
+        * @description Creates a mask to place over the Editor.
+        */
+        _disableEditor: function(disabled) {
+            if (disabled) {
+                if (!this._mask) {
+                    this._setDesignMode('off');
+                    if (this.toolbar) {
+                        this.toolbar.set('disabled', true);
+                    }
+                    this._mask = document.createElement('DIV');
+                    Dom.setStyle(this._mask, 'height', '100%');
+                    Dom.setStyle(this._mask, 'width', '100%');
+                    Dom.setStyle(this._mask, 'position', 'absolute');
+                    Dom.setStyle(this._mask, 'top', '0');
+                    Dom.setStyle(this._mask, 'left', '0');
+                    Dom.setStyle(this._mask, 'opacity', '.5');
+                    Dom.addClass(this._mask, 'yui-editor-masked');
+                    this.get('iframe').get('parentNode').appendChild(this._mask);
+                }
+            } else {
+                if (this._mask) {
+                    this._mask.parentNode.removeChild(this._mask);
+                    this._mask = null;
+                    if (this.toolbar) {
+                        this.toolbar.set('disabled', false);
+                    }
+                    this._setDesignMode('on');
+                    this._focusWindow();
+                    var self = this;
+                    window.setTimeout(function() {
+                        self.nodeChange.call(self);
+                    }, 100);
+                }
+            }
+        },
+        /**
         * @property EDITOR_PANEL_ID
         * @description HTML id to give the properties window in the DOM.
         * @type String
@@ -3119,20 +3810,8 @@
         * @description The accessibility string for the element before the iFrame
         * @type String
         */
-        STR_BEFORE_EDITOR: 'This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Control + Shift + T to place focus on the toolbar and navigate between option heading names. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift [ aligns text left</li> <li>Control Shift | centers text</li> <li>Control Shift ] aligns text right</li> <li>Control Shift L adds an HTML link</li> <li>To exit this text editor use the keyboard shortcut Control + Shift + ESC.</li></ul>',
+        STR_BEFORE_EDITOR: 'This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Control + Shift + T to place focus on the toolbar and navigate between option heading names. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift L adds an HTML link</li> <li>To exit this text editor use the keyboard shortcut Control + Shift + ESC.</li></ul>',
         /**
-        * @property STR_CLOSE_WINDOW
-        * @description The Title of the close button in the Editor Window
-        * @type String
-        */
-        STR_CLOSE_WINDOW: 'Close Window',
-        /**
-        * @property STR_CLOSE_WINDOW_NOTE
-        * @description A note appearing in the Editor Window to tell the user that the Escape key will close the window
-        * @type String
-        */
-        STR_CLOSE_WINDOW_NOTE: 'To close this window use the Control + Shift + W key',
-        /**
         * @property STR_TITLE
         * @description The Title of the HTML document that is created in the iFrame
         * @type String
@@ -3145,96 +3824,12 @@
         */
         STR_IMAGE_HERE: 'Image Url Here',
         /**
-        * @property STR_IMAGE_PROP_TITLE
-        * @description The title for the Image Property Editor Window
-        * @type String
-        */
-        STR_IMAGE_PROP_TITLE: 'Image Options',
-        /**
-        * @property STR_IMAGE_URL
-        * @description The label string for Image URL
-        * @type String
-        */
-        STR_IMAGE_URL: 'Image Url',
-        /**
-        * @property STR_IMAGE_TITLE
-        * @description The label string for Image Description
-        * @type String
-        */
-        STR_IMAGE_TITLE: 'Description',
-        /**
-        * @property STR_IMAGE_SIZE
-        * @description The label string for Image Size
-        * @type String
-        */
-        STR_IMAGE_SIZE: 'Size',
-        /**
-        * @property STR_IMAGE_ORIG_SIZE
-        * @description The label string for Original Image Size
-        * @type String
-        */
-        STR_IMAGE_ORIG_SIZE: 'Original Size',
-        /**
-        * @property STR_IMAGE_COPY
-        * @description The label string for the image copy and paste message for Opera and Safari
-        * @type String
-        */
-        STR_IMAGE_COPY: '<span class="tip"><span class="icon icon-info"></span><strong>Note:</strong>To move this image just highlight it, cut, and paste where ever you\'d like.</span>',
-        /**
-        * @property STR_IMAGE_PADDING
-        * @description The label string for the image padding.
-        * @type String
-        */
-        STR_IMAGE_PADDING: 'Padding',
-        /**
-        * @property STR_IMAGE_BORDER
-        * @description The label string for the image border.
-        * @type String
-        */
-        STR_IMAGE_BORDER: 'Border',
-        /**
-        * @property STR_IMAGE_TEXTFLOW
-        * @description The label string for the image text flow.
-        * @type String
-        */
-        STR_IMAGE_TEXTFLOW: 'Text Flow',
-        /**
-        * @property STR_LOCAL_FILE_WARNING
-        * @description The label string for the local file warning.
-        * @type String
-        */
-        STR_LOCAL_FILE_WARNING: '<span class="tip"><span class="icon icon-warn"></span><strong>Note:</strong>This image/link points to a file on your computer and will not be accessible to others on the internet.</span>',
-        /**
-        * @property STR_LINK_PROP_TITLE
-        * @description The label string for the Link Property Editor Window.
-        * @type String
-        */
-        STR_LINK_PROP_TITLE: 'Link Options',
-        /**
-        * @property STR_LINK_PROP_REMOVE
-        * @description The label string for the Remove link from text link inside the property editor.
-        * @type String
-        */
-        STR_LINK_PROP_REMOVE: 'Remove link from text',
-        /**
         * @property STR_LINK_URL
         * @description The label string for the Link URL.
         * @type String
         */
         STR_LINK_URL: 'Link URL',
         /**
-        * @property STR_LINK_NEW_WINDOW
-        * @description The string for the open in a new window label.
-        * @type String
-        */
-        STR_LINK_NEW_WINDOW: 'Open in a new window.',
-        /**
-        * @property STR_LINK_TITLE
-        * @description The string for the link description.
-        * @type String
-        */
-        STR_LINK_TITLE: 'Description',
-        /**
         * @protected
         * @property STOP_EXEC_COMMAND
         * @description Set to true when you want the default execCommand function to not process anything
@@ -3250,20 +3845,13 @@
         STOP_NODE_CHANGE: false,
         /**
         * @protected
-        * @property CLASS_HIDDEN
-        * @description CSS class applied to the body when the hiddenelements button is pressed.
+        * @property CLASS_NOEDIT
+        * @description CSS class applied to elements that are not editable.
         * @type String
         */
-        CLASS_HIDDEN: 'hidden',
+        CLASS_NOEDIT: 'yui-noedit',
         /**
         * @protected
-        * @property CLASS_LOCAL_FILE
-        * @description CSS class applied to an element when it's found to have a local url.
-        * @type String
-        */
-        CLASS_LOCAL_FILE: 'warning-localfile',
-        /**
-        * @protected
         * @property CLASS_CONTAINER
         * @description Default CSS class to apply to the editors container element
         * @type String
@@ -3310,13 +3898,14 @@
         * @description The Editor class' initialization method
         */
         init: function(p_oElement, p_oAttributes) {
-            YAHOO.widget.Editor.superclass.init.call(this, p_oElement, p_oAttributes);
+            YAHOO.widget.SimpleEditor.superclass.init.call(this, p_oElement, p_oAttributes);
             YAHOO.widget.EditorInfo._instances[this.get('id')] = this;
 
             this.on('contentReady', function() {
                 this.DOMReady = true;
                 this.fireQueue();
             }, this, true);
+
         },
         /**
         * @method initAttributes
@@ -3326,12 +3915,12 @@
         * configuration attributes used to create the editor.
         */
         initAttributes: function(attr) {
-            YAHOO.widget.Editor.superclass.initAttributes.call(this, attr);
+            YAHOO.widget.SimpleEditor.superclass.initAttributes.call(this, attr);
             var self = this;
 
             /**
             * @private
-            * @attribute iframe
+            * @config iframe
             * @description Internal config for holding the iframe element.
             * @default null
             * @type HTMLElement
@@ -3342,7 +3931,7 @@
             /**
             * @private
             * @depreciated
-            * @attribute textarea
+            * @config textarea
             * @description Internal config for holding the textarea element (replaced with element).
             * @default null
             * @type HTMLElement
@@ -3352,7 +3941,7 @@
                 writeOnce: true
             });
             /**
-            * @attribute nodeChangeThreshold
+            * @config nodeChangeThreshold
             * @description The number of seconds that need to be in between nodeChange processing
             * @default 3
             * @type Number
@@ -3362,7 +3951,28 @@
                 validator: YAHOO.lang.isNumber
             });
             /**
-            * @attribute element_cont
+            * @config allowNoEdit
+            * @description Should the editor check for non-edit fields. It should be noted that this technique is not perfect. If the user does the right things, they will still be able to make changes.
+            * Such as highlighting an element below and above the content and hitting a toolbar button or a shortcut key.
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('allowNoEdit', {
+                value: attr.allowNoEdit || false,
+                validator: YAHOO.lang.isBoolean
+            });
+            /**
+            * @config limitCommands
+            * @description Should the Editor limit the allowed execCommands to the ones available in the toolbar. If true, then execCommand and keyboard shortcuts will fail if they are not defined in the toolbar.
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('limitCommands', {
+                value: attr.limitCommands || false,
+                validator: YAHOO.lang.isBoolean
+            });
+            /**
+            * @config element_cont
             * @description Internal config for the editors container
             * @default false
             * @type HTMLElement
@@ -3372,7 +3982,7 @@
             });
             /**
             * @private
-            * @attribute editor_wrapper
+            * @config editor_wrapper
             * @description The outter wrapper for the entire editor.
             * @default null
             * @type HTMLElement
@@ -3432,33 +4042,14 @@
                         
             /**
             * @attribute blankimage
-            * @description The CSS used to show/hide hidden elements on the page
-            * @default 'assets/blankimage.png'
+            * @description The URL for the image placeholder to put in when inserting an image.
+            * @default The yahooapis.com address for the current release + 'assets/blankimage.png'
             * @type String
             */            
             this.setAttributeConfig('blankimage', {
                 value: attr.blankimage || this._getBlankImage()
             });
             /**
-            * @attribute hiddencss
-            * @description The CSS used to show/hide hidden elements on the page, these rules must be prefixed with the class provided in <code>this.CLASS_HIDDEN</code>
-            * @default <code><pre>
-            .hidden font, .hidden strong, .hidden b, .hidden em, .hidden i, .hidden u, .hidden div, .hidden p, .hidden span, .hidden img, .hidden ul, .hidden ol, .hidden li, .hidden table {
-                border: 1px dotted #ccc;
-            }
-            .hidden .yui-non {
-                border: none;
-            }
-            .hidden img {
-                padding: 2px;
-            }</pre></code>
-            * @type String
-            */            
-            this.setAttributeConfig('hiddencss', {
-                value: attr.hiddencss || '.hidden font, .hidden strong, .hidden b, .hidden em, .hidden i, .hidden u, .hidden div,.hidden p,.hidden span,.hidden img, .hidden ul, .hidden ol, .hidden li, .hidden table { border: 1px dotted #ccc; } .hidden .yui-non { border: none; } .hidden img { padding: 2px; }',
-                writeOnce: true
-            });
-            /**
             * @attribute css
             * @description The Base CSS used to format the content of the editor
             * @default <code><pre>html {
@@ -3490,18 +4081,17 @@
             * @type String
             */            
             this.setAttributeConfig('css', {
-                value: attr.css || 'html { height: 95%; } body { height: 100%; padding: 7px; background-color: #fff; font:13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small; } a { color: blue; text-decoration: underline; cursor: pointer; } .warning-localfile { border-bottom: 1px dashed red !important; } .yui-busy { cursor: wait !important; } img.selected { border: 2px dotted #808080; } img { cursor: pointer !important; border: none; }',
+                value: attr.css || this._defaultCSS,
                 writeOnce: true
             });
             /**
             * @attribute html
-            * @description The default HTML to be written to the iframe document before the contents are loaded
+            * @description The default HTML to be written to the iframe document before the contents are loaded (Note that the DOCTYPE attr will be added at render item)
             * @default This HTML requires a few things if you are to override:
-                <p><code>{TITLE}, {CSS}, {HIDDEN_CSS}</code> and <code>{CONTENT}</code> need to be there, they are passed to YAHOO.lang.substitute to be replace with other strings.<p>
+                <p><code>{TITLE}, {CSS}, {HIDDEN_CSS}, {EXTRA_CSS}</code> and <code>{CONTENT}</code> need to be there, they are passed to YAHOO.lang.substitute to be replace with other strings.<p>
                 <p><code>onload="document.body._rteLoaded = true;"</code> : the onload statement must be there or the editor will not finish loading.</p>
                 <code>
                 <pre>
-                <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
                 <html>
                     <head>
                         <title>{TITLE}</title>
@@ -3512,6 +4102,9 @@
                         <style>
                         {HIDDEN_CSS}
                         </style>
+                        <style>
+                        {EXTRA_CSS}
+                        </style>
                     </head>
                 <body onload="document.body._rteLoaded = true;">
                 {CONTENT}
@@ -3522,11 +4115,22 @@
             * @type String
             */            
             this.setAttributeConfig('html', {
-                value: attr.html || '<!DOCTYPE HTML PUBLIC "-/'+'/W3C/'+'/DTD HTML 4.01/'+'/EN" "http:/'+'/www.w3.org/TR/html4/strict.dtd"><html><head><title>{TITLE}</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><base href="' + this._baseHREF + '"><style>{CSS}</style><style>{HIDDEN_CSS}</style></head><body onload="document.body._rteLoaded = true;">{CONTENT}</body></html>',
+                value: attr.html || '<html><head><title>{TITLE}</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><base href="' + this._baseHREF + '"><style>{CSS}</style><style>{HIDDEN_CSS}</style><style>{EXTRA_CSS}</style></head><body onload="document.body._rteLoaded = true;">{CONTENT}</body></html>',
                 writeOnce: true
             });
 
             /**
+            * @attribute extracss
+            * @description Extra user defined css to load after the default SimpleEditor CSS
+            * @default ''
+            * @type String
+            */            
+            this.setAttributeConfig('extracss', {
+                value: attr.css || '',
+                writeOnce: true
+            });
+
+            /**
             * @attribute handleSubmit
             * @description Config handles if the editor will attach itself to the textareas parent form's submit handler.
             If it is set to true, the editor will attempt to attach a submit listener to the textareas parent form.
@@ -3565,33 +4169,13 @@
             this.setAttributeConfig('disabled', {
                 value: false,
                 method: function(disabled) {
-                    if (disabled) {
-                        if (!this._mask) {
-                            this._setDesignMode('off');
-                            this.toolbar.set('disabled', true);
-                            this._mask = document.createElement('DIV');
-                            Dom.setStyle(this._mask, 'height', '100%');
-                            Dom.setStyle(this._mask, 'width', '100%');
-                            Dom.setStyle(this._mask, 'position', 'absolute');
-                            Dom.setStyle(this._mask, 'top', '0');
-                            Dom.setStyle(this._mask, 'left', '0');
-                            Dom.setStyle(this._mask, 'opacity', '.5');
-                            Dom.addClass(this._mask, 'yui-editor-masked');
-                            this.get('iframe').get('parentNode').appendChild(this._mask);
-                        }
-                    } else {
-                        if (this._mask) {
-                            this._mask.parentNode.removeChild(this._mask);
-                            this._mask = null;
-                            this.toolbar.set('disabled', false);
-                            this._setDesignMode('on');
-                            this._focusWindow();
-                        }
+                    if (this._rendered) {
+                        this._disableEditor(disabled);
                     }
                 }
             });
             /**
-            * @attribute toolbar_cont
+            * @config toolbar_cont
             * @description Internal config for the toolbars container
             * @default false
             * @type Boolean
@@ -3603,97 +4187,16 @@
             /**
             * @attribute toolbar
             * @description The default toolbar config.
-            * @default This config is too large to display here, view the code to see it: <a href="editor.js.html"></a>
             * @type Object
             */            
             this.setAttributeConfig('toolbar', {
-                value: attr.toolbar || {
-                    /* {{{ Defaut Toolbar Config */
-                    collapse: true,
-                    titlebar: 'Text Editing Tools',
-                    draggable: false,
-                    buttons: [
-                        { group: 'fontstyle', label: 'Font Name and Size',
-                            buttons: [
-                                { type: 'select', label: 'Arial', value: 'fontname', disabled: true,
-                                    menu: [
-                                        { text: 'Arial', checked: true },
-                                        { text: 'Arial Black' },
-                                        { text: 'Comic Sans MS' },
-                                        { text: 'Courier New' },
-                                        { text: 'Lucida Console' },
-                                        { text: 'Tahoma' },
-                                        { text: 'Times New Roman' },
-                                        { text: 'Trebuchet MS' },
-                                        { text: 'Verdana' }
-                                    ]
-                                },
-                                { type: 'spin', label: '13', value: 'fontsize', range: [ 9, 75 ], disabled: true }
-                            ]
-                        },
-                        { type: 'separator' },
-                        { group: 'textstyle', label: 'Font Style',
-                            buttons: [
-                                { type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' },
-                                { type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' },
-                                { type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' },
-                                { type: 'separator' },
-                                { type: 'push', label: 'Subscript', value: 'subscript', disabled: true },
-                                { type: 'push', label: 'Superscript', value: 'superscript', disabled: true },
-                                { type: 'separator' },
-                                { type: 'color', label: 'Font Color', value: 'forecolor', disabled: true },
-                                { type: 'color', label: 'Background Color', value: 'backcolor', disabled: true },
-                                { type: 'separator' },
-                                { type: 'push', label: 'Remove Formatting', value: 'removeformat', disabled: true },
-                                { type: 'push', label: 'Show/Hide Hidden Elements', value: 'hiddenelements' }
-                            ]
-                        },
-                        { type: 'separator' },
-                        { group: 'alignment', label: 'Alignment',
-                            buttons: [
-                                { type: 'push', label: 'Align Left CTRL + SHIFT + [', value: 'justifyleft' },
-                                { type: 'push', label: 'Align Center CTRL + SHIFT + |', value: 'justifycenter' },
-                                { type: 'push', label: 'Align Right CTRL + SHIFT + ]', value: 'justifyright' },
-                                { type: 'push', label: 'Justify', value: 'justifyfull' }
-                            ]
-                        },
-                        { type: 'separator' },
-                        { group: 'parastyle', label: 'Paragraph Style',
-                            buttons: [
-                            { type: 'select', label: 'Normal', value: 'heading', disabled: true,
-                                menu: [
-                                    { text: 'Normal', value: 'none', checked: true },
-                                    { text: 'Header 1', value: 'h1' },
-                                    { text: 'Header 2', value: 'h2' },
-                                    { text: 'Header 3', value: 'h3' },
-                                    { text: 'Header 4', value: 'h4' },
-                                    { text: 'Header 5', value: 'h5' },
-                                    { text: 'Header 6', value: 'h6' }
-                                ]
-                            }
-                            ]
-                        },
-                        { type: 'separator' },
-                        { group: 'indentlist', label: 'Indenting and Lists',
-                            buttons: [
-                                { type: 'push', label: 'Indent', value: 'indent', disabled: true },
-                                { type: 'push', label: 'Outdent', value: 'outdent', disabled: true },
-                                { type: 'push', label: 'Create an Unordered List', value: 'insertunorderedlist' },
-                                { type: 'push', label: 'Create an Ordered List', value: 'insertorderedlist' }
-                            ]
-                        },
-                        { type: 'separator' },
-                        { group: 'insertitem', label: 'Insert Item',
-                            buttons: [
-                                { type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true },
-                                { type: 'push', label: 'Insert Image', value: 'insertimage' }
-                            ]
-                        }
-                    ]
-                    /* }}} */
-                },
+                value: attr.toolbar || this._defaultToolbar,
                 writeOnce: true,
                 method: function(toolbar) {
+                    if (!toolbar.buttonType) {
+                        toolbar.buttonType = this._defaultToolbar.buttonType;
+                    }
+                    this._defaultToolbar = toolbar;
                 }
             });
             /**
@@ -3703,7 +4206,7 @@
             * @type Boolean
             */            
             this.setAttributeConfig('animate', {
-                value: false,
+                value: ((attr.animate) ? ((YAHOO.util.Anim) ? true : false) : false),
                 validator: function(value) {
                     var ret = true;
                     if (!YAHOO.util.Anim) {
@@ -3713,7 +4216,7 @@
                 }               
             });
             /**
-            * @attribute panel
+            * @config panel
             * @description A reference to the panel we are using for windows.
             * @default false
             * @type Boolean
@@ -3730,15 +4233,6 @@
                 }               
             });
             /**
-            * @attribute localFileWarning
-            * @description Should we throw the warning if we detect a file that is local to their machine?
-            * @default true
-            * @type Boolean
-            */            
-            this.setAttributeConfig('localFileWarning', {
-                value: attr.locaFileWarning || true
-            });
-            /**
             * @attribute focusAtStart
             * @description Should we focus the window when the content is ready?
             * @default false
@@ -3752,6 +4246,7 @@
                         var self = this;
                         setTimeout(function() {
                             self._focusWindow.call(self, true);
+                            self.editorDirty = false;
                         }, 400);
                     }, this, true);
                 }
@@ -3857,7 +4352,6 @@
         },
         /**
         * @private
-        * @method _handleColorPicker
         * @description Handles the colorpicker buttons in the toolbar.
         * @param {Object} o Object returned from Toolbar's buttonClick Event
         */
@@ -3875,7 +4369,6 @@
         * @param {Object} o Object returned from Toolbar's buttonClick Event
         */
         _handleAlign: function(o) {
-            var button = this.toolbar.getButtonById(o.button.id);
             var cmd = null;
             for (var i = 0; i < o.button.menu.length; i++) {
                 if (o.button.menu[i].value == o.button.value) {
@@ -3961,18 +4454,23 @@
                 this.toolbar.enableButton('backcolor');
             }
             if (this._isElement(elm, 'img')) {
-                this.toolbar.enableButton('createlink');
+                if (YAHOO.widget.Overlay) {
+                    this.toolbar.enableButton('createlink');
+                }
             }
             if (this._isElement(elm, 'blockquote')) {
                 this.toolbar.selectButton('indent');
                 this.toolbar.disableButton('indent');
                 this.toolbar.enableButton('outdent');
             }
+            //if (this._isElement(elm, 'ol') || this._isElement(elm, 'ul') || this._isElement(elm, 'li')) {
+            if (this._hasParent(elm, 'ol') || this._hasParent(elm, 'ul')) {
+                this.toolbar.disableButton('indent');
+            }
             this._lastButton = null;
             
         },
         _setBusy: function(off) {
-            /*
             if (off) {
                 Dom.removeClass(document.body, 'yui-busy');
                 Dom.removeClass(this._getDoc().body, 'yui-busy');
@@ -3980,7 +4478,6 @@
                 Dom.addClass(document.body, 'yui-busy');
                 Dom.addClass(this._getDoc().body, 'yui-busy');
             }
-            */
         },
         /**
         * @private
@@ -3988,25 +4485,16 @@
         * @description Opens the Image Properties Window when the insert Image button is clicked or an Image is Double Clicked.
         */
         _handleInsertImageClick: function() {
-            this._setBusy();
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue('insertimage')) {
+                    return false;
+                }
+            }
+        
+            this.toolbar.set('disabled', true); //Disable the toolbar when the prompt is showing
             this.on('afterExecCommand', function() {
                 var el = this.currentElement[0],
-                    body = null,
-                    link = '',
-                    target = '',
-                    title = '',
-                    src = '',
-                    align = '',
-                    height = 75,
-                    width = 75,
-                    padding = 0,
-                    oheight = 0,
-                    owidth = 0,
-                    blankimage = false,
-                    win = new YAHOO.widget.EditorWindow('insertimage', {
-                        width: '415px'
-                    });
-
+                    src = 'http://';
                 if (!el) {
                     el = this._getSelectedElement();
                 }
@@ -4015,337 +4503,19 @@
                         src = el.getAttribute('src', 2);
                         if (src.indexOf(this.get('blankimage')) != -1) {
                             src = this.STR_IMAGE_HERE;
-                            blankimage = true;
                         }
                     }
-                    if (el.getAttribute('alt', 2)) {
-                        title = el.getAttribute('alt', 2);
-                    }
-                    if (el.getAttribute('title', 2)) {
-                        title = el.getAttribute('title', 2);
-                    }
-
-                    if (el.parentNode && this._isElement(el.parentNode, 'a')) {
-                        link = el.parentNode.getAttribute('href');
-                        if (el.parentNode.getAttribute('target') !== null) {
-                            target = el.parentNode.getAttribute('target');
-                        }
-                    }
-                    height = parseInt(el.height, 10);
-                    width = parseInt(el.width, 10);
-                    if (el.style.height) {
-                        height = parseInt(el.style.height, 10);
-                    }
-                    if (el.style.width) {
-                        width = parseInt(el.style.width, 10);
-                    }
-                    if (el.style.margin) {
-                        padding = parseInt(el.style.margin, 10);
-                    }
-                    if (!el._height) {
-                        el._height = height;
-                    }
-                    if (!el._width) {
-                        el._width = width;
-                    }
-                    oheight = el._height;
-                    owidth = el._width;
                 }
-                var str = '<label for="insertimage_url"><strong>' + this.STR_IMAGE_URL + ':</strong> <input type="text" id="insertimage_url" value="' + src + '" size="40"></label>';
-                body = document.createElement('div');
-                body.innerHTML = str;
-
-                var tbarCont = document.createElement('div');
-                tbarCont.id = 'img_toolbar';
-                body.appendChild(tbarCont);
-
-                var str2 = '<label for="insertimage_title"><strong>' + this.STR_IMAGE_TITLE + ':</strong> <input type="text" id="insertimage_title" value="' + title + '" size="40"></label>';
-                str2 += '<label for="insertimage_link"><strong>' + this.STR_LINK_URL + ':</strong> <input type="text" name="insertimage_link" id="insertimage_link" value="' + link + '"></label>';
-                str2 += '<label for="insertimage_target"><strong> </strong><input type="checkbox" name="insertimage_target_" id="insertimage_target" value="_blank"' + ((target) ? ' checked' : '') + '> ' + this.STR_LINK_NEW_WINDOW + '</label>';
-                var div = document.createElement('div');
-                div.innerHTML = str2;
-                body.appendChild(div);
-                win.cache = body;
-
-                var tbar = new YAHOO.widget.Toolbar(tbarCont, {
-                    /* {{{ */ 
-                    buttons: [
-                        { group: 'textflow', label: this.STR_IMAGE_TEXTFLOW + ':',
-                            buttons: [
-                                { type: 'push', label: 'Left', value: 'left' },
-                                { type: 'push', label: 'Inline', value: 'inline' },
-                                { type: 'push', label: 'Block', value: 'block' },
-                                { type: 'push', label: 'Right', value: 'right' }
-                            ]
-                        },
-                        { type: 'separator' },
-                        { group: 'padding', label: this.STR_IMAGE_PADDING + ':',
-                            buttons: [
-                                { type: 'spin', label: ''+padding, value: 'padding', range: [0, 50] }
-                            ]
-                        },
-                        { type: 'separator' },
-                        { group: 'border', label: this.STR_IMAGE_BORDER + ':',
-                            buttons: [
-                                { type: 'select', label: 'Border Size', value: 'bordersize',
-                                    menu: [
-                                        { text: 'none', value: '0', checked: true },
-                                        { text: ' ', value: '1' },
-                                        { text: ' ', value: '2' },
-                                        { text: ' ', value: '3' },
-                                        { text: ' ', value: '4' },
-                                        { text: ' ', value: '5' }
-                                    ]
-                                },
-                                { type: 'select', label: 'Border Type', value: 'bordertype', disabled: true,
-                                    menu: [
-                                        { text: ' ', value: 'solid', checked: true },
-                                        { text: ' ', value: 'dashed' },
-                                        { text: ' ', value: 'dotted' }
-                                    ]
-                                },
-                                { type: 'color', label: 'Border Color', value: 'bordercolor', disabled: true }
-                            ]
-                        }
-                    ]
-                    /* }}} */
-                });
-                
-                var bsize = '0';
-                var btype = 'solid';
-                if (el.style.borderLeftWidth) {
-                    bsize = parseInt(el.style.borderLeftWidth, 10);
+                var str = prompt(this.STR_LINK_URL + ': ', src);
+                if ((str !== '') && (str !== null)) {
+                    el.setAttribute('src', str);
+                } else if (str !== null) {
+                    el.parentNode.removeChild(el);
+                    this.currentElement = [];
                 }
-                if (el.style.borderLeftStyle) {
-                    btype = el.style.borderLeftStyle;
-                }
-                var bs_button = tbar.getButtonByValue('bordersize');
-                var bSizeStr = ((parseInt(bsize, 10) > 0) ? '' : 'none');
-                bs_button.set('label', '<span class="yui-toolbar-bordersize-' + bsize + '">'+bSizeStr+'</span>');
-                this._updateMenuChecked('bordersize', bsize, tbar);
-
-                var bt_button = tbar.getButtonByValue('bordertype');
-                bt_button.set('label', '<span class="yui-toolbar-bordertype-' + btype + '"></span>');
-                this._updateMenuChecked('bordertype', btype, tbar);
-                if (parseInt(bsize, 10) > 0) {
-                    tbar.enableButton(bt_button);
-                    tbar.enableButton(bs_button);
-                }
-
-                var cont = tbar.get('cont');
-                var hw = document.createElement('div');
-                hw.className = 'yui-toolbar-group yui-toolbar-group-height-width height-width';
-                hw.innerHTML = '<h3>' + this.STR_IMAGE_SIZE + ':</h3>';
-                var orgSize = '';
-                if ((height != oheight) || (width != owidth)) {
-                    orgSize = '<span class="info">' + this.STR_IMAGE_ORIG_SIZE + '<br>'+ owidth +' x ' + oheight + '</span>';
-                }
-                hw.innerHTML += '<span><input type="text" size="3" value="'+width+'" id="insertimage_width"> x <input type="text" size="3" value="'+height+'" id="insertimage_height"></span>' + orgSize;
-                cont.insertBefore(hw, cont.firstChild);
-
-                Event.onAvailable('insertimage_width', function() {
-                    Event.on('insertimage_width', 'blur', function() {
-                        var value = parseInt(Dom.get('insertimage_width').value, 10);
-                        if (value > 5) {
-                            el.style.width = value + 'px';
-                            this.moveWindow();
-                        }
-                    }, this, true);
-                }, this, true);
-                Event.onAvailable('insertimage_height', function() {
-                    Event.on('insertimage_height', 'blur', function() {
-                        var value = parseInt(Dom.get('insertimage_height').value, 10);
-                        if (value > 5) {
-                            el.style.height = value + 'px';
-                            this.moveWindow();
-                        }
-                    }, this, true);
-                }, this, true);
-
-                if ((el.align == 'right') || (el.align == 'left')) {
-                    tbar.selectButton(el.align);
-                } else if (el.style.display == 'block') {
-                    tbar.selectButton('block');
-                } else {
-                    tbar.selectButton('inline');
-                }
-                if (parseInt(el.style.marginLeft, 10) > 0) {
-                     tbar.getButtonByValue('padding').set('label', ''+parseInt(el.style.marginLeft, 10));
-                }
-                if (el.style.borderSize) {
-                    tbar.selectButton('bordersize');
-                    tbar.selectButton(parseInt(el.style.borderSize, 10));
-                }
-
-                tbar.on('colorPickerClicked', function(o) {
-                    var size = '1', type = 'solid', color = 'black';
-
-                    if (el.style.borderLeftWidth) {
-                        size = parseInt(el.style.borderLeftWidth, 10);
-                    }
-                    if (el.style.borderLeftStyle) {
-                        type = el.style.borderLeftStyle;
-                    }
-                    if (el.style.borderLeftColor) {
-                        color = el.style.borderLeftColor;
-                    }
-                    var borderString = size + 'px ' + type + ' #' + o.color;
-                    el.style.border = borderString;
-                }, this.toolbar, true);
-
-                tbar.on('buttonClick', function(o) {
-                    var value = o.button.value,
-                        borderString = '';
-                    if (o.button.menucmd) {
-                        value = o.button.menucmd;
-                    }
-                    var size = '1', type = 'solid', color = 'black';
-
-                    /* All border calcs are done on the left border
-                        since our default interface only supports
-                        one border size/type and color */
-                    if (el.style.borderLeftWidth) {
-                        size = parseInt(el.style.borderLeftWidth, 10);
-                    }
-                    if (el.style.borderLeftStyle) {
-                        type = el.style.borderLeftStyle;
-                    }
-                    if (el.style.borderLeftColor) {
-                        color = el.style.borderLeftColor;
-                    }
-                    switch(value) {
-                        case 'bordersize':
-                            if (this.browser.webkit && this._lastImage) {
-                                Dom.removeClass(this._lastImage, 'selected');
-                                this._lastImage = null;
-                            }
-
-                            borderString = parseInt(o.button.value, 10) + 'px ' + type + ' ' + color;
-                            el.style.border = borderString;
-                            if (parseInt(o.button.value, 10) > 0) {
-                                tbar.enableButton('bordertype');
-                                tbar.enableButton('bordercolor');
-                            } else {
-                                tbar.disableButton('bordertype');
-                                tbar.disableButton('bordercolor');
-                            }
-                            break;
-                        case 'bordertype':
-                            if (this.browser.webkit && this._lastImage) {
-                                Dom.removeClass(this._lastImage, 'selected');
-                                this._lastImage = null;
-                            }
-                            borderString = size + 'px ' + o.button.value + ' ' + color;
-                            el.style.border = borderString;
-                            break;
-                        case 'right':
-                        case 'left':
-                            tbar.deselectAllButtons();
-                            el.style.display = '';
-                            el.align = o.button.value;
-                            break;
-                        case 'inline':
-                            tbar.deselectAllButtons();
-                            el.style.display = '';
-                            el.align = '';
-                            break;
-                        case 'block':
-                            tbar.deselectAllButtons();
-                            el.style.display = 'block';
-                            el.align = 'center';
-                            break;
-                        case 'padding':
-                            var _button = tbar.getButtonById(o.button.id);
-                            el.style.margin = _button.get('label') + 'px';
-                            break;
-                    }
-                    tbar.selectButton(o.button.value);
-                    this.moveWindow();
-                }, this, true);
-
-                win.setHeader(this.STR_IMAGE_PROP_TITLE);
-                win.setBody(body);
-                if ((this.browser.webkit && !this.browser.webkit3) || this.browser.opera) {
-                    win.setFooter(this.STR_IMAGE_COPY);
-                }
-                this.openWindow(win);
-
-                //Set event after openWindow..
-                Event.onAvailable('insertimage_url', function() {
-
-                    this.toolbar.selectButton('insertimage');
-
-                    window.setTimeout(function() {
-                        YAHOO.util.Dom.get('insertimage_url').focus();
-                        if (blankimage) {
-                            YAHOO.util.Dom.get('insertimage_url').select();
-                        }
-                    }, 50);
-                    
-                    if (this.get('localFileWarning')) {
-                        Event.on('insertimage_link', 'blur', function() {
-                            var url = Dom.get('insertimage_link');
-                            if (this._isLocalFile(url.value)) {
-                                //Local File throw Warning
-                                Dom.addClass(url, 'warning');
-                                this.get('panel').setFooter(this.STR_LOCAL_FILE_WARNING);
-                            } else {
-                                Dom.removeClass(url, 'warning');
-                                this.get('panel').setFooter(' ');
-                                if ((this.browser.webkit && !this.browser.webkit3) || this.browser.opera) {
-                                    this.get('panel').setFooter(this.STR_IMAGE_COPY);
-                                }
-                            }
-                        }, this, true);
-
-                        Event.on('insertimage_url', 'blur', function() {
-                            var url = Dom.get('insertimage_url');
-                            if (this._isLocalFile(url.value)) {
-                                //Local File throw Warning
-                                Dom.addClass(url, 'warning');
-                                this.get('panel').setFooter(this.STR_LOCAL_FILE_WARNING);
-                            } else {
-                                Dom.removeClass(url, 'warning');
-                                this.get('panel').setFooter(' ');
-                                if ((this.browser.webkit && !this.browser.webkit3) || this.browser.opera) {
-                                    this.get('panel').setFooter(this.STR_IMAGE_COPY);
-                                }
-                                
-                                if (url && url.value && (url.value != this.STR_IMAGE_HERE)) {
-                                    this.currentElement[0].setAttribute('src', url.value);
-                                    var self = this,
-                                        img = new Image();
-
-                                    img.onerror = function() {
-                                        url.value = self.STR_IMAGE_HERE;
-                                        img.setAttribute('src', self.get('blankimage'));
-                                        self.currentElement[0].setAttribute('src', self.get('blankimage'));
-                                        YAHOO.util.Dom.get('insertimage_height').value = img.height;
-                                        YAHOO.util.Dom.get('insertimage_width').value = img.width;
-                                    };
-                                    window.setTimeout(function() {
-                                        YAHOO.util.Dom.get('insertimage_height').value = img.height;
-                                        YAHOO.util.Dom.get('insertimage_width').value = img.width;
-                                        if (self.currentElement && self.currentElement[0]) {
-                                            if (!self.currentElement[0]._height) {
-                                                self.currentElement[0]._height = img.height;
-                                            }
-                                            if (!self.currentElement[0]._width) {
-                                                self.currentElement[0]._width = img.width;
-                                            }
-                                        }
-                                        self.moveWindow();
-                                    }, 200);
-
-                                    if (url.value != this.STR_IMAGE_HERE) {
-                                        img.src = url.value;
-                                    }
-                                }
-                            }
-                        }, this, true);
-                    }
-                }, this, true);
-            });
+                this.closeWindow();
+                this.toolbar.set('disabled', false);
+            }, this, true);
         },
         /**
         * @private
@@ -4353,55 +4523,6 @@
         * @description Handles the closing of the Image Properties Window.
         */
         _handleInsertImageWindowClose: function() {
-            var url = Dom.get('insertimage_url');
-            var title = Dom.get('insertimage_title');
-            var link = Dom.get('insertimage_link');
-            var target = Dom.get('insertimage_target');
-            var el = this.currentElement[0];
-            if (url && url.value && (url.value != this.STR_IMAGE_HERE)) {
-                el.setAttribute('src', url.value);
-                el.setAttribute('title', title.value);
-                el.setAttribute('alt', title.value);
-                var par = el.parentNode;
-                if (link.value) {
-                    var urlValue = link.value;
-                    if ((urlValue.indexOf(':/'+'/') == -1) && (urlValue.substring(0,1) != '/') && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
-                        if ((urlValue.indexOf('@') != -1) && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
-                            //Found an @ sign, prefix with mailto:
-                            urlValue = 'mailto:' + urlValue;
-                        } else {
-                            /* :// not found adding */
-                            urlValue = 'http:/'+'/' + urlValue;
-                        }
-                    }
-                    if (par && this._isElement(par, 'a')) {
-                        par.setAttribute('href', urlValue);
-                        if (target.checked) {
-                            par.setAttribute('target', target.value);
-                        } else {
-                            par.setAttribute('target', '');
-                        }
-                    } else {
-                        var _a = this._getDoc().createElement('a');
-                        _a.setAttribute('href', urlValue);
-                        if (target.checked) {
-                            _a.setAttribute('target', target.value);
-                        } else {
-                            _a.setAttribute('target', '');
-                        }
-                        el.parentNode.replaceChild(_a, el);
-                        _a.appendChild(el);
-                    }
-                } else {
-                    if (par && this._isElement(par, 'a')) {
-                        par.parentNode.replaceChild(el, par);
-                    }
-                }
-            } else {
-                //No url/src given, remove the node from the document
-                el.parentNode.removeChild(el);
-            }
-            this.currentElement = [];
             this.nodeChange();
         },
         /**
@@ -4422,87 +4543,45 @@
         * @description Handles the opening of the Link Properties Window when the Create Link button is clicked or an href is doubleclicked.
         */
         _handleCreateLinkClick: function() {
-            var el = this._getSelectedElement();
-            if (this._isElement(el, 'img')) {
-                this.STOP_EXEC_COMMAND = true;
-                this.currentElement[0] = el;
-                this.toolbar.fireEvent('insertimageClick', { type: 'insertimageClick', target: this.toolbar });
-                this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
-                return false;
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue('createlink')) {
+                    return false;
+                }
             }
+        
+            this.toolbar.set('disabled', true); //Disable the toolbar when the prompt is showing
             this.on('afterExecCommand', function() {
+                var el = this.currentElement[0],
+                    url = '';
 
-                var win = new YAHOO.widget.EditorWindow('createlink', {
-                    width: '350px'
-                });
-                
-                var el = this.currentElement[0],
-                    url = '',
-                    title = '',
-                    target = '',
-                    localFile = false;
                 if (el) {
-                    if (el.getAttribute('href') !== null) {
-                        url = el.getAttribute('href');
-                        if (this._isLocalFile(url)) {
-                            //Local File throw Warning
-                            win.setFooter(this.STR_LOCAL_FILE_WARNING);
-                            localFile = true;
+                    if (el.getAttribute('href', 2) !== null) {
+                        url = el.getAttribute('href', 2);
+                    }
+                }
+                var str = prompt(this.STR_LINK_URL + ': ', url);
+                if ((str !== '') && (str !== null)) {
+                    var urlValue = str;
+                    if ((urlValue.indexOf(':/'+'/') == -1) && (urlValue.substring(0,1) != '/') && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                        if ((urlValue.indexOf('@') != -1) && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                            //Found an @ sign, prefix with mailto:
+                            urlValue = 'mailto:' + urlValue;
                         } else {
-                            win.setFooter(' ');
+                            /* :// not found adding */
+                            if (urlValue.substring(0, 1) != '#') {
+                                urlValue = 'http:/'+'/' + urlValue;
+                            }
                         }
                     }
-                    if (el.getAttribute('title') !== null) {
-                        title = el.getAttribute('title');
-                    }
-                    if (el.getAttribute('target') !== null) {
-                        target = el.getAttribute('target');
-                    }
+                    el.setAttribute('href', urlValue);
+                } else if (str !== null) {
+                    var _span = this._getDoc().createElement('span');
+                    _span.innerHTML = el.innerHTML;
+                    Dom.addClass(_span, 'yui-non');
+                    el.parentNode.replaceChild(_span, el);
                 }
-                var str = '<label for="createlink_url"><strong>' + this.STR_LINK_URL + ':</strong> <input type="text" name="createlink_url" id="createlink_url" value="' + url + '"' + ((localFile) ? ' class="warning"' : '') + '></label>';
-                str += '<label for="createlink_target"><strong> </strong><input type="checkbox" name="createlink_target_" id="createlink_target" value="_blank"' + ((target) ? ' checked' : '') + '> ' + this.STR_LINK_NEW_WINDOW + '</label>';
-                str += '<label for="createlink_title"><strong>' + this.STR_LINK_TITLE + ':</strong> <input type="text" name="createlink_title" id="createlink_title" value="' + title + '"></label>';
-                
-                var body = document.createElement('div');
-                body.innerHTML = str;
-
-                var unlinkCont = document.createElement('div');
-                unlinkCont.className = 'removeLink';
-                var unlink = document.createElement('a');
-                unlink.href = '#';
-                unlink.innerHTML = this.STR_LINK_PROP_REMOVE;
-                unlink.title = this.STR_LINK_PROP_REMOVE;
-                Event.on(unlink, 'click', function(ev) {
-                    Event.stopEvent(ev);
-                    this.execCommand('unlink');
-                    this.closeWindow();
-                }, this, true);
-                unlinkCont.appendChild(unlink);
-                body.appendChild(unlinkCont);
-
-                win.setHeader(this.STR_LINK_PROP_TITLE);
-                win.setBody(body);
-
-                Event.onAvailable('createlink_url', function() {
-                    window.setTimeout(function() {
-                        try {
-                            YAHOO.util.Dom.get('createlink_url').focus();
-                        } catch (e) {}
-                    }, 50);
-                    Event.on('createlink_url', 'blur', function() {
-                        var url = Dom.get('createlink_url');
-                        if (this._isLocalFile(url.value)) {
-                            //Local File throw Warning
-                            Dom.addClass(url, 'warning');
-                            this.get('panel').setFooter(this.STR_LOCAL_FILE_WARNING);
-                        } else {
-                            Dom.removeClass(url, 'warning');
-                            this.get('panel').setFooter(' ');
-                        }
-                    }, this, true);
-                }, this, true);
-
-                this.openWindow(win);
+                this.closeWindow();
+                this.toolbar.set('disabled', false);
             });
         },
         /**
@@ -4511,36 +4590,6 @@
         * @description Handles the closing of the Link Properties Window.
         */
         _handleCreateLinkWindowClose: function() {
-            var url = Dom.get('createlink_url'),
-                target = Dom.get('createlink_target'),
-                title = Dom.get('createlink_title'),
-                el = this.currentElement[0],
-                a = el;
-            if (url && url.value) {
-                var urlValue = url.value;
-                if ((urlValue.indexOf(':/'+'/') == -1) && (urlValue.substring(0,1) != '/') && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
-                    if ((urlValue.indexOf('@') != -1) && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
-                        //Found an @ sign, prefix with mailto:
-                        urlValue = 'mailto:' + urlValue;
-                    } else {
-                        /* :// not found adding */
-                        urlValue = 'http:/'+'/' + urlValue;
-                    }
-                }
-                el.setAttribute('href', urlValue);
-                if (target.checked) {
-                    el.setAttribute('target', target.value);
-                } else {
-                    el.setAttribute('target', '');
-                }
-                el.setAttribute('title', ((title.value) ? title.value : ''));
-
-            } else {
-                var _span = this._getDoc().createElement('span');
-                _span.innerHTML = el.innerHTML;
-                Dom.addClass(_span, 'yui-non');
-                el.parentNode.replaceChild(_span, el);
-            }
             this.nodeChange();
             this.currentElement = [];
         },
@@ -4571,15 +4620,23 @@
             }, 10);
 
             this.get('editor_wrapper').appendChild(this.get('iframe').get('element'));
-            Dom.addClass(this.get('iframe').get('parentNode'), this.CLASS_EDITABLE_CONT);
-            this.get('iframe').addClass(this.CLASS_EDITABLE);
 
+            if (this.get('disabled')) {
+                this._disableEditor(true);
+            }
 
             var tbarConf = this.get('toolbar');
-            //Set the toolbar to disabled until content is loaded
-            tbarConf.disabled = true;
             //Create Toolbar instance
-            this.toolbar = new Toolbar(this.get('toolbar_cont'), tbarConf);
+            if (tbarConf instanceof Toolbar) {
+                this.toolbar = tbarConf;
+                //Set the toolbar to disabled until content is loaded
+                this.toolbar.set('disabled', true);
+            } else {
+                //Set the toolbar to disabled until content is loaded
+                tbarConf.disabled = true;
+                this.toolbar = new Toolbar(this.get('toolbar_cont'), tbarConf);
+            }
+
             this.fireEvent('toolbarLoaded', { type: 'toolbarLoaded', target: this.toolbar });
 
             
@@ -4619,13 +4676,13 @@
             this.on('windowcreatelinkClose', function() {
                 this._handleCreateLinkWindowClose();
             }, this, true);
+            
 
-
             //Replace Textarea with editable area
             
             this.get('parentNode').replaceChild(this.get('element_cont').get('element'), this.get('element'));
 
-
+            
             if (!this.beforeElement) {
                 this.beforeElement = document.createElement('h2');
                 this.beforeElement.className = 'yui-editor-skipheader';
@@ -4633,6 +4690,7 @@
                 this.beforeElement.innerHTML = this.STR_BEFORE_EDITOR;
                 this.get('element_cont').get('firstChild').insertBefore(this.beforeElement, this.toolbar.get('nextSibling'));
             }
+
             this.setStyle('visibility', 'hidden');
             this.setStyle('position', 'absolute');
             this.setStyle('top', '-9999px');
@@ -4641,14 +4699,19 @@
             this.get('element_cont').setStyle('display', 'block');
 
 
+            Dom.addClass(this.get('iframe').get('parentNode'), this.CLASS_EDITABLE_CONT);
+            this.get('iframe').addClass(this.CLASS_EDITABLE);
+
             //Set height and width of editor container
             this.get('element_cont').setStyle('width', this.get('width'));
             Dom.setStyle(this.get('iframe').get('parentNode'), 'height', this.get('height'));
 
             this.get('iframe').setStyle('width', '100%'); //WIDTH
-            //this.get('iframe').setStyle('_width', '99%'); //WIDTH
             this.get('iframe').setStyle('height', '100%');
 
+            if (this.browser.ie == 7) {
+            }
+
             this.fireEvent('afterRender', { type: 'afterRender', target: this });
         },
         /**
@@ -4667,407 +4730,366 @@
             if (this.browser.ie) {
                 this._getWindow().focus();
             }
+            var exec = true;
+            
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue(action)) {
+                    exec = false;
+                }
+            }
+
+            this.editorDirty = true;
+            
+            if ((typeof this['cmd_' + action.toLowerCase()] == 'function') && exec) {
+                var retValue = this['cmd_' + action.toLowerCase()](value);
+                exec = retValue[0];
+                if (retValue[1]) {
+                    action = retValue[1];
+                }
+                if (retValue[2]) {
+                    value = retValue[2];
+                }
+            }
+            if (exec) {
+                try {
+                    this._getDoc().execCommand(action, false, value);
+                } catch(e) {
+                }
+            } else {
+            }
+            this.on('afterExecCommand', function() {
+                this.unsubscribeAll('afterExecCommand');
+                this.nodeChange();
+            });
+            this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
+            
+        },
+    /* {{{  Command Overrides */
+
+        /**
+        * @method cmd_backcolor
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('backcolor') is used.
+        */
+        cmd_backcolor: function(value) {
             var exec = true,
-                selEl = null,
-                el = null,
-                tag = '',
-                str = '',
-                _span = null,
-                _sel = this._getSelection(),
-                _range = this._getRange(),
-                _selEl = this._getSelectedElement();
+                el = this._getSelectedElement(),
+                action = 'backcolor';
 
-            if (_selEl) {
-                _sel = _selEl;
+            if (this.browser.gecko || this.browser.opera) {
+                this._setEditorStyle(true);
+                action = 'hilitecolor';
             }
-            switch (action.toLowerCase()) {
-                case 'heading':
-                    if (this.browser.ie) {
-                        action = 'formatblock';
-                    }
-                    var h = 0;
-                    if (value == 'none') {
-                        if ((_sel && _sel.tagName && (_sel.tagName.toLowerCase().substring(0,1) == 'h')) || (_sel && _sel.parentNode && _sel.parentNode.tagName && (_sel.parentNode.tagName.toLowerCase().substring(0,1) == 'h'))) {
-                            if (_sel.parentNode.tagName.toLowerCase().substring(0,1) == 'h') {
-                                if (!this._isElement(_sel.parentNode, 'html')) {
-                                    _sel = _sel.parentNode;
-                                }
-                            }
-                            if (this._isElement(_sel, 'body')) {
-                                return false;
-                            }
-                            for (h = 0; h < this.currentElement.length; h++) {
-                                if (this._isElement(this.currentElement[h], 'h1') || this._isElement(this.currentElement[h], 'h2') || this._isElement(this.currentElement[h], 'h3') || this._isElement(this.currentElement[h], 'h4') || this._isElement(this.currentElement[h], 'h5') || this._isElement(this.currentElement[h], 'h6')) {
-                                    el = this._swapEl(this.currentElement[h], 'span', function(el) {
-                                        el.className = 'yui-non';
-                                        el.innerHTML = el.innerHTML.replace(new RegExp('<span class="yui-non">(.*?)<\/span>', 'gi'), '$1');
-                                    });
-                                    this.currentElement[h] = el;
-                                }
-                                if (this.currentElement[h].nextSibling && !this._isElement(this.currentElement[h].nextSibling, 'br')) {
-                                    var _br = this._getDoc().createElement('br');
-                                    this.currentElement[h].parentNode.insertBefore(_br, this.currentElement[h].nextSibling);
-                                }
-                            }
-                        }
-                        exec = false;
-                    } else {
-                        if (this._isElement(_selEl, 'h1') || this._isElement(_selEl, 'h2') || this._isElement(_selEl, 'h3') || this._isElement(_selEl, 'h4') || this._isElement(_selEl, 'h5') || this._isElement(_selEl, 'h6')) {
-                            el = this._swapEl(_selEl, value);
-                            this._selectNode(el);
-                            this.currentElement[0] = el;
-                        } else {
-                            this._createCurrentElement(value);
-                            this._selectNode(this.currentElement[0]);
-                            //If the next sibling is a br, remove it
-                            for (h = 0; h < this.currentElement.length; h++) {
-                                if (this.currentElement[h].nextSibling && this._isElement(this.currentElement[h].nextSibling, 'br')) {
-                                    this.currentElement[h].nextSibling.parentNode.removeChild(this.currentElement[h].nextSibling);
-                                }
-                            }
-                        }
-                        exec = false;
-                    }
-                    break;
-                case 'backcolor':
-                    if (this.browser.gecko || this.browser.opera) {
-                        this._setEditorStyle(true);
-                        action = 'hilitecolor';
-                    }
-                    /**
-                    * @browser opera
-                    * @knownissue - Opera fails to assign a background color on an element that already has one.
-                    */
-                    el = this._getSelectedElement();
-                    if (this.browser.opera) {
-                        if (!this._isElement(el, 'body') && Dom.getStyle(el, 'background-color')) {
-                            Dom.setStyle(el, 'background-color', value);
-                        } else {
-                            this._createCurrentElement('span', { backgroundColor: value });
-                        }
-                        exec = false;
-                    } else if (!this._hasSelection()) {
-                        if (el !== this._getDoc().body) {
-                            Dom.setStyle(el, 'background-color', value);
-                            exec = false;
-                        }
-                    }
-                    break;
-                case 'forecolor':
-                    el = this._getSelectedElement();
-                    if ((el !== this._getDoc().body) && (!this._hasSelection())) {
-                        Dom.setStyle(el, 'color', value);
-                        exec = false;
-                    }
-                    break;
-                case 'hiddenelements':
-                    this._showHidden();
+            /**
+            * @browser opera
+            * @knownissue - Opera fails to assign a background color on an element that already has one.
+            *
+            if (this.browser.opera) {
+                if (!this._isElement(el, 'body') && Dom.getStyle(el, 'background-color')) {
+                    Dom.setStyle(el, 'background-color', value);
+                } else {
+                    this._createCurrentElement('span', { backgroundColor: value });
+                }
+                exec = false;
+            //} else if (!this._hasSelection()) {
+            } else if (el !== this._getDoc().body) {
+                Dom.setStyle(el, 'background-color', value);
+                this._selectNode(el);
+                exec = false;
+            } else {
+                this._createCurrentElement('span', { backgroundColor: value });
+                this._selectNode(this.currentElement[0]);
+                exec = false;
+            }*/
+
+            if (!this._isElement(el, 'body')) {
+                Dom.setStyle(el, 'background-color', value);
+                this._selectNode(el);
+                exec = false;
+            } else {
+                this._createCurrentElement('span', { backgroundColor: value });
+                this._selectNode(this.currentElement[0]);
+                exec = false;
+            }
+
+            return [exec, action];
+        },
+        /**
+        * @method cmd_forecolor
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('forecolor') is used.
+        */
+        cmd_forecolor: function(value) {
+            var exec = true,
+                el = this._getSelectedElement();
+
+                if (!this._isElement(el, 'body')) {
+                    Dom.setStyle(el, 'color', value);
+                    this._selectNode(el);
                     exec = false;
-                    break;
-                case 'unlink':
-                    el = this._swapEl(this.currentElement[0], 'span', function(el) {
-                        el.className = 'yui-non';
-                    });
+                } else {
+                    this._createCurrentElement('span', { color: value });
+                    this._selectNode(this.currentElement[0]);
                     exec = false;
-                    break;
-                case 'createlink':
-                    el = this._getSelectedElement();
-                    var _a = null;
-                    if (!this._isElement(el, 'a')) {
-                        this._createCurrentElement('a');
-                        _a = this._swapEl(this.currentElement[0], 'a');
-                        this.currentElement[0] = _a;
-                    } else {
-                        this.currentElement[0] = el;
+                }
+                return [exec];
+        },
+        /**
+        * @method cmd_unlink
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('unlink') is used.
+        */
+        cmd_unlink: function(value) {
+            this._swapEl(this.currentElement[0], 'span', function(el) {
+                el.className = 'yui-non';
+            });
+            return [false];
+        },
+        /**
+        * @method cmd_createlink
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('createlink') is used.
+        */
+        cmd_createlink: function(value) {
+            var el = this._getSelectedElement(), _a = null;
+            if (this._hasParent(el, 'a')) {
+                this.currentElement[0] = this._hasParent(el, 'a');
+            } else if (!this._isElement(el, 'a')) {
+                this._createCurrentElement('a');
+                _a = this._swapEl(this.currentElement[0], 'a');
+                this.currentElement[0] = _a;
+            } else {
+                this.currentElement[0] = el;
+            }
+            return [false];
+        },
+        /**
+        * @method cmd_insertimage
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('insertimage') is used.
+        */
+        cmd_insertimage: function(value) {
+            var exec = true, _img = null, action = 'insertimage',
+                el = this._getSelectedElement();
+
+            if (value === '') {
+                value = this.get('blankimage');
+            }
+
+            /**
+            * @knownissue
+            * @browser Safari 2.x
+            * @description The issue here is that we have no way of knowing where the cursor position is
+            * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
+            */
+            
+            if (this._isElement(el, 'img')) {
+                this.currentElement[0] = el;
+                exec = false;
+            } else {
+                if (this._getDoc().queryCommandEnabled(action)) {
+                    this._getDoc().execCommand('insertimage', false, value);
+                    var imgs = this._getDoc().getElementsByTagName('img');
+                    for (var i = 0; i < imgs.length; i++) {
+                        if (!YAHOO.util.Dom.hasClass(imgs[i], 'yui-img')) {
+                            YAHOO.util.Dom.addClass(imgs[i], 'yui-img');
+                            this.currentElement[0] = imgs[i];
+                        }
                     }
                     exec = false;
-                    break;
-                case 'insertimage':
-                    if (value === '') {
-                        value = this.get('blankimage');
-                    }
-                    /**
-                    * @knownissue
-                    * @browser Safari 2.x
-                    * @description The issue here is that we have no way of knowing where the cursor position is
-                    * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
-                    */
-                    
-                    el = this._getSelectedElement();
-                    if (this._isElement(el, 'img')) {
-                        this.currentElement[0] = el;
-                        exec = false;
+                } else {
+                    if (el == this._getDoc().body) {
+                        _img = this._getDoc().createElement('img');
+                        _img.setAttribute('src', value);
+                        YAHOO.util.Dom.addClass(_img, 'yui-img');
+                        this._getDoc().body.appendChild(_img);
                     } else {
-                        if (this._getDoc().queryCommandEnabled(action)) {
-                            this._getDoc().execCommand('insertimage', false, value);
-                            var imgs = this._getDoc().getElementsByTagName('img');
-                            for (var i = 0; i < imgs.length; i++) {
-                                if (!YAHOO.util.Dom.hasClass(imgs[i], 'yui-img')) {
-                                    YAHOO.util.Dom.addClass(imgs[i], 'yui-img');
-                                    this.currentElement[0] = imgs[i];
-                                }
-                            }
-                            exec = false;
-                        } else {
-                            var _img = null;
-                            if (el == this._getDoc().body) {
-                                _img = this._getDoc().createElement('img');
-                                _img.setAttribute('src', value);
-                                YAHOO.util.Dom.addClass(_img, 'yui-img');
-                                this._getDoc().body.appendChild(_img);
-                            } else {
-                                this._createCurrentElement('img');
-                                _img = this._getDoc().createElement('img');
-                                _img.setAttribute('src', value);
-                                YAHOO.util.Dom.addClass(_img, 'yui-img');
-                                this.currentElement[0].parentNode.replaceChild(_img, this.currentElement[0]);
-                            }
-                            this.currentElement[0] = _img;
-                            exec = false;
-                        }
-                    }
-                    
-                    break;
-                case 'inserthtml':
-                    /**
-                    * @knownissue
-                    * @browser Safari 2.x
-                    * @description The issue here is that we have no way of knowing where the cursor position is
-                    * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
-                    */
-                    if (this.browser.webkit && !this._getDoc().queryCommandEnabled(action)) {
                         this._createCurrentElement('img');
-                        _span = this._getDoc().createElement('span');
-                        _span.innerHTML = value;
-                        this.currentElement[0].parentNode.replaceChild(_span, this.currentElement[0]);
-                        exec = false;
-                    } else if (this.browser.ie) {
-                        _range = this._getRange();
-                        if (_range.item) {
-                            _range.item(0).outerHTML = value;
-                        } else {
-                            _range.pasteHTML(value);
-                        }
-                        exec = false;                    
+                        _img = this._getDoc().createElement('img');
+                        _img.setAttribute('src', value);
+                        YAHOO.util.Dom.addClass(_img, 'yui-img');
+                        this.currentElement[0].parentNode.replaceChild(_img, this.currentElement[0]);
                     }
-                    break;
-                case 'removeformat':
-                    /**
-                    * @knownissue Remove Format issue
-                    * @browser Safari 2.x
-                    * @description There is an issue here with Safari, that it may not always remove the format of the item that is selected.
-                    * Due to the way that Safari 2.x handles ranges, it is very difficult to determine what the selection holds.
-                    * So here we are making the best possible guess and acting on it.
-                    */
-                    if (this.browser.webkit && !this._getDoc().queryCommandEnabled(action)) {
-                        this._createCurrentElement('span');
-                        YAHOO.util.Dom.addClass(this.currentElement[0], 'yui-non');
-                        var re= /<\S[^><]*>/g;
-                        str = this.currentElement[0].innerHTML.replace(re, '');
-                        var _txt = this._getDoc().createTextNode(str);
-                        this.currentElement[0].parentNode.parentNode.replaceChild(_txt, this.currentElement[0].parentNode);
-                        
-                        exec = false;
+                    this.currentElement[0] = _img;
+                    exec = false;
+                }
+            }
+            return [exec];
+        },
+        /**
+        * @method cmd_inserthtml
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('inserthtml') is used.
+        */
+        cmd_inserthtml: function(value) {
+            var exec = true, action = 'inserthtml', _span = null, _range = null;
+            /**
+            * @knownissue
+            * @browser Safari 2.x
+            * @description The issue here is that we have no way of knowing where the cursor position is
+            * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
+            */
+            if (this.browser.webkit && !this._getDoc().queryCommandEnabled(action)) {
+                this._createCurrentElement('img');
+                _span = this._getDoc().createElement('span');
+                _span.innerHTML = value;
+                this.currentElement[0].parentNode.replaceChild(_span, this.currentElement[0]);
+                exec = false;
+            } else if (this.browser.ie) {
+                _range = this._getRange();
+                if (_range.item) {
+                    _range.item(0).outerHTML = value;
+                } else {
+                    _range.pasteHTML(value);
+                }
+                exec = false;                    
+            }
+            return [exec];
+        },
+        /**
+        * @method cmd_list
+        * @param tag The tag of the list you want to create (eg, ul or ol)
+        * @description This is a combined execCommand override method. It is called from the cmd_insertorderedlist and cmd_insertunorderedlist methods.
+        */
+        cmd_list: function(tag) {
+            var exec = true, list = null, li = 0, el = null, str = '',
+                selEl = this._getSelectedElement(), action = 'insertorderedlist';
+                if (tag == 'ul') {
+                    action = 'insertunorderedlist';
+                }
+            /**
+            * @knownissue Safari 2.+ doesn't support ordered and unordered lists
+            * @browser Safari 2.x
+            * The issue with this workaround is that when applied to a set of text
+            * that has BR's in it, Safari may or may not pick up the individual items as
+            * list items. This is fixed in WebKit (Safari 3)
+            */
+            if ((this.browser.webkit && !this._getDoc().queryCommandEnabled(action))) {
+                if (this._isElement(selEl, 'li') && this._isElement(selEl.parentNode, tag)) {
+                    el = selEl.parentNode;
+                    list = this._getDoc().createElement('span');
+                    YAHOO.util.Dom.addClass(list, 'yui-non');
+                    str = '';
+                    var lis = el.getElementsByTagName('li');
+                    for (li = 0; li < lis.length; li++) {
+                        str += '<div>' + lis[li].innerHTML + '</div>';
                     }
-                    break;
-                case 'superscript':
-                case 'subscript':
-                    if (this.browser.webkit) {
-                        tag = action.toLowerCase().substring(0, 3);
-                        if (this._isElement(_selEl, tag)) {
-                            _span = this._swapEl(this.currentElement[0], 'span', function(el) {
-                                el.className = 'yui-non';
-                            });
-                            this._selectNode(_span);
-                        } else {
-                            this._createCurrentElement(tag);
-                            var _sub = this._swapEl(this.currentElement[0], tag);
-                            this._selectNode(_sub);
-                            this.currentElement[0] = _sub;
+                    list.innerHTML = str;
+                    this.currentElement[0] = el;
+                    this.currentElement[0].parentNode.replaceChild(list, this.currentElement[0]);
+                } else {
+                    this._createCurrentElement(tag.toLowerCase());
+                    list = this._getDoc().createElement(tag);
+                    for (li = 0; li < this.currentElement.length; li++) {
+                        var newli = this._getDoc().createElement('li');
+                        newli.innerHTML = this.currentElement[li].innerHTML + '<span class="yui-non"> </span> ';
+                        list.appendChild(newli);
+                        if (li > 0) {
+                            this.currentElement[li].parentNode.removeChild(this.currentElement[li]);
                         }
-                        exec = false;
                     }
-                    break;
-                case 'formatblock':
-                    value = 'blockquote';
-                    if (this.browser.webkit) {
-                        this._createCurrentElement('blockquote');
-                        if (YAHOO.util.Dom.hasClass(this.currentElement[0].parentNode, 'yui-tag-blockquote')) {
-                            _span = this._getDoc().createElement('span');
-                            _span.innerHTML = this.currentElement[0].innerHTML;
-                            YAHOO.util.Dom.addClass(_span, 'yui-non');
-                            this.currentElement[0].parentNode.parentNode.replaceChild(_span, this.currentElement[0].parentNode);
+                    this.currentElement[0].parentNode.replaceChild(list, this.currentElement[0]);
+                    this.currentElement[0] = list;
+                    var _h = this.currentElement[0].firstChild;
+                    _h = Dom.getElementsByClassName('yui-non', 'span', _h)[0];
+                    this._getSelection().setBaseAndExtent(_h, 1, _h, _h.innerText.length);
+                }
+                exec = false;
+            } else {
+                el = this._getSelectedElement();
+                if (this._isElement(el, 'li') && this._isElement(el.parentNode, tag) || (this.browser.ie && this._isElement(this._getRange().parentElement, 'li'))) { //we are in a list..
+                    if (this.browser.ie) {
+                        str = '';
+                        var lis2 = el.parentNode.getElementsByTagName('li');
+                        for (var j = 0; j < lis2.length; j++) {
+                            str += lis2[j].innerHTML + '<br>';
                         }
-                        exec = false;
+                        var newEl = this._getDoc().createElement('span');
+                        newEl.innerHTML = str;
+                        el.parentNode.parentNode.replaceChild(newEl, el.parentNode);
                     } else {
-                        var tar = Event.getTarget(this.currentEvent);
-                        if (this._isElement(tar, 'blockquote')) {
-                            _span = this._getDoc().createElement('span');
-                            _span.innerHTML = tar.innerHTML;
-                            YAHOO.util.Dom.addClass(_span, 'yui-non');
-                            tar.parentNode.replaceChild(_span, tar);
-                            exec = false;
-                        }
+                        this.nodeChange();
+                        this._getDoc().execCommand(action, '', el.parentNode);
+                        this.nodeChange();
                     }
-                    break;
-                case 'indent':
-                case 'outdent':
-                    if (this.browser.webkit || this.browser.ie || this.browser.gecko) {
-                        selEl = this._getSelectedElement();
-                        var _bq = null;
-                        if (this._isElement(selEl, 'blockquote')) {
-                            if (action == 'indent') {
-                                _bq = this._getDoc().createElement('blockquote');
-                                _bq.innerHTML = selEl.innerHTML;
-                                selEl.innerHTML = '';
-                                selEl.appendChild(_bq);
-                                this._selectNode(_bq);
-                            } else {
-                                var par = selEl.parentNode;
-                                if (this._isElement(selEl.parentNode, 'blockquote')) {
-                                    par.innerHTML = selEl.innerHTML;
-                                    this._selectNode(par);
-                                } else {
-                                    _span = this._getDoc().createElement('span');
-                                    _span.innerHTML = selEl.innerHTML;
-                                    YAHOO.util.Dom.addClass(_span, 'yui-non');
-                                    par.replaceChild(_span, selEl);
-                                    this._selectNode(_span);
-                                }
+                    exec = false;
+                }
+                if (this.browser.opera) {
+                    var self = this;
+                    window.setTimeout(function() {
+                        var liso = self._getDoc().getElementsByTagName('li');
+                        for (var i = 0; i < liso.length; i++) {
+                            if (liso[i].innerHTML.toLowerCase() == '<br>') {
+                                liso[i].parentNode.parentNode.removeChild(liso[i].parentNode);
                             }
-                        } else {
-                            if (action == 'indent') {
-                                this._createCurrentElement('blockquote');
-                                _bq = this._getDoc().createElement('blockquote');
-                                _bq.innerHTML = this.currentElement[0].innerHTML;
-                                this.currentElement[0].parentNode.replaceChild(_bq, this.currentElement[0]);
-                                this.currentElement[0] = _bq;
-                                this._selectNode(_bq);
-                            } else {
-                            }
                         }
-                        exec = false;
+                    },30);
+                }
+                if (this.browser.ie && exec) {
+                    var html = '';
+                    if (this._getRange().html) {
+                        html = '<li>' + this._getRange().html+ '</li>';
                     } else {
-                        //action = 'formatblock';
-                        value = 'blockquote';
+                        html = '<li>' + this._getRange().text + '</li>';
                     }
-                    break;
-                case 'insertorderedlist':
-                case 'insertunorderedlist':
-                    /**
-                    * @knownissue Safari 2.+ doesn't support ordered and unordered lists
-                    * @browser Safari 2.x
-                    * The issue with this workaround is that when applied to a set of text
-                    * that has BR's in it, Safari may or may not pick up the individual items as
-                    * list items. This is fixed in WebKit (Safari 3)
-                    */
-                    tag = ((action.toLowerCase() == 'insertorderedlist') ? 'ol' : 'ul');
-                    if ((this.browser.webkit && !this._getDoc().queryCommandEnabled(action))) {
-                        var list = null;
-                        selEl = this._getSelectedElement();
-                        var li = 0;
-                        if (this._isElement(selEl, 'li') && this._isElement(selEl.parentNode, tag)) {
-                            el = selEl.parentNode;
-                            list = this._getDoc().createElement('span');
-                            YAHOO.util.Dom.addClass(list, 'yui-non');
-                            str = '';
-                            var lis = el.getElementsByTagName('li');
-                            for (li = 0; li < lis.length; li++) {
-                                str += '<div>' + lis[li].innerHTML + '</div>';
-                            }
-                            list.innerHTML = str;
-                            this.currentElement[0] = el;
-                        } else {
-                            this._createCurrentElement(tag.toLowerCase());
-                            list = this._getDoc().createElement(tag);
-                            var els = this.currentElement;
-                            for (li = 0; li < this.currentElement.length; li++) {
-                                var newli = this._getDoc().createElement('li');
-                                newli.innerHTML = this.currentElement[li].innerHTML + ' ';
-                                list.appendChild(newli);
-                                if (li > 0) {
-                                    this.currentElement[li].parentNode.removeChild(this.currentElement[li]);
-                                }
-                            }
-                        }
-                        this.currentElement[0].parentNode.replaceChild(list, this.currentElement[0]);
-                        exec = false;
-                    } else {
-                        el = this._getSelectedElement();
-                        if (this._isElement(el, 'li') && this._isElement(el.parentNode, tag) || (this.browser.ie && this._isElement(this._getRange().parentElement, 'li'))) { //we are in a list..
-                            if (this.browser.ie) {
-                                str = '';
-                                var lis2 = el.parentNode.getElementsByTagName('li');
-                                for (var j = 0; j < lis2.length; j++) {
-                                    str += lis2[j].innerHTML + '<br>';
-                                }
-                                var newEl = this._getDoc().createElement('span');
-                                newEl.innerHTML = str;
-                                el.parentNode.parentNode.replaceChild(newEl, el.parentNode);
-                            } else {
-                                this.nodeChange();
-                                this._getDoc().execCommand(action, '', el.parentNode);
-                                this.nodeChange();
-                            }
-                            exec = false;
-                        }
-                        if (this.browser.opera) {
-                            var self = this;
-                            window.setTimeout(function() {
-                                var liso = self._getDoc().getElementsByTagName('li');
-                                for (var i = 0; i < liso.length; i++) {
-                                    if (liso[i].innerHTML.toLowerCase() == '<br>') {
-                                        liso[i].parentNode.parentNode.removeChild(liso[i].parentNode);
-                                    }
-                                }
-                            },30);
-                        }
-                        if (this.browser.ie && exec) {
-                            var html = '';
-                            if (this._getRange().html) {
-                                html = '<li>' + this._getRange().html+ '</li>';
-                            } else {
-                                html = '<li>' + this._getRange().text + '</li>';
-                            }
 
-                            this._getRange().pasteHTML('<' + tag + '>' + html + '</' + tag + '>');
-                            exec = false;
-                        }
-                    }
-                    break;
-                case 'fontname':
-                    selEl = this._getSelectedElement();
-                    this.currentFont = value;
-                    if (selEl && selEl.tagName && !this._hasSelection()) {
-                        YAHOO.util.Dom.setStyle(selEl, 'font-family', value);
-                        exec = false;
-                    }
-                    break;
-                case 'fontsize':
-                    if ((this.currentElement.length > 0) && (!this._hasSelection())) {
-                        YAHOO.util.Dom.setStyle(this.currentElement, 'fontSize', value);
-                    } else if (!this._isElement(this._getSelectedElement(), 'body')) {
-                        YAHOO.util.Dom.setStyle(this._getSelectedElement(), 'fontSize', value);
-                    } else {
-                        this._createCurrentElement('span', {'fontSize': value });
-                    }
+                    this._getRange().pasteHTML('<' + tag + '>' + html + '</' + tag + '>');
                     exec = false;
-                    break;
+                }
             }
-            if (exec) {
-                try {
-                    this._getDoc().execCommand(action, false, value);
-                } catch(e) {
-                }
+            return exec;
+        },
+        /**
+        * @method cmd_insertorderedlist
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('insertorderedlist ') is used.
+        */
+        cmd_insertorderedlist: function(value) {
+            return [this.cmd_list('ol')];
+        },
+        /**
+        * @method cmd_insertunorderedlist 
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('insertunorderedlist') is used.
+        */
+        cmd_insertunorderedlist: function(value) {
+            return [this.cmd_list('ul')];
+        },
+        /**
+        * @method cmd_fontname
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('fontname') is used.
+        */
+        cmd_fontname: function(value) {
+            var exec = true,
+                selEl = this._getSelectedElement();
+
+            this.currentFont = value;
+            if (selEl && selEl.tagName && !this._hasSelection()) {
+                YAHOO.util.Dom.setStyle(selEl, 'font-family', value);
+                exec = false;
+            }
+            return [exec];
+        },
+        /**
+        * @method cmd_fontsize
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('fontsize') is used.
+        */
+        cmd_fontsize: function(value) {
+            if ((this.currentElement.length > 0) && (!this._hasSelection())) {
+                YAHOO.util.Dom.setStyle(this.currentElement, 'fontSize', value);
+            } else if (!this._isElement(this._getSelectedElement(), 'body')) {
+                var el = this._getSelectedElement();
+                YAHOO.util.Dom.setStyle(el, 'fontSize', value);
+                this._selectNode(el);
             } else {
+                this._createCurrentElement('span', {'fontSize': value });
+                this._selectNode(this.currentElement[0]);
             }
-            this.on('afterExecCommand', function() {
-                this.unsubscribeAll('afterExecCommand');
-                this.nodeChange();
-            });
-            this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
-            
+            return [false];
         },
+    /* }}} */
         /**
         * @private
         * @method _swapEl
@@ -5096,8 +5118,7 @@
         */
         _createCurrentElement: function(tagName, tagStyle) {
             tagName = ((tagName) ? tagName : 'a');
-            var sel = this._getSelection(),
-                tar = null,
+            var tar = null,
                 el = [],
                 _doc = this._getDoc();
             
@@ -5164,7 +5185,10 @@
                     * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
                     */
                     el = _elCreate();
-                    if (this._isElement(tar, 'body')) {
+                    if (this._isElement(tar, 'body') || this._isElement(tar, 'html')) {
+                        if (this._isElement(tar, 'html')) {
+                            tar = this._getDoc().body;
+                        }
                         tar.appendChild(el);
                     } else if (tar.nextSibling) {
                         tar.parentNode.insertBefore(el, tar.nextSibling);
@@ -5282,6 +5306,7 @@
         * @description Loads HTML into the editors body
         */
         setEditorHTML: function(html) {
+            html = this._cleanIncomingHTML(html);
             this._getDoc().body.innerHTML = html;
             this.nodeChange();
         },
@@ -5338,6 +5363,19 @@
             this.get('iframe').setStyle('left', '-9999px');
         },
         /**
+        * @method _cleanIncomingHTML
+        * @param {String} html The unfiltered HTML
+        * @description Process the HTML with a few regexes to clean it up and stabilize the input
+        * @returns {String} The filtered HTML
+        */
+        _cleanIncomingHTML: function(html) {
+            html = html.replace(/<strong([^>]*)>/gi, '<b$1>');
+            html = html.replace(/<\/strong>/gi, '</b>');   
+            html = html.replace(/<em([^>]*)>/gi, '<i$1>');
+            html = html.replace(/<\/em>/gi, '</i>');
+            return html;
+        },
+        /**
         * @method cleanHTML
         * @param {String} html The unfiltered HTML
         * @description Process the HTML with a few regexes to clean it up and stabilize the output
@@ -5351,19 +5389,14 @@
             }
             var markup = this.get('markup');
             //Make some backups...
-            if (this.browser.webkit) {
-		        html = html.replace(/<br class="khtml-block-placeholder">/gi, '<YUI_BR>');
-		        html = html.replace(/<br class="webkit-block-placeholder">/gi, '<YUI_BR>');
-            }
-		    html = html.replace(/<br>/gi, '<YUI_BR>');
-		    html = html.replace(/<br\/>/gi, '<YUI_BR>');
-		    html = html.replace(/<br \/>/gi, '<YUI_BR>');
-		    html = html.replace(/<div><YUI_BR><\/div>/gi, '<YUI_BR>');
-		    html = html.replace(/<p>( | )<\/p>/g, '<YUI_BR>');            
-		    html = html.replace(/<p><br> <\/p>/gi, '<YUI_BR>');
-		    html = html.replace(/<p> <\/p>/gi, '<YUI_BR>');
+            html = this.pre_filter_linebreaks(html, markup);
+
 		    html = html.replace(/<img([^>]*)\/>/gi, '<YUI_IMG$1>');
 		    html = html.replace(/<img([^>]*)>/gi, '<YUI_IMG$1>');
+
+		    html = html.replace(/<input([^>]*)\/>/gi, '<YUI_INPUT$1>');
+		    html = html.replace(/<input([^>]*)>/gi, '<YUI_INPUT$1>');
+
 		    html = html.replace(/<ul([^>]*)>/gi, '<YUI_UL$1>');
 		    html = html.replace(/<\/ul>/gi, '<\/YUI_UL>');
 		    html = html.replace(/<blockquote([^>]*)>/gi, '<YUI_BQ$1>');
@@ -5405,28 +5438,117 @@
 		    html = html.replace(/\/ol>/gi, '/ol>');
 		    html = html.replace(/<li/gi, '<li');
 		    html = html.replace(/\/li>/gi, '/li>');
+            html = this.filter_safari(html);
 
-            //Fix stuff we don't want
-	        html = html.replace(/<\/?(body|head|html)[^>]*>/gi, '');
-            //Fix last BR
-	        html = html.replace(/<YUI_BR>$/, '');
-            //Fix last BR in P
-	        html = html.replace(/<YUI_BR><\/p>/g, '</p>');
-            //Fix last BR in LI
-		    html = html.replace(/<YUI_BR><\/li>/gi, '</li>');
+            html = this.filter_internals(html);
 
-            //Safari only regexes
+            html = this.filter_all_rgb(html);
+
+            //Replace our backups with the real thing
+            html = this.post_filter_linebreaks(html, markup);
+
+            if (markup == 'xhtml') {
+		        html = html.replace(/<YUI_IMG([^>]*)>/g, '<img $1/>');
+		        html = html.replace(/<YUI_INPUT([^>]*)>/g, '<input $1/>');
+            } else {
+		        html = html.replace(/<YUI_IMG([^>]*)>/g, '<img $1>');
+		        html = html.replace(/<YUI_INPUT([^>]*)>/g, '<input $1>');
+            }
+		    html = html.replace(/<YUI_UL([^>]*)>/g, '<ul$1>');
+		    html = html.replace(/<\/YUI_UL>/g, '<\/ul>');
+
+            html = this.filter_invalid_lists(html);
+
+		    html = html.replace(/<YUI_BQ([^>]*)>/g, '<blockquote$1>');
+		    html = html.replace(/<\/YUI_BQ>/g, '<\/blockquote>');
+
+            //Trim the output, removing whitespace from the beginning and end
+            html = YAHOO.lang.trim(html);
+
+            if (this.get('removeLineBreaks')) {
+                html = html.replace(/\n/g, '').replace(/\r/g, '');
+                html = html.replace(/  /gi, ' '); //Replace all double spaces and replace with a single
+            }
+            
+            //First empty span
+            if (html.substring(0, 6).toLowerCase() == '<span>')  {
+                html = html.substring(6);
+            }
+            //Last empty span
+            if (html.substring(html.length - 7, html.length).toLowerCase() == '</span>')  {
+                html = html.substring(0, html.length - 7);
+            }
+
+
+            for (var v in this.invalidHTML) {
+                if (YAHOO.lang.hasOwnProperty(this.invalidHTML, v)) {
+                    if (Lang.isObject(v) && v.keepContents) {
+                        html = html.replace(new RegExp('<' + v + '([^>]*)>(.*?)<\/' + v + '>', 'gi'), '$1');
+                    } else {
+                        html = html.replace(new RegExp('<' + v + '([^>]*)>(.*?)<\/' + v + '>', 'gi'), '');
+                    }
+                }
+            }
+
+            this.fireEvent('cleanHTML', { type: 'cleanHTML', target: this, html: html });
+
+            return html;
+        },
+        /**
+        * @method filter_invalid_lists
+        * @param String html The HTML string to filter
+        * @description Filters invalid ol and ul list markup, converts this: <li></li><ol>..</ol> to this: <li></li><li><ol>..</ol></li>
+        * @returns String
+        */
+        filter_invalid_lists: function(html) {
+            html = html.replace(/<\/li>\n/gi, '</li>');
+
+            html = html.replace(/<\/li><ol>/gi, '</li><li><ol>');
+            html = html.replace(/<\/ol>/gi, '</ol></li>');
+            html = html.replace(/<\/ol><\/li>\n/gi, "</ol>\n");
+
+            html = html.replace(/<\/li><ul>/gi, '</li><li><ul>');
+            html = html.replace(/<\/ul>/gi, '</ul></li>');
+            html = html.replace(/<\/ul><\/li>\n/gi, "</ul>\n");
+
+            html = html.replace(/<\/li>/gi, "</li>\n");
+            html = html.replace(/<\/ol>/gi, "</ol>\n");
+            html = html.replace(/<ol>/gi, "<ol>\n");
+            html = html.replace(/<ul>/gi, "<ul>\n");
+            return html;
+        },
+        /**
+        * @method filter_safari
+        * @param String html The HTML string to filter
+        * @description Filters strings specific to Safari
+        * @returns String
+        */
+        filter_safari: function(html) {
             if (this.browser.webkit) {
-                //<DIV><SPAN class="Apple-style-span" style="line-height: normal;">Test THis</SPAN></DIV>
                 html = html.replace(/Apple-style-span/gi, '');
                 html = html.replace(/style="line-height: normal;"/gi, '');
                 //Remove bogus LI's
                 html = html.replace(/<li><\/li>/gi, '');
                 html = html.replace(/<li> <\/li>/gi, '');
+                html = html.replace(/<li>  <\/li>/gi, '');
                 //Remove bogus DIV's
                 html = html.replace(/<div><\/div>/gi, '');
                 html = html.replace(/<div> <\/div>/gi, '');
             }
+            return html;
+        },
+        /**
+        * @method filter_internals
+        * @param String html The HTML string to filter
+        * @description Filters internal RTE strings and bogus attrs we don't want
+        * @returns String
+        */
+        filter_internals: function(html) {
+		    html = html.replace(/\r/g, '');
+            //Fix stuff we don't want
+	        html = html.replace(/<\/?(body|head|html)[^>]*>/gi, '');
+            //Fix last BR in LI
+		    html = html.replace(/<YUI_BR><\/li>/gi, '</li>');
 
 		    html = html.replace(/yui-tag-span/gi, '');
 		    html = html.replace(/yui-tag/gi, '');
@@ -5439,9 +5561,6 @@
 		    html = html.replace(/ class="  "/gi, '');
 		    html = html.replace(/ target=""/gi, '');
 		    html = html.replace(/ title=""/gi, '');
-            for (var i = 0; i < 5; i++) {
-                html = html.replace(new RegExp('<span>(.*?)<\/span>', 'gi'), '$1');
-            }
 
             if (this.browser.ie) {
 		        html = html.replace(/ class= /gi, '');
@@ -5450,26 +5569,90 @@
 		        html = html.replace(/_width="([^>])"/gi, '');
             }
             
-            //Replace our backups with the real thing
+            return html;
+        },
+        /**
+        * @method filter_all_rgb
+        * @param String str The HTML string to filter
+        * @description Converts all RGB color strings found in passed string to a hex color, example: style="color: rgb(0, 255, 0)" converts to style="color: #00ff00"
+        * @returns String
+        */
+        filter_all_rgb: function(str) {
+            var exp = new RegExp("rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)", "gi");
+            var arr = str.match(exp);
+            if (Lang.isArray(arr)) {
+                for (var i = 0; i < arr.length; i++) {
+                    var color = this.filter_rgb(arr[i]);
+                    str = str.replace(arr[i].toString(), color);
+                }
+            }
+            
+            return str;
+        },
+        /**
+        * @method filter_rgb
+        * @param String css The CSS string containing rgb(#,#,#);
+        * @description Converts an RGB color string to a hex color, example: rgb(0, 255, 0) converts to #00ff00
+        * @returns String
+        */
+        filter_rgb: function(css) {
+            if (css.toLowerCase().indexOf('rgb') != -1) {
+                var exp = new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)", "gi");
+                var rgb = css.replace(exp, "$1,$2,$3,$4,$5").split(',');
+            
+                if (rgb.length == 5) {
+                    var r = parseInt(rgb[1], 10).toString(16);
+                    var g = parseInt(rgb[2], 10).toString(16);
+                    var b = parseInt(rgb[3], 10).toString(16);
+
+                    r = r.length == 1 ? '0' + r : r;
+                    g = g.length == 1 ? '0' + g : g;
+                    b = b.length == 1 ? '0' + b : b;
+
+                    css = "#" + r + g + b;
+                }
+            }
+            return css;
+        },
+        /**
+        * @method pre_filter_linebreaks
+        * @param String html The HTML to filter
+        * @param String markup The markup type to filter to
+        * @description HTML Pre Filter
+        * @returns String
+        */
+        pre_filter_linebreaks: function(html, markup) {
+            if (this.browser.webkit) {
+		        html = html.replace(/<br class="khtml-block-placeholder">/gi, '<YUI_BR>');
+		        html = html.replace(/<br class="webkit-block-placeholder">/gi, '<YUI_BR>');
+            }
+		    html = html.replace(/<br>/gi, '<YUI_BR>');
+		    html = html.replace(/<br (.*?)>/gi, '<YUI_BR>');
+		    html = html.replace(/<br\/>/gi, '<YUI_BR>');
+		    html = html.replace(/<br \/>/gi, '<YUI_BR>');
+		    html = html.replace(/<div><YUI_BR><\/div>/gi, '<YUI_BR>');
+		    html = html.replace(/<p>( | )<\/p>/g, '<YUI_BR>');            
+		    html = html.replace(/<p><br> <\/p>/gi, '<YUI_BR>');
+		    html = html.replace(/<p> <\/p>/gi, '<YUI_BR>');
+            //Fix last BR
+	        html = html.replace(/<YUI_BR>$/, '');
+            //Fix last BR in P
+	        html = html.replace(/<YUI_BR><\/p>/g, '</p>');
+            return html;
+        },
+        /**
+        * @method post_filter_linebreaks
+        * @param String html The HTML to filter
+        * @param String markup The markup type to filter to
+        * @description HTML Pre Filter
+        * @returns String
+        */
+        post_filter_linebreaks: function(html, markup) {
             if (markup == 'xhtml') {
 		        html = html.replace(/<YUI_BR>/g, '<br/>');
-		        html = html.replace(/<YUI_IMG([^>]*)>/g, '<img $1/>');
             } else {
 		        html = html.replace(/<YUI_BR>/g, '<br>');
-		        html = html.replace(/<YUI_IMG([^>]*)>/g, '<img $1>');
             }
-		    html = html.replace(/<YUI_UL([^>]*)>/g, '<ul$1>');
-		    html = html.replace(/<\/YUI_UL>/g, '<\/ul>');
-		    html = html.replace(/<YUI_BQ([^>]*)>/g, '<blockquote$1>');
-		    html = html.replace(/<\/YUI_BQ>/g, '<\/blockquote>');
-
-            //Trim the output, removing whitespace from the beginning and end
-            html = html.replace(/^\s+/g, '').replace(/\s+$/g, '');
-
-            if (this.get('removeLineBreaks')) {
-                html = html.replace(/\n/g, '').replace(/\r/g, '');
-                html = html.replace(/  /gi, ' '); //Replace all double spaces and replace with a single
-            }
             return html;
         },
         /**
@@ -5482,6 +5665,1168 @@
         /**
         * @private
         * @method _renderPanel
+        * @description Override Method for Advanced Editor
+        */
+        _renderPanel: function() {
+        },
+        /**
+        * @method openWindow
+        * @description Override Method for Advanced Editor
+        */
+        openWindow: function(win) {
+        },
+        /**
+        * @method moveWindow
+        * @description Override Method for Advanced Editor
+        */
+        moveWindow: function() {
+        },
+        /**
+        * @private
+        * @method _closeWindow
+        * @description Override Method for Advanced Editor
+        */
+        _closeWindow: function() {
+        },
+        /**
+        * @method closeWindow
+        * @description Override Method for Advanced Editor
+        */
+        closeWindow: function() {
+            this.unsubscribeAll('afterExecCommand');
+            this.toolbar.resetAllButtons();
+            this._focusWindow();        
+        },
+        /**
+        * @method destroy
+        * @description Destroys the editor, all of it's elements and objects.
+        * @return {Boolean}
+        */
+        destroy: function() {
+            this.saveHTML();
+            this.toolbar.destroy();
+            this.setStyle('visibility', 'hidden');
+            this.setStyle('position', 'absolute');
+            this.setStyle('top', '-9999px');
+            this.setStyle('left', '-9999px');
+            var textArea = this.get('element');
+            this.get('element_cont').get('parentNode').replaceChild(textArea, this.get('element_cont').get('element'));
+            this.get('element_cont').get('element').innerHTML = '';
+            //Brutal Object Destroy
+            for (var i in this) {
+                if (Lang.hasOwnProperty(this, i)) {
+                    this[i] = null;
+                }
+            }
+            return true;
+        },        
+        /**
+        * @method toString
+        * @description Returns a string representing the editor.
+        * @return {String}
+        */
+        toString: function() {
+            var str = 'SimpleEditor';
+            if (this.get && this.get('element_cont')) {
+                str = 'SimpleEditor (#' + this.get('element_cont').get('id') + ')' + ((this.get('disabled') ? ' Disabled' : ''));
+            }
+            return str;
+        }
+    });
+
+/**
+* @event toolbarLoaded
+* @description Event is fired during the render process directly after the Toolbar is loaded. Allowing you to attach events to the toolbar. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event cleanHTML
+* @description Event is fired after the cleanHTML method is called.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event afterRender
+* @description Event is fired after the render process finishes. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorContentLoaded
+* @description Event is fired after the editor iframe's document fully loads and fires it's onload event. From here you can start injecting your own things into the document. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorMouseUp
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorMouseDown
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorDoubleClick
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorKeyUp
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorKeyPress
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorKeyDown
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event beforeNodeChange
+* @description Event fires at the beginning of the nodeChange process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event afterNodeChange
+* @description Event fires at the end of the nodeChange process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event beforeExecCommand
+* @description Event fires at the beginning of the execCommand process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event afterExecCommand
+* @description Event fires at the end of the execCommand process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+
+/**
+     * @description Singleton object used to track the open window objects and panels across the various open editors
+     * @class EditorInfo
+     * @static
+    */
+    YAHOO.widget.EditorInfo = {
+        /**
+        * @private
+        * @property _instances
+        * @description A reference to all editors on the page.
+        * @type Object
+        */
+        _instances: {},
+        /**
+        * @private
+        * @property window
+        * @description A reference to the currently open window object in any editor on the page.
+        * @type Object <a href="YAHOO.widget.EditorWindow.html">YAHOO.widget.EditorWindow</a>
+        */
+        window: {},
+        /**
+        * @private
+        * @property panel
+        * @description A reference to the currently open panel in any editor on the page.
+        * @type Object <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>
+        */
+        panel: null,
+        /**
+        * @method getEditorById
+        * @description Returns a reference to the Editor object associated with the given textarea
+        * @param {String/HTMLElement} id The id or reference of the textarea to return the Editor instance of
+        * @returns Object <a href="YAHOO.widget.Editor.html">YAHOO.widget.Editor</a>
+        */
+        getEditorById: function(id) {
+            if (!YAHOO.lang.isString(id)) {
+                //Not a string, assume a node Reference
+                id = id.id;
+            }
+            if (this._instances[id]) {
+                return this._instances[id];
+            }
+            return false;
+        },
+        /**
+        * @method toString
+        * @description Returns a string representing the EditorInfo.
+        * @return {String}
+        */
+        toString: function() {
+            var len = 0;
+            for (var i in this._instances) {
+                len++;
+            }
+            return 'Editor Info (' + len + ' registered intance' + ((len > 1) ? 's' : '') + ')';
+        }
+    };
+
+
+
+    
+})();
+/**
+ * @module editor
+ * @description <p>The Rich Text Editor is a UI control that replaces a standard HTML textarea; it allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like bold and italic text, and drag-and-drop inclusion and sizing of images. The Rich Text Editor's toolbar is extensible via a plugin architecture so that advanced implementations can achieve a high degree of customization.</p>
+ * @namespace YAHOO.widget
+ * @requires yahoo, dom, element, event, container_core, simpleeditor
+ * @optional dragdrop, animation, menu, button
+ * @beta
+ */
+
+(function() {
+var Dom = YAHOO.util.Dom,
+    Event = YAHOO.util.Event,
+    Lang = YAHOO.lang,
+    Toolbar = YAHOO.widget.Toolbar;
+
+    /**
+     * The Rich Text Editor is a UI control that replaces a standard HTML textarea; it allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like bold and italic text, and drag-and-drop inclusion and sizing of images. The Rich Text Editor's toolbar is extensible via a plugin architecture so that advanced implementations can achieve a high degree of customization.
+     * @constructor
+     * @class Editor
+     * @extends YAHOO.widget.SimpleEditor
+     * @param {String/HTMLElement} el The textarea element to turn into an editor.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+    
+    YAHOO.widget.Editor = function(el, attrs) {
+        
+        var oConfig = {
+            element: null,
+            attributes: (attrs || {})
+        }, id = null;
+
+        if (Lang.isString(el)) {
+            id = el;
+        } else {
+            id = el.id;
+        }
+        oConfig.element = el;
+        YAHOO.widget.Editor.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
+    };
+
+    /**
+    * @private
+    * @method _cleanClassName
+    * @description Makes a useable classname from dynamic data, by dropping it to lowercase and replacing spaces with -'s.
+    * @param {String} str The classname to clean up
+    * @returns {String}
+    */
+    function _cleanClassName(str) {
+        return str.replace(/ /g, '-').toLowerCase();
+    }
+
+
+    YAHOO.extend(YAHOO.widget.Editor, YAHOO.widget.SimpleEditor, {
+        /**
+        * @property STR_BEFORE_EDITOR
+        * @description The accessibility string for the element before the iFrame
+        * @type String
+        */
+        STR_BEFORE_EDITOR: 'This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Control + Shift + T to place focus on the toolbar and navigate between option heading names. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift [ aligns text left</li> <li>Control Shift | centers text</li> <li>Control Shift ] aligns text right</li> <li>Control Shift L adds an HTML link</li> <li>To exit this text editor use the keyboard shortcut Control + Shift + ESC.</li></ul>',    
+        /**
+        * @property STR_CLOSE_WINDOW
+        * @description The Title of the close button in the Editor Window
+        * @type String
+        */
+        STR_CLOSE_WINDOW: 'Close Window',
+        /**
+        * @property STR_CLOSE_WINDOW_NOTE
+        * @description A note appearing in the Editor Window to tell the user that the Escape key will close the window
+        * @type String
+        */
+        STR_CLOSE_WINDOW_NOTE: 'To close this window use the Control + Shift + W key',
+        /**
+        * @property STR_IMAGE_PROP_TITLE
+        * @description The title for the Image Property Editor Window
+        * @type String
+        */
+        STR_IMAGE_PROP_TITLE: 'Image Options',
+        /**
+        * @property STR_IMAGE_URL
+        * @description The label string for Image URL
+        * @type String
+        */
+        STR_IMAGE_URL: 'Image Url',
+        /**
+        * @property STR_IMAGE_TITLE
+        * @description The label string for Image Description
+        * @type String
+        */
+        STR_IMAGE_TITLE: 'Description',
+        /**
+        * @property STR_IMAGE_SIZE
+        * @description The label string for Image Size
+        * @type String
+        */
+        STR_IMAGE_SIZE: 'Size',
+        /**
+        * @property STR_IMAGE_ORIG_SIZE
+        * @description The label string for Original Image Size
+        * @type String
+        */
+        STR_IMAGE_ORIG_SIZE: 'Original Size',
+        /**
+        * @property STR_IMAGE_COPY
+        * @description The label string for the image copy and paste message for Opera and Safari
+        * @type String
+        */
+        STR_IMAGE_COPY: '<span class="tip"><span class="icon icon-info"></span><strong>Note:</strong>To move this image just highlight it, cut, and paste where ever you\'d like.</span>',
+        /**
+        * @property STR_IMAGE_PADDING
+        * @description The label string for the image padding.
+        * @type String
+        */
+        STR_IMAGE_PADDING: 'Padding',
+        /**
+        * @property STR_IMAGE_BORDER
+        * @description The label string for the image border.
+        * @type String
+        */
+        STR_IMAGE_BORDER: 'Border',
+        /**
+        * @property STR_IMAGE_TEXTFLOW
+        * @description The label string for the image text flow.
+        * @type String
+        */
+        STR_IMAGE_TEXTFLOW: 'Text Flow',
+        /**
+        * @property STR_LOCAL_FILE_WARNING
+        * @description The label string for the local file warning.
+        * @type String
+        */
+        STR_LOCAL_FILE_WARNING: '<span class="tip"><span class="icon icon-warn"></span><strong>Note:</strong>This image/link points to a file on your computer and will not be accessible to others on the internet.</span>',
+        /**
+        * @property STR_LINK_PROP_TITLE
+        * @description The label string for the Link Property Editor Window.
+        * @type String
+        */
+        STR_LINK_PROP_TITLE: 'Link Options',
+        /**
+        * @property STR_LINK_PROP_REMOVE
+        * @description The label string for the Remove link from text link inside the property editor.
+        * @type String
+        */
+        STR_LINK_PROP_REMOVE: 'Remove link from text',
+        /**
+        * @property STR_LINK_NEW_WINDOW
+        * @description The string for the open in a new window label.
+        * @type String
+        */
+        STR_LINK_NEW_WINDOW: 'Open in a new window.',
+        /**
+        * @property STR_LINK_TITLE
+        * @description The string for the link description.
+        * @type String
+        */
+        STR_LINK_TITLE: 'Description',
+        /**
+        * @protected
+        * @property CLASS_LOCAL_FILE
+        * @description CSS class applied to an element when it's found to have a local url.
+        * @type String
+        */
+        CLASS_LOCAL_FILE: 'warning-localfile',
+        /**
+        * @protected
+        * @property CLASS_HIDDEN
+        * @description CSS class applied to the body when the hiddenelements button is pressed.
+        * @type String
+        */
+        CLASS_HIDDEN: 'yui-hidden',
+        /** 
+        * @method init
+        * @description The Editor class' initialization method
+        */
+        init: function(p_oElement, p_oAttributes) {
+            YAHOO.widget.Editor.superclass.init.call(this, p_oElement, p_oAttributes);
+        },
+        /**
+        * @method initAttributes
+        * @description Initializes all of the configuration attributes used to create 
+        * the editor.
+        * @param {Object} attr Object literal specifying a set of 
+        * configuration attributes used to create the editor.
+        */
+        initAttributes: function(attr) {
+            YAHOO.widget.Editor.superclass.initAttributes.call(this, attr);
+
+            /**
+            * @attribute localFileWarning
+            * @description Should we throw the warning if we detect a file that is local to their machine?
+            * @default true
+            * @type Boolean
+            */            
+            this.setAttributeConfig('localFileWarning', {
+                value: attr.locaFileWarning || true
+            });
+
+            /**
+            * @attribute hiddencss
+            * @description The CSS used to show/hide hidden elements on the page, these rules must be prefixed with the class provided in <code>this.CLASS_HIDDEN</code>
+            * @default <code><pre>
+            .yui-hidden font, .yui-hidden strong, .yui-hidden b, .yui-hidden em, .yui-hidden i, .yui-hidden u, .yui-hidden div, .yui-hidden p, .yui-hidden span, .yui-hidden img, .yui-hidden ul, .yui-hidden ol, .yui-hidden li, .yui-hidden table {
+                border: 1px dotted #ccc;
+            }
+            .yui-hidden .yui-non {
+                border: none;
+            }
+            .yui-hidden img {
+                padding: 2px;
+            }</pre></code>
+            * @type String
+            */            
+            this.setAttributeConfig('hiddencss', {
+                value: attr.hiddencss || '.yui-hidden font, .yui-hidden strong, .yui-hidden b, .yui-hidden em, .yui-hidden i, .yui-hidden u, .yui-hidden div,.yui-hidden p,.yui-hidden span,.yui-hidden img, .yui-hidden ul, .yui-hidden ol, .yui-hidden li, .yui-hidden table { border: 1px dotted #ccc; } .yui-hidden .yui-non { border: none; } .yui-hidden img { padding: 2px; }',
+                writeOnce: true
+            });
+           
+        },
+        /**
+        * @private
+        * @method _fixNodes
+        * @description Fix href and imgs as well as remove invalid HTML.
+        */
+        _fixNodes: function() {
+            YAHOO.widget.Editor.superclass._fixNodes.call(this);
+            var url = '';
+
+            var imgs = this._getDoc().getElementsByTagName('img');
+            for (var im = 0; im < imgs.length; im++) {
+                if (imgs[im].getAttribute('href', 2)) {
+                    url = imgs[im].getAttribute('src', 2);
+                    if (this._isLocalFile(url)) {
+                        Dom.addClass(imgs[im], this.CLASS_LOCAL_FILE);
+                    } else {
+                        Dom.removeClass(imgs[im], this.CLASS_LOCAL_FILE);
+                    }
+                }
+            }
+            var fakeAs = this._getDoc().body.getElementsByTagName('a');
+            for (var a = 0; a < fakeAs.length; a++) {
+                if (fakeAs[a].getAttribute('href', 2)) {
+                    url = fakeAs[a].getAttribute('href', 2);
+                    if (this._isLocalFile(url)) {
+                        Dom.addClass(fakeAs[a], this.CLASS_LOCAL_FILE);
+                    } else {
+                        Dom.removeClass(fakeAs[a], this.CLASS_LOCAL_FILE);
+                    }
+                }
+            }
+        },
+        /**
+        * @private
+        * @property _disabled
+        * @description The Toolbar items that should be disabled if there is no selection present in the editor.
+        * @type Array
+        */
+        _disabled: [ 'createlink', 'forecolor', 'backcolor', 'fontname', 'fontsize', 'superscript', 'subscript', 'removeformat', 'heading', 'indent' ],
+        /**
+        * @private
+        * @property _alwaysDisabled
+        * @description The Toolbar items that should ALWAYS be disabled event if there is a selection present in the editor.
+        * @type Object
+        */
+        _alwaysDisabled: { 'outdent': true },
+        /**
+        * @private
+        * @property _alwaysEnabled
+        * @description The Toolbar items that should ALWAYS be enabled event if there isn't a selection present in the editor.
+        * @type Object
+        */
+        _alwaysEnabled: { hiddenelements: true },
+        /**
+        * @property _defaultToolbar
+        * @private
+        * @description Default toolbar config.
+        * @type Object
+        */
+        _defaultToolbar: {
+            collapse: true,
+            titlebar: 'Text Editing Tools',
+            draggable: false,
+            buttonType: 'advanced',
+            buttons: [
+                { group: 'fontstyle', label: 'Font Name and Size',
+                    buttons: [
+                        { type: 'select', label: 'Arial', value: 'fontname', disabled: true,
+                            menu: [
+                                { text: 'Arial', checked: true },
+                                { text: 'Arial Black' },
+                                { text: 'Comic Sans MS' },
+                                { text: 'Courier New' },
+                                { text: 'Lucida Console' },
+                                { text: 'Tahoma' },
+                                { text: 'Times New Roman' },
+                                { text: 'Trebuchet MS' },
+                                { text: 'Verdana' }
+                            ]
+                        },
+                        { type: 'spin', label: '13', value: 'fontsize', range: [ 9, 75 ], disabled: true }
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'textstyle', label: 'Font Style',
+                    buttons: [
+                        { type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' },
+                        { type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' },
+                        { type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' },
+                        { type: 'separator' },
+                        { type: 'push', label: 'Subscript', value: 'subscript', disabled: true },
+                        { type: 'push', label: 'Superscript', value: 'superscript', disabled: true },
+                        { type: 'separator' },
+                        { type: 'color', label: 'Font Color', value: 'forecolor', disabled: true },
+                        { type: 'color', label: 'Background Color', value: 'backcolor', disabled: true },
+                        { type: 'separator' },
+                        { type: 'push', label: 'Remove Formatting', value: 'removeformat', disabled: true },
+                        { type: 'push', label: 'Show/Hide Hidden Elements', value: 'hiddenelements' }
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'alignment', label: 'Alignment',
+                    buttons: [
+                        { type: 'push', label: 'Align Left CTRL + SHIFT + [', value: 'justifyleft' },
+                        { type: 'push', label: 'Align Center CTRL + SHIFT + |', value: 'justifycenter' },
+                        { type: 'push', label: 'Align Right CTRL + SHIFT + ]', value: 'justifyright' },
+                        { type: 'push', label: 'Justify', value: 'justifyfull' }
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'parastyle', label: 'Paragraph Style',
+                    buttons: [
+                    { type: 'select', label: 'Normal', value: 'heading', disabled: true,
+                        menu: [
+                            { text: 'Normal', value: 'none', checked: true },
+                            { text: 'Header 1', value: 'h1' },
+                            { text: 'Header 2', value: 'h2' },
+                            { text: 'Header 3', value: 'h3' },
+                            { text: 'Header 4', value: 'h4' },
+                            { text: 'Header 5', value: 'h5' },
+                            { text: 'Header 6', value: 'h6' }
+                        ]
+                    }
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'indentlist', label: 'Indenting and Lists',
+                    buttons: [
+                        { type: 'push', label: 'Indent', value: 'indent', disabled: true },
+                        { type: 'push', label: 'Outdent', value: 'outdent', disabled: true },
+                        { type: 'push', label: 'Create an Unordered List', value: 'insertunorderedlist' },
+                        { type: 'push', label: 'Create an Ordered List', value: 'insertorderedlist' }
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'insertitem', label: 'Insert Item',
+                    buttons: [
+                        { type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true },
+                        { type: 'push', label: 'Insert Image', value: 'insertimage' }
+                    ]
+                }
+            ]
+        },
+        /**
+        * @private
+        * @method _handleKeyDown
+        * @param {Event} ev The event we are working on.
+        * @description Override method that handles some new keydown events inside the iFrame document.
+        */
+        _handleKeyDown: function(ev) {
+            YAHOO.widget.Editor.superclass._handleKeyDown.call(this, ev);
+            var doExec = false,
+                action = null,
+                exec = false;
+
+            if (ev.shiftKey && ev.ctrlKey) {
+                doExec = true;
+            }
+            switch (ev.keyCode) {
+                case 219: //Left
+                    action = 'justifyleft';
+                    break;
+                case 220: //Center
+                    action = 'justifycenter';
+                    break;
+                case 221: //Right
+                    action = 'justifyright';
+                    break;
+            }
+            if (doExec && action) {
+                this.execCommand(action, null);
+                Event.stopEvent(ev);
+                this.nodeChange();
+            }
+        },        
+        _handleCreateLinkClick: function() {
+            var el = this._getSelectedElement();
+            if (this._isElement(el, 'img')) {
+                this.STOP_EXEC_COMMAND = true;
+                this.currentElement[0] = el;
+                this.toolbar.fireEvent('insertimageClick', { type: 'insertimageClick', target: this.toolbar });
+                this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
+                return false;
+            }
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue('createlink')) {
+                    return false;
+                }
+            }
+            
+            this.on('afterExecCommand', function() {
+
+                var win = new YAHOO.widget.EditorWindow('createlink', {
+                    width: '350px'
+                });
+                
+                var el = this.currentElement[0],
+                    url = '',
+                    title = '',
+                    target = '',
+                    localFile = false;
+                if (el) {
+                    if (el.getAttribute('href', 2) !== null) {
+                        url = el.getAttribute('href', 2);
+                        if (this._isLocalFile(url)) {
+                            //Local File throw Warning
+                            win.setFooter(this.STR_LOCAL_FILE_WARNING);
+                            localFile = true;
+                        } else {
+                            win.setFooter(' ');
+                        }
+                    }
+                    if (el.getAttribute('title') !== null) {
+                        title = el.getAttribute('title');
+                    }
+                    if (el.getAttribute('target') !== null) {
+                        target = el.getAttribute('target');
+                    }
+                }
+                var str = '<label for="createlink_url"><strong>' + this.STR_LINK_URL + ':</strong> <input type="text" name="createlink_url" id="createlink_url" value="' + url + '"' + ((localFile) ? ' class="warning"' : '') + '></label>';
+                str += '<label for="createlink_target"><strong> </strong><input type="checkbox" name="createlink_target_" id="createlink_target" value="_blank"' + ((target) ? ' checked' : '') + '> ' + this.STR_LINK_NEW_WINDOW + '</label>';
+                str += '<label for="createlink_title"><strong>' + this.STR_LINK_TITLE + ':</strong> <input type="text" name="createlink_title" id="createlink_title" value="' + title + '"></label>';
+                
+                var body = document.createElement('div');
+                body.innerHTML = str;
+
+                var unlinkCont = document.createElement('div');
+                unlinkCont.className = 'removeLink';
+                var unlink = document.createElement('a');
+                unlink.href = '#';
+                unlink.innerHTML = this.STR_LINK_PROP_REMOVE;
+                unlink.title = this.STR_LINK_PROP_REMOVE;
+                Event.on(unlink, 'click', function(ev) {
+                    Event.stopEvent(ev);
+                    this.execCommand('unlink');
+                    this.closeWindow();
+                }, this, true);
+                unlinkCont.appendChild(unlink);
+                body.appendChild(unlinkCont);
+
+                win.setHeader(this.STR_LINK_PROP_TITLE);
+                win.setBody(body);
+
+                Event.onAvailable('createlink_url', function() {
+                    window.setTimeout(function() {
+                        try {
+                            YAHOO.util.Dom.get('createlink_url').focus();
+                        } catch (e) {}
+                    }, 50);
+                    Event.on('createlink_url', 'blur', function() {
+                        var url = Dom.get('createlink_url');
+                        if (this._isLocalFile(url.value)) {
+                            //Local File throw Warning
+                            Dom.addClass(url, 'warning');
+                            this.get('panel').setFooter(this.STR_LOCAL_FILE_WARNING);
+                        } else {
+                            Dom.removeClass(url, 'warning');
+                            this.get('panel').setFooter(' ');
+                        }
+                    }, this, true);
+                }, this, true);
+
+                this.openWindow(win);
+            });
+        },
+        /**
+        * @private
+        * @method _handleCreateLinkWindowClose
+        * @description Handles the closing of the Link Properties Window.
+        */
+        _handleCreateLinkWindowClose: function() {
+            var url = Dom.get('createlink_url'),
+                target = Dom.get('createlink_target'),
+                title = Dom.get('createlink_title'),
+                el = this.currentElement[0],
+                a = el;
+            if (url && url.value) {
+                var urlValue = url.value;
+                if ((urlValue.indexOf(':/'+'/') == -1) && (urlValue.substring(0,1) != '/') && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                    if ((urlValue.indexOf('@') != -1) && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                        //Found an @ sign, prefix with mailto:
+                        urlValue = 'mailto:' + urlValue;
+                    } else {
+                        /* :// not found adding */
+                        if (urlValue.substring(0, 1) != '#') {
+                            urlValue = 'http:/'+'/' + urlValue;
+                        }
+                        
+                    }
+                }
+                el.setAttribute('href', urlValue);
+                if (target.checked) {
+                    el.setAttribute('target', target.value);
+                } else {
+                    el.setAttribute('target', '');
+                }
+                el.setAttribute('title', ((title.value) ? title.value : ''));
+
+            } else {
+                var _span = this._getDoc().createElement('span');
+                _span.innerHTML = el.innerHTML;
+                Dom.addClass(_span, 'yui-non');
+                el.parentNode.replaceChild(_span, el);
+            }
+            this.nodeChange();
+            this.currentElement = [];
+        },
+        /**
+        * @private
+        * @method _handleInsertImageClick
+        * @description Opens the Image Properties Window when the insert Image button is clicked or an Image is Double Clicked.
+        */
+        _handleInsertImageClick: function() {
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue('insertimage')) {
+                    return false;
+                }
+            }
+            this._setBusy();
+            this.on('afterExecCommand', function() {
+                var el = this.currentElement[0],
+                    body = null,
+                    link = '',
+                    target = '',
+                    title = '',
+                    src = '',
+                    align = '',
+                    height = 75,
+                    width = 75,
+                    padding = 0,
+                    oheight = 0,
+                    owidth = 0,
+                    blankimage = false,
+                    win = new YAHOO.widget.EditorWindow('insertimage', {
+                        width: '415px'
+                    });
+
+                if (!el) {
+                    el = this._getSelectedElement();
+                }
+                if (el) {
+                    if (el.getAttribute('src')) {
+                        src = el.getAttribute('src', 2);
+                        if (src.indexOf(this.get('blankimage')) != -1) {
+                            src = this.STR_IMAGE_HERE;
+                            blankimage = true;
+                        }
+                    }
+                    if (el.getAttribute('alt', 2)) {
+                        title = el.getAttribute('alt', 2);
+                    }
+                    if (el.getAttribute('title', 2)) {
+                        title = el.getAttribute('title', 2);
+                    }
+
+                    if (el.parentNode && this._isElement(el.parentNode, 'a')) {
+                        link = el.parentNode.getAttribute('href', 2);
+                        if (el.parentNode.getAttribute('target') !== null) {
+                            target = el.parentNode.getAttribute('target');
+                        }
+                    }
+                    height = parseInt(el.height, 10);
+                    width = parseInt(el.width, 10);
+                    if (el.style.height) {
+                        height = parseInt(el.style.height, 10);
+                    }
+                    if (el.style.width) {
+                        width = parseInt(el.style.width, 10);
+                    }
+                    if (el.style.margin) {
+                        padding = parseInt(el.style.margin, 10);
+                    }
+                    if (!el._height) {
+                        el._height = height;
+                    }
+                    if (!el._width) {
+                        el._width = width;
+                    }
+                    oheight = el._height;
+                    owidth = el._width;
+                }
+                var str = '<label for="insertimage_url"><strong>' + this.STR_IMAGE_URL + ':</strong> <input type="text" id="insertimage_url" value="' + src + '" size="40"></label>';
+                body = document.createElement('div');
+                body.innerHTML = str;
+
+                var tbarCont = document.createElement('div');
+                tbarCont.id = 'img_toolbar';
+                body.appendChild(tbarCont);
+
+                var str2 = '<label for="insertimage_title"><strong>' + this.STR_IMAGE_TITLE + ':</strong> <input type="text" id="insertimage_title" value="' + title + '" size="40"></label>';
+                str2 += '<label for="insertimage_link"><strong>' + this.STR_LINK_URL + ':</strong> <input type="text" name="insertimage_link" id="insertimage_link" value="' + link + '"></label>';
+                str2 += '<label for="insertimage_target"><strong> </strong><input type="checkbox" name="insertimage_target_" id="insertimage_target" value="_blank"' + ((target) ? ' checked' : '') + '> ' + this.STR_LINK_NEW_WINDOW + '</label>';
+                var div = document.createElement('div');
+                div.innerHTML = str2;
+                body.appendChild(div);
+                win.cache = body;
+
+                var tbar = new YAHOO.widget.Toolbar(tbarCont, {
+                    /* {{{ */ 
+                    buttonType: this._defaultToolbar.buttonType,
+                    buttons: [
+                        { group: 'textflow', label: this.STR_IMAGE_TEXTFLOW + ':',
+                            buttons: [
+                                { type: 'push', label: 'Left', value: 'left' },
+                                { type: 'push', label: 'Inline', value: 'inline' },
+                                { type: 'push', label: 'Block', value: 'block' },
+                                { type: 'push', label: 'Right', value: 'right' }
+                            ]
+                        },
+                        { type: 'separator' },
+                        { group: 'padding', label: this.STR_IMAGE_PADDING + ':',
+                            buttons: [
+                                { type: 'spin', label: ''+padding, value: 'padding', range: [0, 50] }
+                            ]
+                        },
+                        { type: 'separator' },
+                        { group: 'border', label: this.STR_IMAGE_BORDER + ':',
+                            buttons: [
+                                { type: 'select', label: 'Border Size', value: 'bordersize',
+                                    menu: [
+                                        { text: 'none', value: '0', checked: true },
+                                        { text: '1px', value: '1' },
+                                        { text: '2px', value: '2' },
+                                        { text: '3px', value: '3' },
+                                        { text: '4px', value: '4' },
+                                        { text: '5px', value: '5' }
+                                    ]
+                                },
+                                { type: 'select', label: 'Border Type', value: 'bordertype', disabled: true,
+                                    menu: [
+                                        { text: 'Solid', value: 'solid', checked: true },
+                                        { text: 'Dashed', value: 'dashed' },
+                                        { text: 'Dotted', value: 'dotted' }
+                                    ]
+                                },
+                                { type: 'color', label: 'Border Color', value: 'bordercolor', disabled: true }
+                            ]
+                        }
+                    ]
+                    /* }}} */
+                });
+                
+                var bsize = '0';
+                var btype = 'solid';
+                if (el.style.borderLeftWidth) {
+                    bsize = parseInt(el.style.borderLeftWidth, 10);
+                }
+                if (el.style.borderLeftStyle) {
+                    btype = el.style.borderLeftStyle;
+                }
+                var bs_button = tbar.getButtonByValue('bordersize');
+                var bSizeStr = ((parseInt(bsize, 10) > 0) ? '' : 'none');
+                bs_button.set('label', '<span class="yui-toolbar-bordersize-' + bsize + '">'+bSizeStr+'</span>');
+                this._updateMenuChecked('bordersize', bsize, tbar);
+
+                var bt_button = tbar.getButtonByValue('bordertype');
+                bt_button.set('label', '<span class="yui-toolbar-bordertype-' + btype + '"></span>');
+                this._updateMenuChecked('bordertype', btype, tbar);
+                if (parseInt(bsize, 10) > 0) {
+                    tbar.enableButton(bt_button);
+                    tbar.enableButton(bs_button);
+                }
+
+                var cont = tbar.get('cont');
+                var hw = document.createElement('div');
+                hw.className = 'yui-toolbar-group yui-toolbar-group-height-width height-width';
+                hw.innerHTML = '<h3>' + this.STR_IMAGE_SIZE + ':</h3>';
+                var orgSize = '';
+                if ((height != oheight) || (width != owidth)) {
+                    orgSize = '<span class="info">' + this.STR_IMAGE_ORIG_SIZE + '<br>'+ owidth +' x ' + oheight + '</span>';
+                }
+                hw.innerHTML += '<span><input type="text" size="3" value="'+width+'" id="insertimage_width"> x <input type="text" size="3" value="'+height+'" id="insertimage_height"></span>' + orgSize;
+                cont.insertBefore(hw, cont.firstChild);
+
+                Event.onAvailable('insertimage_width', function() {
+                    Event.on('insertimage_width', 'blur', function() {
+                        var value = parseInt(Dom.get('insertimage_width').value, 10);
+                        if (value > 5) {
+                            el.style.width = value + 'px';
+                            this.moveWindow();
+                        }
+                    }, this, true);
+                }, this, true);
+                Event.onAvailable('insertimage_height', function() {
+                    Event.on('insertimage_height', 'blur', function() {
+                        var value = parseInt(Dom.get('insertimage_height').value, 10);
+                        if (value > 5) {
+                            el.style.height = value + 'px';
+                            this.moveWindow();
+                        }
+                    }, this, true);
+                }, this, true);
+
+                if ((el.align == 'right') || (el.align == 'left')) {
+                    tbar.selectButton(el.align);
+                } else if (el.style.display == 'block') {
+                    tbar.selectButton('block');
+                } else {
+                    tbar.selectButton('inline');
+                }
+                if (parseInt(el.style.marginLeft, 10) > 0) {
+                     tbar.getButtonByValue('padding').set('label', ''+parseInt(el.style.marginLeft, 10));
+                }
+                if (el.style.borderSize) {
+                    tbar.selectButton('bordersize');
+                    tbar.selectButton(parseInt(el.style.borderSize, 10));
+                }
+
+                tbar.on('colorPickerClicked', function(o) {
+                    var size = '1', type = 'solid', color = 'black';
+
+                    if (el.style.borderLeftWidth) {
+                        size = parseInt(el.style.borderLeftWidth, 10);
+                    }
+                    if (el.style.borderLeftStyle) {
+                        type = el.style.borderLeftStyle;
+                    }
+                    if (el.style.borderLeftColor) {
+                        color = el.style.borderLeftColor;
+                    }
+                    var borderString = size + 'px ' + type + ' #' + o.color;
+                    el.style.border = borderString;
+                }, this.toolbar, true);
+
+                tbar.on('buttonClick', function(o) {
+                    var value = o.button.value,
+                        borderString = '';
+                    if (o.button.menucmd) {
+                        value = o.button.menucmd;
+                    }
+                    var size = '1', type = 'solid', color = 'black';
+
+                    /* All border calcs are done on the left border
+                        since our default interface only supports
+                        one border size/type and color */
+                    if (el.style.borderLeftWidth) {
+                        size = parseInt(el.style.borderLeftWidth, 10);
+                    }
+                    if (el.style.borderLeftStyle) {
+                        type = el.style.borderLeftStyle;
+                    }
+                    if (el.style.borderLeftColor) {
+                        color = el.style.borderLeftColor;
+                    }
+                    switch(value) {
+                        case 'bordersize':
+                            if (this.browser.webkit && this._lastImage) {
+                                Dom.removeClass(this._lastImage, 'selected');
+                                this._lastImage = null;
+                            }
+
+                            borderString = parseInt(o.button.value, 10) + 'px ' + type + ' ' + color;
+                            el.style.border = borderString;
+                            if (parseInt(o.button.value, 10) > 0) {
+                                tbar.enableButton('bordertype');
+                                tbar.enableButton('bordercolor');
+                            } else {
+                                tbar.disableButton('bordertype');
+                                tbar.disableButton('bordercolor');
+                            }
+                            break;
+                        case 'bordertype':
+                            if (this.browser.webkit && this._lastImage) {
+                                Dom.removeClass(this._lastImage, 'selected');
+                                this._lastImage = null;
+                            }
+                            borderString = size + 'px ' + o.button.value + ' ' + color;
+                            el.style.border = borderString;
+                            break;
+                        case 'right':
+                        case 'left':
+                            tbar.deselectAllButtons();
+                            el.style.display = '';
+                            el.align = o.button.value;
+                            break;
+                        case 'inline':
+                            tbar.deselectAllButtons();
+                            el.style.display = '';
+                            el.align = '';
+                            break;
+                        case 'block':
+                            tbar.deselectAllButtons();
+                            el.style.display = 'block';
+                            el.align = 'center';
+                            break;
+                        case 'padding':
+                            var _button = tbar.getButtonById(o.button.id);
+                            el.style.margin = _button.get('label') + 'px';
+                            break;
+                    }
+                    tbar.selectButton(o.button.value);
+                    this.moveWindow();
+                }, this, true);
+
+                win.setHeader(this.STR_IMAGE_PROP_TITLE);
+                win.setBody(body);
+                if ((this.browser.webkit && !this.browser.webkit3) || this.browser.opera) {
+                    win.setFooter(this.STR_IMAGE_COPY);
+                }
+                this.openWindow(win);
+
+                //Set event after openWindow..
+                Event.onAvailable('insertimage_url', function() {
+
+                    this.toolbar.selectButton('insertimage');
+
+                    window.setTimeout(function() {
+                        YAHOO.util.Dom.get('insertimage_url').focus();
+                        if (blankimage) {
+                            YAHOO.util.Dom.get('insertimage_url').select();
+                        }
+                    }, 50);
+                    
+                    if (this.get('localFileWarning')) {
+                        Event.on('insertimage_link', 'blur', function() {
+                            var url = Dom.get('insertimage_link');
+                            if (this._isLocalFile(url.value)) {
+                                //Local File throw Warning
+                                Dom.addClass(url, 'warning');
+                                this.get('panel').setFooter(this.STR_LOCAL_FILE_WARNING);
+                            } else {
+                                Dom.removeClass(url, 'warning');
+                                this.get('panel').setFooter(' ');
+                                if ((this.browser.webkit && !this.browser.webkit3) || this.browser.opera) {
+                                    this.get('panel').setFooter(this.STR_IMAGE_COPY);
+                                }
+                            }
+                        }, this, true);
+
+                        Event.on('insertimage_url', 'blur', function() {
+                            var url = Dom.get('insertimage_url');
+                            if (this._isLocalFile(url.value)) {
+                                //Local File throw Warning
+                                Dom.addClass(url, 'warning');
+                                this.get('panel').setFooter(this.STR_LOCAL_FILE_WARNING);
+                            } else if (this.currentElement[0]) {
+                                Dom.removeClass(url, 'warning');
+                                this.get('panel').setFooter(' ');
+                                if ((this.browser.webkit && !this.browser.webkit3) || this.browser.opera) {
+                                    this.get('panel').setFooter(this.STR_IMAGE_COPY);
+                                }
+                                
+                                if (url && url.value && (url.value != this.STR_IMAGE_HERE)) {
+                                    this.currentElement[0].setAttribute('src', url.value);
+                                    var self = this,
+                                        img = new Image();
+
+                                    img.onerror = function() {
+                                        url.value = self.STR_IMAGE_HERE;
+                                        img.setAttribute('src', self.get('blankimage'));
+                                        self.currentElement[0].setAttribute('src', self.get('blankimage'));
+                                        YAHOO.util.Dom.get('insertimage_height').value = img.height;
+                                        YAHOO.util.Dom.get('insertimage_width').value = img.width;
+                                    };
+                                    window.setTimeout(function() {
+                                        YAHOO.util.Dom.get('insertimage_height').value = img.height;
+                                        YAHOO.util.Dom.get('insertimage_width').value = img.width;
+                                        if (self.currentElement && self.currentElement[0]) {
+                                            if (!self.currentElement[0]._height) {
+                                                self.currentElement[0]._height = img.height;
+                                            }
+                                            if (!self.currentElement[0]._width) {
+                                                self.currentElement[0]._width = img.width;
+                                            }
+                                        }
+                                        self.moveWindow();
+                                    }, 200);
+
+                                    if (url.value != this.STR_IMAGE_HERE) {
+                                        img.src = url.value;
+                                    }
+                                }
+                            }
+                        }, this, true);
+                    }
+                }, this, true);
+            });
+        },
+        /**
+        * @private
+        * @method _handleInsertImageWindowClose
+        * @description Handles the closing of the Image Properties Window.
+        */
+        _handleInsertImageWindowClose: function() {
+            var url = Dom.get('insertimage_url');
+            var title = Dom.get('insertimage_title');
+            var link = Dom.get('insertimage_link');
+            var target = Dom.get('insertimage_target');
+            var el = this.currentElement[0];
+            if (url && url.value && (url.value != this.STR_IMAGE_HERE)) {
+                el.setAttribute('src', url.value);
+                el.setAttribute('title', title.value);
+                el.setAttribute('alt', title.value);
+                var par = el.parentNode;
+                if (link.value) {
+                    var urlValue = link.value;
+                    if ((urlValue.indexOf(':/'+'/') == -1) && (urlValue.substring(0,1) != '/') && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                        if ((urlValue.indexOf('@') != -1) && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                            //Found an @ sign, prefix with mailto:
+                            urlValue = 'mailto:' + urlValue;
+                        } else {
+                            /* :// not found adding */
+                            urlValue = 'http:/'+'/' + urlValue;
+                        }
+                    }
+                    if (par && this._isElement(par, 'a')) {
+                        par.setAttribute('href', urlValue);
+                        if (target.checked) {
+                            par.setAttribute('target', target.value);
+                        } else {
+                            par.setAttribute('target', '');
+                        }
+                    } else {
+                        var _a = this._getDoc().createElement('a');
+                        _a.setAttribute('href', urlValue);
+                        if (target.checked) {
+                            _a.setAttribute('target', target.value);
+                        } else {
+                            _a.setAttribute('target', '');
+                        }
+                        el.parentNode.replaceChild(_a, el);
+                        _a.appendChild(el);
+                    }
+                } else {
+                    if (par && this._isElement(par, 'a')) {
+                        par.parentNode.replaceChild(el, par);
+                    }
+                }
+            } else {
+                //No url/src given, remove the node from the document
+                el.parentNode.removeChild(el);
+            }
+            this.currentElement = [];
+            this.nodeChange();
+        },
+        /**
+        * @private
+        * @method _renderPanel
         * @description Renders the panel used for Editor Windows to the document so we can start using it..
         * @returns {<a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>}
         */
@@ -5552,6 +6897,7 @@
                     break;
                 }
             }
+            Dom.addClass(body, ((YAHOO.widget.Button && (this._defaultToolbar.buttonType == 'advanced')) ? 'good-button' : 'no-button'));
 
             var _note = document.createElement('h3');
             _note.className = 'yui-editor-skipheader';
@@ -5795,206 +7141,224 @@
             this._focusWindow();
             Event.removeListener(document, 'keypress', this._closeWindow);
         },
+        /* {{{  Command Overrides - These commands are only over written when we are using the advanced version */
         /**
-        * @method destroy
-        * @description Destroys the editor, all of it's elements and objects.
-        * @return {Boolean}
+        * @method cmd_heading
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('heading') is used.
         */
-        destroy: function() {
-            this.saveHTML();
-            this.toolbar.destroy();
-            this.setStyle('visibility', 'hidden');
-            this.setStyle('position', 'absolute');
-            this.setStyle('top', '-9999px');
-            this.setStyle('left', '-9999px');
-            var textArea = this.get('element');
-            this.get('element_cont').get('parentNode').replaceChild(textArea, this.get('element_cont').get('element'));
-            this.get('element_cont').get('element').innerHTML = '';
-            //Brutal Object Destroy
-            for (var i in this) {
-                if (Lang.hasOwnProperty(this, i)) {
-                    this[i] = null;
+        cmd_heading: function(value) {
+            var exec = true,
+                el = null,
+                action = 'heading',
+                _sel = this._getSelection(),
+                _selEl = this._getSelectedElement();
+
+            if (_selEl) {
+                _sel = _selEl;
+            }
+            
+            if (this.browser.ie) {
+                action = 'formatblock';
+            }
+            if (value == 'none') {
+                if ((_sel && _sel.tagName && (_sel.tagName.toLowerCase().substring(0,1) == 'h')) || (_sel && _sel.parentNode && _sel.parentNode.tagName && (_sel.parentNode.tagName.toLowerCase().substring(0,1) == 'h'))) {
+                    if (_sel.parentNode.tagName.toLowerCase().substring(0,1) == 'h') {
+                        _sel = _sel.parentNode;
+                    }
+                    if (this._isElement(_sel, 'html')) {
+                        return [false];
+                    }
+                    el = this._swapEl(_selEl, 'span', function(el) {
+                        el.className = 'yui-non';
+                    });
+                    this._selectNode(el);
+                    this.currentElement[0] = el;
                 }
+                exec = false;
+            } else {
+                if (this._isElement(_selEl, 'h1') || this._isElement(_selEl, 'h2') || this._isElement(_selEl, 'h3') || this._isElement(_selEl, 'h4') || this._isElement(_selEl, 'h5') || this._isElement(_selEl, 'h6')) {
+                    el = this._swapEl(_selEl, value);
+                    this._selectNode(el);
+                    this.currentElement[0] = el;
+                } else {
+                    this._createCurrentElement(value);
+                    this._selectNode(this.currentElement[0]);
+                }
+                exec = false;
             }
-            return true;
-        },        
+            return [exec, action];
+        },
         /**
-        * @method toString
-        * @description Returns a string representing the editor.
-        * @return {String}
+        * @method cmd_hiddenelements
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('hiddenelements') is used.
         */
-        toString: function() {
-            var str = 'Editor';
-            if (this.get && this.get('element_cont')) {
-                str = 'Editor (#' + this.get('element_cont').get('id') + ')' + ((this.get('disabled') ? ' Disabled' : ''));
+        cmd_hiddenelements: function(value) {
+            if (this._showingHiddenElements) {
+                //Don't auto highlight the hidden button
+                this._lastButton = null;
+                this._showingHiddenElements = false;
+                this.toolbar.deselectButton('hiddenelements');
+                Dom.removeClass(this._getDoc().body, this.CLASS_HIDDEN);
+            } else {
+                this._showingHiddenElements = true;
+                Dom.addClass(this._getDoc().body, this.CLASS_HIDDEN);
+                this.toolbar.selectButton('hiddenelements');
             }
-            return str;
-        }
-    });
+            return [false];
+        },
+        /**
+        * @method cmd_removeformat
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('removeformat') is used.
+        */
+        cmd_removeformat: function(value) {
+            var exec = true;
+            /**
+            * @knownissue Remove Format issue
+            * @browser Safari 2.x
+            * @description There is an issue here with Safari, that it may not always remove the format of the item that is selected.
+            * Due to the way that Safari 2.x handles ranges, it is very difficult to determine what the selection holds.
+            * So here we are making the best possible guess and acting on it.
+            */
+            if (this.browser.webkit && !this._getDoc().queryCommandEnabled('removeformat')) {
+                var _txt = this._getSelection()+'';
+                this._createCurrentElement('span');
+                this.currentElement[0].className = 'yui-non';
+                this.currentElement[0].innerHTML = _txt;
+                for (var i = 1; i < this.currentElement.length; i++) {
+                    this.currentElement[i].parentNode.removeChild(this.currentElement[i]);
+                }
+                /*
+                this._createCurrentElement('span');
+                YAHOO.util.Dom.addClass(this.currentElement[0], 'yui-non');
+                var re= /<\S[^><]*>/g;
+                var str = this.currentElement[0].innerHTML.replace(re, '');
+                var _txt = this._getDoc().createTextNode(str);
+                this.currentElement[0].parentNode.parentNode.replaceChild(_txt, this.currentElement[0].parentNode);
+                */
+                
+                exec = false;
+            }
+            return [exec];
+        },
+        /**
+        * @method cmd_script
+        * @param action action passed from the execCommand method
+        * @param value Value passed from the execCommand method
+        * @description This is a combined execCommand override method. It is called from the cmd_superscript and cmd_subscript methods.
+        */
+        cmd_script: function(action, value) {
+            var exec = true, tag = action.toLowerCase().substring(0, 3),
+                _span = null, _selEl = this._getSelectedElement();
 
-/**
-* @event toolbarLoaded
-* @description Event is fired during the render process directly after the Toolbar is loaded. Allowing you to attach events to the toolbar. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event afterRender
-* @description Event is fired after the render process finishes. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event editorContentLoaded
-* @description Event is fired after the editor iframe's document fully loads and fires it's onload event. From here you can start injecting your own things into the document. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event editorMouseUp
-* @param {Event} ev The DOM Event that occured
-* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event editorMouseDown
-* @param {Event} ev The DOM Event that occured
-* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event editorDoubleClick
-* @param {Event} ev The DOM Event that occured
-* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event editorKeyUp
-* @param {Event} ev The DOM Event that occured
-* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event editorKeyPress
-* @param {Event} ev The DOM Event that occured
-* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event editorKeyDown
-* @param {Event} ev The DOM Event that occured
-* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event beforeNodeChange
-* @description Event fires at the beginning of the nodeChange process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event afterNodeChange
-* @description Event fires at the end of the nodeChange process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event beforeExecCommand
-* @description Event fires at the beginning of the execCommand process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event afterExecCommand
-* @description Event fires at the end of the execCommand process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event beforeOpenWindow
-* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
-* @param {Overlay} panel The Overlay object that is used to create the window.
-* @description Event fires before an Editor Window is opened. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event afterOpenWindow
-* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
-* @param {Overlay} panel The Overlay object that is used to create the window.
-* @description Event fires after an Editor Window is opened. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event closeWindow
-* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
-* @description Event fires after an Editor Window is closed. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event windowCMDOpen
-* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
-* @param {Overlay} panel The Overlay object that is used to create the window.
-* @description Dynamic event fired when an <a href="YAHOO.widget.EditorWindow.html">EditorWindow</a> is opened.. The dynamic event is based on the name of the window. Example Window: createlink, opening this window would fire the windowcreatelinkOpen event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-/**
-* @event windowCMDClose
-* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
-* @param {Overlay} panel The Overlay object that is used to create the window.
-* @description Dynamic event fired when an <a href="YAHOO.widget.EditorWindow.html">EditorWindow</a> is closed.. The dynamic event is based on the name of the window. Example Window: createlink, opening this window would fire the windowcreatelinkClose event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
-* @type YAHOO.util.CustomEvent
-*/
-
-/**
-     * @description Singleton object used to track the open window objects and panels across the various open editors
-     * @class EditorInfo
-     * @static
-    */
-    YAHOO.widget.EditorInfo = {
+            if (this.browser.webkit) {
+                if (this._isElement(_selEl, tag)) {
+                    _span = this._swapEl(this.currentElement[0], 'span', function(el) {
+                        el.className = 'yui-non';
+                    });
+                    this._selectNode(_span);
+                } else {
+                    this._createCurrentElement(tag);
+                    var _sub = this._swapEl(this.currentElement[0], tag);
+                    this._selectNode(_sub);
+                    this.currentElement[0] = _sub;
+                }
+                exec = false;
+            }
+            return exec;
+        },
         /**
-        * @private
-        * @property _instances
-        * @description A reference to all editors on the page.
-        * @type Object
+        * @method cmd_superscript
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('superscript') is used.
         */
-        _instances: {},
+        cmd_superscript: function(value) {
+            return [this.cmd_script('superscript', value)];
+        },
         /**
-        * @private
-        * @property window
-        * @description A reference to the currently open window object in any editor on the page.
-        * @type Object <a href="YAHOO.widget.EditorWindow.html">YAHOO.widget.EditorWindow</a>
+        * @method cmd_subscript
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('subscript') is used.
         */
-        window: {},
+        cmd_subscript: function(value) {
+            return [this.cmd_script('subscript', value)];
+        },
         /**
-        * @private
-        * @property panel
-        * @description A reference to the currently open panel in any editor on the page.
-        * @type Object <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>
+        * @method cmd_indent
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('indent') is used.
         */
-        panel: null,
+        cmd_indent: function(value) {
+            var exec = true, selEl = this._getSelectedElement(), _bq = null;
+
+            if (this.browser.webkit || this.browser.ie || this.browser.gecko) {
+                if (this._isElement(selEl, 'blockquote')) {
+                    _bq = this._getDoc().createElement('blockquote');
+                    _bq.innerHTML = selEl.innerHTML;
+                    selEl.innerHTML = '';
+                    selEl.appendChild(_bq);
+                    this._selectNode(_bq);
+                } else {
+                    this._createCurrentElement('blockquote');
+                    for (var i = 0; i < this.currentElement.length; i++) {
+                        _bq = this._getDoc().createElement('blockquote');
+                        _bq.innerHTML = this.currentElement[i].innerHTML;
+                        this.currentElement[i].parentNode.replaceChild(_bq, this.currentElement[i]);
+                        this.currentElement[i] = _bq;
+                    }
+                    this._selectNode(this.currentElement[0]);
+                }
+                exec = false;
+            } else {
+                value = 'blockquote';
+            }
+            return [exec, 'indent', value];
+        },
         /**
-        * @method getEditorById
-        * @description Returns a reference to the Editor object associated with the given textarea
-        * @param {String/HTMLElement} id The id or reference of the textarea to return the Editor instance of
-        * @returns Object <a href="YAHOO.widget.Editor.html">YAHOO.widget.Editor</a>
+        * @method cmd_outdent
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('outdent') is used.
         */
-        getEditorById: function(id) {
-            if (!YAHOO.lang.isString(id)) {
-                //Not a string, assume a node Reference
-                id = id.id;
+        cmd_outdent: function(value) {
+            var exec = true, selEl = this._getSelectedElement(), _bq = null, _span = null;
+            if (this.browser.webkit || this.browser.ie || this.browser.gecko) {
+                selEl = this._getSelectedElement();
+                if (this._isElement(selEl, 'blockquote')) {
+                    var par = selEl.parentNode;
+                    if (this._isElement(selEl.parentNode, 'blockquote')) {
+                        par.innerHTML = selEl.innerHTML;
+                        this._selectNode(par);
+                    } else {
+                        _span = this._getDoc().createElement('span');
+                        _span.innerHTML = selEl.innerHTML;
+                        YAHOO.util.Dom.addClass(_span, 'yui-non');
+                        par.replaceChild(_span, selEl);
+                        this._selectNode(_span);
+                    }
+                } else {
+                }
+                exec = false;
+            } else {
+                value = 'blockquote';
             }
-            if (this._instances[id]) {
-                return this._instances[id];
-            }
-            return false;
+            return [exec, 'indent', value];
         },
+        /* }}}*/        
         /**
         * @method toString
-        * @description Returns a string representing the EditorInfo.
+        * @description Returns a string representing the editor.
         * @return {String}
         */
         toString: function() {
-            var len = 0;
-            for (var i in this._instances) {
-                len++;
+            var str = 'Editor';
+            if (this.get && this.get('element_cont')) {
+                str = 'Editor (#' + this.get('element_cont').get('id') + ')' + ((this.get('disabled') ? ' Disabled' : ''));
             }
-            return 'Editor Info (' + len + ' registered intance' + ((len > 1) ? 's' : '') + ')';
+            return str;
         }
-    };
-
+    });
     /**
      * @description Class to hold Window information between uses. We use the same panel to show the windows, so using this will allow you to configure a window before it is shown.
      * This is what you pass to Editor.openWindow();. These parameters will not take effect until the openWindow() is called in the editor.
@@ -6075,8 +7439,40 @@
             return 'Editor Window (' + this.name + ')';
         }
     };
+/**
+* @event beforeOpenWindow
+* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
+* @param {Overlay} panel The Overlay object that is used to create the window.
+* @description Event fires before an Editor Window is opened. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event afterOpenWindow
+* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
+* @param {Overlay} panel The Overlay object that is used to create the window.
+* @description Event fires after an Editor Window is opened. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event closeWindow
+* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
+* @description Event fires after an Editor Window is closed. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event windowCMDOpen
+* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
+* @param {Overlay} panel The Overlay object that is used to create the window.
+* @description Dynamic event fired when an <a href="YAHOO.widget.EditorWindow.html">EditorWindow</a> is opened.. The dynamic event is based on the name of the window. Example Window: createlink, opening this window would fire the windowcreatelinkOpen event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event windowCMDClose
+* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
+* @param {Overlay} panel The Overlay object that is used to create the window.
+* @description Dynamic event fired when an <a href="YAHOO.widget.EditorWindow.html">EditorWindow</a> is closed.. The dynamic event is based on the name of the window. Example Window: createlink, opening this window would fire the windowcreatelinkClose event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
 
-
-    
 })();
-YAHOO.register("editor", YAHOO.widget.Editor, {version: "2.3.1", build: "541"});
+YAHOO.register("editor", YAHOO.widget.Editor, {version: "2.4.1", build: "742"});

Added: trunk/root/static/yui/editor/simpleeditor-beta-debug.js
===================================================================
--- trunk/root/static/yui/editor/simpleeditor-beta-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/editor/simpleeditor-beta-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,5938 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+(function() {
+    /**
+    * @private
+    **/
+var Dom = YAHOO.util.Dom,
+    Event = YAHOO.util.Event,
+    Lang = YAHOO.lang;
+    /**
+     * @description <p>Creates a rich custom Toolbar Button. Primarily used with the Rich Text Editor's Toolbar</p>
+     * @class ToolbarButtonAdvanced
+     * @namespace YAHOO.widget
+     * @requires yahoo, dom, element, event, container_core, menu, button
+     * @beta
+     * 
+     * Provides a toolbar button based on the button and menu widgets.
+     * @constructor
+     * @param {String/HTMLElement} el The element to turn into a button.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+    if (YAHOO.widget.Button) {
+        YAHOO.widget.ToolbarButtonAdvanced = YAHOO.widget.Button;
+        /**
+        * @property buttonType
+        * @private
+        * @description Tells if the Button is a Rich Button or a Simple Button
+        */
+        YAHOO.widget.ToolbarButtonAdvanced.prototype.buttonType = 'rich';
+        /**
+        * @method checkValue
+        * @param {String} value The value of the option that we want to mark as selected
+        * @description Select an option by value
+        */
+        YAHOO.widget.ToolbarButtonAdvanced.prototype.checkValue = function(value) {
+            var _menuItems = this.getMenu().getItems();
+            if (_menuItems.length === 0) {
+                this.getMenu()._onBeforeShow();
+                _menuItems = this.getMenu().getItems();
+            }
+            for (var i = 0; i < _menuItems.length; i++) {
+                _menuItems[i].cfg.setProperty('checked', false);
+                if (_menuItems[i].value == value) {
+                    _menuItems[i].cfg.setProperty('checked', true);
+                }
+            }      
+        };
+    } else {
+        YAHOO.widget.ToolbarButtonAdvanced = function() {};
+    }
+
+
+    /**
+     * @description <p>Creates a basic custom Toolbar Button. Primarily used with the Rich Text Editor's Toolbar</p>
+     * @class ToolbarButton
+     * @namespace YAHOO.widget
+     * @requires yahoo, dom, element, event
+     * @Extends YAHOO.util.Element
+     * @beta
+     * 
+     * Provides a toolbar button based on the button and menu widgets, <select> elements are used in place of menu's.
+     * @constructor
+     * @param {String/HTMLElement} el The element to turn into a button.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+
+    YAHOO.widget.ToolbarButton = function(el, attrs) {
+        YAHOO.log('ToolbarButton Initalizing', 'info', 'ToolbarButton');
+        YAHOO.log(arguments.length + ' arguments passed to constructor', 'info', 'Toolbar');
+        
+        if (Lang.isObject(arguments[0]) && !Dom.get(el).nodeType) {
+            attrs = el;
+        }
+        var local_attrs = (attrs || {});
+
+        var oConfig = {
+            element: null,
+            attributes: local_attrs
+        };
+
+        if (!oConfig.attributes.type) {
+            oConfig.attributes.type = 'push';
+        }
+        
+        oConfig.element = document.createElement('span');
+        oConfig.element.setAttribute('unselectable', 'on');
+        oConfig.element.className = 'yui-button yui-' + oConfig.attributes.type + '-button';
+        oConfig.element.innerHTML = '<span class="first-child"><a href="#">LABEL</a></span>';
+        oConfig.attributes.id = Dom.generateId();
+
+        YAHOO.widget.ToolbarButton.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
+    };
+
+    YAHOO.extend(YAHOO.widget.ToolbarButton, YAHOO.util.Element, {
+        /**
+        * @property buttonType
+        * @private
+        * @description Tells if the Button is a Rich Button or a Simple Button
+        */
+        buttonType: 'normal',
+        /**
+        * @method _handleMouseOver
+        * @private
+        * @description Adds classes to the button elements on mouseover (hover)
+        */
+        _handleMouseOver: function() {
+            if (!this.get('disabled')) {
+                this.addClass('yui-button-hover');
+                this.addClass('yui-' + this.get('type') + '-button-hover');
+            }
+        },
+        /**
+        * @method _handleMouseOut
+        * @private
+        * @description Removes classes from the button elements on mouseout (hover)
+        */
+        _handleMouseOut: function() {
+            this.removeClass('yui-button-hover');
+            this.removeClass('yui-' + this.get('type') + '-button-hover');
+        },
+        /**
+        * @method checkValue
+        * @param {String} value The value of the option that we want to mark as selected
+        * @description Select an option by value
+        */
+        checkValue: function(value) {
+            if (this.get('type') == 'menu') {
+                var opts = this._button.options;
+                for (var i = 0; i < opts.length; i++) {
+                    if (opts[i].value == value) {
+                        opts.selectedIndex = i;
+                    }
+                }
+            }
+        },
+        /** 
+        * @method init
+        * @description The ToolbarButton class's initialization method
+        */        
+        init: function(p_oElement, p_oAttributes) {
+            YAHOO.widget.ToolbarButton.superclass.init.call(this, p_oElement, p_oAttributes);
+
+            this.on('mouseover', this._handleMouseOver, this, true);
+            this.on('mouseout', this._handleMouseOut, this, true);
+        },
+        /**
+        * @method initAttributes
+        * @description Initializes all of the configuration attributes used to create 
+        * the toolbar.
+        * @param {Object} attr Object literal specifying a set of 
+        * configuration attributes used to create the toolbar.
+        */        
+        initAttributes: function(attr) {
+            YAHOO.widget.ToolbarButton.superclass.initAttributes.call(this, attr);
+            /**
+            * @attribute value
+            * @description The value of the button
+            * @type String
+            */            
+            this.setAttributeConfig('value', {
+                value: attr.value
+            });
+            /**
+            * @attribute menu
+            * @description The menu attribute, see YAHOO.widget.Button
+            * @type Object
+            */            
+            this.setAttributeConfig('menu', {
+                value: attr.menu || false
+            });
+            /**
+            * @attribute type
+            * @description The type of button to create: push, menu, color, select, spin
+            * @type String
+            */            
+            this.setAttributeConfig('type', {
+                value: attr.type,
+                writeOnce: true,
+                method: function(type) {
+                    var el, opt;
+                    if (!this._button) {
+                        this._button = this.get('element').getElementsByTagName('a')[0];
+                    }
+                    switch (type) {
+                        case 'select':
+                        case 'menu':
+                            el = document.createElement('select');
+                            var menu = this.get('menu');
+                            for (var i = 0; i < menu.length; i++) {
+                                opt = document.createElement('option');
+                                opt.innerHTML = menu[i].text;
+                                opt.value = menu[i].value;
+                                if (menu[i].checked) {
+                                    opt.selected = true;
+                                }
+                                el.appendChild(opt);
+                            }
+                            this._button.parentNode.replaceChild(el, this._button);
+                            Event.on(el, 'change', this._handleSelect, this, true);
+                            this._button = el;
+                            break;
+                    }
+                }
+            });
+
+            /**
+            * @attribute disabled
+            * @description Set the button into a disabled state
+            * @type String
+            */            
+            this.setAttributeConfig('disabled', {
+                value: attr.disabled || false,
+                method: function(disabled) {
+                    if (disabled) {
+                        this.addClass('yui-button-disabled');
+                        this.addClass('yui-' + this.get('type') + '-button-disabled');
+                    } else {
+                        this.removeClass('yui-button-disabled');
+                        this.removeClass('yui-' + this.get('type') + '-button-disabled');
+                    }
+                    if (this.get('type') == 'menu') {
+                        this._button.disabled = disabled;
+                    }
+                }
+            });
+
+            /**
+            * @attribute label
+            * @description The text label for the button
+            * @type String
+            */            
+            this.setAttributeConfig('label', {
+                value: attr.label,
+                method: function(label) {
+                    if (!this._button) {
+                        this._button = this.get('element').getElementsByTagName('a')[0];
+                    }
+                    if (this.get('type') == 'push') {
+                        this._button.innerHTML = label;
+                    }
+                }
+            });
+
+            /**
+            * @attribute title
+            * @description The title of the button
+            * @type String
+            */            
+            this.setAttributeConfig('title', {
+                value: attr.title
+            });
+
+            /**
+            * @config container
+            * @description The container that the button is rendered to, handled by Toolbar
+            * @type String
+            */            
+            this.setAttributeConfig('container', {
+                value: null,
+                writeOnce: true,
+                method: function(cont) {
+                    this.appendTo(cont);
+                }
+            });
+
+        },
+        /** 
+        * @private
+        * @method _handleSelect
+        * @description The event fired when a change event gets fired on a select element
+        * @param {Event} ev The change event.
+        */        
+        _handleSelect: function(ev) {
+            var tar = Event.getTarget(ev);
+            var value = tar.options[tar.selectedIndex].value;
+            this.fireEvent('change', {type: 'change', value: value });
+        },
+        /** 
+        * @method getMenu
+        * @description A stub function to mimic YAHOO.widget.Button's getMenu method
+        */        
+        getMenu: function() {
+            return this.get('menu');
+        },
+        /** 
+        * @method fireEvent
+        * @description Overridden fireEvent method to prevent DOM events from firing if the button is disabled.
+        */        
+        fireEvent: function (p_sType , p_aArgs) {
+            //  Disabled buttons should not respond to DOM events
+            if (this.DOM_EVENTS[p_sType] && this.get('disabled')) {
+                return;
+            }
+        
+            YAHOO.widget.ToolbarButton.superclass.fireEvent.call(this, p_sType, p_aArgs);
+        },
+        /**
+        * @method toString
+        * @description Returns a string representing the toolbar.
+        * @return {String}
+        */        
+        toString: function() {
+            return 'ToolbarButton (' + this.get('id') + ')';
+        }
+        
+    });
+})();
+/**
+ * @description <p>Creates a rich Toolbar widget based on Button. Primarily used with the Rich Text Editor</p>
+ * @class Toolbar
+ * @namespace YAHOO.widget
+ * @requires yahoo, dom, element, event, toolbarbutton
+ * @optional container_core, dragdrop
+ * @beta
+ */
+(function() {
+    /**
+    * @private
+    **/
+var Dom = YAHOO.util.Dom,
+    Event = YAHOO.util.Event,
+    Lang = YAHOO.lang;
+
+    /**
+     * Provides a rich toolbar widget based on the button and menu widgets
+     * @constructor
+     * @param {String/HTMLElement} el The element to turn into a toolbar.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+    YAHOO.widget.Toolbar = function(el, attrs) {
+        YAHOO.log('Toolbar Initalizing', 'info', 'Toolbar');
+        YAHOO.log(arguments.length + ' arguments passed to constructor', 'info', 'Toolbar');
+        
+        if (Lang.isObject(arguments[0]) && !Dom.get(el).nodeType) {
+            attrs = el;
+        }
+        var local_attrs = (attrs || {});
+
+        var oConfig = {
+            element: null,
+            attributes: local_attrs
+        };
+        
+        
+        if (Lang.isString(el) && Dom.get(el)) {
+            oConfig.element = Dom.get(el);
+        } else if (Lang.isObject(el) && Dom.get(el) && Dom.get(el).nodeType) {  
+            oConfig.element = Dom.get(el);
+        }
+        
+
+        if (!oConfig.element) {
+            YAHOO.log('No element defined, creating toolbar container', 'warn', 'Toolbar');
+            oConfig.element = document.createElement('DIV');
+            oConfig.element.id = Dom.generateId();
+            
+            if (local_attrs.container && Dom.get(local_attrs.container)) {
+                YAHOO.log('Container found in config appending to it (' + Dom.get(local_attrs.container).id + ')', 'info', 'Toolbar');
+                Dom.get(local_attrs.container).appendChild(oConfig.element);
+            }
+        }
+        
+
+        if (!oConfig.element.id) {
+            oConfig.element.id = ((Lang.isString(el)) ? el : Dom.generateId());
+            YAHOO.log('No element ID defined for toolbar container, creating..', 'warn', 'Toolbar');
+        }
+        YAHOO.log('Initing toolbar with id: ' + oConfig.element.id, 'info', 'Toolbar');
+        
+        var cont = document.createElement('DIV');
+        oConfig.attributes.cont = cont;
+        Dom.addClass(cont, 'yui-toolbar-subcont');
+        oConfig.element.appendChild(cont);
+        
+        oConfig.attributes.element = oConfig.element;
+        oConfig.attributes.id = oConfig.element.id;
+
+        YAHOO.widget.Toolbar.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
+         
+    };
+
+    /**
+    * @method _addMenuClasses
+    * @private
+    * @description This method is called from Menu's renderEvent to add a few more classes to the menu items
+    * @param {String} ev The event that fired.
+    * @param {Array} na Array of event information.
+    * @param {Object} o Button config object. 
+    */
+
+    function _addMenuClasses(ev, na, o) {
+        Dom.addClass(this.element, 'yui-toolbar-' + o.get('value') + '-menu');
+        if (Dom.hasClass(o._button.parentNode.parentNode, 'yui-toolbar-select')) {
+            Dom.addClass(this.element, 'yui-toolbar-select-menu');
+        }
+        var items = this.getItems();
+        for (var i = 0; i < items.length; i++) {
+            Dom.addClass(items[i].element, 'yui-toolbar-' + o.get('value') + '-' + ((items[i].value) ? items[i].value.replace(/ /g, '-').toLowerCase() : items[i]._oText.nodeValue.replace(/ /g, '-').toLowerCase()));
+            Dom.addClass(items[i].element, 'yui-toolbar-' + o.get('value') + '-' + ((items[i].value) ? items[i].value.replace(/ /g, '-') : items[i]._oText.nodeValue.replace(/ /g, '-')));
+        }
+    }
+
+    YAHOO.extend(YAHOO.widget.Toolbar, YAHOO.util.Element, {
+        /** 
+        * @property buttonType
+        * @description The default button to use
+        * @type Object
+        */
+        buttonType: YAHOO.widget.ToolbarButton,
+        /** 
+        * @property dd
+        * @description The DragDrop instance associated with the Toolbar
+        * @type Object
+        */
+        dd: null,
+        /** 
+        * @property _colorData
+        * @description Object reference containing colors hex and text values.
+        * @type Object
+        */
+        _colorData: {
+/* {{{ _colorData */
+    '#111111': 'Obsidian',
+    '#2D2D2D': 'Dark Gray',
+    '#434343': 'Shale',
+    '#5B5B5B': 'Flint',
+    '#737373': 'Gray',
+    '#8B8B8B': 'Concrete',
+    '#A2A2A2': 'Gray',
+    '#B9B9B9': 'Titanium',
+    '#000000': 'Black',
+    '#D0D0D0': 'Light Gray',
+    '#E6E6E6': 'Silver',
+    '#FFFFFF': 'White',
+    '#BFBF00': 'Pumpkin',
+    '#FFFF00': 'Yellow',
+    '#FFFF40': 'Banana',
+    '#FFFF80': 'Pale Yellow',
+    '#FFFFBF': 'Butter',
+    '#525330': 'Raw Siena',
+    '#898A49': 'Mildew',
+    '#AEA945': 'Olive',
+    '#7F7F00': 'Paprika',
+    '#C3BE71': 'Earth',
+    '#E0DCAA': 'Khaki',
+    '#FCFAE1': 'Cream',
+    '#60BF00': 'Cactus',
+    '#80FF00': 'Chartreuse',
+    '#A0FF40': 'Green',
+    '#C0FF80': 'Pale Lime',
+    '#DFFFBF': 'Light Mint',
+    '#3B5738': 'Green',
+    '#668F5A': 'Lime Gray',
+    '#7F9757': 'Yellow',
+    '#407F00': 'Clover',
+    '#8A9B55': 'Pistachio',
+    '#B7C296': 'Light Jade',
+    '#E6EBD5': 'Breakwater',
+    '#00BF00': 'Spring Frost',
+    '#00FF80': 'Pastel Green',
+    '#40FFA0': 'Light Emerald',
+    '#80FFC0': 'Sea Foam',
+    '#BFFFDF': 'Sea Mist',
+    '#033D21': 'Dark Forrest',
+    '#438059': 'Moss',
+    '#7FA37C': 'Medium Green',
+    '#007F40': 'Pine',
+    '#8DAE94': 'Yellow Gray Green',
+    '#ACC6B5': 'Aqua Lung',
+    '#DDEBE2': 'Sea Vapor',
+    '#00BFBF': 'Fog',
+    '#00FFFF': 'Cyan',
+    '#40FFFF': 'Turquoise Blue',
+    '#80FFFF': 'Light Aqua',
+    '#BFFFFF': 'Pale Cyan',
+    '#033D3D': 'Dark Teal',
+    '#347D7E': 'Gray Turquoise',
+    '#609A9F': 'Green Blue',
+    '#007F7F': 'Seaweed',
+    '#96BDC4': 'Green Gray',
+    '#B5D1D7': 'Soapstone',
+    '#E2F1F4': 'Light Turquoise',
+    '#0060BF': 'Summer Sky',
+    '#0080FF': 'Sky Blue',
+    '#40A0FF': 'Electric Blue',
+    '#80C0FF': 'Light Azure',
+    '#BFDFFF': 'Ice Blue',
+    '#1B2C48': 'Navy',
+    '#385376': 'Biscay',
+    '#57708F': 'Dusty Blue',
+    '#00407F': 'Sea Blue',
+    '#7792AC': 'Sky Blue Gray',
+    '#A8BED1': 'Morning Sky',
+    '#DEEBF6': 'Vapor',
+    '#0000BF': 'Deep Blue',
+    '#0000FF': 'Blue',
+    '#4040FF': 'Cerulean Blue',
+    '#8080FF': 'Evening Blue',
+    '#BFBFFF': 'Light Blue',
+    '#212143': 'Deep Indigo',
+    '#373E68': 'Sea Blue',
+    '#444F75': 'Night Blue',
+    '#00007F': 'Indigo Blue',
+    '#585E82': 'Dockside',
+    '#8687A4': 'Blue Gray',
+    '#D2D1E1': 'Light Blue Gray',
+    '#6000BF': 'Neon Violet',
+    '#8000FF': 'Blue Violet',
+    '#A040FF': 'Violet Purple',
+    '#C080FF': 'Violet Dusk',
+    '#DFBFFF': 'Pale Lavender',
+    '#302449': 'Cool Shale',
+    '#54466F': 'Dark Indigo',
+    '#655A7F': 'Dark Violet',
+    '#40007F': 'Violet',
+    '#726284': 'Smoky Violet',
+    '#9E8FA9': 'Slate Gray',
+    '#DCD1DF': 'Violet White',
+    '#BF00BF': 'Royal Violet',
+    '#FF00FF': 'Fuchsia',
+    '#FF40FF': 'Magenta',
+    '#FF80FF': 'Orchid',
+    '#FFBFFF': 'Pale Magenta',
+    '#4A234A': 'Dark Purple',
+    '#794A72': 'Medium Purple',
+    '#936386': 'Cool Granite',
+    '#7F007F': 'Purple',
+    '#9D7292': 'Purple Moon',
+    '#C0A0B6': 'Pale Purple',
+    '#ECDAE5': 'Pink Cloud',
+    '#BF005F': 'Hot Pink',
+    '#FF007F': 'Deep Pink',
+    '#FF409F': 'Grape',
+    '#FF80BF': 'Electric Pink',
+    '#FFBFDF': 'Pink',
+    '#451528': 'Purple Red',
+    '#823857': 'Purple Dino',
+    '#A94A76': 'Purple Gray',
+    '#7F003F': 'Rose',
+    '#BC6F95': 'Antique Mauve',
+    '#D8A5BB': 'Cool Marble',
+    '#F7DDE9': 'Pink Granite',
+    '#C00000': 'Apple',
+    '#FF0000': 'Fire Truck',
+    '#FF4040': 'Pale Red',
+    '#FF8080': 'Salmon',
+    '#FFC0C0': 'Warm Pink',
+    '#441415': 'Sepia',
+    '#82393C': 'Rust',
+    '#AA4D4E': 'Brick',
+    '#800000': 'Brick Red',
+    '#BC6E6E': 'Mauve',
+    '#D8A3A4': 'Shrimp Pink',
+    '#F8DDDD': 'Shell Pink',
+    '#BF5F00': 'Dark Orange',
+    '#FF7F00': 'Orange',
+    '#FF9F40': 'Grapefruit',
+    '#FFBF80': 'Canteloupe',
+    '#FFDFBF': 'Wax',
+    '#482C1B': 'Dark Brick',
+    '#855A40': 'Dirt',
+    '#B27C51': 'Tan',
+    '#7F3F00': 'Nutmeg',
+    '#C49B71': 'Mustard',
+    '#E1C4A8': 'Pale Tan',
+    '#FDEEE0': 'Marble'
+/* }}} */
+        },
+        /** 
+        * @property _colorPicker
+        * @description The HTML Element containing the colorPicker
+        * @type HTMLElement
+        */
+        _colorPicker: null,
+        /** 
+        * @property STR_COLLAPSE
+        * @description String for Toolbar Collapse Button
+        * @type String
+        */
+        STR_COLLAPSE: 'Collapse Toolbar',
+        /** 
+        * @property STR_SPIN_LABEL
+        * @description String for spinbutton dynamic label. Note the {VALUE} will be replaced with YAHOO.lang.substitute
+        * @type String
+        */
+        STR_SPIN_LABEL: 'Spin Button with value {VALUE}. Use Control Shift Up Arrow and Control Shift Down arrow keys to increase or decrease the value.',
+        /** 
+        * @property STR_SPIN_UP
+        * @description String for spinbutton up
+        * @type String
+        */
+        STR_SPIN_UP: 'Click to increase the value of this input',
+        /** 
+        * @property STR_SPIN_DOWN
+        * @description String for spinbutton down
+        * @type String
+        */
+        STR_SPIN_DOWN: 'Click to decrease the value of this input',
+        /** 
+        * @property _titlebar
+        * @description Object reference to the titlebar
+        * @type HTMLElement
+        */
+        _titlebar: null,
+        /** 
+        * @property browser
+        * @description Standard browser detection
+        * @type Object
+        */
+        browser: YAHOO.env.ua,
+        /**
+        * @protected
+        * @property _buttonList
+        * @description Internal property list of current buttons in the toolbar
+        * @type Array
+        */
+        _buttonList: null,
+        /**
+        * @protected
+        * @property _buttonGroupList
+        * @description Internal property list of current button groups in the toolbar
+        * @type Array
+        */
+        _buttonGroupList: null,
+        /**
+        * @protected
+        * @property _sep
+        * @description Internal reference to the separator HTML Element for cloning
+        * @type HTMLElement
+        */
+        _sep: null,
+        /**
+        * @protected
+        * @property _sepCount
+        * @description Internal refernce for counting separators, so we can give them a useful class name for styling
+        * @type Number
+        */
+        _sepCount: null,
+        /**
+        * @protected
+        * @property draghandle
+        * @type HTMLElement
+        */
+        _dragHandle: null,
+        /**
+        * @protected
+        * @property _toolbarConfigs
+        * @type Object
+        */
+        _toolbarConfigs: {
+            renderer: true
+        },
+        /**
+        * @protected
+        * @property CLASS_CONTAINER
+        * @description Default CSS class to apply to the toolbar container element
+        * @type String
+        */
+        CLASS_CONTAINER: 'yui-toolbar-container',
+        /**
+        * @protected
+        * @property CLASS_DRAGHANDLE
+        * @description Default CSS class to apply to the toolbar's drag handle element
+        * @type String
+        */
+        CLASS_DRAGHANDLE: 'yui-toolbar-draghandle',
+        /**
+        * @protected
+        * @property CLASS_SEPARATOR
+        * @description Default CSS class to apply to all separators in the toolbar
+        * @type String
+        */
+        CLASS_SEPARATOR: 'yui-toolbar-separator',
+        /**
+        * @protected
+        * @property CLASS_DISABLED
+        * @description Default CSS class to apply when the toolbar is disabled
+        * @type String
+        */
+        CLASS_DISABLED: 'yui-toolbar-disabled',
+        /**
+        * @protected
+        * @property CLASS_PREFIX
+        * @description Default prefix for dynamically created class names
+        * @type String
+        */
+        CLASS_PREFIX: 'yui-toolbar',
+        /** 
+        * @method init
+        * @description The Toolbar class's initialization method
+        */
+        init: function(p_oElement, p_oAttributes) {
+            YAHOO.widget.Toolbar.superclass.init.call(this, p_oElement, p_oAttributes);
+        },
+        /**
+        * @method initAttributes
+        * @description Initializes all of the configuration attributes used to create 
+        * the toolbar.
+        * @param {Object} attr Object literal specifying a set of 
+        * configuration attributes used to create the toolbar.
+        */
+        initAttributes: function(attr) {
+            YAHOO.widget.Toolbar.superclass.initAttributes.call(this, attr);
+            this.addClass(this.CLASS_CONTAINER);
+
+            /**
+            * @attribute buttonType
+            * @description The buttonType to use (advanced or basic)
+            * @type String
+            */
+            this.setAttributeConfig('buttonType', {
+                value: attr.buttonType || 'basic',
+                writeOnce: true,
+                validator: function(type) {
+                    switch (type) {
+                        case 'advanced':
+                        case 'basic':
+                            return true;
+                    }
+                    return false;
+                },
+                method: function(type) {
+                    if (type == 'advanced') {
+                        if (YAHOO.widget.Button) {
+                            this.buttonType = YAHOO.widget.ToolbarButtonAdvanced;
+                        } else {
+                            YAHOO.log('Can not find YAHOO.widget.Button', 'error', 'Toolbar');
+                            this.buttonType = YAHOO.widget.ToolbarButton;
+                        }
+                    } else {
+                        this.buttonType = YAHOO.widget.ToolbarButton;
+                    }
+                }
+            });
+
+
+            /**
+            * @attribute buttons
+            * @description Object specifying the buttons to include in the toolbar
+            * Example:
+            * <code><pre>
+            * {
+            *   { id: 'b3', type: 'button', label: 'Underline', value: 'underline' },
+            *   { type: 'separator' },
+            *   { id: 'b4', type: 'menu', label: 'Align', value: 'align',
+            *       menu: [
+            *           { text: "Left", value: 'alignleft' },
+            *           { text: "Center", value: 'aligncenter' },
+            *           { text: "Right", value: 'alignright' }
+            *       ]
+            *   }
+            * }
+            * </pre></code>
+            * @type Array
+            */
+            
+            this.setAttributeConfig('buttons', {
+                value: [],
+                writeOnce: true,
+                method: function(data) {
+                    for (var i in data) {
+                        if (Lang.hasOwnProperty(data, i)) {
+                            if (data[i].type == 'separator') {
+                                this.addSeparator();
+                            } else if (data[i].group !== undefined) {
+                                this.addButtonGroup(data[i]);
+                            } else {
+                                this.addButton(data[i]);
+                            }
+                        }
+                    }
+                }
+            });
+
+            /**
+            * @attribute disabled
+            * @description Boolean indicating if the toolbar should be disabled. It will also disable the draggable attribute if it is on.
+            * @default false
+            * @type Boolean
+            */
+            this.setAttributeConfig('disabled', {
+                value: false,
+                method: function(disabled) {
+                    if (this.get('disabled') === disabled) {
+                        return false;
+                    }
+                    if (disabled) {
+                        this.addClass(this.CLASS_DISABLED);
+                        this.set('draggable', false);
+                        this.disableAllButtons();
+                    } else {
+                        this.removeClass(this.CLASS_DISABLED);
+                        if (this._configs.draggable._initialConfig.value) {
+                            //Draggable by default, set it back
+                            this.set('draggable', true);
+                        }
+                        this.resetAllButtons();
+                    }
+                }
+            });
+
+            /**
+            * @config cont
+            * @description The container for the toolbar.
+            * @type HTMLElement
+            */
+            this.setAttributeConfig('cont', {
+                value: attr.cont,
+                readOnly: true
+            });
+
+
+            /**
+            * @attribute grouplabels
+            * @description Boolean indicating if the toolbar should show the group label's text string.
+            * @default true
+            * @type Boolean
+            */
+            this.setAttributeConfig('grouplabels', {
+                value: attr.grouplabels || true,
+                method: function(grouplabels) {
+                    if (grouplabels) {
+                        Dom.removeClass(this.get('cont'), (this.CLASS_PREFIX + '-nogrouplabels'));
+                    } else {
+                        Dom.addClass(this.get('cont'), (this.CLASS_PREFIX + '-nogrouplabels'));
+                    }
+                }
+            });
+            /**
+            * @attribute titlebar
+            * @description Boolean indicating if the toolbar should have a titlebar. If
+            * passed a string, it will use that as the titlebar text
+            * @default false
+            * @type Boolean or String
+            */
+            this.setAttributeConfig('titlebar', {
+                value: false,
+                method: function(titlebar) {
+                    if (titlebar) {
+                        if (this._titlebar && this._titlebar.parentNode) {
+                            this._titlebar.parentNode.removeChild(this._titlebar);
+                        }
+                        this._titlebar = document.createElement('DIV');
+                        Dom.addClass(this._titlebar, this.CLASS_PREFIX + '-titlebar');
+                        if (Lang.isString(titlebar)) {
+                            var h2 = document.createElement('h2');
+                            h2.tabIndex = '-1';
+                            h2.innerHTML = titlebar;
+                            this._titlebar.appendChild(h2);
+                        }
+                        if (this.get('firstChild')) {
+                            this.insertBefore(this._titlebar, this.get('firstChild'));
+                        } else {
+                            this.appendChild(this._titlebar);
+                        }
+                        if (this.get('collapse')) {
+                            this.set('collapse', true);
+                        }
+                    } else if (this._titlebar) {
+                        if (this._titlebar && this._titlebar.parentNode) {
+                            this._titlebar.parentNode.removeChild(this._titlebar);
+                        }
+                    }
+                }
+            });
+
+
+            /**
+            * @attribute collapse
+            * @description Boolean indicating if the the titlebar should have a collapse button.
+            * The collapse button will not remove the toolbar, it will minimize it to the titlebar
+            * @default false
+            * @type Boolean
+            */
+            this.setAttributeConfig('collapse', {
+                value: false,
+                method: function(collapse) {
+                    var collapseEl = null;
+                    var el = Dom.getElementsByClassName('collapse', 'span', this._titlebar);
+                    if (collapse) {
+                        if (el.length > 0) {
+                            //There is already a collapse button
+                            return true;
+                        }
+                        collapseEl = document.createElement('SPAN');
+                        collapseEl.innerHTML = 'X';
+                        collapseEl.title = this.STR_COLLAPSE;
+
+                        Dom.addClass(collapseEl, 'collapse');
+                        this._titlebar.appendChild(collapseEl);
+                        Event.addListener(collapseEl, 'click', function() {
+                            if (Dom.hasClass(this.get('cont').parentNode, 'yui-toolbar-container-collapsed')) {
+                                this.collapse(false); //Expand Toolbar
+                            } else {
+                                this.collapse(); //Collapse Toolbar
+                            }
+                        }, this, true);
+                    } else {
+                        collapseEl = Dom.getElementsByClassName('collapse', 'span', this._titlebar);
+                        if (collapseEl[0]) {
+                            if (Dom.hasClass(this.get('cont').parentNode, 'yui-toolbar-container-collapsed')) {
+                                //We are closed, reopen the titlebar..
+                                this.collapse(false); //Expand Toolbar
+                            }
+                            collapseEl[0].parentNode.removeChild(collapseEl[0]);
+                        }
+                    }
+                }
+            });
+
+            /**
+            * @attribute draggable
+            * @description Boolean indicating if the toolbar should be draggable.  
+            * @default false
+            * @type Boolean
+            */
+
+            this.setAttributeConfig('draggable', {
+                value: (attr.draggable || false),
+                method: function(draggable) {
+                    if (draggable && !this.get('titlebar')) {
+                        YAHOO.log('Dragging enabled', 'info', 'Toolbar');
+                        if (!this._dragHandle) {
+                            this._dragHandle = document.createElement('SPAN');
+                            this._dragHandle.innerHTML = '|';
+                            this._dragHandle.setAttribute('title', 'Click to drag the toolbar');
+                            this._dragHandle.id = this.get('id') + '_draghandle';
+                            Dom.addClass(this._dragHandle, this.CLASS_DRAGHANDLE);
+                            if (this.get('cont').hasChildNodes()) {
+                                this.get('cont').insertBefore(this._dragHandle, this.get('cont').firstChild);
+                            } else {
+                                this.get('cont').appendChild(this._dragHandle);
+                            }
+                            /**
+                            * @property dd
+                            * @description The DragDrop instance associated with the Toolbar
+                            * @type Object
+                            */
+                            this.dd = new YAHOO.util.DD(this.get('id'));
+                            this.dd.setHandleElId(this._dragHandle.id);
+                            
+                        }
+                    } else {
+                        YAHOO.log('Dragging disabled', 'info', 'Toolbar');
+                        if (this._dragHandle) {
+                            this._dragHandle.parentNode.removeChild(this._dragHandle);
+                            this._dragHandle = null;
+                            this.dd = null;
+                        }
+                    }
+                    if (this._titlebar) {
+                        if (draggable) {
+                            this.dd = new YAHOO.util.DD(this.get('id'));
+                            this.dd.setHandleElId(this._titlebar);
+                            Dom.addClass(this._titlebar, 'draggable');
+                        } else {
+                            Dom.removeClass(this._titlebar, 'draggable');
+                            if (this.dd) {
+                                this.dd.unreg();
+                                this.dd = null;
+                            }
+                        }
+                    }
+                },
+                validator: function(value) {
+                    var ret = true;
+                    if (!YAHOO.util.DD) {
+                        ret = false;
+                    }
+                    return ret;
+                }
+            });
+
+        },
+        /**
+        * @method addButtonGroup
+        * @description Add a new button group to the toolbar. (uses addButton)
+        * @param {Object} oGroup Object literal reference to the Groups Config (contains an array of button configs)
+        */
+        addButtonGroup: function(oGroup) {
+            if (!this.get('element')) {
+                this._queue[this._queue.length] = ['addButtonGroup', arguments];
+                return false;
+            }
+            
+            if (!this.hasClass(this.CLASS_PREFIX + '-grouped')) {
+                this.addClass(this.CLASS_PREFIX + '-grouped');
+            }
+            var div = document.createElement('DIV');
+            Dom.addClass(div, this.CLASS_PREFIX + '-group');
+            Dom.addClass(div, this.CLASS_PREFIX + '-group-' + oGroup.group);
+            //if (oGroup.label && this.get('grouplabels')) {
+            if (oGroup.label) {
+                var label = document.createElement('h3');
+                label.innerHTML = oGroup.label;
+                div.appendChild(label);
+            }
+            if (!this.get('grouplabels')) {
+                Dom.addClass(this.get('cont'), this.CLASS_PREFIX, '-nogrouplabels');
+            }
+
+            this.get('cont').appendChild(div);
+
+            //For accessibility, let's put all of the group buttons in an Unordered List
+            var ul = document.createElement('ul');
+            div.appendChild(ul);
+
+            if (!this._buttonGroupList) {
+                this._buttonGroupList = {};
+            }
+            
+            this._buttonGroupList[oGroup.group] = ul;
+
+            for (var i = 0; i < oGroup.buttons.length; i++) {
+                var li = document.createElement('li');
+                li.className = this.CLASS_PREFIX + '-groupitem';
+                ul.appendChild(li);
+                if ((oGroup.buttons[i].type !== undefined) && oGroup.buttons[i].type == 'separator') {
+                    this.addSeparator(li);
+                } else {
+                    oGroup.buttons[i].container = li;
+                    this.addButton(oGroup.buttons[i]);
+                }
+            }
+        },
+        /**
+        * @method addButtonToGroup
+        * @description Add a new button to a toolbar group. Buttons supported:
+        *   push, split, menu, select, color, spin
+        * @param {Object} oButton Object literal reference to the Button's Config
+        * @param {String} group The Group identifier passed into the initial config
+        * @param {HTMLElement} after Optional HTML element to insert this button after in the DOM.
+        */
+        addButtonToGroup: function(oButton, group, after) {
+            var groupCont = this._buttonGroupList[group];
+            var li = document.createElement('li');
+            li.className = this.CLASS_PREFIX + '-groupitem';
+            oButton.container = li;
+            this.addButton(oButton, after);
+            groupCont.appendChild(li);
+        },
+        /**
+        * @method addButton
+        * @description Add a new button to the toolbar. Buttons supported:
+        *   push, split, menu, select, color, spin
+        * @param {Object} oButton Object literal reference to the Button's Config
+        * @param {HTMLElement} after Optional HTML element to insert this button after in the DOM.
+        */
+        addButton: function(oButton, after) {
+            if (!this.get('element')) {
+                this._queue[this._queue.length] = ['addButton', arguments];
+                return false;
+            }
+            if (!this._buttonList) {
+                this._buttonList = [];
+            }
+            YAHOO.log('Adding button of type: ' + oButton.type, 'info', 'Toolbar');
+            if (!oButton.container) {
+                oButton.container = this.get('cont');
+            }
+
+            if ((oButton.type == 'menu') || (oButton.type == 'split') || (oButton.type == 'select')) {
+                if (Lang.isArray(oButton.menu)) {
+                    for (var i in oButton.menu) {
+                        if (Lang.hasOwnProperty(oButton.menu, i)) {
+                            var funcObject = {
+                                fn: function(ev, x, oMenu) {
+                                    if (!oButton.menucmd) {
+                                        oButton.menucmd = oButton.value;
+                                    }
+                                    oButton.value = ((oMenu.value) ? oMenu.value : oMenu._oText.nodeValue);
+                                    //This line made Opera fire the click event and the mousedown,
+                                    //  so events for menus where firing twice.
+                                    //this._buttonClick('click', oButton);
+                                },
+                                scope: this
+                            };
+                            oButton.menu[i].onclick = funcObject;
+                        }
+                    }
+                }
+            }
+            var _oButton = {}, skip = false;
+            for (var o in oButton) {
+                if (Lang.hasOwnProperty(oButton, o)) {
+                    if (!this._toolbarConfigs[o]) {
+                        _oButton[o] = oButton[o];
+                    }
+                }
+            }
+            if (oButton.type == 'select') {
+                _oButton.type = 'menu';
+            }
+            if (oButton.type == 'spin') {
+                _oButton.type = 'push';
+            }
+            if (_oButton.type == 'color') {
+                if (YAHOO.widget.Overlay) {
+                    _oButton = this._makeColorButton(_oButton);
+                } else {
+                    skip = true;
+                }
+            }
+            if (_oButton.menu) {
+                if ((YAHOO.widget.Overlay) && (oButton.menu instanceof YAHOO.widget.Overlay)) {
+                    oButton.menu.showEvent.subscribe(function() {
+                        this._button = _oButton;
+                    });
+                } else {
+                    for (var m = 0; m < _oButton.menu.length; m++) {
+                        if (!_oButton.menu[m].value) {
+                            _oButton.menu[m].value = _oButton.menu[m].text;
+                        }
+                    }
+                    if (this.browser.webkit) {
+                        _oButton.focusmenu = false;
+                    }
+                }
+            }
+            if (skip) {
+                oButton = false;
+            } else {
+                //Add to .get('buttons') manually
+                this._configs.buttons.value[this._configs.buttons.value.length] = oButton;
+
+                var tmp = new this.buttonType(_oButton);
+                if (!tmp.buttonType) {
+                    tmp.buttonType = 'rich';
+                    tmp.checkValue = function(value) {
+                        var _menuItems = this.getMenu().getItems();
+                        if (_menuItems.length === 0) {
+                            this.getMenu()._onBeforeShow();
+                            _menuItems = this.getMenu().getItems();
+                        }
+                        for (var i = 0; i < _menuItems.length; i++) {
+                            _menuItems[i].cfg.setProperty('checked', false);
+                            if (_menuItems[i].value == value) {
+                                _menuItems[i].cfg.setProperty('checked', true);
+                            }
+                        }      
+                    };
+                }
+                
+                if (this.get('disabled')) {
+                    //Toolbar is disabled, disable the new button too!
+                    tmp.set('disabled', true);
+                }
+                if (!oButton.id) {
+                    oButton.id = tmp.get('id');
+                }
+                YAHOO.log('Button created (' + oButton.type + ')', 'info', 'Toolbar');
+                
+                if (after) {
+                    var el = tmp.get('element');
+                    var nextSib = null;
+                    if (after.get) {
+                        nextSib = after.get('element').nextSibling;
+                    } else if (after.nextSibling) {
+                        nextSib = after.nextSibling;
+                    }
+                    if (nextSib) {
+                        nextSib.parentNode.insertBefore(el, nextSib);
+                    }
+                }
+                tmp.addClass(this.CLASS_PREFIX + '-' + tmp.get('value'));
+
+                var icon = document.createElement('span');
+                icon.className = this.CLASS_PREFIX + '-icon';
+                tmp.get('element').insertBefore(icon, tmp.get('firstChild'));
+                if (tmp._button.tagName.toLowerCase() == 'button') {
+                    tmp.get('element').setAttribute('unselectable', 'on');
+                    //Replace the Button HTML Element with an a href if it exists
+                    var a = document.createElement('a');
+                    a.innerHTML = tmp._button.innerHTML;
+                    a.href = '#';
+                    Event.on(a, 'click', function(ev) {
+                        Event.stopEvent(ev);
+                    });
+                    tmp._button.parentNode.replaceChild(a, tmp._button);
+                    tmp._button = a;
+                }
+
+                if (oButton.type == 'select') {
+                    if (tmp._button.tagName.toLowerCase() == 'select') {
+                        icon.parentNode.removeChild(icon);
+                        var iel = tmp._button;
+                        var parEl = tmp.get('element');
+                        parEl.parentNode.replaceChild(iel, parEl);
+                    } else {
+                        //Don't put a class on it if it's a real select element
+                        tmp.addClass(this.CLASS_PREFIX + '-select');
+                    }
+                }
+                if (oButton.type == 'spin') {
+                    if (!Lang.isArray(oButton.range)) {
+                        oButton.range = [ 10, 100 ];
+                    }
+                    this._makeSpinButton(tmp, oButton);
+                }
+                tmp.get('element').setAttribute('title', tmp.get('label'));
+                if (oButton.type != 'spin') {
+                    if ((YAHOO.widget.Overlay) && (_oButton.menu instanceof YAHOO.widget.Overlay)) {
+                        var showPicker = function(ev) {
+                            var exec = true;
+                            if (ev.keyCode && (ev.keyCode == 9)) {
+                                exec = false;
+                            }
+                            if (exec) {
+                                this._colorPicker._button = oButton.value;
+                                var menuEL = tmp.getMenu().element;
+                                if (Dom.getStyle(menuEL, 'visibility') == 'hidden') {
+                                    tmp.getMenu().show();
+                                } else {
+                                    tmp.getMenu().hide();
+                                }
+                            }
+                            YAHOO.util.Event.stopEvent(ev);
+                        };
+                        tmp.on('mousedown', showPicker, oButton, this);
+                        tmp.on('keydown', showPicker, oButton, this);
+                        
+                    } else if ((oButton.type != 'menu') && (oButton.type != 'select')) {
+                        tmp.on('keypress', this._buttonClick, oButton, this);
+                        tmp.on('mousedown', function(ev) {
+                            YAHOO.util.Event.stopEvent(ev);
+                            this._buttonClick(ev, oButton);
+                        }, oButton, this);
+                        tmp.on('click', function(ev) {
+                            YAHOO.util.Event.stopEvent(ev);
+                        });
+                    } else {
+                        //Stop the mousedown event so we can trap the selection in the editor!
+                        tmp.on('mousedown', function(ev) {
+                            YAHOO.util.Event.stopEvent(ev);
+                        });
+                        tmp.on('click', function(ev) {
+                            YAHOO.util.Event.stopEvent(ev);
+                        });
+                        tmp.on('change', function(ev) {
+                            if (!oButton.menucmd) {
+                                oButton.menucmd = oButton.value;
+                            }
+                            oButton.value = ev.value;
+                            this._buttonClick(ev, oButton);
+                        }, this, true);
+                        var self = this;
+                        //Hijack the mousedown event in the menu and make it fire a button click..
+                        if (tmp.getMenu().mouseDownEvent) {
+                            tmp.getMenu().mouseDownEvent.subscribe(function(ev, args) {
+                                YAHOO.log('mouseDownEvent', 'warn', 'Toolbar');
+                                var oMenu = args[1];
+                                YAHOO.util.Event.stopEvent(args[0]);
+                                tmp._onMenuClick(args[0], tmp);
+                                if (!oButton.menucmd) {
+                                    oButton.menucmd = oButton.value;
+                                }
+                                oButton.value = ((oMenu.value) ? oMenu.value : oMenu._oText.nodeValue);
+                                self._buttonClick.call(self, args[1], oButton);
+                                tmp._hideMenu();
+                                return false;
+                            });
+                            tmp.getMenu().clickEvent.subscribe(function(ev, args) {
+                                YAHOO.log('clickEvent', 'warn', 'Toolbar');
+                                YAHOO.util.Event.stopEvent(args[0]);
+                            });
+                            tmp.getMenu().mouseUpEvent.subscribe(function(ev, args) {
+                                YAHOO.log('mouseUpEvent', 'warn', 'Toolbar');
+                                YAHOO.util.Event.stopEvent(args[0]);
+                            });
+                        }
+                        
+                    }
+                } else {
+                    //Stop the mousedown event so we can trap the selection in the editor!
+                    tmp.on('mousedown', function(ev) {
+                        YAHOO.util.Event.stopEvent(ev);
+                    });
+                    tmp.on('click', function(ev) {
+                        YAHOO.util.Event.stopEvent(ev);
+                    });
+                }
+                if (this.browser.ie) {
+                    //Add a couple of new events for IE
+                    tmp.DOM_EVENTS.focusin = true;
+                    tmp.DOM_EVENTS.focusout = true;
+                    
+                    //Stop them so we don't loose focus in the Editor
+                    tmp.on('focusin', function(ev) {
+                        YAHOO.util.Event.stopEvent(ev);
+                    }, oButton, this);
+                    
+                    tmp.on('focusout', function(ev) {
+                        YAHOO.util.Event.stopEvent(ev);
+                    }, oButton, this);
+                    tmp.on('click', function(ev) {
+                        YAHOO.util.Event.stopEvent(ev);
+                    }, oButton, this);
+                }
+                if (this.browser.webkit) {
+                    //This will keep the document from gaining focus and the editor from loosing it..
+                    //Forcefully remove the focus calls in button!
+                    tmp.hasFocus = function() {
+                        return true;
+                    };
+                }
+                this._buttonList[this._buttonList.length] = tmp;
+                if ((oButton.type == 'menu') || (oButton.type == 'split') || (oButton.type == 'select')) {
+                    if (Lang.isArray(oButton.menu)) {
+                        YAHOO.log('Button type is (' + oButton.type + '), doing extra renderer work.', 'info', 'Toolbar');
+                        var menu = tmp.getMenu();
+                        if (menu.renderEvent) {
+                            menu.renderEvent.subscribe(_addMenuClasses, tmp);
+                            if (oButton.renderer) {
+                                menu.renderEvent.subscribe(oButton.renderer, tmp);
+                            }
+                        }
+                    }
+                }
+            }
+            return oButton;
+        },
+        /**
+        * @method addSeparator
+        * @description Add a new button separator to the toolbar.
+        * @param {HTMLElement} cont Optional HTML element to insert this button into.
+        * @param {HTMLElement} after Optional HTML element to insert this button after in the DOM.
+        */
+        addSeparator: function(cont, after) {
+            if (!this.get('element')) {
+                this._queue[this._queue.length] = ['addSeparator', arguments];
+                return false;
+            }
+            var sepCont = ((cont) ? cont : this.get('cont'));
+            if (!this.get('element')) {
+                this._queue[this._queue.length] = ['addSeparator', arguments];
+                return false;
+            }
+            if (this._sepCount === null) {
+                this._sepCount = 0;
+            }
+            if (!this._sep) {
+                YAHOO.log('Separator does not yet exist, creating', 'info', 'Toolbar');
+                this._sep = document.createElement('SPAN');
+                Dom.addClass(this._sep, this.CLASS_SEPARATOR);
+                this._sep.innerHTML = '|';
+            }
+            YAHOO.log('Separator does exist, cloning', 'info', 'Toolbar');
+            var _sep = this._sep.cloneNode(true);
+            this._sepCount++;
+            Dom.addClass(_sep, this.CLASS_SEPARATOR + '-' + this._sepCount);
+            if (after) {
+                var nextSib = null;
+                if (after.get) {
+                    nextSib = after.get('element').nextSibling;
+                } else if (after.nextSibling) {
+                    nextSib = after.nextSibling;
+                } else {
+                    nextSib = after;
+                }
+                if (nextSib) {
+                    if (nextSib == after) {
+                        nextSib.parentNode.appendChild(_sep);
+                    } else {
+                        nextSib.parentNode.insertBefore(_sep, nextSib);
+                    }
+                }
+            } else {
+                sepCont.appendChild(_sep);
+            }
+            return _sep;
+        },
+        /**
+        * @method _createColorPicker
+        * @private
+        * @description Creates the core DOM reference to the color picker menu item.
+        * @param {String} id the id of the toolbar to prefix this DOM container with.
+        */
+        _createColorPicker: function(id) {
+            if (Dom.get(id + '_colors')) {
+               Dom.get(id + '_colors').parentNode.removeChild(Dom.get(id + '_colors'));
+            }
+            var picker = document.createElement('div');
+            picker.className = 'yui-toolbar-colors';
+            picker.id = id + '_colors';
+            picker.style.display = 'none';
+            Event.on(window, 'load', function() {
+                document.body.appendChild(picker);
+            }, this, true);
+
+            this._colorPicker = picker;
+
+            var html = '';
+            for (var i in this._colorData) {
+                if (Lang.hasOwnProperty(this._colorData, i)) {
+                    html += '<a style="background-color: ' + i + '" href="#">' + i.replace('#', '') + '</a>';
+                }
+            }
+            html += '<span><em>X</em><strong></strong></span>';
+            picker.innerHTML = html;
+            var em = picker.getElementsByTagName('em')[0];
+            var strong = picker.getElementsByTagName('strong')[0];
+
+            Event.on(picker, 'mouseover', function(ev) {
+                var tar = Event.getTarget(ev);
+                if (tar.tagName.toLowerCase() == 'a') {
+                    em.style.backgroundColor = tar.style.backgroundColor;
+                    strong.innerHTML = this._colorData['#' + tar.innerHTML] + '<br>' + tar.innerHTML;
+                }
+            }, this, true);
+            Event.on(picker, 'focus', function(ev) {
+                Event.stopEvent(ev);
+            });
+            Event.on(picker, 'click', function(ev) {
+                Event.stopEvent(ev);
+            });
+            Event.on(picker, 'mousedown', function(ev) {
+                Event.stopEvent(ev);
+                var tar = Event.getTarget(ev);
+                if (tar.tagName.toLowerCase() == 'a') {
+                    this.fireEvent('colorPickerClicked', { type: 'colorPickerClicked', target: this, button: this._colorPicker._button, color: tar.innerHTML, colorName: this._colorData['#' + tar.innerHTML] } );
+                    this.getButtonByValue(this._colorPicker._button).getMenu().hide();
+                }
+            }, this, true);
+        },
+        /**
+        * @method _resetColorPicker
+        * @private
+        * @description Clears the currently selected color or mouseover color in the color picker.
+        */
+        _resetColorPicker: function() {
+            var em = this._colorPicker.getElementsByTagName('em')[0];
+            var strong = this._colorPicker.getElementsByTagName('strong')[0];
+            em.style.backgroundColor = 'transparent';
+            strong.innerHTML = '';
+        },
+        /**
+        * @method _makeColorButton
+        * @private
+        * @description Called to turn a "color" button into a menu button with an Overlay for the menu.
+        * @param {Object} _oButton <a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a> reference
+        */
+        _makeColorButton: function(_oButton) {
+            if (!this._colorPicker) {   
+                this._createColorPicker(this.get('id'));
+            }
+            _oButton.type = 'color';
+            _oButton.menu = new YAHOO.widget.Overlay(this.get('id') + '_' + _oButton.value + '_menu', { visible: false, position: 'absolute', iframe: true });
+            _oButton.menu.setBody('');
+            _oButton.menu.render(this.get('cont'));
+            Dom.addClass(_oButton.menu.element, 'yui-button-menu');
+            Dom.addClass(_oButton.menu.element, 'yui-color-button-menu');
+            _oButton.menu.beforeShowEvent.subscribe(function() {
+                _oButton.menu.cfg.setProperty('zindex', 5); //Re Adjust the overlays zIndex.. not sure why.
+                _oButton.menu.cfg.setProperty('context', [this.getButtonById(_oButton.id).get('element'), 'tl', 'bl']); //Re Adjust the overlay.. not sure why.
+                //Move the DOM reference of the color picker to the Overlay that we are about to show.
+                this._resetColorPicker();
+                var _p = this._colorPicker;
+                if (_p.parentNode) {
+                    _p.parentNode.removeChild(_p);
+                }
+                _oButton.menu.setBody('');
+                _oButton.menu.appendToBody(_p);
+                this._colorPicker.style.display = 'block';
+            }, this, true);
+            return _oButton;
+        },
+        /**
+        * @private
+        * @method _makeSpinButton
+        * @description Create a button similar to an OS Spin button.. It has an up/down arrow combo to scroll through a range of int values.
+        * @param {Object} _button <a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a> reference
+        * @param {Object} oButton Object literal containing the buttons initial config
+        */
+        _makeSpinButton: function(_button, oButton) {
+            _button.addClass(this.CLASS_PREFIX + '-spinbutton');
+            var self = this,
+                _par = _button._button.parentNode.parentNode, //parentNode of Button Element for appending child
+                range = oButton.range,
+                _b1 = document.createElement('a'),
+                _b2 = document.createElement('a');
+                _b1.href = '#';
+                _b2.href = '#';
+            
+            //Setup the up and down arrows
+            _b1.className = 'up';
+            _b1.title = this.STR_SPIN_UP;
+            _b1.innerHTML = this.STR_SPIN_UP;
+            _b2.className = 'down';
+            _b2.title = this.STR_SPIN_DOWN;
+            _b2.innerHTML = this.STR_SPIN_DOWN;
+
+            //Append them to the container
+            _par.appendChild(_b1);
+            _par.appendChild(_b2);
+            
+            var label = YAHOO.lang.substitute(this.STR_SPIN_LABEL, { VALUE: _button.get('label') });
+            _button.set('title', label);
+
+            var cleanVal = function(value) {
+                value = ((value < range[0]) ? range[0] : value);
+                value = ((value > range[1]) ? range[1] : value);
+                return value;
+            };
+
+            var br = this.browser;
+            var tbar = false;
+            var strLabel = this.STR_SPIN_LABEL;
+            if (this._titlebar && this._titlebar.firstChild) {
+                tbar = this._titlebar.firstChild;
+            }
+            
+            var _intUp = function(ev) {
+                YAHOO.util.Event.stopEvent(ev);
+                if (!_button.get('disabled') && (ev.keyCode != 9)) {
+                    var value = parseInt(_button.get('label'), 10);
+                    value++;
+                    value = cleanVal(value);
+                    _button.set('label', ''+value);
+                    var label = YAHOO.lang.substitute(strLabel, { VALUE: _button.get('label') });
+                    _button.set('title', label);
+                    if (!br.webkit && tbar) {
+                        //tbar.focus(); //We do this for accessibility, on the re-focus of the element, a screen reader will re-read the title that was just changed
+                        //_button.focus();
+                    }
+                    self._buttonClick(ev, oButton);
+                }
+            };
+
+            var _intDown = function(ev) {
+                YAHOO.util.Event.stopEvent(ev);
+                if (!_button.get('disabled') && (ev.keyCode != 9)) {
+                    var value = parseInt(_button.get('label'), 10);
+                    value--;
+                    value = cleanVal(value);
+
+                    _button.set('label', ''+value);
+                    var label = YAHOO.lang.substitute(strLabel, { VALUE: _button.get('label') });
+                    _button.set('title', label);
+                    if (!br.webkit && tbar) {
+                        //tbar.focus(); //We do this for accessibility, on the re-focus of the element, a screen reader will re-read the title that was just changed
+                        //_button.focus();
+                    }
+                    self._buttonClick(ev, oButton);
+                }
+            };
+
+            var _intKeyUp = function(ev) {
+                if (ev.keyCode == 38) {
+                    _intUp(ev);
+                } else if (ev.keyCode == 40) {
+                    _intDown(ev);
+                } else if (ev.keyCode == 107 && ev.shiftKey) {  //Plus Key
+                    _intUp(ev);
+                } else if (ev.keyCode == 109 && ev.shiftKey) {  //Minus Key
+                    _intDown(ev);
+                }
+            };
+
+            //Handle arrow keys..
+            _button.on('keydown', _intKeyUp, this, true);
+
+            //Listen for the click on the up button and act on it
+            //Listen for the click on the down button and act on it
+            Event.on(_b1, 'mousedown',function(ev) {
+                Event.stopEvent(ev);
+            }, this, true);
+            Event.on(_b2, 'mousedown', function(ev) {
+                Event.stopEvent(ev);
+            }, this, true);
+            Event.on(_b1, 'click', _intUp, this, true);
+            Event.on(_b2, 'click', _intDown, this, true);
+        },
+        /**
+        * @protected
+        * @method _buttonClick
+        * @description Click handler for all buttons in the toolbar.
+        * @param {String} ev The event that was passed in.
+        * @param {Object} info Object literal of information about the button that was clicked.
+        */
+        _buttonClick: function(ev, info) {
+            var doEvent = true;
+            
+            if (ev && ev.type == 'keypress') {
+                if (ev.keyCode == 9) {
+                    doEvent = false;
+                } else if ((ev.keyCode === 13) || (ev.keyCode === 0) || (ev.keyCode === 32)) {
+                } else {
+                    doEvent = false;
+                }
+            }
+
+            if (doEvent) {
+                var fireNextEvent = true,
+                    retValue = false;
+                if (info.value) {
+                    YAHOO.log('fireEvent::' + info.value + 'Click', 'info', 'Toolbar');
+                    retValue = this.fireEvent(info.value + 'Click', { type: info.value + 'Click', target: this.get('element'), button: info });
+                    if (retValue === false) {
+                        fireNextEvent = false;
+                    }
+                }
+                
+                if (info.menucmd && fireNextEvent) {
+                    YAHOO.log('fireEvent::' + info.menucmd + 'Click', 'info', 'Toolbar');
+                    retValue = this.fireEvent(info.menucmd + 'Click', { type: info.menucmd + 'Click', target: this.get('element'), button: info });
+                    if (retValue === false) {
+                        fireNextEvent = false;
+                    }
+                }
+                if (fireNextEvent) {
+                    YAHOO.log('fireEvent::buttonClick', 'info', 'Toolbar');
+                    this.fireEvent('buttonClick', { type: 'buttonClick', target: this.get('element'), button: info });
+                }
+
+                if (info.type == 'select') {
+                    var button = this.getButtonById(info.id);
+                    if (button.buttonType == 'rich') {
+                        var txt = info.value;
+                        for (var i = 0; i < info.menu.length; i++) {
+                            if (info.menu[i].value == info.value) {
+                                txt = info.menu[i].text;
+                                break;
+                            }
+                        }
+                        button.set('label', '<span class="yui-toolbar-' + info.menucmd + '-' + (info.value).replace(/ /g, '-').toLowerCase() + '">' + txt + '</span>');
+                        var _items = button.getMenu().getItems();
+                        for (var m = 0; m < _items.length; m++) {
+                            if (_items[m].value.toLowerCase() == info.value.toLowerCase()) {
+                                _items[m].cfg.setProperty('checked', true);
+                            } else {
+                                _items[m].cfg.setProperty('checked', false);
+                            }
+                        }
+                    }
+                }
+            }
+            if (ev) {
+                Event.stopEvent(ev);
+            }
+        },
+        /**
+        * @method getButtonById
+        * @description Gets a button instance from the toolbar by is Dom id.
+        * @param {String} id The Dom id to query for.
+        * @return {<a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a>}
+        */
+        getButtonById: function(id) {
+            var len = this._buttonList.length;
+            for (var i = 0; i < len; i++) {
+                if (this._buttonList[i].get('id') == id) {
+                    return this._buttonList[i];
+                }
+            }
+            return false;
+        },
+        /**
+        * @method getButtonByValue
+        * @description Gets a button instance or a menuitem instance from the toolbar by it's value.
+        * @param {String} value The button value to query for.
+        * @return {<a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a> or <a href="YAHOO.widget.MenuItem.html">YAHOO.widget.MenuItem</a>}
+        */
+        getButtonByValue: function(value) {
+            var _buttons = this.get('buttons');
+            var len = _buttons.length;
+            for (var i = 0; i < len; i++) {
+                if (_buttons[i].group !== undefined) {
+                    for (var m = 0; m < _buttons[i].buttons.length; m++) {
+                        if ((_buttons[i].buttons[m].value == value) || (_buttons[i].buttons[m].menucmd == value)) {
+                            return this.getButtonById(_buttons[i].buttons[m].id);
+                        }
+                        if (_buttons[i].buttons[m].menu) { //Menu Button, loop through the values
+                            for (var s = 0; s < _buttons[i].buttons[m].menu.length; s++) {
+                                if (_buttons[i].buttons[m].menu[s].value == value) {
+                                    return this.getButtonById(_buttons[i].buttons[m].id);
+                                }
+                            }
+                        }
+                    }
+                } else {
+                    if ((_buttons[i].value == value) || (_buttons[i].menucmd == value)) {
+                        return this.getButtonById(_buttons[i].id);
+                    }
+                    if (_buttons[i].menu) { //Menu Button, loop through the values
+                        for (var j = 0; j < _buttons[i].menu.length; j++) {
+                            if (_buttons[i].menu[j].value == value) {
+                                return this.getButtonById(_buttons[i].id);
+                            }
+                        }
+                    }
+                }
+            }
+            return false;
+        },
+        /**
+        * @method getButtonByIndex
+        * @description Gets a button instance from the toolbar by is index in _buttonList.
+        * @param {Number} index The index of the button in _buttonList.
+        * @return {<a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a>}
+        */
+        getButtonByIndex: function(index) {
+            if (this._buttonList[index]) {
+                return this._buttonList[index];
+            } else {
+                return false;
+            }
+        },
+        /**
+        * @method getButtons
+        * @description Returns an array of buttons in the current toolbar
+        * @return {Array}
+        */
+        getButtons: function() {
+            return this._buttonList;
+        },
+        /**
+        * @method disableButton
+        * @description Disables a button in the toolbar.
+        * @param {String/Number} id Disable a button by it's id, index or value.
+        * @return {Boolean}
+        */
+        disableButton: function(id) {
+            var button = id;
+            if (Lang.isString(id)) {
+                button = this.getButtonById(id);
+            }
+            if (Lang.isNumber(id)) {
+                button = this.getButtonByIndex(id);
+            }
+            if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
+                button = this.getButtonByValue(id);
+            }
+            if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
+                button.set('disabled', true);
+            } else {
+                return false;
+            }
+        },
+        /**
+        * @method enableButton
+        * @description Enables a button in the toolbar.
+        * @param {String/Number} id Enable a button by it's id, index or value.
+        * @return {Boolean}
+        */
+        enableButton: function(id) {
+            if (this.get('disabled')) {
+                return false;
+            }
+            var button = id;
+            if (Lang.isString(id)) {
+                button = this.getButtonById(id);
+            }
+            if (Lang.isNumber(id)) {
+                button = this.getButtonByIndex(id);
+            }
+            if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
+                button = this.getButtonByValue(id);
+            }
+            if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
+                if (button.get('disabled')) {
+                    button.set('disabled', false);
+                }
+            } else {
+                return false;
+            }
+        },
+        /**
+        * @method selectButton
+        * @description Selects a button in the toolbar.
+        * @param {String/Number} id Select a button by it's id, index or value.
+        * @return {Boolean}
+        */
+        selectButton: function(id, value) {
+            var button = id;
+            if (id) {
+                if (Lang.isString(id)) {
+                    button = this.getButtonById(id);
+                }
+                if (Lang.isNumber(id)) {
+                    button = this.getButtonByIndex(id);
+                }
+                if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
+                    button = this.getButtonByValue(id);
+                }
+                if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
+                    button.addClass('yui-button-selected');
+                    button.addClass('yui-button-' + button.get('value') + '-selected');
+                    if (value) {
+                        if (button.buttonType == 'rich') {
+                            var _items = button.getMenu().getItems();
+                            for (var m = 0; m < _items.length; m++) {
+                                if (_items[m].value == value) {
+                                    _items[m].cfg.setProperty('checked', true);
+                                    button.set('label', '<span class="yui-toolbar-' + button.get('value') + '-' + (value).replace(/ /g, '-').toLowerCase() + '">' + _items[m]._oText.nodeValue + '</span>');
+                                } else {
+                                    _items[m].cfg.setProperty('checked', false);
+                                }
+                            }
+                        }
+                    }
+                } else {
+                    return false;
+                }
+            }
+        },
+        /**
+        * @method deselectButton
+        * @description Deselects a button in the toolbar.
+        * @param {String/Number} id Deselect a button by it's id, index or value.
+        * @return {Boolean}
+        */
+        deselectButton: function(id) {
+            var button = id;
+            if (Lang.isString(id)) {
+                button = this.getButtonById(id);
+            }
+            if (Lang.isNumber(id)) {
+                button = this.getButtonByIndex(id);
+            }
+            if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
+                button = this.getButtonByValue(id);
+            }
+            if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
+                button.removeClass('yui-button-selected');
+                button.removeClass('yui-button-' + button.get('value') + '-selected');
+                button.removeClass('yui-button-hover');
+            } else {
+                return false;
+            }
+        },
+        /**
+        * @method deselectAllButtons
+        * @description Deselects all buttons in the toolbar.
+        * @return {Boolean}
+        */
+        deselectAllButtons: function() {
+            var len = this._buttonList.length;
+            for (var i = 0; i < len; i++) {
+                this.deselectButton(this._buttonList[i]);
+            }
+        },
+        /**
+        * @method disableAllButtons
+        * @description Disables all buttons in the toolbar.
+        * @return {Boolean}
+        */
+        disableAllButtons: function() {
+            if (this.get('disabled')) {
+                return false;
+            }
+            var len = this._buttonList.length;
+            for (var i = 0; i < len; i++) {
+                this.disableButton(this._buttonList[i]);
+            }
+        },
+        /**
+        * @method enableAllButtons
+        * @description Enables all buttons in the toolbar.
+        * @return {Boolean}
+        */
+        enableAllButtons: function() {
+            if (this.get('disabled')) {
+                return false;
+            }
+            var len = this._buttonList.length;
+            for (var i = 0; i < len; i++) {
+                this.enableButton(this._buttonList[i]);
+            }
+        },
+        /**
+        * @method resetAllButtons
+        * @description Resets all buttons to their initial state.
+        * @param {Object} _ex Except these buttons
+        * @return {Boolean}
+        */
+        resetAllButtons: function(_ex) {
+            if (!Lang.isObject(_ex)) {
+                _ex = {};
+            }
+            if (this.get('disabled')) {
+                return false;
+            }
+            var len = this._buttonList.length;
+            for (var i = 0; i < len; i++) {
+                var _button = this._buttonList[i];
+                var disabled = _button._configs.disabled._initialConfig.value;
+                if (_ex[_button.get('id')]) {
+                    this.enableButton(_button);
+                    this.selectButton(_button);
+                } else {
+                    if (disabled) {
+                        this.disableButton(_button);
+                    } else {
+                        this.enableButton(_button);
+                    }
+                    this.deselectButton(_button);
+                }
+            }
+        },
+        /**
+        * @method destroyButton
+        * @description Destroy a button in the toolbar.
+        * @param {String/Number} id Destroy a button by it's id or index.
+        * @return {Boolean}
+        */
+        destroyButton: function(id) {
+            var button = id;
+            if (Lang.isString(id)) {
+                button = this.getButtonById(id);
+            }
+            if (Lang.isNumber(id)) {
+                button = this.getButtonByIndex(id);
+            }
+            if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
+                button = this.getButtonByValue(id);
+            }
+            if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
+                var thisID = button.get('id');
+                button.destroy();
+
+                var len = this._buttonList.length;
+                for (var i = 0; i < len; i++) {
+                    if (this._buttonList[i].get('id') == thisID) {
+                        this._buttonList[i] = null;
+                    }
+                }
+            } else {
+                return false;
+            }
+
+        },
+        /**
+        * @method destroy
+        * @description Destroys the toolbar, all of it's elements and objects.
+        * @return {Boolean}
+        */
+        destroy: function() {
+            this.get('element').innerHTML = '';
+            this.get('element').className = '';
+            //Brutal Object Destroy
+            for (var i in this) {
+                if (Lang.hasOwnProperty(this, i)) {
+                    this[i] = null;
+                }
+            }
+            return true;
+        },
+        /**
+        * @method collapse
+        * @description Programatically collapse the toolbar.
+        * @param {Boolean} collapse True to collapse, false to expand.
+        */
+        collapse: function(collapse) {
+            var el = Dom.getElementsByClassName('collapse', 'span', this._titlebar);
+            if (collapse === false) {
+                Dom.removeClass(this.get('cont').parentNode, 'yui-toolbar-container-collapsed');
+                if (el[0]) {
+                    Dom.removeClass(el[0], 'collapsed');
+                }
+                this.fireEvent('toolbarExpanded', { type: 'toolbarExpanded', target: this });
+            } else {
+                if (el[0]) {
+                    Dom.addClass(el[0], 'collapsed');
+                }
+                Dom.addClass(this.get('cont').parentNode, 'yui-toolbar-container-collapsed');
+                this.fireEvent('toolbarCollapsed', { type: 'toolbarCollapsed', target: this });
+            }
+        },
+        /**
+        * @method toString
+        * @description Returns a string representing the toolbar.
+        * @return {String}
+        */
+        toString: function() {
+            return 'Toolbar (#' + this.get('element').id + ') with ' + this._buttonList.length + ' buttons.';
+        }
+    });
+/**
+* @event buttonClick
+* @param {Object} o The object passed to this handler is the button config used to create the button.
+* @description Fires when any botton receives a click event. Passes back a single object representing the buttons config object. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event valueClick
+* @param {Object} o The object passed to this handler is the button config used to create the button.
+* @description This is a special dynamic event that is created and dispatched based on the value property
+* of the button config. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* Example:
+* <code><pre>
+* buttons : [
+*   { type: 'button', value: 'test', value: 'testButton' }
+* ]</pre>
+* </code>
+* With the valueClick event you could subscribe to this buttons click event with this:
+* tbar.in('testButtonClick', function() { alert('test button clicked'); })
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event toolbarExpanded
+* @description Fires when the toolbar is expanded via the collapse button. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event toolbarCollapsed
+* @description Fires when the toolbar is collapsed via the collapse button. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+})();
+/**
+ * @description <p>The Rich Text Editor is a UI control that replaces a standard HTML textarea; it allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like bold and italic text, and drag-and-drop inclusion and sizing of images. The Rich Text Editor's toolbar is extensible via a plugin architecture so that advanced implementations can achieve a high degree of customization.</p>
+ * @namespace YAHOO.widget
+ * @requires yahoo, dom, element, event, toolbar
+ * @optional animation, container_core
+ * @beta
+ */
+
+(function() {
+var Dom = YAHOO.util.Dom,
+    Event = YAHOO.util.Event,
+    Lang = YAHOO.lang,
+    Toolbar = YAHOO.widget.Toolbar;
+
+    /**
+     * The Rich Text Editor is a UI control that replaces a standard HTML textarea; it allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like bold and italic text, and drag-and-drop inclusion and sizing of images. The Rich Text Editor's toolbar is extensible via a plugin architecture so that advanced implementations can achieve a high degree of customization.
+     * @constructor
+     * @class SimpleEditor
+     * @extends YAHOO.util.Element
+     * @param {String/HTMLElement} el The textarea element to turn into an editor.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+    
+    YAHOO.widget.SimpleEditor = function(el, attrs) {
+        YAHOO.log('SimpleEditor Initalizing', 'info', 'SimpleEditor');
+
+        var oConfig = {
+            element: null,
+            attributes: (attrs || {})
+        }, id = null;
+
+        if (Lang.isString(el)) {
+            id = el;
+        } else {
+            id = el.id;
+        }
+        oConfig.element = el;
+
+        var element_cont = document.createElement('DIV');
+        oConfig.attributes.element_cont = new YAHOO.util.Element(element_cont, {
+            id: id + '_container'
+        });
+        var div = document.createElement('div');
+        Dom.addClass(div, 'first-child');
+        oConfig.attributes.element_cont.appendChild(div);
+        
+        if (!oConfig.attributes.toolbar_cont) {
+            oConfig.attributes.toolbar_cont = document.createElement('DIV');
+            oConfig.attributes.toolbar_cont.id = id + '_toolbar';
+            div.appendChild(oConfig.attributes.toolbar_cont);
+        }
+        var editorWrapper = document.createElement('DIV');
+        div.appendChild(editorWrapper);
+        oConfig.attributes.editor_wrapper = editorWrapper;
+
+        YAHOO.widget.SimpleEditor.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
+    };
+
+    /**
+    * @private
+    * @method _cleanClassName
+    * @description Makes a useable classname from dynamic data, by dropping it to lowercase and replacing spaces with -'s.
+    * @param {String} str The classname to clean up
+    * @returns {String}
+    */
+    function _cleanClassName(str) {
+        return str.replace(/ /g, '-').toLowerCase();
+    }
+
+
+    YAHOO.extend(YAHOO.widget.SimpleEditor, YAHOO.util.Element, {
+        /**
+        * @property _docType
+        * @description The DOCTYPE to use in the editable container.
+        * @type String
+        */
+        _docType: '<!DOCTYPE HTML PUBLIC "-/'+'/W3C/'+'/DTD HTML 4.01/'+'/EN" "http:/'+'/www.w3.org/TR/html4/strict.dtd">',
+        /**
+        * @property editorDirty
+        * @description This flag will be set when certain things in the Editor happen. It is to be used by the developer to check to see if content has changed.
+        * @type Boolean
+        */
+        editorDirty: false,
+        /**
+        * @property _defaultCSS
+        * @description The default CSS used in the config for 'css'. This way you can add to the config like this: { css: YAHOO.widget.SimpleEditor.prototype._defaultCSS + 'ADD MYY CSS HERE' }
+        * @type String
+        */
+        _defaultCSS: 'html { height: 95%; } body { height: 100%; padding: 7px; background-color: #fff; font:13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small; } a { color: blue; text-decoration: underline; cursor: pointer; } .warning-localfile { border-bottom: 1px dashed red !important; } .yui-busy { cursor: wait !important; } img.selected { border: 2px dotted #808080; } img { cursor: pointer !important; border: none; }',
+        /**
+        * @property _defaultToolbar
+        * @private
+        * @description Default toolbar config.
+        * @type Object
+        */
+        _defaultToolbar: {
+            collapse: true,
+            titlebar: 'Text Editing Tools',
+            draggable: false,
+            buttons: [
+                { group: 'fontstyle', label: 'Font Name and Size',
+                    buttons: [
+                        { type: 'select', label: 'Arial', value: 'fontname', disabled: true,
+                            menu: [
+                                { text: 'Arial', checked: true },
+                                { text: 'Arial Black' },
+                                { text: 'Comic Sans MS' },
+                                { text: 'Courier New' },
+                                { text: 'Lucida Console' },
+                                { text: 'Tahoma' },
+                                { text: 'Times New Roman' },
+                                { text: 'Trebuchet MS' },
+                                { text: 'Verdana' }
+                            ]
+                        },
+                        { type: 'spin', label: '13', value: 'fontsize', range: [ 9, 75 ], disabled: true }
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'textstyle', label: 'Font Style',
+                    buttons: [
+                        { type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' },
+                        { type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' },
+                        { type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' },
+                        { type: 'separator' },
+                        { type: 'color', label: 'Font Color', value: 'forecolor', disabled: true },
+                        { type: 'color', label: 'Background Color', value: 'backcolor', disabled: true }
+                        
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'indentlist', label: 'Lists',
+                    buttons: [
+                        { type: 'push', label: 'Create an Unordered List', value: 'insertunorderedlist' },
+                        { type: 'push', label: 'Create an Ordered List', value: 'insertorderedlist' }
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'insertitem', label: 'Insert Item',
+                    buttons: [
+                        { type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true },
+                        { type: 'push', label: 'Insert Image', value: 'insertimage' }
+                    ]
+                }
+            ]
+        },
+        /**
+        * @property _lastButton
+        * @private
+        * @description The last button pressed, so we don't disable it.
+        * @type Object
+        */
+        _lastButton: null,
+        /**
+        * @property _baseHREF
+        * @private
+        * @description The base location of the editable page (this page) so that relative paths for image work.
+        * @type String
+        */
+        _baseHREF: function() {
+            var href = document.location.href;
+            if (href.indexOf('?') !== -1) { //Remove the query string
+                href = href.substring(0, href.indexOf('?'));
+            }
+            href = href.substring(0, href.lastIndexOf('/')) + '/';
+            return href;
+        }(),
+        /**
+        * @property _lastImage
+        * @private
+        * @description Safari reference for the last image selected (for styling as selected).
+        * @type HTMLElement
+        */
+        _lastImage: null,
+        /**
+        * @property _blankImageLoaded
+        * @private
+        * @description Don't load the blank image more than once..
+        * @type Date
+        */
+        _blankImageLoaded: false,
+        /**
+        * @property _fixNodesTimer
+        * @private
+        * @description Holder for the fixNodes timer
+        * @type Date
+        */
+        _fixNodesTimer: null,
+        /**
+        * @property _nodeChangeTimer
+        * @private
+        * @description Holds a reference to the nodeChange setTimeout call
+        * @type Number
+        */
+        _nodeChangeTimer: null,
+        /**
+        * @property _lastNodeChangeEvent
+        * @private
+        * @description Flag to determine the last event that fired a node change
+        * @type Event
+        */
+        _lastNodeChangeEvent: null,
+        /**
+        * @property _lastNodeChange
+        * @private
+        * @description Flag to determine when the last node change was fired
+        * @type Date
+        */
+        _lastNodeChange: 0,
+        /**
+        * @property _rendered
+        * @private
+        * @description Flag to determine if editor has been rendered or not
+        * @type Boolean
+        */
+        _rendered: false,
+        /**
+        * @property DOMReady
+        * @private
+        * @description Flag to determine if DOM is ready or not
+        * @type Boolean
+        */
+        DOMReady: null,
+        /**
+        * @property _selection
+        * @private
+        * @description Holder for caching iframe selections
+        * @type Object
+        */
+        _selection: null,
+        /**
+        * @property _mask
+        * @private
+        * @description DOM Element holder for the editor Mask when disabled
+        * @type Object
+        */
+        _mask: null,
+        /**
+        * @property _showingHiddenElements
+        * @private
+        * @description Status of the hidden elements button
+        * @type Boolean
+        */
+        _showingHiddenElements: null,
+        /**
+        * @property currentWindow
+        * @description A reference to the currently open EditorWindow
+        * @type Object
+        */
+        currentWindow: null,
+        /**
+        * @property currentEvent
+        * @description A reference to the current editor event
+        * @type Event
+        */
+        currentEvent: null,
+        /**
+        * @property operaEvent
+        * @private
+        * @description setTimeout holder for Opera and Image DoubleClick event..
+        * @type Object
+        */
+        operaEvent: null,
+        /**
+        * @property currentFont
+        * @description A reference to the last font selected from the Toolbar
+        * @type HTMLElement
+        */
+        currentFont: null,
+        /**
+        * @property currentElement
+        * @description A reference to the current working element in the editor
+        * @type Array
+        */
+        currentElement: [],
+        /**
+        * @property dompath
+        * @description A reference to the dompath container for writing the current working dom path to.
+        * @type HTMLElement
+        */
+        dompath: null,
+        /**
+        * @property beforeElement
+        * @description A reference to the H2 placed before the editor for Accessibilty.
+        * @type HTMLElement
+        */
+        beforeElement: null,
+        /**
+        * @property afterElement
+        * @description A reference to the H2 placed after the editor for Accessibilty.
+        * @type HTMLElement
+        */
+        afterElement: null,
+        /**
+        * @property invalidHTML
+        * @description Contains a list of HTML elements that are invalid inside the editor. They will be removed when they are found. If you set the value of a key to "{ keepContents: true }", then the element will be replaced with a yui-non span to be filtered out when cleanHTML is called. The only tag that is ignored here is the span tag as it will force the Editor into a loop and freeze the browser. However.. all of these tags will be removed in the cleanHTML routine.
+        * @type Object
+        */
+        invalidHTML: {
+            form: true,
+            input: true,
+            button: true,
+            select: true,
+            link: true,
+            html: true,
+            body: true,
+            script: true,
+            style: true,
+            textarea: true
+        },
+        /**
+        * @property toolbar
+        * @description Local property containing the <a href="YAHOO.widget.Toolbar.html">YAHOO.widget.Toolbar</a> instance
+        * @type <a href="YAHOO.widget.Toolbar.html">YAHOO.widget.Toolbar</a>
+        */
+        toolbar: null,
+        /**
+        * @private
+        * @property _contentTimer
+        * @description setTimeout holder for documentReady check
+        */
+        _contentTimer: null,
+        /**
+        * @private
+        * @property _contentTimerCounter
+        * @description Counter to check the number of times the body is polled for before giving up
+        * @type Number
+        */
+        _contentTimerCounter: 0,
+        /**
+        * @private
+        * @property _disabled
+        * @description The Toolbar items that should be disabled if there is no selection present in the editor.
+        * @type Array
+        */
+        _disabled: [ 'createlink', 'fontname', 'fontsize', 'forecolor', 'backcolor' ],
+        /**
+        * @private
+        * @property _alwaysDisabled
+        * @description The Toolbar items that should ALWAYS be disabled event if there is a selection present in the editor.
+        * @type Object
+        */
+        _alwaysDisabled: { },
+        /**
+        * @private
+        * @property _alwaysEnabled
+        * @description The Toolbar items that should ALWAYS be enabled event if there isn't a selection present in the editor.
+        * @type Object
+        */
+        _alwaysEnabled: { },
+        /**
+        * @private
+        * @property _semantic
+        * @description The Toolbar commands that we should attempt to make tags out of instead of using styles.
+        * @type Object
+        */
+        _semantic: { 'bold': true, 'italic' : true, 'underline' : true },
+        /**
+        * @private
+        * @property _tag2cmd
+        * @description A tag map of HTML tags to convert to the different types of commands so we can select the proper toolbar button.
+        * @type Object
+        */
+        _tag2cmd: {
+            'b': 'bold',
+            'strong': 'bold',
+            'i': 'italic',
+            'em': 'italic',
+            'u': 'underline',
+            'sup': 'superscript',
+            'sub': 'subscript',
+            'img': 'insertimage',
+            'a' : 'createlink',
+            'ul' : 'insertunorderedlist',
+            'ol' : 'insertorderedlist'
+        },
+
+        /**
+        * @private _createIframe
+        * @description Creates the DOM and YUI Element for the iFrame editor area.
+        * @param {String} id The string ID to prefix the iframe with
+        * @returns {Object} iFrame object
+        */
+        _createIframe: function() {
+            var ifrmDom = document.createElement('iframe');
+            ifrmDom.id = this.get('id') + '_editor';
+            var config = {
+                border: '0',
+                frameBorder: '0',
+                marginWidth: '0',
+                marginHeight: '0',
+                leftMargin: '0',
+                topMargin: '0',
+                allowTransparency: 'true',
+                width: '100%'
+            };
+            for (var i in config) {
+                if (Lang.hasOwnProperty(config, i)) {
+                    ifrmDom.setAttribute(i, config[i]);
+                }
+            }
+            var isrc = 'javascript:;';
+            if (this.browser.ie) {
+                if (window.location.href.toLowerCase().indexOf("https") !== 0) {
+                    isrc = 'about:blank';
+                }
+            }
+            ifrmDom.setAttribute('src', isrc);
+            var ifrm = new YAHOO.util.Element(ifrmDom);
+            //ifrm.setStyle('zIndex', '-1');
+            return ifrm;
+        },
+        /**
+        * @private _isElement
+        * @description Checks to see if an Element reference is a valid one and has a certain tag type
+        * @param {HTMLElement} el The element to check
+        * @param {String} tag The tag that the element needs to be
+        * @returns {Boolean}
+        */
+        _isElement: function(el, tag) {
+            if (el && el.tagName && (el.tagName.toLowerCase() == tag)) {
+                return true;
+            }
+            if (el && el.getAttribute && (el.getAttribute('tag') == tag)) {
+                return true;
+            }
+            return false;
+        },
+        /**
+        * @private _hasParent
+        * @description Checks to see if an Element reference or one of it's parents is a valid one and has a certain tag type
+        * @param {HTMLElement} el The element to check
+        * @param {String} tag The tag that the element needs to be
+        * @returns HTMLElement
+        */
+        _hasParent: function(el, tag) {
+            if (!el || !el.parentNode) {
+                return false;
+            }
+            
+            while (el.parentNode) {
+                if (this._isElement(el, tag)) {
+                    return el;
+                }
+                if (el.parentNode) {
+                    el = el.parentNode;
+                } else {
+                    return false;
+                }
+            }
+            return false;
+        },
+        /**
+        * @private
+        * @method _getDoc
+        * @description Get the Document of the IFRAME
+        * @return {Object}
+        */
+        _getDoc: function() {
+            var value = false;
+            if (this.get) {
+                if (this.get('iframe')) {
+                    if (this.get('iframe').get) {
+                        if (this.get('iframe').get('element')) {
+                            try {
+                                if (this.get('iframe').get('element').contentWindow) {
+                                    if (this.get('iframe').get('element').contentWindow.document) {
+                                        value = this.get('iframe').get('element').contentWindow.document;
+                                        return value;
+                                    }
+                                }
+                            } catch (e) {}
+                        }
+                    }
+                }
+            }
+            return false;
+        },
+        /**
+        * @private
+        * @method _getWindow
+        * @description Get the Window of the IFRAME
+        * @return {Object}
+        */
+        _getWindow: function() {
+            return this.get('iframe').get('element').contentWindow;
+        },
+        /**
+        * @private
+        * @method _focusWindow
+        * @description Attempt to set the focus of the iframes window.
+        * @param {Boolean} onLoad Safari needs some special care to set the cursor in the iframe
+        */
+        _focusWindow: function(onLoad) {
+            if (this.browser.webkit) {
+                if (onLoad) {
+                    /**
+                    * @knownissue Safari Cursor Position
+                    * @browser Safari 2.x
+                    * @description Can't get Safari to place the cursor at the beginning of the text..
+                    * This workaround at least set's the toolbar into the proper state.
+                    */
+                    this._getSelection().setBaseAndExtent(this._getDoc().body.firstChild, 0, this._getDoc().body.firstChild, 1);
+                    if (this.browser.webkit3) {
+                        this._getSelection().collapseToStart();
+                    } else {
+                        this._getSelection().collapse(false);
+                    }
+                } else {
+                    this._getSelection().setBaseAndExtent(this._getDoc().body, 1, this._getDoc().body, 1);
+                    if (this.browser.webkit3) {
+                        this._getSelection().collapseToStart();
+                    } else {
+                        this._getSelection().collapse(false);
+                    }
+                }
+                this._getWindow().focus();
+            } else {
+                this._getWindow().focus();
+            }
+        },
+        /**
+        * @private
+        * @method _hasSelection
+        * @description Determines if there is a selection in the editor document.
+        * @returns {Boolean}
+        */
+        _hasSelection: function() {
+            var sel = this._getSelection();
+            var range = this._getRange();
+            var hasSel = false;
+
+            //Internet Explorer
+            if (this.browser.ie || this.browser.opera) {
+                if (range.text) {
+                    hasSel = true;
+                }
+                if (range.html) {
+                    hasSel = true;
+                }
+            } else {
+                if (this.browser.webkit) {
+                    if (sel+'' !== '') {
+                        hasSel = true;
+                    }
+                } else {
+                    if (sel && (sel.toString() !== '') && (sel !== undefined)) {
+                        hasSel = true;
+                    }
+                }
+            }
+            return hasSel;
+        },
+        /**
+        * @private
+        * @method _getSelection
+        * @description Handles the different selection objects across the A-Grade list.
+        * @returns {Object} Selection Object
+        */
+        _getSelection: function() {
+            var _sel = null;
+            if (this._getDoc() && this._getWindow()) {
+                if (this._getDoc().selection) {
+                    _sel = this._getDoc().selection;
+                } else {
+                    _sel = this._getWindow().getSelection();
+                }
+                //Handle Safari's lack of Selection Object
+                if (this.browser.webkit) {
+                    if (_sel.baseNode) {
+                            this._selection = {};
+                            this._selection.baseNode = _sel.baseNode;
+                            this._selection.baseOffset = _sel.baseOffset;
+                            this._selection.extentNode = _sel.extentNode;
+                            this._selection.extentOffset = _sel.extentOffset;
+                    } else if (this._selection !== null) {
+                        _sel = this._getWindow().getSelection();
+                        _sel.setBaseAndExtent(
+                            this._selection.baseNode,
+                            this._selection.baseOffset,
+                            this._selection.extentNode,
+                            this._selection.extentOffset);
+                        this._selection = null;
+                    }
+                }
+            }
+            return _sel;
+        },
+        /**
+        * @private
+        * @method _selectNode
+        * @description Places the highlight around a given node
+        * @param {HTMLElement} node The node to select
+        */
+        _selectNode: function(node) {
+            if (!node) {
+                return false;
+            }
+            var sel = this._getSelection(),
+                range = null;
+
+            if (this.browser.ie) {
+                try { //IE freaks out here sometimes..
+                    range = this._getDoc().body.createTextRange();
+                    range.moveToElementText(node);
+                    range.select();
+                } catch (e) {
+                    YAHOO.log('IE failed to select element: ' + node.tagName, 'warn', 'SimpleEditor');
+                }
+            } else if (this.browser.webkit) {
+				sel.setBaseAndExtent(node, 0, node, node.innerText.length);
+            } else if (this.browser.opera) {
+                sel = this._getWindow().getSelection();
+                range = this._getDoc().createRange();
+                range.selectNode(node);
+                sel.removeAllRanges();
+                sel.addRange(range);
+            } else {
+                range = this._getDoc().createRange();
+                range.selectNodeContents(node);
+                sel.removeAllRanges();
+                sel.addRange(range);
+            }
+        },
+        /**
+        * @private
+        * @method _getRange
+        * @description Handles the different range objects across the A-Grade list.
+        * @returns {Object} Range Object
+        */
+        _getRange: function() {
+            var sel = this._getSelection();
+
+            if (sel === null) {
+                return null;
+            }
+
+            if (this.browser.webkit && !sel.getRangeAt) {
+                var _range = this._getDoc().createRange();
+                try {
+                    _range.setStart(sel.anchorNode, sel.anchorOffset);
+                    _range.setEnd(sel.focusNode, sel.focusOffset);
+                } catch (e) {
+                    _range = this._getWindow().getSelection()+'';
+                }
+                return _range;
+            }
+
+            if (this.browser.ie || this.browser.opera) {
+                return sel.createRange();
+            }
+
+            if (sel.rangeCount > 0) {
+                return sel.getRangeAt(0);
+            }
+            return null;
+        },
+        /**
+        * @private
+        * @method _setDesignMode
+        * @description Sets the designMode of the iFrame document.
+        * @param {String} state This should be either on or off
+        */
+        _setDesignMode: function(state) {
+            try {
+                this._getDoc().designMode = state;
+            } catch(e) { }
+        },
+        /**
+        * @private
+        * @method _toggleDesignMode
+        * @description Toggles the designMode of the iFrame document on and off.
+        * @returns {String} The state that it was set to.
+        */
+        _toggleDesignMode: function() {
+            var _dMode = this._getDoc().designMode.toLowerCase(),
+                _state = 'on';
+            if (_dMode == 'on') {
+                _state = 'off';
+            }
+            this._setDesignMode(_state);
+            return _state;
+        },
+        /**
+        * @private
+        * @method _initEditor
+        * @description This method is fired from _checkLoaded when the document is ready. It turns on designMode and set's up the listeners.
+        */
+        _initEditor: function() {
+            YAHOO.log('editorLoaded', 'info', 'SimpleEditor');
+            if (this.browser.ie) {
+                this._getDoc().body.style.margin = '0';
+            }
+            if (!this.get('disabled')) {
+                this._setDesignMode('on');
+            }
+            
+            this.toolbar.on('buttonClick', this._handleToolbarClick, this, true);
+            //Setup Listeners on iFrame
+            Event.on(this._getDoc(), 'mouseup', this._handleMouseUp, this, true);
+            Event.on(this._getDoc(), 'mousedown', this._handleMouseDown, this, true);
+            Event.on(this._getDoc(), 'click', this._handleClick, this, true);
+            Event.on(this._getDoc(), 'dblclick', this._handleDoubleClick, this, true);
+            Event.on(this._getDoc(), 'keypress', this._handleKeyPress, this, true);
+            Event.on(this._getDoc(), 'keyup', this._handleKeyUp, this, true);
+            Event.on(this._getDoc(), 'keydown', this._handleKeyDown, this, true);
+            if (!this.get('disabled')) {
+                this.toolbar.set('disabled', false);
+            }
+            this.fireEvent('editorContentLoaded', { type: 'editorLoaded', target: this });
+            if (this.get('dompath')) {
+                YAHOO.log('Delayed DomPath write', 'info', 'SimpleEditor');
+                var self = this;
+                setTimeout(function() {
+                    self._writeDomPath.call(self);
+                }, 150);
+            }
+            this.nodeChange(true);
+            this._setBusy(true);
+        },
+        /**
+        * @private
+        * @method _checkLoaded
+        * @description Called from a setTimeout loop to check if the iframes body.onload event has fired, then it will init the editor.
+        */
+        _checkLoaded: function() {
+            this._contentTimerCounter++;
+            if (this._contentTimer) {
+                clearTimeout(this._contentTimer);
+            }
+            if (this._contentTimerCounter > 250) {
+                YAHOO.log('ERROR: Body Did Not load', 'error', 'SimpleEditor');
+                return false;
+            }
+            var init = false;
+            try {
+                if (this._getDoc() && this._getDoc().body && (this._getDoc().body._rteLoaded === true)) {
+                    init = true;
+                }
+            } catch (e) {
+                init = false;
+                YAHOO.log('checking body (e)' + e, 'error', 'SimpleEditor');
+            }
+
+            if (init === true) {
+                //The onload event has fired, clean up after ourselves and fire the _initEditor method
+                this._initEditor();
+            } else {
+                var self = this;
+                this._contentTimer = setTimeout(function() {
+                    self._checkLoaded.call(self);
+                }, 20);
+            }
+        },
+        /**
+        * @private
+        * @method _setInitialContent
+        * @description This method will open the iframes content document and write the textareas value into it, then start the body.onload checking.
+        */
+        _setInitialContent: function() {
+            YAHOO.log('Populating editor body with contents of the text area', 'info', 'SimpleEditor');
+            var html = Lang.substitute(this.get('html'), {
+                TITLE: this.STR_TITLE,
+                CONTENT: this._cleanIncomingHTML(this.get('element').value),
+                CSS: this.get('css'),
+                HIDDEN_CSS: ((this.get('hiddencss')) ? this.get('hiddencss') : '/* No Hidden CSS */'),
+                EXTRA_CSS: ((this.get('extracss')) ? this.get('extracss') : '/* No Extra CSS */')
+            }),
+            check = true;
+            if (document.compatMode != 'BackCompat') {
+                YAHOO.log('Adding Doctype to editable area', 'info', 'SimpleEditor');
+                html = this._docType + "\n" + html;
+            } else {
+                YAHOO.log('DocType skipped because we are in BackCompat Mode.', 'warn', 'SimpleEditor');
+            }
+
+            if (this.browser.ie || this.browser.webkit || this.browser.opera || (navigator.userAgent.indexOf('Firefox/1.5') != -1)) {
+                //Firefox 1.5 doesn't like setting designMode on an document created with a data url
+                try {
+                    this._getDoc().open();
+                    this._getDoc().write(html);
+                    this._getDoc().close();
+                } catch (e) {
+                    YAHOO.log('Setting doc failed.. (_setInitialContent)', 'error', 'SimpleEditor');
+                    //Safari will only be here if we are hidden
+                    check = false;
+                }
+            } else {
+                //This keeps Firefox 2 from writing the iframe to history preserving the back buttons functionality
+                this.get('iframe').get('element').src = 'data:text/html;charset=utf-8,' + encodeURIComponent(html);
+            }
+            if (check) {
+                this._checkLoaded();
+            }
+        },
+        /**
+        * @private
+        * @method _setMarkupType
+        * @param {String} action The action to take. Possible values are: css, default or semantic
+        * @description This method will turn on/off the useCSS execCommand.
+        */
+        _setMarkupType: function(action) {
+            switch (this.get('markup')) {
+                case 'css':
+                    this._setEditorStyle(true);
+                    break;
+                case 'default':
+                    this._setEditorStyle(false);
+                    break;
+                case 'semantic':
+                case 'xhtml':
+                    if (this._semantic[action]) {
+                        this._setEditorStyle(false);
+                    } else {
+                        this._setEditorStyle(true);
+                    }
+                    break;
+            }
+        },
+        /**
+        * Set the editor to use CSS instead of HTML
+        * @param {Booleen} stat True/False
+        */
+        _setEditorStyle: function(stat) {
+            try {
+                this._getDoc().execCommand('useCSS', false, !stat);
+            } catch (ex) {
+            }
+        },
+        /**
+        * @private
+        * @method _getSelectedElement
+        * @description This method will attempt to locate the element that was last interacted with, either via selection, location or event.
+        * @returns {HTMLElement} The currently selected element.
+        */
+        _getSelectedElement: function() {
+            var doc = this._getDoc(),
+                range = null,
+                sel = null,
+                elm = null;
+
+            if (this.browser.ie) {
+                this.currentEvent = this._getWindow().event; //Event utility assumes window.event, so we need to reset it to this._getWindow().event;
+                range = this._getRange();
+                if (range) {
+                    elm = range.item ? range.item(0) : range.parentElement();
+                    if (elm == doc.body) {
+                        elm = null;
+                    }
+                }
+                if ((this.currentEvent !== null) && (this.currentEvent.keyCode === 0)) {
+                    elm = Event.getTarget(this.currentEvent);
+                }
+            } else {
+                sel = this._getSelection();
+                range = this._getRange();
+
+                if (!sel || !range) {
+                    return null;
+                }
+                if (!this._hasSelection()) {
+                    if (sel.anchorNode && (sel.anchorNode.nodeType == 3)) {
+                        if (sel.anchorNode.parentNode) { //next check parentNode
+                            elm = sel.anchorNode.parentNode;
+                        }
+                        if (sel.anchorNode.nextSibling != sel.focusNode.nextSibling) {
+                            elm = sel.anchorNode.nextSibling;
+                        }
+                    }
+                    if (this._isElement(elm, 'br')) {
+                        elm = null;
+                    }
+                    if (!elm) {
+                        elm = range.commonAncestorContainer;
+                        if (!range.collapsed) {
+                            if (range.startContainer == range.endContainer) {
+                                if (range.startOffset - range.endOffset < 2) {
+                                    if (range.startContainer.hasChildNodes()) {
+                                        elm = range.startContainer.childNodes[range.startOffset];
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            if (this.currentEvent !== null) {
+                try {
+                    switch (this.currentEvent.type) {
+                        case 'click':
+                        case 'mousedown':
+                        case 'mouseup':
+                            elm = Event.getTarget(this.currentEvent);
+                            break;
+                        default:
+                            //Do nothing
+                            break;
+                    }
+                } catch (e) {
+                    YAHOO.log('Firefox 1.5 errors here: ' + e, 'error', 'SimpleEditor');
+                }
+            } else if (this.currentElement && this.currentElement[0]) {
+                elm = this.currentElement[0];
+            }
+            if (this.browser.opera || this.browser.webkit) {
+                if (this.currentEvent && !elm) {
+                    elm = YAHOO.util.Event.getTarget(this.currentEvent);
+                }
+            }
+            if (!elm || !elm.tagName) {
+                elm = doc.body;
+            }
+            if (this._isElement(elm, 'html')) {
+                //Safari sometimes gives us the HTML node back..
+                elm = doc.body;
+            }
+            if (this._isElement(elm, 'body')) {
+                //make sure that body means this body not the parent..
+                elm = doc.body;
+            }
+            if (elm && !elm.parentNode) { //Not in document
+                elm = doc.body;
+            }
+            if (elm === undefined) {
+                elm = null;
+            }
+            return elm;
+        },
+        /**
+        * @private
+        * @method _getDomPath
+        * @description This method will attempt to build the DOM path from the currently selected element.
+        * @param HTMLElement el The element to start with, if not provided _getSelectedElement is used
+        * @returns {Array} An array of node references that will create the DOM Path.
+        */
+        _getDomPath: function(el) {
+            if (!el) {
+			    el = this._getSelectedElement();
+            }
+			var domPath = [];
+            while (el !== null) {
+                if (el.ownerDocument != this._getDoc()) {
+                    el = null;
+                    break;
+                }
+                //Check to see if we get el.nodeName and nodeType
+                if (el.nodeName && el.nodeType && (el.nodeType == 1)) {
+                    domPath[domPath.length] = el;
+                }
+
+                if (this._isElement(el, 'body')) {
+                    break;
+                }
+
+                el = el.parentNode;
+            }
+            if (domPath.length === 0) {
+                if (this._getDoc() && this._getDoc().body) {
+                    domPath[0] = this._getDoc().body;
+                }
+            }
+            return domPath.reverse();
+        },
+        /**
+        * @private
+        * @method _writeDomPath
+        * @description Write the current DOM path out to the dompath container below the editor.
+        */
+        _writeDomPath: function() { 
+            var path = this._getDomPath(),
+                pathArr = [],
+                classPath = '',
+                pathStr = '';
+            for (var i = 0; i < path.length; i++) {
+                var tag = path[i].tagName.toLowerCase();
+                if ((tag == 'ol') && (path[i].type)) {
+                    tag += ':' + path[i].type;
+                }
+                if (Dom.hasClass(path[i], 'yui-tag')) {
+                    tag = path[i].getAttribute('tag');
+                }
+                if ((this.get('markup') == 'semantic') || (this.get('markup') == 'xhtml')) {
+                    switch (tag) {
+                        case 'b': tag = 'strong'; break;
+                        case 'i': tag = 'em'; break;
+                    }
+                }
+                if (!Dom.hasClass(path[i], 'yui-non')) {
+                    if (Dom.hasClass(path[i], 'yui-tag')) {
+                        pathStr = tag;
+                    } else {
+                        classPath = ((path[i].className !== '') ? '.' + path[i].className.replace(/ /g, '.') : '');
+                        if ((classPath.indexOf('yui') != -1) || (classPath.toLowerCase().indexOf('apple-style-span') != -1)) {
+                            classPath = '';
+                        }
+                        pathStr = tag + ((path[i].id) ? '#' + path[i].id : '') + classPath;
+                    }
+                    switch (tag) {
+                        case 'a':
+                            if (path[i].getAttribute('href', 2)) {
+                                pathStr += ':' + path[i].getAttribute('href', 2).replace('mailto:', '').replace('http:/'+'/', '').replace('https:/'+'/', ''); //May need to add others here ftp
+                            }
+                            break;
+                        case 'img':
+                            var h = path[i].height;
+                            var w = path[i].width;
+                            if (path[i].style.height) {
+                                h = parseInt(path[i].style.height, 10);
+                            }
+                            if (path[i].style.width) {
+                                w = parseInt(path[i].style.width, 10);
+                            }
+                            pathStr += '(' + h + 'x' + w + ')';
+                        break;
+                    }
+
+                    if (pathStr.length > 10) {
+                        pathStr = '<span title="' + pathStr + '">' + pathStr.substring(0, 10) + '...' + '</span>';
+                    } else {
+                        pathStr = '<span title="' + pathStr + '">' + pathStr + '</span>';
+                    }
+                    pathArr[pathArr.length] = pathStr;
+                }
+            }
+            var str = pathArr.join(' ' + this.SEP_DOMPATH + ' ');
+            //Prevent flickering
+            if (this.dompath.innerHTML != str) {
+                this.dompath.innerHTML = str;
+            }
+        },
+        /**
+        * @private
+        * @method _fixNodes
+        * @description Fix href and imgs as well as remove invalid HTML.
+        */
+        _fixNodes: function() {
+            var doc = this._getDoc(),
+                els = [];
+
+            for (var v in this.invalidHTML) {
+                if (YAHOO.lang.hasOwnProperty(this.invalidHTML, v)) {
+                    if (v.toLowerCase() != 'span') {
+                        var tags = doc.body.getElementsByTagName(v);
+                        if (tags.length) {
+                            for (var i = 0; i < tags.length; i++) {
+                                els.push(tags[i]);
+                            }
+                        }
+                    }
+                }
+            }
+            for (var h = 0; h < els.length; h++) {
+                if (els[h].parentNode) {
+                    if (Lang.isObject(this.invalidHTML[els[h].tagName.toLowerCase()]) && this.invalidHTML[els[h].tagName.toLowerCase()].keepContents) {
+                        this._swapEl(els[h], 'span', function(el) {
+                            el.className = 'yui-non';
+                        });
+                    } else {
+                        els[h].parentNode.removeChild(els[h]);
+                    }
+                }
+            }
+            var imgs = this._getDoc().getElementsByTagName('img');
+            Dom.addClass(imgs, 'yui-img');   
+        },
+        /**
+        * @private
+        * @method _isNonEditable
+        * @param Event ev The Dom event being checked
+        * @description Method is called at the beginning of all event handlers to check if this element or a parent element has the class yui-noedit (this.CLASS_NOEDIT) applied.
+        * If it does, then this method will stop the event and return true. The event handlers will then return false and stop the nodeChange from occuring. This method will also
+        * disable and enable the Editor's toolbar based on the noedit state.
+        * @returns Boolean
+        */
+        _isNonEditable: function(ev) {
+            if (this.get('allowNoEdit')) {
+                var el = Event.getTarget(ev);
+                if (this._isElement(el, 'html')) {
+                    el = null;
+                }
+                var path = this._getDomPath(el);
+                for (var i = (path.length - 1); i > -1; i--) {
+                    if (Dom.hasClass(path[i], this.CLASS_NOEDIT)) {
+                        //if (this.toolbar.get('disabled') === false) {
+                        //    this.toolbar.set('disabled', true);
+                        //}
+                        try {
+                             this._getDoc().execCommand('enableObjectResizing', false, 'false');
+                        } catch (e) {}
+                        this.nodeChange();
+                        Event.stopEvent(ev);
+                        YAHOO.log('CLASS_NOEDIT found in DOM Path, stopping event', 'info', 'SimpleEditor');
+                        return true;
+                    }
+                }
+                //if (this.toolbar.get('disabled') === true) {
+                    //Should only happen once..
+                    //this.toolbar.set('disabled', false);
+                    try {
+                         this._getDoc().execCommand('enableObjectResizing', false, 'true');
+                    } catch (e) {}
+                //}
+            }
+            return false;
+        },
+        /**
+        * @private
+        * @method _setCurrentEvent
+        * @param {Event} ev The event to cache
+        * @description Sets the current event property
+        */
+        _setCurrentEvent: function(ev) {
+            this.currentEvent = ev;
+        },
+        /**
+        * @private
+        * @method _handleClick
+        * @param {Event} ev The event we are working on.
+        * @description Handles all click events inside the iFrame document.
+        */
+        _handleClick: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            this._setCurrentEvent(ev);
+            if (this.currentWindow) {
+                this.closeWindow();
+            }
+            if (YAHOO.widget.EditorInfo.window.win && YAHOO.widget.EditorInfo.window.scope) {
+                YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);
+            }
+            if (this.browser.webkit) {
+                var tar =Event.getTarget(ev);
+                if (this._isElement(tar, 'a') || this._isElement(tar.parentNode, 'a')) {
+                    Event.stopEvent(ev);
+                    this.nodeChange();
+                }
+            } else {
+                this.nodeChange();
+            }
+        },
+        /**
+        * @private
+        * @method _handleMouseUp
+        * @param {Event} ev The event we are working on.
+        * @description Handles all mouseup events inside the iFrame document.
+        */
+        _handleMouseUp: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            //Don't set current event for mouseup.
+            //It get's fired after a menu is closed and gives up a bogus event to work with
+            //this._setCurrentEvent(ev);
+            var self = this;
+            if (this.browser.opera) {
+                /**
+                * @knownissue Opera appears to stop the MouseDown, Click and DoubleClick events on an image inside of a document with designMode on..
+                * @browser Opera
+                * @description This work around traps the MouseUp event and sets a timer to check if another MouseUp event fires in so many seconds. If another event is fired, they we internally fire the DoubleClick event.
+                */
+                var sel = Event.getTarget(ev);
+                if (this._isElement(sel, 'img')) {
+                    this.nodeChange();
+                    if (this.operaEvent) {
+                        clearTimeout(this.operaEvent);
+                        this.operaEvent = null;
+                        this._handleDoubleClick(ev);
+                    } else {
+                        this.operaEvent = window.setTimeout(function() {
+                            self.operaEvent = false;
+                        }, 700);
+                    }
+                }
+            }
+            //This will stop Safari from selecting the entire document if you select all the text in the editor
+            if (this.browser.webkit || this.browser.opera) {
+                if (this.browser.webkit) {
+                    Event.stopEvent(ev);
+                }
+            }
+            this.nodeChange();
+            this.fireEvent('editorMouseUp', { type: 'editorMouseUp', target: this, ev: ev });
+        },
+        /**
+        * @private
+        * @method _handleMouseDown
+        * @param {Event} ev The event we are working on.
+        * @description Handles all mousedown events inside the iFrame document.
+        */
+        _handleMouseDown: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            this._setCurrentEvent(ev);
+            var sel = Event.getTarget(ev);
+            if (this.browser.webkit && this._hasSelection()) {
+                var _sel = this._getSelection();
+                if (!this.browser.webkit3) {
+                    _sel.collapse(true);
+                } else {
+                    _sel.collapseToStart();
+                }
+            }
+            if (this.browser.webkit && this._lastImage) {
+                Dom.removeClass(this._lastImage, 'selected');
+                this._lastImage = null;
+            }
+            if (this._isElement(sel, 'img') || this._isElement(sel, 'a')) {
+                if (this.browser.webkit) {
+                    Event.stopEvent(ev);
+                    if (this._isElement(sel, 'img')) {
+                        Dom.addClass(sel, 'selected');
+                        this._lastImage = sel;
+                    }
+                }
+                this.nodeChange();
+            }
+            this.fireEvent('editorMouseDown', { type: 'editorMouseDown', target: this, ev: ev });
+        },
+        /**
+        * @private
+        * @method _handleDoubleClick
+        * @param {Event} ev The event we are working on.
+        * @description Handles all doubleclick events inside the iFrame document.
+        */
+        _handleDoubleClick: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            this._setCurrentEvent(ev);
+            var sel = Event.getTarget(ev);
+            if (this._isElement(sel, 'img')) {
+                this.currentElement[0] = sel;
+                this.toolbar.fireEvent('insertimageClick', { type: 'insertimageClick', target: this.toolbar });
+                this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
+            } else if (this._hasParent(sel, 'a')) { //Handle elements inside an a
+                this.currentElement[0] = this._hasParent(sel, 'a');
+                this.toolbar.fireEvent('createlinkClick', { type: 'createlinkClick', target: this.toolbar });
+                this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
+            }
+            this.nodeChange();
+            this.editorDirty = false;
+            this.fireEvent('editorDoubleClick', { type: 'editorDoubleClick', target: this, ev: ev });
+        },
+        /**
+        * @private
+        * @method _handleKeyUp
+        * @param {Event} ev The event we are working on.
+        * @description Handles all keyup events inside the iFrame document.
+        */
+        _handleKeyUp: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            this._setCurrentEvent(ev);
+            switch (ev.keyCode) {
+                case 37: //Left Arrow
+                case 38: //Up Arrow
+                case 39: //Right Arrow
+                case 40: //Down Arrow
+                case 46: //Forward Delete
+                case 8: //Delete
+                case 87: //W key if window is open
+                    if ((ev.keyCode == 87) && this.currentWindow && ev.shiftKey && ev.ctrlKey) {
+                        this.closeWindow();
+                    } else {
+                        if (!this.browser.ie) {
+                            if (this._nodeChangeTimer) {
+                                clearTimeout(this._nodeChangeTimer);
+                            }
+                            var self = this;
+                            this._nodeChangeTimer = setTimeout(function() {
+                                self._nodeChangeTimer = null;
+                                self.nodeChange.call(self);
+                            }, 100);
+                        } else {
+                            this.nodeChange();
+                        }
+                        this.editorDirty = true;
+                    }
+                    break;
+            }
+            this.fireEvent('editorKeyUp', { type: 'editorKeyUp', target: this, ev: ev });
+        },
+        /**
+        * @private
+        * @method _handleKeyPress
+        * @param {Event} ev The event we are working on.
+        * @description Handles all keypress events inside the iFrame document.
+        */
+        _handleKeyPress: function(ev) {
+            if (this.get('allowNoEdit')) {
+                if (ev && ev.keyCode && ((ev.keyCode == 46) || ev.keyCode == 63272)) {
+                    //Forward delete key
+                    YAHOO.log('allowNoEdit is set, forward delete key has been disabled', 'warn', 'SimpleEditor');
+                    Event.stopEvent(ev);
+                }
+            }
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            this._setCurrentEvent(ev);
+            if (this.browser.webkit) {
+                if (!this.browser.webkit3) {
+                    if (ev.keyCode && (ev.keyCode == 122) && (ev.metaKey)) {
+                        //This is CMD + z (for undo)
+                        if (this._hasParent(this._getSelectedElement(), 'li')) {
+                            YAHOO.log('We are in an LI and we found CMD + z, stopping the event', 'warn', 'SimpleEditor');
+                            Event.stopEvent(ev);
+                        }
+                    }
+                }
+                /* This was removed because it crashes Safari 2.x in some cases
+                if (ev.keyCode && (ev.keyCode == 8)) {
+                    //Delete Key
+                    if (this._isElement(this._getSelectedElement(), 'br')) {
+                        var el = this._getSelectedElement();
+                        el.parentNode.removeChild(el);
+                    }
+                }
+                */
+                this._listFix(ev);
+            }
+            this.fireEvent('editorKeyPress', { type: 'editorKeyPress', target: this, ev: ev });
+        },
+        /**
+        * @private
+        * @method _listFix
+        * @param {Event} ev The event we are working on.
+        * @description Handles the Enter key, Tab Key and Shift + Tab keys for List Items.
+        */
+        _listFix: function(ev) {
+            //YAHOO.log('Lists Fix (' + ev.keyCode + ')', 'info', 'SimpleEditor');
+            var testLi = null, par = null, preContent = false, range = null;
+            //Enter Key
+            if (this.browser.webkit) {
+                if (ev.keyCode && (ev.keyCode == 13)) {
+                    if (this._hasParent(this._getSelectedElement(), 'li')) {
+                        var tar = this._hasParent(this._getSelectedElement(), 'li');
+                        var li = this._getDoc().createElement('li');
+                        li.innerHTML = '<span class="yui-non"> </span> ';
+                        if (tar.nextSibling) {
+                            tar.parentNode.insertBefore(li, tar.nextSibling);
+                        } else {
+                            tar.parentNode.appendChild(li);
+                        }
+                        this.currentElement[0] = li;
+                        this._selectNode(li.firstChild);
+                        if (!this.browser.webkit3) {
+                            tar.parentNode.style.display = 'list-item';
+                            setTimeout(function() {
+                                tar.parentNode.style.display = 'block';
+                            }, 1);
+                        }
+                        Event.stopEvent(ev);
+                    }
+                }
+            }
+            //Shift + Tab Key
+            if (ev.keyCode && ((!this.browser.webkit3 && (ev.keyCode == 25)) || ((this.browser.webkit3 || !this.browser.webkit) && ((ev.keyCode == 9) && ev.shiftKey)))) {
+                testLi = this._getSelectedElement();
+                if (this._hasParent(testLi, 'li')) {
+                    testLi = this._hasParent(testLi, 'li');
+                    YAHOO.log('We have a SHIFT tab in an LI, reverse it..', 'info', 'SimpleEditor');
+                    if (this._hasParent(testLi, 'ul') || this._hasParent(testLi, 'ol')) {
+                        YAHOO.log('We have a double parent, move up a level', 'info', 'SimpleEditor');
+                        par = this._hasParent(testLi, 'ul');
+                        if (!par) {
+                            par = this._hasParent(testLi, 'ol');
+                        }
+                        //YAHOO.log(par.previousSibling + ' :: ' + par.previousSibling.innerHTML);
+                        if (this._isElement(par.previousSibling, 'li')) {
+                            par.removeChild(testLi);
+                            par.parentNode.insertBefore(testLi, par.nextSibling);
+                            if (this.browser.ie) {
+                                range = this._getDoc().body.createTextRange();
+                                range.moveToElementText(testLi);
+                                range.collapse(false);
+                                range.select();
+                            }
+                            if (this.browser.webkit) {
+                                if (!this.browser.webkit3) {
+                                    par.style.display = 'list-item';
+                                    par.parentNode.style.display = 'list-item';
+                                    setTimeout(function() {
+                                        par.style.display = 'block';
+                                        par.parentNode.style.display = 'block';
+                                    }, 1);
+                                }
+                            }
+                            Event.stopEvent(ev);
+                        }
+                    }
+                }
+            }
+            //Tab Key
+            if (ev.keyCode && ((ev.keyCode == 9) && (!ev.shiftKey))) {
+                YAHOO.log('List Fix - Tab', 'info', 'SimpleEditor');
+                var preLi = this._getSelectedElement();
+                if (this._hasParent(preLi, 'li')) {
+                    preContent = this._hasParent(preLi, 'li').innerHTML;
+                }
+                //YAHOO.log('preLI: ' + preLi.tagName + ' :: ' + preLi.innerHTML);
+                if (this.browser.webkit) {
+                    this._getDoc().execCommand('inserttext', false, '\t');
+                }
+                testLi = this._getSelectedElement();
+                if (this._hasParent(testLi, 'li')) {
+                    YAHOO.log('We have a tab in an LI', 'info', 'SimpleEditor');
+                    par = this._hasParent(testLi, 'li');
+                    YAHOO.log('parLI: ' + par.tagName + ' :: ' + par.innerHTML);
+                    var newUl = this._getDoc().createElement(par.parentNode.tagName.toLowerCase());
+                    if (this.browser.webkit) {
+                        var span = Dom.getElementsByClassName('Apple-tab-span', 'span', par);
+                        //Remove the span element that Safari puts in
+                        if (span[0]) {
+                            par.removeChild(span[0]);
+                            par.innerHTML = Lang.trim(par.innerHTML);
+                            //Put the HTML from the LI into this new LI
+                            if (preContent) {
+                                par.innerHTML = '<span class="yui-non">' + preContent + '</span> ';
+                            } else {
+                                par.innerHTML = '<span class="yui-non"> </span> ';
+                            }
+                        }
+                    } else {
+                        if (preContent) {
+                            par.innerHTML = preContent + ' ';
+                        } else {
+                            par.innerHTML = ' ';
+                        }
+                    }
+
+                    par.parentNode.replaceChild(newUl, par);
+                    newUl.appendChild(par);
+                    if (this.browser.webkit) {
+                        this._getSelection().setBaseAndExtent(par.firstChild, 1, par.firstChild, par.firstChild.innerText.length);
+                        if (!this.browser.webkit3) {
+                            par.parentNode.parentNode.style.display = 'list-item';
+                            setTimeout(function() {
+                                par.parentNode.parentNode.style.display = 'block';
+                            }, 1);
+                        }
+                    } else if (this.browser.ie) {
+                        range = this._getDoc().body.createTextRange();
+                        range.moveToElementText(par);
+                        range.collapse(false);
+                        range.select();
+                    } else {
+                        this._selectNode(par);
+                    }
+                    Event.stopEvent(ev);
+                }
+                if (this.browser.webkit) {
+                    Event.stopEvent(ev);
+                }
+                this.nodeChange();
+            }
+        },
+        /**
+        * @private
+        * @method _handleKeyDown
+        * @param {Event} ev The event we are working on.
+        * @description Handles all keydown events inside the iFrame document.
+        */
+        _handleKeyDown: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            this._setCurrentEvent(ev);
+            if (this.currentWindow) {
+                this.closeWindow();
+            }
+            if (YAHOO.widget.EditorInfo.window.win && YAHOO.widget.EditorInfo.window.scope) {
+                YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);
+            }
+            var doExec = false,
+                action = null,
+                exec = false;
+
+            if (ev.shiftKey && ev.ctrlKey) {
+                doExec = true;
+            }
+            switch (ev.keyCode) {
+                case 84: //Focus Toolbar Header -- Ctrl + Shift + T
+                    if (ev.shiftKey && ev.ctrlKey) {
+                        this.toolbar._titlebar.firstChild.focus();
+                        Event.stopEvent(ev);
+                        doExec = false;
+                    }
+                    break;
+                case 27: //Focus After Element - Ctrl + Shift + Esc
+                    if (ev.shiftKey) {
+                        this.afterElement.focus();
+                        Event.stopEvent(ev);
+                        exec = false;
+                    }
+                    break;
+                case 76: //L
+                    if (this._hasSelection()) {
+                        if (ev.shiftKey && ev.ctrlKey) {
+                            var makeLink = true;
+                            if (this.get('limitCommands')) {
+                                if (!this.toolbar.getButtonByValue('createlink')) {
+                                    YAHOO.log('Toolbar Button for (createlink) was not found, skipping exec.', 'info', 'SimpleEditor');
+                                    makeLink = false;
+                                }
+                            }
+                            if (makeLink) {
+                                this.execCommand('createlink', '');
+                                this.toolbar.fireEvent('createlinkClick', { type: 'createlinkClick', target: this.toolbar });
+                                this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
+                                doExec = false;
+                            }
+                        }
+                    }
+                    break;
+                case 65:
+                    if (ev.metaKey && this.browser.webkit) {
+                        Event.stopEvent(ev);
+                        //Override Safari's select all and select the contents of the editor not the iframe as Safari would by default.
+                        this._getSelection().setBaseAndExtent(this._getDoc().body, 1, this._getDoc().body, this._getDoc().body.innerHTML.length);
+                    }
+                    break;
+                case 66: //B
+                    action = 'bold';
+                    break;
+                case 73: //I
+                    action = 'italic';
+                    break;
+                case 85: //U
+                    action = 'underline';
+                    break;
+                case 13:
+                    if (this.browser.ie) {
+                        //Insert a <br> instead of a <p></p> in Internet Explorer
+                        var _range = this._getRange();
+                        var tar = this._getSelectedElement();
+                        if (!this._isElement(tar, 'li')) {
+                            if (_range) {
+                                _range.pasteHTML('<br>');
+                                _range.collapse(false);
+                                _range.select();
+                            }
+                            Event.stopEvent(ev);
+                        }
+                    }
+            }
+            //if (!this.browser.gecko && !this.browser.webkit) {
+            if (this.browser.ie) {
+                this._listFix(ev);
+            }
+            if (doExec && action) {
+                this.execCommand(action, null);
+                Event.stopEvent(ev);
+                this.nodeChange();
+            }
+            this.fireEvent('editorKeyDown', { type: 'editorKeyDown', target: this, ev: ev });
+        },
+        /**
+        * @method nodeChange
+        * @param {Boolean} force Optional paramenter to skip the threshold counter
+        * @description Handles setting up the toolbar buttons, getting the Dom path, fixing nodes.
+        */
+        nodeChange: function(force) {
+            var threshold = parseInt(this.get('nodeChangeThreshold'), 10);
+            var thisNodeChange = Math.round(new Date().getTime() / 1000);
+            if (force === true) {
+                this._lastNodeChange = 0;
+            }
+            
+            if ((this._lastNodeChange + threshold) < thisNodeChange) {
+                var self = this;
+                if (this._fixNodesTimer === null) {
+                    this._fixNodesTimer = window.setTimeout(function() {
+                        self._fixNodes.call(self);
+                        self._fixNodesTimer = null;
+                    }, 0);
+                }
+            }
+            this._lastNodeChange = thisNodeChange;
+            if (this.currentEvent) {
+                this._lastNodeChangeEvent = this.currentEvent.type;
+            }
+
+            var beforeNodeChange = this.fireEvent('beforeNodeChange', { type: 'beforeNodeChange', target: this });
+            if (beforeNodeChange === false) {
+                return false;
+            }
+            if (this.get('dompath')) {
+                this._writeDomPath();
+            }
+            //Check to see if we are disabled before continuing
+            if (!this.get('disabled')) {
+                if (this.STOP_NODE_CHANGE) {
+                    //Reset this var for next action
+                    this.STOP_NODE_CHANGE = false;
+                    return false;
+                } else {
+                    var sel = this._getSelection(),
+                        range = this._getRange(),
+                        el = this._getSelectedElement(),
+                        fn_button = this.toolbar.getButtonByValue('fontname'),
+                        fs_button = this.toolbar.getButtonByValue('fontsize');
+
+                    if (force !== true) {
+                        this.editorDirty = true;
+                    }
+
+                    //Handle updating the toolbar with active buttons
+                    var _ex = {};
+                    if (this._lastButton) {
+                        _ex[this._lastButton.id] = true;
+                    }
+                    if (!this._isElement(el, 'body')) {
+                        if (fn_button) {
+                            _ex[fn_button.get('id')] = true;
+                        }
+                        if (fs_button) {
+                            _ex[fs_button.get('id')] = true;
+                        }
+                    }
+                    this.toolbar.resetAllButtons(_ex);
+
+                    //Handle disabled buttons
+                    for (var d = 0; d < this._disabled.length; d++) {
+                        var _button = this.toolbar.getButtonByValue(this._disabled[d]);
+                        if (_button && _button.get) {
+                            if (this._lastButton && (_button.get('id') === this._lastButton.id)) {
+                                //Skip
+                            } else {
+                                if (!this._hasSelection()) {
+                                    switch (this._disabled[d]) {
+                                        case 'fontname':
+                                        case 'fontsize':
+                                            break;
+                                        default:
+                                            //No Selection - disable
+                                            this.toolbar.disableButton(_button);
+                                    }
+                                } else {
+                                    if (!this._alwaysDisabled[this._disabled[d]]) {
+                                        this.toolbar.enableButton(_button);
+                                    }
+                                }
+                                if (!this._alwaysEnabled[this._disabled[d]]) {
+                                    this.toolbar.deselectButton(_button);
+                                }
+                            }
+                        }
+                    }
+                    var path = this._getDomPath();
+                    var tag = null, cmd = null;
+                    for (var i = 0; i < path.length; i++) {
+                        tag = path[i].tagName.toLowerCase();
+                        if (path[i].getAttribute('tag')) {
+                            tag = path[i].getAttribute('tag').toLowerCase();
+                        }
+                        cmd = this._tag2cmd[tag];
+                        if (cmd === undefined) {
+                            cmd = [];
+                        }
+                        if (!Lang.isArray(cmd)) {
+                            cmd = [cmd];
+                        }
+
+                        //Bold and Italic styles
+                        if (path[i].style.fontWeight.toLowerCase() == 'bold') {
+                            cmd[cmd.length] = 'bold';
+                        }
+                        if (path[i].style.fontStyle.toLowerCase() == 'italic') {
+                            cmd[cmd.length] = 'italic';
+                        }
+                        if (path[i].style.textDecoration.toLowerCase() == 'underline') {
+                            cmd[cmd.length] = 'underline';
+                        }
+                        if (cmd.length > 0) {
+                            for (var j = 0; j < cmd.length; j++) {
+                                this.toolbar.selectButton(cmd[j]);
+                                this.toolbar.enableButton(cmd[j]);
+                            }
+                        }
+                        //Handle Alignment
+                        switch (path[i].style.textAlign.toLowerCase()) {
+                            case 'left':
+                            case 'right':
+                            case 'center':
+                            case 'justify':
+                                var alignType = path[i].style.textAlign.toLowerCase();
+                                if (path[i].style.textAlign.toLowerCase() == 'justify') {
+                                    alignType = 'full';
+                                }
+                                this.toolbar.selectButton('justify' + alignType);
+                                this.toolbar.enableButton('justify' + alignType);
+                                break;
+                        }
+                    }
+                    //After for loop
+
+                    //Reset Font Family and Size to the inital configs
+                    if (fn_button) {
+                        var family = fn_button._configs.label._initialConfig.value;
+                        fn_button.set('label', '<span class="yui-toolbar-fontname-' + _cleanClassName(family) + '">' + family + '</span>');
+                        this._updateMenuChecked('fontname', family);
+                    }
+
+                    if (fs_button) {
+                        fs_button.set('label', fs_button._configs.label._initialConfig.value);
+                    }
+
+                    var hd_button = this.toolbar.getButtonByValue('heading');
+                    if (hd_button) {
+                        hd_button.set('label', hd_button._configs.label._initialConfig.value);
+                        this._updateMenuChecked('heading', 'none');
+                    }
+                    var img_button = this.toolbar.getButtonByValue('insertimage');
+                    if (img_button && this.currentWindow && (this.currentWindow.name == 'insertimage')) {
+                        this.toolbar.disableButton(img_button);
+                    }
+                }
+            }
+
+            this.fireEvent('afterNodeChange', { type: 'afterNodeChange', target: this });
+        },
+        /**
+        * @private
+        * @method _updateMenuChecked
+        * @param {Object} button The command identifier of the button you want to check
+        * @param {String} value The value of the menu item you want to check
+        * @param {<a href="YAHOO.widget.Toolbar.html">YAHOO.widget.Toolbar</a>} The Toolbar instance the button belongs to (defaults to this.toolbar) 
+        * @description Gets the menu from a button instance, if the menu is not rendered it will render it. It will then search the menu for the specified value, unchecking all other items and checking the specified on.
+        */
+        _updateMenuChecked: function(button, value, tbar) {
+            if (!tbar) {
+                tbar = this.toolbar;
+            }
+            var _button = tbar.getButtonByValue(button);
+            _button.checkValue(value);
+        },
+        /**
+        * @private
+        * @method _handleToolbarClick
+        * @param {Event} ev The event that triggered the button click
+        * @description This is an event handler attached to the Toolbar's buttonClick event. It will fire execCommand with the command identifier from the Toolbar Button.
+        */
+        _handleToolbarClick: function(ev) {
+            var value = '';
+            var str = '';
+            var cmd = ev.button.value;
+            if (ev.button.menucmd) {
+                value = cmd;
+                cmd = ev.button.menucmd;
+            }
+            this._lastButton = ev.button;
+            if (this.STOP_EXEC_COMMAND) {
+                YAHOO.log('execCommand skipped because we found the STOP_EXEC_COMMAND flag set to true', 'warn', 'SimpleEditor');
+                YAHOO.log('NOEXEC::execCommand::(' + cmd + '), (' + value + ')', 'warn', 'SimpleEditor');
+                this.STOP_EXEC_COMMAND = false;
+                return false;
+            } else {
+                this.execCommand(cmd, value);
+                if (!this.browser.webkit) {
+                     var self = this;
+                     setTimeout(function() {
+                         self._focusWindow.call(self);
+                     }, 5);
+                 }
+            }
+            Event.stopEvent(ev);
+        },
+        /**
+        * @private
+        * @method _setupAfterElement
+        * @description Creates the accessibility h2 header and places it after the iframe in the Dom for navigation.
+        */
+        _setupAfterElement: function() {
+            if (!this.afterElement) {
+                this.afterElement = document.createElement('h2');
+                this.afterElement.className = 'yui-editor-skipheader';
+                this.afterElement.tabIndex = '-1';
+                this.afterElement.innerHTML = this.STR_LEAVE_EDITOR;
+                this.get('element_cont').get('firstChild').appendChild(this.afterElement);
+            }
+        },
+        /**
+        * @private
+        * @method _disableEditor
+        * @param {Boolean} disabled Pass true to disable, false to enable
+        * @description Creates a mask to place over the Editor.
+        */
+        _disableEditor: function(disabled) {
+            if (disabled) {
+                if (!this._mask) {
+                    this._setDesignMode('off');
+                    if (this.toolbar) {
+                        this.toolbar.set('disabled', true);
+                    }
+                    this._mask = document.createElement('DIV');
+                    Dom.setStyle(this._mask, 'height', '100%');
+                    Dom.setStyle(this._mask, 'width', '100%');
+                    Dom.setStyle(this._mask, 'position', 'absolute');
+                    Dom.setStyle(this._mask, 'top', '0');
+                    Dom.setStyle(this._mask, 'left', '0');
+                    Dom.setStyle(this._mask, 'opacity', '.5');
+                    Dom.addClass(this._mask, 'yui-editor-masked');
+                    this.get('iframe').get('parentNode').appendChild(this._mask);
+                }
+            } else {
+                if (this._mask) {
+                    this._mask.parentNode.removeChild(this._mask);
+                    this._mask = null;
+                    if (this.toolbar) {
+                        this.toolbar.set('disabled', false);
+                    }
+                    this._setDesignMode('on');
+                    this._focusWindow();
+                    var self = this;
+                    window.setTimeout(function() {
+                        self.nodeChange.call(self);
+                    }, 100);
+                }
+            }
+        },
+        /**
+        * @property EDITOR_PANEL_ID
+        * @description HTML id to give the properties window in the DOM.
+        * @type String
+        */
+        EDITOR_PANEL_ID: 'yui-editor-panel',
+        /**
+        * @property SEP_DOMPATH
+        * @description The value to place in between the Dom path items
+        * @type String
+        */
+        SEP_DOMPATH: '<',
+        /**
+        * @property STR_LEAVE_EDITOR
+        * @description The accessibility string for the element after the iFrame
+        * @type String
+        */
+        STR_LEAVE_EDITOR: 'You have left the Rich Text Editor.',
+        /**
+        * @property STR_BEFORE_EDITOR
+        * @description The accessibility string for the element before the iFrame
+        * @type String
+        */
+        STR_BEFORE_EDITOR: 'This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Control + Shift + T to place focus on the toolbar and navigate between option heading names. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift L adds an HTML link</li> <li>To exit this text editor use the keyboard shortcut Control + Shift + ESC.</li></ul>',
+        /**
+        * @property STR_TITLE
+        * @description The Title of the HTML document that is created in the iFrame
+        * @type String
+        */
+        STR_TITLE: 'Rich Text Area.',
+        /**
+        * @property STR_IMAGE_HERE
+        * @description The text to place in the URL textbox when using the blankimage.
+        * @type String
+        */
+        STR_IMAGE_HERE: 'Image Url Here',
+        /**
+        * @property STR_LINK_URL
+        * @description The label string for the Link URL.
+        * @type String
+        */
+        STR_LINK_URL: 'Link URL',
+        /**
+        * @protected
+        * @property STOP_EXEC_COMMAND
+        * @description Set to true when you want the default execCommand function to not process anything
+        * @type Boolean
+        */
+        STOP_EXEC_COMMAND: false,
+        /**
+        * @protected
+        * @property STOP_NODE_CHANGE
+        * @description Set to true when you want the default nodeChange function to not process anything
+        * @type Boolean
+        */
+        STOP_NODE_CHANGE: false,
+        /**
+        * @protected
+        * @property CLASS_NOEDIT
+        * @description CSS class applied to elements that are not editable.
+        * @type String
+        */
+        CLASS_NOEDIT: 'yui-noedit',
+        /**
+        * @protected
+        * @property CLASS_CONTAINER
+        * @description Default CSS class to apply to the editors container element
+        * @type String
+        */
+        CLASS_CONTAINER: 'yui-editor-container',
+        /**
+        * @protected
+        * @property CLASS_EDITABLE
+        * @description Default CSS class to apply to the editors iframe element
+        * @type String
+        */
+        CLASS_EDITABLE: 'yui-editor-editable',
+        /**
+        * @protected
+        * @property CLASS_EDITABLE_CONT
+        * @description Default CSS class to apply to the editors iframe's parent element
+        * @type String
+        */
+        CLASS_EDITABLE_CONT: 'yui-editor-editable-container',
+        /**
+        * @protected
+        * @property CLASS_PREFIX
+        * @description Default prefix for dynamically created class names
+        * @type String
+        */
+        CLASS_PREFIX: 'yui-editor',
+        /** 
+        * @property browser
+        * @description Standard browser detection
+        * @type Object
+        */
+        browser: function() {
+            var br = YAHOO.env.ua;
+            //Check for webkit3
+            if (br.webkit > 420) {
+                br.webkit3 = br.webkit;
+            } else {
+                br.webkit3 = 0;
+            }
+            return br;
+        }(),
+        /** 
+        * @method init
+        * @description The Editor class' initialization method
+        */
+        init: function(p_oElement, p_oAttributes) {
+            YAHOO.log('init', 'info', 'SimpleEditor');
+            YAHOO.widget.SimpleEditor.superclass.init.call(this, p_oElement, p_oAttributes);
+            YAHOO.widget.EditorInfo._instances[this.get('id')] = this;
+
+            this.on('contentReady', function() {
+                this.DOMReady = true;
+                this.fireQueue();
+            }, this, true);
+
+        },
+        /**
+        * @method initAttributes
+        * @description Initializes all of the configuration attributes used to create 
+        * the editor.
+        * @param {Object} attr Object literal specifying a set of 
+        * configuration attributes used to create the editor.
+        */
+        initAttributes: function(attr) {
+            YAHOO.widget.SimpleEditor.superclass.initAttributes.call(this, attr);
+            var self = this;
+
+            /**
+            * @private
+            * @config iframe
+            * @description Internal config for holding the iframe element.
+            * @default null
+            * @type HTMLElement
+            */
+            this.setAttributeConfig('iframe', {
+                value: null
+            });
+            /**
+            * @private
+            * @depreciated
+            * @config textarea
+            * @description Internal config for holding the textarea element (replaced with element).
+            * @default null
+            * @type HTMLElement
+            */
+            this.setAttributeConfig('textarea', {
+                value: null,
+                writeOnce: true
+            });
+            /**
+            * @config nodeChangeThreshold
+            * @description The number of seconds that need to be in between nodeChange processing
+            * @default 3
+            * @type Number
+            */            
+            this.setAttributeConfig('nodeChangeThreshold', {
+                value: attr.nodeChangeThreshold || 3,
+                validator: YAHOO.lang.isNumber
+            });
+            /**
+            * @config allowNoEdit
+            * @description Should the editor check for non-edit fields. It should be noted that this technique is not perfect. If the user does the right things, they will still be able to make changes.
+            * Such as highlighting an element below and above the content and hitting a toolbar button or a shortcut key.
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('allowNoEdit', {
+                value: attr.allowNoEdit || false,
+                validator: YAHOO.lang.isBoolean
+            });
+            /**
+            * @config limitCommands
+            * @description Should the Editor limit the allowed execCommands to the ones available in the toolbar. If true, then execCommand and keyboard shortcuts will fail if they are not defined in the toolbar.
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('limitCommands', {
+                value: attr.limitCommands || false,
+                validator: YAHOO.lang.isBoolean
+            });
+            /**
+            * @config element_cont
+            * @description Internal config for the editors container
+            * @default false
+            * @type HTMLElement
+            */
+            this.setAttributeConfig('element_cont', {
+                value: attr.element_cont
+            });
+            /**
+            * @private
+            * @config editor_wrapper
+            * @description The outter wrapper for the entire editor.
+            * @default null
+            * @type HTMLElement
+            */
+            this.setAttributeConfig('editor_wrapper', {
+                value: attr.editor_wrapper || null,
+                writeOnce: true
+            });
+            /**
+            * @attribute height
+            * @description The height of the editor iframe container, not including the toolbar..
+            * @default Best guessed size of the textarea, for best results use CSS to style the height of the textarea or pass it in as an argument
+            * @type String
+            */
+            this.setAttributeConfig('height', {
+                value: attr.height || Dom.getStyle(self.get('element'), 'height'),
+                method: function(height) {
+                    if (this._rendered) {
+                        //We have been rendered, change the height
+                        if (this.get('animate')) {
+                            var anim = new YAHOO.util.Anim(this.get('iframe').get('parentNode'), {
+                                height: {
+                                    to: parseInt(height, 10)
+                                }
+                            }, 0.5);
+                            anim.animate();
+                        } else {
+                            Dom.setStyle(this.get('iframe').get('parentNode'), 'height', height);
+                        }
+                    }
+                }
+            });
+            /**
+            * @attribute width
+            * @description The width of the editor container.
+            * @default Best guessed size of the textarea, for best results use CSS to style the width of the textarea or pass it in as an argument
+            * @type String
+            */            
+            this.setAttributeConfig('width', {
+                value: attr.width || Dom.getStyle(this.get('element'), 'width'),
+                method: function(width) {
+                    if (this._rendered) {
+                        //We have been rendered, change the width
+                        if (this.get('animate')) {
+                            var anim = new YAHOO.util.Anim(this.get('element_cont').get('element'), {
+                                width: {
+                                    to: parseInt(width, 10)
+                                }
+                            }, 0.5);
+                            anim.animate();
+                        } else {
+                            this.get('element_cont').setStyle('width', width);
+                        }
+                    }
+                }
+            });
+                        
+            /**
+            * @attribute blankimage
+            * @description The URL for the image placeholder to put in when inserting an image.
+            * @default The yahooapis.com address for the current release + 'assets/blankimage.png'
+            * @type String
+            */            
+            this.setAttributeConfig('blankimage', {
+                value: attr.blankimage || this._getBlankImage()
+            });
+            /**
+            * @attribute css
+            * @description The Base CSS used to format the content of the editor
+            * @default <code><pre>html {
+                height: 95%;
+            }
+            body {
+                height: 100%;
+                padding: 7px; background-color: #fff; font:13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;
+            }
+            a {
+                color: blue;
+                text-decoration: underline;
+                cursor: pointer;
+            }
+            .warning-localfile {
+                border-bottom: 1px dashed red !important;
+            }
+            .yui-busy {
+                cursor: wait !important;
+            }
+            img.selected { //Safari image selection
+                border: 2px dotted #808080;
+            }
+            img {
+                cursor: pointer !important;
+                border: none;
+            }
+            </pre></code>
+            * @type String
+            */            
+            this.setAttributeConfig('css', {
+                value: attr.css || this._defaultCSS,
+                writeOnce: true
+            });
+            /**
+            * @attribute html
+            * @description The default HTML to be written to the iframe document before the contents are loaded (Note that the DOCTYPE attr will be added at render item)
+            * @default This HTML requires a few things if you are to override:
+                <p><code>{TITLE}, {CSS}, {HIDDEN_CSS}, {EXTRA_CSS}</code> and <code>{CONTENT}</code> need to be there, they are passed to YAHOO.lang.substitute to be replace with other strings.<p>
+                <p><code>onload="document.body._rteLoaded = true;"</code> : the onload statement must be there or the editor will not finish loading.</p>
+                <code>
+                <pre>
+                <html>
+                    <head>
+                        <title>{TITLE}</title>
+                        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+                        <style>
+                        {CSS}
+                        </style>
+                        <style>
+                        {HIDDEN_CSS}
+                        </style>
+                        <style>
+                        {EXTRA_CSS}
+                        </style>
+                    </head>
+                <body onload="document.body._rteLoaded = true;">
+                {CONTENT}
+                </body>
+                </html>
+                </pre>
+                </code>
+            * @type String
+            */            
+            this.setAttributeConfig('html', {
+                value: attr.html || '<html><head><title>{TITLE}</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><base href="' + this._baseHREF + '"><style>{CSS}</style><style>{HIDDEN_CSS}</style><style>{EXTRA_CSS}</style></head><body onload="document.body._rteLoaded = true;">{CONTENT}</body></html>',
+                writeOnce: true
+            });
+
+            /**
+            * @attribute extracss
+            * @description Extra user defined css to load after the default SimpleEditor CSS
+            * @default ''
+            * @type String
+            */            
+            this.setAttributeConfig('extracss', {
+                value: attr.css || '',
+                writeOnce: true
+            });
+
+            /**
+            * @attribute handleSubmit
+            * @description Config handles if the editor will attach itself to the textareas parent form's submit handler.
+            If it is set to true, the editor will attempt to attach a submit listener to the textareas parent form.
+            Then it will trigger the editors save handler and place the new content back into the text area before the form is submitted.
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('handleSubmit', {
+                value: false,
+                writeOnce: true,
+                method: function(exec) {
+                    if (exec) {
+                        var ta = this.get('element');
+                        if (ta.form) {
+                            var submitForm = function(ev) {
+                                Event.stopEvent(ev);
+                                this.saveHTML();
+                                window.setTimeout(function() {
+                                    YAHOO.util.Event.removeListener(ta.form, 'submit', submitForm);
+                                    ta.form.submit();
+                                }, 200);
+                            };
+                            Event.on(ta.form, 'submit', submitForm, this, true);
+                        }
+                    }
+                }
+            });
+            /**
+            * @attribute disabled
+            * @description This will toggle the editor's disabled state. When the editor is disabled, designMode is turned off and a mask is placed over the iframe so no interaction can take place.
+            All Toolbar buttons are also disabled so they cannot be used.
+            * @default false
+            * @type Boolean
+            */
+
+            this.setAttributeConfig('disabled', {
+                value: false,
+                method: function(disabled) {
+                    if (this._rendered) {
+                        this._disableEditor(disabled);
+                    }
+                }
+            });
+            /**
+            * @config toolbar_cont
+            * @description Internal config for the toolbars container
+            * @default false
+            * @type Boolean
+            */
+            this.setAttributeConfig('toolbar_cont', {
+                value: null,
+                writeOnce: true
+            });
+            /**
+            * @attribute toolbar
+            * @description The default toolbar config.
+            * @type Object
+            */            
+            this.setAttributeConfig('toolbar', {
+                value: attr.toolbar || this._defaultToolbar,
+                writeOnce: true,
+                method: function(toolbar) {
+                    if (!toolbar.buttonType) {
+                        toolbar.buttonType = this._defaultToolbar.buttonType;
+                    }
+                    this._defaultToolbar = toolbar;
+                }
+            });
+            /**
+            * @attribute animate
+            * @description Should the editor animate window movements
+            * @default false unless Animation is found, then true
+            * @type Boolean
+            */            
+            this.setAttributeConfig('animate', {
+                value: ((attr.animate) ? ((YAHOO.util.Anim) ? true : false) : false),
+                validator: function(value) {
+                    var ret = true;
+                    if (!YAHOO.util.Anim) {
+                        ret = false;
+                    }
+                    return ret;
+                }               
+            });
+            /**
+            * @config panel
+            * @description A reference to the panel we are using for windows.
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('panel', {
+                value: null,
+                writeOnce: true,
+                validator: function(value) {
+                    var ret = true;
+                    if (!YAHOO.widget.Overlay) {
+                        ret = false;
+                    }
+                    return ret;
+                }               
+            });
+            /**
+            * @attribute focusAtStart
+            * @description Should we focus the window when the content is ready?
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('focusAtStart', {
+                value: attr.focusAtStart || false,
+                writeOnce: true,
+                method: function() {
+                    this.on('editorContentLoaded', function() {
+                        var self = this;
+                        setTimeout(function() {
+                            self._focusWindow.call(self, true);
+                            self.editorDirty = false;
+                        }, 400);
+                    }, this, true);
+                }
+            });
+            /**
+            * @attribute dompath
+            * @description Toggle the display of the current Dom path below the editor
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('dompath', {
+                value: attr.dompath || false,
+                method: function(dompath) {
+                    if (dompath && !this.dompath) {
+                        this.dompath = document.createElement('DIV');
+                        this.dompath.id = this.get('id') + '_dompath';
+                        Dom.addClass(this.dompath, 'dompath');
+                        this.get('element_cont').get('firstChild').appendChild(this.dompath);
+                        if (this.get('iframe')) {
+                            this._writeDomPath();
+                        }
+                    } else if (!dompath && this.dompath) {
+                        this.dompath.parentNode.removeChild(this.dompath);
+                        this.dompath = null;
+                    }
+                    this._setupAfterElement();
+                }
+            });
+            /**
+            * @attribute markup
+            * @description Should we try to adjust the markup for the following types: semantic, css, default or xhtml
+            * @default "semantic"
+            * @type String
+            */            
+            this.setAttributeConfig('markup', {
+                value: attr.markup || 'semantic',
+                validator: function(markup) {
+                    switch (markup.toLowerCase()) {
+                        case 'semantic':
+                        case 'css':
+                        case 'default':
+                        case 'xhtml':
+                        return true;
+                    }
+                    return false;
+                }
+            });
+            /**
+            * @attribute removeLineBreaks
+            * @description Should we remove linebreaks and extra spaces on cleanup
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('removeLineBreaks', {
+                value: attr.removeLineBreaks || false,
+                validator: YAHOO.lang.isBoolean
+            });
+            
+
+            this.on('afterRender', function() {
+                this._renderPanel();
+            });
+        },
+        /**
+        * @private
+        * @method _getBlankImage
+        * @description Retrieves the full url of the image to use as the blank image.
+        * @returns {String} The URL to the blank image
+        */
+        _getBlankImage: function() {
+            if (!this.DOMReady) {
+                this._queue[this._queue.length] = ['_getBlankImage', arguments];
+                return '';
+            }
+            var img = '';
+            if (!this._blankImageLoaded) {
+                var div = document.createElement('div');
+                div.style.position = 'absolute';
+                div.style.top = '-9999px';
+                div.style.left = '-9999px';
+                div.className = this.CLASS_PREFIX + '-blankimage';
+                document.body.appendChild(div);
+                img = YAHOO.util.Dom.getStyle(div, 'background-image');
+                img = img.replace('url(', '').replace(')', '').replace(/"/g, '');
+                this.set('blankimage', img);
+                this._blankImageLoaded = true;
+            } else {
+                img = this.get('blankimage');
+            }
+            return img;
+        },
+        /**
+        * @private
+        * @method _handleFontSize
+        * @description Handles the font size button in the toolbar.
+        * @param {Object} o Object returned from Toolbar's buttonClick Event
+        */
+        _handleFontSize: function(o) {
+            var button = this.toolbar.getButtonById(o.button.id);
+            var value = button.get('label') + 'px';
+            this.execCommand('fontsize', value);
+            this.STOP_EXEC_COMMAND = true;
+        },
+        /**
+        * @private
+        * @description Handles the colorpicker buttons in the toolbar.
+        * @param {Object} o Object returned from Toolbar's buttonClick Event
+        */
+        _handleColorPicker: function(o) {
+            var cmd = o.button;
+            var value = '#' + o.color;
+            if ((cmd == 'forecolor') || (cmd == 'backcolor')) {
+                this.execCommand(cmd, value);
+            }
+        },
+        /**
+        * @private
+        * @method _handleAlign
+        * @description Handles the alignment buttons in the toolbar.
+        * @param {Object} o Object returned from Toolbar's buttonClick Event
+        */
+        _handleAlign: function(o) {
+            var cmd = null;
+            for (var i = 0; i < o.button.menu.length; i++) {
+                if (o.button.menu[i].value == o.button.value) {
+                    cmd = o.button.menu[i].value;
+                }
+            }
+            var value = this._getSelection();
+
+            this.execCommand(cmd, value);
+            this.STOP_EXEC_COMMAND = true;
+        },
+        /**
+        * @private
+        * @method _handleAfterNodeChange
+        * @description Fires after a nodeChange happens to setup the things that where reset on the node change (button state).
+        */
+        _handleAfterNodeChange: function() {
+            var path = this._getDomPath(),
+                elm = null,
+                family = null,
+                fontsize = null,
+                validFont = false;
+            var fn_button = this.toolbar.getButtonByValue('fontname');
+            var fs_button = this.toolbar.getButtonByValue('fontsize');
+            var hd_button = this.toolbar.getButtonByValue('heading');
+
+            for (var i = 0; i < path.length; i++) {
+                elm = path[i];
+
+                var tag = elm.tagName.toLowerCase();
+
+
+                if (elm.getAttribute('tag')) {
+                    tag = elm.getAttribute('tag');
+                }
+
+                family = elm.getAttribute('face');
+                if (Dom.getStyle(elm, 'font-family')) {
+                    family = Dom.getStyle(elm, 'font-family');
+                }
+
+                if (tag.substring(0, 1) == 'h') {
+                    if (hd_button) {
+                        for (var h = 0; h < hd_button._configs.menu.value.length; h++) {
+                            if (hd_button._configs.menu.value[h].value.toLowerCase() == tag) {
+                                hd_button.set('label', hd_button._configs.menu.value[h].text);
+                            }
+                        }
+                        this._updateMenuChecked('heading', tag);
+                    }
+                }
+            }
+
+            if (fn_button) {
+                for (var b = 0; b < fn_button._configs.menu.value.length; b++) {
+                    if (family && fn_button._configs.menu.value[b].text.toLowerCase() == family.toLowerCase()) {
+                        validFont = true;
+                        family = fn_button._configs.menu.value[b].text; //Put the proper menu name in the button
+                    }
+                }
+                if (!validFont) {
+                    family = fn_button._configs.label._initialConfig.value;
+                }
+                var familyLabel = '<span class="yui-toolbar-fontname-' + _cleanClassName(family) + '">' + family + '</span>';
+                if (fn_button.get('label') != familyLabel) {
+                    fn_button.set('label', familyLabel);
+                    this._updateMenuChecked('fontname', family);
+                }
+            }
+
+            if (fs_button) {
+                fontsize = parseInt(Dom.getStyle(elm, 'fontSize'), 10);
+                if ((fontsize === null) || isNaN(fontsize)) {
+                    fontsize = fs_button._configs.label._initialConfig.value;
+                }
+                fs_button.set('label', ''+fontsize);
+            }
+            
+            if (!this._isElement(elm, 'body') && !this._isElement(elm, 'img')) {
+                this.toolbar.enableButton(fn_button);
+                this.toolbar.enableButton(fs_button);
+                this.toolbar.enableButton('forecolor');
+                this.toolbar.enableButton('backcolor');
+            }
+            if (this._isElement(elm, 'img')) {
+                if (YAHOO.widget.Overlay) {
+                    this.toolbar.enableButton('createlink');
+                }
+            }
+            if (this._isElement(elm, 'blockquote')) {
+                this.toolbar.selectButton('indent');
+                this.toolbar.disableButton('indent');
+                this.toolbar.enableButton('outdent');
+            }
+            //if (this._isElement(elm, 'ol') || this._isElement(elm, 'ul') || this._isElement(elm, 'li')) {
+            if (this._hasParent(elm, 'ol') || this._hasParent(elm, 'ul')) {
+                this.toolbar.disableButton('indent');
+            }
+            this._lastButton = null;
+            
+        },
+        _setBusy: function(off) {
+            if (off) {
+                Dom.removeClass(document.body, 'yui-busy');
+                Dom.removeClass(this._getDoc().body, 'yui-busy');
+            } else {
+                Dom.addClass(document.body, 'yui-busy');
+                Dom.addClass(this._getDoc().body, 'yui-busy');
+            }
+        },
+        /**
+        * @private
+        * @method _handleInsertImageClick
+        * @description Opens the Image Properties Window when the insert Image button is clicked or an Image is Double Clicked.
+        */
+        _handleInsertImageClick: function() {
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue('insertimage')) {
+                    YAHOO.log('Toolbar Button for (insertimage) was not found, skipping exec.', 'info', 'SimpleEditor');
+                    return false;
+                }
+            }
+        
+            this.toolbar.set('disabled', true); //Disable the toolbar when the prompt is showing
+            this.on('afterExecCommand', function() {
+                var el = this.currentElement[0],
+                    src = 'http://';
+                if (!el) {
+                    el = this._getSelectedElement();
+                }
+                if (el) {
+                    if (el.getAttribute('src')) {
+                        src = el.getAttribute('src', 2);
+                        if (src.indexOf(this.get('blankimage')) != -1) {
+                            src = this.STR_IMAGE_HERE;
+                        }
+                    }
+                }
+                var str = prompt(this.STR_LINK_URL + ': ', src);
+                if ((str !== '') && (str !== null)) {
+                    el.setAttribute('src', str);
+                } else if (str !== null) {
+                    el.parentNode.removeChild(el);
+                    this.currentElement = [];
+                }
+                this.closeWindow();
+                this.toolbar.set('disabled', false);
+            }, this, true);
+        },
+        /**
+        * @private
+        * @method _handleInsertImageWindowClose
+        * @description Handles the closing of the Image Properties Window.
+        */
+        _handleInsertImageWindowClose: function() {
+            this.nodeChange();
+        },
+        /**
+        * @private
+        * @method _isLocalFile
+        * @param {String} url THe url/string to check
+        * @description Checks to see if a string (href or img src) is possibly a local file reference..
+        */
+        _isLocalFile: function(url) {
+            if ((url !== '') && ((url.indexOf('file:/') != -1) || (url.indexOf(':\\') != -1))) {
+                return true;
+            }
+            return false;
+        },
+        /**
+        * @private
+        * @method _handleCreateLinkClick
+        * @description Handles the opening of the Link Properties Window when the Create Link button is clicked or an href is doubleclicked.
+        */
+        _handleCreateLinkClick: function() {
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue('createlink')) {
+                    YAHOO.log('Toolbar Button for (createlink) was not found, skipping exec.', 'info', 'SimpleEditor');
+                    return false;
+                }
+            }
+        
+            this.toolbar.set('disabled', true); //Disable the toolbar when the prompt is showing
+            this.on('afterExecCommand', function() {
+                var el = this.currentElement[0],
+                    url = '';
+
+                if (el) {
+                    if (el.getAttribute('href', 2) !== null) {
+                        url = el.getAttribute('href', 2);
+                    }
+                }
+                var str = prompt(this.STR_LINK_URL + ': ', url);
+                if ((str !== '') && (str !== null)) {
+                    var urlValue = str;
+                    if ((urlValue.indexOf(':/'+'/') == -1) && (urlValue.substring(0,1) != '/') && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                        if ((urlValue.indexOf('@') != -1) && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                            //Found an @ sign, prefix with mailto:
+                            urlValue = 'mailto:' + urlValue;
+                        } else {
+                            /* :// not found adding */
+                            if (urlValue.substring(0, 1) != '#') {
+                                urlValue = 'http:/'+'/' + urlValue;
+                            }
+                        }
+                    }
+                    el.setAttribute('href', urlValue);
+                } else if (str !== null) {
+                    var _span = this._getDoc().createElement('span');
+                    _span.innerHTML = el.innerHTML;
+                    Dom.addClass(_span, 'yui-non');
+                    el.parentNode.replaceChild(_span, el);
+                }
+                this.closeWindow();
+                this.toolbar.set('disabled', false);
+            });
+        },
+        /**
+        * @private
+        * @method _handleCreateLinkWindowClose
+        * @description Handles the closing of the Link Properties Window.
+        */
+        _handleCreateLinkWindowClose: function() {
+            this.nodeChange();
+            this.currentElement = [];
+        },
+        /**
+        * @method render
+        * @description Causes the toolbar and the editor to render and replace the textarea.
+        */
+        render: function() {
+            if (this._rendered) {
+                return false;
+            }
+            YAHOO.log('Render', 'info', 'SimpleEditor');
+            if (!this.DOMReady) {
+                this._queue[this._queue.length] = ['render', arguments];
+                return false;
+            }
+            this._setBusy();
+            this._rendered = true;
+            var self = this;
+
+            this.set('textarea', this.get('element'));
+
+            this.get('element_cont').setStyle('display', 'none');
+            this.get('element_cont').addClass(this.CLASS_CONTAINER);
+
+            this.set('iframe', this._createIframe());
+            window.setTimeout(function() {
+                self._setInitialContent.call(self);
+            }, 10);
+
+            this.get('editor_wrapper').appendChild(this.get('iframe').get('element'));
+
+            if (this.get('disabled')) {
+                this._disableEditor(true);
+            }
+
+            var tbarConf = this.get('toolbar');
+            //Create Toolbar instance
+            if (tbarConf instanceof Toolbar) {
+                this.toolbar = tbarConf;
+                //Set the toolbar to disabled until content is loaded
+                this.toolbar.set('disabled', true);
+            } else {
+                //Set the toolbar to disabled until content is loaded
+                tbarConf.disabled = true;
+                this.toolbar = new Toolbar(this.get('toolbar_cont'), tbarConf);
+            }
+
+            YAHOO.log('fireEvent::toolbarLoaded', 'info', 'SimpleEditor');
+            this.fireEvent('toolbarLoaded', { type: 'toolbarLoaded', target: this.toolbar });
+
+            
+            this.toolbar.on('toolbarCollapsed', function() {
+                if (this.currentWindow) {
+                    this.moveWindow();
+                }
+            }, this, true);
+            this.toolbar.on('toolbarExpanded', function() {
+                if (this.currentWindow) {
+                    this.moveWindow();
+                }
+            }, this, true);
+            this.toolbar.on('fontsizeClick', function(o) {
+                this._handleFontSize(o);
+            }, this, true);
+            
+            this.toolbar.on('colorPickerClicked', function(o) {
+                this._handleColorPicker(o);
+            }, this, true);
+
+            this.toolbar.on('alignClick', function(o) {
+                this._handleAlign(o);
+            }, this, true);
+            this.on('afterNodeChange', function() {
+                this._handleAfterNodeChange();
+            }, this, true);
+            this.toolbar.on('insertimageClick', function() {
+                this._handleInsertImageClick();
+            }, this, true);
+            this.on('windowinsertimageClose', function() {
+                this._handleInsertImageWindowClose();
+            }, this, true);
+            this.toolbar.on('createlinkClick', function() {
+                this._handleCreateLinkClick();
+            }, this, true);
+            this.on('windowcreatelinkClose', function() {
+                this._handleCreateLinkWindowClose();
+            }, this, true);
+            
+
+            //Replace Textarea with editable area
+            
+            this.get('parentNode').replaceChild(this.get('element_cont').get('element'), this.get('element'));
+
+            
+            if (!this.beforeElement) {
+                this.beforeElement = document.createElement('h2');
+                this.beforeElement.className = 'yui-editor-skipheader';
+                this.beforeElement.tabIndex = '-1';
+                this.beforeElement.innerHTML = this.STR_BEFORE_EDITOR;
+                this.get('element_cont').get('firstChild').insertBefore(this.beforeElement, this.toolbar.get('nextSibling'));
+            }
+
+            this.setStyle('visibility', 'hidden');
+            this.setStyle('position', 'absolute');
+            this.setStyle('top', '-9999px');
+            this.setStyle('left', '-9999px');
+            this.get('element_cont').appendChild(this.get('element'));
+            this.get('element_cont').setStyle('display', 'block');
+
+
+            Dom.addClass(this.get('iframe').get('parentNode'), this.CLASS_EDITABLE_CONT);
+            this.get('iframe').addClass(this.CLASS_EDITABLE);
+
+            //Set height and width of editor container
+            this.get('element_cont').setStyle('width', this.get('width'));
+            Dom.setStyle(this.get('iframe').get('parentNode'), 'height', this.get('height'));
+
+            this.get('iframe').setStyle('width', '100%'); //WIDTH
+            this.get('iframe').setStyle('height', '100%');
+
+            if (this.browser.ie == 7) {
+            }
+
+            this.fireEvent('afterRender', { type: 'afterRender', target: this });
+        },
+        /**
+        * @method execCommand
+        * @param {String} action The "execCommand" action to try to execute (Example: bold, insertimage, inserthtml)
+        * @param {String} value (optional) The value for a given action such as action: fontname value: 'Verdana'
+        * @description This method attempts to try and level the differences in the various browsers and their support for execCommand actions
+        */
+        execCommand: function(action, value) {
+            var beforeExec = this.fireEvent('beforeExecCommand', { type: 'beforeExecCommand', target: this, args: arguments });
+            if ((beforeExec === false) || (this.STOP_EXEC_COMMAND)) {
+                this.STOP_EXEC_COMMAND = false;
+                return false;
+            }
+            this._setMarkupType(action);
+            if (this.browser.ie) {
+                this._getWindow().focus();
+            }
+            var exec = true;
+            
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue(action)) {
+                    YAHOO.log('Toolbar Button for (' + action + ') was not found, skipping exec.', 'info', 'SimpleEditor');
+                    exec = false;
+                }
+            }
+
+            this.editorDirty = true;
+            
+            if ((typeof this['cmd_' + action.toLowerCase()] == 'function') && exec) {
+                YAHOO.log('Found execCommand override method: (cmd_' + action.toLowerCase() + ')', 'info', 'SimpleEditor');
+                var retValue = this['cmd_' + action.toLowerCase()](value);
+                exec = retValue[0];
+                if (retValue[1]) {
+                    action = retValue[1];
+                }
+                if (retValue[2]) {
+                    value = retValue[2];
+                }
+            }
+            if (exec) {
+                YAHOO.log('execCommand::(' + action + '), (' + value + ')', 'info', 'SimpleEditor');
+                try {
+                    this._getDoc().execCommand(action, false, value);
+                } catch(e) {
+                    YAHOO.log('execCommand Failed', 'error', 'SimpleEditor');
+                }
+            } else {
+                YAHOO.log('OVERRIDE::execCommand::(' + action + '),(' + value + ') skipped', 'warn', 'SimpleEditor');
+            }
+            this.on('afterExecCommand', function() {
+                this.unsubscribeAll('afterExecCommand');
+                this.nodeChange();
+            });
+            this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
+            
+        },
+    /* {{{  Command Overrides */
+
+        /**
+        * @method cmd_backcolor
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('backcolor') is used.
+        */
+        cmd_backcolor: function(value) {
+            var exec = true,
+                el = this._getSelectedElement(),
+                action = 'backcolor';
+
+            if (this.browser.gecko || this.browser.opera) {
+                this._setEditorStyle(true);
+                action = 'hilitecolor';
+            }
+            /**
+            * @browser opera
+            * @knownissue - Opera fails to assign a background color on an element that already has one.
+            *
+            if (this.browser.opera) {
+                if (!this._isElement(el, 'body') && Dom.getStyle(el, 'background-color')) {
+                    Dom.setStyle(el, 'background-color', value);
+                } else {
+                    this._createCurrentElement('span', { backgroundColor: value });
+                }
+                exec = false;
+            //} else if (!this._hasSelection()) {
+            } else if (el !== this._getDoc().body) {
+                Dom.setStyle(el, 'background-color', value);
+                this._selectNode(el);
+                exec = false;
+            } else {
+                this._createCurrentElement('span', { backgroundColor: value });
+                this._selectNode(this.currentElement[0]);
+                exec = false;
+            }*/
+
+            if (!this._isElement(el, 'body')) {
+                Dom.setStyle(el, 'background-color', value);
+                this._selectNode(el);
+                exec = false;
+            } else {
+                this._createCurrentElement('span', { backgroundColor: value });
+                this._selectNode(this.currentElement[0]);
+                exec = false;
+            }
+
+            return [exec, action];
+        },
+        /**
+        * @method cmd_forecolor
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('forecolor') is used.
+        */
+        cmd_forecolor: function(value) {
+            var exec = true,
+                el = this._getSelectedElement();
+
+                if (!this._isElement(el, 'body')) {
+                    Dom.setStyle(el, 'color', value);
+                    this._selectNode(el);
+                    exec = false;
+                } else {
+                    this._createCurrentElement('span', { color: value });
+                    this._selectNode(this.currentElement[0]);
+                    exec = false;
+                }
+                return [exec];
+        },
+        /**
+        * @method cmd_unlink
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('unlink') is used.
+        */
+        cmd_unlink: function(value) {
+            this._swapEl(this.currentElement[0], 'span', function(el) {
+                el.className = 'yui-non';
+            });
+            return [false];
+        },
+        /**
+        * @method cmd_createlink
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('createlink') is used.
+        */
+        cmd_createlink: function(value) {
+            var el = this._getSelectedElement(), _a = null;
+            if (this._hasParent(el, 'a')) {
+                this.currentElement[0] = this._hasParent(el, 'a');
+            } else if (!this._isElement(el, 'a')) {
+                this._createCurrentElement('a');
+                _a = this._swapEl(this.currentElement[0], 'a');
+                this.currentElement[0] = _a;
+            } else {
+                this.currentElement[0] = el;
+            }
+            return [false];
+        },
+        /**
+        * @method cmd_insertimage
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('insertimage') is used.
+        */
+        cmd_insertimage: function(value) {
+            var exec = true, _img = null, action = 'insertimage',
+                el = this._getSelectedElement();
+
+            if (value === '') {
+                value = this.get('blankimage');
+            }
+
+            /**
+            * @knownissue
+            * @browser Safari 2.x
+            * @description The issue here is that we have no way of knowing where the cursor position is
+            * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
+            */
+            
+            YAHOO.log('InsertImage: ' + el.tagName, 'info', 'SimpleEditor');
+            if (this._isElement(el, 'img')) {
+                this.currentElement[0] = el;
+                exec = false;
+            } else {
+                if (this._getDoc().queryCommandEnabled(action)) {
+                    this._getDoc().execCommand('insertimage', false, value);
+                    var imgs = this._getDoc().getElementsByTagName('img');
+                    for (var i = 0; i < imgs.length; i++) {
+                        if (!YAHOO.util.Dom.hasClass(imgs[i], 'yui-img')) {
+                            YAHOO.util.Dom.addClass(imgs[i], 'yui-img');
+                            this.currentElement[0] = imgs[i];
+                        }
+                    }
+                    exec = false;
+                } else {
+                    if (el == this._getDoc().body) {
+                        _img = this._getDoc().createElement('img');
+                        _img.setAttribute('src', value);
+                        YAHOO.util.Dom.addClass(_img, 'yui-img');
+                        this._getDoc().body.appendChild(_img);
+                    } else {
+                        this._createCurrentElement('img');
+                        _img = this._getDoc().createElement('img');
+                        _img.setAttribute('src', value);
+                        YAHOO.util.Dom.addClass(_img, 'yui-img');
+                        this.currentElement[0].parentNode.replaceChild(_img, this.currentElement[0]);
+                    }
+                    this.currentElement[0] = _img;
+                    exec = false;
+                }
+            }
+            return [exec];
+        },
+        /**
+        * @method cmd_inserthtml
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('inserthtml') is used.
+        */
+        cmd_inserthtml: function(value) {
+            var exec = true, action = 'inserthtml', _span = null, _range = null;
+            /**
+            * @knownissue
+            * @browser Safari 2.x
+            * @description The issue here is that we have no way of knowing where the cursor position is
+            * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
+            */
+            if (this.browser.webkit && !this._getDoc().queryCommandEnabled(action)) {
+                YAHOO.log('More Safari DOM tricks (inserthtml)', 'info', 'EditorSafari');
+                this._createCurrentElement('img');
+                _span = this._getDoc().createElement('span');
+                _span.innerHTML = value;
+                this.currentElement[0].parentNode.replaceChild(_span, this.currentElement[0]);
+                exec = false;
+            } else if (this.browser.ie) {
+                _range = this._getRange();
+                if (_range.item) {
+                    _range.item(0).outerHTML = value;
+                } else {
+                    _range.pasteHTML(value);
+                }
+                exec = false;                    
+            }
+            return [exec];
+        },
+        /**
+        * @method cmd_list
+        * @param tag The tag of the list you want to create (eg, ul or ol)
+        * @description This is a combined execCommand override method. It is called from the cmd_insertorderedlist and cmd_insertunorderedlist methods.
+        */
+        cmd_list: function(tag) {
+            var exec = true, list = null, li = 0, el = null, str = '',
+                selEl = this._getSelectedElement(), action = 'insertorderedlist';
+                if (tag == 'ul') {
+                    action = 'insertunorderedlist';
+                }
+            /**
+            * @knownissue Safari 2.+ doesn't support ordered and unordered lists
+            * @browser Safari 2.x
+            * The issue with this workaround is that when applied to a set of text
+            * that has BR's in it, Safari may or may not pick up the individual items as
+            * list items. This is fixed in WebKit (Safari 3)
+            */
+            if ((this.browser.webkit && !this._getDoc().queryCommandEnabled(action))) {
+                if (this._isElement(selEl, 'li') && this._isElement(selEl.parentNode, tag)) {
+                    YAHOO.log('We already have a list, undo it', 'info', 'SimpleEditor');
+                    el = selEl.parentNode;
+                    list = this._getDoc().createElement('span');
+                    YAHOO.util.Dom.addClass(list, 'yui-non');
+                    str = '';
+                    var lis = el.getElementsByTagName('li');
+                    for (li = 0; li < lis.length; li++) {
+                        str += '<div>' + lis[li].innerHTML + '</div>';
+                    }
+                    list.innerHTML = str;
+                    this.currentElement[0] = el;
+                    this.currentElement[0].parentNode.replaceChild(list, this.currentElement[0]);
+                } else {
+                    YAHOO.log('Create list item', 'info', 'SimpleEditor');
+                    this._createCurrentElement(tag.toLowerCase());
+                    list = this._getDoc().createElement(tag);
+                    for (li = 0; li < this.currentElement.length; li++) {
+                        var newli = this._getDoc().createElement('li');
+                        newli.innerHTML = this.currentElement[li].innerHTML + '<span class="yui-non"> </span> ';
+                        list.appendChild(newli);
+                        if (li > 0) {
+                            this.currentElement[li].parentNode.removeChild(this.currentElement[li]);
+                        }
+                    }
+                    this.currentElement[0].parentNode.replaceChild(list, this.currentElement[0]);
+                    this.currentElement[0] = list;
+                    var _h = this.currentElement[0].firstChild;
+                    _h = Dom.getElementsByClassName('yui-non', 'span', _h)[0];
+                    this._getSelection().setBaseAndExtent(_h, 1, _h, _h.innerText.length);
+                }
+                exec = false;
+            } else {
+                el = this._getSelectedElement();
+                if (this._isElement(el, 'li') && this._isElement(el.parentNode, tag) || (this.browser.ie && this._isElement(this._getRange().parentElement, 'li'))) { //we are in a list..
+                    YAHOO.log('We already have a list, undo it', 'info', 'SimpleEditor');
+                    if (this.browser.ie) {
+                        YAHOO.log('Undo IE', 'info', 'SimpleEditor');
+                        str = '';
+                        var lis2 = el.parentNode.getElementsByTagName('li');
+                        for (var j = 0; j < lis2.length; j++) {
+                            str += lis2[j].innerHTML + '<br>';
+                        }
+                        var newEl = this._getDoc().createElement('span');
+                        newEl.innerHTML = str;
+                        el.parentNode.parentNode.replaceChild(newEl, el.parentNode);
+                    } else {
+                        this.nodeChange();
+                        this._getDoc().execCommand(action, '', el.parentNode);
+                        this.nodeChange();
+                    }
+                    exec = false;
+                }
+                if (this.browser.opera) {
+                    var self = this;
+                    window.setTimeout(function() {
+                        var liso = self._getDoc().getElementsByTagName('li');
+                        for (var i = 0; i < liso.length; i++) {
+                            if (liso[i].innerHTML.toLowerCase() == '<br>') {
+                                liso[i].parentNode.parentNode.removeChild(liso[i].parentNode);
+                            }
+                        }
+                    },30);
+                }
+                if (this.browser.ie && exec) {
+                    var html = '';
+                    if (this._getRange().html) {
+                        html = '<li>' + this._getRange().html+ '</li>';
+                    } else {
+                        html = '<li>' + this._getRange().text + '</li>';
+                    }
+
+                    this._getRange().pasteHTML('<' + tag + '>' + html + '</' + tag + '>');
+                    exec = false;
+                }
+            }
+            return exec;
+        },
+        /**
+        * @method cmd_insertorderedlist
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('insertorderedlist ') is used.
+        */
+        cmd_insertorderedlist: function(value) {
+            return [this.cmd_list('ol')];
+        },
+        /**
+        * @method cmd_insertunorderedlist 
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('insertunorderedlist') is used.
+        */
+        cmd_insertunorderedlist: function(value) {
+            return [this.cmd_list('ul')];
+        },
+        /**
+        * @method cmd_fontname
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('fontname') is used.
+        */
+        cmd_fontname: function(value) {
+            var exec = true,
+                selEl = this._getSelectedElement();
+
+            this.currentFont = value;
+            if (selEl && selEl.tagName && !this._hasSelection()) {
+                YAHOO.util.Dom.setStyle(selEl, 'font-family', value);
+                exec = false;
+            }
+            return [exec];
+        },
+        /**
+        * @method cmd_fontsize
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('fontsize') is used.
+        */
+        cmd_fontsize: function(value) {
+            if ((this.currentElement.length > 0) && (!this._hasSelection())) {
+                YAHOO.util.Dom.setStyle(this.currentElement, 'fontSize', value);
+            } else if (!this._isElement(this._getSelectedElement(), 'body')) {
+                var el = this._getSelectedElement();
+                YAHOO.util.Dom.setStyle(el, 'fontSize', value);
+                this._selectNode(el);
+            } else {
+                this._createCurrentElement('span', {'fontSize': value });
+                this._selectNode(this.currentElement[0]);
+            }
+            return [false];
+        },
+    /* }}} */
+        /**
+        * @private
+        * @method _swapEl
+        * @param {HTMLElement} el The element to swap with
+        * @param {String} tagName The tagname of the element that you wish to create
+        * @param {Function} callback (optional) A function to run on the element after it is created, but before it is replaced. An element reference is passed to this function.
+        * @description This function will create a new element in the DOM and populate it with the contents of another element. Then it will assume it's place.
+        */
+        _swapEl: function(el, tagName, callback) {
+            var _el = this._getDoc().createElement(tagName);
+            _el.innerHTML = el.innerHTML;
+            if (typeof callback == 'function') {
+                callback.call(this, _el);
+            }
+            el.parentNode.replaceChild(_el, el);
+            return _el;
+        },
+        /**
+        * @private
+        * @method _createCurrentElement
+        * @param {String} tagName (optional defaults to a) The tagname of the element that you wish to create
+        * @param {Object} tagStyle (optional) Object literal containing styles to apply to the new element.
+        * @description This is a work around for the various browser issues with execCommand. This method will run <code>execCommand('fontname', false, 'yui-tmp')</code> on the given selection.
+        * It will then search the document for an element with the font-family set to <strong>yui-tmp</strong> and replace that with another span that has other information in it, then assign the new span to the 
+        * <code>this.currentElement</code> array, so we now have element references to the elements that were just modified. At this point we can use standard DOM manipulation to change them as we see fit.
+        */
+        _createCurrentElement: function(tagName, tagStyle) {
+            tagName = ((tagName) ? tagName : 'a');
+            var tar = null,
+                el = [],
+                _doc = this._getDoc();
+            
+            if (this.currentFont) {
+                if (!tagStyle) {
+                    tagStyle = {};
+                }
+                tagStyle.fontFamily = this.currentFont;
+                this.currentFont = null;
+            }
+            this.currentElement = [];
+
+            var _elCreate = function() {
+                var el = null;
+                switch (tagName) {
+                    case 'h1':
+                    case 'h2':
+                    case 'h3':
+                    case 'h4':
+                    case 'h5':
+                    case 'h6':
+                        el = _doc.createElement(tagName);
+                        break;
+                    default:
+                        el = _doc.createElement('span');
+                        YAHOO.util.Dom.addClass(el, 'yui-tag-' + tagName);
+                        YAHOO.util.Dom.addClass(el, 'yui-tag');
+                        el.setAttribute('tag', tagName);
+
+                        for (var k in tagStyle) {
+                            if (YAHOO.util.Lang.hasOwnProperty(tagStyle, k)) {
+                                el.style[k] = tagStyle[k];
+                            }
+                        }
+                        break;
+                }
+                return el;
+            };
+
+            if (!this._hasSelection()) {
+                if (this._getDoc().queryCommandEnabled('insertimage')) {
+                    this._getDoc().execCommand('insertimage', false, 'yui-tmp-img');
+                    var imgs = this._getDoc().getElementsByTagName('img');
+                    for (var j = 0; j < imgs.length; j++) {
+                        if (imgs[j].getAttribute('src', 2) == 'yui-tmp-img') {
+                            el = _elCreate();
+                            imgs[j].parentNode.replaceChild(el, imgs[j]);
+                            this.currentElement[this.currentElement.length] = el;
+                        }
+                    }
+                } else {
+                    if (this.currentEvent) {
+                        tar = YAHOO.util.Event.getTarget(this.currentEvent);
+                    } else {
+                        //For Safari..
+                        tar = this._getDoc().body;                        
+                    }
+                }
+                if (tar) {
+                    /**
+                    * @knownissue
+                    * @browser Safari 2.x
+                    * @description The issue here is that we have no way of knowing where the cursor position is
+                    * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
+                    */
+                    el = _elCreate();
+                    if (this._isElement(tar, 'body') || this._isElement(tar, 'html')) {
+                        if (this._isElement(tar, 'html')) {
+                            tar = this._getDoc().body;
+                        }
+                        tar.appendChild(el);
+                    } else if (tar.nextSibling) {
+                        tar.parentNode.insertBefore(el, tar.nextSibling);
+                    } else {
+                        tar.parentNode.appendChild(el);
+                    }
+                    //this.currentElement = el;
+                    this.currentElement[this.currentElement.length] = el;
+                    this.currentEvent = null;
+                    if (this.browser.webkit) {
+                        //Force Safari to focus the new element
+                        this._getSelection().setBaseAndExtent(el, 0, el, 0);
+                        if (this.browser.webkit3) {
+                            this._getSelection().collapseToStart();
+                        } else {
+                            this._getSelection().collapse(true);
+                        }
+                    }
+                }
+            } else {
+                //Force CSS Styling for this action...
+                this._setEditorStyle(true);
+                this._getDoc().execCommand('fontname', false, 'yui-tmp');
+                var _tmp = [];
+                /* TODO: This needs to be cleaned up.. */
+                var _tmp1 = this._getDoc().getElementsByTagName('font');
+                var _tmp2 = this._getDoc().getElementsByTagName(this._getSelectedElement().tagName);
+                var _tmp3 = this._getDoc().getElementsByTagName('span');
+                var _tmp4 = this._getDoc().getElementsByTagName('i');
+                var _tmp5 = this._getDoc().getElementsByTagName('b');
+                var _tmp6 = this._getDoc().getElementsByTagName(this._getSelectedElement().parentNode.tagName);
+                for (var e1 = 0; e1 < _tmp1.length; e1++) {
+                    _tmp[_tmp.length] = _tmp1[e1];
+                }
+                for (var e6 = 0; e6 < _tmp6.length; e6++) {
+                    _tmp[_tmp.length] = _tmp6[e6];
+                }
+                for (var e2 = 0; e2 < _tmp2.length; e2++) {
+                    _tmp[_tmp.length] = _tmp2[e2];
+                }
+                for (var e3 = 0; e3 < _tmp3.length; e3++) {
+                    _tmp[_tmp.length] = _tmp3[e3];
+                }
+                for (var e4 = 0; e4 < _tmp4.length; e4++) {
+                    _tmp[_tmp.length] = _tmp4[e4];
+                }
+                for (var e5 = 0; e5 < _tmp5.length; e5++) {
+                    _tmp[_tmp.length] = _tmp5[e5];
+                }
+                for (var i = 0; i < _tmp.length; i++) {
+                    if ((YAHOO.util.Dom.getStyle(_tmp[i], 'font-family') == 'yui-tmp') || (_tmp[i].face && (_tmp[i].face == 'yui-tmp'))) {
+                        el = _elCreate();
+                        el.innerHTML = _tmp[i].innerHTML;
+                        if (this._isElement(_tmp[i], 'ol') || (this._isElement(_tmp[i], 'ul'))) {
+                            var fc = _tmp[i].getElementsByTagName('li')[0];
+                            _tmp[i].style.fontFamily = 'inherit';
+                            fc.style.fontFamily = 'inherit';
+                            el.innerHTML = fc.innerHTML;
+                            fc.innerHTML = '';
+                            fc.appendChild(el);
+                            this.currentElement[this.currentElement.length] = el;
+                        } else if (this._isElement(_tmp[i], 'li')) {
+                            _tmp[i].innerHTML = '';
+                            _tmp[i].appendChild(el);
+                            _tmp[i].style.fontFamily = 'inherit';
+                            this.currentElement[this.currentElement.length] = el;
+                        } else {
+                            if (_tmp[i].parentNode) {
+                                _tmp[i].parentNode.replaceChild(el, _tmp[i]);
+                                this.currentElement[this.currentElement.length] = el;
+                                this.currentEvent = null;
+                                if (this.browser.webkit) {
+                                    //Force Safari to focus the new element
+                                    this._getSelection().setBaseAndExtent(el, 0, el, 0);
+                                    if (this.browser.webkit3) {
+                                        this._getSelection().collapseToStart();
+                                    } else {
+                                        this._getSelection().collapse(true);
+                                    }
+                                }
+                                if (this.browser.ie && tagStyle && tagStyle.fontSize) {
+                                    this._getSelection().empty();
+                                }
+                                if (this.browser.gecko) {
+                                    this._getSelection().collapseToStart();
+                                }
+                            }
+                        }
+                    }
+                }
+                var len = this.currentElement.length;
+                for (var e = 0; e < len; e++) {
+                    if ((e + 1) != len) { //Skip the last one in the list
+                        if (this.currentElement[e] && this.currentElement[e].nextSibling) {
+                            if (this._isElement(this.currentElement[e], 'br')) {
+                                this.currentElement[this.currentElement.length] = this.currentElement[e].nextSibling;
+                            }
+                        }
+                    }
+                }
+            }
+        },
+        /**
+        * @method saveHTML
+        * @description Cleans the HTML with the cleanHTML method then places that string back into the textarea.
+        */
+        saveHTML: function() {
+            var html = this.cleanHTML();
+            this.get('element').value = html;
+            return html;
+        },
+        /**
+        * @method setEditorHTML
+        * @param {String} html The html content to load into the editor
+        * @description Loads HTML into the editors body
+        */
+        setEditorHTML: function(html) {
+            html = this._cleanIncomingHTML(html);
+            this._getDoc().body.innerHTML = html;
+            this.nodeChange();
+        },
+        /**
+        * @method getEditorHTML
+        * @description Gets the unprocessed/unfiltered HTML from the editor
+        */
+        getEditorHTML: function() {
+            return this._getDoc().body.innerHTML;
+        },
+        /**
+        * @method show
+        * @description This method needs to be called if the Editor was hidden (like in a TabView or Panel). It is used to reset the editor after being in a container that was set to display none.
+        */
+        show: function() {
+            if (this.browser.gecko) {
+                this._setDesignMode('on');
+                this._focusWindow();
+            }
+            if (this.browser.webkit) {
+                var self = this;
+                window.setTimeout(function() {
+                    self._setInitialContent.call(self);
+                }, 10);
+            }
+            //Adding this will close all other Editor window's when showing this one.
+            if (YAHOO.widget.EditorInfo.window.win && YAHOO.widget.EditorInfo.window.scope) {
+                YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);
+            }
+            //Put the iframe back in place
+            this.get('iframe').setStyle('position', 'static');
+            this.get('iframe').setStyle('left', '');
+        },
+        /**
+        * @method hide
+        * @description This method needs to be called if the Editor is to be hidden (like in a TabView or Panel). It should be called to clear timeouts and close open editor windows.
+        */
+        hide: function() {
+            //Adding this will close all other Editor window's.
+            if (YAHOO.widget.EditorInfo.window.win && YAHOO.widget.EditorInfo.window.scope) {
+                YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);
+            }
+            if (this._fixNodesTimer) {
+                clearTimeout(this._fixNodesTimer);
+                this._fixNodesTimer = null;
+            }
+            if (this._nodeChangeTimer) {
+                clearTimeout(this._nodeChangeTimer);
+                this._nodeChangeTimer = null;
+            }
+            this._lastNodeChange = 0;
+            //Move the iframe off of the screen, so that in containers with visiblity hidden, IE will not cover other elements.
+            this.get('iframe').setStyle('position', 'absolute');
+            this.get('iframe').setStyle('left', '-9999px');
+        },
+        /**
+        * @method _cleanIncomingHTML
+        * @param {String} html The unfiltered HTML
+        * @description Process the HTML with a few regexes to clean it up and stabilize the input
+        * @returns {String} The filtered HTML
+        */
+        _cleanIncomingHTML: function(html) {
+            html = html.replace(/<strong([^>]*)>/gi, '<b$1>');
+            html = html.replace(/<\/strong>/gi, '</b>');   
+            html = html.replace(/<em([^>]*)>/gi, '<i$1>');
+            html = html.replace(/<\/em>/gi, '</i>');
+            return html;
+        },
+        /**
+        * @method cleanHTML
+        * @param {String} html The unfiltered HTML
+        * @description Process the HTML with a few regexes to clean it up and stabilize the output
+        * @returns {String} The filtered HTML
+        */
+        cleanHTML: function(html) {
+            //Start Filtering Output
+            //Begin RegExs..
+            if (!html) { 
+                html = this.getEditorHTML();
+            }
+            var markup = this.get('markup');
+            //Make some backups...
+            html = this.pre_filter_linebreaks(html, markup);
+
+		    html = html.replace(/<img([^>]*)\/>/gi, '<YUI_IMG$1>');
+		    html = html.replace(/<img([^>]*)>/gi, '<YUI_IMG$1>');
+
+		    html = html.replace(/<input([^>]*)\/>/gi, '<YUI_INPUT$1>');
+		    html = html.replace(/<input([^>]*)>/gi, '<YUI_INPUT$1>');
+
+		    html = html.replace(/<ul([^>]*)>/gi, '<YUI_UL$1>');
+		    html = html.replace(/<\/ul>/gi, '<\/YUI_UL>');
+		    html = html.replace(/<blockquote([^>]*)>/gi, '<YUI_BQ$1>');
+		    html = html.replace(/<\/blockquote>/gi, '<\/YUI_BQ>');
+
+            //Convert b and i tags to strong and em tags
+            if ((markup == 'semantic') || (markup == 'xhtml')) {
+                html = html.replace(/<i([^>]*)>/gi, '<em$1>');
+                html = html.replace(/<\/i>/gi, '</em>');
+                html = html.replace(/<b([^>]*)>/gi, '<strong$1>');
+                html = html.replace(/<\/b>/gi, '</strong>');
+            }
+            
+            //Case Changing
+		    html = html.replace(/<font/gi, '<font');
+		    html = html.replace(/<\/font>/gi, '</font>');
+		    html = html.replace(/<span/gi, '<span');
+		    html = html.replace(/<\/span>/gi, '</span>');
+            if ((markup == 'semantic') || (markup == 'xhtml') || (markup == 'css')) {
+                html = html.replace(new RegExp('<font([^>]*)face="([^>]*)">(.*?)<\/font>', 'gi'), '<span $1 style="font-family: $2;">$3</span>');
+                html = html.replace(/<u/gi, '<span style="text-decoration: underline;"');
+                html = html.replace(/\/u>/gi, '/span>');
+                if (markup == 'css') {
+                    html = html.replace(/<em([^>]*)>/gi, '<i$1>');
+                    html = html.replace(/<\/em>/gi, '</i>');
+                    html = html.replace(/<strong([^>]*)>/gi, '<b$1>');
+                    html = html.replace(/<\/strong>/gi, '</b>');
+                    html = html.replace(/<b/gi, '<span style="font-weight: bold;"');
+                    html = html.replace(/\/b>/gi, '/span>');
+                    html = html.replace(/<i/gi, '<span style="font-style: italic;"');
+                    html = html.replace(/\/i>/gi, '/span>');
+                }
+                html = html.replace(/  /gi, ' '); //Replace all double spaces and replace with a single
+            } else {
+		        html = html.replace(/<u/gi, '<u');
+		        html = html.replace(/\/u>/gi, '/u>');
+            }
+		    html = html.replace(/<ol([^>]*)>/gi, '<ol$1>');
+		    html = html.replace(/\/ol>/gi, '/ol>');
+		    html = html.replace(/<li/gi, '<li');
+		    html = html.replace(/\/li>/gi, '/li>');
+            html = this.filter_safari(html);
+
+            html = this.filter_internals(html);
+
+            html = this.filter_all_rgb(html);
+
+            //Replace our backups with the real thing
+            html = this.post_filter_linebreaks(html, markup);
+
+            if (markup == 'xhtml') {
+		        html = html.replace(/<YUI_IMG([^>]*)>/g, '<img $1/>');
+		        html = html.replace(/<YUI_INPUT([^>]*)>/g, '<input $1/>');
+            } else {
+		        html = html.replace(/<YUI_IMG([^>]*)>/g, '<img $1>');
+		        html = html.replace(/<YUI_INPUT([^>]*)>/g, '<input $1>');
+            }
+		    html = html.replace(/<YUI_UL([^>]*)>/g, '<ul$1>');
+		    html = html.replace(/<\/YUI_UL>/g, '<\/ul>');
+
+            html = this.filter_invalid_lists(html);
+
+		    html = html.replace(/<YUI_BQ([^>]*)>/g, '<blockquote$1>');
+		    html = html.replace(/<\/YUI_BQ>/g, '<\/blockquote>');
+
+            //Trim the output, removing whitespace from the beginning and end
+            html = YAHOO.lang.trim(html);
+
+            if (this.get('removeLineBreaks')) {
+                html = html.replace(/\n/g, '').replace(/\r/g, '');
+                html = html.replace(/  /gi, ' '); //Replace all double spaces and replace with a single
+            }
+            
+            //First empty span
+            if (html.substring(0, 6).toLowerCase() == '<span>')  {
+                html = html.substring(6);
+            }
+            //Last empty span
+            if (html.substring(html.length - 7, html.length).toLowerCase() == '</span>')  {
+                html = html.substring(0, html.length - 7);
+            }
+
+
+            for (var v in this.invalidHTML) {
+                if (YAHOO.lang.hasOwnProperty(this.invalidHTML, v)) {
+                    if (Lang.isObject(v) && v.keepContents) {
+                        html = html.replace(new RegExp('<' + v + '([^>]*)>(.*?)<\/' + v + '>', 'gi'), '$1');
+                    } else {
+                        html = html.replace(new RegExp('<' + v + '([^>]*)>(.*?)<\/' + v + '>', 'gi'), '');
+                    }
+                }
+            }
+
+            this.fireEvent('cleanHTML', { type: 'cleanHTML', target: this, html: html });
+
+            return html;
+        },
+        /**
+        * @method filter_invalid_lists
+        * @param String html The HTML string to filter
+        * @description Filters invalid ol and ul list markup, converts this: <li></li><ol>..</ol> to this: <li></li><li><ol>..</ol></li>
+        * @returns String
+        */
+        filter_invalid_lists: function(html) {
+            html = html.replace(/<\/li>\n/gi, '</li>');
+
+            html = html.replace(/<\/li><ol>/gi, '</li><li><ol>');
+            html = html.replace(/<\/ol>/gi, '</ol></li>');
+            html = html.replace(/<\/ol><\/li>\n/gi, "</ol>\n");
+
+            html = html.replace(/<\/li><ul>/gi, '</li><li><ul>');
+            html = html.replace(/<\/ul>/gi, '</ul></li>');
+            html = html.replace(/<\/ul><\/li>\n/gi, "</ul>\n");
+
+            html = html.replace(/<\/li>/gi, "</li>\n");
+            html = html.replace(/<\/ol>/gi, "</ol>\n");
+            html = html.replace(/<ol>/gi, "<ol>\n");
+            html = html.replace(/<ul>/gi, "<ul>\n");
+            return html;
+        },
+        /**
+        * @method filter_safari
+        * @param String html The HTML string to filter
+        * @description Filters strings specific to Safari
+        * @returns String
+        */
+        filter_safari: function(html) {
+            if (this.browser.webkit) {
+                html = html.replace(/Apple-style-span/gi, '');
+                html = html.replace(/style="line-height: normal;"/gi, '');
+                //Remove bogus LI's
+                html = html.replace(/<li><\/li>/gi, '');
+                html = html.replace(/<li> <\/li>/gi, '');
+                html = html.replace(/<li>  <\/li>/gi, '');
+                //Remove bogus DIV's
+                html = html.replace(/<div><\/div>/gi, '');
+                html = html.replace(/<div> <\/div>/gi, '');
+            }
+            return html;
+        },
+        /**
+        * @method filter_internals
+        * @param String html The HTML string to filter
+        * @description Filters internal RTE strings and bogus attrs we don't want
+        * @returns String
+        */
+        filter_internals: function(html) {
+		    html = html.replace(/\r/g, '');
+            //Fix stuff we don't want
+	        html = html.replace(/<\/?(body|head|html)[^>]*>/gi, '');
+            //Fix last BR in LI
+		    html = html.replace(/<YUI_BR><\/li>/gi, '</li>');
+
+		    html = html.replace(/yui-tag-span/gi, '');
+		    html = html.replace(/yui-tag/gi, '');
+		    html = html.replace(/yui-non/gi, '');
+		    html = html.replace(/yui-img/gi, '');
+		    html = html.replace(/ tag="span"/gi, '');
+		    html = html.replace(/ class=""/gi, '');
+		    html = html.replace(/ style=""/gi, '');
+		    html = html.replace(/ class=" "/gi, '');
+		    html = html.replace(/ class="  "/gi, '');
+		    html = html.replace(/ target=""/gi, '');
+		    html = html.replace(/ title=""/gi, '');
+
+            if (this.browser.ie) {
+		        html = html.replace(/ class= /gi, '');
+		        html = html.replace(/ class= >/gi, '');
+		        html = html.replace(/_height="([^>])"/gi, '');
+		        html = html.replace(/_width="([^>])"/gi, '');
+            }
+            
+            return html;
+        },
+        /**
+        * @method filter_all_rgb
+        * @param String str The HTML string to filter
+        * @description Converts all RGB color strings found in passed string to a hex color, example: style="color: rgb(0, 255, 0)" converts to style="color: #00ff00"
+        * @returns String
+        */
+        filter_all_rgb: function(str) {
+            var exp = new RegExp("rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)", "gi");
+            var arr = str.match(exp);
+            if (Lang.isArray(arr)) {
+                for (var i = 0; i < arr.length; i++) {
+                    var color = this.filter_rgb(arr[i]);
+                    str = str.replace(arr[i].toString(), color);
+                }
+            }
+            
+            return str;
+        },
+        /**
+        * @method filter_rgb
+        * @param String css The CSS string containing rgb(#,#,#);
+        * @description Converts an RGB color string to a hex color, example: rgb(0, 255, 0) converts to #00ff00
+        * @returns String
+        */
+        filter_rgb: function(css) {
+            if (css.toLowerCase().indexOf('rgb') != -1) {
+                var exp = new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)", "gi");
+                var rgb = css.replace(exp, "$1,$2,$3,$4,$5").split(',');
+            
+                if (rgb.length == 5) {
+                    var r = parseInt(rgb[1], 10).toString(16);
+                    var g = parseInt(rgb[2], 10).toString(16);
+                    var b = parseInt(rgb[3], 10).toString(16);
+
+                    r = r.length == 1 ? '0' + r : r;
+                    g = g.length == 1 ? '0' + g : g;
+                    b = b.length == 1 ? '0' + b : b;
+
+                    css = "#" + r + g + b;
+                }
+            }
+            return css;
+        },
+        /**
+        * @method pre_filter_linebreaks
+        * @param String html The HTML to filter
+        * @param String markup The markup type to filter to
+        * @description HTML Pre Filter
+        * @returns String
+        */
+        pre_filter_linebreaks: function(html, markup) {
+            if (this.browser.webkit) {
+		        html = html.replace(/<br class="khtml-block-placeholder">/gi, '<YUI_BR>');
+		        html = html.replace(/<br class="webkit-block-placeholder">/gi, '<YUI_BR>');
+            }
+		    html = html.replace(/<br>/gi, '<YUI_BR>');
+		    html = html.replace(/<br (.*?)>/gi, '<YUI_BR>');
+		    html = html.replace(/<br\/>/gi, '<YUI_BR>');
+		    html = html.replace(/<br \/>/gi, '<YUI_BR>');
+		    html = html.replace(/<div><YUI_BR><\/div>/gi, '<YUI_BR>');
+		    html = html.replace(/<p>( | )<\/p>/g, '<YUI_BR>');            
+		    html = html.replace(/<p><br> <\/p>/gi, '<YUI_BR>');
+		    html = html.replace(/<p> <\/p>/gi, '<YUI_BR>');
+            //Fix last BR
+	        html = html.replace(/<YUI_BR>$/, '');
+            //Fix last BR in P
+	        html = html.replace(/<YUI_BR><\/p>/g, '</p>');
+            return html;
+        },
+        /**
+        * @method post_filter_linebreaks
+        * @param String html The HTML to filter
+        * @param String markup The markup type to filter to
+        * @description HTML Pre Filter
+        * @returns String
+        */
+        post_filter_linebreaks: function(html, markup) {
+            if (markup == 'xhtml') {
+		        html = html.replace(/<YUI_BR>/g, '<br/>');
+            } else {
+		        html = html.replace(/<YUI_BR>/g, '<br>');
+            }
+            return html;
+        },
+        /**
+        * @method clearEditorDoc
+        * @description Clear the doc of the Editor
+        */
+        clearEditorDoc: function() {
+            this._getDoc().body.innerHTML = ' ';
+        },
+        /**
+        * @private
+        * @method _renderPanel
+        * @description Override Method for Advanced Editor
+        */
+        _renderPanel: function() {
+        },
+        /**
+        * @method openWindow
+        * @description Override Method for Advanced Editor
+        */
+        openWindow: function(win) {
+        },
+        /**
+        * @method moveWindow
+        * @description Override Method for Advanced Editor
+        */
+        moveWindow: function() {
+        },
+        /**
+        * @private
+        * @method _closeWindow
+        * @description Override Method for Advanced Editor
+        */
+        _closeWindow: function() {
+        },
+        /**
+        * @method closeWindow
+        * @description Override Method for Advanced Editor
+        */
+        closeWindow: function() {
+            this.unsubscribeAll('afterExecCommand');
+            this.toolbar.resetAllButtons();
+            this._focusWindow();        
+        },
+        /**
+        * @method destroy
+        * @description Destroys the editor, all of it's elements and objects.
+        * @return {Boolean}
+        */
+        destroy: function() {
+            this.saveHTML();
+            this.toolbar.destroy();
+            this.setStyle('visibility', 'hidden');
+            this.setStyle('position', 'absolute');
+            this.setStyle('top', '-9999px');
+            this.setStyle('left', '-9999px');
+            var textArea = this.get('element');
+            this.get('element_cont').get('parentNode').replaceChild(textArea, this.get('element_cont').get('element'));
+            this.get('element_cont').get('element').innerHTML = '';
+            //Brutal Object Destroy
+            for (var i in this) {
+                if (Lang.hasOwnProperty(this, i)) {
+                    this[i] = null;
+                }
+            }
+            return true;
+        },        
+        /**
+        * @method toString
+        * @description Returns a string representing the editor.
+        * @return {String}
+        */
+        toString: function() {
+            var str = 'SimpleEditor';
+            if (this.get && this.get('element_cont')) {
+                str = 'SimpleEditor (#' + this.get('element_cont').get('id') + ')' + ((this.get('disabled') ? ' Disabled' : ''));
+            }
+            return str;
+        }
+    });
+
+/**
+* @event toolbarLoaded
+* @description Event is fired during the render process directly after the Toolbar is loaded. Allowing you to attach events to the toolbar. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event cleanHTML
+* @description Event is fired after the cleanHTML method is called.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event afterRender
+* @description Event is fired after the render process finishes. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorContentLoaded
+* @description Event is fired after the editor iframe's document fully loads and fires it's onload event. From here you can start injecting your own things into the document. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorMouseUp
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorMouseDown
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorDoubleClick
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorKeyUp
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorKeyPress
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorKeyDown
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event beforeNodeChange
+* @description Event fires at the beginning of the nodeChange process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event afterNodeChange
+* @description Event fires at the end of the nodeChange process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event beforeExecCommand
+* @description Event fires at the beginning of the execCommand process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event afterExecCommand
+* @description Event fires at the end of the execCommand process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+
+/**
+     * @description Singleton object used to track the open window objects and panels across the various open editors
+     * @class EditorInfo
+     * @static
+    */
+    YAHOO.widget.EditorInfo = {
+        /**
+        * @private
+        * @property _instances
+        * @description A reference to all editors on the page.
+        * @type Object
+        */
+        _instances: {},
+        /**
+        * @private
+        * @property window
+        * @description A reference to the currently open window object in any editor on the page.
+        * @type Object <a href="YAHOO.widget.EditorWindow.html">YAHOO.widget.EditorWindow</a>
+        */
+        window: {},
+        /**
+        * @private
+        * @property panel
+        * @description A reference to the currently open panel in any editor on the page.
+        * @type Object <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>
+        */
+        panel: null,
+        /**
+        * @method getEditorById
+        * @description Returns a reference to the Editor object associated with the given textarea
+        * @param {String/HTMLElement} id The id or reference of the textarea to return the Editor instance of
+        * @returns Object <a href="YAHOO.widget.Editor.html">YAHOO.widget.Editor</a>
+        */
+        getEditorById: function(id) {
+            if (!YAHOO.lang.isString(id)) {
+                //Not a string, assume a node Reference
+                id = id.id;
+            }
+            if (this._instances[id]) {
+                return this._instances[id];
+            }
+            return false;
+        },
+        /**
+        * @method toString
+        * @description Returns a string representing the EditorInfo.
+        * @return {String}
+        */
+        toString: function() {
+            var len = 0;
+            for (var i in this._instances) {
+                len++;
+            }
+            return 'Editor Info (' + len + ' registered intance' + ((len > 1) ? 's' : '') + ')';
+        }
+    };
+
+
+
+    
+})();
+YAHOO.register("simpleeditor", YAHOO.widget.SimpleEditor, {version: "2.4.1", build: "742"});

Added: trunk/root/static/yui/editor/simpleeditor-beta-min.js
===================================================================
--- trunk/root/static/yui/editor/simpleeditor-beta-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/editor/simpleeditor-beta-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,20 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+(function(){var B=YAHOO.util.Dom,A=YAHOO.util.Event,C=YAHOO.lang;if(YAHOO.widget.Button){YAHOO.widget.ToolbarButtonAdvanced=YAHOO.widget.Button;YAHOO.widget.ToolbarButtonAdvanced.prototype.buttonType="rich";YAHOO.widget.ToolbarButtonAdvanced.prototype.checkValue=function(F){var E=this.getMenu().getItems();if(E.length===0){this.getMenu()._onBeforeShow();E=this.getMenu().getItems();}for(var D=0;D<E.length;D++){E[D].cfg.setProperty("checked",false);if(E[D].value==F){E[D].cfg.setProperty("checked",true);}}};}else{YAHOO.widget.ToolbarButtonAdvanced=function(){};}YAHOO.widget.ToolbarButton=function(E,D){if(C.isObject(arguments[0])&&!B.get(E).nodeType){D=E;}var G=(D||{});var F={element:null,attributes:G};if(!F.attributes.type){F.attributes.type="push";}F.element=document.createElement("span");F.element.setAttribute("unselectable","on");F.element.className="yui-button yui-"+F.attributes.type+"-button";F.element.innerHTML="<span class=\"first-child\"><a href=\"#\">LABEL</a></span>";!
 F.attributes.id=B.generateId();YAHOO.widget.ToolbarButton.superclass.constructor.call(this,F.element,F.attributes);};YAHOO.extend(YAHOO.widget.ToolbarButton,YAHOO.util.Element,{buttonType:"normal",_handleMouseOver:function(){if(!this.get("disabled")){this.addClass("yui-button-hover");this.addClass("yui-"+this.get("type")+"-button-hover");}},_handleMouseOut:function(){this.removeClass("yui-button-hover");this.removeClass("yui-"+this.get("type")+"-button-hover");},checkValue:function(F){if(this.get("type")=="menu"){var E=this._button.options;for(var D=0;D<E.length;D++){if(E[D].value==F){E.selectedIndex=D;}}}},init:function(E,D){YAHOO.widget.ToolbarButton.superclass.init.call(this,E,D);this.on("mouseover",this._handleMouseOver,this,true);this.on("mouseout",this._handleMouseOut,this,true);},initAttributes:function(D){YAHOO.widget.ToolbarButton.superclass.initAttributes.call(this,D);this.setAttributeConfig("value",{value:D.value});this.setAttributeConfig("menu",{value:D.menu||fa!
 lse});this.setAttributeConfig("type",{value:D.type,writeOnce:t!
 rue,meth
od:function(H){var G,F;if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0];}switch(H){case"select":case"menu":G=document.createElement("select");var I=this.get("menu");for(var E=0;E<I.length;E++){F=document.createElement("option");F.innerHTML=I[E].text;F.value=I[E].value;if(I[E].checked){F.selected=true;}G.appendChild(F);}this._button.parentNode.replaceChild(G,this._button);A.on(G,"change",this._handleSelect,this,true);this._button=G;break;}}});this.setAttributeConfig("disabled",{value:D.disabled||false,method:function(E){if(E){this.addClass("yui-button-disabled");this.addClass("yui-"+this.get("type")+"-button-disabled");}else{this.removeClass("yui-button-disabled");this.removeClass("yui-"+this.get("type")+"-button-disabled");}if(this.get("type")=="menu"){this._button.disabled=E;}}});this.setAttributeConfig("label",{value:D.label,method:function(E){if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0];}if(this.get("type")!
 =="push"){this._button.innerHTML=E;}}});this.setAttributeConfig("title",{value:D.title});this.setAttributeConfig("container",{value:null,writeOnce:true,method:function(E){this.appendTo(E);}});},_handleSelect:function(E){var D=A.getTarget(E);var F=D.options[D.selectedIndex].value;this.fireEvent("change",{type:"change",value:F});},getMenu:function(){return this.get("menu");},fireEvent:function(E,D){if(this.DOM_EVENTS[E]&&this.get("disabled")){return ;}YAHOO.widget.ToolbarButton.superclass.fireEvent.call(this,E,D);},toString:function(){return"ToolbarButton ("+this.get("id")+")";}});})();(function(){var B=YAHOO.util.Dom,A=YAHOO.util.Event,D=YAHOO.lang;YAHOO.widget.Toolbar=function(G,F){if(D.isObject(arguments[0])&&!B.get(G).nodeType){F=G;}var I=(F||{});var H={element:null,attributes:I};if(D.isString(G)&&B.get(G)){H.element=B.get(G);}else{if(D.isObject(G)&&B.get(G)&&B.get(G).nodeType){H.element=B.get(G);}}if(!H.element){H.element=document.createElement("DIV");H.element.id=B.gene!
 rateId();if(I.container&&B.get(I.container)){B.get(I.container!
 ).append
Child(H.element);}}if(!H.element.id){H.element.id=((D.isString(G))?G:B.generateId());}var E=document.createElement("DIV");H.attributes.cont=E;B.addClass(E,"yui-toolbar-subcont");H.element.appendChild(E);H.attributes.element=H.element;H.attributes.id=H.element.id;YAHOO.widget.Toolbar.superclass.constructor.call(this,H.element,H.attributes);};function C(H,E,I){B.addClass(this.element,"yui-toolbar-"+I.get("value")+"-menu");if(B.hasClass(I._button.parentNode.parentNode,"yui-toolbar-select")){B.addClass(this.element,"yui-toolbar-select-menu");}var F=this.getItems();for(var G=0;G<F.length;G++){B.addClass(F[G].element,"yui-toolbar-"+I.get("value")+"-"+((F[G].value)?F[G].value.replace(/ /g,"-").toLowerCase():F[G]._oText.nodeValue.replace(/ /g,"-").toLowerCase()));B.addClass(F[G].element,"yui-toolbar-"+I.get("value")+"-"+((F[G].value)?F[G].value.replace(/ /g,"-"):F[G]._oText.nodeValue.replace(/ /g,"-")));}}YAHOO.extend(YAHOO.widget.Toolbar,YAHOO.util.Element,{buttonType:YAHOO.widget.!
 ToolbarButton,dd:null,_colorData:{"#111111":"Obsidian","#2D2D2D":"Dark Gray","#434343":"Shale","#5B5B5B":"Flint","#737373":"Gray","#8B8B8B":"Concrete","#A2A2A2":"Gray","#B9B9B9":"Titanium","#000000":"Black","#D0D0D0":"Light Gray","#E6E6E6":"Silver","#FFFFFF":"White","#BFBF00":"Pumpkin","#FFFF00":"Yellow","#FFFF40":"Banana","#FFFF80":"Pale Yellow","#FFFFBF":"Butter","#525330":"Raw Siena","#898A49":"Mildew","#AEA945":"Olive","#7F7F00":"Paprika","#C3BE71":"Earth","#E0DCAA":"Khaki","#FCFAE1":"Cream","#60BF00":"Cactus","#80FF00":"Chartreuse","#A0FF40":"Green","#C0FF80":"Pale Lime","#DFFFBF":"Light Mint","#3B5738":"Green","#668F5A":"Lime Gray","#7F9757":"Yellow","#407F00":"Clover","#8A9B55":"Pistachio","#B7C296":"Light Jade","#E6EBD5":"Breakwater","#00BF00":"Spring Frost","#00FF80":"Pastel Green","#40FFA0":"Light Emerald","#80FFC0":"Sea Foam","#BFFFDF":"Sea Mist","#033D21":"Dark Forrest","#438059":"Moss","#7FA37C":"Medium Green","#007F40":"Pine","#8DAE94":"Yellow Gray Green","#AC!
 C6B5":"Aqua Lung","#DDEBE2":"Sea Vapor","#00BFBF":"Fog","#00FF!
 FF":"Cya
n","#40FFFF":"Turquoise Blue","#80FFFF":"Light Aqua","#BFFFFF":"Pale Cyan","#033D3D":"Dark Teal","#347D7E":"Gray Turquoise","#609A9F":"Green Blue","#007F7F":"Seaweed","#96BDC4":"Green Gray","#B5D1D7":"Soapstone","#E2F1F4":"Light Turquoise","#0060BF":"Summer Sky","#0080FF":"Sky Blue","#40A0FF":"Electric Blue","#80C0FF":"Light Azure","#BFDFFF":"Ice Blue","#1B2C48":"Navy","#385376":"Biscay","#57708F":"Dusty Blue","#00407F":"Sea Blue","#7792AC":"Sky Blue Gray","#A8BED1":"Morning Sky","#DEEBF6":"Vapor","#0000BF":"Deep Blue","#0000FF":"Blue","#4040FF":"Cerulean Blue","#8080FF":"Evening Blue","#BFBFFF":"Light Blue","#212143":"Deep Indigo","#373E68":"Sea Blue","#444F75":"Night Blue","#00007F":"Indigo Blue","#585E82":"Dockside","#8687A4":"Blue Gray","#D2D1E1":"Light Blue Gray","#6000BF":"Neon Violet","#8000FF":"Blue Violet","#A040FF":"Violet Purple","#C080FF":"Violet Dusk","#DFBFFF":"Pale Lavender","#302449":"Cool Shale","#54466F":"Dark Indigo","#655A7F":"Dark Violet","#40007F":"Viol!
 et","#726284":"Smoky Violet","#9E8FA9":"Slate Gray","#DCD1DF":"Violet White","#BF00BF":"Royal Violet","#FF00FF":"Fuchsia","#FF40FF":"Magenta","#FF80FF":"Orchid","#FFBFFF":"Pale Magenta","#4A234A":"Dark Purple","#794A72":"Medium Purple","#936386":"Cool Granite","#7F007F":"Purple","#9D7292":"Purple Moon","#C0A0B6":"Pale Purple","#ECDAE5":"Pink Cloud","#BF005F":"Hot Pink","#FF007F":"Deep Pink","#FF409F":"Grape","#FF80BF":"Electric Pink","#FFBFDF":"Pink","#451528":"Purple Red","#823857":"Purple Dino","#A94A76":"Purple Gray","#7F003F":"Rose","#BC6F95":"Antique Mauve","#D8A5BB":"Cool Marble","#F7DDE9":"Pink Granite","#C00000":"Apple","#FF0000":"Fire Truck","#FF4040":"Pale Red","#FF8080":"Salmon","#FFC0C0":"Warm Pink","#441415":"Sepia","#82393C":"Rust","#AA4D4E":"Brick","#800000":"Brick Red","#BC6E6E":"Mauve","#D8A3A4":"Shrimp Pink","#F8DDDD":"Shell Pink","#BF5F00":"Dark Orange","#FF7F00":"Orange","#FF9F40":"Grapefruit","#FFBF80":"Canteloupe","#FFDFBF":"Wax","#482C1B":"Dark Brick"!
 ,"#855A40":"Dirt","#B27C51":"Tan","#7F3F00":"Nutmeg","#C49B71"!
 :"Mustar
d","#E1C4A8":"Pale Tan","#FDEEE0":"Marble"},_colorPicker:null,STR_COLLAPSE:"Collapse Toolbar",STR_SPIN_LABEL:"Spin Button with value {VALUE}. Use Control Shift Up Arrow and Control Shift Down arrow keys to increase or decrease the value.",STR_SPIN_UP:"Click to increase the value of this input",STR_SPIN_DOWN:"Click to decrease the value of this input",_titlebar:null,browser:YAHOO.env.ua,_buttonList:null,_buttonGroupList:null,_sep:null,_sepCount:null,_dragHandle:null,_toolbarConfigs:{renderer:true},CLASS_CONTAINER:"yui-toolbar-container",CLASS_DRAGHANDLE:"yui-toolbar-draghandle",CLASS_SEPARATOR:"yui-toolbar-separator",CLASS_DISABLED:"yui-toolbar-disabled",CLASS_PREFIX:"yui-toolbar",init:function(F,E){YAHOO.widget.Toolbar.superclass.init.call(this,F,E);
+},initAttributes:function(E){YAHOO.widget.Toolbar.superclass.initAttributes.call(this,E);this.addClass(this.CLASS_CONTAINER);this.setAttributeConfig("buttonType",{value:E.buttonType||"basic",writeOnce:true,validator:function(F){switch(F){case"advanced":case"basic":return true;}return false;},method:function(F){if(F=="advanced"){if(YAHOO.widget.Button){this.buttonType=YAHOO.widget.ToolbarButtonAdvanced;}else{this.buttonType=YAHOO.widget.ToolbarButton;}}else{this.buttonType=YAHOO.widget.ToolbarButton;}}});this.setAttributeConfig("buttons",{value:[],writeOnce:true,method:function(G){for(var F in G){if(D.hasOwnProperty(G,F)){if(G[F].type=="separator"){this.addSeparator();}else{if(G[F].group!==undefined){this.addButtonGroup(G[F]);}else{this.addButton(G[F]);}}}}}});this.setAttributeConfig("disabled",{value:false,method:function(F){if(this.get("disabled")===F){return false;}if(F){this.addClass(this.CLASS_DISABLED);this.set("draggable",false);this.disableAllButtons();}else{this.rem!
 oveClass(this.CLASS_DISABLED);if(this._configs.draggable._initialConfig.value){this.set("draggable",true);}this.resetAllButtons();}}});this.setAttributeConfig("cont",{value:E.cont,readOnly:true});this.setAttributeConfig("grouplabels",{value:E.grouplabels||true,method:function(F){if(F){B.removeClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"));}else{B.addClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"));}}});this.setAttributeConfig("titlebar",{value:false,method:function(G){if(G){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar);}this._titlebar=document.createElement("DIV");B.addClass(this._titlebar,this.CLASS_PREFIX+"-titlebar");if(D.isString(G)){var F=document.createElement("h2");F.tabIndex="-1";F.innerHTML=G;this._titlebar.appendChild(F);}if(this.get("firstChild")){this.insertBefore(this._titlebar,this.get("firstChild"));}else{this.appendChild(this._titlebar);}if(this.get("collapse")){this.set("collaps!
 e",true);}}else{if(this._titlebar){if(this._titlebar&&this._ti!
 tlebar.p
arentNode){this._titlebar.parentNode.removeChild(this._titlebar);}}}}});this.setAttributeConfig("collapse",{value:false,method:function(H){var G=null;var F=B.getElementsByClassName("collapse","span",this._titlebar);if(H){if(F.length>0){return true;}G=document.createElement("SPAN");G.innerHTML="X";G.title=this.STR_COLLAPSE;B.addClass(G,"collapse");this._titlebar.appendChild(G);A.addListener(G,"click",function(){if(B.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false);}else{this.collapse();}},this,true);}else{G=B.getElementsByClassName("collapse","span",this._titlebar);if(G[0]){if(B.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false);}G[0].parentNode.removeChild(G[0]);}}}});this.setAttributeConfig("draggable",{value:(E.draggable||false),method:function(F){if(F&&!this.get("titlebar")){if(!this._dragHandle){this._dragHandle=document.createElement("SPAN");this._dragHandle.innerHTML="|";this._dragH!
 andle.setAttribute("title","Click to drag the toolbar");this._dragHandle.id=this.get("id")+"_draghandle";B.addClass(this._dragHandle,this.CLASS_DRAGHANDLE);if(this.get("cont").hasChildNodes()){this.get("cont").insertBefore(this._dragHandle,this.get("cont").firstChild);}else{this.get("cont").appendChild(this._dragHandle);}this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._dragHandle.id);}}else{if(this._dragHandle){this._dragHandle.parentNode.removeChild(this._dragHandle);this._dragHandle=null;this.dd=null;}}if(this._titlebar){if(F){this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._titlebar);B.addClass(this._titlebar,"draggable");}else{B.removeClass(this._titlebar,"draggable");if(this.dd){this.dd.unreg();this.dd=null;}}}},validator:function(G){var F=true;if(!YAHOO.util.DD){F=false;}return F;}});},addButtonGroup:function(I){if(!this.get("element")){this._queue[this._queue.length]=["addButtonGroup",arguments];return false;}if(!this.hasClas!
 s(this.CLASS_PREFIX+"-grouped")){this.addClass(this.CLASS_PREF!
 IX+"-gro
uped");}var J=document.createElement("DIV");B.addClass(J,this.CLASS_PREFIX+"-group");B.addClass(J,this.CLASS_PREFIX+"-group-"+I.group);if(I.label){var F=document.createElement("h3");F.innerHTML=I.label;J.appendChild(F);}if(!this.get("grouplabels")){B.addClass(this.get("cont"),this.CLASS_PREFIX,"-nogrouplabels");}this.get("cont").appendChild(J);var H=document.createElement("ul");J.appendChild(H);if(!this._buttonGroupList){this._buttonGroupList={};}this._buttonGroupList[I.group]=H;for(var G=0;G<I.buttons.length;G++){var E=document.createElement("li");E.className=this.CLASS_PREFIX+"-groupitem";H.appendChild(E);if((I.buttons[G].type!==undefined)&&I.buttons[G].type=="separator"){this.addSeparator(E);}else{I.buttons[G].container=E;this.addButton(I.buttons[G]);}}},addButtonToGroup:function(G,H,I){var F=this._buttonGroupList[H];var E=document.createElement("li");E.className=this.CLASS_PREFIX+"-groupitem";G.container=E;this.addButton(G,I);F.appendChild(E);},addButton:function(J,I){if!
 (!this.get("element")){this._queue[this._queue.length]=["addButton",arguments];return false;}if(!this._buttonList){this._buttonList=[];}if(!J.container){J.container=this.get("cont");}if((J.type=="menu")||(J.type=="split")||(J.type=="select")){if(D.isArray(J.menu)){for(var P in J.menu){if(D.hasOwnProperty(J.menu,P)){var V={fn:function(Y,W,X){if(!J.menucmd){J.menucmd=J.value;}J.value=((X.value)?X.value:X._oText.nodeValue);},scope:this};J.menu[P].onclick=V;}}}}var Q={},N=false;for(var L in J){if(D.hasOwnProperty(J,L)){if(!this._toolbarConfigs[L]){Q[L]=J[L];}}}if(J.type=="select"){Q.type="menu";}if(J.type=="spin"){Q.type="push";}if(Q.type=="color"){if(YAHOO.widget.Overlay){Q=this._makeColorButton(Q);}else{N=true;}}if(Q.menu){if((YAHOO.widget.Overlay)&&(J.menu instanceof YAHOO.widget.Overlay)){J.menu.showEvent.subscribe(function(){this._button=Q;});}else{for(var O=0;O<Q.menu.length;O++){if(!Q.menu[O].value){Q.menu[O].value=Q.menu[O].text;
+}}if(this.browser.webkit){Q.focusmenu=false;}}}if(N){J=false;}else{this._configs.buttons.value[this._configs.buttons.value.length]=J;var T=new this.buttonType(Q);if(!T.buttonType){T.buttonType="rich";T.checkValue=function(Y){var X=this.getMenu().getItems();if(X.length===0){this.getMenu()._onBeforeShow();X=this.getMenu().getItems();}for(var W=0;W<X.length;W++){X[W].cfg.setProperty("checked",false);if(X[W].value==Y){X[W].cfg.setProperty("checked",true);}}};}if(this.get("disabled")){T.set("disabled",true);}if(!J.id){J.id=T.get("id");}if(I){var F=T.get("element");var M=null;if(I.get){M=I.get("element").nextSibling;}else{if(I.nextSibling){M=I.nextSibling;}}if(M){M.parentNode.insertBefore(F,M);}}T.addClass(this.CLASS_PREFIX+"-"+T.get("value"));var S=document.createElement("span");S.className=this.CLASS_PREFIX+"-icon";T.get("element").insertBefore(S,T.get("firstChild"));if(T._button.tagName.toLowerCase()=="button"){T.get("element").setAttribute("unselectable","on");var U=document.!
 createElement("a");U.innerHTML=T._button.innerHTML;U.href="#";A.on(U,"click",function(W){A.stopEvent(W);});T._button.parentNode.replaceChild(U,T._button);T._button=U;}if(J.type=="select"){if(T._button.tagName.toLowerCase()=="select"){S.parentNode.removeChild(S);var G=T._button;var R=T.get("element");R.parentNode.replaceChild(G,R);}else{T.addClass(this.CLASS_PREFIX+"-select");}}if(J.type=="spin"){if(!D.isArray(J.range)){J.range=[10,100];}this._makeSpinButton(T,J);}T.get("element").setAttribute("title",T.get("label"));if(J.type!="spin"){if((YAHOO.widget.Overlay)&&(Q.menu instanceof YAHOO.widget.Overlay)){var H=function(Y){var W=true;if(Y.keyCode&&(Y.keyCode==9)){W=false;}if(W){this._colorPicker._button=J.value;var X=T.getMenu().element;if(B.getStyle(X,"visibility")=="hidden"){T.getMenu().show();}else{T.getMenu().hide();}}YAHOO.util.Event.stopEvent(Y);};T.on("mousedown",H,J,this);T.on("keydown",H,J,this);}else{if((J.type!="menu")&&(J.type!="select")){T.on("keypress",this._butt!
 onClick,J,this);T.on("mousedown",function(W){YAHOO.util.Event.!
 stopEven
t(W);this._buttonClick(W,J);},J,this);T.on("click",function(W){YAHOO.util.Event.stopEvent(W);});}else{T.on("mousedown",function(W){YAHOO.util.Event.stopEvent(W);});T.on("click",function(W){YAHOO.util.Event.stopEvent(W);});T.on("change",function(W){if(!J.menucmd){J.menucmd=J.value;}J.value=W.value;this._buttonClick(W,J);},this,true);var K=this;if(T.getMenu().mouseDownEvent){T.getMenu().mouseDownEvent.subscribe(function(Y,X){var W=X[1];YAHOO.util.Event.stopEvent(X[0]);T._onMenuClick(X[0],T);if(!J.menucmd){J.menucmd=J.value;}J.value=((W.value)?W.value:W._oText.nodeValue);K._buttonClick.call(K,X[1],J);T._hideMenu();return false;});T.getMenu().clickEvent.subscribe(function(X,W){YAHOO.util.Event.stopEvent(W[0]);});T.getMenu().mouseUpEvent.subscribe(function(X,W){YAHOO.util.Event.stopEvent(W[0]);});}}}}else{T.on("mousedown",function(W){YAHOO.util.Event.stopEvent(W);});T.on("click",function(W){YAHOO.util.Event.stopEvent(W);});}if(this.browser.ie){T.DOM_EVENTS.focusin=true;T.DOM_EVEN!
 TS.focusout=true;T.on("focusin",function(W){YAHOO.util.Event.stopEvent(W);},J,this);T.on("focusout",function(W){YAHOO.util.Event.stopEvent(W);},J,this);T.on("click",function(W){YAHOO.util.Event.stopEvent(W);},J,this);}if(this.browser.webkit){T.hasFocus=function(){return true;};}this._buttonList[this._buttonList.length]=T;if((J.type=="menu")||(J.type=="split")||(J.type=="select")){if(D.isArray(J.menu)){var E=T.getMenu();if(E.renderEvent){E.renderEvent.subscribe(C,T);if(J.renderer){E.renderEvent.subscribe(J.renderer,T);}}}}}return J;},addSeparator:function(E,H){if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false;}var F=((E)?E:this.get("cont"));if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false;}if(this._sepCount===null){this._sepCount=0;}if(!this._sep){this._sep=document.createElement("SPAN");B.addClass(this._sep,this.CLASS_SEPARATOR);this._sep.innerHTML="|";}var G=this._sep.cloneNode(t!
 rue);this._sepCount++;B.addClass(G,this.CLASS_SEPARATOR+"-"+th!
 is._sepC
ount);if(H){var I=null;if(H.get){I=H.get("element").nextSibling;}else{if(H.nextSibling){I=H.nextSibling;}else{I=H;}}if(I){if(I==H){I.parentNode.appendChild(G);}else{I.parentNode.insertBefore(G,I);}}}else{F.appendChild(G);}return G;},_createColorPicker:function(J){if(B.get(J+"_colors")){B.get(J+"_colors").parentNode.removeChild(B.get(J+"_colors"));}var F=document.createElement("div");F.className="yui-toolbar-colors";F.id=J+"_colors";F.style.display="none";A.on(window,"load",function(){document.body.appendChild(F);},this,true);this._colorPicker=F;var I="";for(var H in this._colorData){if(D.hasOwnProperty(this._colorData,H)){I+="<a style=\"background-color: "+H+"\" href=\"#\">"+H.replace("#","")+"</a>";}}I+="<span><em>X</em><strong></strong></span>";F.innerHTML=I;var G=F.getElementsByTagName("em")[0];var E=F.getElementsByTagName("strong")[0];A.on(F,"mouseover",function(L){var K=A.getTarget(L);if(K.tagName.toLowerCase()=="a"){G.style.backgroundColor=K.style.backgroundColor;E.inn!
 erHTML=this._colorData["#"+K.innerHTML]+"<br>"+K.innerHTML;}},this,true);A.on(F,"focus",function(K){A.stopEvent(K);});A.on(F,"click",function(K){A.stopEvent(K);});A.on(F,"mousedown",function(L){A.stopEvent(L);var K=A.getTarget(L);if(K.tagName.toLowerCase()=="a"){this.fireEvent("colorPickerClicked",{type:"colorPickerClicked",target:this,button:this._colorPicker._button,color:K.innerHTML,colorName:this._colorData["#"+K.innerHTML]});this.getButtonByValue(this._colorPicker._button).getMenu().hide();}},this,true);},_resetColorPicker:function(){var F=this._colorPicker.getElementsByTagName("em")[0];var E=this._colorPicker.getElementsByTagName("strong")[0];F.style.backgroundColor="transparent";E.innerHTML="";},_makeColorButton:function(E){if(!this._colorPicker){this._createColorPicker(this.get("id"));}E.type="color";E.menu=new YAHOO.widget.Overlay(this.get("id")+"_"+E.value+"_menu",{visible:false,position:"absolute",iframe:true});
+E.menu.setBody("");E.menu.render(this.get("cont"));B.addClass(E.menu.element,"yui-button-menu");B.addClass(E.menu.element,"yui-color-button-menu");E.menu.beforeShowEvent.subscribe(function(){E.menu.cfg.setProperty("zindex",5);E.menu.cfg.setProperty("context",[this.getButtonById(E.id).get("element"),"tl","bl"]);this._resetColorPicker();var F=this._colorPicker;if(F.parentNode){F.parentNode.removeChild(F);}E.menu.setBody("");E.menu.appendToBody(F);this._colorPicker.style.display="block";},this,true);return E;},_makeSpinButton:function(R,L){R.addClass(this.CLASS_PREFIX+"-spinbutton");var S=this,N=R._button.parentNode.parentNode,I=L.range,H=document.createElement("a"),G=document.createElement("a");H.href="#";G.href="#";H.className="up";H.title=this.STR_SPIN_UP;H.innerHTML=this.STR_SPIN_UP;G.className="down";G.title=this.STR_SPIN_DOWN;G.innerHTML=this.STR_SPIN_DOWN;N.appendChild(H);N.appendChild(G);var M=YAHOO.lang.substitute(this.STR_SPIN_LABEL,{VALUE:R.get("label")});R.set("tit!
 le",M);var Q=function(T){T=((T<I[0])?I[0]:T);T=((T>I[1])?I[1]:T);return T;};var P=this.browser;var F=false;var K=this.STR_SPIN_LABEL;if(this._titlebar&&this._titlebar.firstChild){F=this._titlebar.firstChild;}var E=function(U){YAHOO.util.Event.stopEvent(U);if(!R.get("disabled")&&(U.keyCode!=9)){var V=parseInt(R.get("label"),10);V++;V=Q(V);R.set("label",""+V);var T=YAHOO.lang.substitute(K,{VALUE:R.get("label")});R.set("title",T);if(!P.webkit&&F){}S._buttonClick(U,L);}};var O=function(U){YAHOO.util.Event.stopEvent(U);if(!R.get("disabled")&&(U.keyCode!=9)){var V=parseInt(R.get("label"),10);V--;V=Q(V);R.set("label",""+V);var T=YAHOO.lang.substitute(K,{VALUE:R.get("label")});R.set("title",T);if(!P.webkit&&F){}S._buttonClick(U,L);}};var J=function(T){if(T.keyCode==38){E(T);}else{if(T.keyCode==40){O(T);}else{if(T.keyCode==107&&T.shiftKey){E(T);}else{if(T.keyCode==109&&T.shiftKey){O(T);}}}}};R.on("keydown",J,this,true);A.on(H,"mousedown",function(T){A.stopEvent(T);},this,true);A.on(!
 G,"mousedown",function(T){A.stopEvent(T);},this,true);A.on(H,"!
 click",E
,this,true);A.on(G,"click",O,this,true);},_buttonClick:function(L,F){var E=true;if(L&&L.type=="keypress"){if(L.keyCode==9){E=false;}else{if((L.keyCode===13)||(L.keyCode===0)||(L.keyCode===32)){}else{E=false;}}}if(E){var N=true,H=false;if(F.value){H=this.fireEvent(F.value+"Click",{type:F.value+"Click",target:this.get("element"),button:F});if(H===false){N=false;}}if(F.menucmd&&N){H=this.fireEvent(F.menucmd+"Click",{type:F.menucmd+"Click",target:this.get("element"),button:F});if(H===false){N=false;}}if(N){this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:F});}if(F.type=="select"){var K=this.getButtonById(F.id);if(K.buttonType=="rich"){var J=F.value;for(var I=0;I<F.menu.length;I++){if(F.menu[I].value==F.value){J=F.menu[I].text;break;}}K.set("label","<span class=\"yui-toolbar-"+F.menucmd+"-"+(F.value).replace(/ /g,"-").toLowerCase()+"\">"+J+"</span>");var M=K.getMenu().getItems();for(var G=0;G<M.length;G++){if(M[G].value.toLowerCase()==F.value.toL!
 owerCase()){M[G].cfg.setProperty("checked",true);}else{M[G].cfg.setProperty("checked",false);}}}}}if(L){A.stopEvent(L);}},getButtonById:function(G){var E=this._buttonList.length;for(var F=0;F<E;F++){if(this._buttonList[F].get("id")==G){return this._buttonList[F];}}return false;},getButtonByValue:function(K){var H=this.get("buttons");var F=H.length;for(var I=0;I<F;I++){if(H[I].group!==undefined){for(var E=0;E<H[I].buttons.length;E++){if((H[I].buttons[E].value==K)||(H[I].buttons[E].menucmd==K)){return this.getButtonById(H[I].buttons[E].id);}if(H[I].buttons[E].menu){for(var J=0;J<H[I].buttons[E].menu.length;J++){if(H[I].buttons[E].menu[J].value==K){return this.getButtonById(H[I].buttons[E].id);}}}}}else{if((H[I].value==K)||(H[I].menucmd==K)){return this.getButtonById(H[I].id);}if(H[I].menu){for(var G=0;G<H[I].menu.length;G++){if(H[I].menu[G].value==K){return this.getButtonById(H[I].id);}}}}}return false;},getButtonByIndex:function(E){if(this._buttonList[E]){return this._button!
 List[E];}else{return false;}},getButtons:function(){return thi!
 s._butto
nList;},disableButton:function(F){var E=F;if(D.isString(F)){E=this.getButtonById(F);}if(D.isNumber(F)){E=this.getButtonByIndex(F);}if((!(E instanceof YAHOO.widget.ToolbarButton))&&(!(E instanceof YAHOO.widget.ToolbarButtonAdvanced))){E=this.getButtonByValue(F);}if((E instanceof YAHOO.widget.ToolbarButton)||(E instanceof YAHOO.widget.ToolbarButtonAdvanced)){E.set("disabled",true);}else{return false;}},enableButton:function(F){if(this.get("disabled")){return false;}var E=F;if(D.isString(F)){E=this.getButtonById(F);}if(D.isNumber(F)){E=this.getButtonByIndex(F);}if((!(E instanceof YAHOO.widget.ToolbarButton))&&(!(E instanceof YAHOO.widget.ToolbarButtonAdvanced))){E=this.getButtonByValue(F);}if((E instanceof YAHOO.widget.ToolbarButton)||(E instanceof YAHOO.widget.ToolbarButtonAdvanced)){if(E.get("disabled")){E.set("disabled",false);}}else{return false;}},selectButton:function(I,G){var F=I;if(I){if(D.isString(I)){F=this.getButtonById(I);}if(D.isNumber(I)){F=this.getButtonByIndex(I!
 );}if((!(F instanceof YAHOO.widget.ToolbarButton))&&(!(F instanceof YAHOO.widget.ToolbarButtonAdvanced))){F=this.getButtonByValue(I);}if((F instanceof YAHOO.widget.ToolbarButton)||(F instanceof YAHOO.widget.ToolbarButtonAdvanced)){F.addClass("yui-button-selected");F.addClass("yui-button-"+F.get("value")+"-selected");if(G){if(F.buttonType=="rich"){var H=F.getMenu().getItems();for(var E=0;E<H.length;E++){if(H[E].value==G){H[E].cfg.setProperty("checked",true);F.set("label","<span class=\"yui-toolbar-"+F.get("value")+"-"+(G).replace(/ /g,"-").toLowerCase()+"\">"+H[E]._oText.nodeValue+"</span>");}else{H[E].cfg.setProperty("checked",false);}}}}}else{return false;}}},deselectButton:function(F){var E=F;if(D.isString(F)){E=this.getButtonById(F);}if(D.isNumber(F)){E=this.getButtonByIndex(F);}if((!(E instanceof YAHOO.widget.ToolbarButton))&&(!(E instanceof YAHOO.widget.ToolbarButtonAdvanced))){E=this.getButtonByValue(F);
+}if((E instanceof YAHOO.widget.ToolbarButton)||(E instanceof YAHOO.widget.ToolbarButtonAdvanced)){E.removeClass("yui-button-selected");E.removeClass("yui-button-"+E.get("value")+"-selected");E.removeClass("yui-button-hover");}else{return false;}},deselectAllButtons:function(){var E=this._buttonList.length;for(var F=0;F<E;F++){this.deselectButton(this._buttonList[F]);}},disableAllButtons:function(){if(this.get("disabled")){return false;}var E=this._buttonList.length;for(var F=0;F<E;F++){this.disableButton(this._buttonList[F]);}},enableAllButtons:function(){if(this.get("disabled")){return false;}var E=this._buttonList.length;for(var F=0;F<E;F++){this.enableButton(this._buttonList[F]);}},resetAllButtons:function(I){if(!D.isObject(I)){I={};}if(this.get("disabled")){return false;}var E=this._buttonList.length;for(var F=0;F<E;F++){var H=this._buttonList[F];var G=H._configs.disabled._initialConfig.value;if(I[H.get("id")]){this.enableButton(H);this.selectButton(H);}else{if(G){this.!
 disableButton(H);}else{this.enableButton(H);}this.deselectButton(H);}}},destroyButton:function(I){var G=I;if(D.isString(I)){G=this.getButtonById(I);}if(D.isNumber(I)){G=this.getButtonByIndex(I);}if((!(G instanceof YAHOO.widget.ToolbarButton))&&(!(G instanceof YAHOO.widget.ToolbarButtonAdvanced))){G=this.getButtonByValue(I);}if((G instanceof YAHOO.widget.ToolbarButton)||(G instanceof YAHOO.widget.ToolbarButtonAdvanced)){var H=G.get("id");G.destroy();var E=this._buttonList.length;for(var F=0;F<E;F++){if(this._buttonList[F].get("id")==H){this._buttonList[F]=null;}}}else{return false;}},destroy:function(){this.get("element").innerHTML="";this.get("element").className="";for(var E in this){if(D.hasOwnProperty(this,E)){this[E]=null;}}return true;},collapse:function(F){var E=B.getElementsByClassName("collapse","span",this._titlebar);if(F===false){B.removeClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");if(E[0]){B.removeClass(E[0],"collapsed");}this.fireEvent("t!
 oolbarExpanded",{type:"toolbarExpanded",target:this});}else{if!
 (E[0]){B
.addClass(E[0],"collapsed");}B.addClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");this.fireEvent("toolbarCollapsed",{type:"toolbarCollapsed",target:this});}},toString:function(){return"Toolbar (#"+this.get("element").id+") with "+this._buttonList.length+" buttons.";}});})();(function(){var C=YAHOO.util.Dom,A=YAHOO.util.Event,D=YAHOO.lang,B=YAHOO.widget.Toolbar;YAHOO.widget.SimpleEditor=function(H,F){var J={element:null,attributes:(F||{})},L=null;if(D.isString(H)){L=H;}else{L=H.id;}J.element=H;var G=document.createElement("DIV");J.attributes.element_cont=new YAHOO.util.Element(G,{id:L+"_container"});var K=document.createElement("div");C.addClass(K,"first-child");J.attributes.element_cont.appendChild(K);if(!J.attributes.toolbar_cont){J.attributes.toolbar_cont=document.createElement("DIV");J.attributes.toolbar_cont.id=L+"_toolbar";K.appendChild(J.attributes.toolbar_cont);}var I=document.createElement("DIV");K.appendChild(I);J.attributes.editor_wrapper=I;YAH!
 OO.widget.SimpleEditor.superclass.constructor.call(this,J.element,J.attributes);};function E(F){return F.replace(/ /g,"-").toLowerCase();}YAHOO.extend(YAHOO.widget.SimpleEditor,YAHOO.util.Element,{_docType:"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">",editorDirty:false,_defaultCSS:"html { height: 95%; } body { height: 100%; padding: 7px; background-color: #fff; font:13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small; } a { color: blue; text-decoration: underline; cursor: pointer; } .warning-localfile { border-bottom: 1px dashed red !important; } .yui-busy { cursor: wait !important; } img.selected { border: 2px dotted #808080; } img { cursor: pointer !important; border: none; }",_defaultToolbar:{collapse:true,titlebar:"Text Editing Tools",draggable:false,buttons:[{group:"fontstyle",label:"Font Name and Size",buttons:[{type:"select",label:"Arial",value:"fontname",disabled:true,menu:[{text:"Arial",checke!
 d:true},{text:"Arial Black"},{text:"Comic Sans MS"},{text:"Cou!
 rier New
"},{text:"Lucida Console"},{text:"Tahoma"},{text:"Times New Roman"},{text:"Trebuchet MS"},{text:"Verdana"}]},{type:"spin",label:"13",value:"fontsize",range:[9,75],disabled:true}]},{type:"separator"},{group:"textstyle",label:"Font Style",buttons:[{type:"push",label:"Bold CTRL + SHIFT + B",value:"bold"},{type:"push",label:"Italic CTRL + SHIFT + I",value:"italic"},{type:"push",label:"Underline CTRL + SHIFT + U",value:"underline"},{type:"separator"},{type:"color",label:"Font Color",value:"forecolor",disabled:true},{type:"color",label:"Background Color",value:"backcolor",disabled:true}]},{type:"separator"},{group:"indentlist",label:"Lists",buttons:[{type:"push",label:"Create an Unordered List",value:"insertunorderedlist"},{type:"push",label:"Create an Ordered List",value:"insertorderedlist"}]},{type:"separator"},{group:"insertitem",label:"Insert Item",buttons:[{type:"push",label:"HTML Link CTRL + SHIFT + L",value:"createlink",disabled:true},{type:"push",label:"Insert Image",value!
 :"insertimage"}]}]},_lastButton:null,_baseHREF:function(){var F=document.location.href;if(F.indexOf("?")!==-1){F=F.substring(0,F.indexOf("?"));}F=F.substring(0,F.lastIndexOf("/"))+"/";return F;}(),_lastImage:null,_blankImageLoaded:false,_fixNodesTimer:null,_nodeChangeTimer:null,_lastNodeChangeEvent:null,_lastNodeChange:0,_rendered:false,DOMReady:null,_selection:null,_mask:null,_showingHiddenElements:null,currentWindow:null,currentEvent:null,operaEvent:null,currentFont:null,currentElement:[],dompath:null,beforeElement:null,afterElement:null,invalidHTML:{form:true,input:true,button:true,select:true,link:true,html:true,body:true,script:true,style:true,textarea:true},toolbar:null,_contentTimer:null,_contentTimerCounter:0,_disabled:["createlink","fontname","fontsize","forecolor","backcolor"],_alwaysDisabled:{},_alwaysEnabled:{},_semantic:{"bold":true,"italic":true,"underline":true},_tag2cmd:{"b":"bold","strong":"bold","i":"italic","em":"italic","u":"underline","sup":"superscript!
 ","sub":"subscript","img":"insertimage","a":"createlink","ul":!
 "insertu
norderedlist","ol":"insertorderedlist"},_createIframe:function(){var J=document.createElement("iframe");
+J.id=this.get("id")+"_editor";var H={border:"0",frameBorder:"0",marginWidth:"0",marginHeight:"0",leftMargin:"0",topMargin:"0",allowTransparency:"true",width:"100%"};for(var I in H){if(D.hasOwnProperty(H,I)){J.setAttribute(I,H[I]);}}var G="javascript:;";if(this.browser.ie){if(window.location.href.toLowerCase().indexOf("https")!==0){G="about:blank";}}J.setAttribute("src",G);var F=new YAHOO.util.Element(J);return F;},_isElement:function(G,F){if(G&&G.tagName&&(G.tagName.toLowerCase()==F)){return true;}if(G&&G.getAttribute&&(G.getAttribute("tag")==F)){return true;}return false;},_hasParent:function(G,F){if(!G||!G.parentNode){return false;}while(G.parentNode){if(this._isElement(G,F)){return G;}if(G.parentNode){G=G.parentNode;}else{return false;}}return false;},_getDoc:function(){var F=false;if(this.get){if(this.get("iframe")){if(this.get("iframe").get){if(this.get("iframe").get("element")){try{if(this.get("iframe").get("element").contentWindow){if(this.get("iframe").get("element"!
 ).contentWindow.document){F=this.get("iframe").get("element").contentWindow.document;return F;}}}catch(G){}}}}}return false;},_getWindow:function(){return this.get("iframe").get("element").contentWindow;},_focusWindow:function(F){if(this.browser.webkit){if(F){this._getSelection().setBaseAndExtent(this._getDoc().body.firstChild,0,this._getDoc().body.firstChild,1);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(false);}}else{this._getSelection().setBaseAndExtent(this._getDoc().body,1,this._getDoc().body,1);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(false);}}this._getWindow().focus();}else{this._getWindow().focus();}},_hasSelection:function(){var H=this._getSelection();var F=this._getRange();var G=false;if(this.browser.ie||this.browser.opera){if(F.text){G=true;}if(F.html){G=true;}}else{if(this.browser.webkit){if(H+""!==""){G=true;}}else{if(H&&(H.toString()!=="")&&(H!==u!
 ndefined)){G=true;}}}return G;},_getSelection:function(){var F!
 =null;if
(this._getDoc()&&this._getWindow()){if(this._getDoc().selection){F=this._getDoc().selection;}else{F=this._getWindow().getSelection();}if(this.browser.webkit){if(F.baseNode){this._selection={};this._selection.baseNode=F.baseNode;this._selection.baseOffset=F.baseOffset;this._selection.extentNode=F.extentNode;this._selection.extentOffset=F.extentOffset;}else{if(this._selection!==null){F=this._getWindow().getSelection();F.setBaseAndExtent(this._selection.baseNode,this._selection.baseOffset,this._selection.extentNode,this._selection.extentOffset);this._selection=null;}}}}return F;},_selectNode:function(G){if(!G){return false;}var H=this._getSelection(),F=null;if(this.browser.ie){try{F=this._getDoc().body.createTextRange();F.moveToElementText(G);F.select();}catch(I){}}else{if(this.browser.webkit){H.setBaseAndExtent(G,0,G,G.innerText.length);}else{if(this.browser.opera){H=this._getWindow().getSelection();F=this._getDoc().createRange();F.selectNode(G);H.removeAllRanges();H.addRange(!
 F);}else{F=this._getDoc().createRange();F.selectNodeContents(G);H.removeAllRanges();H.addRange(F);}}}},_getRange:function(){var F=this._getSelection();if(F===null){return null;}if(this.browser.webkit&&!F.getRangeAt){var H=this._getDoc().createRange();try{H.setStart(F.anchorNode,F.anchorOffset);H.setEnd(F.focusNode,F.focusOffset);}catch(G){H=this._getWindow().getSelection()+"";}return H;}if(this.browser.ie||this.browser.opera){return F.createRange();}if(F.rangeCount>0){return F.getRangeAt(0);}return null;},_setDesignMode:function(F){try{this._getDoc().designMode=F;}catch(G){}},_toggleDesignMode:function(){var G=this._getDoc().designMode.toLowerCase(),F="on";if(G=="on"){F="off";}this._setDesignMode(F);return F;},_initEditor:function(){if(this.browser.ie){this._getDoc().body.style.margin="0";}if(!this.get("disabled")){this._setDesignMode("on");}this.toolbar.on("buttonClick",this._handleToolbarClick,this,true);A.on(this._getDoc(),"mouseup",this._handleMouseUp,this,true);A.on(th!
 is._getDoc(),"mousedown",this._handleMouseDown,this,true);A.on!
 (this._g
etDoc(),"click",this._handleClick,this,true);A.on(this._getDoc(),"dblclick",this._handleDoubleClick,this,true);A.on(this._getDoc(),"keypress",this._handleKeyPress,this,true);A.on(this._getDoc(),"keyup",this._handleKeyUp,this,true);A.on(this._getDoc(),"keydown",this._handleKeyDown,this,true);if(!this.get("disabled")){this.toolbar.set("disabled",false);}this.fireEvent("editorContentLoaded",{type:"editorLoaded",target:this});if(this.get("dompath")){var F=this;setTimeout(function(){F._writeDomPath.call(F);},150);}this.nodeChange(true);this._setBusy(true);},_checkLoaded:function(){this._contentTimerCounter++;if(this._contentTimer){clearTimeout(this._contentTimer);}if(this._contentTimerCounter>250){return false;}var H=false;try{if(this._getDoc()&&this._getDoc().body&&(this._getDoc().body._rteLoaded===true)){H=true;}}catch(G){H=false;}if(H===true){this._initEditor();}else{var F=this;this._contentTimer=setTimeout(function(){F._checkLoaded.call(F);},20);}},_setInitialContent:function!
 (){var G=D.substitute(this.get("html"),{TITLE:this.STR_TITLE,CONTENT:this._cleanIncomingHTML(this.get("element").value),CSS:this.get("css"),HIDDEN_CSS:((this.get("hiddencss"))?this.get("hiddencss"):"/* No Hidden CSS */"),EXTRA_CSS:((this.get("extracss"))?this.get("extracss"):"/* No Extra CSS */")}),F=true;if(document.compatMode!="BackCompat"){G=this._docType+"\n"+G;}else{}if(this.browser.ie||this.browser.webkit||this.browser.opera||(navigator.userAgent.indexOf("Firefox/1.5")!=-1)){try{this._getDoc().open();this._getDoc().write(G);this._getDoc().close();}catch(H){F=false;}}else{this.get("iframe").get("element").src="data:text/html;charset=utf-8,"+encodeURIComponent(G);}if(F){this._checkLoaded();}},_setMarkupType:function(F){switch(this.get("markup")){case"css":this._setEditorStyle(true);break;case"default":this._setEditorStyle(false);break;case"semantic":case"xhtml":if(this._semantic[F]){this._setEditorStyle(false);
+}else{this._setEditorStyle(true);}break;}},_setEditorStyle:function(G){try{this._getDoc().execCommand("useCSS",false,!G);}catch(F){}},_getSelectedElement:function(){var I=this._getDoc(),F=null,G=null,J=null;if(this.browser.ie){this.currentEvent=this._getWindow().event;F=this._getRange();if(F){J=F.item?F.item(0):F.parentElement();if(J==I.body){J=null;}}if((this.currentEvent!==null)&&(this.currentEvent.keyCode===0)){J=A.getTarget(this.currentEvent);}}else{G=this._getSelection();F=this._getRange();if(!G||!F){return null;}if(!this._hasSelection()){if(G.anchorNode&&(G.anchorNode.nodeType==3)){if(G.anchorNode.parentNode){J=G.anchorNode.parentNode;}if(G.anchorNode.nextSibling!=G.focusNode.nextSibling){J=G.anchorNode.nextSibling;}}if(this._isElement(J,"br")){J=null;}if(!J){J=F.commonAncestorContainer;if(!F.collapsed){if(F.startContainer==F.endContainer){if(F.startOffset-F.endOffset<2){if(F.startContainer.hasChildNodes()){J=F.startContainer.childNodes[F.startOffset];}}}}}}}if(this.c!
 urrentEvent!==null){try{switch(this.currentEvent.type){case"click":case"mousedown":case"mouseup":J=A.getTarget(this.currentEvent);break;default:break;}}catch(H){}}else{if(this.currentElement&&this.currentElement[0]){J=this.currentElement[0];}}if(this.browser.opera||this.browser.webkit){if(this.currentEvent&&!J){J=YAHOO.util.Event.getTarget(this.currentEvent);}}if(!J||!J.tagName){J=I.body;}if(this._isElement(J,"html")){J=I.body;}if(this._isElement(J,"body")){J=I.body;}if(J&&!J.parentNode){J=I.body;}if(J===undefined){J=null;}return J;},_getDomPath:function(F){if(!F){F=this._getSelectedElement();}var G=[];while(F!==null){if(F.ownerDocument!=this._getDoc()){F=null;break;}if(F.nodeName&&F.nodeType&&(F.nodeType==1)){G[G.length]=F;}if(this._isElement(F,"body")){break;}F=F.parentNode;}if(G.length===0){if(this._getDoc()&&this._getDoc().body){G[0]=this._getDoc().body;}}return G.reverse();},_writeDomPath:function(){var L=this._getDomPath(),J=[],H="",M="";for(var F=0;F<L.length;F++){va!
 r N=L[F].tagName.toLowerCase();if((N=="ol")&&(L[F].type)){N+="!
 :"+L[F].
type;}if(C.hasClass(L[F],"yui-tag")){N=L[F].getAttribute("tag");}if((this.get("markup")=="semantic")||(this.get("markup")=="xhtml")){switch(N){case"b":N="strong";break;case"i":N="em";break;}}if(!C.hasClass(L[F],"yui-non")){if(C.hasClass(L[F],"yui-tag")){M=N;}else{H=((L[F].className!=="")?"."+L[F].className.replace(/ /g,"."):"");if((H.indexOf("yui")!=-1)||(H.toLowerCase().indexOf("apple-style-span")!=-1)){H="";}M=N+((L[F].id)?"#"+L[F].id:"")+H;}switch(N){case"a":if(L[F].getAttribute("href",2)){M+=":"+L[F].getAttribute("href",2).replace("mailto:","").replace("http://","").replace("https://","");}break;case"img":var G=L[F].height;var K=L[F].width;if(L[F].style.height){G=parseInt(L[F].style.height,10);}if(L[F].style.width){K=parseInt(L[F].style.width,10);}M+="("+G+"x"+K+")";break;}if(M.length>10){M="<span title=\""+M+"\">"+M.substring(0,10)+"...</span>";}else{M="<span title=\""+M+"\">"+M+"</span>";}J[J.length]=M;}}var I=J.join(" "+this.SEP_DOMPATH+" ");if(this.dompath.innerHTML!!
 =I){this.dompath.innerHTML=I;}},_fixNodes:function(){var K=this._getDoc(),I=[];for(var F in this.invalidHTML){if(YAHOO.lang.hasOwnProperty(this.invalidHTML,F)){if(F.toLowerCase()!="span"){var G=K.body.getElementsByTagName(F);if(G.length){for(var H=0;H<G.length;H++){I.push(G[H]);}}}}}for(var J=0;J<I.length;J++){if(I[J].parentNode){if(D.isObject(this.invalidHTML[I[J].tagName.toLowerCase()])&&this.invalidHTML[I[J].tagName.toLowerCase()].keepContents){this._swapEl(I[J],"span",function(M){M.className="yui-non";});}else{I[J].parentNode.removeChild(I[J]);}}}var L=this._getDoc().getElementsByTagName("img");C.addClass(L,"yui-img");},_isNonEditable:function(H){if(this.get("allowNoEdit")){var G=A.getTarget(H);if(this._isElement(G,"html")){G=null;}var J=this._getDomPath(G);for(var F=(J.length-1);F>-1;F--){if(C.hasClass(J[F],this.CLASS_NOEDIT)){try{this._getDoc().execCommand("enableObjectResizing",false,"false");}catch(I){}this.nodeChange();A.stopEvent(H);return true;}}try{this._getDoc(!
 ).execCommand("enableObjectResizing",false,"true");}catch(I){}!
 }return 
false;},_setCurrentEvent:function(F){this.currentEvent=F;},_handleClick:function(G){if(this._isNonEditable(G)){return false;}this._setCurrentEvent(G);if(this.currentWindow){this.closeWindow();}if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}if(this.browser.webkit){var F=A.getTarget(G);if(this._isElement(F,"a")||this._isElement(F.parentNode,"a")){A.stopEvent(G);this.nodeChange();}}else{this.nodeChange();}},_handleMouseUp:function(G){if(this._isNonEditable(G)){return false;}var F=this;if(this.browser.opera){var H=A.getTarget(G);if(this._isElement(H,"img")){this.nodeChange();if(this.operaEvent){clearTimeout(this.operaEvent);this.operaEvent=null;this._handleDoubleClick(G);}else{this.operaEvent=window.setTimeout(function(){F.operaEvent=false;},700);}}}if(this.browser.webkit||this.browser.opera){if(this.browser.webkit){A.stopEvent(G);}}this.nodeChange();this.fi!
 reEvent("editorMouseUp",{type:"editorMouseUp",target:this,ev:G});},_handleMouseDown:function(F){if(this._isNonEditable(F)){return false;}this._setCurrentEvent(F);var G=A.getTarget(F);if(this.browser.webkit&&this._hasSelection()){var H=this._getSelection();if(!this.browser.webkit3){H.collapse(true);}else{H.collapseToStart();}}if(this.browser.webkit&&this._lastImage){C.removeClass(this._lastImage,"selected");this._lastImage=null;}if(this._isElement(G,"img")||this._isElement(G,"a")){if(this.browser.webkit){A.stopEvent(F);if(this._isElement(G,"img")){C.addClass(G,"selected");this._lastImage=G;}}this.nodeChange();}this.fireEvent("editorMouseDown",{type:"editorMouseDown",target:this,ev:F});},_handleDoubleClick:function(F){if(this._isNonEditable(F)){return false;}this._setCurrentEvent(F);var G=A.getTarget(F);if(this._isElement(G,"img")){this.currentElement[0]=G;this.toolbar.fireEvent("insertimageClick",{type:"insertimageClick",target:this.toolbar});
+this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});}else{if(this._hasParent(G,"a")){this.currentElement[0]=this._hasParent(G,"a");this.toolbar.fireEvent("createlinkClick",{type:"createlinkClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});}}this.nodeChange();this.editorDirty=false;this.fireEvent("editorDoubleClick",{type:"editorDoubleClick",target:this,ev:F});},_handleKeyUp:function(G){if(this._isNonEditable(G)){return false;}this._setCurrentEvent(G);switch(G.keyCode){case 37:case 38:case 39:case 40:case 46:case 8:case 87:if((G.keyCode==87)&&this.currentWindow&&G.shiftKey&&G.ctrlKey){this.closeWindow();}else{if(!this.browser.ie){if(this._nodeChangeTimer){clearTimeout(this._nodeChangeTimer);}var F=this;this._nodeChangeTimer=setTimeout(function(){F._nodeChangeTimer=null;F.nodeChange.call(F);},100);}else{this.nodeChange();}this.editorDirty=true;}break;}this.fireEvent("editorKeyUp",{type:"editorKeyUp",targ!
 et:this,ev:G});},_handleKeyPress:function(F){if(this.get("allowNoEdit")){if(F&&F.keyCode&&((F.keyCode==46)||F.keyCode==63272)){A.stopEvent(F);}}if(this._isNonEditable(F)){return false;}this._setCurrentEvent(F);if(this.browser.webkit){if(!this.browser.webkit3){if(F.keyCode&&(F.keyCode==122)&&(F.metaKey)){if(this._hasParent(this._getSelectedElement(),"li")){A.stopEvent(F);}}}this._listFix(F);}this.fireEvent("editorKeyPress",{type:"editorKeyPress",target:this,ev:F});},_listFix:function(L){var O=null,J=null,F=false,H=null;if(this.browser.webkit){if(L.keyCode&&(L.keyCode==13)){if(this._hasParent(this._getSelectedElement(),"li")){var I=this._hasParent(this._getSelectedElement(),"li");var N=this._getDoc().createElement("li");N.innerHTML="<span class=\"yui-non\"> </span> ";if(I.nextSibling){I.parentNode.insertBefore(N,I.nextSibling);}else{I.parentNode.appendChild(N);}this.currentElement[0]=N;this._selectNode(N.firstChild);if(!this.browser.webkit3){I.parentNode.style.displ!
 ay="list-item";setTimeout(function(){I.parentNode.style.displa!
 y="block
";},1);}A.stopEvent(L);}}}if(L.keyCode&&((!this.browser.webkit3&&(L.keyCode==25))||((this.browser.webkit3||!this.browser.webkit)&&((L.keyCode==9)&&L.shiftKey)))){O=this._getSelectedElement();if(this._hasParent(O,"li")){O=this._hasParent(O,"li");if(this._hasParent(O,"ul")||this._hasParent(O,"ol")){J=this._hasParent(O,"ul");if(!J){J=this._hasParent(O,"ol");}if(this._isElement(J.previousSibling,"li")){J.removeChild(O);J.parentNode.insertBefore(O,J.nextSibling);if(this.browser.ie){H=this._getDoc().body.createTextRange();H.moveToElementText(O);H.collapse(false);H.select();}if(this.browser.webkit){if(!this.browser.webkit3){J.style.display="list-item";J.parentNode.style.display="list-item";setTimeout(function(){J.style.display="block";J.parentNode.style.display="block";},1);}}A.stopEvent(L);}}}}if(L.keyCode&&((L.keyCode==9)&&(!L.shiftKey))){var G=this._getSelectedElement();if(this._hasParent(G,"li")){F=this._hasParent(G,"li").innerHTML;}if(this.browser.webkit){this._getDoc().execCo!
 mmand("inserttext",false,"\t");}O=this._getSelectedElement();if(this._hasParent(O,"li")){J=this._hasParent(O,"li");var K=this._getDoc().createElement(J.parentNode.tagName.toLowerCase());if(this.browser.webkit){var M=C.getElementsByClassName("Apple-tab-span","span",J);if(M[0]){J.removeChild(M[0]);J.innerHTML=D.trim(J.innerHTML);if(F){J.innerHTML="<span class=\"yui-non\">"+F+"</span> ";}else{J.innerHTML="<span class=\"yui-non\"> </span> ";}}}else{if(F){J.innerHTML=F+" ";}else{J.innerHTML=" ";}}J.parentNode.replaceChild(K,J);K.appendChild(J);if(this.browser.webkit){this._getSelection().setBaseAndExtent(J.firstChild,1,J.firstChild,J.firstChild.innerText.length);if(!this.browser.webkit3){J.parentNode.parentNode.style.display="list-item";setTimeout(function(){J.parentNode.parentNode.style.display="block";},1);}}else{if(this.browser.ie){H=this._getDoc().body.createTextRange();H.moveToElementText(J);H.collapse(false);H.select();}else{this._selectNode(J);}}A!
 .stopEvent(L);}if(this.browser.webkit){A.stopEvent(L);}this.no!
 deChange
();}},_handleKeyDown:function(J){if(this._isNonEditable(J)){return false;}this._setCurrentEvent(J);if(this.currentWindow){this.closeWindow();}if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}var I=false,K=null,H=false;if(J.shiftKey&&J.ctrlKey){I=true;}switch(J.keyCode){case 84:if(J.shiftKey&&J.ctrlKey){this.toolbar._titlebar.firstChild.focus();A.stopEvent(J);I=false;}break;case 27:if(J.shiftKey){this.afterElement.focus();A.stopEvent(J);H=false;}break;case 76:if(this._hasSelection()){if(J.shiftKey&&J.ctrlKey){var G=true;if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("createlink")){G=false;}}if(G){this.execCommand("createlink","");this.toolbar.fireEvent("createlinkClick",{type:"createlinkClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});I=false;}}}break;case 65:if(J.metaKey&&this.browser.we!
 bkit){A.stopEvent(J);this._getSelection().setBaseAndExtent(this._getDoc().body,1,this._getDoc().body,this._getDoc().body.innerHTML.length);}break;case 66:K="bold";break;case 73:K="italic";break;case 85:K="underline";break;case 13:if(this.browser.ie){var L=this._getRange();var F=this._getSelectedElement();if(!this._isElement(F,"li")){if(L){L.pasteHTML("<br>");L.collapse(false);L.select();}A.stopEvent(J);}}}if(this.browser.ie){this._listFix(J);}if(I&&K){this.execCommand(K,null);A.stopEvent(J);this.nodeChange();}this.fireEvent("editorKeyDown",{type:"editorKeyDown",target:this,ev:J});},nodeChange:function(G){var H=parseInt(this.get("nodeChangeThreshold"),10);var N=Math.round(new Date().getTime()/1000);if(G===true){this._lastNodeChange=0;}if((this._lastNodeChange+H)<N){var Q=this;if(this._fixNodesTimer===null){this._fixNodesTimer=window.setTimeout(function(){Q._fixNodes.call(Q);Q._fixNodesTimer=null;},0);}}this._lastNodeChange=N;
+if(this.currentEvent){this._lastNodeChangeEvent=this.currentEvent.type;}var Y=this.fireEvent("beforeNodeChange",{type:"beforeNodeChange",target:this});if(Y===false){return false;}if(this.get("dompath")){this._writeDomPath();}if(!this.get("disabled")){if(this.STOP_NODE_CHANGE){this.STOP_NODE_CHANGE=false;return false;}else{var S=this._getSelection(),P=this._getRange(),F=this._getSelectedElement(),L=this.toolbar.getButtonByValue("fontname"),K=this.toolbar.getButtonByValue("fontsize");if(G!==true){this.editorDirty=true;}var M={};if(this._lastButton){M[this._lastButton.id]=true;}if(!this._isElement(F,"body")){if(L){M[L.get("id")]=true;}if(K){M[K.get("id")]=true;}}this.toolbar.resetAllButtons(M);for(var Z=0;Z<this._disabled.length;Z++){var O=this.toolbar.getButtonByValue(this._disabled[Z]);if(O&&O.get){if(this._lastButton&&(O.get("id")===this._lastButton.id)){}else{if(!this._hasSelection()){switch(this._disabled[Z]){case"fontname":case"fontsize":break;default:this.toolbar.disabl!
 eButton(O);}}else{if(!this._alwaysDisabled[this._disabled[Z]]){this.toolbar.enableButton(O);}}if(!this._alwaysEnabled[this._disabled[Z]]){this.toolbar.deselectButton(O);}}}}var R=this._getDomPath();var a=null,V=null;for(var W=0;W<R.length;W++){a=R[W].tagName.toLowerCase();if(R[W].getAttribute("tag")){a=R[W].getAttribute("tag").toLowerCase();}V=this._tag2cmd[a];if(V===undefined){V=[];}if(!D.isArray(V)){V=[V];}if(R[W].style.fontWeight.toLowerCase()=="bold"){V[V.length]="bold";}if(R[W].style.fontStyle.toLowerCase()=="italic"){V[V.length]="italic";}if(R[W].style.textDecoration.toLowerCase()=="underline"){V[V.length]="underline";}if(V.length>0){for(var U=0;U<V.length;U++){this.toolbar.selectButton(V[U]);this.toolbar.enableButton(V[U]);}}switch(R[W].style.textAlign.toLowerCase()){case"left":case"right":case"center":case"justify":var T=R[W].style.textAlign.toLowerCase();if(R[W].style.textAlign.toLowerCase()=="justify"){T="full";}this.toolbar.selectButton("justify"+T);this.toolbar.!
 enableButton("justify"+T);break;}}if(L){var X=L._configs.label!
 ._initia
lConfig.value;L.set("label","<span class=\"yui-toolbar-fontname-"+E(X)+"\">"+X+"</span>");this._updateMenuChecked("fontname",X);}if(K){K.set("label",K._configs.label._initialConfig.value);}var J=this.toolbar.getButtonByValue("heading");if(J){J.set("label",J._configs.label._initialConfig.value);this._updateMenuChecked("heading","none");}var I=this.toolbar.getButtonByValue("insertimage");if(I&&this.currentWindow&&(this.currentWindow.name=="insertimage")){this.toolbar.disableButton(I);}}}this.fireEvent("afterNodeChange",{type:"afterNodeChange",target:this});},_updateMenuChecked:function(F,G,I){if(!I){I=this.toolbar;}var H=I.getButtonByValue(F);H.checkValue(G);},_handleToolbarClick:function(G){var I="";var J="";var H=G.button.value;if(G.button.menucmd){I=H;H=G.button.menucmd;}this._lastButton=G.button;if(this.STOP_EXEC_COMMAND){this.STOP_EXEC_COMMAND=false;return false;}else{this.execCommand(H,I);if(!this.browser.webkit){var F=this;setTimeout(function(){F._focusWindow.call(F);},!
 5);}}A.stopEvent(G);},_setupAfterElement:function(){if(!this.afterElement){this.afterElement=document.createElement("h2");this.afterElement.className="yui-editor-skipheader";this.afterElement.tabIndex="-1";this.afterElement.innerHTML=this.STR_LEAVE_EDITOR;this.get("element_cont").get("firstChild").appendChild(this.afterElement);}},_disableEditor:function(G){if(G){if(!this._mask){this._setDesignMode("off");if(this.toolbar){this.toolbar.set("disabled",true);}this._mask=document.createElement("DIV");C.setStyle(this._mask,"height","100%");C.setStyle(this._mask,"width","100%");C.setStyle(this._mask,"position","absolute");C.setStyle(this._mask,"top","0");C.setStyle(this._mask,"left","0");C.setStyle(this._mask,"opacity",".5");C.addClass(this._mask,"yui-editor-masked");this.get("iframe").get("parentNode").appendChild(this._mask);}}else{if(this._mask){this._mask.parentNode.removeChild(this._mask);this._mask=null;if(this.toolbar){this.toolbar.set("disabled",false);}this._setDesignMod!
 e("on");this._focusWindow();var F=this;window.setTimeout(funct!
 ion(){F.
nodeChange.call(F);},100);}}},EDITOR_PANEL_ID:"yui-editor-panel",SEP_DOMPATH:"<",STR_LEAVE_EDITOR:"You have left the Rich Text Editor.",STR_BEFORE_EDITOR:"This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Control + Shift + T to place focus on the toolbar and navigate between option heading names. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift L adds an HTML link</li> <li>To exit this text editor use the keyboard shortcut Control + Shift + ESC.</li></ul>",STR_TITLE:"Rich Text Area.",STR_IMAGE_HERE:"Image Url Here",STR_LINK_URL:"Link URL",STOP_EXEC_COMMAND:false,STOP_NODE_CHANGE:false,CLASS_NOEDIT:"yui-noedit",CLASS_CONTAINER:"yui-editor-container",CLASS_EDITABLE:"yui-editor-editable",CLASS_EDITABLE_CONT:"yui-editor-editable-container",CLASS_PREFIX:"yui-edit!
 or",browser:function(){var F=YAHOO.env.ua;if(F.webkit>420){F.webkit3=F.webkit;}else{F.webkit3=0;}return F;}(),init:function(G,F){YAHOO.widget.SimpleEditor.superclass.init.call(this,G,F);YAHOO.widget.EditorInfo._instances[this.get("id")]=this;this.on("contentReady",function(){this.DOMReady=true;this.fireQueue();},this,true);},initAttributes:function(F){YAHOO.widget.SimpleEditor.superclass.initAttributes.call(this,F);var G=this;this.setAttributeConfig("iframe",{value:null});this.setAttributeConfig("textarea",{value:null,writeOnce:true});this.setAttributeConfig("nodeChangeThreshold",{value:F.nodeChangeThreshold||3,validator:YAHOO.lang.isNumber});this.setAttributeConfig("allowNoEdit",{value:F.allowNoEdit||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("limitCommands",{value:F.limitCommands||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("element_cont",{value:F.element_cont});this.setAttributeConfig("editor_wrapper",{value:F.editor_wrapper||null,w!
 riteOnce:true});
+this.setAttributeConfig("height",{value:F.height||C.getStyle(G.get("element"),"height"),method:function(H){if(this._rendered){if(this.get("animate")){var I=new YAHOO.util.Anim(this.get("iframe").get("parentNode"),{height:{to:parseInt(H,10)}},0.5);I.animate();}else{C.setStyle(this.get("iframe").get("parentNode"),"height",H);}}}});this.setAttributeConfig("width",{value:F.width||C.getStyle(this.get("element"),"width"),method:function(H){if(this._rendered){if(this.get("animate")){var I=new YAHOO.util.Anim(this.get("element_cont").get("element"),{width:{to:parseInt(H,10)}},0.5);I.animate();}else{this.get("element_cont").setStyle("width",H);}}}});this.setAttributeConfig("blankimage",{value:F.blankimage||this._getBlankImage()});this.setAttributeConfig("css",{value:F.css||this._defaultCSS,writeOnce:true});this.setAttributeConfig("html",{value:F.html||"<html><head><title>{TITLE}</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" /><base href=\""+this._base!
 HREF+"\"><style>{CSS}</style><style>{HIDDEN_CSS}</style><style>{EXTRA_CSS}</style></head><body onload=\"document.body._rteLoaded = true;\">{CONTENT}</body></html>",writeOnce:true});this.setAttributeConfig("extracss",{value:F.css||"",writeOnce:true});this.setAttributeConfig("handleSubmit",{value:false,writeOnce:true,method:function(H){if(H){var J=this.get("element");if(J.form){var I=function(K){A.stopEvent(K);this.saveHTML();window.setTimeout(function(){YAHOO.util.Event.removeListener(J.form,"submit",I);J.form.submit();},200);};A.on(J.form,"submit",I,this,true);}}}});this.setAttributeConfig("disabled",{value:false,method:function(H){if(this._rendered){this._disableEditor(H);}}});this.setAttributeConfig("toolbar_cont",{value:null,writeOnce:true});this.setAttributeConfig("toolbar",{value:F.toolbar||this._defaultToolbar,writeOnce:true,method:function(H){if(!H.buttonType){H.buttonType=this._defaultToolbar.buttonType;}this._defaultToolbar=H;}});this.setAttributeConfig("animate",{!
 value:((F.animate)?((YAHOO.util.Anim)?true:false):false),valid!
 ator:fun
ction(I){var H=true;if(!YAHOO.util.Anim){H=false;}return H;}});this.setAttributeConfig("panel",{value:null,writeOnce:true,validator:function(I){var H=true;if(!YAHOO.widget.Overlay){H=false;}return H;}});this.setAttributeConfig("focusAtStart",{value:F.focusAtStart||false,writeOnce:true,method:function(){this.on("editorContentLoaded",function(){var H=this;setTimeout(function(){H._focusWindow.call(H,true);H.editorDirty=false;},400);},this,true);}});this.setAttributeConfig("dompath",{value:F.dompath||false,method:function(H){if(H&&!this.dompath){this.dompath=document.createElement("DIV");this.dompath.id=this.get("id")+"_dompath";C.addClass(this.dompath,"dompath");this.get("element_cont").get("firstChild").appendChild(this.dompath);if(this.get("iframe")){this._writeDomPath();}}else{if(!H&&this.dompath){this.dompath.parentNode.removeChild(this.dompath);this.dompath=null;}}this._setupAfterElement();}});this.setAttributeConfig("markup",{value:F.markup||"semantic",validator:function(!
 H){switch(H.toLowerCase()){case"semantic":case"css":case"default":case"xhtml":return true;}return false;}});this.setAttributeConfig("removeLineBreaks",{value:F.removeLineBreaks||false,validator:YAHOO.lang.isBoolean});this.on("afterRender",function(){this._renderPanel();});},_getBlankImage:function(){if(!this.DOMReady){this._queue[this._queue.length]=["_getBlankImage",arguments];return"";}var F="";if(!this._blankImageLoaded){var G=document.createElement("div");G.style.position="absolute";G.style.top="-9999px";G.style.left="-9999px";G.className=this.CLASS_PREFIX+"-blankimage";document.body.appendChild(G);F=YAHOO.util.Dom.getStyle(G,"background-image");F=F.replace("url(","").replace(")","").replace(/"/g,"");this.set("blankimage",F);this._blankImageLoaded=true;}else{F=this.get("blankimage");}return F;},_handleFontSize:function(H){var F=this.toolbar.getButtonById(H.button.id);var G=F.get("label")+"px";this.execCommand("fontsize",G);this.STOP_EXEC_COMMAND=true;},_handleColorPicke!
 r:function(H){var G=H.button;var F="#"+H.color;if((G=="forecol!
 or")||(G
=="backcolor")){this.execCommand(G,F);}},_handleAlign:function(I){var H=null;for(var F=0;F<I.button.menu.length;F++){if(I.button.menu[F].value==I.button.value){H=I.button.menu[F].value;}}var G=this._getSelection();this.execCommand(H,G);this.STOP_EXEC_COMMAND=true;},_handleAfterNodeChange:function(){var R=this._getDomPath(),M=null,I=null,N=null,G=false;var K=this.toolbar.getButtonByValue("fontname");var L=this.toolbar.getButtonByValue("fontsize");var F=this.toolbar.getButtonByValue("heading");for(var H=0;H<R.length;H++){M=R[H];var Q=M.tagName.toLowerCase();if(M.getAttribute("tag")){Q=M.getAttribute("tag");}I=M.getAttribute("face");if(C.getStyle(M,"font-family")){I=C.getStyle(M,"font-family");}if(Q.substring(0,1)=="h"){if(F){for(var J=0;J<F._configs.menu.value.length;J++){if(F._configs.menu.value[J].value.toLowerCase()==Q){F.set("label",F._configs.menu.value[J].text);}}this._updateMenuChecked("heading",Q);}}}if(K){for(var P=0;P<K._configs.menu.value.length;P++){if(I&&K._config!
 s.menu.value[P].text.toLowerCase()==I.toLowerCase()){G=true;I=K._configs.menu.value[P].text;}}if(!G){I=K._configs.label._initialConfig.value;}var O="<span class=\"yui-toolbar-fontname-"+E(I)+"\">"+I+"</span>";if(K.get("label")!=O){K.set("label",O);this._updateMenuChecked("fontname",I);}}if(L){N=parseInt(C.getStyle(M,"fontSize"),10);if((N===null)||isNaN(N)){N=L._configs.label._initialConfig.value;}L.set("label",""+N);}if(!this._isElement(M,"body")&&!this._isElement(M,"img")){this.toolbar.enableButton(K);this.toolbar.enableButton(L);this.toolbar.enableButton("forecolor");this.toolbar.enableButton("backcolor");}if(this._isElement(M,"img")){if(YAHOO.widget.Overlay){this.toolbar.enableButton("createlink");}}if(this._isElement(M,"blockquote")){this.toolbar.selectButton("indent");this.toolbar.disableButton("indent");this.toolbar.enableButton("outdent");}if(this._hasParent(M,"ol")||this._hasParent(M,"ul")){this.toolbar.disableButton("indent");
+}this._lastButton=null;},_setBusy:function(F){if(F){C.removeClass(document.body,"yui-busy");C.removeClass(this._getDoc().body,"yui-busy");}else{C.addClass(document.body,"yui-busy");C.addClass(this._getDoc().body,"yui-busy");}},_handleInsertImageClick:function(){if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("insertimage")){return false;}}this.toolbar.set("disabled",true);this.on("afterExecCommand",function(){var F=this.currentElement[0],H="http://";if(!F){F=this._getSelectedElement();}if(F){if(F.getAttribute("src")){H=F.getAttribute("src",2);if(H.indexOf(this.get("blankimage"))!=-1){H=this.STR_IMAGE_HERE;}}}var G=prompt(this.STR_LINK_URL+": ",H);if((G!=="")&&(G!==null)){F.setAttribute("src",G);}else{if(G!==null){F.parentNode.removeChild(F);this.currentElement=[];}}this.closeWindow();this.toolbar.set("disabled",false);},this,true);},_handleInsertImageWindowClose:function(){this.nodeChange();},_isLocalFile:function(F){if((F!=="")&&((F.indexOf("file:/")!=-1)||!
 (F.indexOf(":\\")!=-1))){return true;}return false;},_handleCreateLinkClick:function(){if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("createlink")){return false;}}this.toolbar.set("disabled",true);this.on("afterExecCommand",function(){var H=this.currentElement[0],G="";if(H){if(H.getAttribute("href",2)!==null){G=H.getAttribute("href",2);}}var J=prompt(this.STR_LINK_URL+": ",G);if((J!=="")&&(J!==null)){var I=J;if((I.indexOf("://")==-1)&&(I.substring(0,1)!="/")&&(I.substring(0,6).toLowerCase()!="mailto")){if((I.indexOf("@")!=-1)&&(I.substring(0,6).toLowerCase()!="mailto")){I="mailto:"+I;}else{if(I.substring(0,1)!="#"){I="http://"+I;}}}H.setAttribute("href",I);}else{if(J!==null){var F=this._getDoc().createElement("span");F.innerHTML=H.innerHTML;C.addClass(F,"yui-non");H.parentNode.replaceChild(F,H);}}this.closeWindow();this.toolbar.set("disabled",false);});},_handleCreateLinkWindowClose:function(){this.nodeChange();this.currentElement=[];},render:function(){if!
 (this._rendered){return false;}if(!this.DOMReady){this._queue[!
 this._qu
eue.length]=["render",arguments];return false;}this._setBusy();this._rendered=true;var F=this;this.set("textarea",this.get("element"));this.get("element_cont").setStyle("display","none");this.get("element_cont").addClass(this.CLASS_CONTAINER);this.set("iframe",this._createIframe());window.setTimeout(function(){F._setInitialContent.call(F);},10);this.get("editor_wrapper").appendChild(this.get("iframe").get("element"));if(this.get("disabled")){this._disableEditor(true);}var G=this.get("toolbar");if(G instanceof B){this.toolbar=G;this.toolbar.set("disabled",true);}else{G.disabled=true;this.toolbar=new B(this.get("toolbar_cont"),G);}this.fireEvent("toolbarLoaded",{type:"toolbarLoaded",target:this.toolbar});this.toolbar.on("toolbarCollapsed",function(){if(this.currentWindow){this.moveWindow();}},this,true);this.toolbar.on("toolbarExpanded",function(){if(this.currentWindow){this.moveWindow();}},this,true);this.toolbar.on("fontsizeClick",function(H){this._handleFontSize(H);},this,t!
 rue);this.toolbar.on("colorPickerClicked",function(H){this._handleColorPicker(H);},this,true);this.toolbar.on("alignClick",function(H){this._handleAlign(H);},this,true);this.on("afterNodeChange",function(){this._handleAfterNodeChange();},this,true);this.toolbar.on("insertimageClick",function(){this._handleInsertImageClick();},this,true);this.on("windowinsertimageClose",function(){this._handleInsertImageWindowClose();},this,true);this.toolbar.on("createlinkClick",function(){this._handleCreateLinkClick();},this,true);this.on("windowcreatelinkClose",function(){this._handleCreateLinkWindowClose();},this,true);this.get("parentNode").replaceChild(this.get("element_cont").get("element"),this.get("element"));if(!this.beforeElement){this.beforeElement=document.createElement("h2");this.beforeElement.className="yui-editor-skipheader";this.beforeElement.tabIndex="-1";this.beforeElement.innerHTML=this.STR_BEFORE_EDITOR;this.get("element_cont").get("firstChild").insertBefore(this.beforeE!
 lement,this.toolbar.get("nextSibling"));}this.setStyle("visibi!
 lity","h
idden");this.setStyle("position","absolute");this.setStyle("top","-9999px");this.setStyle("left","-9999px");this.get("element_cont").appendChild(this.get("element"));this.get("element_cont").setStyle("display","block");C.addClass(this.get("iframe").get("parentNode"),this.CLASS_EDITABLE_CONT);this.get("iframe").addClass(this.CLASS_EDITABLE);this.get("element_cont").setStyle("width",this.get("width"));C.setStyle(this.get("iframe").get("parentNode"),"height",this.get("height"));this.get("iframe").setStyle("width","100%");this.get("iframe").setStyle("height","100%");if(this.browser.ie==7){}this.fireEvent("afterRender",{type:"afterRender",target:this});},execCommand:function(H,G){var K=this.fireEvent("beforeExecCommand",{type:"beforeExecCommand",target:this,args:arguments});if((K===false)||(this.STOP_EXEC_COMMAND)){this.STOP_EXEC_COMMAND=false;return false;}this._setMarkupType(H);if(this.browser.ie){this._getWindow().focus();}var F=true;if(this.get("limitCommands")){if(!this.tool!
 bar.getButtonByValue(H)){F=false;}}this.editorDirty=true;if((typeof this["cmd_"+H.toLowerCase()]=="function")&&F){var J=this["cmd_"+H.toLowerCase()](G);F=J[0];if(J[1]){H=J[1];}if(J[2]){G=J[2];}}if(F){try{this._getDoc().execCommand(H,false,G);}catch(I){}}else{}this.on("afterExecCommand",function(){this.unsubscribeAll("afterExecCommand");this.nodeChange();});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});},cmd_backcolor:function(I){var F=true,G=this._getSelectedElement(),H="backcolor";if(this.browser.gecko||this.browser.opera){this._setEditorStyle(true);H="hilitecolor";}if(!this._isElement(G,"body")){C.setStyle(G,"background-color",I);this._selectNode(G);F=false;}else{this._createCurrentElement("span",{backgroundColor:I});this._selectNode(this.currentElement[0]);F=false;}return[F,H];},cmd_forecolor:function(H){var F=true,G=this._getSelectedElement();if(!this._isElement(G,"body")){C.setStyle(G,"color",H);
+this._selectNode(G);F=false;}else{this._createCurrentElement("span",{color:H});this._selectNode(this.currentElement[0]);F=false;}return[F];},cmd_unlink:function(F){this._swapEl(this.currentElement[0],"span",function(G){G.className="yui-non";});return[false];},cmd_createlink:function(H){var G=this._getSelectedElement(),F=null;if(this._hasParent(G,"a")){this.currentElement[0]=this._hasParent(G,"a");}else{if(!this._isElement(G,"a")){this._createCurrentElement("a");F=this._swapEl(this.currentElement[0],"a");this.currentElement[0]=F;}else{this.currentElement[0]=G;}}return[false];},cmd_insertimage:function(K){var F=true,G=null,J="insertimage",I=this._getSelectedElement();if(K===""){K=this.get("blankimage");}if(this._isElement(I,"img")){this.currentElement[0]=I;F=false;}else{if(this._getDoc().queryCommandEnabled(J)){this._getDoc().execCommand("insertimage",false,K);var L=this._getDoc().getElementsByTagName("img");for(var H=0;H<L.length;H++){if(!YAHOO.util.Dom.hasClass(L[H],"yui-im!
 g")){YAHOO.util.Dom.addClass(L[H],"yui-img");this.currentElement[0]=L[H];}}F=false;}else{if(I==this._getDoc().body){G=this._getDoc().createElement("img");G.setAttribute("src",K);YAHOO.util.Dom.addClass(G,"yui-img");this._getDoc().body.appendChild(G);}else{this._createCurrentElement("img");G=this._getDoc().createElement("img");G.setAttribute("src",K);YAHOO.util.Dom.addClass(G,"yui-img");this.currentElement[0].parentNode.replaceChild(G,this.currentElement[0]);}this.currentElement[0]=G;F=false;}}return[F];},cmd_inserthtml:function(I){var F=true,H="inserthtml",G=null,J=null;if(this.browser.webkit&&!this._getDoc().queryCommandEnabled(H)){this._createCurrentElement("img");G=this._getDoc().createElement("span");G.innerHTML=I;this.currentElement[0].parentNode.replaceChild(G,this.currentElement[0]);F=false;}else{if(this.browser.ie){J=this._getRange();if(J.item){J.item(0).outerHTML=I;}else{J.pasteHTML(I);}F=false;}}return[F];},cmd_list:function(U){var H=true,O=null,R=0,F=null,P="",L=!
 this._getSelectedElement(),I="insertorderedlist";if(U=="ul"){I!
 ="insert
unorderedlist";}if((this.browser.webkit&&!this._getDoc().queryCommandEnabled(I))){if(this._isElement(L,"li")&&this._isElement(L.parentNode,U)){F=L.parentNode;O=this._getDoc().createElement("span");YAHOO.util.Dom.addClass(O,"yui-non");P="";var T=F.getElementsByTagName("li");for(R=0;R<T.length;R++){P+="<div>"+T[R].innerHTML+"</div>";}O.innerHTML=P;this.currentElement[0]=F;this.currentElement[0].parentNode.replaceChild(O,this.currentElement[0]);}else{this._createCurrentElement(U.toLowerCase());O=this._getDoc().createElement(U);for(R=0;R<this.currentElement.length;R++){var Q=this._getDoc().createElement("li");Q.innerHTML=this.currentElement[R].innerHTML+"<span class=\"yui-non\"> </span> ";O.appendChild(Q);if(R>0){this.currentElement[R].parentNode.removeChild(this.currentElement[R]);}}this.currentElement[0].parentNode.replaceChild(O,this.currentElement[0]);this.currentElement[0]=O;var K=this.currentElement[0].firstChild;K=C.getElementsByClassName("yui-non","span",K)[0];!
 this._getSelection().setBaseAndExtent(K,1,K,K.innerText.length);}H=false;}else{F=this._getSelectedElement();if(this._isElement(F,"li")&&this._isElement(F.parentNode,U)||(this.browser.ie&&this._isElement(this._getRange().parentElement,"li"))){if(this.browser.ie){P="";var N=F.parentNode.getElementsByTagName("li");for(var J=0;J<N.length;J++){P+=N[J].innerHTML+"<br>";}var G=this._getDoc().createElement("span");G.innerHTML=P;F.parentNode.parentNode.replaceChild(G,F.parentNode);}else{this.nodeChange();this._getDoc().execCommand(I,"",F.parentNode);this.nodeChange();}H=false;}if(this.browser.opera){var S=this;window.setTimeout(function(){var V=S._getDoc().getElementsByTagName("li");for(var W=0;W<V.length;W++){if(V[W].innerHTML.toLowerCase()=="<br>"){V[W].parentNode.parentNode.removeChild(V[W].parentNode);}}},30);}if(this.browser.ie&&H){var M="";if(this._getRange().html){M="<li>"+this._getRange().html+"</li>";}else{M="<li>"+this._getRange().text+"</li>";}this._getRange().pasteHTML("!
 <"+U+">"+M+"</"+U+">");H=false;}}return H;},cmd_insertorderedl!
 ist:func
tion(F){return[this.cmd_list("ol")];},cmd_insertunorderedlist:function(F){return[this.cmd_list("ul")];},cmd_fontname:function(H){var F=true,G=this._getSelectedElement();this.currentFont=H;if(G&&G.tagName&&!this._hasSelection()){YAHOO.util.Dom.setStyle(G,"font-family",H);F=false;}return[F];},cmd_fontsize:function(G){if((this.currentElement.length>0)&&(!this._hasSelection())){YAHOO.util.Dom.setStyle(this.currentElement,"fontSize",G);}else{if(!this._isElement(this._getSelectedElement(),"body")){var F=this._getSelectedElement();YAHOO.util.Dom.setStyle(F,"fontSize",G);this._selectNode(F);}else{this._createCurrentElement("span",{"fontSize":G});this._selectNode(this.currentElement[0]);}}return[false];},_swapEl:function(G,F,I){var H=this._getDoc().createElement(F);H.innerHTML=G.innerHTML;if(typeof I=="function"){I.call(this,H);}G.parentNode.replaceChild(H,G);return H;},_createCurrentElement:function(H,U){H=((H)?H:"a");var b=null,G=[],I=this._getDoc();if(this.currentFont){if(!U){U={}!
 ;}U.fontFamily=this.currentFont;this.currentFont=null;}this.currentElement=[];var X=function(){var f=null;switch(H){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":f=I.createElement(H);break;default:f=I.createElement("span");YAHOO.util.Dom.addClass(f,"yui-tag-"+H);YAHOO.util.Dom.addClass(f,"yui-tag");f.setAttribute("tag",H);for(var e in U){if(YAHOO.util.Lang.hasOwnProperty(U,e)){f.style[e]=U[e];}}break;}return f;};if(!this._hasSelection()){if(this._getDoc().queryCommandEnabled("insertimage")){this._getDoc().execCommand("insertimage",false,"yui-tmp-img");var W=this._getDoc().getElementsByTagName("img");for(var Z=0;Z<W.length;Z++){if(W[Z].getAttribute("src",2)=="yui-tmp-img"){G=X();W[Z].parentNode.replaceChild(G,W[Z]);this.currentElement[this.currentElement.length]=G;}}}else{if(this.currentEvent){b=YAHOO.util.Event.getTarget(this.currentEvent);}else{b=this._getDoc().body;}}if(b){G=X();if(this._isElement(b,"body")||this._isElement(b,"html")){if(this._isElement(b,"html"))!
 {b=this._getDoc().body;
+}b.appendChild(G);}else{if(b.nextSibling){b.parentNode.insertBefore(G,b.nextSibling);}else{b.parentNode.appendChild(G);}}this.currentElement[this.currentElement.length]=G;this.currentEvent=null;if(this.browser.webkit){this._getSelection().setBaseAndExtent(G,0,G,0);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(true);}}}}else{this._setEditorStyle(true);this._getDoc().execCommand("fontname",false,"yui-tmp");var F=[];var R=this._getDoc().getElementsByTagName("font");var P=this._getDoc().getElementsByTagName(this._getSelectedElement().tagName);var M=this._getDoc().getElementsByTagName("span");var L=this._getDoc().getElementsByTagName("i");var K=this._getDoc().getElementsByTagName("b");var J=this._getDoc().getElementsByTagName(this._getSelectedElement().parentNode.tagName);for(var V=0;V<R.length;V++){F[F.length]=R[V];}for(var N=0;N<J.length;N++){F[F.length]=J[N];}for(var T=0;T<P.length;T++){F[F.length]=P[T];}for(var S=0;S<M.le!
 ngth;S++){F[F.length]=M[S];}for(var Q=0;Q<L.length;Q++){F[F.length]=L[Q];}for(var O=0;O<K.length;O++){F[F.length]=K[O];}for(var a=0;a<F.length;a++){if((YAHOO.util.Dom.getStyle(F[a],"font-family")=="yui-tmp")||(F[a].face&&(F[a].face=="yui-tmp"))){G=X();G.innerHTML=F[a].innerHTML;if(this._isElement(F[a],"ol")||(this._isElement(F[a],"ul"))){var Y=F[a].getElementsByTagName("li")[0];F[a].style.fontFamily="inherit";Y.style.fontFamily="inherit";G.innerHTML=Y.innerHTML;Y.innerHTML="";Y.appendChild(G);this.currentElement[this.currentElement.length]=G;}else{if(this._isElement(F[a],"li")){F[a].innerHTML="";F[a].appendChild(G);F[a].style.fontFamily="inherit";this.currentElement[this.currentElement.length]=G;}else{if(F[a].parentNode){F[a].parentNode.replaceChild(G,F[a]);this.currentElement[this.currentElement.length]=G;this.currentEvent=null;if(this.browser.webkit){this._getSelection().setBaseAndExtent(G,0,G,0);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._!
 getSelection().collapse(true);}}if(this.browser.ie&&U&&U.fontS!
 ize){thi
s._getSelection().empty();}if(this.browser.gecko){this._getSelection().collapseToStart();}}}}}}var c=this.currentElement.length;for(var d=0;d<c;d++){if((d+1)!=c){if(this.currentElement[d]&&this.currentElement[d].nextSibling){if(this._isElement(this.currentElement[d],"br")){this.currentElement[this.currentElement.length]=this.currentElement[d].nextSibling;}}}}}},saveHTML:function(){var F=this.cleanHTML();this.get("element").value=F;return F;},setEditorHTML:function(F){F=this._cleanIncomingHTML(F);this._getDoc().body.innerHTML=F;this.nodeChange();},getEditorHTML:function(){return this._getDoc().body.innerHTML;},show:function(){if(this.browser.gecko){this._setDesignMode("on");this._focusWindow();}if(this.browser.webkit){var F=this;window.setTimeout(function(){F._setInitialContent.call(F);},10);}if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}this.get("iframe!
 ").setStyle("position","static");this.get("iframe").setStyle("left","");},hide:function(){if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}if(this._fixNodesTimer){clearTimeout(this._fixNodesTimer);this._fixNodesTimer=null;}if(this._nodeChangeTimer){clearTimeout(this._nodeChangeTimer);this._nodeChangeTimer=null;}this._lastNodeChange=0;this.get("iframe").setStyle("position","absolute");this.get("iframe").setStyle("left","-9999px");},_cleanIncomingHTML:function(F){F=F.replace(/<strong([^>]*)>/gi,"<b$1>");F=F.replace(/<\/strong>/gi,"</b>");F=F.replace(/<em([^>]*)>/gi,"<i$1>");F=F.replace(/<\/em>/gi,"</i>");return F;},cleanHTML:function(H){if(!H){H=this.getEditorHTML();}var G=this.get("markup");H=this.pre_filter_linebreaks(H,G);H=H.replace(/<img([^>]*)\/>/gi,"<YUI_IMG$1>");H=H.replace(/<img([^>]*)>/gi,"<YUI_IMG$1>");H=H.replace(/<input([^>]*)\/>/gi,"<YUI_INPUT!
 $1>");H=H.replace(/<input([^>]*)>/gi,"<YUI_INPUT$1>");H=H.repl!
 ace(/<ul
([^>]*)>/gi,"<YUI_UL$1>");H=H.replace(/<\/ul>/gi,"</YUI_UL>");H=H.replace(/<blockquote([^>]*)>/gi,"<YUI_BQ$1>");H=H.replace(/<\/blockquote>/gi,"</YUI_BQ>");if((G=="semantic")||(G=="xhtml")){H=H.replace(/<i([^>]*)>/gi,"<em$1>");H=H.replace(/<\/i>/gi,"</em>");H=H.replace(/<b([^>]*)>/gi,"<strong$1>");H=H.replace(/<\/b>/gi,"</strong>");}H=H.replace(/<font/gi,"<font");H=H.replace(/<\/font>/gi,"</font>");H=H.replace(/<span/gi,"<span");H=H.replace(/<\/span>/gi,"</span>");if((G=="semantic")||(G=="xhtml")||(G=="css")){H=H.replace(new RegExp("<font([^>]*)face=\"([^>]*)\">(.*?)</font>","gi"),"<span $1 style=\"font-family: $2;\">$3</span>");H=H.replace(/<u/gi,"<span style=\"text-decoration: underline;\"");H=H.replace(/\/u>/gi,"/span>");if(G=="css"){H=H.replace(/<em([^>]*)>/gi,"<i$1>");H=H.replace(/<\/em>/gi,"</i>");H=H.replace(/<strong([^>]*)>/gi,"<b$1>");H=H.replace(/<\/strong>/gi,"</b>");H=H.replace(/<b/gi,"<span style=\"font-weight: bold;\"");H=H.replace(/\/b>/gi,"/span>");H=H.replac!
 e(/<i/gi,"<span style=\"font-style: italic;\"");H=H.replace(/\/i>/gi,"/span>");}H=H.replace(/  /gi," ");}else{H=H.replace(/<u/gi,"<u");H=H.replace(/\/u>/gi,"/u>");}H=H.replace(/<ol([^>]*)>/gi,"<ol$1>");H=H.replace(/\/ol>/gi,"/ol>");H=H.replace(/<li/gi,"<li");H=H.replace(/\/li>/gi,"/li>");H=this.filter_safari(H);H=this.filter_internals(H);H=this.filter_all_rgb(H);H=this.post_filter_linebreaks(H,G);if(G=="xhtml"){H=H.replace(/<YUI_IMG([^>]*)>/g,"<img $1/>");H=H.replace(/<YUI_INPUT([^>]*)>/g,"<input $1/>");}else{H=H.replace(/<YUI_IMG([^>]*)>/g,"<img $1>");H=H.replace(/<YUI_INPUT([^>]*)>/g,"<input $1>");}H=H.replace(/<YUI_UL([^>]*)>/g,"<ul$1>");H=H.replace(/<\/YUI_UL>/g,"</ul>");H=this.filter_invalid_lists(H);H=H.replace(/<YUI_BQ([^>]*)>/g,"<blockquote$1>");H=H.replace(/<\/YUI_BQ>/g,"</blockquote>");H=YAHOO.lang.trim(H);if(this.get("removeLineBreaks")){H=H.replace(/\n/g,"").replace(/\r/g,"");H=H.replace(/  /gi," ");
+}if(H.substring(0,6).toLowerCase()=="<span>"){H=H.substring(6);}if(H.substring(H.length-7,H.length).toLowerCase()=="</span>"){H=H.substring(0,H.length-7);}for(var F in this.invalidHTML){if(YAHOO.lang.hasOwnProperty(this.invalidHTML,F)){if(D.isObject(F)&&F.keepContents){H=H.replace(new RegExp("<"+F+"([^>]*)>(.*?)</"+F+">","gi"),"$1");}else{H=H.replace(new RegExp("<"+F+"([^>]*)>(.*?)</"+F+">","gi"),"");}}}this.fireEvent("cleanHTML",{type:"cleanHTML",target:this,html:H});return H;},filter_invalid_lists:function(F){F=F.replace(/<\/li>\n/gi,"</li>");F=F.replace(/<\/li><ol>/gi,"</li><li><ol>");F=F.replace(/<\/ol>/gi,"</ol></li>");F=F.replace(/<\/ol><\/li>\n/gi,"</ol>\n");F=F.replace(/<\/li><ul>/gi,"</li><li><ul>");F=F.replace(/<\/ul>/gi,"</ul></li>");F=F.replace(/<\/ul><\/li>\n/gi,"</ul>\n");F=F.replace(/<\/li>/gi,"</li>\n");F=F.replace(/<\/ol>/gi,"</ol>\n");F=F.replace(/<ol>/gi,"<ol>\n");F=F.replace(/<ul>/gi,"<ul>\n");return F;},filter_safari:function(F){if(this.browser.webkit){!
 F=F.replace(/Apple-style-span/gi,"");F=F.replace(/style="line-height: normal;"/gi,"");F=F.replace(/<li><\/li>/gi,"");F=F.replace(/<li> <\/li>/gi,"");F=F.replace(/<li>  <\/li>/gi,"");F=F.replace(/<div><\/div>/gi,"");F=F.replace(/<div> <\/div>/gi,"");}return F;},filter_internals:function(F){F=F.replace(/\r/g,"");F=F.replace(/<\/?(body|head|html)[^>]*>/gi,"");F=F.replace(/<YUI_BR><\/li>/gi,"</li>");F=F.replace(/yui-tag-span/gi,"");F=F.replace(/yui-tag/gi,"");F=F.replace(/yui-non/gi,"");F=F.replace(/yui-img/gi,"");F=F.replace(/ tag="span"/gi,"");F=F.replace(/ class=""/gi,"");F=F.replace(/ style=""/gi,"");F=F.replace(/ class=" "/gi,"");F=F.replace(/ class="  "/gi,"");F=F.replace(/ target=""/gi,"");F=F.replace(/ title=""/gi,"");if(this.browser.ie){F=F.replace(/ class= /gi,"");F=F.replace(/ class= >/gi,"");F=F.replace(/_height="([^>])"/gi,"");F=F.replace(/_width="([^>])"/gi,"");}return F;},filter_all_rgb:function(J){var I=new RegExp("rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\!
 s*?([0-9]+).*?\\)","gi");var F=J.match(I);if(D.isArray(F)){for!
 (var H=0
;H<F.length;H++){var G=this.filter_rgb(F[H]);J=J.replace(F[H].toString(),G);}}return J;},filter_rgb:function(H){if(H.toLowerCase().indexOf("rgb")!=-1){var K=new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)","gi");var G=H.replace(K,"$1,$2,$3,$4,$5").split(",");if(G.length==5){var J=parseInt(G[1],10).toString(16);var I=parseInt(G[2],10).toString(16);var F=parseInt(G[3],10).toString(16);J=J.length==1?"0"+J:J;I=I.length==1?"0"+I:I;F=F.length==1?"0"+F:F;H="#"+J+I+F;}}return H;},pre_filter_linebreaks:function(G,F){if(this.browser.webkit){G=G.replace(/<br class="khtml-block-placeholder">/gi,"<YUI_BR>");G=G.replace(/<br class="webkit-block-placeholder">/gi,"<YUI_BR>");}G=G.replace(/<br>/gi,"<YUI_BR>");G=G.replace(/<br (.*?)>/gi,"<YUI_BR>");G=G.replace(/<br\/>/gi,"<YUI_BR>");G=G.replace(/<br \/>/gi,"<YUI_BR>");G=G.replace(/<div><YUI_BR><\/div>/gi,"<YUI_BR>");G=G.replace(/<p>( | )<\/p>/g,"<YUI_BR>");G=G.replace(/<p><br> <\/p>/gi,"<Y!
 UI_BR>");G=G.replace(/<p> <\/p>/gi,"<YUI_BR>");G=G.replace(/<YUI_BR>$/,"");G=G.replace(/<YUI_BR><\/p>/g,"</p>");return G;},post_filter_linebreaks:function(G,F){if(F=="xhtml"){G=G.replace(/<YUI_BR>/g,"<br/>");}else{G=G.replace(/<YUI_BR>/g,"<br>");}return G;},clearEditorDoc:function(){this._getDoc().body.innerHTML=" ";},_renderPanel:function(){},openWindow:function(F){},moveWindow:function(){},_closeWindow:function(){},closeWindow:function(){this.unsubscribeAll("afterExecCommand");this.toolbar.resetAllButtons();this._focusWindow();},destroy:function(){this.saveHTML();this.toolbar.destroy();this.setStyle("visibility","hidden");this.setStyle("position","absolute");this.setStyle("top","-9999px");this.setStyle("left","-9999px");var G=this.get("element");this.get("element_cont").get("parentNode").replaceChild(G,this.get("element_cont").get("element"));this.get("element_cont").get("element").innerHTML="";for(var F in this){if(D.hasOwnProperty(this,F)){this[F]=null;}}retur!
 n true;},toString:function(){var F="SimpleEditor";if(this.get&!
 &this.ge
t("element_cont")){F="SimpleEditor (#"+this.get("element_cont").get("id")+")"+((this.get("disabled")?" Disabled":""));}return F;}});YAHOO.widget.EditorInfo={_instances:{},window:{},panel:null,getEditorById:function(F){if(!YAHOO.lang.isString(F)){F=F.id;}if(this._instances[F]){return this._instances[F];}return false;},toString:function(){var F=0;for(var G in this._instances){F++;}return"Editor Info ("+F+" registered intance"+((F>1)?"s":"")+")";}};})();YAHOO.register("simpleeditor",YAHOO.widget.SimpleEditor,{version:"2.4.1",build:"742"});
\ No newline at end of file

Added: trunk/root/static/yui/editor/simpleeditor-beta.js
===================================================================
--- trunk/root/static/yui/editor/simpleeditor-beta.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/editor/simpleeditor-beta.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,5875 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+(function() {
+    /**
+    * @private
+    **/
+var Dom = YAHOO.util.Dom,
+    Event = YAHOO.util.Event,
+    Lang = YAHOO.lang;
+    /**
+     * @description <p>Creates a rich custom Toolbar Button. Primarily used with the Rich Text Editor's Toolbar</p>
+     * @class ToolbarButtonAdvanced
+     * @namespace YAHOO.widget
+     * @requires yahoo, dom, element, event, container_core, menu, button
+     * @beta
+     * 
+     * Provides a toolbar button based on the button and menu widgets.
+     * @constructor
+     * @param {String/HTMLElement} el The element to turn into a button.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+    if (YAHOO.widget.Button) {
+        YAHOO.widget.ToolbarButtonAdvanced = YAHOO.widget.Button;
+        /**
+        * @property buttonType
+        * @private
+        * @description Tells if the Button is a Rich Button or a Simple Button
+        */
+        YAHOO.widget.ToolbarButtonAdvanced.prototype.buttonType = 'rich';
+        /**
+        * @method checkValue
+        * @param {String} value The value of the option that we want to mark as selected
+        * @description Select an option by value
+        */
+        YAHOO.widget.ToolbarButtonAdvanced.prototype.checkValue = function(value) {
+            var _menuItems = this.getMenu().getItems();
+            if (_menuItems.length === 0) {
+                this.getMenu()._onBeforeShow();
+                _menuItems = this.getMenu().getItems();
+            }
+            for (var i = 0; i < _menuItems.length; i++) {
+                _menuItems[i].cfg.setProperty('checked', false);
+                if (_menuItems[i].value == value) {
+                    _menuItems[i].cfg.setProperty('checked', true);
+                }
+            }      
+        };
+    } else {
+        YAHOO.widget.ToolbarButtonAdvanced = function() {};
+    }
+
+
+    /**
+     * @description <p>Creates a basic custom Toolbar Button. Primarily used with the Rich Text Editor's Toolbar</p>
+     * @class ToolbarButton
+     * @namespace YAHOO.widget
+     * @requires yahoo, dom, element, event
+     * @Extends YAHOO.util.Element
+     * @beta
+     * 
+     * Provides a toolbar button based on the button and menu widgets, <select> elements are used in place of menu's.
+     * @constructor
+     * @param {String/HTMLElement} el The element to turn into a button.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+
+    YAHOO.widget.ToolbarButton = function(el, attrs) {
+        
+        if (Lang.isObject(arguments[0]) && !Dom.get(el).nodeType) {
+            attrs = el;
+        }
+        var local_attrs = (attrs || {});
+
+        var oConfig = {
+            element: null,
+            attributes: local_attrs
+        };
+
+        if (!oConfig.attributes.type) {
+            oConfig.attributes.type = 'push';
+        }
+        
+        oConfig.element = document.createElement('span');
+        oConfig.element.setAttribute('unselectable', 'on');
+        oConfig.element.className = 'yui-button yui-' + oConfig.attributes.type + '-button';
+        oConfig.element.innerHTML = '<span class="first-child"><a href="#">LABEL</a></span>';
+        oConfig.attributes.id = Dom.generateId();
+
+        YAHOO.widget.ToolbarButton.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
+    };
+
+    YAHOO.extend(YAHOO.widget.ToolbarButton, YAHOO.util.Element, {
+        /**
+        * @property buttonType
+        * @private
+        * @description Tells if the Button is a Rich Button or a Simple Button
+        */
+        buttonType: 'normal',
+        /**
+        * @method _handleMouseOver
+        * @private
+        * @description Adds classes to the button elements on mouseover (hover)
+        */
+        _handleMouseOver: function() {
+            if (!this.get('disabled')) {
+                this.addClass('yui-button-hover');
+                this.addClass('yui-' + this.get('type') + '-button-hover');
+            }
+        },
+        /**
+        * @method _handleMouseOut
+        * @private
+        * @description Removes classes from the button elements on mouseout (hover)
+        */
+        _handleMouseOut: function() {
+            this.removeClass('yui-button-hover');
+            this.removeClass('yui-' + this.get('type') + '-button-hover');
+        },
+        /**
+        * @method checkValue
+        * @param {String} value The value of the option that we want to mark as selected
+        * @description Select an option by value
+        */
+        checkValue: function(value) {
+            if (this.get('type') == 'menu') {
+                var opts = this._button.options;
+                for (var i = 0; i < opts.length; i++) {
+                    if (opts[i].value == value) {
+                        opts.selectedIndex = i;
+                    }
+                }
+            }
+        },
+        /** 
+        * @method init
+        * @description The ToolbarButton class's initialization method
+        */        
+        init: function(p_oElement, p_oAttributes) {
+            YAHOO.widget.ToolbarButton.superclass.init.call(this, p_oElement, p_oAttributes);
+
+            this.on('mouseover', this._handleMouseOver, this, true);
+            this.on('mouseout', this._handleMouseOut, this, true);
+        },
+        /**
+        * @method initAttributes
+        * @description Initializes all of the configuration attributes used to create 
+        * the toolbar.
+        * @param {Object} attr Object literal specifying a set of 
+        * configuration attributes used to create the toolbar.
+        */        
+        initAttributes: function(attr) {
+            YAHOO.widget.ToolbarButton.superclass.initAttributes.call(this, attr);
+            /**
+            * @attribute value
+            * @description The value of the button
+            * @type String
+            */            
+            this.setAttributeConfig('value', {
+                value: attr.value
+            });
+            /**
+            * @attribute menu
+            * @description The menu attribute, see YAHOO.widget.Button
+            * @type Object
+            */            
+            this.setAttributeConfig('menu', {
+                value: attr.menu || false
+            });
+            /**
+            * @attribute type
+            * @description The type of button to create: push, menu, color, select, spin
+            * @type String
+            */            
+            this.setAttributeConfig('type', {
+                value: attr.type,
+                writeOnce: true,
+                method: function(type) {
+                    var el, opt;
+                    if (!this._button) {
+                        this._button = this.get('element').getElementsByTagName('a')[0];
+                    }
+                    switch (type) {
+                        case 'select':
+                        case 'menu':
+                            el = document.createElement('select');
+                            var menu = this.get('menu');
+                            for (var i = 0; i < menu.length; i++) {
+                                opt = document.createElement('option');
+                                opt.innerHTML = menu[i].text;
+                                opt.value = menu[i].value;
+                                if (menu[i].checked) {
+                                    opt.selected = true;
+                                }
+                                el.appendChild(opt);
+                            }
+                            this._button.parentNode.replaceChild(el, this._button);
+                            Event.on(el, 'change', this._handleSelect, this, true);
+                            this._button = el;
+                            break;
+                    }
+                }
+            });
+
+            /**
+            * @attribute disabled
+            * @description Set the button into a disabled state
+            * @type String
+            */            
+            this.setAttributeConfig('disabled', {
+                value: attr.disabled || false,
+                method: function(disabled) {
+                    if (disabled) {
+                        this.addClass('yui-button-disabled');
+                        this.addClass('yui-' + this.get('type') + '-button-disabled');
+                    } else {
+                        this.removeClass('yui-button-disabled');
+                        this.removeClass('yui-' + this.get('type') + '-button-disabled');
+                    }
+                    if (this.get('type') == 'menu') {
+                        this._button.disabled = disabled;
+                    }
+                }
+            });
+
+            /**
+            * @attribute label
+            * @description The text label for the button
+            * @type String
+            */            
+            this.setAttributeConfig('label', {
+                value: attr.label,
+                method: function(label) {
+                    if (!this._button) {
+                        this._button = this.get('element').getElementsByTagName('a')[0];
+                    }
+                    if (this.get('type') == 'push') {
+                        this._button.innerHTML = label;
+                    }
+                }
+            });
+
+            /**
+            * @attribute title
+            * @description The title of the button
+            * @type String
+            */            
+            this.setAttributeConfig('title', {
+                value: attr.title
+            });
+
+            /**
+            * @config container
+            * @description The container that the button is rendered to, handled by Toolbar
+            * @type String
+            */            
+            this.setAttributeConfig('container', {
+                value: null,
+                writeOnce: true,
+                method: function(cont) {
+                    this.appendTo(cont);
+                }
+            });
+
+        },
+        /** 
+        * @private
+        * @method _handleSelect
+        * @description The event fired when a change event gets fired on a select element
+        * @param {Event} ev The change event.
+        */        
+        _handleSelect: function(ev) {
+            var tar = Event.getTarget(ev);
+            var value = tar.options[tar.selectedIndex].value;
+            this.fireEvent('change', {type: 'change', value: value });
+        },
+        /** 
+        * @method getMenu
+        * @description A stub function to mimic YAHOO.widget.Button's getMenu method
+        */        
+        getMenu: function() {
+            return this.get('menu');
+        },
+        /** 
+        * @method fireEvent
+        * @description Overridden fireEvent method to prevent DOM events from firing if the button is disabled.
+        */        
+        fireEvent: function (p_sType , p_aArgs) {
+            //  Disabled buttons should not respond to DOM events
+            if (this.DOM_EVENTS[p_sType] && this.get('disabled')) {
+                return;
+            }
+        
+            YAHOO.widget.ToolbarButton.superclass.fireEvent.call(this, p_sType, p_aArgs);
+        },
+        /**
+        * @method toString
+        * @description Returns a string representing the toolbar.
+        * @return {String}
+        */        
+        toString: function() {
+            return 'ToolbarButton (' + this.get('id') + ')';
+        }
+        
+    });
+})();
+/**
+ * @description <p>Creates a rich Toolbar widget based on Button. Primarily used with the Rich Text Editor</p>
+ * @class Toolbar
+ * @namespace YAHOO.widget
+ * @requires yahoo, dom, element, event, toolbarbutton
+ * @optional container_core, dragdrop
+ * @beta
+ */
+(function() {
+    /**
+    * @private
+    **/
+var Dom = YAHOO.util.Dom,
+    Event = YAHOO.util.Event,
+    Lang = YAHOO.lang;
+
+    /**
+     * Provides a rich toolbar widget based on the button and menu widgets
+     * @constructor
+     * @param {String/HTMLElement} el The element to turn into a toolbar.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+    YAHOO.widget.Toolbar = function(el, attrs) {
+        
+        if (Lang.isObject(arguments[0]) && !Dom.get(el).nodeType) {
+            attrs = el;
+        }
+        var local_attrs = (attrs || {});
+
+        var oConfig = {
+            element: null,
+            attributes: local_attrs
+        };
+        
+        
+        if (Lang.isString(el) && Dom.get(el)) {
+            oConfig.element = Dom.get(el);
+        } else if (Lang.isObject(el) && Dom.get(el) && Dom.get(el).nodeType) {  
+            oConfig.element = Dom.get(el);
+        }
+        
+
+        if (!oConfig.element) {
+            oConfig.element = document.createElement('DIV');
+            oConfig.element.id = Dom.generateId();
+            
+            if (local_attrs.container && Dom.get(local_attrs.container)) {
+                Dom.get(local_attrs.container).appendChild(oConfig.element);
+            }
+        }
+        
+
+        if (!oConfig.element.id) {
+            oConfig.element.id = ((Lang.isString(el)) ? el : Dom.generateId());
+        }
+        
+        var cont = document.createElement('DIV');
+        oConfig.attributes.cont = cont;
+        Dom.addClass(cont, 'yui-toolbar-subcont');
+        oConfig.element.appendChild(cont);
+        
+        oConfig.attributes.element = oConfig.element;
+        oConfig.attributes.id = oConfig.element.id;
+
+        YAHOO.widget.Toolbar.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
+         
+    };
+
+    /**
+    * @method _addMenuClasses
+    * @private
+    * @description This method is called from Menu's renderEvent to add a few more classes to the menu items
+    * @param {String} ev The event that fired.
+    * @param {Array} na Array of event information.
+    * @param {Object} o Button config object. 
+    */
+
+    function _addMenuClasses(ev, na, o) {
+        Dom.addClass(this.element, 'yui-toolbar-' + o.get('value') + '-menu');
+        if (Dom.hasClass(o._button.parentNode.parentNode, 'yui-toolbar-select')) {
+            Dom.addClass(this.element, 'yui-toolbar-select-menu');
+        }
+        var items = this.getItems();
+        for (var i = 0; i < items.length; i++) {
+            Dom.addClass(items[i].element, 'yui-toolbar-' + o.get('value') + '-' + ((items[i].value) ? items[i].value.replace(/ /g, '-').toLowerCase() : items[i]._oText.nodeValue.replace(/ /g, '-').toLowerCase()));
+            Dom.addClass(items[i].element, 'yui-toolbar-' + o.get('value') + '-' + ((items[i].value) ? items[i].value.replace(/ /g, '-') : items[i]._oText.nodeValue.replace(/ /g, '-')));
+        }
+    }
+
+    YAHOO.extend(YAHOO.widget.Toolbar, YAHOO.util.Element, {
+        /** 
+        * @property buttonType
+        * @description The default button to use
+        * @type Object
+        */
+        buttonType: YAHOO.widget.ToolbarButton,
+        /** 
+        * @property dd
+        * @description The DragDrop instance associated with the Toolbar
+        * @type Object
+        */
+        dd: null,
+        /** 
+        * @property _colorData
+        * @description Object reference containing colors hex and text values.
+        * @type Object
+        */
+        _colorData: {
+/* {{{ _colorData */
+    '#111111': 'Obsidian',
+    '#2D2D2D': 'Dark Gray',
+    '#434343': 'Shale',
+    '#5B5B5B': 'Flint',
+    '#737373': 'Gray',
+    '#8B8B8B': 'Concrete',
+    '#A2A2A2': 'Gray',
+    '#B9B9B9': 'Titanium',
+    '#000000': 'Black',
+    '#D0D0D0': 'Light Gray',
+    '#E6E6E6': 'Silver',
+    '#FFFFFF': 'White',
+    '#BFBF00': 'Pumpkin',
+    '#FFFF00': 'Yellow',
+    '#FFFF40': 'Banana',
+    '#FFFF80': 'Pale Yellow',
+    '#FFFFBF': 'Butter',
+    '#525330': 'Raw Siena',
+    '#898A49': 'Mildew',
+    '#AEA945': 'Olive',
+    '#7F7F00': 'Paprika',
+    '#C3BE71': 'Earth',
+    '#E0DCAA': 'Khaki',
+    '#FCFAE1': 'Cream',
+    '#60BF00': 'Cactus',
+    '#80FF00': 'Chartreuse',
+    '#A0FF40': 'Green',
+    '#C0FF80': 'Pale Lime',
+    '#DFFFBF': 'Light Mint',
+    '#3B5738': 'Green',
+    '#668F5A': 'Lime Gray',
+    '#7F9757': 'Yellow',
+    '#407F00': 'Clover',
+    '#8A9B55': 'Pistachio',
+    '#B7C296': 'Light Jade',
+    '#E6EBD5': 'Breakwater',
+    '#00BF00': 'Spring Frost',
+    '#00FF80': 'Pastel Green',
+    '#40FFA0': 'Light Emerald',
+    '#80FFC0': 'Sea Foam',
+    '#BFFFDF': 'Sea Mist',
+    '#033D21': 'Dark Forrest',
+    '#438059': 'Moss',
+    '#7FA37C': 'Medium Green',
+    '#007F40': 'Pine',
+    '#8DAE94': 'Yellow Gray Green',
+    '#ACC6B5': 'Aqua Lung',
+    '#DDEBE2': 'Sea Vapor',
+    '#00BFBF': 'Fog',
+    '#00FFFF': 'Cyan',
+    '#40FFFF': 'Turquoise Blue',
+    '#80FFFF': 'Light Aqua',
+    '#BFFFFF': 'Pale Cyan',
+    '#033D3D': 'Dark Teal',
+    '#347D7E': 'Gray Turquoise',
+    '#609A9F': 'Green Blue',
+    '#007F7F': 'Seaweed',
+    '#96BDC4': 'Green Gray',
+    '#B5D1D7': 'Soapstone',
+    '#E2F1F4': 'Light Turquoise',
+    '#0060BF': 'Summer Sky',
+    '#0080FF': 'Sky Blue',
+    '#40A0FF': 'Electric Blue',
+    '#80C0FF': 'Light Azure',
+    '#BFDFFF': 'Ice Blue',
+    '#1B2C48': 'Navy',
+    '#385376': 'Biscay',
+    '#57708F': 'Dusty Blue',
+    '#00407F': 'Sea Blue',
+    '#7792AC': 'Sky Blue Gray',
+    '#A8BED1': 'Morning Sky',
+    '#DEEBF6': 'Vapor',
+    '#0000BF': 'Deep Blue',
+    '#0000FF': 'Blue',
+    '#4040FF': 'Cerulean Blue',
+    '#8080FF': 'Evening Blue',
+    '#BFBFFF': 'Light Blue',
+    '#212143': 'Deep Indigo',
+    '#373E68': 'Sea Blue',
+    '#444F75': 'Night Blue',
+    '#00007F': 'Indigo Blue',
+    '#585E82': 'Dockside',
+    '#8687A4': 'Blue Gray',
+    '#D2D1E1': 'Light Blue Gray',
+    '#6000BF': 'Neon Violet',
+    '#8000FF': 'Blue Violet',
+    '#A040FF': 'Violet Purple',
+    '#C080FF': 'Violet Dusk',
+    '#DFBFFF': 'Pale Lavender',
+    '#302449': 'Cool Shale',
+    '#54466F': 'Dark Indigo',
+    '#655A7F': 'Dark Violet',
+    '#40007F': 'Violet',
+    '#726284': 'Smoky Violet',
+    '#9E8FA9': 'Slate Gray',
+    '#DCD1DF': 'Violet White',
+    '#BF00BF': 'Royal Violet',
+    '#FF00FF': 'Fuchsia',
+    '#FF40FF': 'Magenta',
+    '#FF80FF': 'Orchid',
+    '#FFBFFF': 'Pale Magenta',
+    '#4A234A': 'Dark Purple',
+    '#794A72': 'Medium Purple',
+    '#936386': 'Cool Granite',
+    '#7F007F': 'Purple',
+    '#9D7292': 'Purple Moon',
+    '#C0A0B6': 'Pale Purple',
+    '#ECDAE5': 'Pink Cloud',
+    '#BF005F': 'Hot Pink',
+    '#FF007F': 'Deep Pink',
+    '#FF409F': 'Grape',
+    '#FF80BF': 'Electric Pink',
+    '#FFBFDF': 'Pink',
+    '#451528': 'Purple Red',
+    '#823857': 'Purple Dino',
+    '#A94A76': 'Purple Gray',
+    '#7F003F': 'Rose',
+    '#BC6F95': 'Antique Mauve',
+    '#D8A5BB': 'Cool Marble',
+    '#F7DDE9': 'Pink Granite',
+    '#C00000': 'Apple',
+    '#FF0000': 'Fire Truck',
+    '#FF4040': 'Pale Red',
+    '#FF8080': 'Salmon',
+    '#FFC0C0': 'Warm Pink',
+    '#441415': 'Sepia',
+    '#82393C': 'Rust',
+    '#AA4D4E': 'Brick',
+    '#800000': 'Brick Red',
+    '#BC6E6E': 'Mauve',
+    '#D8A3A4': 'Shrimp Pink',
+    '#F8DDDD': 'Shell Pink',
+    '#BF5F00': 'Dark Orange',
+    '#FF7F00': 'Orange',
+    '#FF9F40': 'Grapefruit',
+    '#FFBF80': 'Canteloupe',
+    '#FFDFBF': 'Wax',
+    '#482C1B': 'Dark Brick',
+    '#855A40': 'Dirt',
+    '#B27C51': 'Tan',
+    '#7F3F00': 'Nutmeg',
+    '#C49B71': 'Mustard',
+    '#E1C4A8': 'Pale Tan',
+    '#FDEEE0': 'Marble'
+/* }}} */
+        },
+        /** 
+        * @property _colorPicker
+        * @description The HTML Element containing the colorPicker
+        * @type HTMLElement
+        */
+        _colorPicker: null,
+        /** 
+        * @property STR_COLLAPSE
+        * @description String for Toolbar Collapse Button
+        * @type String
+        */
+        STR_COLLAPSE: 'Collapse Toolbar',
+        /** 
+        * @property STR_SPIN_LABEL
+        * @description String for spinbutton dynamic label. Note the {VALUE} will be replaced with YAHOO.lang.substitute
+        * @type String
+        */
+        STR_SPIN_LABEL: 'Spin Button with value {VALUE}. Use Control Shift Up Arrow and Control Shift Down arrow keys to increase or decrease the value.',
+        /** 
+        * @property STR_SPIN_UP
+        * @description String for spinbutton up
+        * @type String
+        */
+        STR_SPIN_UP: 'Click to increase the value of this input',
+        /** 
+        * @property STR_SPIN_DOWN
+        * @description String for spinbutton down
+        * @type String
+        */
+        STR_SPIN_DOWN: 'Click to decrease the value of this input',
+        /** 
+        * @property _titlebar
+        * @description Object reference to the titlebar
+        * @type HTMLElement
+        */
+        _titlebar: null,
+        /** 
+        * @property browser
+        * @description Standard browser detection
+        * @type Object
+        */
+        browser: YAHOO.env.ua,
+        /**
+        * @protected
+        * @property _buttonList
+        * @description Internal property list of current buttons in the toolbar
+        * @type Array
+        */
+        _buttonList: null,
+        /**
+        * @protected
+        * @property _buttonGroupList
+        * @description Internal property list of current button groups in the toolbar
+        * @type Array
+        */
+        _buttonGroupList: null,
+        /**
+        * @protected
+        * @property _sep
+        * @description Internal reference to the separator HTML Element for cloning
+        * @type HTMLElement
+        */
+        _sep: null,
+        /**
+        * @protected
+        * @property _sepCount
+        * @description Internal refernce for counting separators, so we can give them a useful class name for styling
+        * @type Number
+        */
+        _sepCount: null,
+        /**
+        * @protected
+        * @property draghandle
+        * @type HTMLElement
+        */
+        _dragHandle: null,
+        /**
+        * @protected
+        * @property _toolbarConfigs
+        * @type Object
+        */
+        _toolbarConfigs: {
+            renderer: true
+        },
+        /**
+        * @protected
+        * @property CLASS_CONTAINER
+        * @description Default CSS class to apply to the toolbar container element
+        * @type String
+        */
+        CLASS_CONTAINER: 'yui-toolbar-container',
+        /**
+        * @protected
+        * @property CLASS_DRAGHANDLE
+        * @description Default CSS class to apply to the toolbar's drag handle element
+        * @type String
+        */
+        CLASS_DRAGHANDLE: 'yui-toolbar-draghandle',
+        /**
+        * @protected
+        * @property CLASS_SEPARATOR
+        * @description Default CSS class to apply to all separators in the toolbar
+        * @type String
+        */
+        CLASS_SEPARATOR: 'yui-toolbar-separator',
+        /**
+        * @protected
+        * @property CLASS_DISABLED
+        * @description Default CSS class to apply when the toolbar is disabled
+        * @type String
+        */
+        CLASS_DISABLED: 'yui-toolbar-disabled',
+        /**
+        * @protected
+        * @property CLASS_PREFIX
+        * @description Default prefix for dynamically created class names
+        * @type String
+        */
+        CLASS_PREFIX: 'yui-toolbar',
+        /** 
+        * @method init
+        * @description The Toolbar class's initialization method
+        */
+        init: function(p_oElement, p_oAttributes) {
+            YAHOO.widget.Toolbar.superclass.init.call(this, p_oElement, p_oAttributes);
+        },
+        /**
+        * @method initAttributes
+        * @description Initializes all of the configuration attributes used to create 
+        * the toolbar.
+        * @param {Object} attr Object literal specifying a set of 
+        * configuration attributes used to create the toolbar.
+        */
+        initAttributes: function(attr) {
+            YAHOO.widget.Toolbar.superclass.initAttributes.call(this, attr);
+            this.addClass(this.CLASS_CONTAINER);
+
+            /**
+            * @attribute buttonType
+            * @description The buttonType to use (advanced or basic)
+            * @type String
+            */
+            this.setAttributeConfig('buttonType', {
+                value: attr.buttonType || 'basic',
+                writeOnce: true,
+                validator: function(type) {
+                    switch (type) {
+                        case 'advanced':
+                        case 'basic':
+                            return true;
+                    }
+                    return false;
+                },
+                method: function(type) {
+                    if (type == 'advanced') {
+                        if (YAHOO.widget.Button) {
+                            this.buttonType = YAHOO.widget.ToolbarButtonAdvanced;
+                        } else {
+                            this.buttonType = YAHOO.widget.ToolbarButton;
+                        }
+                    } else {
+                        this.buttonType = YAHOO.widget.ToolbarButton;
+                    }
+                }
+            });
+
+
+            /**
+            * @attribute buttons
+            * @description Object specifying the buttons to include in the toolbar
+            * Example:
+            * <code><pre>
+            * {
+            *   { id: 'b3', type: 'button', label: 'Underline', value: 'underline' },
+            *   { type: 'separator' },
+            *   { id: 'b4', type: 'menu', label: 'Align', value: 'align',
+            *       menu: [
+            *           { text: "Left", value: 'alignleft' },
+            *           { text: "Center", value: 'aligncenter' },
+            *           { text: "Right", value: 'alignright' }
+            *       ]
+            *   }
+            * }
+            * </pre></code>
+            * @type Array
+            */
+            
+            this.setAttributeConfig('buttons', {
+                value: [],
+                writeOnce: true,
+                method: function(data) {
+                    for (var i in data) {
+                        if (Lang.hasOwnProperty(data, i)) {
+                            if (data[i].type == 'separator') {
+                                this.addSeparator();
+                            } else if (data[i].group !== undefined) {
+                                this.addButtonGroup(data[i]);
+                            } else {
+                                this.addButton(data[i]);
+                            }
+                        }
+                    }
+                }
+            });
+
+            /**
+            * @attribute disabled
+            * @description Boolean indicating if the toolbar should be disabled. It will also disable the draggable attribute if it is on.
+            * @default false
+            * @type Boolean
+            */
+            this.setAttributeConfig('disabled', {
+                value: false,
+                method: function(disabled) {
+                    if (this.get('disabled') === disabled) {
+                        return false;
+                    }
+                    if (disabled) {
+                        this.addClass(this.CLASS_DISABLED);
+                        this.set('draggable', false);
+                        this.disableAllButtons();
+                    } else {
+                        this.removeClass(this.CLASS_DISABLED);
+                        if (this._configs.draggable._initialConfig.value) {
+                            //Draggable by default, set it back
+                            this.set('draggable', true);
+                        }
+                        this.resetAllButtons();
+                    }
+                }
+            });
+
+            /**
+            * @config cont
+            * @description The container for the toolbar.
+            * @type HTMLElement
+            */
+            this.setAttributeConfig('cont', {
+                value: attr.cont,
+                readOnly: true
+            });
+
+
+            /**
+            * @attribute grouplabels
+            * @description Boolean indicating if the toolbar should show the group label's text string.
+            * @default true
+            * @type Boolean
+            */
+            this.setAttributeConfig('grouplabels', {
+                value: attr.grouplabels || true,
+                method: function(grouplabels) {
+                    if (grouplabels) {
+                        Dom.removeClass(this.get('cont'), (this.CLASS_PREFIX + '-nogrouplabels'));
+                    } else {
+                        Dom.addClass(this.get('cont'), (this.CLASS_PREFIX + '-nogrouplabels'));
+                    }
+                }
+            });
+            /**
+            * @attribute titlebar
+            * @description Boolean indicating if the toolbar should have a titlebar. If
+            * passed a string, it will use that as the titlebar text
+            * @default false
+            * @type Boolean or String
+            */
+            this.setAttributeConfig('titlebar', {
+                value: false,
+                method: function(titlebar) {
+                    if (titlebar) {
+                        if (this._titlebar && this._titlebar.parentNode) {
+                            this._titlebar.parentNode.removeChild(this._titlebar);
+                        }
+                        this._titlebar = document.createElement('DIV');
+                        Dom.addClass(this._titlebar, this.CLASS_PREFIX + '-titlebar');
+                        if (Lang.isString(titlebar)) {
+                            var h2 = document.createElement('h2');
+                            h2.tabIndex = '-1';
+                            h2.innerHTML = titlebar;
+                            this._titlebar.appendChild(h2);
+                        }
+                        if (this.get('firstChild')) {
+                            this.insertBefore(this._titlebar, this.get('firstChild'));
+                        } else {
+                            this.appendChild(this._titlebar);
+                        }
+                        if (this.get('collapse')) {
+                            this.set('collapse', true);
+                        }
+                    } else if (this._titlebar) {
+                        if (this._titlebar && this._titlebar.parentNode) {
+                            this._titlebar.parentNode.removeChild(this._titlebar);
+                        }
+                    }
+                }
+            });
+
+
+            /**
+            * @attribute collapse
+            * @description Boolean indicating if the the titlebar should have a collapse button.
+            * The collapse button will not remove the toolbar, it will minimize it to the titlebar
+            * @default false
+            * @type Boolean
+            */
+            this.setAttributeConfig('collapse', {
+                value: false,
+                method: function(collapse) {
+                    var collapseEl = null;
+                    var el = Dom.getElementsByClassName('collapse', 'span', this._titlebar);
+                    if (collapse) {
+                        if (el.length > 0) {
+                            //There is already a collapse button
+                            return true;
+                        }
+                        collapseEl = document.createElement('SPAN');
+                        collapseEl.innerHTML = 'X';
+                        collapseEl.title = this.STR_COLLAPSE;
+
+                        Dom.addClass(collapseEl, 'collapse');
+                        this._titlebar.appendChild(collapseEl);
+                        Event.addListener(collapseEl, 'click', function() {
+                            if (Dom.hasClass(this.get('cont').parentNode, 'yui-toolbar-container-collapsed')) {
+                                this.collapse(false); //Expand Toolbar
+                            } else {
+                                this.collapse(); //Collapse Toolbar
+                            }
+                        }, this, true);
+                    } else {
+                        collapseEl = Dom.getElementsByClassName('collapse', 'span', this._titlebar);
+                        if (collapseEl[0]) {
+                            if (Dom.hasClass(this.get('cont').parentNode, 'yui-toolbar-container-collapsed')) {
+                                //We are closed, reopen the titlebar..
+                                this.collapse(false); //Expand Toolbar
+                            }
+                            collapseEl[0].parentNode.removeChild(collapseEl[0]);
+                        }
+                    }
+                }
+            });
+
+            /**
+            * @attribute draggable
+            * @description Boolean indicating if the toolbar should be draggable.  
+            * @default false
+            * @type Boolean
+            */
+
+            this.setAttributeConfig('draggable', {
+                value: (attr.draggable || false),
+                method: function(draggable) {
+                    if (draggable && !this.get('titlebar')) {
+                        if (!this._dragHandle) {
+                            this._dragHandle = document.createElement('SPAN');
+                            this._dragHandle.innerHTML = '|';
+                            this._dragHandle.setAttribute('title', 'Click to drag the toolbar');
+                            this._dragHandle.id = this.get('id') + '_draghandle';
+                            Dom.addClass(this._dragHandle, this.CLASS_DRAGHANDLE);
+                            if (this.get('cont').hasChildNodes()) {
+                                this.get('cont').insertBefore(this._dragHandle, this.get('cont').firstChild);
+                            } else {
+                                this.get('cont').appendChild(this._dragHandle);
+                            }
+                            /**
+                            * @property dd
+                            * @description The DragDrop instance associated with the Toolbar
+                            * @type Object
+                            */
+                            this.dd = new YAHOO.util.DD(this.get('id'));
+                            this.dd.setHandleElId(this._dragHandle.id);
+                            
+                        }
+                    } else {
+                        if (this._dragHandle) {
+                            this._dragHandle.parentNode.removeChild(this._dragHandle);
+                            this._dragHandle = null;
+                            this.dd = null;
+                        }
+                    }
+                    if (this._titlebar) {
+                        if (draggable) {
+                            this.dd = new YAHOO.util.DD(this.get('id'));
+                            this.dd.setHandleElId(this._titlebar);
+                            Dom.addClass(this._titlebar, 'draggable');
+                        } else {
+                            Dom.removeClass(this._titlebar, 'draggable');
+                            if (this.dd) {
+                                this.dd.unreg();
+                                this.dd = null;
+                            }
+                        }
+                    }
+                },
+                validator: function(value) {
+                    var ret = true;
+                    if (!YAHOO.util.DD) {
+                        ret = false;
+                    }
+                    return ret;
+                }
+            });
+
+        },
+        /**
+        * @method addButtonGroup
+        * @description Add a new button group to the toolbar. (uses addButton)
+        * @param {Object} oGroup Object literal reference to the Groups Config (contains an array of button configs)
+        */
+        addButtonGroup: function(oGroup) {
+            if (!this.get('element')) {
+                this._queue[this._queue.length] = ['addButtonGroup', arguments];
+                return false;
+            }
+            
+            if (!this.hasClass(this.CLASS_PREFIX + '-grouped')) {
+                this.addClass(this.CLASS_PREFIX + '-grouped');
+            }
+            var div = document.createElement('DIV');
+            Dom.addClass(div, this.CLASS_PREFIX + '-group');
+            Dom.addClass(div, this.CLASS_PREFIX + '-group-' + oGroup.group);
+            //if (oGroup.label && this.get('grouplabels')) {
+            if (oGroup.label) {
+                var label = document.createElement('h3');
+                label.innerHTML = oGroup.label;
+                div.appendChild(label);
+            }
+            if (!this.get('grouplabels')) {
+                Dom.addClass(this.get('cont'), this.CLASS_PREFIX, '-nogrouplabels');
+            }
+
+            this.get('cont').appendChild(div);
+
+            //For accessibility, let's put all of the group buttons in an Unordered List
+            var ul = document.createElement('ul');
+            div.appendChild(ul);
+
+            if (!this._buttonGroupList) {
+                this._buttonGroupList = {};
+            }
+            
+            this._buttonGroupList[oGroup.group] = ul;
+
+            for (var i = 0; i < oGroup.buttons.length; i++) {
+                var li = document.createElement('li');
+                li.className = this.CLASS_PREFIX + '-groupitem';
+                ul.appendChild(li);
+                if ((oGroup.buttons[i].type !== undefined) && oGroup.buttons[i].type == 'separator') {
+                    this.addSeparator(li);
+                } else {
+                    oGroup.buttons[i].container = li;
+                    this.addButton(oGroup.buttons[i]);
+                }
+            }
+        },
+        /**
+        * @method addButtonToGroup
+        * @description Add a new button to a toolbar group. Buttons supported:
+        *   push, split, menu, select, color, spin
+        * @param {Object} oButton Object literal reference to the Button's Config
+        * @param {String} group The Group identifier passed into the initial config
+        * @param {HTMLElement} after Optional HTML element to insert this button after in the DOM.
+        */
+        addButtonToGroup: function(oButton, group, after) {
+            var groupCont = this._buttonGroupList[group];
+            var li = document.createElement('li');
+            li.className = this.CLASS_PREFIX + '-groupitem';
+            oButton.container = li;
+            this.addButton(oButton, after);
+            groupCont.appendChild(li);
+        },
+        /**
+        * @method addButton
+        * @description Add a new button to the toolbar. Buttons supported:
+        *   push, split, menu, select, color, spin
+        * @param {Object} oButton Object literal reference to the Button's Config
+        * @param {HTMLElement} after Optional HTML element to insert this button after in the DOM.
+        */
+        addButton: function(oButton, after) {
+            if (!this.get('element')) {
+                this._queue[this._queue.length] = ['addButton', arguments];
+                return false;
+            }
+            if (!this._buttonList) {
+                this._buttonList = [];
+            }
+            if (!oButton.container) {
+                oButton.container = this.get('cont');
+            }
+
+            if ((oButton.type == 'menu') || (oButton.type == 'split') || (oButton.type == 'select')) {
+                if (Lang.isArray(oButton.menu)) {
+                    for (var i in oButton.menu) {
+                        if (Lang.hasOwnProperty(oButton.menu, i)) {
+                            var funcObject = {
+                                fn: function(ev, x, oMenu) {
+                                    if (!oButton.menucmd) {
+                                        oButton.menucmd = oButton.value;
+                                    }
+                                    oButton.value = ((oMenu.value) ? oMenu.value : oMenu._oText.nodeValue);
+                                    //This line made Opera fire the click event and the mousedown,
+                                    //  so events for menus where firing twice.
+                                    //this._buttonClick('click', oButton);
+                                },
+                                scope: this
+                            };
+                            oButton.menu[i].onclick = funcObject;
+                        }
+                    }
+                }
+            }
+            var _oButton = {}, skip = false;
+            for (var o in oButton) {
+                if (Lang.hasOwnProperty(oButton, o)) {
+                    if (!this._toolbarConfigs[o]) {
+                        _oButton[o] = oButton[o];
+                    }
+                }
+            }
+            if (oButton.type == 'select') {
+                _oButton.type = 'menu';
+            }
+            if (oButton.type == 'spin') {
+                _oButton.type = 'push';
+            }
+            if (_oButton.type == 'color') {
+                if (YAHOO.widget.Overlay) {
+                    _oButton = this._makeColorButton(_oButton);
+                } else {
+                    skip = true;
+                }
+            }
+            if (_oButton.menu) {
+                if ((YAHOO.widget.Overlay) && (oButton.menu instanceof YAHOO.widget.Overlay)) {
+                    oButton.menu.showEvent.subscribe(function() {
+                        this._button = _oButton;
+                    });
+                } else {
+                    for (var m = 0; m < _oButton.menu.length; m++) {
+                        if (!_oButton.menu[m].value) {
+                            _oButton.menu[m].value = _oButton.menu[m].text;
+                        }
+                    }
+                    if (this.browser.webkit) {
+                        _oButton.focusmenu = false;
+                    }
+                }
+            }
+            if (skip) {
+                oButton = false;
+            } else {
+                //Add to .get('buttons') manually
+                this._configs.buttons.value[this._configs.buttons.value.length] = oButton;
+
+                var tmp = new this.buttonType(_oButton);
+                if (!tmp.buttonType) {
+                    tmp.buttonType = 'rich';
+                    tmp.checkValue = function(value) {
+                        var _menuItems = this.getMenu().getItems();
+                        if (_menuItems.length === 0) {
+                            this.getMenu()._onBeforeShow();
+                            _menuItems = this.getMenu().getItems();
+                        }
+                        for (var i = 0; i < _menuItems.length; i++) {
+                            _menuItems[i].cfg.setProperty('checked', false);
+                            if (_menuItems[i].value == value) {
+                                _menuItems[i].cfg.setProperty('checked', true);
+                            }
+                        }      
+                    };
+                }
+                
+                if (this.get('disabled')) {
+                    //Toolbar is disabled, disable the new button too!
+                    tmp.set('disabled', true);
+                }
+                if (!oButton.id) {
+                    oButton.id = tmp.get('id');
+                }
+                
+                if (after) {
+                    var el = tmp.get('element');
+                    var nextSib = null;
+                    if (after.get) {
+                        nextSib = after.get('element').nextSibling;
+                    } else if (after.nextSibling) {
+                        nextSib = after.nextSibling;
+                    }
+                    if (nextSib) {
+                        nextSib.parentNode.insertBefore(el, nextSib);
+                    }
+                }
+                tmp.addClass(this.CLASS_PREFIX + '-' + tmp.get('value'));
+
+                var icon = document.createElement('span');
+                icon.className = this.CLASS_PREFIX + '-icon';
+                tmp.get('element').insertBefore(icon, tmp.get('firstChild'));
+                if (tmp._button.tagName.toLowerCase() == 'button') {
+                    tmp.get('element').setAttribute('unselectable', 'on');
+                    //Replace the Button HTML Element with an a href if it exists
+                    var a = document.createElement('a');
+                    a.innerHTML = tmp._button.innerHTML;
+                    a.href = '#';
+                    Event.on(a, 'click', function(ev) {
+                        Event.stopEvent(ev);
+                    });
+                    tmp._button.parentNode.replaceChild(a, tmp._button);
+                    tmp._button = a;
+                }
+
+                if (oButton.type == 'select') {
+                    if (tmp._button.tagName.toLowerCase() == 'select') {
+                        icon.parentNode.removeChild(icon);
+                        var iel = tmp._button;
+                        var parEl = tmp.get('element');
+                        parEl.parentNode.replaceChild(iel, parEl);
+                    } else {
+                        //Don't put a class on it if it's a real select element
+                        tmp.addClass(this.CLASS_PREFIX + '-select');
+                    }
+                }
+                if (oButton.type == 'spin') {
+                    if (!Lang.isArray(oButton.range)) {
+                        oButton.range = [ 10, 100 ];
+                    }
+                    this._makeSpinButton(tmp, oButton);
+                }
+                tmp.get('element').setAttribute('title', tmp.get('label'));
+                if (oButton.type != 'spin') {
+                    if ((YAHOO.widget.Overlay) && (_oButton.menu instanceof YAHOO.widget.Overlay)) {
+                        var showPicker = function(ev) {
+                            var exec = true;
+                            if (ev.keyCode && (ev.keyCode == 9)) {
+                                exec = false;
+                            }
+                            if (exec) {
+                                this._colorPicker._button = oButton.value;
+                                var menuEL = tmp.getMenu().element;
+                                if (Dom.getStyle(menuEL, 'visibility') == 'hidden') {
+                                    tmp.getMenu().show();
+                                } else {
+                                    tmp.getMenu().hide();
+                                }
+                            }
+                            YAHOO.util.Event.stopEvent(ev);
+                        };
+                        tmp.on('mousedown', showPicker, oButton, this);
+                        tmp.on('keydown', showPicker, oButton, this);
+                        
+                    } else if ((oButton.type != 'menu') && (oButton.type != 'select')) {
+                        tmp.on('keypress', this._buttonClick, oButton, this);
+                        tmp.on('mousedown', function(ev) {
+                            YAHOO.util.Event.stopEvent(ev);
+                            this._buttonClick(ev, oButton);
+                        }, oButton, this);
+                        tmp.on('click', function(ev) {
+                            YAHOO.util.Event.stopEvent(ev);
+                        });
+                    } else {
+                        //Stop the mousedown event so we can trap the selection in the editor!
+                        tmp.on('mousedown', function(ev) {
+                            YAHOO.util.Event.stopEvent(ev);
+                        });
+                        tmp.on('click', function(ev) {
+                            YAHOO.util.Event.stopEvent(ev);
+                        });
+                        tmp.on('change', function(ev) {
+                            if (!oButton.menucmd) {
+                                oButton.menucmd = oButton.value;
+                            }
+                            oButton.value = ev.value;
+                            this._buttonClick(ev, oButton);
+                        }, this, true);
+                        var self = this;
+                        //Hijack the mousedown event in the menu and make it fire a button click..
+                        if (tmp.getMenu().mouseDownEvent) {
+                            tmp.getMenu().mouseDownEvent.subscribe(function(ev, args) {
+                                var oMenu = args[1];
+                                YAHOO.util.Event.stopEvent(args[0]);
+                                tmp._onMenuClick(args[0], tmp);
+                                if (!oButton.menucmd) {
+                                    oButton.menucmd = oButton.value;
+                                }
+                                oButton.value = ((oMenu.value) ? oMenu.value : oMenu._oText.nodeValue);
+                                self._buttonClick.call(self, args[1], oButton);
+                                tmp._hideMenu();
+                                return false;
+                            });
+                            tmp.getMenu().clickEvent.subscribe(function(ev, args) {
+                                YAHOO.util.Event.stopEvent(args[0]);
+                            });
+                            tmp.getMenu().mouseUpEvent.subscribe(function(ev, args) {
+                                YAHOO.util.Event.stopEvent(args[0]);
+                            });
+                        }
+                        
+                    }
+                } else {
+                    //Stop the mousedown event so we can trap the selection in the editor!
+                    tmp.on('mousedown', function(ev) {
+                        YAHOO.util.Event.stopEvent(ev);
+                    });
+                    tmp.on('click', function(ev) {
+                        YAHOO.util.Event.stopEvent(ev);
+                    });
+                }
+                if (this.browser.ie) {
+                    //Add a couple of new events for IE
+                    tmp.DOM_EVENTS.focusin = true;
+                    tmp.DOM_EVENTS.focusout = true;
+                    
+                    //Stop them so we don't loose focus in the Editor
+                    tmp.on('focusin', function(ev) {
+                        YAHOO.util.Event.stopEvent(ev);
+                    }, oButton, this);
+                    
+                    tmp.on('focusout', function(ev) {
+                        YAHOO.util.Event.stopEvent(ev);
+                    }, oButton, this);
+                    tmp.on('click', function(ev) {
+                        YAHOO.util.Event.stopEvent(ev);
+                    }, oButton, this);
+                }
+                if (this.browser.webkit) {
+                    //This will keep the document from gaining focus and the editor from loosing it..
+                    //Forcefully remove the focus calls in button!
+                    tmp.hasFocus = function() {
+                        return true;
+                    };
+                }
+                this._buttonList[this._buttonList.length] = tmp;
+                if ((oButton.type == 'menu') || (oButton.type == 'split') || (oButton.type == 'select')) {
+                    if (Lang.isArray(oButton.menu)) {
+                        var menu = tmp.getMenu();
+                        if (menu.renderEvent) {
+                            menu.renderEvent.subscribe(_addMenuClasses, tmp);
+                            if (oButton.renderer) {
+                                menu.renderEvent.subscribe(oButton.renderer, tmp);
+                            }
+                        }
+                    }
+                }
+            }
+            return oButton;
+        },
+        /**
+        * @method addSeparator
+        * @description Add a new button separator to the toolbar.
+        * @param {HTMLElement} cont Optional HTML element to insert this button into.
+        * @param {HTMLElement} after Optional HTML element to insert this button after in the DOM.
+        */
+        addSeparator: function(cont, after) {
+            if (!this.get('element')) {
+                this._queue[this._queue.length] = ['addSeparator', arguments];
+                return false;
+            }
+            var sepCont = ((cont) ? cont : this.get('cont'));
+            if (!this.get('element')) {
+                this._queue[this._queue.length] = ['addSeparator', arguments];
+                return false;
+            }
+            if (this._sepCount === null) {
+                this._sepCount = 0;
+            }
+            if (!this._sep) {
+                this._sep = document.createElement('SPAN');
+                Dom.addClass(this._sep, this.CLASS_SEPARATOR);
+                this._sep.innerHTML = '|';
+            }
+            var _sep = this._sep.cloneNode(true);
+            this._sepCount++;
+            Dom.addClass(_sep, this.CLASS_SEPARATOR + '-' + this._sepCount);
+            if (after) {
+                var nextSib = null;
+                if (after.get) {
+                    nextSib = after.get('element').nextSibling;
+                } else if (after.nextSibling) {
+                    nextSib = after.nextSibling;
+                } else {
+                    nextSib = after;
+                }
+                if (nextSib) {
+                    if (nextSib == after) {
+                        nextSib.parentNode.appendChild(_sep);
+                    } else {
+                        nextSib.parentNode.insertBefore(_sep, nextSib);
+                    }
+                }
+            } else {
+                sepCont.appendChild(_sep);
+            }
+            return _sep;
+        },
+        /**
+        * @method _createColorPicker
+        * @private
+        * @description Creates the core DOM reference to the color picker menu item.
+        * @param {String} id the id of the toolbar to prefix this DOM container with.
+        */
+        _createColorPicker: function(id) {
+            if (Dom.get(id + '_colors')) {
+               Dom.get(id + '_colors').parentNode.removeChild(Dom.get(id + '_colors'));
+            }
+            var picker = document.createElement('div');
+            picker.className = 'yui-toolbar-colors';
+            picker.id = id + '_colors';
+            picker.style.display = 'none';
+            Event.on(window, 'load', function() {
+                document.body.appendChild(picker);
+            }, this, true);
+
+            this._colorPicker = picker;
+
+            var html = '';
+            for (var i in this._colorData) {
+                if (Lang.hasOwnProperty(this._colorData, i)) {
+                    html += '<a style="background-color: ' + i + '" href="#">' + i.replace('#', '') + '</a>';
+                }
+            }
+            html += '<span><em>X</em><strong></strong></span>';
+            picker.innerHTML = html;
+            var em = picker.getElementsByTagName('em')[0];
+            var strong = picker.getElementsByTagName('strong')[0];
+
+            Event.on(picker, 'mouseover', function(ev) {
+                var tar = Event.getTarget(ev);
+                if (tar.tagName.toLowerCase() == 'a') {
+                    em.style.backgroundColor = tar.style.backgroundColor;
+                    strong.innerHTML = this._colorData['#' + tar.innerHTML] + '<br>' + tar.innerHTML;
+                }
+            }, this, true);
+            Event.on(picker, 'focus', function(ev) {
+                Event.stopEvent(ev);
+            });
+            Event.on(picker, 'click', function(ev) {
+                Event.stopEvent(ev);
+            });
+            Event.on(picker, 'mousedown', function(ev) {
+                Event.stopEvent(ev);
+                var tar = Event.getTarget(ev);
+                if (tar.tagName.toLowerCase() == 'a') {
+                    this.fireEvent('colorPickerClicked', { type: 'colorPickerClicked', target: this, button: this._colorPicker._button, color: tar.innerHTML, colorName: this._colorData['#' + tar.innerHTML] } );
+                    this.getButtonByValue(this._colorPicker._button).getMenu().hide();
+                }
+            }, this, true);
+        },
+        /**
+        * @method _resetColorPicker
+        * @private
+        * @description Clears the currently selected color or mouseover color in the color picker.
+        */
+        _resetColorPicker: function() {
+            var em = this._colorPicker.getElementsByTagName('em')[0];
+            var strong = this._colorPicker.getElementsByTagName('strong')[0];
+            em.style.backgroundColor = 'transparent';
+            strong.innerHTML = '';
+        },
+        /**
+        * @method _makeColorButton
+        * @private
+        * @description Called to turn a "color" button into a menu button with an Overlay for the menu.
+        * @param {Object} _oButton <a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a> reference
+        */
+        _makeColorButton: function(_oButton) {
+            if (!this._colorPicker) {   
+                this._createColorPicker(this.get('id'));
+            }
+            _oButton.type = 'color';
+            _oButton.menu = new YAHOO.widget.Overlay(this.get('id') + '_' + _oButton.value + '_menu', { visible: false, position: 'absolute', iframe: true });
+            _oButton.menu.setBody('');
+            _oButton.menu.render(this.get('cont'));
+            Dom.addClass(_oButton.menu.element, 'yui-button-menu');
+            Dom.addClass(_oButton.menu.element, 'yui-color-button-menu');
+            _oButton.menu.beforeShowEvent.subscribe(function() {
+                _oButton.menu.cfg.setProperty('zindex', 5); //Re Adjust the overlays zIndex.. not sure why.
+                _oButton.menu.cfg.setProperty('context', [this.getButtonById(_oButton.id).get('element'), 'tl', 'bl']); //Re Adjust the overlay.. not sure why.
+                //Move the DOM reference of the color picker to the Overlay that we are about to show.
+                this._resetColorPicker();
+                var _p = this._colorPicker;
+                if (_p.parentNode) {
+                    _p.parentNode.removeChild(_p);
+                }
+                _oButton.menu.setBody('');
+                _oButton.menu.appendToBody(_p);
+                this._colorPicker.style.display = 'block';
+            }, this, true);
+            return _oButton;
+        },
+        /**
+        * @private
+        * @method _makeSpinButton
+        * @description Create a button similar to an OS Spin button.. It has an up/down arrow combo to scroll through a range of int values.
+        * @param {Object} _button <a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a> reference
+        * @param {Object} oButton Object literal containing the buttons initial config
+        */
+        _makeSpinButton: function(_button, oButton) {
+            _button.addClass(this.CLASS_PREFIX + '-spinbutton');
+            var self = this,
+                _par = _button._button.parentNode.parentNode, //parentNode of Button Element for appending child
+                range = oButton.range,
+                _b1 = document.createElement('a'),
+                _b2 = document.createElement('a');
+                _b1.href = '#';
+                _b2.href = '#';
+            
+            //Setup the up and down arrows
+            _b1.className = 'up';
+            _b1.title = this.STR_SPIN_UP;
+            _b1.innerHTML = this.STR_SPIN_UP;
+            _b2.className = 'down';
+            _b2.title = this.STR_SPIN_DOWN;
+            _b2.innerHTML = this.STR_SPIN_DOWN;
+
+            //Append them to the container
+            _par.appendChild(_b1);
+            _par.appendChild(_b2);
+            
+            var label = YAHOO.lang.substitute(this.STR_SPIN_LABEL, { VALUE: _button.get('label') });
+            _button.set('title', label);
+
+            var cleanVal = function(value) {
+                value = ((value < range[0]) ? range[0] : value);
+                value = ((value > range[1]) ? range[1] : value);
+                return value;
+            };
+
+            var br = this.browser;
+            var tbar = false;
+            var strLabel = this.STR_SPIN_LABEL;
+            if (this._titlebar && this._titlebar.firstChild) {
+                tbar = this._titlebar.firstChild;
+            }
+            
+            var _intUp = function(ev) {
+                YAHOO.util.Event.stopEvent(ev);
+                if (!_button.get('disabled') && (ev.keyCode != 9)) {
+                    var value = parseInt(_button.get('label'), 10);
+                    value++;
+                    value = cleanVal(value);
+                    _button.set('label', ''+value);
+                    var label = YAHOO.lang.substitute(strLabel, { VALUE: _button.get('label') });
+                    _button.set('title', label);
+                    if (!br.webkit && tbar) {
+                        //tbar.focus(); //We do this for accessibility, on the re-focus of the element, a screen reader will re-read the title that was just changed
+                        //_button.focus();
+                    }
+                    self._buttonClick(ev, oButton);
+                }
+            };
+
+            var _intDown = function(ev) {
+                YAHOO.util.Event.stopEvent(ev);
+                if (!_button.get('disabled') && (ev.keyCode != 9)) {
+                    var value = parseInt(_button.get('label'), 10);
+                    value--;
+                    value = cleanVal(value);
+
+                    _button.set('label', ''+value);
+                    var label = YAHOO.lang.substitute(strLabel, { VALUE: _button.get('label') });
+                    _button.set('title', label);
+                    if (!br.webkit && tbar) {
+                        //tbar.focus(); //We do this for accessibility, on the re-focus of the element, a screen reader will re-read the title that was just changed
+                        //_button.focus();
+                    }
+                    self._buttonClick(ev, oButton);
+                }
+            };
+
+            var _intKeyUp = function(ev) {
+                if (ev.keyCode == 38) {
+                    _intUp(ev);
+                } else if (ev.keyCode == 40) {
+                    _intDown(ev);
+                } else if (ev.keyCode == 107 && ev.shiftKey) {  //Plus Key
+                    _intUp(ev);
+                } else if (ev.keyCode == 109 && ev.shiftKey) {  //Minus Key
+                    _intDown(ev);
+                }
+            };
+
+            //Handle arrow keys..
+            _button.on('keydown', _intKeyUp, this, true);
+
+            //Listen for the click on the up button and act on it
+            //Listen for the click on the down button and act on it
+            Event.on(_b1, 'mousedown',function(ev) {
+                Event.stopEvent(ev);
+            }, this, true);
+            Event.on(_b2, 'mousedown', function(ev) {
+                Event.stopEvent(ev);
+            }, this, true);
+            Event.on(_b1, 'click', _intUp, this, true);
+            Event.on(_b2, 'click', _intDown, this, true);
+        },
+        /**
+        * @protected
+        * @method _buttonClick
+        * @description Click handler for all buttons in the toolbar.
+        * @param {String} ev The event that was passed in.
+        * @param {Object} info Object literal of information about the button that was clicked.
+        */
+        _buttonClick: function(ev, info) {
+            var doEvent = true;
+            
+            if (ev && ev.type == 'keypress') {
+                if (ev.keyCode == 9) {
+                    doEvent = false;
+                } else if ((ev.keyCode === 13) || (ev.keyCode === 0) || (ev.keyCode === 32)) {
+                } else {
+                    doEvent = false;
+                }
+            }
+
+            if (doEvent) {
+                var fireNextEvent = true,
+                    retValue = false;
+                if (info.value) {
+                    retValue = this.fireEvent(info.value + 'Click', { type: info.value + 'Click', target: this.get('element'), button: info });
+                    if (retValue === false) {
+                        fireNextEvent = false;
+                    }
+                }
+                
+                if (info.menucmd && fireNextEvent) {
+                    retValue = this.fireEvent(info.menucmd + 'Click', { type: info.menucmd + 'Click', target: this.get('element'), button: info });
+                    if (retValue === false) {
+                        fireNextEvent = false;
+                    }
+                }
+                if (fireNextEvent) {
+                    this.fireEvent('buttonClick', { type: 'buttonClick', target: this.get('element'), button: info });
+                }
+
+                if (info.type == 'select') {
+                    var button = this.getButtonById(info.id);
+                    if (button.buttonType == 'rich') {
+                        var txt = info.value;
+                        for (var i = 0; i < info.menu.length; i++) {
+                            if (info.menu[i].value == info.value) {
+                                txt = info.menu[i].text;
+                                break;
+                            }
+                        }
+                        button.set('label', '<span class="yui-toolbar-' + info.menucmd + '-' + (info.value).replace(/ /g, '-').toLowerCase() + '">' + txt + '</span>');
+                        var _items = button.getMenu().getItems();
+                        for (var m = 0; m < _items.length; m++) {
+                            if (_items[m].value.toLowerCase() == info.value.toLowerCase()) {
+                                _items[m].cfg.setProperty('checked', true);
+                            } else {
+                                _items[m].cfg.setProperty('checked', false);
+                            }
+                        }
+                    }
+                }
+            }
+            if (ev) {
+                Event.stopEvent(ev);
+            }
+        },
+        /**
+        * @method getButtonById
+        * @description Gets a button instance from the toolbar by is Dom id.
+        * @param {String} id The Dom id to query for.
+        * @return {<a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a>}
+        */
+        getButtonById: function(id) {
+            var len = this._buttonList.length;
+            for (var i = 0; i < len; i++) {
+                if (this._buttonList[i].get('id') == id) {
+                    return this._buttonList[i];
+                }
+            }
+            return false;
+        },
+        /**
+        * @method getButtonByValue
+        * @description Gets a button instance or a menuitem instance from the toolbar by it's value.
+        * @param {String} value The button value to query for.
+        * @return {<a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a> or <a href="YAHOO.widget.MenuItem.html">YAHOO.widget.MenuItem</a>}
+        */
+        getButtonByValue: function(value) {
+            var _buttons = this.get('buttons');
+            var len = _buttons.length;
+            for (var i = 0; i < len; i++) {
+                if (_buttons[i].group !== undefined) {
+                    for (var m = 0; m < _buttons[i].buttons.length; m++) {
+                        if ((_buttons[i].buttons[m].value == value) || (_buttons[i].buttons[m].menucmd == value)) {
+                            return this.getButtonById(_buttons[i].buttons[m].id);
+                        }
+                        if (_buttons[i].buttons[m].menu) { //Menu Button, loop through the values
+                            for (var s = 0; s < _buttons[i].buttons[m].menu.length; s++) {
+                                if (_buttons[i].buttons[m].menu[s].value == value) {
+                                    return this.getButtonById(_buttons[i].buttons[m].id);
+                                }
+                            }
+                        }
+                    }
+                } else {
+                    if ((_buttons[i].value == value) || (_buttons[i].menucmd == value)) {
+                        return this.getButtonById(_buttons[i].id);
+                    }
+                    if (_buttons[i].menu) { //Menu Button, loop through the values
+                        for (var j = 0; j < _buttons[i].menu.length; j++) {
+                            if (_buttons[i].menu[j].value == value) {
+                                return this.getButtonById(_buttons[i].id);
+                            }
+                        }
+                    }
+                }
+            }
+            return false;
+        },
+        /**
+        * @method getButtonByIndex
+        * @description Gets a button instance from the toolbar by is index in _buttonList.
+        * @param {Number} index The index of the button in _buttonList.
+        * @return {<a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a>}
+        */
+        getButtonByIndex: function(index) {
+            if (this._buttonList[index]) {
+                return this._buttonList[index];
+            } else {
+                return false;
+            }
+        },
+        /**
+        * @method getButtons
+        * @description Returns an array of buttons in the current toolbar
+        * @return {Array}
+        */
+        getButtons: function() {
+            return this._buttonList;
+        },
+        /**
+        * @method disableButton
+        * @description Disables a button in the toolbar.
+        * @param {String/Number} id Disable a button by it's id, index or value.
+        * @return {Boolean}
+        */
+        disableButton: function(id) {
+            var button = id;
+            if (Lang.isString(id)) {
+                button = this.getButtonById(id);
+            }
+            if (Lang.isNumber(id)) {
+                button = this.getButtonByIndex(id);
+            }
+            if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
+                button = this.getButtonByValue(id);
+            }
+            if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
+                button.set('disabled', true);
+            } else {
+                return false;
+            }
+        },
+        /**
+        * @method enableButton
+        * @description Enables a button in the toolbar.
+        * @param {String/Number} id Enable a button by it's id, index or value.
+        * @return {Boolean}
+        */
+        enableButton: function(id) {
+            if (this.get('disabled')) {
+                return false;
+            }
+            var button = id;
+            if (Lang.isString(id)) {
+                button = this.getButtonById(id);
+            }
+            if (Lang.isNumber(id)) {
+                button = this.getButtonByIndex(id);
+            }
+            if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
+                button = this.getButtonByValue(id);
+            }
+            if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
+                if (button.get('disabled')) {
+                    button.set('disabled', false);
+                }
+            } else {
+                return false;
+            }
+        },
+        /**
+        * @method selectButton
+        * @description Selects a button in the toolbar.
+        * @param {String/Number} id Select a button by it's id, index or value.
+        * @return {Boolean}
+        */
+        selectButton: function(id, value) {
+            var button = id;
+            if (id) {
+                if (Lang.isString(id)) {
+                    button = this.getButtonById(id);
+                }
+                if (Lang.isNumber(id)) {
+                    button = this.getButtonByIndex(id);
+                }
+                if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
+                    button = this.getButtonByValue(id);
+                }
+                if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
+                    button.addClass('yui-button-selected');
+                    button.addClass('yui-button-' + button.get('value') + '-selected');
+                    if (value) {
+                        if (button.buttonType == 'rich') {
+                            var _items = button.getMenu().getItems();
+                            for (var m = 0; m < _items.length; m++) {
+                                if (_items[m].value == value) {
+                                    _items[m].cfg.setProperty('checked', true);
+                                    button.set('label', '<span class="yui-toolbar-' + button.get('value') + '-' + (value).replace(/ /g, '-').toLowerCase() + '">' + _items[m]._oText.nodeValue + '</span>');
+                                } else {
+                                    _items[m].cfg.setProperty('checked', false);
+                                }
+                            }
+                        }
+                    }
+                } else {
+                    return false;
+                }
+            }
+        },
+        /**
+        * @method deselectButton
+        * @description Deselects a button in the toolbar.
+        * @param {String/Number} id Deselect a button by it's id, index or value.
+        * @return {Boolean}
+        */
+        deselectButton: function(id) {
+            var button = id;
+            if (Lang.isString(id)) {
+                button = this.getButtonById(id);
+            }
+            if (Lang.isNumber(id)) {
+                button = this.getButtonByIndex(id);
+            }
+            if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
+                button = this.getButtonByValue(id);
+            }
+            if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
+                button.removeClass('yui-button-selected');
+                button.removeClass('yui-button-' + button.get('value') + '-selected');
+                button.removeClass('yui-button-hover');
+            } else {
+                return false;
+            }
+        },
+        /**
+        * @method deselectAllButtons
+        * @description Deselects all buttons in the toolbar.
+        * @return {Boolean}
+        */
+        deselectAllButtons: function() {
+            var len = this._buttonList.length;
+            for (var i = 0; i < len; i++) {
+                this.deselectButton(this._buttonList[i]);
+            }
+        },
+        /**
+        * @method disableAllButtons
+        * @description Disables all buttons in the toolbar.
+        * @return {Boolean}
+        */
+        disableAllButtons: function() {
+            if (this.get('disabled')) {
+                return false;
+            }
+            var len = this._buttonList.length;
+            for (var i = 0; i < len; i++) {
+                this.disableButton(this._buttonList[i]);
+            }
+        },
+        /**
+        * @method enableAllButtons
+        * @description Enables all buttons in the toolbar.
+        * @return {Boolean}
+        */
+        enableAllButtons: function() {
+            if (this.get('disabled')) {
+                return false;
+            }
+            var len = this._buttonList.length;
+            for (var i = 0; i < len; i++) {
+                this.enableButton(this._buttonList[i]);
+            }
+        },
+        /**
+        * @method resetAllButtons
+        * @description Resets all buttons to their initial state.
+        * @param {Object} _ex Except these buttons
+        * @return {Boolean}
+        */
+        resetAllButtons: function(_ex) {
+            if (!Lang.isObject(_ex)) {
+                _ex = {};
+            }
+            if (this.get('disabled')) {
+                return false;
+            }
+            var len = this._buttonList.length;
+            for (var i = 0; i < len; i++) {
+                var _button = this._buttonList[i];
+                var disabled = _button._configs.disabled._initialConfig.value;
+                if (_ex[_button.get('id')]) {
+                    this.enableButton(_button);
+                    this.selectButton(_button);
+                } else {
+                    if (disabled) {
+                        this.disableButton(_button);
+                    } else {
+                        this.enableButton(_button);
+                    }
+                    this.deselectButton(_button);
+                }
+            }
+        },
+        /**
+        * @method destroyButton
+        * @description Destroy a button in the toolbar.
+        * @param {String/Number} id Destroy a button by it's id or index.
+        * @return {Boolean}
+        */
+        destroyButton: function(id) {
+            var button = id;
+            if (Lang.isString(id)) {
+                button = this.getButtonById(id);
+            }
+            if (Lang.isNumber(id)) {
+                button = this.getButtonByIndex(id);
+            }
+            if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
+                button = this.getButtonByValue(id);
+            }
+            if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
+                var thisID = button.get('id');
+                button.destroy();
+
+                var len = this._buttonList.length;
+                for (var i = 0; i < len; i++) {
+                    if (this._buttonList[i].get('id') == thisID) {
+                        this._buttonList[i] = null;
+                    }
+                }
+            } else {
+                return false;
+            }
+
+        },
+        /**
+        * @method destroy
+        * @description Destroys the toolbar, all of it's elements and objects.
+        * @return {Boolean}
+        */
+        destroy: function() {
+            this.get('element').innerHTML = '';
+            this.get('element').className = '';
+            //Brutal Object Destroy
+            for (var i in this) {
+                if (Lang.hasOwnProperty(this, i)) {
+                    this[i] = null;
+                }
+            }
+            return true;
+        },
+        /**
+        * @method collapse
+        * @description Programatically collapse the toolbar.
+        * @param {Boolean} collapse True to collapse, false to expand.
+        */
+        collapse: function(collapse) {
+            var el = Dom.getElementsByClassName('collapse', 'span', this._titlebar);
+            if (collapse === false) {
+                Dom.removeClass(this.get('cont').parentNode, 'yui-toolbar-container-collapsed');
+                if (el[0]) {
+                    Dom.removeClass(el[0], 'collapsed');
+                }
+                this.fireEvent('toolbarExpanded', { type: 'toolbarExpanded', target: this });
+            } else {
+                if (el[0]) {
+                    Dom.addClass(el[0], 'collapsed');
+                }
+                Dom.addClass(this.get('cont').parentNode, 'yui-toolbar-container-collapsed');
+                this.fireEvent('toolbarCollapsed', { type: 'toolbarCollapsed', target: this });
+            }
+        },
+        /**
+        * @method toString
+        * @description Returns a string representing the toolbar.
+        * @return {String}
+        */
+        toString: function() {
+            return 'Toolbar (#' + this.get('element').id + ') with ' + this._buttonList.length + ' buttons.';
+        }
+    });
+/**
+* @event buttonClick
+* @param {Object} o The object passed to this handler is the button config used to create the button.
+* @description Fires when any botton receives a click event. Passes back a single object representing the buttons config object. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event valueClick
+* @param {Object} o The object passed to this handler is the button config used to create the button.
+* @description This is a special dynamic event that is created and dispatched based on the value property
+* of the button config. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* Example:
+* <code><pre>
+* buttons : [
+*   { type: 'button', value: 'test', value: 'testButton' }
+* ]</pre>
+* </code>
+* With the valueClick event you could subscribe to this buttons click event with this:
+* tbar.in('testButtonClick', function() { alert('test button clicked'); })
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event toolbarExpanded
+* @description Fires when the toolbar is expanded via the collapse button. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event toolbarCollapsed
+* @description Fires when the toolbar is collapsed via the collapse button. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+})();
+/**
+ * @description <p>The Rich Text Editor is a UI control that replaces a standard HTML textarea; it allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like bold and italic text, and drag-and-drop inclusion and sizing of images. The Rich Text Editor's toolbar is extensible via a plugin architecture so that advanced implementations can achieve a high degree of customization.</p>
+ * @namespace YAHOO.widget
+ * @requires yahoo, dom, element, event, toolbar
+ * @optional animation, container_core
+ * @beta
+ */
+
+(function() {
+var Dom = YAHOO.util.Dom,
+    Event = YAHOO.util.Event,
+    Lang = YAHOO.lang,
+    Toolbar = YAHOO.widget.Toolbar;
+
+    /**
+     * The Rich Text Editor is a UI control that replaces a standard HTML textarea; it allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like bold and italic text, and drag-and-drop inclusion and sizing of images. The Rich Text Editor's toolbar is extensible via a plugin architecture so that advanced implementations can achieve a high degree of customization.
+     * @constructor
+     * @class SimpleEditor
+     * @extends YAHOO.util.Element
+     * @param {String/HTMLElement} el The textarea element to turn into an editor.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+    
+    YAHOO.widget.SimpleEditor = function(el, attrs) {
+
+        var oConfig = {
+            element: null,
+            attributes: (attrs || {})
+        }, id = null;
+
+        if (Lang.isString(el)) {
+            id = el;
+        } else {
+            id = el.id;
+        }
+        oConfig.element = el;
+
+        var element_cont = document.createElement('DIV');
+        oConfig.attributes.element_cont = new YAHOO.util.Element(element_cont, {
+            id: id + '_container'
+        });
+        var div = document.createElement('div');
+        Dom.addClass(div, 'first-child');
+        oConfig.attributes.element_cont.appendChild(div);
+        
+        if (!oConfig.attributes.toolbar_cont) {
+            oConfig.attributes.toolbar_cont = document.createElement('DIV');
+            oConfig.attributes.toolbar_cont.id = id + '_toolbar';
+            div.appendChild(oConfig.attributes.toolbar_cont);
+        }
+        var editorWrapper = document.createElement('DIV');
+        div.appendChild(editorWrapper);
+        oConfig.attributes.editor_wrapper = editorWrapper;
+
+        YAHOO.widget.SimpleEditor.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
+    };
+
+    /**
+    * @private
+    * @method _cleanClassName
+    * @description Makes a useable classname from dynamic data, by dropping it to lowercase and replacing spaces with -'s.
+    * @param {String} str The classname to clean up
+    * @returns {String}
+    */
+    function _cleanClassName(str) {
+        return str.replace(/ /g, '-').toLowerCase();
+    }
+
+
+    YAHOO.extend(YAHOO.widget.SimpleEditor, YAHOO.util.Element, {
+        /**
+        * @property _docType
+        * @description The DOCTYPE to use in the editable container.
+        * @type String
+        */
+        _docType: '<!DOCTYPE HTML PUBLIC "-/'+'/W3C/'+'/DTD HTML 4.01/'+'/EN" "http:/'+'/www.w3.org/TR/html4/strict.dtd">',
+        /**
+        * @property editorDirty
+        * @description This flag will be set when certain things in the Editor happen. It is to be used by the developer to check to see if content has changed.
+        * @type Boolean
+        */
+        editorDirty: false,
+        /**
+        * @property _defaultCSS
+        * @description The default CSS used in the config for 'css'. This way you can add to the config like this: { css: YAHOO.widget.SimpleEditor.prototype._defaultCSS + 'ADD MYY CSS HERE' }
+        * @type String
+        */
+        _defaultCSS: 'html { height: 95%; } body { height: 100%; padding: 7px; background-color: #fff; font:13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small; } a { color: blue; text-decoration: underline; cursor: pointer; } .warning-localfile { border-bottom: 1px dashed red !important; } .yui-busy { cursor: wait !important; } img.selected { border: 2px dotted #808080; } img { cursor: pointer !important; border: none; }',
+        /**
+        * @property _defaultToolbar
+        * @private
+        * @description Default toolbar config.
+        * @type Object
+        */
+        _defaultToolbar: {
+            collapse: true,
+            titlebar: 'Text Editing Tools',
+            draggable: false,
+            buttons: [
+                { group: 'fontstyle', label: 'Font Name and Size',
+                    buttons: [
+                        { type: 'select', label: 'Arial', value: 'fontname', disabled: true,
+                            menu: [
+                                { text: 'Arial', checked: true },
+                                { text: 'Arial Black' },
+                                { text: 'Comic Sans MS' },
+                                { text: 'Courier New' },
+                                { text: 'Lucida Console' },
+                                { text: 'Tahoma' },
+                                { text: 'Times New Roman' },
+                                { text: 'Trebuchet MS' },
+                                { text: 'Verdana' }
+                            ]
+                        },
+                        { type: 'spin', label: '13', value: 'fontsize', range: [ 9, 75 ], disabled: true }
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'textstyle', label: 'Font Style',
+                    buttons: [
+                        { type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' },
+                        { type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' },
+                        { type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' },
+                        { type: 'separator' },
+                        { type: 'color', label: 'Font Color', value: 'forecolor', disabled: true },
+                        { type: 'color', label: 'Background Color', value: 'backcolor', disabled: true }
+                        
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'indentlist', label: 'Lists',
+                    buttons: [
+                        { type: 'push', label: 'Create an Unordered List', value: 'insertunorderedlist' },
+                        { type: 'push', label: 'Create an Ordered List', value: 'insertorderedlist' }
+                    ]
+                },
+                { type: 'separator' },
+                { group: 'insertitem', label: 'Insert Item',
+                    buttons: [
+                        { type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true },
+                        { type: 'push', label: 'Insert Image', value: 'insertimage' }
+                    ]
+                }
+            ]
+        },
+        /**
+        * @property _lastButton
+        * @private
+        * @description The last button pressed, so we don't disable it.
+        * @type Object
+        */
+        _lastButton: null,
+        /**
+        * @property _baseHREF
+        * @private
+        * @description The base location of the editable page (this page) so that relative paths for image work.
+        * @type String
+        */
+        _baseHREF: function() {
+            var href = document.location.href;
+            if (href.indexOf('?') !== -1) { //Remove the query string
+                href = href.substring(0, href.indexOf('?'));
+            }
+            href = href.substring(0, href.lastIndexOf('/')) + '/';
+            return href;
+        }(),
+        /**
+        * @property _lastImage
+        * @private
+        * @description Safari reference for the last image selected (for styling as selected).
+        * @type HTMLElement
+        */
+        _lastImage: null,
+        /**
+        * @property _blankImageLoaded
+        * @private
+        * @description Don't load the blank image more than once..
+        * @type Date
+        */
+        _blankImageLoaded: false,
+        /**
+        * @property _fixNodesTimer
+        * @private
+        * @description Holder for the fixNodes timer
+        * @type Date
+        */
+        _fixNodesTimer: null,
+        /**
+        * @property _nodeChangeTimer
+        * @private
+        * @description Holds a reference to the nodeChange setTimeout call
+        * @type Number
+        */
+        _nodeChangeTimer: null,
+        /**
+        * @property _lastNodeChangeEvent
+        * @private
+        * @description Flag to determine the last event that fired a node change
+        * @type Event
+        */
+        _lastNodeChangeEvent: null,
+        /**
+        * @property _lastNodeChange
+        * @private
+        * @description Flag to determine when the last node change was fired
+        * @type Date
+        */
+        _lastNodeChange: 0,
+        /**
+        * @property _rendered
+        * @private
+        * @description Flag to determine if editor has been rendered or not
+        * @type Boolean
+        */
+        _rendered: false,
+        /**
+        * @property DOMReady
+        * @private
+        * @description Flag to determine if DOM is ready or not
+        * @type Boolean
+        */
+        DOMReady: null,
+        /**
+        * @property _selection
+        * @private
+        * @description Holder for caching iframe selections
+        * @type Object
+        */
+        _selection: null,
+        /**
+        * @property _mask
+        * @private
+        * @description DOM Element holder for the editor Mask when disabled
+        * @type Object
+        */
+        _mask: null,
+        /**
+        * @property _showingHiddenElements
+        * @private
+        * @description Status of the hidden elements button
+        * @type Boolean
+        */
+        _showingHiddenElements: null,
+        /**
+        * @property currentWindow
+        * @description A reference to the currently open EditorWindow
+        * @type Object
+        */
+        currentWindow: null,
+        /**
+        * @property currentEvent
+        * @description A reference to the current editor event
+        * @type Event
+        */
+        currentEvent: null,
+        /**
+        * @property operaEvent
+        * @private
+        * @description setTimeout holder for Opera and Image DoubleClick event..
+        * @type Object
+        */
+        operaEvent: null,
+        /**
+        * @property currentFont
+        * @description A reference to the last font selected from the Toolbar
+        * @type HTMLElement
+        */
+        currentFont: null,
+        /**
+        * @property currentElement
+        * @description A reference to the current working element in the editor
+        * @type Array
+        */
+        currentElement: [],
+        /**
+        * @property dompath
+        * @description A reference to the dompath container for writing the current working dom path to.
+        * @type HTMLElement
+        */
+        dompath: null,
+        /**
+        * @property beforeElement
+        * @description A reference to the H2 placed before the editor for Accessibilty.
+        * @type HTMLElement
+        */
+        beforeElement: null,
+        /**
+        * @property afterElement
+        * @description A reference to the H2 placed after the editor for Accessibilty.
+        * @type HTMLElement
+        */
+        afterElement: null,
+        /**
+        * @property invalidHTML
+        * @description Contains a list of HTML elements that are invalid inside the editor. They will be removed when they are found. If you set the value of a key to "{ keepContents: true }", then the element will be replaced with a yui-non span to be filtered out when cleanHTML is called. The only tag that is ignored here is the span tag as it will force the Editor into a loop and freeze the browser. However.. all of these tags will be removed in the cleanHTML routine.
+        * @type Object
+        */
+        invalidHTML: {
+            form: true,
+            input: true,
+            button: true,
+            select: true,
+            link: true,
+            html: true,
+            body: true,
+            script: true,
+            style: true,
+            textarea: true
+        },
+        /**
+        * @property toolbar
+        * @description Local property containing the <a href="YAHOO.widget.Toolbar.html">YAHOO.widget.Toolbar</a> instance
+        * @type <a href="YAHOO.widget.Toolbar.html">YAHOO.widget.Toolbar</a>
+        */
+        toolbar: null,
+        /**
+        * @private
+        * @property _contentTimer
+        * @description setTimeout holder for documentReady check
+        */
+        _contentTimer: null,
+        /**
+        * @private
+        * @property _contentTimerCounter
+        * @description Counter to check the number of times the body is polled for before giving up
+        * @type Number
+        */
+        _contentTimerCounter: 0,
+        /**
+        * @private
+        * @property _disabled
+        * @description The Toolbar items that should be disabled if there is no selection present in the editor.
+        * @type Array
+        */
+        _disabled: [ 'createlink', 'fontname', 'fontsize', 'forecolor', 'backcolor' ],
+        /**
+        * @private
+        * @property _alwaysDisabled
+        * @description The Toolbar items that should ALWAYS be disabled event if there is a selection present in the editor.
+        * @type Object
+        */
+        _alwaysDisabled: { },
+        /**
+        * @private
+        * @property _alwaysEnabled
+        * @description The Toolbar items that should ALWAYS be enabled event if there isn't a selection present in the editor.
+        * @type Object
+        */
+        _alwaysEnabled: { },
+        /**
+        * @private
+        * @property _semantic
+        * @description The Toolbar commands that we should attempt to make tags out of instead of using styles.
+        * @type Object
+        */
+        _semantic: { 'bold': true, 'italic' : true, 'underline' : true },
+        /**
+        * @private
+        * @property _tag2cmd
+        * @description A tag map of HTML tags to convert to the different types of commands so we can select the proper toolbar button.
+        * @type Object
+        */
+        _tag2cmd: {
+            'b': 'bold',
+            'strong': 'bold',
+            'i': 'italic',
+            'em': 'italic',
+            'u': 'underline',
+            'sup': 'superscript',
+            'sub': 'subscript',
+            'img': 'insertimage',
+            'a' : 'createlink',
+            'ul' : 'insertunorderedlist',
+            'ol' : 'insertorderedlist'
+        },
+
+        /**
+        * @private _createIframe
+        * @description Creates the DOM and YUI Element for the iFrame editor area.
+        * @param {String} id The string ID to prefix the iframe with
+        * @returns {Object} iFrame object
+        */
+        _createIframe: function() {
+            var ifrmDom = document.createElement('iframe');
+            ifrmDom.id = this.get('id') + '_editor';
+            var config = {
+                border: '0',
+                frameBorder: '0',
+                marginWidth: '0',
+                marginHeight: '0',
+                leftMargin: '0',
+                topMargin: '0',
+                allowTransparency: 'true',
+                width: '100%'
+            };
+            for (var i in config) {
+                if (Lang.hasOwnProperty(config, i)) {
+                    ifrmDom.setAttribute(i, config[i]);
+                }
+            }
+            var isrc = 'javascript:;';
+            if (this.browser.ie) {
+                if (window.location.href.toLowerCase().indexOf("https") !== 0) {
+                    isrc = 'about:blank';
+                }
+            }
+            ifrmDom.setAttribute('src', isrc);
+            var ifrm = new YAHOO.util.Element(ifrmDom);
+            //ifrm.setStyle('zIndex', '-1');
+            return ifrm;
+        },
+        /**
+        * @private _isElement
+        * @description Checks to see if an Element reference is a valid one and has a certain tag type
+        * @param {HTMLElement} el The element to check
+        * @param {String} tag The tag that the element needs to be
+        * @returns {Boolean}
+        */
+        _isElement: function(el, tag) {
+            if (el && el.tagName && (el.tagName.toLowerCase() == tag)) {
+                return true;
+            }
+            if (el && el.getAttribute && (el.getAttribute('tag') == tag)) {
+                return true;
+            }
+            return false;
+        },
+        /**
+        * @private _hasParent
+        * @description Checks to see if an Element reference or one of it's parents is a valid one and has a certain tag type
+        * @param {HTMLElement} el The element to check
+        * @param {String} tag The tag that the element needs to be
+        * @returns HTMLElement
+        */
+        _hasParent: function(el, tag) {
+            if (!el || !el.parentNode) {
+                return false;
+            }
+            
+            while (el.parentNode) {
+                if (this._isElement(el, tag)) {
+                    return el;
+                }
+                if (el.parentNode) {
+                    el = el.parentNode;
+                } else {
+                    return false;
+                }
+            }
+            return false;
+        },
+        /**
+        * @private
+        * @method _getDoc
+        * @description Get the Document of the IFRAME
+        * @return {Object}
+        */
+        _getDoc: function() {
+            var value = false;
+            if (this.get) {
+                if (this.get('iframe')) {
+                    if (this.get('iframe').get) {
+                        if (this.get('iframe').get('element')) {
+                            try {
+                                if (this.get('iframe').get('element').contentWindow) {
+                                    if (this.get('iframe').get('element').contentWindow.document) {
+                                        value = this.get('iframe').get('element').contentWindow.document;
+                                        return value;
+                                    }
+                                }
+                            } catch (e) {}
+                        }
+                    }
+                }
+            }
+            return false;
+        },
+        /**
+        * @private
+        * @method _getWindow
+        * @description Get the Window of the IFRAME
+        * @return {Object}
+        */
+        _getWindow: function() {
+            return this.get('iframe').get('element').contentWindow;
+        },
+        /**
+        * @private
+        * @method _focusWindow
+        * @description Attempt to set the focus of the iframes window.
+        * @param {Boolean} onLoad Safari needs some special care to set the cursor in the iframe
+        */
+        _focusWindow: function(onLoad) {
+            if (this.browser.webkit) {
+                if (onLoad) {
+                    /**
+                    * @knownissue Safari Cursor Position
+                    * @browser Safari 2.x
+                    * @description Can't get Safari to place the cursor at the beginning of the text..
+                    * This workaround at least set's the toolbar into the proper state.
+                    */
+                    this._getSelection().setBaseAndExtent(this._getDoc().body.firstChild, 0, this._getDoc().body.firstChild, 1);
+                    if (this.browser.webkit3) {
+                        this._getSelection().collapseToStart();
+                    } else {
+                        this._getSelection().collapse(false);
+                    }
+                } else {
+                    this._getSelection().setBaseAndExtent(this._getDoc().body, 1, this._getDoc().body, 1);
+                    if (this.browser.webkit3) {
+                        this._getSelection().collapseToStart();
+                    } else {
+                        this._getSelection().collapse(false);
+                    }
+                }
+                this._getWindow().focus();
+            } else {
+                this._getWindow().focus();
+            }
+        },
+        /**
+        * @private
+        * @method _hasSelection
+        * @description Determines if there is a selection in the editor document.
+        * @returns {Boolean}
+        */
+        _hasSelection: function() {
+            var sel = this._getSelection();
+            var range = this._getRange();
+            var hasSel = false;
+
+            //Internet Explorer
+            if (this.browser.ie || this.browser.opera) {
+                if (range.text) {
+                    hasSel = true;
+                }
+                if (range.html) {
+                    hasSel = true;
+                }
+            } else {
+                if (this.browser.webkit) {
+                    if (sel+'' !== '') {
+                        hasSel = true;
+                    }
+                } else {
+                    if (sel && (sel.toString() !== '') && (sel !== undefined)) {
+                        hasSel = true;
+                    }
+                }
+            }
+            return hasSel;
+        },
+        /**
+        * @private
+        * @method _getSelection
+        * @description Handles the different selection objects across the A-Grade list.
+        * @returns {Object} Selection Object
+        */
+        _getSelection: function() {
+            var _sel = null;
+            if (this._getDoc() && this._getWindow()) {
+                if (this._getDoc().selection) {
+                    _sel = this._getDoc().selection;
+                } else {
+                    _sel = this._getWindow().getSelection();
+                }
+                //Handle Safari's lack of Selection Object
+                if (this.browser.webkit) {
+                    if (_sel.baseNode) {
+                            this._selection = {};
+                            this._selection.baseNode = _sel.baseNode;
+                            this._selection.baseOffset = _sel.baseOffset;
+                            this._selection.extentNode = _sel.extentNode;
+                            this._selection.extentOffset = _sel.extentOffset;
+                    } else if (this._selection !== null) {
+                        _sel = this._getWindow().getSelection();
+                        _sel.setBaseAndExtent(
+                            this._selection.baseNode,
+                            this._selection.baseOffset,
+                            this._selection.extentNode,
+                            this._selection.extentOffset);
+                        this._selection = null;
+                    }
+                }
+            }
+            return _sel;
+        },
+        /**
+        * @private
+        * @method _selectNode
+        * @description Places the highlight around a given node
+        * @param {HTMLElement} node The node to select
+        */
+        _selectNode: function(node) {
+            if (!node) {
+                return false;
+            }
+            var sel = this._getSelection(),
+                range = null;
+
+            if (this.browser.ie) {
+                try { //IE freaks out here sometimes..
+                    range = this._getDoc().body.createTextRange();
+                    range.moveToElementText(node);
+                    range.select();
+                } catch (e) {
+                }
+            } else if (this.browser.webkit) {
+				sel.setBaseAndExtent(node, 0, node, node.innerText.length);
+            } else if (this.browser.opera) {
+                sel = this._getWindow().getSelection();
+                range = this._getDoc().createRange();
+                range.selectNode(node);
+                sel.removeAllRanges();
+                sel.addRange(range);
+            } else {
+                range = this._getDoc().createRange();
+                range.selectNodeContents(node);
+                sel.removeAllRanges();
+                sel.addRange(range);
+            }
+        },
+        /**
+        * @private
+        * @method _getRange
+        * @description Handles the different range objects across the A-Grade list.
+        * @returns {Object} Range Object
+        */
+        _getRange: function() {
+            var sel = this._getSelection();
+
+            if (sel === null) {
+                return null;
+            }
+
+            if (this.browser.webkit && !sel.getRangeAt) {
+                var _range = this._getDoc().createRange();
+                try {
+                    _range.setStart(sel.anchorNode, sel.anchorOffset);
+                    _range.setEnd(sel.focusNode, sel.focusOffset);
+                } catch (e) {
+                    _range = this._getWindow().getSelection()+'';
+                }
+                return _range;
+            }
+
+            if (this.browser.ie || this.browser.opera) {
+                return sel.createRange();
+            }
+
+            if (sel.rangeCount > 0) {
+                return sel.getRangeAt(0);
+            }
+            return null;
+        },
+        /**
+        * @private
+        * @method _setDesignMode
+        * @description Sets the designMode of the iFrame document.
+        * @param {String} state This should be either on or off
+        */
+        _setDesignMode: function(state) {
+            try {
+                this._getDoc().designMode = state;
+            } catch(e) { }
+        },
+        /**
+        * @private
+        * @method _toggleDesignMode
+        * @description Toggles the designMode of the iFrame document on and off.
+        * @returns {String} The state that it was set to.
+        */
+        _toggleDesignMode: function() {
+            var _dMode = this._getDoc().designMode.toLowerCase(),
+                _state = 'on';
+            if (_dMode == 'on') {
+                _state = 'off';
+            }
+            this._setDesignMode(_state);
+            return _state;
+        },
+        /**
+        * @private
+        * @method _initEditor
+        * @description This method is fired from _checkLoaded when the document is ready. It turns on designMode and set's up the listeners.
+        */
+        _initEditor: function() {
+            if (this.browser.ie) {
+                this._getDoc().body.style.margin = '0';
+            }
+            if (!this.get('disabled')) {
+                this._setDesignMode('on');
+            }
+            
+            this.toolbar.on('buttonClick', this._handleToolbarClick, this, true);
+            //Setup Listeners on iFrame
+            Event.on(this._getDoc(), 'mouseup', this._handleMouseUp, this, true);
+            Event.on(this._getDoc(), 'mousedown', this._handleMouseDown, this, true);
+            Event.on(this._getDoc(), 'click', this._handleClick, this, true);
+            Event.on(this._getDoc(), 'dblclick', this._handleDoubleClick, this, true);
+            Event.on(this._getDoc(), 'keypress', this._handleKeyPress, this, true);
+            Event.on(this._getDoc(), 'keyup', this._handleKeyUp, this, true);
+            Event.on(this._getDoc(), 'keydown', this._handleKeyDown, this, true);
+            if (!this.get('disabled')) {
+                this.toolbar.set('disabled', false);
+            }
+            this.fireEvent('editorContentLoaded', { type: 'editorLoaded', target: this });
+            if (this.get('dompath')) {
+                var self = this;
+                setTimeout(function() {
+                    self._writeDomPath.call(self);
+                }, 150);
+            }
+            this.nodeChange(true);
+            this._setBusy(true);
+        },
+        /**
+        * @private
+        * @method _checkLoaded
+        * @description Called from a setTimeout loop to check if the iframes body.onload event has fired, then it will init the editor.
+        */
+        _checkLoaded: function() {
+            this._contentTimerCounter++;
+            if (this._contentTimer) {
+                clearTimeout(this._contentTimer);
+            }
+            if (this._contentTimerCounter > 250) {
+                return false;
+            }
+            var init = false;
+            try {
+                if (this._getDoc() && this._getDoc().body && (this._getDoc().body._rteLoaded === true)) {
+                    init = true;
+                }
+            } catch (e) {
+                init = false;
+            }
+
+            if (init === true) {
+                //The onload event has fired, clean up after ourselves and fire the _initEditor method
+                this._initEditor();
+            } else {
+                var self = this;
+                this._contentTimer = setTimeout(function() {
+                    self._checkLoaded.call(self);
+                }, 20);
+            }
+        },
+        /**
+        * @private
+        * @method _setInitialContent
+        * @description This method will open the iframes content document and write the textareas value into it, then start the body.onload checking.
+        */
+        _setInitialContent: function() {
+            var html = Lang.substitute(this.get('html'), {
+                TITLE: this.STR_TITLE,
+                CONTENT: this._cleanIncomingHTML(this.get('element').value),
+                CSS: this.get('css'),
+                HIDDEN_CSS: ((this.get('hiddencss')) ? this.get('hiddencss') : '/* No Hidden CSS */'),
+                EXTRA_CSS: ((this.get('extracss')) ? this.get('extracss') : '/* No Extra CSS */')
+            }),
+            check = true;
+            if (document.compatMode != 'BackCompat') {
+                html = this._docType + "\n" + html;
+            } else {
+            }
+
+            if (this.browser.ie || this.browser.webkit || this.browser.opera || (navigator.userAgent.indexOf('Firefox/1.5') != -1)) {
+                //Firefox 1.5 doesn't like setting designMode on an document created with a data url
+                try {
+                    this._getDoc().open();
+                    this._getDoc().write(html);
+                    this._getDoc().close();
+                } catch (e) {
+                    //Safari will only be here if we are hidden
+                    check = false;
+                }
+            } else {
+                //This keeps Firefox 2 from writing the iframe to history preserving the back buttons functionality
+                this.get('iframe').get('element').src = 'data:text/html;charset=utf-8,' + encodeURIComponent(html);
+            }
+            if (check) {
+                this._checkLoaded();
+            }
+        },
+        /**
+        * @private
+        * @method _setMarkupType
+        * @param {String} action The action to take. Possible values are: css, default or semantic
+        * @description This method will turn on/off the useCSS execCommand.
+        */
+        _setMarkupType: function(action) {
+            switch (this.get('markup')) {
+                case 'css':
+                    this._setEditorStyle(true);
+                    break;
+                case 'default':
+                    this._setEditorStyle(false);
+                    break;
+                case 'semantic':
+                case 'xhtml':
+                    if (this._semantic[action]) {
+                        this._setEditorStyle(false);
+                    } else {
+                        this._setEditorStyle(true);
+                    }
+                    break;
+            }
+        },
+        /**
+        * Set the editor to use CSS instead of HTML
+        * @param {Booleen} stat True/False
+        */
+        _setEditorStyle: function(stat) {
+            try {
+                this._getDoc().execCommand('useCSS', false, !stat);
+            } catch (ex) {
+            }
+        },
+        /**
+        * @private
+        * @method _getSelectedElement
+        * @description This method will attempt to locate the element that was last interacted with, either via selection, location or event.
+        * @returns {HTMLElement} The currently selected element.
+        */
+        _getSelectedElement: function() {
+            var doc = this._getDoc(),
+                range = null,
+                sel = null,
+                elm = null;
+
+            if (this.browser.ie) {
+                this.currentEvent = this._getWindow().event; //Event utility assumes window.event, so we need to reset it to this._getWindow().event;
+                range = this._getRange();
+                if (range) {
+                    elm = range.item ? range.item(0) : range.parentElement();
+                    if (elm == doc.body) {
+                        elm = null;
+                    }
+                }
+                if ((this.currentEvent !== null) && (this.currentEvent.keyCode === 0)) {
+                    elm = Event.getTarget(this.currentEvent);
+                }
+            } else {
+                sel = this._getSelection();
+                range = this._getRange();
+
+                if (!sel || !range) {
+                    return null;
+                }
+                if (!this._hasSelection()) {
+                    if (sel.anchorNode && (sel.anchorNode.nodeType == 3)) {
+                        if (sel.anchorNode.parentNode) { //next check parentNode
+                            elm = sel.anchorNode.parentNode;
+                        }
+                        if (sel.anchorNode.nextSibling != sel.focusNode.nextSibling) {
+                            elm = sel.anchorNode.nextSibling;
+                        }
+                    }
+                    if (this._isElement(elm, 'br')) {
+                        elm = null;
+                    }
+                    if (!elm) {
+                        elm = range.commonAncestorContainer;
+                        if (!range.collapsed) {
+                            if (range.startContainer == range.endContainer) {
+                                if (range.startOffset - range.endOffset < 2) {
+                                    if (range.startContainer.hasChildNodes()) {
+                                        elm = range.startContainer.childNodes[range.startOffset];
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            if (this.currentEvent !== null) {
+                try {
+                    switch (this.currentEvent.type) {
+                        case 'click':
+                        case 'mousedown':
+                        case 'mouseup':
+                            elm = Event.getTarget(this.currentEvent);
+                            break;
+                        default:
+                            //Do nothing
+                            break;
+                    }
+                } catch (e) {
+                }
+            } else if (this.currentElement && this.currentElement[0]) {
+                elm = this.currentElement[0];
+            }
+            if (this.browser.opera || this.browser.webkit) {
+                if (this.currentEvent && !elm) {
+                    elm = YAHOO.util.Event.getTarget(this.currentEvent);
+                }
+            }
+            if (!elm || !elm.tagName) {
+                elm = doc.body;
+            }
+            if (this._isElement(elm, 'html')) {
+                //Safari sometimes gives us the HTML node back..
+                elm = doc.body;
+            }
+            if (this._isElement(elm, 'body')) {
+                //make sure that body means this body not the parent..
+                elm = doc.body;
+            }
+            if (elm && !elm.parentNode) { //Not in document
+                elm = doc.body;
+            }
+            if (elm === undefined) {
+                elm = null;
+            }
+            return elm;
+        },
+        /**
+        * @private
+        * @method _getDomPath
+        * @description This method will attempt to build the DOM path from the currently selected element.
+        * @param HTMLElement el The element to start with, if not provided _getSelectedElement is used
+        * @returns {Array} An array of node references that will create the DOM Path.
+        */
+        _getDomPath: function(el) {
+            if (!el) {
+			    el = this._getSelectedElement();
+            }
+			var domPath = [];
+            while (el !== null) {
+                if (el.ownerDocument != this._getDoc()) {
+                    el = null;
+                    break;
+                }
+                //Check to see if we get el.nodeName and nodeType
+                if (el.nodeName && el.nodeType && (el.nodeType == 1)) {
+                    domPath[domPath.length] = el;
+                }
+
+                if (this._isElement(el, 'body')) {
+                    break;
+                }
+
+                el = el.parentNode;
+            }
+            if (domPath.length === 0) {
+                if (this._getDoc() && this._getDoc().body) {
+                    domPath[0] = this._getDoc().body;
+                }
+            }
+            return domPath.reverse();
+        },
+        /**
+        * @private
+        * @method _writeDomPath
+        * @description Write the current DOM path out to the dompath container below the editor.
+        */
+        _writeDomPath: function() { 
+            var path = this._getDomPath(),
+                pathArr = [],
+                classPath = '',
+                pathStr = '';
+            for (var i = 0; i < path.length; i++) {
+                var tag = path[i].tagName.toLowerCase();
+                if ((tag == 'ol') && (path[i].type)) {
+                    tag += ':' + path[i].type;
+                }
+                if (Dom.hasClass(path[i], 'yui-tag')) {
+                    tag = path[i].getAttribute('tag');
+                }
+                if ((this.get('markup') == 'semantic') || (this.get('markup') == 'xhtml')) {
+                    switch (tag) {
+                        case 'b': tag = 'strong'; break;
+                        case 'i': tag = 'em'; break;
+                    }
+                }
+                if (!Dom.hasClass(path[i], 'yui-non')) {
+                    if (Dom.hasClass(path[i], 'yui-tag')) {
+                        pathStr = tag;
+                    } else {
+                        classPath = ((path[i].className !== '') ? '.' + path[i].className.replace(/ /g, '.') : '');
+                        if ((classPath.indexOf('yui') != -1) || (classPath.toLowerCase().indexOf('apple-style-span') != -1)) {
+                            classPath = '';
+                        }
+                        pathStr = tag + ((path[i].id) ? '#' + path[i].id : '') + classPath;
+                    }
+                    switch (tag) {
+                        case 'a':
+                            if (path[i].getAttribute('href', 2)) {
+                                pathStr += ':' + path[i].getAttribute('href', 2).replace('mailto:', '').replace('http:/'+'/', '').replace('https:/'+'/', ''); //May need to add others here ftp
+                            }
+                            break;
+                        case 'img':
+                            var h = path[i].height;
+                            var w = path[i].width;
+                            if (path[i].style.height) {
+                                h = parseInt(path[i].style.height, 10);
+                            }
+                            if (path[i].style.width) {
+                                w = parseInt(path[i].style.width, 10);
+                            }
+                            pathStr += '(' + h + 'x' + w + ')';
+                        break;
+                    }
+
+                    if (pathStr.length > 10) {
+                        pathStr = '<span title="' + pathStr + '">' + pathStr.substring(0, 10) + '...' + '</span>';
+                    } else {
+                        pathStr = '<span title="' + pathStr + '">' + pathStr + '</span>';
+                    }
+                    pathArr[pathArr.length] = pathStr;
+                }
+            }
+            var str = pathArr.join(' ' + this.SEP_DOMPATH + ' ');
+            //Prevent flickering
+            if (this.dompath.innerHTML != str) {
+                this.dompath.innerHTML = str;
+            }
+        },
+        /**
+        * @private
+        * @method _fixNodes
+        * @description Fix href and imgs as well as remove invalid HTML.
+        */
+        _fixNodes: function() {
+            var doc = this._getDoc(),
+                els = [];
+
+            for (var v in this.invalidHTML) {
+                if (YAHOO.lang.hasOwnProperty(this.invalidHTML, v)) {
+                    if (v.toLowerCase() != 'span') {
+                        var tags = doc.body.getElementsByTagName(v);
+                        if (tags.length) {
+                            for (var i = 0; i < tags.length; i++) {
+                                els.push(tags[i]);
+                            }
+                        }
+                    }
+                }
+            }
+            for (var h = 0; h < els.length; h++) {
+                if (els[h].parentNode) {
+                    if (Lang.isObject(this.invalidHTML[els[h].tagName.toLowerCase()]) && this.invalidHTML[els[h].tagName.toLowerCase()].keepContents) {
+                        this._swapEl(els[h], 'span', function(el) {
+                            el.className = 'yui-non';
+                        });
+                    } else {
+                        els[h].parentNode.removeChild(els[h]);
+                    }
+                }
+            }
+            var imgs = this._getDoc().getElementsByTagName('img');
+            Dom.addClass(imgs, 'yui-img');   
+        },
+        /**
+        * @private
+        * @method _isNonEditable
+        * @param Event ev The Dom event being checked
+        * @description Method is called at the beginning of all event handlers to check if this element or a parent element has the class yui-noedit (this.CLASS_NOEDIT) applied.
+        * If it does, then this method will stop the event and return true. The event handlers will then return false and stop the nodeChange from occuring. This method will also
+        * disable and enable the Editor's toolbar based on the noedit state.
+        * @returns Boolean
+        */
+        _isNonEditable: function(ev) {
+            if (this.get('allowNoEdit')) {
+                var el = Event.getTarget(ev);
+                if (this._isElement(el, 'html')) {
+                    el = null;
+                }
+                var path = this._getDomPath(el);
+                for (var i = (path.length - 1); i > -1; i--) {
+                    if (Dom.hasClass(path[i], this.CLASS_NOEDIT)) {
+                        //if (this.toolbar.get('disabled') === false) {
+                        //    this.toolbar.set('disabled', true);
+                        //}
+                        try {
+                             this._getDoc().execCommand('enableObjectResizing', false, 'false');
+                        } catch (e) {}
+                        this.nodeChange();
+                        Event.stopEvent(ev);
+                        return true;
+                    }
+                }
+                //if (this.toolbar.get('disabled') === true) {
+                    //Should only happen once..
+                    //this.toolbar.set('disabled', false);
+                    try {
+                         this._getDoc().execCommand('enableObjectResizing', false, 'true');
+                    } catch (e) {}
+                //}
+            }
+            return false;
+        },
+        /**
+        * @private
+        * @method _setCurrentEvent
+        * @param {Event} ev The event to cache
+        * @description Sets the current event property
+        */
+        _setCurrentEvent: function(ev) {
+            this.currentEvent = ev;
+        },
+        /**
+        * @private
+        * @method _handleClick
+        * @param {Event} ev The event we are working on.
+        * @description Handles all click events inside the iFrame document.
+        */
+        _handleClick: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            this._setCurrentEvent(ev);
+            if (this.currentWindow) {
+                this.closeWindow();
+            }
+            if (YAHOO.widget.EditorInfo.window.win && YAHOO.widget.EditorInfo.window.scope) {
+                YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);
+            }
+            if (this.browser.webkit) {
+                var tar =Event.getTarget(ev);
+                if (this._isElement(tar, 'a') || this._isElement(tar.parentNode, 'a')) {
+                    Event.stopEvent(ev);
+                    this.nodeChange();
+                }
+            } else {
+                this.nodeChange();
+            }
+        },
+        /**
+        * @private
+        * @method _handleMouseUp
+        * @param {Event} ev The event we are working on.
+        * @description Handles all mouseup events inside the iFrame document.
+        */
+        _handleMouseUp: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            //Don't set current event for mouseup.
+            //It get's fired after a menu is closed and gives up a bogus event to work with
+            //this._setCurrentEvent(ev);
+            var self = this;
+            if (this.browser.opera) {
+                /**
+                * @knownissue Opera appears to stop the MouseDown, Click and DoubleClick events on an image inside of a document with designMode on..
+                * @browser Opera
+                * @description This work around traps the MouseUp event and sets a timer to check if another MouseUp event fires in so many seconds. If another event is fired, they we internally fire the DoubleClick event.
+                */
+                var sel = Event.getTarget(ev);
+                if (this._isElement(sel, 'img')) {
+                    this.nodeChange();
+                    if (this.operaEvent) {
+                        clearTimeout(this.operaEvent);
+                        this.operaEvent = null;
+                        this._handleDoubleClick(ev);
+                    } else {
+                        this.operaEvent = window.setTimeout(function() {
+                            self.operaEvent = false;
+                        }, 700);
+                    }
+                }
+            }
+            //This will stop Safari from selecting the entire document if you select all the text in the editor
+            if (this.browser.webkit || this.browser.opera) {
+                if (this.browser.webkit) {
+                    Event.stopEvent(ev);
+                }
+            }
+            this.nodeChange();
+            this.fireEvent('editorMouseUp', { type: 'editorMouseUp', target: this, ev: ev });
+        },
+        /**
+        * @private
+        * @method _handleMouseDown
+        * @param {Event} ev The event we are working on.
+        * @description Handles all mousedown events inside the iFrame document.
+        */
+        _handleMouseDown: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            this._setCurrentEvent(ev);
+            var sel = Event.getTarget(ev);
+            if (this.browser.webkit && this._hasSelection()) {
+                var _sel = this._getSelection();
+                if (!this.browser.webkit3) {
+                    _sel.collapse(true);
+                } else {
+                    _sel.collapseToStart();
+                }
+            }
+            if (this.browser.webkit && this._lastImage) {
+                Dom.removeClass(this._lastImage, 'selected');
+                this._lastImage = null;
+            }
+            if (this._isElement(sel, 'img') || this._isElement(sel, 'a')) {
+                if (this.browser.webkit) {
+                    Event.stopEvent(ev);
+                    if (this._isElement(sel, 'img')) {
+                        Dom.addClass(sel, 'selected');
+                        this._lastImage = sel;
+                    }
+                }
+                this.nodeChange();
+            }
+            this.fireEvent('editorMouseDown', { type: 'editorMouseDown', target: this, ev: ev });
+        },
+        /**
+        * @private
+        * @method _handleDoubleClick
+        * @param {Event} ev The event we are working on.
+        * @description Handles all doubleclick events inside the iFrame document.
+        */
+        _handleDoubleClick: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            this._setCurrentEvent(ev);
+            var sel = Event.getTarget(ev);
+            if (this._isElement(sel, 'img')) {
+                this.currentElement[0] = sel;
+                this.toolbar.fireEvent('insertimageClick', { type: 'insertimageClick', target: this.toolbar });
+                this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
+            } else if (this._hasParent(sel, 'a')) { //Handle elements inside an a
+                this.currentElement[0] = this._hasParent(sel, 'a');
+                this.toolbar.fireEvent('createlinkClick', { type: 'createlinkClick', target: this.toolbar });
+                this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
+            }
+            this.nodeChange();
+            this.editorDirty = false;
+            this.fireEvent('editorDoubleClick', { type: 'editorDoubleClick', target: this, ev: ev });
+        },
+        /**
+        * @private
+        * @method _handleKeyUp
+        * @param {Event} ev The event we are working on.
+        * @description Handles all keyup events inside the iFrame document.
+        */
+        _handleKeyUp: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            this._setCurrentEvent(ev);
+            switch (ev.keyCode) {
+                case 37: //Left Arrow
+                case 38: //Up Arrow
+                case 39: //Right Arrow
+                case 40: //Down Arrow
+                case 46: //Forward Delete
+                case 8: //Delete
+                case 87: //W key if window is open
+                    if ((ev.keyCode == 87) && this.currentWindow && ev.shiftKey && ev.ctrlKey) {
+                        this.closeWindow();
+                    } else {
+                        if (!this.browser.ie) {
+                            if (this._nodeChangeTimer) {
+                                clearTimeout(this._nodeChangeTimer);
+                            }
+                            var self = this;
+                            this._nodeChangeTimer = setTimeout(function() {
+                                self._nodeChangeTimer = null;
+                                self.nodeChange.call(self);
+                            }, 100);
+                        } else {
+                            this.nodeChange();
+                        }
+                        this.editorDirty = true;
+                    }
+                    break;
+            }
+            this.fireEvent('editorKeyUp', { type: 'editorKeyUp', target: this, ev: ev });
+        },
+        /**
+        * @private
+        * @method _handleKeyPress
+        * @param {Event} ev The event we are working on.
+        * @description Handles all keypress events inside the iFrame document.
+        */
+        _handleKeyPress: function(ev) {
+            if (this.get('allowNoEdit')) {
+                if (ev && ev.keyCode && ((ev.keyCode == 46) || ev.keyCode == 63272)) {
+                    //Forward delete key
+                    Event.stopEvent(ev);
+                }
+            }
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            this._setCurrentEvent(ev);
+            if (this.browser.webkit) {
+                if (!this.browser.webkit3) {
+                    if (ev.keyCode && (ev.keyCode == 122) && (ev.metaKey)) {
+                        //This is CMD + z (for undo)
+                        if (this._hasParent(this._getSelectedElement(), 'li')) {
+                            Event.stopEvent(ev);
+                        }
+                    }
+                }
+                /* This was removed because it crashes Safari 2.x in some cases
+                if (ev.keyCode && (ev.keyCode == 8)) {
+                    //Delete Key
+                    if (this._isElement(this._getSelectedElement(), 'br')) {
+                        var el = this._getSelectedElement();
+                        el.parentNode.removeChild(el);
+                    }
+                }
+                */
+                this._listFix(ev);
+            }
+            this.fireEvent('editorKeyPress', { type: 'editorKeyPress', target: this, ev: ev });
+        },
+        /**
+        * @private
+        * @method _listFix
+        * @param {Event} ev The event we are working on.
+        * @description Handles the Enter key, Tab Key and Shift + Tab keys for List Items.
+        */
+        _listFix: function(ev) {
+            var testLi = null, par = null, preContent = false, range = null;
+            //Enter Key
+            if (this.browser.webkit) {
+                if (ev.keyCode && (ev.keyCode == 13)) {
+                    if (this._hasParent(this._getSelectedElement(), 'li')) {
+                        var tar = this._hasParent(this._getSelectedElement(), 'li');
+                        var li = this._getDoc().createElement('li');
+                        li.innerHTML = '<span class="yui-non"> </span> ';
+                        if (tar.nextSibling) {
+                            tar.parentNode.insertBefore(li, tar.nextSibling);
+                        } else {
+                            tar.parentNode.appendChild(li);
+                        }
+                        this.currentElement[0] = li;
+                        this._selectNode(li.firstChild);
+                        if (!this.browser.webkit3) {
+                            tar.parentNode.style.display = 'list-item';
+                            setTimeout(function() {
+                                tar.parentNode.style.display = 'block';
+                            }, 1);
+                        }
+                        Event.stopEvent(ev);
+                    }
+                }
+            }
+            //Shift + Tab Key
+            if (ev.keyCode && ((!this.browser.webkit3 && (ev.keyCode == 25)) || ((this.browser.webkit3 || !this.browser.webkit) && ((ev.keyCode == 9) && ev.shiftKey)))) {
+                testLi = this._getSelectedElement();
+                if (this._hasParent(testLi, 'li')) {
+                    testLi = this._hasParent(testLi, 'li');
+                    if (this._hasParent(testLi, 'ul') || this._hasParent(testLi, 'ol')) {
+                        par = this._hasParent(testLi, 'ul');
+                        if (!par) {
+                            par = this._hasParent(testLi, 'ol');
+                        }
+                        if (this._isElement(par.previousSibling, 'li')) {
+                            par.removeChild(testLi);
+                            par.parentNode.insertBefore(testLi, par.nextSibling);
+                            if (this.browser.ie) {
+                                range = this._getDoc().body.createTextRange();
+                                range.moveToElementText(testLi);
+                                range.collapse(false);
+                                range.select();
+                            }
+                            if (this.browser.webkit) {
+                                if (!this.browser.webkit3) {
+                                    par.style.display = 'list-item';
+                                    par.parentNode.style.display = 'list-item';
+                                    setTimeout(function() {
+                                        par.style.display = 'block';
+                                        par.parentNode.style.display = 'block';
+                                    }, 1);
+                                }
+                            }
+                            Event.stopEvent(ev);
+                        }
+                    }
+                }
+            }
+            //Tab Key
+            if (ev.keyCode && ((ev.keyCode == 9) && (!ev.shiftKey))) {
+                var preLi = this._getSelectedElement();
+                if (this._hasParent(preLi, 'li')) {
+                    preContent = this._hasParent(preLi, 'li').innerHTML;
+                }
+                if (this.browser.webkit) {
+                    this._getDoc().execCommand('inserttext', false, '\t');
+                }
+                testLi = this._getSelectedElement();
+                if (this._hasParent(testLi, 'li')) {
+                    par = this._hasParent(testLi, 'li');
+                    var newUl = this._getDoc().createElement(par.parentNode.tagName.toLowerCase());
+                    if (this.browser.webkit) {
+                        var span = Dom.getElementsByClassName('Apple-tab-span', 'span', par);
+                        //Remove the span element that Safari puts in
+                        if (span[0]) {
+                            par.removeChild(span[0]);
+                            par.innerHTML = Lang.trim(par.innerHTML);
+                            //Put the HTML from the LI into this new LI
+                            if (preContent) {
+                                par.innerHTML = '<span class="yui-non">' + preContent + '</span> ';
+                            } else {
+                                par.innerHTML = '<span class="yui-non"> </span> ';
+                            }
+                        }
+                    } else {
+                        if (preContent) {
+                            par.innerHTML = preContent + ' ';
+                        } else {
+                            par.innerHTML = ' ';
+                        }
+                    }
+
+                    par.parentNode.replaceChild(newUl, par);
+                    newUl.appendChild(par);
+                    if (this.browser.webkit) {
+                        this._getSelection().setBaseAndExtent(par.firstChild, 1, par.firstChild, par.firstChild.innerText.length);
+                        if (!this.browser.webkit3) {
+                            par.parentNode.parentNode.style.display = 'list-item';
+                            setTimeout(function() {
+                                par.parentNode.parentNode.style.display = 'block';
+                            }, 1);
+                        }
+                    } else if (this.browser.ie) {
+                        range = this._getDoc().body.createTextRange();
+                        range.moveToElementText(par);
+                        range.collapse(false);
+                        range.select();
+                    } else {
+                        this._selectNode(par);
+                    }
+                    Event.stopEvent(ev);
+                }
+                if (this.browser.webkit) {
+                    Event.stopEvent(ev);
+                }
+                this.nodeChange();
+            }
+        },
+        /**
+        * @private
+        * @method _handleKeyDown
+        * @param {Event} ev The event we are working on.
+        * @description Handles all keydown events inside the iFrame document.
+        */
+        _handleKeyDown: function(ev) {
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            this._setCurrentEvent(ev);
+            if (this.currentWindow) {
+                this.closeWindow();
+            }
+            if (YAHOO.widget.EditorInfo.window.win && YAHOO.widget.EditorInfo.window.scope) {
+                YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);
+            }
+            var doExec = false,
+                action = null,
+                exec = false;
+
+            if (ev.shiftKey && ev.ctrlKey) {
+                doExec = true;
+            }
+            switch (ev.keyCode) {
+                case 84: //Focus Toolbar Header -- Ctrl + Shift + T
+                    if (ev.shiftKey && ev.ctrlKey) {
+                        this.toolbar._titlebar.firstChild.focus();
+                        Event.stopEvent(ev);
+                        doExec = false;
+                    }
+                    break;
+                case 27: //Focus After Element - Ctrl + Shift + Esc
+                    if (ev.shiftKey) {
+                        this.afterElement.focus();
+                        Event.stopEvent(ev);
+                        exec = false;
+                    }
+                    break;
+                case 76: //L
+                    if (this._hasSelection()) {
+                        if (ev.shiftKey && ev.ctrlKey) {
+                            var makeLink = true;
+                            if (this.get('limitCommands')) {
+                                if (!this.toolbar.getButtonByValue('createlink')) {
+                                    makeLink = false;
+                                }
+                            }
+                            if (makeLink) {
+                                this.execCommand('createlink', '');
+                                this.toolbar.fireEvent('createlinkClick', { type: 'createlinkClick', target: this.toolbar });
+                                this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
+                                doExec = false;
+                            }
+                        }
+                    }
+                    break;
+                case 65:
+                    if (ev.metaKey && this.browser.webkit) {
+                        Event.stopEvent(ev);
+                        //Override Safari's select all and select the contents of the editor not the iframe as Safari would by default.
+                        this._getSelection().setBaseAndExtent(this._getDoc().body, 1, this._getDoc().body, this._getDoc().body.innerHTML.length);
+                    }
+                    break;
+                case 66: //B
+                    action = 'bold';
+                    break;
+                case 73: //I
+                    action = 'italic';
+                    break;
+                case 85: //U
+                    action = 'underline';
+                    break;
+                case 13:
+                    if (this.browser.ie) {
+                        //Insert a <br> instead of a <p></p> in Internet Explorer
+                        var _range = this._getRange();
+                        var tar = this._getSelectedElement();
+                        if (!this._isElement(tar, 'li')) {
+                            if (_range) {
+                                _range.pasteHTML('<br>');
+                                _range.collapse(false);
+                                _range.select();
+                            }
+                            Event.stopEvent(ev);
+                        }
+                    }
+            }
+            //if (!this.browser.gecko && !this.browser.webkit) {
+            if (this.browser.ie) {
+                this._listFix(ev);
+            }
+            if (doExec && action) {
+                this.execCommand(action, null);
+                Event.stopEvent(ev);
+                this.nodeChange();
+            }
+            this.fireEvent('editorKeyDown', { type: 'editorKeyDown', target: this, ev: ev });
+        },
+        /**
+        * @method nodeChange
+        * @param {Boolean} force Optional paramenter to skip the threshold counter
+        * @description Handles setting up the toolbar buttons, getting the Dom path, fixing nodes.
+        */
+        nodeChange: function(force) {
+            var threshold = parseInt(this.get('nodeChangeThreshold'), 10);
+            var thisNodeChange = Math.round(new Date().getTime() / 1000);
+            if (force === true) {
+                this._lastNodeChange = 0;
+            }
+            
+            if ((this._lastNodeChange + threshold) < thisNodeChange) {
+                var self = this;
+                if (this._fixNodesTimer === null) {
+                    this._fixNodesTimer = window.setTimeout(function() {
+                        self._fixNodes.call(self);
+                        self._fixNodesTimer = null;
+                    }, 0);
+                }
+            }
+            this._lastNodeChange = thisNodeChange;
+            if (this.currentEvent) {
+                this._lastNodeChangeEvent = this.currentEvent.type;
+            }
+
+            var beforeNodeChange = this.fireEvent('beforeNodeChange', { type: 'beforeNodeChange', target: this });
+            if (beforeNodeChange === false) {
+                return false;
+            }
+            if (this.get('dompath')) {
+                this._writeDomPath();
+            }
+            //Check to see if we are disabled before continuing
+            if (!this.get('disabled')) {
+                if (this.STOP_NODE_CHANGE) {
+                    //Reset this var for next action
+                    this.STOP_NODE_CHANGE = false;
+                    return false;
+                } else {
+                    var sel = this._getSelection(),
+                        range = this._getRange(),
+                        el = this._getSelectedElement(),
+                        fn_button = this.toolbar.getButtonByValue('fontname'),
+                        fs_button = this.toolbar.getButtonByValue('fontsize');
+
+                    if (force !== true) {
+                        this.editorDirty = true;
+                    }
+
+                    //Handle updating the toolbar with active buttons
+                    var _ex = {};
+                    if (this._lastButton) {
+                        _ex[this._lastButton.id] = true;
+                    }
+                    if (!this._isElement(el, 'body')) {
+                        if (fn_button) {
+                            _ex[fn_button.get('id')] = true;
+                        }
+                        if (fs_button) {
+                            _ex[fs_button.get('id')] = true;
+                        }
+                    }
+                    this.toolbar.resetAllButtons(_ex);
+
+                    //Handle disabled buttons
+                    for (var d = 0; d < this._disabled.length; d++) {
+                        var _button = this.toolbar.getButtonByValue(this._disabled[d]);
+                        if (_button && _button.get) {
+                            if (this._lastButton && (_button.get('id') === this._lastButton.id)) {
+                                //Skip
+                            } else {
+                                if (!this._hasSelection()) {
+                                    switch (this._disabled[d]) {
+                                        case 'fontname':
+                                        case 'fontsize':
+                                            break;
+                                        default:
+                                            //No Selection - disable
+                                            this.toolbar.disableButton(_button);
+                                    }
+                                } else {
+                                    if (!this._alwaysDisabled[this._disabled[d]]) {
+                                        this.toolbar.enableButton(_button);
+                                    }
+                                }
+                                if (!this._alwaysEnabled[this._disabled[d]]) {
+                                    this.toolbar.deselectButton(_button);
+                                }
+                            }
+                        }
+                    }
+                    var path = this._getDomPath();
+                    var tag = null, cmd = null;
+                    for (var i = 0; i < path.length; i++) {
+                        tag = path[i].tagName.toLowerCase();
+                        if (path[i].getAttribute('tag')) {
+                            tag = path[i].getAttribute('tag').toLowerCase();
+                        }
+                        cmd = this._tag2cmd[tag];
+                        if (cmd === undefined) {
+                            cmd = [];
+                        }
+                        if (!Lang.isArray(cmd)) {
+                            cmd = [cmd];
+                        }
+
+                        //Bold and Italic styles
+                        if (path[i].style.fontWeight.toLowerCase() == 'bold') {
+                            cmd[cmd.length] = 'bold';
+                        }
+                        if (path[i].style.fontStyle.toLowerCase() == 'italic') {
+                            cmd[cmd.length] = 'italic';
+                        }
+                        if (path[i].style.textDecoration.toLowerCase() == 'underline') {
+                            cmd[cmd.length] = 'underline';
+                        }
+                        if (cmd.length > 0) {
+                            for (var j = 0; j < cmd.length; j++) {
+                                this.toolbar.selectButton(cmd[j]);
+                                this.toolbar.enableButton(cmd[j]);
+                            }
+                        }
+                        //Handle Alignment
+                        switch (path[i].style.textAlign.toLowerCase()) {
+                            case 'left':
+                            case 'right':
+                            case 'center':
+                            case 'justify':
+                                var alignType = path[i].style.textAlign.toLowerCase();
+                                if (path[i].style.textAlign.toLowerCase() == 'justify') {
+                                    alignType = 'full';
+                                }
+                                this.toolbar.selectButton('justify' + alignType);
+                                this.toolbar.enableButton('justify' + alignType);
+                                break;
+                        }
+                    }
+                    //After for loop
+
+                    //Reset Font Family and Size to the inital configs
+                    if (fn_button) {
+                        var family = fn_button._configs.label._initialConfig.value;
+                        fn_button.set('label', '<span class="yui-toolbar-fontname-' + _cleanClassName(family) + '">' + family + '</span>');
+                        this._updateMenuChecked('fontname', family);
+                    }
+
+                    if (fs_button) {
+                        fs_button.set('label', fs_button._configs.label._initialConfig.value);
+                    }
+
+                    var hd_button = this.toolbar.getButtonByValue('heading');
+                    if (hd_button) {
+                        hd_button.set('label', hd_button._configs.label._initialConfig.value);
+                        this._updateMenuChecked('heading', 'none');
+                    }
+                    var img_button = this.toolbar.getButtonByValue('insertimage');
+                    if (img_button && this.currentWindow && (this.currentWindow.name == 'insertimage')) {
+                        this.toolbar.disableButton(img_button);
+                    }
+                }
+            }
+
+            this.fireEvent('afterNodeChange', { type: 'afterNodeChange', target: this });
+        },
+        /**
+        * @private
+        * @method _updateMenuChecked
+        * @param {Object} button The command identifier of the button you want to check
+        * @param {String} value The value of the menu item you want to check
+        * @param {<a href="YAHOO.widget.Toolbar.html">YAHOO.widget.Toolbar</a>} The Toolbar instance the button belongs to (defaults to this.toolbar) 
+        * @description Gets the menu from a button instance, if the menu is not rendered it will render it. It will then search the menu for the specified value, unchecking all other items and checking the specified on.
+        */
+        _updateMenuChecked: function(button, value, tbar) {
+            if (!tbar) {
+                tbar = this.toolbar;
+            }
+            var _button = tbar.getButtonByValue(button);
+            _button.checkValue(value);
+        },
+        /**
+        * @private
+        * @method _handleToolbarClick
+        * @param {Event} ev The event that triggered the button click
+        * @description This is an event handler attached to the Toolbar's buttonClick event. It will fire execCommand with the command identifier from the Toolbar Button.
+        */
+        _handleToolbarClick: function(ev) {
+            var value = '';
+            var str = '';
+            var cmd = ev.button.value;
+            if (ev.button.menucmd) {
+                value = cmd;
+                cmd = ev.button.menucmd;
+            }
+            this._lastButton = ev.button;
+            if (this.STOP_EXEC_COMMAND) {
+                this.STOP_EXEC_COMMAND = false;
+                return false;
+            } else {
+                this.execCommand(cmd, value);
+                if (!this.browser.webkit) {
+                     var self = this;
+                     setTimeout(function() {
+                         self._focusWindow.call(self);
+                     }, 5);
+                 }
+            }
+            Event.stopEvent(ev);
+        },
+        /**
+        * @private
+        * @method _setupAfterElement
+        * @description Creates the accessibility h2 header and places it after the iframe in the Dom for navigation.
+        */
+        _setupAfterElement: function() {
+            if (!this.afterElement) {
+                this.afterElement = document.createElement('h2');
+                this.afterElement.className = 'yui-editor-skipheader';
+                this.afterElement.tabIndex = '-1';
+                this.afterElement.innerHTML = this.STR_LEAVE_EDITOR;
+                this.get('element_cont').get('firstChild').appendChild(this.afterElement);
+            }
+        },
+        /**
+        * @private
+        * @method _disableEditor
+        * @param {Boolean} disabled Pass true to disable, false to enable
+        * @description Creates a mask to place over the Editor.
+        */
+        _disableEditor: function(disabled) {
+            if (disabled) {
+                if (!this._mask) {
+                    this._setDesignMode('off');
+                    if (this.toolbar) {
+                        this.toolbar.set('disabled', true);
+                    }
+                    this._mask = document.createElement('DIV');
+                    Dom.setStyle(this._mask, 'height', '100%');
+                    Dom.setStyle(this._mask, 'width', '100%');
+                    Dom.setStyle(this._mask, 'position', 'absolute');
+                    Dom.setStyle(this._mask, 'top', '0');
+                    Dom.setStyle(this._mask, 'left', '0');
+                    Dom.setStyle(this._mask, 'opacity', '.5');
+                    Dom.addClass(this._mask, 'yui-editor-masked');
+                    this.get('iframe').get('parentNode').appendChild(this._mask);
+                }
+            } else {
+                if (this._mask) {
+                    this._mask.parentNode.removeChild(this._mask);
+                    this._mask = null;
+                    if (this.toolbar) {
+                        this.toolbar.set('disabled', false);
+                    }
+                    this._setDesignMode('on');
+                    this._focusWindow();
+                    var self = this;
+                    window.setTimeout(function() {
+                        self.nodeChange.call(self);
+                    }, 100);
+                }
+            }
+        },
+        /**
+        * @property EDITOR_PANEL_ID
+        * @description HTML id to give the properties window in the DOM.
+        * @type String
+        */
+        EDITOR_PANEL_ID: 'yui-editor-panel',
+        /**
+        * @property SEP_DOMPATH
+        * @description The value to place in between the Dom path items
+        * @type String
+        */
+        SEP_DOMPATH: '<',
+        /**
+        * @property STR_LEAVE_EDITOR
+        * @description The accessibility string for the element after the iFrame
+        * @type String
+        */
+        STR_LEAVE_EDITOR: 'You have left the Rich Text Editor.',
+        /**
+        * @property STR_BEFORE_EDITOR
+        * @description The accessibility string for the element before the iFrame
+        * @type String
+        */
+        STR_BEFORE_EDITOR: 'This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Control + Shift + T to place focus on the toolbar and navigate between option heading names. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift L adds an HTML link</li> <li>To exit this text editor use the keyboard shortcut Control + Shift + ESC.</li></ul>',
+        /**
+        * @property STR_TITLE
+        * @description The Title of the HTML document that is created in the iFrame
+        * @type String
+        */
+        STR_TITLE: 'Rich Text Area.',
+        /**
+        * @property STR_IMAGE_HERE
+        * @description The text to place in the URL textbox when using the blankimage.
+        * @type String
+        */
+        STR_IMAGE_HERE: 'Image Url Here',
+        /**
+        * @property STR_LINK_URL
+        * @description The label string for the Link URL.
+        * @type String
+        */
+        STR_LINK_URL: 'Link URL',
+        /**
+        * @protected
+        * @property STOP_EXEC_COMMAND
+        * @description Set to true when you want the default execCommand function to not process anything
+        * @type Boolean
+        */
+        STOP_EXEC_COMMAND: false,
+        /**
+        * @protected
+        * @property STOP_NODE_CHANGE
+        * @description Set to true when you want the default nodeChange function to not process anything
+        * @type Boolean
+        */
+        STOP_NODE_CHANGE: false,
+        /**
+        * @protected
+        * @property CLASS_NOEDIT
+        * @description CSS class applied to elements that are not editable.
+        * @type String
+        */
+        CLASS_NOEDIT: 'yui-noedit',
+        /**
+        * @protected
+        * @property CLASS_CONTAINER
+        * @description Default CSS class to apply to the editors container element
+        * @type String
+        */
+        CLASS_CONTAINER: 'yui-editor-container',
+        /**
+        * @protected
+        * @property CLASS_EDITABLE
+        * @description Default CSS class to apply to the editors iframe element
+        * @type String
+        */
+        CLASS_EDITABLE: 'yui-editor-editable',
+        /**
+        * @protected
+        * @property CLASS_EDITABLE_CONT
+        * @description Default CSS class to apply to the editors iframe's parent element
+        * @type String
+        */
+        CLASS_EDITABLE_CONT: 'yui-editor-editable-container',
+        /**
+        * @protected
+        * @property CLASS_PREFIX
+        * @description Default prefix for dynamically created class names
+        * @type String
+        */
+        CLASS_PREFIX: 'yui-editor',
+        /** 
+        * @property browser
+        * @description Standard browser detection
+        * @type Object
+        */
+        browser: function() {
+            var br = YAHOO.env.ua;
+            //Check for webkit3
+            if (br.webkit > 420) {
+                br.webkit3 = br.webkit;
+            } else {
+                br.webkit3 = 0;
+            }
+            return br;
+        }(),
+        /** 
+        * @method init
+        * @description The Editor class' initialization method
+        */
+        init: function(p_oElement, p_oAttributes) {
+            YAHOO.widget.SimpleEditor.superclass.init.call(this, p_oElement, p_oAttributes);
+            YAHOO.widget.EditorInfo._instances[this.get('id')] = this;
+
+            this.on('contentReady', function() {
+                this.DOMReady = true;
+                this.fireQueue();
+            }, this, true);
+
+        },
+        /**
+        * @method initAttributes
+        * @description Initializes all of the configuration attributes used to create 
+        * the editor.
+        * @param {Object} attr Object literal specifying a set of 
+        * configuration attributes used to create the editor.
+        */
+        initAttributes: function(attr) {
+            YAHOO.widget.SimpleEditor.superclass.initAttributes.call(this, attr);
+            var self = this;
+
+            /**
+            * @private
+            * @config iframe
+            * @description Internal config for holding the iframe element.
+            * @default null
+            * @type HTMLElement
+            */
+            this.setAttributeConfig('iframe', {
+                value: null
+            });
+            /**
+            * @private
+            * @depreciated
+            * @config textarea
+            * @description Internal config for holding the textarea element (replaced with element).
+            * @default null
+            * @type HTMLElement
+            */
+            this.setAttributeConfig('textarea', {
+                value: null,
+                writeOnce: true
+            });
+            /**
+            * @config nodeChangeThreshold
+            * @description The number of seconds that need to be in between nodeChange processing
+            * @default 3
+            * @type Number
+            */            
+            this.setAttributeConfig('nodeChangeThreshold', {
+                value: attr.nodeChangeThreshold || 3,
+                validator: YAHOO.lang.isNumber
+            });
+            /**
+            * @config allowNoEdit
+            * @description Should the editor check for non-edit fields. It should be noted that this technique is not perfect. If the user does the right things, they will still be able to make changes.
+            * Such as highlighting an element below and above the content and hitting a toolbar button or a shortcut key.
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('allowNoEdit', {
+                value: attr.allowNoEdit || false,
+                validator: YAHOO.lang.isBoolean
+            });
+            /**
+            * @config limitCommands
+            * @description Should the Editor limit the allowed execCommands to the ones available in the toolbar. If true, then execCommand and keyboard shortcuts will fail if they are not defined in the toolbar.
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('limitCommands', {
+                value: attr.limitCommands || false,
+                validator: YAHOO.lang.isBoolean
+            });
+            /**
+            * @config element_cont
+            * @description Internal config for the editors container
+            * @default false
+            * @type HTMLElement
+            */
+            this.setAttributeConfig('element_cont', {
+                value: attr.element_cont
+            });
+            /**
+            * @private
+            * @config editor_wrapper
+            * @description The outter wrapper for the entire editor.
+            * @default null
+            * @type HTMLElement
+            */
+            this.setAttributeConfig('editor_wrapper', {
+                value: attr.editor_wrapper || null,
+                writeOnce: true
+            });
+            /**
+            * @attribute height
+            * @description The height of the editor iframe container, not including the toolbar..
+            * @default Best guessed size of the textarea, for best results use CSS to style the height of the textarea or pass it in as an argument
+            * @type String
+            */
+            this.setAttributeConfig('height', {
+                value: attr.height || Dom.getStyle(self.get('element'), 'height'),
+                method: function(height) {
+                    if (this._rendered) {
+                        //We have been rendered, change the height
+                        if (this.get('animate')) {
+                            var anim = new YAHOO.util.Anim(this.get('iframe').get('parentNode'), {
+                                height: {
+                                    to: parseInt(height, 10)
+                                }
+                            }, 0.5);
+                            anim.animate();
+                        } else {
+                            Dom.setStyle(this.get('iframe').get('parentNode'), 'height', height);
+                        }
+                    }
+                }
+            });
+            /**
+            * @attribute width
+            * @description The width of the editor container.
+            * @default Best guessed size of the textarea, for best results use CSS to style the width of the textarea or pass it in as an argument
+            * @type String
+            */            
+            this.setAttributeConfig('width', {
+                value: attr.width || Dom.getStyle(this.get('element'), 'width'),
+                method: function(width) {
+                    if (this._rendered) {
+                        //We have been rendered, change the width
+                        if (this.get('animate')) {
+                            var anim = new YAHOO.util.Anim(this.get('element_cont').get('element'), {
+                                width: {
+                                    to: parseInt(width, 10)
+                                }
+                            }, 0.5);
+                            anim.animate();
+                        } else {
+                            this.get('element_cont').setStyle('width', width);
+                        }
+                    }
+                }
+            });
+                        
+            /**
+            * @attribute blankimage
+            * @description The URL for the image placeholder to put in when inserting an image.
+            * @default The yahooapis.com address for the current release + 'assets/blankimage.png'
+            * @type String
+            */            
+            this.setAttributeConfig('blankimage', {
+                value: attr.blankimage || this._getBlankImage()
+            });
+            /**
+            * @attribute css
+            * @description The Base CSS used to format the content of the editor
+            * @default <code><pre>html {
+                height: 95%;
+            }
+            body {
+                height: 100%;
+                padding: 7px; background-color: #fff; font:13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;
+            }
+            a {
+                color: blue;
+                text-decoration: underline;
+                cursor: pointer;
+            }
+            .warning-localfile {
+                border-bottom: 1px dashed red !important;
+            }
+            .yui-busy {
+                cursor: wait !important;
+            }
+            img.selected { //Safari image selection
+                border: 2px dotted #808080;
+            }
+            img {
+                cursor: pointer !important;
+                border: none;
+            }
+            </pre></code>
+            * @type String
+            */            
+            this.setAttributeConfig('css', {
+                value: attr.css || this._defaultCSS,
+                writeOnce: true
+            });
+            /**
+            * @attribute html
+            * @description The default HTML to be written to the iframe document before the contents are loaded (Note that the DOCTYPE attr will be added at render item)
+            * @default This HTML requires a few things if you are to override:
+                <p><code>{TITLE}, {CSS}, {HIDDEN_CSS}, {EXTRA_CSS}</code> and <code>{CONTENT}</code> need to be there, they are passed to YAHOO.lang.substitute to be replace with other strings.<p>
+                <p><code>onload="document.body._rteLoaded = true;"</code> : the onload statement must be there or the editor will not finish loading.</p>
+                <code>
+                <pre>
+                <html>
+                    <head>
+                        <title>{TITLE}</title>
+                        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+                        <style>
+                        {CSS}
+                        </style>
+                        <style>
+                        {HIDDEN_CSS}
+                        </style>
+                        <style>
+                        {EXTRA_CSS}
+                        </style>
+                    </head>
+                <body onload="document.body._rteLoaded = true;">
+                {CONTENT}
+                </body>
+                </html>
+                </pre>
+                </code>
+            * @type String
+            */            
+            this.setAttributeConfig('html', {
+                value: attr.html || '<html><head><title>{TITLE}</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><base href="' + this._baseHREF + '"><style>{CSS}</style><style>{HIDDEN_CSS}</style><style>{EXTRA_CSS}</style></head><body onload="document.body._rteLoaded = true;">{CONTENT}</body></html>',
+                writeOnce: true
+            });
+
+            /**
+            * @attribute extracss
+            * @description Extra user defined css to load after the default SimpleEditor CSS
+            * @default ''
+            * @type String
+            */            
+            this.setAttributeConfig('extracss', {
+                value: attr.css || '',
+                writeOnce: true
+            });
+
+            /**
+            * @attribute handleSubmit
+            * @description Config handles if the editor will attach itself to the textareas parent form's submit handler.
+            If it is set to true, the editor will attempt to attach a submit listener to the textareas parent form.
+            Then it will trigger the editors save handler and place the new content back into the text area before the form is submitted.
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('handleSubmit', {
+                value: false,
+                writeOnce: true,
+                method: function(exec) {
+                    if (exec) {
+                        var ta = this.get('element');
+                        if (ta.form) {
+                            var submitForm = function(ev) {
+                                Event.stopEvent(ev);
+                                this.saveHTML();
+                                window.setTimeout(function() {
+                                    YAHOO.util.Event.removeListener(ta.form, 'submit', submitForm);
+                                    ta.form.submit();
+                                }, 200);
+                            };
+                            Event.on(ta.form, 'submit', submitForm, this, true);
+                        }
+                    }
+                }
+            });
+            /**
+            * @attribute disabled
+            * @description This will toggle the editor's disabled state. When the editor is disabled, designMode is turned off and a mask is placed over the iframe so no interaction can take place.
+            All Toolbar buttons are also disabled so they cannot be used.
+            * @default false
+            * @type Boolean
+            */
+
+            this.setAttributeConfig('disabled', {
+                value: false,
+                method: function(disabled) {
+                    if (this._rendered) {
+                        this._disableEditor(disabled);
+                    }
+                }
+            });
+            /**
+            * @config toolbar_cont
+            * @description Internal config for the toolbars container
+            * @default false
+            * @type Boolean
+            */
+            this.setAttributeConfig('toolbar_cont', {
+                value: null,
+                writeOnce: true
+            });
+            /**
+            * @attribute toolbar
+            * @description The default toolbar config.
+            * @type Object
+            */            
+            this.setAttributeConfig('toolbar', {
+                value: attr.toolbar || this._defaultToolbar,
+                writeOnce: true,
+                method: function(toolbar) {
+                    if (!toolbar.buttonType) {
+                        toolbar.buttonType = this._defaultToolbar.buttonType;
+                    }
+                    this._defaultToolbar = toolbar;
+                }
+            });
+            /**
+            * @attribute animate
+            * @description Should the editor animate window movements
+            * @default false unless Animation is found, then true
+            * @type Boolean
+            */            
+            this.setAttributeConfig('animate', {
+                value: ((attr.animate) ? ((YAHOO.util.Anim) ? true : false) : false),
+                validator: function(value) {
+                    var ret = true;
+                    if (!YAHOO.util.Anim) {
+                        ret = false;
+                    }
+                    return ret;
+                }               
+            });
+            /**
+            * @config panel
+            * @description A reference to the panel we are using for windows.
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('panel', {
+                value: null,
+                writeOnce: true,
+                validator: function(value) {
+                    var ret = true;
+                    if (!YAHOO.widget.Overlay) {
+                        ret = false;
+                    }
+                    return ret;
+                }               
+            });
+            /**
+            * @attribute focusAtStart
+            * @description Should we focus the window when the content is ready?
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('focusAtStart', {
+                value: attr.focusAtStart || false,
+                writeOnce: true,
+                method: function() {
+                    this.on('editorContentLoaded', function() {
+                        var self = this;
+                        setTimeout(function() {
+                            self._focusWindow.call(self, true);
+                            self.editorDirty = false;
+                        }, 400);
+                    }, this, true);
+                }
+            });
+            /**
+            * @attribute dompath
+            * @description Toggle the display of the current Dom path below the editor
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('dompath', {
+                value: attr.dompath || false,
+                method: function(dompath) {
+                    if (dompath && !this.dompath) {
+                        this.dompath = document.createElement('DIV');
+                        this.dompath.id = this.get('id') + '_dompath';
+                        Dom.addClass(this.dompath, 'dompath');
+                        this.get('element_cont').get('firstChild').appendChild(this.dompath);
+                        if (this.get('iframe')) {
+                            this._writeDomPath();
+                        }
+                    } else if (!dompath && this.dompath) {
+                        this.dompath.parentNode.removeChild(this.dompath);
+                        this.dompath = null;
+                    }
+                    this._setupAfterElement();
+                }
+            });
+            /**
+            * @attribute markup
+            * @description Should we try to adjust the markup for the following types: semantic, css, default or xhtml
+            * @default "semantic"
+            * @type String
+            */            
+            this.setAttributeConfig('markup', {
+                value: attr.markup || 'semantic',
+                validator: function(markup) {
+                    switch (markup.toLowerCase()) {
+                        case 'semantic':
+                        case 'css':
+                        case 'default':
+                        case 'xhtml':
+                        return true;
+                    }
+                    return false;
+                }
+            });
+            /**
+            * @attribute removeLineBreaks
+            * @description Should we remove linebreaks and extra spaces on cleanup
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('removeLineBreaks', {
+                value: attr.removeLineBreaks || false,
+                validator: YAHOO.lang.isBoolean
+            });
+            
+
+            this.on('afterRender', function() {
+                this._renderPanel();
+            });
+        },
+        /**
+        * @private
+        * @method _getBlankImage
+        * @description Retrieves the full url of the image to use as the blank image.
+        * @returns {String} The URL to the blank image
+        */
+        _getBlankImage: function() {
+            if (!this.DOMReady) {
+                this._queue[this._queue.length] = ['_getBlankImage', arguments];
+                return '';
+            }
+            var img = '';
+            if (!this._blankImageLoaded) {
+                var div = document.createElement('div');
+                div.style.position = 'absolute';
+                div.style.top = '-9999px';
+                div.style.left = '-9999px';
+                div.className = this.CLASS_PREFIX + '-blankimage';
+                document.body.appendChild(div);
+                img = YAHOO.util.Dom.getStyle(div, 'background-image');
+                img = img.replace('url(', '').replace(')', '').replace(/"/g, '');
+                this.set('blankimage', img);
+                this._blankImageLoaded = true;
+            } else {
+                img = this.get('blankimage');
+            }
+            return img;
+        },
+        /**
+        * @private
+        * @method _handleFontSize
+        * @description Handles the font size button in the toolbar.
+        * @param {Object} o Object returned from Toolbar's buttonClick Event
+        */
+        _handleFontSize: function(o) {
+            var button = this.toolbar.getButtonById(o.button.id);
+            var value = button.get('label') + 'px';
+            this.execCommand('fontsize', value);
+            this.STOP_EXEC_COMMAND = true;
+        },
+        /**
+        * @private
+        * @description Handles the colorpicker buttons in the toolbar.
+        * @param {Object} o Object returned from Toolbar's buttonClick Event
+        */
+        _handleColorPicker: function(o) {
+            var cmd = o.button;
+            var value = '#' + o.color;
+            if ((cmd == 'forecolor') || (cmd == 'backcolor')) {
+                this.execCommand(cmd, value);
+            }
+        },
+        /**
+        * @private
+        * @method _handleAlign
+        * @description Handles the alignment buttons in the toolbar.
+        * @param {Object} o Object returned from Toolbar's buttonClick Event
+        */
+        _handleAlign: function(o) {
+            var cmd = null;
+            for (var i = 0; i < o.button.menu.length; i++) {
+                if (o.button.menu[i].value == o.button.value) {
+                    cmd = o.button.menu[i].value;
+                }
+            }
+            var value = this._getSelection();
+
+            this.execCommand(cmd, value);
+            this.STOP_EXEC_COMMAND = true;
+        },
+        /**
+        * @private
+        * @method _handleAfterNodeChange
+        * @description Fires after a nodeChange happens to setup the things that where reset on the node change (button state).
+        */
+        _handleAfterNodeChange: function() {
+            var path = this._getDomPath(),
+                elm = null,
+                family = null,
+                fontsize = null,
+                validFont = false;
+            var fn_button = this.toolbar.getButtonByValue('fontname');
+            var fs_button = this.toolbar.getButtonByValue('fontsize');
+            var hd_button = this.toolbar.getButtonByValue('heading');
+
+            for (var i = 0; i < path.length; i++) {
+                elm = path[i];
+
+                var tag = elm.tagName.toLowerCase();
+
+
+                if (elm.getAttribute('tag')) {
+                    tag = elm.getAttribute('tag');
+                }
+
+                family = elm.getAttribute('face');
+                if (Dom.getStyle(elm, 'font-family')) {
+                    family = Dom.getStyle(elm, 'font-family');
+                }
+
+                if (tag.substring(0, 1) == 'h') {
+                    if (hd_button) {
+                        for (var h = 0; h < hd_button._configs.menu.value.length; h++) {
+                            if (hd_button._configs.menu.value[h].value.toLowerCase() == tag) {
+                                hd_button.set('label', hd_button._configs.menu.value[h].text);
+                            }
+                        }
+                        this._updateMenuChecked('heading', tag);
+                    }
+                }
+            }
+
+            if (fn_button) {
+                for (var b = 0; b < fn_button._configs.menu.value.length; b++) {
+                    if (family && fn_button._configs.menu.value[b].text.toLowerCase() == family.toLowerCase()) {
+                        validFont = true;
+                        family = fn_button._configs.menu.value[b].text; //Put the proper menu name in the button
+                    }
+                }
+                if (!validFont) {
+                    family = fn_button._configs.label._initialConfig.value;
+                }
+                var familyLabel = '<span class="yui-toolbar-fontname-' + _cleanClassName(family) + '">' + family + '</span>';
+                if (fn_button.get('label') != familyLabel) {
+                    fn_button.set('label', familyLabel);
+                    this._updateMenuChecked('fontname', family);
+                }
+            }
+
+            if (fs_button) {
+                fontsize = parseInt(Dom.getStyle(elm, 'fontSize'), 10);
+                if ((fontsize === null) || isNaN(fontsize)) {
+                    fontsize = fs_button._configs.label._initialConfig.value;
+                }
+                fs_button.set('label', ''+fontsize);
+            }
+            
+            if (!this._isElement(elm, 'body') && !this._isElement(elm, 'img')) {
+                this.toolbar.enableButton(fn_button);
+                this.toolbar.enableButton(fs_button);
+                this.toolbar.enableButton('forecolor');
+                this.toolbar.enableButton('backcolor');
+            }
+            if (this._isElement(elm, 'img')) {
+                if (YAHOO.widget.Overlay) {
+                    this.toolbar.enableButton('createlink');
+                }
+            }
+            if (this._isElement(elm, 'blockquote')) {
+                this.toolbar.selectButton('indent');
+                this.toolbar.disableButton('indent');
+                this.toolbar.enableButton('outdent');
+            }
+            //if (this._isElement(elm, 'ol') || this._isElement(elm, 'ul') || this._isElement(elm, 'li')) {
+            if (this._hasParent(elm, 'ol') || this._hasParent(elm, 'ul')) {
+                this.toolbar.disableButton('indent');
+            }
+            this._lastButton = null;
+            
+        },
+        _setBusy: function(off) {
+            if (off) {
+                Dom.removeClass(document.body, 'yui-busy');
+                Dom.removeClass(this._getDoc().body, 'yui-busy');
+            } else {
+                Dom.addClass(document.body, 'yui-busy');
+                Dom.addClass(this._getDoc().body, 'yui-busy');
+            }
+        },
+        /**
+        * @private
+        * @method _handleInsertImageClick
+        * @description Opens the Image Properties Window when the insert Image button is clicked or an Image is Double Clicked.
+        */
+        _handleInsertImageClick: function() {
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue('insertimage')) {
+                    return false;
+                }
+            }
+        
+            this.toolbar.set('disabled', true); //Disable the toolbar when the prompt is showing
+            this.on('afterExecCommand', function() {
+                var el = this.currentElement[0],
+                    src = 'http://';
+                if (!el) {
+                    el = this._getSelectedElement();
+                }
+                if (el) {
+                    if (el.getAttribute('src')) {
+                        src = el.getAttribute('src', 2);
+                        if (src.indexOf(this.get('blankimage')) != -1) {
+                            src = this.STR_IMAGE_HERE;
+                        }
+                    }
+                }
+                var str = prompt(this.STR_LINK_URL + ': ', src);
+                if ((str !== '') && (str !== null)) {
+                    el.setAttribute('src', str);
+                } else if (str !== null) {
+                    el.parentNode.removeChild(el);
+                    this.currentElement = [];
+                }
+                this.closeWindow();
+                this.toolbar.set('disabled', false);
+            }, this, true);
+        },
+        /**
+        * @private
+        * @method _handleInsertImageWindowClose
+        * @description Handles the closing of the Image Properties Window.
+        */
+        _handleInsertImageWindowClose: function() {
+            this.nodeChange();
+        },
+        /**
+        * @private
+        * @method _isLocalFile
+        * @param {String} url THe url/string to check
+        * @description Checks to see if a string (href or img src) is possibly a local file reference..
+        */
+        _isLocalFile: function(url) {
+            if ((url !== '') && ((url.indexOf('file:/') != -1) || (url.indexOf(':\\') != -1))) {
+                return true;
+            }
+            return false;
+        },
+        /**
+        * @private
+        * @method _handleCreateLinkClick
+        * @description Handles the opening of the Link Properties Window when the Create Link button is clicked or an href is doubleclicked.
+        */
+        _handleCreateLinkClick: function() {
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue('createlink')) {
+                    return false;
+                }
+            }
+        
+            this.toolbar.set('disabled', true); //Disable the toolbar when the prompt is showing
+            this.on('afterExecCommand', function() {
+                var el = this.currentElement[0],
+                    url = '';
+
+                if (el) {
+                    if (el.getAttribute('href', 2) !== null) {
+                        url = el.getAttribute('href', 2);
+                    }
+                }
+                var str = prompt(this.STR_LINK_URL + ': ', url);
+                if ((str !== '') && (str !== null)) {
+                    var urlValue = str;
+                    if ((urlValue.indexOf(':/'+'/') == -1) && (urlValue.substring(0,1) != '/') && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                        if ((urlValue.indexOf('@') != -1) && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                            //Found an @ sign, prefix with mailto:
+                            urlValue = 'mailto:' + urlValue;
+                        } else {
+                            /* :// not found adding */
+                            if (urlValue.substring(0, 1) != '#') {
+                                urlValue = 'http:/'+'/' + urlValue;
+                            }
+                        }
+                    }
+                    el.setAttribute('href', urlValue);
+                } else if (str !== null) {
+                    var _span = this._getDoc().createElement('span');
+                    _span.innerHTML = el.innerHTML;
+                    Dom.addClass(_span, 'yui-non');
+                    el.parentNode.replaceChild(_span, el);
+                }
+                this.closeWindow();
+                this.toolbar.set('disabled', false);
+            });
+        },
+        /**
+        * @private
+        * @method _handleCreateLinkWindowClose
+        * @description Handles the closing of the Link Properties Window.
+        */
+        _handleCreateLinkWindowClose: function() {
+            this.nodeChange();
+            this.currentElement = [];
+        },
+        /**
+        * @method render
+        * @description Causes the toolbar and the editor to render and replace the textarea.
+        */
+        render: function() {
+            if (this._rendered) {
+                return false;
+            }
+            if (!this.DOMReady) {
+                this._queue[this._queue.length] = ['render', arguments];
+                return false;
+            }
+            this._setBusy();
+            this._rendered = true;
+            var self = this;
+
+            this.set('textarea', this.get('element'));
+
+            this.get('element_cont').setStyle('display', 'none');
+            this.get('element_cont').addClass(this.CLASS_CONTAINER);
+
+            this.set('iframe', this._createIframe());
+            window.setTimeout(function() {
+                self._setInitialContent.call(self);
+            }, 10);
+
+            this.get('editor_wrapper').appendChild(this.get('iframe').get('element'));
+
+            if (this.get('disabled')) {
+                this._disableEditor(true);
+            }
+
+            var tbarConf = this.get('toolbar');
+            //Create Toolbar instance
+            if (tbarConf instanceof Toolbar) {
+                this.toolbar = tbarConf;
+                //Set the toolbar to disabled until content is loaded
+                this.toolbar.set('disabled', true);
+            } else {
+                //Set the toolbar to disabled until content is loaded
+                tbarConf.disabled = true;
+                this.toolbar = new Toolbar(this.get('toolbar_cont'), tbarConf);
+            }
+
+            this.fireEvent('toolbarLoaded', { type: 'toolbarLoaded', target: this.toolbar });
+
+            
+            this.toolbar.on('toolbarCollapsed', function() {
+                if (this.currentWindow) {
+                    this.moveWindow();
+                }
+            }, this, true);
+            this.toolbar.on('toolbarExpanded', function() {
+                if (this.currentWindow) {
+                    this.moveWindow();
+                }
+            }, this, true);
+            this.toolbar.on('fontsizeClick', function(o) {
+                this._handleFontSize(o);
+            }, this, true);
+            
+            this.toolbar.on('colorPickerClicked', function(o) {
+                this._handleColorPicker(o);
+            }, this, true);
+
+            this.toolbar.on('alignClick', function(o) {
+                this._handleAlign(o);
+            }, this, true);
+            this.on('afterNodeChange', function() {
+                this._handleAfterNodeChange();
+            }, this, true);
+            this.toolbar.on('insertimageClick', function() {
+                this._handleInsertImageClick();
+            }, this, true);
+            this.on('windowinsertimageClose', function() {
+                this._handleInsertImageWindowClose();
+            }, this, true);
+            this.toolbar.on('createlinkClick', function() {
+                this._handleCreateLinkClick();
+            }, this, true);
+            this.on('windowcreatelinkClose', function() {
+                this._handleCreateLinkWindowClose();
+            }, this, true);
+            
+
+            //Replace Textarea with editable area
+            
+            this.get('parentNode').replaceChild(this.get('element_cont').get('element'), this.get('element'));
+
+            
+            if (!this.beforeElement) {
+                this.beforeElement = document.createElement('h2');
+                this.beforeElement.className = 'yui-editor-skipheader';
+                this.beforeElement.tabIndex = '-1';
+                this.beforeElement.innerHTML = this.STR_BEFORE_EDITOR;
+                this.get('element_cont').get('firstChild').insertBefore(this.beforeElement, this.toolbar.get('nextSibling'));
+            }
+
+            this.setStyle('visibility', 'hidden');
+            this.setStyle('position', 'absolute');
+            this.setStyle('top', '-9999px');
+            this.setStyle('left', '-9999px');
+            this.get('element_cont').appendChild(this.get('element'));
+            this.get('element_cont').setStyle('display', 'block');
+
+
+            Dom.addClass(this.get('iframe').get('parentNode'), this.CLASS_EDITABLE_CONT);
+            this.get('iframe').addClass(this.CLASS_EDITABLE);
+
+            //Set height and width of editor container
+            this.get('element_cont').setStyle('width', this.get('width'));
+            Dom.setStyle(this.get('iframe').get('parentNode'), 'height', this.get('height'));
+
+            this.get('iframe').setStyle('width', '100%'); //WIDTH
+            this.get('iframe').setStyle('height', '100%');
+
+            if (this.browser.ie == 7) {
+            }
+
+            this.fireEvent('afterRender', { type: 'afterRender', target: this });
+        },
+        /**
+        * @method execCommand
+        * @param {String} action The "execCommand" action to try to execute (Example: bold, insertimage, inserthtml)
+        * @param {String} value (optional) The value for a given action such as action: fontname value: 'Verdana'
+        * @description This method attempts to try and level the differences in the various browsers and their support for execCommand actions
+        */
+        execCommand: function(action, value) {
+            var beforeExec = this.fireEvent('beforeExecCommand', { type: 'beforeExecCommand', target: this, args: arguments });
+            if ((beforeExec === false) || (this.STOP_EXEC_COMMAND)) {
+                this.STOP_EXEC_COMMAND = false;
+                return false;
+            }
+            this._setMarkupType(action);
+            if (this.browser.ie) {
+                this._getWindow().focus();
+            }
+            var exec = true;
+            
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue(action)) {
+                    exec = false;
+                }
+            }
+
+            this.editorDirty = true;
+            
+            if ((typeof this['cmd_' + action.toLowerCase()] == 'function') && exec) {
+                var retValue = this['cmd_' + action.toLowerCase()](value);
+                exec = retValue[0];
+                if (retValue[1]) {
+                    action = retValue[1];
+                }
+                if (retValue[2]) {
+                    value = retValue[2];
+                }
+            }
+            if (exec) {
+                try {
+                    this._getDoc().execCommand(action, false, value);
+                } catch(e) {
+                }
+            } else {
+            }
+            this.on('afterExecCommand', function() {
+                this.unsubscribeAll('afterExecCommand');
+                this.nodeChange();
+            });
+            this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
+            
+        },
+    /* {{{  Command Overrides */
+
+        /**
+        * @method cmd_backcolor
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('backcolor') is used.
+        */
+        cmd_backcolor: function(value) {
+            var exec = true,
+                el = this._getSelectedElement(),
+                action = 'backcolor';
+
+            if (this.browser.gecko || this.browser.opera) {
+                this._setEditorStyle(true);
+                action = 'hilitecolor';
+            }
+            /**
+            * @browser opera
+            * @knownissue - Opera fails to assign a background color on an element that already has one.
+            *
+            if (this.browser.opera) {
+                if (!this._isElement(el, 'body') && Dom.getStyle(el, 'background-color')) {
+                    Dom.setStyle(el, 'background-color', value);
+                } else {
+                    this._createCurrentElement('span', { backgroundColor: value });
+                }
+                exec = false;
+            //} else if (!this._hasSelection()) {
+            } else if (el !== this._getDoc().body) {
+                Dom.setStyle(el, 'background-color', value);
+                this._selectNode(el);
+                exec = false;
+            } else {
+                this._createCurrentElement('span', { backgroundColor: value });
+                this._selectNode(this.currentElement[0]);
+                exec = false;
+            }*/
+
+            if (!this._isElement(el, 'body')) {
+                Dom.setStyle(el, 'background-color', value);
+                this._selectNode(el);
+                exec = false;
+            } else {
+                this._createCurrentElement('span', { backgroundColor: value });
+                this._selectNode(this.currentElement[0]);
+                exec = false;
+            }
+
+            return [exec, action];
+        },
+        /**
+        * @method cmd_forecolor
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('forecolor') is used.
+        */
+        cmd_forecolor: function(value) {
+            var exec = true,
+                el = this._getSelectedElement();
+
+                if (!this._isElement(el, 'body')) {
+                    Dom.setStyle(el, 'color', value);
+                    this._selectNode(el);
+                    exec = false;
+                } else {
+                    this._createCurrentElement('span', { color: value });
+                    this._selectNode(this.currentElement[0]);
+                    exec = false;
+                }
+                return [exec];
+        },
+        /**
+        * @method cmd_unlink
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('unlink') is used.
+        */
+        cmd_unlink: function(value) {
+            this._swapEl(this.currentElement[0], 'span', function(el) {
+                el.className = 'yui-non';
+            });
+            return [false];
+        },
+        /**
+        * @method cmd_createlink
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('createlink') is used.
+        */
+        cmd_createlink: function(value) {
+            var el = this._getSelectedElement(), _a = null;
+            if (this._hasParent(el, 'a')) {
+                this.currentElement[0] = this._hasParent(el, 'a');
+            } else if (!this._isElement(el, 'a')) {
+                this._createCurrentElement('a');
+                _a = this._swapEl(this.currentElement[0], 'a');
+                this.currentElement[0] = _a;
+            } else {
+                this.currentElement[0] = el;
+            }
+            return [false];
+        },
+        /**
+        * @method cmd_insertimage
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('insertimage') is used.
+        */
+        cmd_insertimage: function(value) {
+            var exec = true, _img = null, action = 'insertimage',
+                el = this._getSelectedElement();
+
+            if (value === '') {
+                value = this.get('blankimage');
+            }
+
+            /**
+            * @knownissue
+            * @browser Safari 2.x
+            * @description The issue here is that we have no way of knowing where the cursor position is
+            * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
+            */
+            
+            if (this._isElement(el, 'img')) {
+                this.currentElement[0] = el;
+                exec = false;
+            } else {
+                if (this._getDoc().queryCommandEnabled(action)) {
+                    this._getDoc().execCommand('insertimage', false, value);
+                    var imgs = this._getDoc().getElementsByTagName('img');
+                    for (var i = 0; i < imgs.length; i++) {
+                        if (!YAHOO.util.Dom.hasClass(imgs[i], 'yui-img')) {
+                            YAHOO.util.Dom.addClass(imgs[i], 'yui-img');
+                            this.currentElement[0] = imgs[i];
+                        }
+                    }
+                    exec = false;
+                } else {
+                    if (el == this._getDoc().body) {
+                        _img = this._getDoc().createElement('img');
+                        _img.setAttribute('src', value);
+                        YAHOO.util.Dom.addClass(_img, 'yui-img');
+                        this._getDoc().body.appendChild(_img);
+                    } else {
+                        this._createCurrentElement('img');
+                        _img = this._getDoc().createElement('img');
+                        _img.setAttribute('src', value);
+                        YAHOO.util.Dom.addClass(_img, 'yui-img');
+                        this.currentElement[0].parentNode.replaceChild(_img, this.currentElement[0]);
+                    }
+                    this.currentElement[0] = _img;
+                    exec = false;
+                }
+            }
+            return [exec];
+        },
+        /**
+        * @method cmd_inserthtml
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('inserthtml') is used.
+        */
+        cmd_inserthtml: function(value) {
+            var exec = true, action = 'inserthtml', _span = null, _range = null;
+            /**
+            * @knownissue
+            * @browser Safari 2.x
+            * @description The issue here is that we have no way of knowing where the cursor position is
+            * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
+            */
+            if (this.browser.webkit && !this._getDoc().queryCommandEnabled(action)) {
+                this._createCurrentElement('img');
+                _span = this._getDoc().createElement('span');
+                _span.innerHTML = value;
+                this.currentElement[0].parentNode.replaceChild(_span, this.currentElement[0]);
+                exec = false;
+            } else if (this.browser.ie) {
+                _range = this._getRange();
+                if (_range.item) {
+                    _range.item(0).outerHTML = value;
+                } else {
+                    _range.pasteHTML(value);
+                }
+                exec = false;                    
+            }
+            return [exec];
+        },
+        /**
+        * @method cmd_list
+        * @param tag The tag of the list you want to create (eg, ul or ol)
+        * @description This is a combined execCommand override method. It is called from the cmd_insertorderedlist and cmd_insertunorderedlist methods.
+        */
+        cmd_list: function(tag) {
+            var exec = true, list = null, li = 0, el = null, str = '',
+                selEl = this._getSelectedElement(), action = 'insertorderedlist';
+                if (tag == 'ul') {
+                    action = 'insertunorderedlist';
+                }
+            /**
+            * @knownissue Safari 2.+ doesn't support ordered and unordered lists
+            * @browser Safari 2.x
+            * The issue with this workaround is that when applied to a set of text
+            * that has BR's in it, Safari may or may not pick up the individual items as
+            * list items. This is fixed in WebKit (Safari 3)
+            */
+            if ((this.browser.webkit && !this._getDoc().queryCommandEnabled(action))) {
+                if (this._isElement(selEl, 'li') && this._isElement(selEl.parentNode, tag)) {
+                    el = selEl.parentNode;
+                    list = this._getDoc().createElement('span');
+                    YAHOO.util.Dom.addClass(list, 'yui-non');
+                    str = '';
+                    var lis = el.getElementsByTagName('li');
+                    for (li = 0; li < lis.length; li++) {
+                        str += '<div>' + lis[li].innerHTML + '</div>';
+                    }
+                    list.innerHTML = str;
+                    this.currentElement[0] = el;
+                    this.currentElement[0].parentNode.replaceChild(list, this.currentElement[0]);
+                } else {
+                    this._createCurrentElement(tag.toLowerCase());
+                    list = this._getDoc().createElement(tag);
+                    for (li = 0; li < this.currentElement.length; li++) {
+                        var newli = this._getDoc().createElement('li');
+                        newli.innerHTML = this.currentElement[li].innerHTML + '<span class="yui-non"> </span> ';
+                        list.appendChild(newli);
+                        if (li > 0) {
+                            this.currentElement[li].parentNode.removeChild(this.currentElement[li]);
+                        }
+                    }
+                    this.currentElement[0].parentNode.replaceChild(list, this.currentElement[0]);
+                    this.currentElement[0] = list;
+                    var _h = this.currentElement[0].firstChild;
+                    _h = Dom.getElementsByClassName('yui-non', 'span', _h)[0];
+                    this._getSelection().setBaseAndExtent(_h, 1, _h, _h.innerText.length);
+                }
+                exec = false;
+            } else {
+                el = this._getSelectedElement();
+                if (this._isElement(el, 'li') && this._isElement(el.parentNode, tag) || (this.browser.ie && this._isElement(this._getRange().parentElement, 'li'))) { //we are in a list..
+                    if (this.browser.ie) {
+                        str = '';
+                        var lis2 = el.parentNode.getElementsByTagName('li');
+                        for (var j = 0; j < lis2.length; j++) {
+                            str += lis2[j].innerHTML + '<br>';
+                        }
+                        var newEl = this._getDoc().createElement('span');
+                        newEl.innerHTML = str;
+                        el.parentNode.parentNode.replaceChild(newEl, el.parentNode);
+                    } else {
+                        this.nodeChange();
+                        this._getDoc().execCommand(action, '', el.parentNode);
+                        this.nodeChange();
+                    }
+                    exec = false;
+                }
+                if (this.browser.opera) {
+                    var self = this;
+                    window.setTimeout(function() {
+                        var liso = self._getDoc().getElementsByTagName('li');
+                        for (var i = 0; i < liso.length; i++) {
+                            if (liso[i].innerHTML.toLowerCase() == '<br>') {
+                                liso[i].parentNode.parentNode.removeChild(liso[i].parentNode);
+                            }
+                        }
+                    },30);
+                }
+                if (this.browser.ie && exec) {
+                    var html = '';
+                    if (this._getRange().html) {
+                        html = '<li>' + this._getRange().html+ '</li>';
+                    } else {
+                        html = '<li>' + this._getRange().text + '</li>';
+                    }
+
+                    this._getRange().pasteHTML('<' + tag + '>' + html + '</' + tag + '>');
+                    exec = false;
+                }
+            }
+            return exec;
+        },
+        /**
+        * @method cmd_insertorderedlist
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('insertorderedlist ') is used.
+        */
+        cmd_insertorderedlist: function(value) {
+            return [this.cmd_list('ol')];
+        },
+        /**
+        * @method cmd_insertunorderedlist 
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('insertunorderedlist') is used.
+        */
+        cmd_insertunorderedlist: function(value) {
+            return [this.cmd_list('ul')];
+        },
+        /**
+        * @method cmd_fontname
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('fontname') is used.
+        */
+        cmd_fontname: function(value) {
+            var exec = true,
+                selEl = this._getSelectedElement();
+
+            this.currentFont = value;
+            if (selEl && selEl.tagName && !this._hasSelection()) {
+                YAHOO.util.Dom.setStyle(selEl, 'font-family', value);
+                exec = false;
+            }
+            return [exec];
+        },
+        /**
+        * @method cmd_fontsize
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('fontsize') is used.
+        */
+        cmd_fontsize: function(value) {
+            if ((this.currentElement.length > 0) && (!this._hasSelection())) {
+                YAHOO.util.Dom.setStyle(this.currentElement, 'fontSize', value);
+            } else if (!this._isElement(this._getSelectedElement(), 'body')) {
+                var el = this._getSelectedElement();
+                YAHOO.util.Dom.setStyle(el, 'fontSize', value);
+                this._selectNode(el);
+            } else {
+                this._createCurrentElement('span', {'fontSize': value });
+                this._selectNode(this.currentElement[0]);
+            }
+            return [false];
+        },
+    /* }}} */
+        /**
+        * @private
+        * @method _swapEl
+        * @param {HTMLElement} el The element to swap with
+        * @param {String} tagName The tagname of the element that you wish to create
+        * @param {Function} callback (optional) A function to run on the element after it is created, but before it is replaced. An element reference is passed to this function.
+        * @description This function will create a new element in the DOM and populate it with the contents of another element. Then it will assume it's place.
+        */
+        _swapEl: function(el, tagName, callback) {
+            var _el = this._getDoc().createElement(tagName);
+            _el.innerHTML = el.innerHTML;
+            if (typeof callback == 'function') {
+                callback.call(this, _el);
+            }
+            el.parentNode.replaceChild(_el, el);
+            return _el;
+        },
+        /**
+        * @private
+        * @method _createCurrentElement
+        * @param {String} tagName (optional defaults to a) The tagname of the element that you wish to create
+        * @param {Object} tagStyle (optional) Object literal containing styles to apply to the new element.
+        * @description This is a work around for the various browser issues with execCommand. This method will run <code>execCommand('fontname', false, 'yui-tmp')</code> on the given selection.
+        * It will then search the document for an element with the font-family set to <strong>yui-tmp</strong> and replace that with another span that has other information in it, then assign the new span to the 
+        * <code>this.currentElement</code> array, so we now have element references to the elements that were just modified. At this point we can use standard DOM manipulation to change them as we see fit.
+        */
+        _createCurrentElement: function(tagName, tagStyle) {
+            tagName = ((tagName) ? tagName : 'a');
+            var tar = null,
+                el = [],
+                _doc = this._getDoc();
+            
+            if (this.currentFont) {
+                if (!tagStyle) {
+                    tagStyle = {};
+                }
+                tagStyle.fontFamily = this.currentFont;
+                this.currentFont = null;
+            }
+            this.currentElement = [];
+
+            var _elCreate = function() {
+                var el = null;
+                switch (tagName) {
+                    case 'h1':
+                    case 'h2':
+                    case 'h3':
+                    case 'h4':
+                    case 'h5':
+                    case 'h6':
+                        el = _doc.createElement(tagName);
+                        break;
+                    default:
+                        el = _doc.createElement('span');
+                        YAHOO.util.Dom.addClass(el, 'yui-tag-' + tagName);
+                        YAHOO.util.Dom.addClass(el, 'yui-tag');
+                        el.setAttribute('tag', tagName);
+
+                        for (var k in tagStyle) {
+                            if (YAHOO.util.Lang.hasOwnProperty(tagStyle, k)) {
+                                el.style[k] = tagStyle[k];
+                            }
+                        }
+                        break;
+                }
+                return el;
+            };
+
+            if (!this._hasSelection()) {
+                if (this._getDoc().queryCommandEnabled('insertimage')) {
+                    this._getDoc().execCommand('insertimage', false, 'yui-tmp-img');
+                    var imgs = this._getDoc().getElementsByTagName('img');
+                    for (var j = 0; j < imgs.length; j++) {
+                        if (imgs[j].getAttribute('src', 2) == 'yui-tmp-img') {
+                            el = _elCreate();
+                            imgs[j].parentNode.replaceChild(el, imgs[j]);
+                            this.currentElement[this.currentElement.length] = el;
+                        }
+                    }
+                } else {
+                    if (this.currentEvent) {
+                        tar = YAHOO.util.Event.getTarget(this.currentEvent);
+                    } else {
+                        //For Safari..
+                        tar = this._getDoc().body;                        
+                    }
+                }
+                if (tar) {
+                    /**
+                    * @knownissue
+                    * @browser Safari 2.x
+                    * @description The issue here is that we have no way of knowing where the cursor position is
+                    * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
+                    */
+                    el = _elCreate();
+                    if (this._isElement(tar, 'body') || this._isElement(tar, 'html')) {
+                        if (this._isElement(tar, 'html')) {
+                            tar = this._getDoc().body;
+                        }
+                        tar.appendChild(el);
+                    } else if (tar.nextSibling) {
+                        tar.parentNode.insertBefore(el, tar.nextSibling);
+                    } else {
+                        tar.parentNode.appendChild(el);
+                    }
+                    //this.currentElement = el;
+                    this.currentElement[this.currentElement.length] = el;
+                    this.currentEvent = null;
+                    if (this.browser.webkit) {
+                        //Force Safari to focus the new element
+                        this._getSelection().setBaseAndExtent(el, 0, el, 0);
+                        if (this.browser.webkit3) {
+                            this._getSelection().collapseToStart();
+                        } else {
+                            this._getSelection().collapse(true);
+                        }
+                    }
+                }
+            } else {
+                //Force CSS Styling for this action...
+                this._setEditorStyle(true);
+                this._getDoc().execCommand('fontname', false, 'yui-tmp');
+                var _tmp = [];
+                /* TODO: This needs to be cleaned up.. */
+                var _tmp1 = this._getDoc().getElementsByTagName('font');
+                var _tmp2 = this._getDoc().getElementsByTagName(this._getSelectedElement().tagName);
+                var _tmp3 = this._getDoc().getElementsByTagName('span');
+                var _tmp4 = this._getDoc().getElementsByTagName('i');
+                var _tmp5 = this._getDoc().getElementsByTagName('b');
+                var _tmp6 = this._getDoc().getElementsByTagName(this._getSelectedElement().parentNode.tagName);
+                for (var e1 = 0; e1 < _tmp1.length; e1++) {
+                    _tmp[_tmp.length] = _tmp1[e1];
+                }
+                for (var e6 = 0; e6 < _tmp6.length; e6++) {
+                    _tmp[_tmp.length] = _tmp6[e6];
+                }
+                for (var e2 = 0; e2 < _tmp2.length; e2++) {
+                    _tmp[_tmp.length] = _tmp2[e2];
+                }
+                for (var e3 = 0; e3 < _tmp3.length; e3++) {
+                    _tmp[_tmp.length] = _tmp3[e3];
+                }
+                for (var e4 = 0; e4 < _tmp4.length; e4++) {
+                    _tmp[_tmp.length] = _tmp4[e4];
+                }
+                for (var e5 = 0; e5 < _tmp5.length; e5++) {
+                    _tmp[_tmp.length] = _tmp5[e5];
+                }
+                for (var i = 0; i < _tmp.length; i++) {
+                    if ((YAHOO.util.Dom.getStyle(_tmp[i], 'font-family') == 'yui-tmp') || (_tmp[i].face && (_tmp[i].face == 'yui-tmp'))) {
+                        el = _elCreate();
+                        el.innerHTML = _tmp[i].innerHTML;
+                        if (this._isElement(_tmp[i], 'ol') || (this._isElement(_tmp[i], 'ul'))) {
+                            var fc = _tmp[i].getElementsByTagName('li')[0];
+                            _tmp[i].style.fontFamily = 'inherit';
+                            fc.style.fontFamily = 'inherit';
+                            el.innerHTML = fc.innerHTML;
+                            fc.innerHTML = '';
+                            fc.appendChild(el);
+                            this.currentElement[this.currentElement.length] = el;
+                        } else if (this._isElement(_tmp[i], 'li')) {
+                            _tmp[i].innerHTML = '';
+                            _tmp[i].appendChild(el);
+                            _tmp[i].style.fontFamily = 'inherit';
+                            this.currentElement[this.currentElement.length] = el;
+                        } else {
+                            if (_tmp[i].parentNode) {
+                                _tmp[i].parentNode.replaceChild(el, _tmp[i]);
+                                this.currentElement[this.currentElement.length] = el;
+                                this.currentEvent = null;
+                                if (this.browser.webkit) {
+                                    //Force Safari to focus the new element
+                                    this._getSelection().setBaseAndExtent(el, 0, el, 0);
+                                    if (this.browser.webkit3) {
+                                        this._getSelection().collapseToStart();
+                                    } else {
+                                        this._getSelection().collapse(true);
+                                    }
+                                }
+                                if (this.browser.ie && tagStyle && tagStyle.fontSize) {
+                                    this._getSelection().empty();
+                                }
+                                if (this.browser.gecko) {
+                                    this._getSelection().collapseToStart();
+                                }
+                            }
+                        }
+                    }
+                }
+                var len = this.currentElement.length;
+                for (var e = 0; e < len; e++) {
+                    if ((e + 1) != len) { //Skip the last one in the list
+                        if (this.currentElement[e] && this.currentElement[e].nextSibling) {
+                            if (this._isElement(this.currentElement[e], 'br')) {
+                                this.currentElement[this.currentElement.length] = this.currentElement[e].nextSibling;
+                            }
+                        }
+                    }
+                }
+            }
+        },
+        /**
+        * @method saveHTML
+        * @description Cleans the HTML with the cleanHTML method then places that string back into the textarea.
+        */
+        saveHTML: function() {
+            var html = this.cleanHTML();
+            this.get('element').value = html;
+            return html;
+        },
+        /**
+        * @method setEditorHTML
+        * @param {String} html The html content to load into the editor
+        * @description Loads HTML into the editors body
+        */
+        setEditorHTML: function(html) {
+            html = this._cleanIncomingHTML(html);
+            this._getDoc().body.innerHTML = html;
+            this.nodeChange();
+        },
+        /**
+        * @method getEditorHTML
+        * @description Gets the unprocessed/unfiltered HTML from the editor
+        */
+        getEditorHTML: function() {
+            return this._getDoc().body.innerHTML;
+        },
+        /**
+        * @method show
+        * @description This method needs to be called if the Editor was hidden (like in a TabView or Panel). It is used to reset the editor after being in a container that was set to display none.
+        */
+        show: function() {
+            if (this.browser.gecko) {
+                this._setDesignMode('on');
+                this._focusWindow();
+            }
+            if (this.browser.webkit) {
+                var self = this;
+                window.setTimeout(function() {
+                    self._setInitialContent.call(self);
+                }, 10);
+            }
+            //Adding this will close all other Editor window's when showing this one.
+            if (YAHOO.widget.EditorInfo.window.win && YAHOO.widget.EditorInfo.window.scope) {
+                YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);
+            }
+            //Put the iframe back in place
+            this.get('iframe').setStyle('position', 'static');
+            this.get('iframe').setStyle('left', '');
+        },
+        /**
+        * @method hide
+        * @description This method needs to be called if the Editor is to be hidden (like in a TabView or Panel). It should be called to clear timeouts and close open editor windows.
+        */
+        hide: function() {
+            //Adding this will close all other Editor window's.
+            if (YAHOO.widget.EditorInfo.window.win && YAHOO.widget.EditorInfo.window.scope) {
+                YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);
+            }
+            if (this._fixNodesTimer) {
+                clearTimeout(this._fixNodesTimer);
+                this._fixNodesTimer = null;
+            }
+            if (this._nodeChangeTimer) {
+                clearTimeout(this._nodeChangeTimer);
+                this._nodeChangeTimer = null;
+            }
+            this._lastNodeChange = 0;
+            //Move the iframe off of the screen, so that in containers with visiblity hidden, IE will not cover other elements.
+            this.get('iframe').setStyle('position', 'absolute');
+            this.get('iframe').setStyle('left', '-9999px');
+        },
+        /**
+        * @method _cleanIncomingHTML
+        * @param {String} html The unfiltered HTML
+        * @description Process the HTML with a few regexes to clean it up and stabilize the input
+        * @returns {String} The filtered HTML
+        */
+        _cleanIncomingHTML: function(html) {
+            html = html.replace(/<strong([^>]*)>/gi, '<b$1>');
+            html = html.replace(/<\/strong>/gi, '</b>');   
+            html = html.replace(/<em([^>]*)>/gi, '<i$1>');
+            html = html.replace(/<\/em>/gi, '</i>');
+            return html;
+        },
+        /**
+        * @method cleanHTML
+        * @param {String} html The unfiltered HTML
+        * @description Process the HTML with a few regexes to clean it up and stabilize the output
+        * @returns {String} The filtered HTML
+        */
+        cleanHTML: function(html) {
+            //Start Filtering Output
+            //Begin RegExs..
+            if (!html) { 
+                html = this.getEditorHTML();
+            }
+            var markup = this.get('markup');
+            //Make some backups...
+            html = this.pre_filter_linebreaks(html, markup);
+
+		    html = html.replace(/<img([^>]*)\/>/gi, '<YUI_IMG$1>');
+		    html = html.replace(/<img([^>]*)>/gi, '<YUI_IMG$1>');
+
+		    html = html.replace(/<input([^>]*)\/>/gi, '<YUI_INPUT$1>');
+		    html = html.replace(/<input([^>]*)>/gi, '<YUI_INPUT$1>');
+
+		    html = html.replace(/<ul([^>]*)>/gi, '<YUI_UL$1>');
+		    html = html.replace(/<\/ul>/gi, '<\/YUI_UL>');
+		    html = html.replace(/<blockquote([^>]*)>/gi, '<YUI_BQ$1>');
+		    html = html.replace(/<\/blockquote>/gi, '<\/YUI_BQ>');
+
+            //Convert b and i tags to strong and em tags
+            if ((markup == 'semantic') || (markup == 'xhtml')) {
+                html = html.replace(/<i([^>]*)>/gi, '<em$1>');
+                html = html.replace(/<\/i>/gi, '</em>');
+                html = html.replace(/<b([^>]*)>/gi, '<strong$1>');
+                html = html.replace(/<\/b>/gi, '</strong>');
+            }
+            
+            //Case Changing
+		    html = html.replace(/<font/gi, '<font');
+		    html = html.replace(/<\/font>/gi, '</font>');
+		    html = html.replace(/<span/gi, '<span');
+		    html = html.replace(/<\/span>/gi, '</span>');
+            if ((markup == 'semantic') || (markup == 'xhtml') || (markup == 'css')) {
+                html = html.replace(new RegExp('<font([^>]*)face="([^>]*)">(.*?)<\/font>', 'gi'), '<span $1 style="font-family: $2;">$3</span>');
+                html = html.replace(/<u/gi, '<span style="text-decoration: underline;"');
+                html = html.replace(/\/u>/gi, '/span>');
+                if (markup == 'css') {
+                    html = html.replace(/<em([^>]*)>/gi, '<i$1>');
+                    html = html.replace(/<\/em>/gi, '</i>');
+                    html = html.replace(/<strong([^>]*)>/gi, '<b$1>');
+                    html = html.replace(/<\/strong>/gi, '</b>');
+                    html = html.replace(/<b/gi, '<span style="font-weight: bold;"');
+                    html = html.replace(/\/b>/gi, '/span>');
+                    html = html.replace(/<i/gi, '<span style="font-style: italic;"');
+                    html = html.replace(/\/i>/gi, '/span>');
+                }
+                html = html.replace(/  /gi, ' '); //Replace all double spaces and replace with a single
+            } else {
+		        html = html.replace(/<u/gi, '<u');
+		        html = html.replace(/\/u>/gi, '/u>');
+            }
+		    html = html.replace(/<ol([^>]*)>/gi, '<ol$1>');
+		    html = html.replace(/\/ol>/gi, '/ol>');
+		    html = html.replace(/<li/gi, '<li');
+		    html = html.replace(/\/li>/gi, '/li>');
+            html = this.filter_safari(html);
+
+            html = this.filter_internals(html);
+
+            html = this.filter_all_rgb(html);
+
+            //Replace our backups with the real thing
+            html = this.post_filter_linebreaks(html, markup);
+
+            if (markup == 'xhtml') {
+		        html = html.replace(/<YUI_IMG([^>]*)>/g, '<img $1/>');
+		        html = html.replace(/<YUI_INPUT([^>]*)>/g, '<input $1/>');
+            } else {
+		        html = html.replace(/<YUI_IMG([^>]*)>/g, '<img $1>');
+		        html = html.replace(/<YUI_INPUT([^>]*)>/g, '<input $1>');
+            }
+		    html = html.replace(/<YUI_UL([^>]*)>/g, '<ul$1>');
+		    html = html.replace(/<\/YUI_UL>/g, '<\/ul>');
+
+            html = this.filter_invalid_lists(html);
+
+		    html = html.replace(/<YUI_BQ([^>]*)>/g, '<blockquote$1>');
+		    html = html.replace(/<\/YUI_BQ>/g, '<\/blockquote>');
+
+            //Trim the output, removing whitespace from the beginning and end
+            html = YAHOO.lang.trim(html);
+
+            if (this.get('removeLineBreaks')) {
+                html = html.replace(/\n/g, '').replace(/\r/g, '');
+                html = html.replace(/  /gi, ' '); //Replace all double spaces and replace with a single
+            }
+            
+            //First empty span
+            if (html.substring(0, 6).toLowerCase() == '<span>')  {
+                html = html.substring(6);
+            }
+            //Last empty span
+            if (html.substring(html.length - 7, html.length).toLowerCase() == '</span>')  {
+                html = html.substring(0, html.length - 7);
+            }
+
+
+            for (var v in this.invalidHTML) {
+                if (YAHOO.lang.hasOwnProperty(this.invalidHTML, v)) {
+                    if (Lang.isObject(v) && v.keepContents) {
+                        html = html.replace(new RegExp('<' + v + '([^>]*)>(.*?)<\/' + v + '>', 'gi'), '$1');
+                    } else {
+                        html = html.replace(new RegExp('<' + v + '([^>]*)>(.*?)<\/' + v + '>', 'gi'), '');
+                    }
+                }
+            }
+
+            this.fireEvent('cleanHTML', { type: 'cleanHTML', target: this, html: html });
+
+            return html;
+        },
+        /**
+        * @method filter_invalid_lists
+        * @param String html The HTML string to filter
+        * @description Filters invalid ol and ul list markup, converts this: <li></li><ol>..</ol> to this: <li></li><li><ol>..</ol></li>
+        * @returns String
+        */
+        filter_invalid_lists: function(html) {
+            html = html.replace(/<\/li>\n/gi, '</li>');
+
+            html = html.replace(/<\/li><ol>/gi, '</li><li><ol>');
+            html = html.replace(/<\/ol>/gi, '</ol></li>');
+            html = html.replace(/<\/ol><\/li>\n/gi, "</ol>\n");
+
+            html = html.replace(/<\/li><ul>/gi, '</li><li><ul>');
+            html = html.replace(/<\/ul>/gi, '</ul></li>');
+            html = html.replace(/<\/ul><\/li>\n/gi, "</ul>\n");
+
+            html = html.replace(/<\/li>/gi, "</li>\n");
+            html = html.replace(/<\/ol>/gi, "</ol>\n");
+            html = html.replace(/<ol>/gi, "<ol>\n");
+            html = html.replace(/<ul>/gi, "<ul>\n");
+            return html;
+        },
+        /**
+        * @method filter_safari
+        * @param String html The HTML string to filter
+        * @description Filters strings specific to Safari
+        * @returns String
+        */
+        filter_safari: function(html) {
+            if (this.browser.webkit) {
+                html = html.replace(/Apple-style-span/gi, '');
+                html = html.replace(/style="line-height: normal;"/gi, '');
+                //Remove bogus LI's
+                html = html.replace(/<li><\/li>/gi, '');
+                html = html.replace(/<li> <\/li>/gi, '');
+                html = html.replace(/<li>  <\/li>/gi, '');
+                //Remove bogus DIV's
+                html = html.replace(/<div><\/div>/gi, '');
+                html = html.replace(/<div> <\/div>/gi, '');
+            }
+            return html;
+        },
+        /**
+        * @method filter_internals
+        * @param String html The HTML string to filter
+        * @description Filters internal RTE strings and bogus attrs we don't want
+        * @returns String
+        */
+        filter_internals: function(html) {
+		    html = html.replace(/\r/g, '');
+            //Fix stuff we don't want
+	        html = html.replace(/<\/?(body|head|html)[^>]*>/gi, '');
+            //Fix last BR in LI
+		    html = html.replace(/<YUI_BR><\/li>/gi, '</li>');
+
+		    html = html.replace(/yui-tag-span/gi, '');
+		    html = html.replace(/yui-tag/gi, '');
+		    html = html.replace(/yui-non/gi, '');
+		    html = html.replace(/yui-img/gi, '');
+		    html = html.replace(/ tag="span"/gi, '');
+		    html = html.replace(/ class=""/gi, '');
+		    html = html.replace(/ style=""/gi, '');
+		    html = html.replace(/ class=" "/gi, '');
+		    html = html.replace(/ class="  "/gi, '');
+		    html = html.replace(/ target=""/gi, '');
+		    html = html.replace(/ title=""/gi, '');
+
+            if (this.browser.ie) {
+		        html = html.replace(/ class= /gi, '');
+		        html = html.replace(/ class= >/gi, '');
+		        html = html.replace(/_height="([^>])"/gi, '');
+		        html = html.replace(/_width="([^>])"/gi, '');
+            }
+            
+            return html;
+        },
+        /**
+        * @method filter_all_rgb
+        * @param String str The HTML string to filter
+        * @description Converts all RGB color strings found in passed string to a hex color, example: style="color: rgb(0, 255, 0)" converts to style="color: #00ff00"
+        * @returns String
+        */
+        filter_all_rgb: function(str) {
+            var exp = new RegExp("rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)", "gi");
+            var arr = str.match(exp);
+            if (Lang.isArray(arr)) {
+                for (var i = 0; i < arr.length; i++) {
+                    var color = this.filter_rgb(arr[i]);
+                    str = str.replace(arr[i].toString(), color);
+                }
+            }
+            
+            return str;
+        },
+        /**
+        * @method filter_rgb
+        * @param String css The CSS string containing rgb(#,#,#);
+        * @description Converts an RGB color string to a hex color, example: rgb(0, 255, 0) converts to #00ff00
+        * @returns String
+        */
+        filter_rgb: function(css) {
+            if (css.toLowerCase().indexOf('rgb') != -1) {
+                var exp = new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)", "gi");
+                var rgb = css.replace(exp, "$1,$2,$3,$4,$5").split(',');
+            
+                if (rgb.length == 5) {
+                    var r = parseInt(rgb[1], 10).toString(16);
+                    var g = parseInt(rgb[2], 10).toString(16);
+                    var b = parseInt(rgb[3], 10).toString(16);
+
+                    r = r.length == 1 ? '0' + r : r;
+                    g = g.length == 1 ? '0' + g : g;
+                    b = b.length == 1 ? '0' + b : b;
+
+                    css = "#" + r + g + b;
+                }
+            }
+            return css;
+        },
+        /**
+        * @method pre_filter_linebreaks
+        * @param String html The HTML to filter
+        * @param String markup The markup type to filter to
+        * @description HTML Pre Filter
+        * @returns String
+        */
+        pre_filter_linebreaks: function(html, markup) {
+            if (this.browser.webkit) {
+		        html = html.replace(/<br class="khtml-block-placeholder">/gi, '<YUI_BR>');
+		        html = html.replace(/<br class="webkit-block-placeholder">/gi, '<YUI_BR>');
+            }
+		    html = html.replace(/<br>/gi, '<YUI_BR>');
+		    html = html.replace(/<br (.*?)>/gi, '<YUI_BR>');
+		    html = html.replace(/<br\/>/gi, '<YUI_BR>');
+		    html = html.replace(/<br \/>/gi, '<YUI_BR>');
+		    html = html.replace(/<div><YUI_BR><\/div>/gi, '<YUI_BR>');
+		    html = html.replace(/<p>( | )<\/p>/g, '<YUI_BR>');            
+		    html = html.replace(/<p><br> <\/p>/gi, '<YUI_BR>');
+		    html = html.replace(/<p> <\/p>/gi, '<YUI_BR>');
+            //Fix last BR
+	        html = html.replace(/<YUI_BR>$/, '');
+            //Fix last BR in P
+	        html = html.replace(/<YUI_BR><\/p>/g, '</p>');
+            return html;
+        },
+        /**
+        * @method post_filter_linebreaks
+        * @param String html The HTML to filter
+        * @param String markup The markup type to filter to
+        * @description HTML Pre Filter
+        * @returns String
+        */
+        post_filter_linebreaks: function(html, markup) {
+            if (markup == 'xhtml') {
+		        html = html.replace(/<YUI_BR>/g, '<br/>');
+            } else {
+		        html = html.replace(/<YUI_BR>/g, '<br>');
+            }
+            return html;
+        },
+        /**
+        * @method clearEditorDoc
+        * @description Clear the doc of the Editor
+        */
+        clearEditorDoc: function() {
+            this._getDoc().body.innerHTML = ' ';
+        },
+        /**
+        * @private
+        * @method _renderPanel
+        * @description Override Method for Advanced Editor
+        */
+        _renderPanel: function() {
+        },
+        /**
+        * @method openWindow
+        * @description Override Method for Advanced Editor
+        */
+        openWindow: function(win) {
+        },
+        /**
+        * @method moveWindow
+        * @description Override Method for Advanced Editor
+        */
+        moveWindow: function() {
+        },
+        /**
+        * @private
+        * @method _closeWindow
+        * @description Override Method for Advanced Editor
+        */
+        _closeWindow: function() {
+        },
+        /**
+        * @method closeWindow
+        * @description Override Method for Advanced Editor
+        */
+        closeWindow: function() {
+            this.unsubscribeAll('afterExecCommand');
+            this.toolbar.resetAllButtons();
+            this._focusWindow();        
+        },
+        /**
+        * @method destroy
+        * @description Destroys the editor, all of it's elements and objects.
+        * @return {Boolean}
+        */
+        destroy: function() {
+            this.saveHTML();
+            this.toolbar.destroy();
+            this.setStyle('visibility', 'hidden');
+            this.setStyle('position', 'absolute');
+            this.setStyle('top', '-9999px');
+            this.setStyle('left', '-9999px');
+            var textArea = this.get('element');
+            this.get('element_cont').get('parentNode').replaceChild(textArea, this.get('element_cont').get('element'));
+            this.get('element_cont').get('element').innerHTML = '';
+            //Brutal Object Destroy
+            for (var i in this) {
+                if (Lang.hasOwnProperty(this, i)) {
+                    this[i] = null;
+                }
+            }
+            return true;
+        },        
+        /**
+        * @method toString
+        * @description Returns a string representing the editor.
+        * @return {String}
+        */
+        toString: function() {
+            var str = 'SimpleEditor';
+            if (this.get && this.get('element_cont')) {
+                str = 'SimpleEditor (#' + this.get('element_cont').get('id') + ')' + ((this.get('disabled') ? ' Disabled' : ''));
+            }
+            return str;
+        }
+    });
+
+/**
+* @event toolbarLoaded
+* @description Event is fired during the render process directly after the Toolbar is loaded. Allowing you to attach events to the toolbar. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event cleanHTML
+* @description Event is fired after the cleanHTML method is called.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event afterRender
+* @description Event is fired after the render process finishes. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorContentLoaded
+* @description Event is fired after the editor iframe's document fully loads and fires it's onload event. From here you can start injecting your own things into the document. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorMouseUp
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorMouseDown
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorDoubleClick
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorKeyUp
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorKeyPress
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorKeyDown
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event beforeNodeChange
+* @description Event fires at the beginning of the nodeChange process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event afterNodeChange
+* @description Event fires at the end of the nodeChange process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event beforeExecCommand
+* @description Event fires at the beginning of the execCommand process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event afterExecCommand
+* @description Event fires at the end of the execCommand process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+
+/**
+     * @description Singleton object used to track the open window objects and panels across the various open editors
+     * @class EditorInfo
+     * @static
+    */
+    YAHOO.widget.EditorInfo = {
+        /**
+        * @private
+        * @property _instances
+        * @description A reference to all editors on the page.
+        * @type Object
+        */
+        _instances: {},
+        /**
+        * @private
+        * @property window
+        * @description A reference to the currently open window object in any editor on the page.
+        * @type Object <a href="YAHOO.widget.EditorWindow.html">YAHOO.widget.EditorWindow</a>
+        */
+        window: {},
+        /**
+        * @private
+        * @property panel
+        * @description A reference to the currently open panel in any editor on the page.
+        * @type Object <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>
+        */
+        panel: null,
+        /**
+        * @method getEditorById
+        * @description Returns a reference to the Editor object associated with the given textarea
+        * @param {String/HTMLElement} id The id or reference of the textarea to return the Editor instance of
+        * @returns Object <a href="YAHOO.widget.Editor.html">YAHOO.widget.Editor</a>
+        */
+        getEditorById: function(id) {
+            if (!YAHOO.lang.isString(id)) {
+                //Not a string, assume a node Reference
+                id = id.id;
+            }
+            if (this._instances[id]) {
+                return this._instances[id];
+            }
+            return false;
+        },
+        /**
+        * @method toString
+        * @description Returns a string representing the EditorInfo.
+        * @return {String}
+        */
+        toString: function() {
+            var len = 0;
+            for (var i in this._instances) {
+                len++;
+            }
+            return 'Editor Info (' + len + ' registered intance' + ((len > 1) ? 's' : '') + ')';
+        }
+    };
+
+
+
+    
+})();
+YAHOO.register("simpleeditor", YAHOO.widget.SimpleEditor, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/element/README
===================================================================
--- trunk/root/static/yui/element/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/element/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,8 @@
 Element Release Notes
 
+*** version 2.4.0 ***
+no change
+
 *** version 2.3.1 ***
 no change
 

Modified: trunk/root/static/yui/element/element-beta-debug.js
===================================================================
--- trunk/root/static/yui/element/element-beta-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/element/element-beta-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * Provides Attribute configurations.
@@ -978,4 +978,4 @@
 YAHOO.augment(YAHOO.util.Element, AttributeProvider);
 })();
 
-YAHOO.register("element", YAHOO.util.Element, {version: "2.3.1", build: "541"});
+YAHOO.register("element", YAHOO.util.Element, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/element/element-beta-min.js
===================================================================
--- trunk/root/static/yui/element/element-beta-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/element/element-beta-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 YAHOO.util.Attribute=function(B,A){if(A){this.owner=A;this.configure(B,true);}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,validator:null,getValue:function(){return this.value;},setValue:function(F,B){var E;var A=this.owner;var C=this.name;var D={type:C,prevValue:this.getValue(),newValue:F};if(this.readOnly||(this.writeOnce&&this._written)){return false;}if(this.validator&&!this.validator.call(A,F)){return false;}if(!B){E=A.fireBeforeChangeEvent(D);if(E===false){return false;}}if(this.method){this.method.call(A,F);}this.value=F;this._written=true;D.type=C;if(!B){this.owner.fireChangeEvent(D);}return true;},configure:function(B,C){B=B||{};this._written=false;this._initialConfig=this._initialConfig||{};for(var A in B){if(A&&YAHOO.lang.hasOwnProperty(B,A)){this[A]=B[A];if(C){this._initialConfig[A]=B[A];}}}},resetValue:function(){return this.setValue(this._initialConfig.value!
 );},resetConfig:function(){this.configure(this._initialConfig);},refresh:function(A){this.setValue(this.value,A);}};(function(){var A=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(C){this._configs=this._configs||{};var B=this._configs[C];if(!B){return undefined;}return B.value;},set:function(D,E,B){this._configs=this._configs||{};var C=this._configs[D];if(!C){return false;}return C.setValue(E,B);},getAttributeKeys:function(){this._configs=this._configs;var D=[];var B;for(var C in this._configs){B=this._configs[C];if(A.hasOwnProperty(this._configs,C)&&!A.isUndefined(B)){D[D.length]=C;}}return D;},setAttributes:function(D,B){for(var C in D){if(A.hasOwnProperty(D,C)){this.set(C,D[C],B);}}},resetValue:function(C,B){this._configs=this._configs||{};if(this._configs[C]){this.set(C,this._configs[C]._initialConfig.value,B);return true;}return false;},refresh:function(E,C){this._configs=this._configs;E=((A!
 .isString(E))?[E]:E)||this.getAttributeKeys();for(var D=0,B=E.!
 length;D
<B;++D){if(this._configs[E[D]]&&!A.isUndefined(this._configs[E[D]].value)&&!A.isNull(this._configs[E[D]].value)){this._configs[E[D]].refresh(C);}}},register:function(B,C){this.setAttributeConfig(B,C);},getAttributeConfig:function(C){this._configs=this._configs||{};var B=this._configs[C]||{};var D={};for(C in B){if(A.hasOwnProperty(B,C)){D[C]=B[C];}}return D;},setAttributeConfig:function(B,C,D){this._configs=this._configs||{};C=C||{};if(!this._configs[B]){C.name=B;this._configs[B]=this.createAttribute(C);}else{this._configs[B].configure(C,D);}},configureAttribute:function(B,C,D){this.setAttributeConfig(B,C,D);},resetAttributeConfig:function(B){this._configs=this._configs||{};this._configs[B].resetConfig();},subscribe:function(B,C){this._events=this._events||{};if(!(B in this._events)){this._events[B]=this.createEvent(B);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.subscribe.apply(this,arguments);},addListener:function(){this.subscri!
 be.apply(this,arguments);},fireBeforeChangeEvent:function(C){var B="before";B+=C.type.charAt(0).toUpperCase()+C.type.substr(1)+"Change";C.type=B;return this.fireEvent(C.type,C);},fireChangeEvent:function(B){B.type+="Change";return this.fireEvent(B.type,B);},createAttribute:function(B){return new YAHOO.util.Attribute(B,this);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var D=YAHOO.util.Dom,F=YAHOO.util.AttributeProvider;YAHOO.util.Element=function(G,H){if(arguments.length){this.init(G,H);}};YAHOO.util.Element.prototype={DOM_EVENTS:null,appendChild:function(G){G=G.get?G.get("element"):G;this.get("element").appendChild(G);},getElementsByTagName:function(G){return this.get("element").getElementsByTagName(G);},hasChildNodes:function(){return this.get("element").hasChildNodes();},insertBefore:function(G,H){G=G.get?G.get("element"):G;H=(H&&H.get)?H.get("element"):H;this.get("element").insertBefore(G,H);},removeChild:function(G){G=G.get?G!
 .get("element"):G;this.get("element").removeChild(G);return tr!
 ue;},rep
laceChild:function(G,H){G=G.get?G.get("element"):G;H=H.get?H.get("element"):H;return this.get("element").replaceChild(G,H);},initAttributes:function(G){},addListener:function(K,J,L,I){var H=this.get("element");I=I||this;H=this.get("id")||H;var G=this;if(!this._events[K]){if(this.DOM_EVENTS[K]){YAHOO.util.Event.addListener(H,K,function(M){if(M.srcElement&&!M.target){M.target=M.srcElement;}G.fireEvent(K,M);},L,I);}this.createEvent(K,this);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.addListener.apply(this,arguments);},subscribe:function(){this.addListener.apply(this,arguments);},removeListener:function(H,G){this.unsubscribe.apply(this,arguments);},addClass:function(G){D.addClass(this.get("element"),G);},getElementsByClassName:function(H,G){return D.getElementsByClassName(H,G,this.get("element"));},hasClass:function(G){return D.hasClass(this.get("element"),G);},removeClass:function(G){return D.removeClass(this.get("element"),G);},repl!
 aceClass:function(H,G){return D.replaceClass(this.get("element"),H,G);},setStyle:function(I,H){var G=this.get("element");if(!G){return this._queue[this._queue.length]=["setStyle",arguments];}return D.setStyle(G,I,H);},getStyle:function(G){return D.getStyle(this.get("element"),G);},fireQueue:function(){var H=this._queue;for(var I=0,G=H.length;I<G;++I){this[H[I][0]].apply(this,H[I][1]);}},appendTo:function(H,I){H=(H.get)?H.get("element"):D.get(H);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:H});I=(I&&I.get)?I.get("element"):D.get(I);var G=this.get("element");if(!G){return false;}if(!H){return false;}if(G.parent!=H){if(I){H.insertBefore(G,I);}else{H.appendChild(G);}}this.fireEvent("appendTo",{type:"appendTo",target:H});},get:function(G){var I=this._configs||{};var H=I.element;if(H&&!I[G]&&!YAHOO.lang.isUndefined(H.value[G])){return H.value[G];}return F.prototype.get.call(this,G);},setAttributes:function(L,H){var K=this.get("element");
-for(var J in L){if(!this._configs[J]&&!YAHOO.lang.isUndefined(K[J])){this.setAttributeConfig(J);}}for(var I=0,G=this._configOrder.length;I<G;++I){if(L[this._configOrder[I]]){this.set(this._configOrder[I],L[this._configOrder[I]],H);}}},set:function(H,J,G){var I=this.get("element");if(!I){this._queue[this._queue.length]=["set",arguments];if(this._configs[H]){this._configs[H].value=J;}return ;}if(!this._configs[H]&&!YAHOO.lang.isUndefined(I[H])){C.call(this,H);}return F.prototype.set.apply(this,arguments);},setAttributeConfig:function(G,I,J){var H=this.get("element");if(H&&!this._configs[G]&&!YAHOO.lang.isUndefined(H[G])){C.call(this,G,I);}else{F.prototype.setAttributeConfig.apply(this,arguments);}this._configOrder.push(G);},getAttributeKeys:function(){var H=this.get("element");var I=F.prototype.getAttributeKeys.call(this);for(var G in H){if(!this._configs[G]){I[G]=I[G]||H[G];}}return I;},createEvent:function(H,G){this._events[H]=true;F.prototype.createEvent.apply(this,argumen!
 ts);},init:function(H,G){A.apply(this,arguments);}};var A=function(H,G){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];G=G||{};G.element=G.element||H||null;this.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true};var I=false;if(YAHOO.lang.isString(H)){C.call(this,"id",{value:G.element});}if(D.get(H)){I=true;E.call(this,G);B.call(this,G);}YAHOO.util.Event.onAvailable(G.element,function(){if(!I){E.call(this,G);}this.fireEvent("available",{type:"available",target:G.element});},this,true);YAHOO.util.Event.onContentReady(G.element,function(){if(!I){B.call(this,G);}this.fireEvent("contentReady",{type:"contentReady",target:G.element});},this,true);};var E=function(G){this.setAttributeConfig("element",{value:D.get(G.element),readOnly:true});};var B=function(G){this.i!
 nitAttributes(G);this.setAttributes(G,true);this.fireQueue();}!
 ;var C=f
unction(G,I){var H=this.get("element");I=I||{};I.name=G;I.method=I.method||function(J){H[G]=J;};I.value=I.value||H[G];this._configs[G]=new YAHOO.util.Attribute(I,this);};YAHOO.augment(YAHOO.util.Element,F);})();YAHOO.register("element",YAHOO.util.Element,{version:"2.3.1",build:"541"});
\ No newline at end of file
+for(var J in L){if(!this._configs[J]&&!YAHOO.lang.isUndefined(K[J])){this.setAttributeConfig(J);}}for(var I=0,G=this._configOrder.length;I<G;++I){if(L[this._configOrder[I]]){this.set(this._configOrder[I],L[this._configOrder[I]],H);}}},set:function(H,J,G){var I=this.get("element");if(!I){this._queue[this._queue.length]=["set",arguments];if(this._configs[H]){this._configs[H].value=J;}return ;}if(!this._configs[H]&&!YAHOO.lang.isUndefined(I[H])){C.call(this,H);}return F.prototype.set.apply(this,arguments);},setAttributeConfig:function(G,I,J){var H=this.get("element");if(H&&!this._configs[G]&&!YAHOO.lang.isUndefined(H[G])){C.call(this,G,I);}else{F.prototype.setAttributeConfig.apply(this,arguments);}this._configOrder.push(G);},getAttributeKeys:function(){var H=this.get("element");var I=F.prototype.getAttributeKeys.call(this);for(var G in H){if(!this._configs[G]){I[G]=I[G]||H[G];}}return I;},createEvent:function(H,G){this._events[H]=true;F.prototype.createEvent.apply(this,argumen!
 ts);},init:function(H,G){A.apply(this,arguments);}};var A=function(H,G){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];G=G||{};G.element=G.element||H||null;this.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true};var I=false;if(YAHOO.lang.isString(H)){C.call(this,"id",{value:G.element});}if(D.get(H)){I=true;E.call(this,G);B.call(this,G);}YAHOO.util.Event.onAvailable(G.element,function(){if(!I){E.call(this,G);}this.fireEvent("available",{type:"available",target:G.element});},this,true);YAHOO.util.Event.onContentReady(G.element,function(){if(!I){B.call(this,G);}this.fireEvent("contentReady",{type:"contentReady",target:G.element});},this,true);};var E=function(G){this.setAttributeConfig("element",{value:D.get(G.element),readOnly:true});};var B=function(G){this.i!
 nitAttributes(G);this.setAttributes(G,true);this.fireQueue();}!
 ;var C=f
unction(G,I){var H=this.get("element");I=I||{};I.name=G;I.method=I.method||function(J){H[G]=J;};I.value=I.value||H[G];this._configs[G]=new YAHOO.util.Attribute(I,this);};YAHOO.augment(YAHOO.util.Element,F);})();YAHOO.register("element",YAHOO.util.Element,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/element/element-beta.js
===================================================================
--- trunk/root/static/yui/element/element-beta.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/element/element-beta.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * Provides Attribute configurations.
@@ -964,4 +964,4 @@
 YAHOO.augment(YAHOO.util.Element, AttributeProvider);
 })();
 
-YAHOO.register("element", YAHOO.util.Element, {version: "2.3.1", build: "541"});
+YAHOO.register("element", YAHOO.util.Element, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/event/README
===================================================================
--- trunk/root/static/yui/event/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/event/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,6 +1,24 @@
 
 YUI Library - Event - Release Notes
 
+2.4.1
+  * Reverted clearAttributes() change to fix IE memory leak on iframes/windows
+
+2.4.0
+  * getListeners/purgeElement accepts either an element reference or an element id
+  * onAvailable/onContentReady accepts a single id or an array of ids
+  * No longer removing listeners during the unload event for non-IE browsers
+  * IE unload strategy for cross page memory leaks changed from removing each listener
+    to calling clearAttributes()
+  * the DOMReady property is now public
+  * Changed IE onDOMReady approach from the defered script node hack to the doScroll('left') hack
+  * getCharChode now Remaps SHIFT-TAB key code (25) to TAB (9) in Safari
+  * getCharCode provides the proper key codes for page up and page down in Safari
+  * Restored object check to _isValidCollection.
+  * In KeyListener, added keycode constants for some of the special keys.
+  * Rolled back the change added for hacking around IE errors from bubbled 
+    events that originally targeted an ActiveX control.
+
 2.3.1
   * CustomEvent fire() now catches exceptions thrown by the subscribers so
     that the rest of the subscribers execute.  The exception is logged and
@@ -9,7 +27,10 @@
   * onAvailable/onContentReady will work if an element ref rather than an
     id is provided.
   * getListeners: fixed the values for the obj and adjust properties.
-    Added scope property
+    Added scope property.
+  * Added IE hack for when the event target is something that can't be
+    inspected (like a VML canvas).  In this case the target is set to
+    the element the listener is bound to.
 
 2.3.0
   * addListener now produces a logger warning if the supplied callback is 

Modified: trunk/root/static/yui/event/event-debug.js
===================================================================
--- trunk/root/static/yui/event/event-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/event/event-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 
 /**
@@ -226,8 +226,6 @@
             args.push(arguments[i]);
         }
 
-        var argslength = args.length;
-
         if (!this.silent) {
             YAHOO.log( "Firing "       + this  + ", " + 
                        "args: "        + args  + ", " +
@@ -263,9 +261,9 @@
                 } else {
                     try {
                         ret = s.fn.call(scope, this.type, args, s.obj);
-                    } catch(e) {
-                        this.lastError = e;
-                        YAHOO.log(this + " subscriber exception: " + e,
+                    } catch(ex) {
+                        this.lastError = ex;
+                        YAHOO.log(this + " subscriber exception: " + ex,
                                   "error", "Event");
                     }
                 }
@@ -454,15 +452,6 @@
         var loadComplete =  false;
 
         /**
-         * True when the document is initially usable
-         * @property DOMReady
-         * @type boolean
-         * @static
-         * @private
-         */
-        var DOMReady = false;
-
-        /**
          * Cache of wrapped listeners
          * @property listeners
          * @type array
@@ -544,7 +533,11 @@
             63232: 38, // up
             63233: 40, // down
             63234: 37, // left
-            63235: 39  // right
+            63235: 39, // right
+            63276: 33, // page up
+            63277: 34, // page down
+            25: 9      // SHIFT-TAB (Safari provides a different key code in
+                       // this case, even though the shiftKey modifier is set)
         };
 
         return {
@@ -693,6 +686,22 @@
             _interval: null,
 
             /**
+             * document readystate poll handle
+             * @property _dri
+             * @static
+             * @private
+             */
+             _dri: null,
+
+            /**
+             * True when the document is initially usable
+             * @property DOMReady
+             * @type boolean
+             * @static
+             */
+            DOMReady: false,
+
+            /**
              * @method startInterval
              * @static
              * @private
@@ -718,27 +727,57 @@
              *
              * @method onAvailable
              *
-             * @param {string}   p_id the id of the element to look for.
+             * @param {string||string[]}   p_id the id of the element, or an array
+             * of ids to look for.
              * @param {function} p_fn what to execute when the element is found.
              * @param {object}   p_obj an optional object to be passed back as
              *                   a parameter to p_fn.
              * @param {boolean|object}  p_override If set to true, p_fn will execute
              *                   in the scope of p_obj, if set to an object it
              *                   will execute in the scope of that object
-             *
+             * @param checkContent {boolean} check child node readiness (onContentReady)
              * @static
              */
-            onAvailable: function(p_id, p_fn, p_obj, p_override) {
-                onAvailStack.push( { id:         p_id, 
-                                     fn:         p_fn, 
-                                     obj:        p_obj, 
-                                     override:   p_override, 
-                                     checkReady: false    } );
+            onAvailable: function(p_id, p_fn, p_obj, p_override, checkContent) {
+
+                var a = (YAHOO.lang.isString(p_id)) ? [p_id] : p_id;
+
+                for (var i=0; i<a.length; i=i+1) {
+                    onAvailStack.push({id:         a[i], 
+                                       fn:         p_fn, 
+                                       obj:        p_obj, 
+                                       override:   p_override, 
+                                       checkReady: checkContent });
+                }
                 retryCount = this.POLL_RETRYS;
                 this.startInterval();
             },
 
             /**
+             * Works the same way as onAvailable, but additionally checks the
+             * state of sibling elements to determine if the content of the
+             * available element is safe to modify.
+             *
+             * <p>The callback is executed with a single parameter:
+             * the custom object parameter, if provided.</p>
+             *
+             * @method onContentReady
+             *
+             * @param {string}   p_id the id of the element to look for.
+             * @param {function} p_fn what to execute when the element is ready.
+             * @param {object}   p_obj an optional object to be passed back as
+             *                   a parameter to p_fn.
+             * @param {boolean|object}  p_override If set to true, p_fn will execute
+             *                   in the scope of p_obj.  If an object, p_fn will
+             *                   exectute in the scope of that object
+             *
+             * @static
+             */
+            onContentReady: function(p_id, p_fn, p_obj, p_override) {
+                this.onAvailable(p_id, p_fn, p_obj, p_override, true);
+            },
+
+            /**
              * Executes the supplied callback when the DOM is first usable.  This
              * will execute immediately if called after the DOMReady event has
              * fired.   @todo the DOMContentReady event does not fire when the
@@ -753,7 +792,7 @@
              * to it when it did so?
              *
              * <p>The callback is a CustomEvent, so the signature is:</p>
-             * <p>type <string>, args <array>, customobject <object></p>
+             * <p>type <string>, args <array>, customobject <object></p>
              * <p>For DOMReady events, there are no fire argments, so the
              * signature is:</p>
              * <p>"DOMReady", [], obj</p>
@@ -771,7 +810,7 @@
              * @static
              */
             onDOMReady: function(p_fn, p_obj, p_override) {
-                if (DOMReady) {
+                if (this.DOMReady) {
                     setTimeout(function() {
                         var s = window;
                         if (p_override) {
@@ -789,37 +828,6 @@
             },
 
             /**
-             * Works the same way as onAvailable, but additionally checks the
-             * state of sibling elements to determine if the content of the
-             * available element is safe to modify.
-             *
-             * <p>The callback is executed with a single parameter:
-             * the custom object parameter, if provided.</p>
-             *
-             * @method onContentReady
-             *
-             * @param {string}   p_id the id of the element to look for.
-             * @param {function} p_fn what to execute when the element is ready.
-             * @param {object}   p_obj an optional object to be passed back as
-             *                   a parameter to p_fn.
-             * @param {boolean|object}  p_override If set to true, p_fn will execute
-             *                   in the scope of p_obj.  If an object, p_fn will
-             *                   exectute in the scope of that object
-             *
-             * @static
-             */
-            onContentReady: function(p_id, p_fn, p_obj, p_override) {
-                onAvailStack.push( { id:         p_id, 
-                                     fn:         p_fn, 
-                                     obj:        p_obj, 
-                                     override:   p_override,
-                                     checkReady: true      } );
-
-                retryCount = this.POLL_RETRYS;
-                this.startInterval();
-            },
-
-            /**
              * Appends an event handler
              *
              * @method addListener
@@ -1348,14 +1356,15 @@
                 // inspect the properties of the event target.  We try to
                 // detect this condition, and provide a dummy target (the bound
                 // element) to eliminate spurious errors.  
+
+                // the implementation caused unexpected results in some 
+                // implementations, so this has been rolled back for now
+                /* 
                 if (ev && this.isIE) {
 
                     try {
 
                         var el = ev.srcElement;
-                        if (el) {
-                            var type = el.type;
-                        }
 
                     } catch(ex) {
 
@@ -1366,6 +1375,7 @@
                     }
 
                 }
+                */
 
                 return ev;
             },
@@ -1443,12 +1453,13 @@
              */
             _isValidCollection: function(o) {
                 try {
-                    return ( typeof o !== "string" && // o is not a string
+                    return ( o                     && // o is something
+                             typeof o !== "string" && // o is not a string
                              o.length              && // o is indexed
                              !o.tagName            && // o is not an HTML element
                              !o.alert              && // o is not a window
                              typeof o[0] !== "undefined" );
-                } catch(e) {
+                } catch(ex) {
                     YAHOO.log("_isValidCollection error, assuming that " +
                 " this is a cross frame problem and not a collection", "warn");
                     return false;
@@ -1530,9 +1541,9 @@
              * @private
              */
             _ready: function(e) {
-                if (!DOMReady) {
-                    DOMReady=true;
-                    var EU = YAHOO.util.Event;
+                var EU = YAHOO.util.Event;
+                if (!EU.DOMReady) {
+                    EU.DOMReady=true;
 
                     // Fire the content ready custom event
                     EU.DOMReadyEvent.fire();
@@ -1560,8 +1571,8 @@
                     // Hold off if DOMReady has not fired and check current
                     // readyState to protect against the IE operation aborted
                     // issue.
-                    //if (!DOMReady || "complete" !== document.readyState) {
-                    if (!DOMReady) {
+                    //if (!this.DOMReady || "complete" !== document.readyState) {
+                    if (!this.DOMReady) {
                         this.startInterval();
                         return false;
                     }
@@ -1659,19 +1670,20 @@
              * @static
              */
             purgeElement: function(el, recurse, sType) {
-                var elListeners = this.getListeners(el, sType), i, len;
+                var oEl = (YAHOO.lang.isString(el)) ? this.getEl(el) : el;
+                var elListeners = this.getListeners(oEl, sType), i, len;
                 if (elListeners) {
                     for (i=0,len=elListeners.length; i<len ; ++i) {
                         var l = elListeners[i];
                         // can't use the index on the changing collection
-                        this.removeListener(el, l.type, l.fn, l.index);
-                        //this.removeListener(el, l.type, l.fn);
+                        this.removeListener(oEl, l.type, l.fn, l.index);
+                        //this.removeListener(oEl, l.type, l.fn);
                     }
                 }
 
-                if (recurse && el && el.childNodes) {
-                    for (i=0,len=el.childNodes.length; i<len ; ++i) {
-                        this.purgeElement(el.childNodes[i], recurse, sType);
+                if (recurse && oEl && oEl.childNodes) {
+                    for (i=0,len=oEl.childNodes.length; i<len ; ++i) {
+                        this.purgeElement(oEl.childNodes[i], recurse, sType);
                     }
                 }
             },
@@ -1680,7 +1692,7 @@
              * Returns all listeners attached to the given element via addListener.
              * Optionally, you can specify a specific type of event to return.
              * @method getListeners
-             * @param el {HTMLElement} the element to inspect 
+             * @param el {HTMLElement|string} the element or element id to inspect 
              * @param sType {string} optional type of listener to return. If
              * left out, all listeners will be returned
              * @return {Object} the listener. Contains the following fields:
@@ -1696,18 +1708,20 @@
                 var results=[], searchLists;
                 if (!sType) {
                     searchLists = [listeners, unloadListeners];
-                } else if (sType == "unload") {
+                } else if (sType === "unload") {
                     searchLists = [unloadListeners];
                 } else {
                     searchLists = [listeners];
                 }
 
+                var oEl = (YAHOO.lang.isString(el)) ? this.getEl(el) : el;
+
                 for (var j=0;j<searchLists.length; j=j+1) {
                     var searchList = searchLists[j];
                     if (searchList && searchList.length > 0) {
                         for (var i=0,len=searchList.length; i<len ; ++i) {
                             var l = searchList[i];
-                            if ( l  && l[this.EL] === el && 
+                            if ( l  && l[this.EL] === oEl && 
                                     (!sType || sType === l[this.TYPE]) ) {
                                 results.push({
                                     type:   l[this.TYPE],
@@ -1736,6 +1750,7 @@
 
                 var EU = YAHOO.util.Event, i, j, l, len, index;
 
+                // execute and clear stored unload listeners
                 for (i=0,len=unloadListeners.length; i<len; ++i) {
                     l = unloadListeners[i];
                     if (l) {
@@ -1756,6 +1771,26 @@
 
                 unloadListeners = null;
 
+                // call clearAttributes or remove listeners to handle IE memory leaks
+                if (YAHOO.env.ua.ie && listeners && listeners.length > 0) {
+                    j = listeners.length;
+                    while (j) {
+                        index = j-1;
+                        l = listeners[index];
+                        if (l) {
+                            //try {
+                                //l[EU.EL].clearAttributes(); // errors on window objects
+                            //} catch(ex) {
+                            EU.removeListener(l[EU.EL], l[EU.TYPE], l[EU.FN], index);
+                            //}
+                        } 
+                        j--;
+                    }
+                    l=null;
+                }
+
+                /*
+                // remove all listeners
                 if (listeners && listeners.length > 0) {
                     j = listeners.length;
                     while (j) {
@@ -1767,10 +1802,11 @@
                         j = j - 1;
                     }
                     l=null;
-
-                    EU.clearCache();
                 }
+                */
 
+                /*
+                // kill legacy events
                 for (i=0,len=legacyEvents.length; i<len; ++i) {
                     // dereference the element
                     //delete legacyEvents[i][0];
@@ -1781,6 +1817,8 @@
                     legacyEvents[i] = null;
                 }
 
+                */
+
                 legacyEvents = null;
 
                 EU._simpleRemove(window, "unload", EU._unload);
@@ -1837,6 +1875,22 @@
                 // does nothing
             },
 
+/*
+            testIEReady: function (){
+                var n = document.createElement('p'), ready = false;
+                try {
+                    // throws an error until the doc is ready
+                    n.doScroll('left'); 
+                    ready = true;
+                } catch(ex){ 
+                    // document is not ready
+                }
+
+                n = null;
+                return ready;
+            },
+*/
+
             /**
              * Adds a DOM event directly without the caching, cleanup, scope adj, etc
              *
@@ -1917,6 +1971,8 @@
                     YAHOO.util.Event._tryPreloadAttach,
                     YAHOO.util.Event, true);
 
+            /*
+
             //YAHOO.log("-" + document.readyState + "-");
 
             var el, d=document, b=d.body;
@@ -1954,17 +2010,48 @@
 
             el=null;
 
+            */
+
+/*
+            (function (){
+                var n = document.createElement('p');  
+                try {
+                    // throws an error if doc is not ready
+                    n.doScroll('left');
+                    n = null;
+                    YAHOO.util.Event._ready();
+                } catch (ex){
+                    n = null;
+setTimeout(arguments.callee, YAHOO.util.Event.POLL_INTERVAL);
+                }
+            })();
+*/
+
+            EU._dri = setInterval(function() {
+                var n = document.createElement('p');  
+                try {
+                    // throws an error if doc is not ready
+                    n.doScroll('left');
+                    clearInterval(EU._dri);
+                    EU._dri = null;
+                    EU._ready();
+                    n = null;
+                } catch (ex) { 
+                    n = null;
+                }
+            }, EU.POLL_INTERVAL); 
+
         
         // Safari: The document's readyState in Safari currently will
         // change to loaded/complete before images are loaded.
         //} else if (EU.webkit) {
         } else if (EU.webkit) {
 
-            EU._drwatch = setInterval(function(){
+            EU._dri = setInterval(function() {
                 var rs=document.readyState;
                 if ("loaded" == rs || "complete" == rs) {
-                    clearInterval(EU._drwatch);
-                    EU._drwatch = null;
+                    clearInterval(EU._dri);
+                    EU._dri = null;
                     EU._ready();
                 }
             }, EU.POLL_INTERVAL); 
@@ -2319,7 +2406,6 @@
             e.ctrlKey  == keyData.ctrl) { // if we pass this, all modifiers match
             
             var dataItem;
-            var keyPressed;
 
             if (keyData.keys instanceof Array) {
                 for (var i=0;i<keyData.keys.length;i++) {
@@ -2404,4 +2490,36 @@
 * @type String
 */
 YAHOO.util.KeyListener.KEYUP = "keyup";
-YAHOO.register("event", YAHOO.util.Event, {version: "2.3.1", build: "541"});
+
+/**
+ * keycode constants for a subset of the special keys
+ * @property KEY
+ * @static
+ * @final
+ */
+YAHOO.util.KeyListener.KEY = {
+    ALT          : 18,
+    BACK_SPACE   : 8,
+    CAPS_LOCK    : 20,
+    CONTROL      : 17,
+    DELETE       : 46,
+    DOWN         : 40,
+    END          : 35,
+    ENTER        : 13,
+    ESCAPE       : 27,
+    HOME         : 36,
+    LEFT         : 37,
+    META         : 224,
+    NUM_LOCK     : 144,
+    PAGE_DOWN    : 34,
+    PAGE_UP      : 33, 
+    PAUSE        : 19,
+    PRINTSCREEN  : 44,
+    RIGHT        : 39,
+    SCROLL_LOCK  : 145,
+    SHIFT        : 16,
+    SPACE        : 32,
+    TAB          : 9,
+    UP           : 38
+};
+YAHOO.register("event", YAHOO.util.Event, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/event/event-min.js
===================================================================
--- trunk/root/static/yui/event/event-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/event/event-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,8 +2,8 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){var E=this.subscribers.length;if(!E&&this.silent){return true;}var H=[],G=true,D,I=false;for(D=0;D<arguments.length;++D){H.push(arguments[D]);}var A=H.length;if(!
 !this.silent){}for(D=0;D<E;++D){var L=this.subscribers[D];if(!L){I=true;}else{if(!this.silent){}var K=L.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(H.length>0){B=H[0];}try{G=L.fn.call(K,B,L.obj);}catch(F){this.lastError=F;}}else{try{G=L.fn.call(K,this.type,H,L.obj);}catch(F){this.lastError=F;}}if(false===G){if(!this.silent){}return false;}}}if(I){var J=[],C=this.subscribers;for(D=0,E=C.length;D<E;D=D+1){J.push(C[D]);}this.subscribers=J;}return true;},unsubscribeAll:function(){for(var B=0,A=this.subscribers.length;B<A;++B){this._delete(A-1-B);}this.subscribers=[];return B;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers[A]=null;},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(th!
 is.override===true){return this.obj;}else{return this.override!
 ;}}retur
n A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var J=false;var I=[];var K=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39};return{POLL_RETRYS:4000,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,startInterval:function(){if(!this._interval){var L=this;var M=function(){L._tryPreloadAttach();};this._interval=setInterval(M,this.POLL_INTERVAL);}},onAvailable:function(N,L,O,M){F.push({id:N,fn:L,obj:O,override:M,checkReady:false});C=this.POLL_RETRYS;this.startInterval();},onDOMReady:function(L,N,M){if(J){setTimeout(function()!
 {var O=window;if(M){if(M===true){O=N;}else{O=M;}}L.call(O,"DOMReady",[],N);},0);}else{this.DOMReadyEvent.subscribe(L,N,M);}},onContentReady:function(N,L,O,M){F.push({id:N,fn:L,obj:O,override:M,checkReady:true});C=this.POLL_RETRYS;this.startInterval();},addListener:function(N,L,W,R,M){if(!W||!W.call){return false;}if(this._isValidCollection(N)){var X=true;for(var S=0,U=N.length;S<U;++S){X=this.on(N[S],L,W,R,M)&&X;}return X;}else{if(YAHOO.lang.isString(N)){var Q=this.getEl(N);if(Q){N=Q;}else{this.onAvailable(N,function(){YAHOO.util.Event.on(N,L,W,R,M);});return true;}}}if(!N){return false;}if("unload"==L&&R!==this){K[K.length]=[N,L,W,R,M];return true;}var Z=N;if(M){if(M===true){Z=R;}else{Z=M;}}var O=function(a){return W.call(Z,YAHOO.util.Event.getEvent(a,N),R);};var Y=[N,L,W,O,Z,R,M];var T=I.length;I[T]=Y;if(this.useLegacyEvent(N,L)){var P=this.getLegacyIndex(N,L);if(P==-1||N!=G[P][0]){P=G.length;B[N.id+L]=P;G[P]=[N,L,N["on"+L]];E[P]=[];N["on"+L]=function(a){YAHOO.util.Event.!
 fireLegacyEvent(YAHOO.util.Event.getEvent(a),P);};}E[P].push(Y!
 );}else{
try{this._simpleAdd(N,L,O,false);}catch(V){this.lastError=V;this.removeListener(N,L,W);return false;}}return true;},fireLegacyEvent:function(P,N){var R=true,L,T,S,U,Q;T=E[N];for(var M=0,O=T.length;M<O;++M){S=T[M];if(S&&S[this.WFN]){U=S[this.ADJ_SCOPE];Q=S[this.WFN].call(U,P);R=(R&&Q);}}L=G[N];if(L&&L[2]){L[2](P);}return R;},getLegacyIndex:function(M,N){var L=this.generateId(M)+N;if(typeof B[L]=="undefined"){return -1;}else{return B[L];}},useLegacyEvent:function(M,N){if(this.webkit&&("click"==N||"dblclick"==N)){var L=parseInt(this.webkit,10);if(!isNaN(L)&&L<418){return true;}}return false;},removeListener:function(M,L,U){var P,S,W;if(typeof M=="string"){M=this.getEl(M);}else{if(this._isValidCollection(M)){var V=true;for(P=0,S=M.length;P<S;++P){V=(this.removeListener(M[P],L,U)&&V);}return V;}}if(!U||!U.call){return this.purgeElement(M,false,L);}if("unload"==L){for(P=0,S=K.length;P<S;P++){W=K[P];if(W&&W[0]==M&&W[1]==L&&W[2]==U){K[P]=null;return true;}}return false;}var Q=null;v!
 ar R=arguments[3];if("undefined"===typeof R){R=this._getCacheIndex(M,L,U);}if(R>=0){Q=I[R];}if(!M||!Q){return false;}if(this.useLegacyEvent(M,L)){var O=this.getLegacyIndex(M,L);var N=E[O];if(N){for(P=0,S=N.length;P<S;++P){W=N[P];if(W&&W[this.EL]==M&&W[this.TYPE]==L&&W[this.FN]==U){N[P]=null;break;}}}}else{try{this._simpleRemove(M,L,Q[this.WFN],false);}catch(T){this.lastError=T;return false;}}delete I[R][this.WFN];delete I[R][this.FN];I[R]=null;return true;},getTarget:function(N,M){var L=N.target||N.srcElement;return this.resolveTextNode(L);},resolveTextNode:function(L){if(L&&3==L.nodeType){return L.parentNode;}else{return L;}},getPageX:function(M){var L=M.pageX;if(!L&&0!==L){L=M.clientX||0;if(this.isIE){L+=this._getScrollLeft();}}return L;},getPageY:function(L){var M=L.pageY;if(!M&&0!==M){M=L.clientY||0;if(this.isIE){M+=this._getScrollTop();}}return M;},getXY:function(L){return[this.getPageX(L),this.getPageY(L)];
-},getRelatedTarget:function(M){var L=M.relatedTarget;if(!L){if(M.type=="mouseout"){L=M.toElement;}else{if(M.type=="mouseover"){L=M.fromElement;}}}return this.resolveTextNode(L);},getTime:function(N){if(!N.time){var M=new Date().getTime();try{N.time=M;}catch(L){this.lastError=L;return M;}}return N.time;},stopEvent:function(L){this.stopPropagation(L);this.preventDefault(L);},stopPropagation:function(L){if(L.stopPropagation){L.stopPropagation();}else{L.cancelBubble=true;}},preventDefault:function(L){if(L.preventDefault){L.preventDefault();}else{L.returnValue=false;}},getEvent:function(Q,O){var P=Q||window.event;if(!P){var R=this.getEvent.caller;while(R){P=R.arguments[0];if(P&&Event==P.constructor){break;}R=R.caller;}}if(P&&this.isIE){try{var N=P.srcElement;if(N){var M=N.type;}}catch(L){P.target=O;}}return P;},getCharCode:function(M){var L=M.keyCode||M.charCode||0;if(YAHOO.env.ua.webkit&&(L in D)){L=D[L];}return L;},_getCacheIndex:function(P,Q,O){for(var N=0,M=I.length;N<M;++N)!
 {var L=I[N];if(L&&L[this.FN]==O&&L[this.EL]==P&&L[this.TYPE]==Q){return N;}}return -1;},generateId:function(L){var M=L.id;if(!M){M="yuievtautoid-"+A;++A;L.id=M;}return M;},_isValidCollection:function(M){try{return(typeof M!=="string"&&M.length&&!M.tagName&&!M.alert&&typeof M[0]!=="undefined");}catch(L){return false;}},elCache:{},getEl:function(L){return(typeof L==="string")?document.getElementById(L):L;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(M){if(!H){H=true;var L=YAHOO.util.Event;L._ready();L._tryPreloadAttach();}},_ready:function(M){if(!J){J=true;var L=YAHOO.util.Event;L.DOMReadyEvent.fire();L._simpleRemove(document,"DOMContentLoaded",L._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}if(this.isIE){if(!J){this.startInterval();return false;}}this.locked=true;var Q=!H;if(!Q){Q=(C>0);}var P=[];var R=function(T,U){var S=T;if(U.override){if(U.override===true){S=U.obj;}else{S=U.override;}}U.fn.call(!
 S,U.obj);};var M,L,O,N;for(M=0,L=F.length;M<L;++M){O=F[M];if(O!
 &&!O.che
ckReady){N=this.getEl(O.id);if(N){R(N,O);F[M]=null;}else{P.push(O);}}}for(M=0,L=F.length;M<L;++M){O=F[M];if(O&&O.checkReady){N=this.getEl(O.id);if(N){if(H||N.nextSibling){R(N,O);F[M]=null;}}else{P.push(O);}}}C=(P.length===0)?0:C-1;if(Q){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;return true;},purgeElement:function(O,P,R){var Q=this.getListeners(O,R),N,L;if(Q){for(N=0,L=Q.length;N<L;++N){var M=Q[N];this.removeListener(O,M.type,M.fn,M.index);}}if(P&&O&&O.childNodes){for(N=0,L=O.childNodes.length;N<L;++N){this.purgeElement(O.childNodes[N],P,R);}}},getListeners:function(N,L){var Q=[],M;if(!L){M=[I,K];}else{if(L=="unload"){M=[K];}else{M=[I];}}for(var P=0;P<M.length;P=P+1){var T=M[P];if(T&&T.length>0){for(var R=0,S=T.length;R<S;++R){var O=T[R];if(O&&O[this.EL]===N&&(!L||L===O[this.TYPE])){Q.push({type:O[this.TYPE],fn:O[this.FN],obj:O[this.OBJ],adjust:O[this.OVERRIDE],scope:O[this.ADJ_SCOPE],index:R});}}}}return(Q.length)?Q:null;!
 },_unload:function(S){var R=YAHOO.util.Event,P,O,M,L,N;for(P=0,L=K.length;P<L;++P){M=K[P];if(M){var Q=window;if(M[R.ADJ_SCOPE]){if(M[R.ADJ_SCOPE]===true){Q=M[R.UNLOAD_OBJ];}else{Q=M[R.ADJ_SCOPE];}}M[R.FN].call(Q,R.getEvent(S,M[R.EL]),M[R.UNLOAD_OBJ]);K[P]=null;M=null;Q=null;}}K=null;if(I&&I.length>0){O=I.length;while(O){N=O-1;M=I[N];if(M){R.removeListener(M[R.EL],M[R.TYPE],M[R.FN],N);}O=O-1;}M=null;R.clearCache();}for(P=0,L=G.length;P<L;++P){G[P][0]=null;G[P]=null;}G=null;R._simpleRemove(window,"unload",R._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var L=document.documentElement,M=document.body;if(L&&(L.scrollTop||L.scrollLeft)){return[L.scrollTop,L.scrollLeft];}else{if(M){return[M.scrollTop,M.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(N,O,M,L){N.addEventListener(O,M,(L));};}else{if(window.attachEvent!
 ){return function(N,O,M,L){N.attachEvent("on"+O,M);};}else{ret!
 urn func
tion(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(N,O,M,L){N.removeEventListener(O,M,(L));};}else{if(window.detachEvent){return function(M,N,L){M.detachEvent("on"+N,L);};}else{return function(){};}}}()};}();(function(){var D=YAHOO.util.Event;D.on=D.addListener;if(D.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var B,E=document,A=E.body;if(("undefined"!==typeof YAHOO_config)&&YAHOO_config.injecting){B=document.createElement("script");var C=E.getElementsByTagName("head")[0]||A;C.insertBefore(B,C.firstChild);}else{E.write("<script id=\"_yui_eu_dr\" defer=\"true\" src=\"//:\"></script>");B=document.getElementById("_yui_eu_dr");}if(B){B.onreadystatechange=function(){if("complete"===this.readyState){this.parentNode.removeChild(this);YAHOO.util.Event._ready();}};}else{}B=null;}else{if(D.webkit){D._drwatch=setInterval(function(){var F=document.readyState;if("loaded"==F||"complete"==F){clearInterval(D.!
 _drwatch);D._drwatch=null;D._ready();}},D.POLL_INTERVAL);}else{D._simpleAdd(document,"DOMContentLoaded",D._ready);}}D._simpleAdd(window,"load",D._load);D._simpleAdd(window,"unload",D._unload);D._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};
-var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN;}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEve!
 nt("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(K,J){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(K.shiftKey==F.shift&&K.altKey==F.alt&&K.ctrlKey==F.ctrl){var H;var G;if(F.keys instanceof Array){for(var I=0;I<F.keys.length;I++){H=F.keys[I];if(H==K.charCode){D.fire(K.charCode,K);break;}else{if(H==K.keyCode){D.fire(K.keyCode,K);break;}}}}else{H=F.keys;if(H==K.charCode){D.fire(K.charCode,K);}else{if(H==K.keyCode){D.fire(K.keyCode,K);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHO!
 O.util.KeyListener.KEYUP="keyup";YAHOO.register("event",YAHOO.!
 util.Eve
nt,{version:"2.3.1",build:"541"});
\ No newline at end of file
+YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){var D=this.subscribers.length;if(!D&&this.silent){return true;}var H=[],F=true,C,I=false;for(C=0;C<arguments.length;++C){H.push(arguments[C]);}if(!this.silent){}!
 for(C=0;C<D;++C){var L=this.subscribers[C];if(!L){I=true;}else{if(!this.silent){}var K=L.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var A=null;if(H.length>0){A=H[0];}try{F=L.fn.call(K,A,L.obj);}catch(E){this.lastError=E;}}else{try{F=L.fn.call(K,this.type,H,L.obj);}catch(G){this.lastError=G;}}if(false===F){if(!this.silent){}return false;}}}if(I){var J=[],B=this.subscribers;for(C=0,D=B.length;C<D;C=C+1){J.push(B[C]);}this.subscribers=J;}return true;},unsubscribeAll:function(){for(var B=0,A=this.subscribers.length;B<A;++B){this._delete(A-1-B);}this.subscribers=[];return B;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers[A]=null;},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===t!
 rue){return this.obj;}else{return this.override;}}return A;};Y!
 AHOO.uti
l.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};return{POLL_RETRYS:4000,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,startInterval:function(){if(!this._interval){var K=this;var L=function(){K._tryPreloadAttach();};this._interval=setInterval(L,this.POLL_INTERVAL);}},onAvailable:function(P,M,Q,O,N){var K=(YAHOO.lang.isString(P))?[P]:P;for(var L=0;L<K.length;L=L+1){F.push({id:K[L],fn:M,obj:Q,override:O,checkReady:N});}C=this!
 .POLL_RETRYS;this.startInterval();},onContentReady:function(M,K,N,L){this.onAvailable(M,K,N,L,true);},onDOMReady:function(K,M,L){if(this.DOMReady){setTimeout(function(){var N=window;if(L){if(L===true){N=M;}else{N=L;}}K.call(N,"DOMReady",[],M);},0);}else{this.DOMReadyEvent.subscribe(K,M,L);}},addListener:function(M,K,V,Q,L){if(!V||!V.call){return false;}if(this._isValidCollection(M)){var W=true;for(var R=0,T=M.length;R<T;++R){W=this.on(M[R],K,V,Q,L)&&W;}return W;}else{if(YAHOO.lang.isString(M)){var P=this.getEl(M);if(P){M=P;}else{this.onAvailable(M,function(){YAHOO.util.Event.on(M,K,V,Q,L);});return true;}}}if(!M){return false;}if("unload"==K&&Q!==this){J[J.length]=[M,K,V,Q,L];return true;}var Y=M;if(L){if(L===true){Y=Q;}else{Y=L;}}var N=function(Z){return V.call(Y,YAHOO.util.Event.getEvent(Z,M),Q);};var X=[M,K,V,N,Y,Q,L];var S=I.length;I[S]=X;if(this.useLegacyEvent(M,K)){var O=this.getLegacyIndex(M,K);if(O==-1||M!=G[O][0]){O=G.length;B[M.id+K]=O;G[O]=[M,K,M["on"+K]];E[O]=[]!
 ;M["on"+K]=function(Z){YAHOO.util.Event.fireLegacyEvent(YAHOO.!
 util.Eve
nt.getEvent(Z),O);};}E[O].push(X);}else{try{this._simpleAdd(M,K,N,false);}catch(U){this.lastError=U;this.removeListener(M,K,V);return false;}}return true;},fireLegacyEvent:function(O,M){var Q=true,K,S,R,T,P;S=E[M];for(var L=0,N=S.length;L<N;++L){R=S[L];if(R&&R[this.WFN]){T=R[this.ADJ_SCOPE];P=R[this.WFN].call(T,O);Q=(Q&&P);}}K=G[M];if(K&&K[2]){K[2](O);}return Q;},getLegacyIndex:function(L,M){var K=this.generateId(L)+M;if(typeof B[K]=="undefined"){return -1;}else{return B[K];}},useLegacyEvent:function(L,M){if(this.webkit&&("click"==M||"dblclick"==M)){var K=parseInt(this.webkit,10);if(!isNaN(K)&&K<418){return true;}}return false;},removeListener:function(L,K,T){var O,R,V;if(typeof L=="string"){L=this.getEl(L);}else{if(this._isValidCollection(L)){var U=true;for(O=0,R=L.length;O<R;++O){U=(this.removeListener(L[O],K,T)&&U);}return U;}}if(!T||!T.call){return this.purgeElement(L,false,K);}if("unload"==K){for(O=0,R=J.length;O<R;O++){V=J[O];if(V&&V[0]==L&&V[1]==K&&V[2]==T){J[O]=null;!
 return true;}}return false;}var P=null;var Q=arguments[3];if("undefined"===typeof Q){Q=this._getCacheIndex(L,K,T);}if(Q>=0){P=I[Q];}if(!L||!P){return false;}if(this.useLegacyEvent(L,K)){var N=this.getLegacyIndex(L,K);var M=E[N];if(M){for(O=0,R=M.length;O<R;++O){V=M[O];if(V&&V[this.EL]==L&&V[this.TYPE]==K&&V[this.FN]==T){M[O]=null;break;}}}}else{try{this._simpleRemove(L,K,P[this.WFN],false);}catch(S){this.lastError=S;return false;}}delete I[Q][this.WFN];delete I[Q][this.FN];I[Q]=null;return true;},getTarget:function(M,L){var K=M.target||M.srcElement;return this.resolveTextNode(K);},resolveTextNode:function(K){if(K&&3==K.nodeType){return K.parentNode;}else{return K;}},getPageX:function(L){var K=L.pageX;if(!K&&0!==K){K=L.clientX||0;if(this.isIE){K+=this._getScrollLeft();}}return K;},getPageY:function(K){var L=K.pageY;if(!L&&0!==L){L=K.clientY||0;if(this.isIE){L+=this._getScrollTop();}}return L;},getXY:function(K){return[this.getPageX(K),this.getPageY(K)];
+},getRelatedTarget:function(L){var K=L.relatedTarget;if(!K){if(L.type=="mouseout"){K=L.toElement;}else{if(L.type=="mouseover"){K=L.fromElement;}}}return this.resolveTextNode(K);},getTime:function(M){if(!M.time){var L=new Date().getTime();try{M.time=L;}catch(K){this.lastError=K;return L;}}return M.time;},stopEvent:function(K){this.stopPropagation(K);this.preventDefault(K);},stopPropagation:function(K){if(K.stopPropagation){K.stopPropagation();}else{K.cancelBubble=true;}},preventDefault:function(K){if(K.preventDefault){K.preventDefault();}else{K.returnValue=false;}},getEvent:function(M,K){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break;}N=N.caller;}}return L;},getCharCode:function(L){var K=L.keyCode||L.charCode||0;if(YAHOO.env.ua.webkit&&(K in D)){K=D[K];}return K;},_getCacheIndex:function(O,P,N){for(var M=0,L=I.length;M<L;++M){var K=I[M];if(K&&K[this.FN]==N&&K[this.EL]==O&&K[this.TYPE]==P){return M;}}return !
 -1;},generateId:function(K){var L=K.id;if(!L){L="yuievtautoid-"+A;++A;K.id=L;}return L;},_isValidCollection:function(L){try{return(L&&typeof L!=="string"&&L.length&&!L.tagName&&!L.alert&&typeof L[0]!=="undefined");}catch(K){return false;}},elCache:{},getEl:function(K){return(typeof K==="string")?document.getElementById(K):K;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(L){if(!H){H=true;var K=YAHOO.util.Event;K._ready();K._tryPreloadAttach();}},_ready:function(L){var K=YAHOO.util.Event;if(!K.DOMReady){K.DOMReady=true;K.DOMReadyEvent.fire();K._simpleRemove(document,"DOMContentLoaded",K._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}if(this.isIE){if(!this.DOMReady){this.startInterval();return false;}}this.locked=true;var P=!H;if(!P){P=(C>0);}var O=[];var Q=function(S,T){var R=S;if(T.override){if(T.override===true){R=T.obj;}else{R=T.override;}}T.fn.call(R,T.obj);};var L,K,N,M;for(L=0,K=F.length;L<K;++L)!
 {N=F[L];if(N&&!N.checkReady){M=this.getEl(N.id);if(M){Q(M,N);F!
 [L]=null
;}else{O.push(N);}}}for(L=0,K=F.length;L<K;++L){N=F[L];if(N&&N.checkReady){M=this.getEl(N.id);if(M){if(H||M.nextSibling){Q(M,N);F[L]=null;}}else{O.push(N);}}}C=(O.length===0)?0:C-1;if(P){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;return true;},purgeElement:function(O,P,R){var M=(YAHOO.lang.isString(O))?this.getEl(O):O;var Q=this.getListeners(M,R),N,K;if(Q){for(N=0,K=Q.length;N<K;++N){var L=Q[N];this.removeListener(M,L.type,L.fn,L.index);}}if(P&&M&&M.childNodes){for(N=0,K=M.childNodes.length;N<K;++N){this.purgeElement(M.childNodes[N],P,R);}}},getListeners:function(M,K){var P=[],L;if(!K){L=[I,J];}else{if(K==="unload"){L=[J];}else{L=[I];}}var R=(YAHOO.lang.isString(M))?this.getEl(M):M;for(var O=0;O<L.length;O=O+1){var T=L[O];if(T&&T.length>0){for(var Q=0,S=T.length;Q<S;++Q){var N=T[Q];if(N&&N[this.EL]===R&&(!K||K===N[this.TYPE])){P.push({type:N[this.TYPE],fn:N[this.FN],obj:N[this.OBJ],adjust:N[this.OVERRIDE],scope:N[this.ADJ_!
 SCOPE],index:Q});}}}}return(P.length)?P:null;},_unload:function(R){var Q=YAHOO.util.Event,O,N,L,K,M;for(O=0,K=J.length;O<K;++O){L=J[O];if(L){var P=window;if(L[Q.ADJ_SCOPE]){if(L[Q.ADJ_SCOPE]===true){P=L[Q.UNLOAD_OBJ];}else{P=L[Q.ADJ_SCOPE];}}L[Q.FN].call(P,Q.getEvent(R,L[Q.EL]),L[Q.UNLOAD_OBJ]);J[O]=null;L=null;P=null;}}J=null;if(YAHOO.env.ua.ie&&I&&I.length>0){N=I.length;while(N){M=N-1;L=I[M];if(L){Q.removeListener(L[Q.EL],L[Q.TYPE],L[Q.FN],M);}N--;}L=null;}G=null;Q._simpleRemove(window,"unload",Q._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft];}else{if(L){return[L.scrollTop,L.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(M,N,L,K){M.addEventListener(N,L,(K));};}else{if(window.attachEvent){retur!
 n function(M,N,L,K){M.attachEvent("on"+N,L);};}else{return fun!
 ction(){
};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(M,N,L,K){M.removeEventListener(N,L,(K));};}else{if(window.detachEvent){return function(L,M,K){L.detachEvent("on"+M,K);};}else{return function(){};}}}()};}();(function(){var A=YAHOO.util.Event;A.on=A.addListener;if(A.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);A._dri=setInterval(function(){var C=document.createElement("p");try{C.doScroll("left");clearInterval(A._dri);A._dri=null;A._ready();C=null;}catch(B){C=null;}},A.POLL_INTERVAL);}else{if(A.webkit){A._dri=setInterval(function(){var B=document.readyState;if("loaded"==B||"complete"==B){clearInterval(A._dri);A._dri=null;A._ready();}},A.POLL_INTERVAL);}else{A._simpleAdd(document,"DOMContentLoaded",A._ready);}}A._simpleAdd(window,"load",A._load);A._simpleAdd(window,"unload",A._unload);A._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null!
 ,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};
+var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN;}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(J,I){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(J.shiftKey==F.shift&&J.altKey==F.alt&!
 &J.ctrlKey==F.ctrl){var G;if(F.keys instanceof Array){for(var H=0;H<F.keys.length;H++){G=F.keys[H];if(G==J.charCode){D.fire(J.charCode,J);break;}else{if(G==J.keyCode){D.fire(J.keyCode,J);break;}}}}else{G=F.keys;if(G==J.charCode){D.fire(J.charCode,J);}else{if(G==J.keyCode){D.fire(J.keyCode,J);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO!
 .register("event",YAHOO.util.Event,{version:"2.4.1",build:"742!
 "});
\ No newline at end of file

Modified: trunk/root/static/yui/event/event.js
===================================================================
--- trunk/root/static/yui/event/event.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/event/event.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 
 /**
@@ -225,8 +225,6 @@
             args.push(arguments[i]);
         }
 
-        var argslength = args.length;
-
         if (!this.silent) {
         }
 
@@ -254,8 +252,8 @@
                 } else {
                     try {
                         ret = s.fn.call(scope, this.type, args, s.obj);
-                    } catch(e) {
-                        this.lastError = e;
+                    } catch(ex) {
+                        this.lastError = ex;
                     }
                 }
                 if (false === ret) {
@@ -441,15 +439,6 @@
         var loadComplete =  false;
 
         /**
-         * True when the document is initially usable
-         * @property DOMReady
-         * @type boolean
-         * @static
-         * @private
-         */
-        var DOMReady = false;
-
-        /**
          * Cache of wrapped listeners
          * @property listeners
          * @type array
@@ -531,7 +520,11 @@
             63232: 38, // up
             63233: 40, // down
             63234: 37, // left
-            63235: 39  // right
+            63235: 39, // right
+            63276: 33, // page up
+            63277: 34, // page down
+            25: 9      // SHIFT-TAB (Safari provides a different key code in
+                       // this case, even though the shiftKey modifier is set)
         };
 
         return {
@@ -680,6 +673,22 @@
             _interval: null,
 
             /**
+             * document readystate poll handle
+             * @property _dri
+             * @static
+             * @private
+             */
+             _dri: null,
+
+            /**
+             * True when the document is initially usable
+             * @property DOMReady
+             * @type boolean
+             * @static
+             */
+            DOMReady: false,
+
+            /**
              * @method startInterval
              * @static
              * @private
@@ -705,27 +714,57 @@
              *
              * @method onAvailable
              *
-             * @param {string}   p_id the id of the element to look for.
+             * @param {string||string[]}   p_id the id of the element, or an array
+             * of ids to look for.
              * @param {function} p_fn what to execute when the element is found.
              * @param {object}   p_obj an optional object to be passed back as
              *                   a parameter to p_fn.
              * @param {boolean|object}  p_override If set to true, p_fn will execute
              *                   in the scope of p_obj, if set to an object it
              *                   will execute in the scope of that object
-             *
+             * @param checkContent {boolean} check child node readiness (onContentReady)
              * @static
              */
-            onAvailable: function(p_id, p_fn, p_obj, p_override) {
-                onAvailStack.push( { id:         p_id, 
-                                     fn:         p_fn, 
-                                     obj:        p_obj, 
-                                     override:   p_override, 
-                                     checkReady: false    } );
+            onAvailable: function(p_id, p_fn, p_obj, p_override, checkContent) {
+
+                var a = (YAHOO.lang.isString(p_id)) ? [p_id] : p_id;
+
+                for (var i=0; i<a.length; i=i+1) {
+                    onAvailStack.push({id:         a[i], 
+                                       fn:         p_fn, 
+                                       obj:        p_obj, 
+                                       override:   p_override, 
+                                       checkReady: checkContent });
+                }
                 retryCount = this.POLL_RETRYS;
                 this.startInterval();
             },
 
             /**
+             * Works the same way as onAvailable, but additionally checks the
+             * state of sibling elements to determine if the content of the
+             * available element is safe to modify.
+             *
+             * <p>The callback is executed with a single parameter:
+             * the custom object parameter, if provided.</p>
+             *
+             * @method onContentReady
+             *
+             * @param {string}   p_id the id of the element to look for.
+             * @param {function} p_fn what to execute when the element is ready.
+             * @param {object}   p_obj an optional object to be passed back as
+             *                   a parameter to p_fn.
+             * @param {boolean|object}  p_override If set to true, p_fn will execute
+             *                   in the scope of p_obj.  If an object, p_fn will
+             *                   exectute in the scope of that object
+             *
+             * @static
+             */
+            onContentReady: function(p_id, p_fn, p_obj, p_override) {
+                this.onAvailable(p_id, p_fn, p_obj, p_override, true);
+            },
+
+            /**
              * Executes the supplied callback when the DOM is first usable.  This
              * will execute immediately if called after the DOMReady event has
              * fired.   @todo the DOMContentReady event does not fire when the
@@ -740,7 +779,7 @@
              * to it when it did so?
              *
              * <p>The callback is a CustomEvent, so the signature is:</p>
-             * <p>type <string>, args <array>, customobject <object></p>
+             * <p>type <string>, args <array>, customobject <object></p>
              * <p>For DOMReady events, there are no fire argments, so the
              * signature is:</p>
              * <p>"DOMReady", [], obj</p>
@@ -758,7 +797,7 @@
              * @static
              */
             onDOMReady: function(p_fn, p_obj, p_override) {
-                if (DOMReady) {
+                if (this.DOMReady) {
                     setTimeout(function() {
                         var s = window;
                         if (p_override) {
@@ -776,37 +815,6 @@
             },
 
             /**
-             * Works the same way as onAvailable, but additionally checks the
-             * state of sibling elements to determine if the content of the
-             * available element is safe to modify.
-             *
-             * <p>The callback is executed with a single parameter:
-             * the custom object parameter, if provided.</p>
-             *
-             * @method onContentReady
-             *
-             * @param {string}   p_id the id of the element to look for.
-             * @param {function} p_fn what to execute when the element is ready.
-             * @param {object}   p_obj an optional object to be passed back as
-             *                   a parameter to p_fn.
-             * @param {boolean|object}  p_override If set to true, p_fn will execute
-             *                   in the scope of p_obj.  If an object, p_fn will
-             *                   exectute in the scope of that object
-             *
-             * @static
-             */
-            onContentReady: function(p_id, p_fn, p_obj, p_override) {
-                onAvailStack.push( { id:         p_id, 
-                                     fn:         p_fn, 
-                                     obj:        p_obj, 
-                                     override:   p_override,
-                                     checkReady: true      } );
-
-                retryCount = this.POLL_RETRYS;
-                this.startInterval();
-            },
-
-            /**
              * Appends an event handler
              *
              * @method addListener
@@ -1328,14 +1336,15 @@
                 // inspect the properties of the event target.  We try to
                 // detect this condition, and provide a dummy target (the bound
                 // element) to eliminate spurious errors.  
+
+                // the implementation caused unexpected results in some 
+                // implementations, so this has been rolled back for now
+                /* 
                 if (ev && this.isIE) {
 
                     try {
 
                         var el = ev.srcElement;
-                        if (el) {
-                            var type = el.type;
-                        }
 
                     } catch(ex) {
 
@@ -1344,6 +1353,7 @@
                     }
 
                 }
+                */
 
                 return ev;
             },
@@ -1421,12 +1431,13 @@
              */
             _isValidCollection: function(o) {
                 try {
-                    return ( typeof o !== "string" && // o is not a string
+                    return ( o                     && // o is something
+                             typeof o !== "string" && // o is not a string
                              o.length              && // o is indexed
                              !o.tagName            && // o is not an HTML element
                              !o.alert              && // o is not a window
                              typeof o[0] !== "undefined" );
-                } catch(e) {
+                } catch(ex) {
                     return false;
                 }
 
@@ -1506,9 +1517,9 @@
              * @private
              */
             _ready: function(e) {
-                if (!DOMReady) {
-                    DOMReady=true;
-                    var EU = YAHOO.util.Event;
+                var EU = YAHOO.util.Event;
+                if (!EU.DOMReady) {
+                    EU.DOMReady=true;
 
                     // Fire the content ready custom event
                     EU.DOMReadyEvent.fire();
@@ -1536,8 +1547,8 @@
                     // Hold off if DOMReady has not fired and check current
                     // readyState to protect against the IE operation aborted
                     // issue.
-                    //if (!DOMReady || "complete" !== document.readyState) {
-                    if (!DOMReady) {
+                    //if (!this.DOMReady || "complete" !== document.readyState) {
+                    if (!this.DOMReady) {
                         this.startInterval();
                         return false;
                     }
@@ -1634,19 +1645,20 @@
              * @static
              */
             purgeElement: function(el, recurse, sType) {
-                var elListeners = this.getListeners(el, sType), i, len;
+                var oEl = (YAHOO.lang.isString(el)) ? this.getEl(el) : el;
+                var elListeners = this.getListeners(oEl, sType), i, len;
                 if (elListeners) {
                     for (i=0,len=elListeners.length; i<len ; ++i) {
                         var l = elListeners[i];
                         // can't use the index on the changing collection
-                        this.removeListener(el, l.type, l.fn, l.index);
-                        //this.removeListener(el, l.type, l.fn);
+                        this.removeListener(oEl, l.type, l.fn, l.index);
+                        //this.removeListener(oEl, l.type, l.fn);
                     }
                 }
 
-                if (recurse && el && el.childNodes) {
-                    for (i=0,len=el.childNodes.length; i<len ; ++i) {
-                        this.purgeElement(el.childNodes[i], recurse, sType);
+                if (recurse && oEl && oEl.childNodes) {
+                    for (i=0,len=oEl.childNodes.length; i<len ; ++i) {
+                        this.purgeElement(oEl.childNodes[i], recurse, sType);
                     }
                 }
             },
@@ -1655,7 +1667,7 @@
              * Returns all listeners attached to the given element via addListener.
              * Optionally, you can specify a specific type of event to return.
              * @method getListeners
-             * @param el {HTMLElement} the element to inspect 
+             * @param el {HTMLElement|string} the element or element id to inspect 
              * @param sType {string} optional type of listener to return. If
              * left out, all listeners will be returned
              * @return {Object} the listener. Contains the following fields:
@@ -1671,18 +1683,20 @@
                 var results=[], searchLists;
                 if (!sType) {
                     searchLists = [listeners, unloadListeners];
-                } else if (sType == "unload") {
+                } else if (sType === "unload") {
                     searchLists = [unloadListeners];
                 } else {
                     searchLists = [listeners];
                 }
 
+                var oEl = (YAHOO.lang.isString(el)) ? this.getEl(el) : el;
+
                 for (var j=0;j<searchLists.length; j=j+1) {
                     var searchList = searchLists[j];
                     if (searchList && searchList.length > 0) {
                         for (var i=0,len=searchList.length; i<len ; ++i) {
                             var l = searchList[i];
-                            if ( l  && l[this.EL] === el && 
+                            if ( l  && l[this.EL] === oEl && 
                                     (!sType || sType === l[this.TYPE]) ) {
                                 results.push({
                                     type:   l[this.TYPE],
@@ -1711,6 +1725,7 @@
 
                 var EU = YAHOO.util.Event, i, j, l, len, index;
 
+                // execute and clear stored unload listeners
                 for (i=0,len=unloadListeners.length; i<len; ++i) {
                     l = unloadListeners[i];
                     if (l) {
@@ -1731,6 +1746,26 @@
 
                 unloadListeners = null;
 
+                // call clearAttributes or remove listeners to handle IE memory leaks
+                if (YAHOO.env.ua.ie && listeners && listeners.length > 0) {
+                    j = listeners.length;
+                    while (j) {
+                        index = j-1;
+                        l = listeners[index];
+                        if (l) {
+                            //try {
+                                //l[EU.EL].clearAttributes(); // errors on window objects
+                            //} catch(ex) {
+                            EU.removeListener(l[EU.EL], l[EU.TYPE], l[EU.FN], index);
+                            //}
+                        } 
+                        j--;
+                    }
+                    l=null;
+                }
+
+                /*
+                // remove all listeners
                 if (listeners && listeners.length > 0) {
                     j = listeners.length;
                     while (j) {
@@ -1742,10 +1777,11 @@
                         j = j - 1;
                     }
                     l=null;
-
-                    EU.clearCache();
                 }
+                */
 
+                /*
+                // kill legacy events
                 for (i=0,len=legacyEvents.length; i<len; ++i) {
                     // dereference the element
                     //delete legacyEvents[i][0];
@@ -1756,6 +1792,8 @@
                     legacyEvents[i] = null;
                 }
 
+                */
+
                 legacyEvents = null;
 
                 EU._simpleRemove(window, "unload", EU._unload);
@@ -1812,6 +1850,22 @@
                 // does nothing
             },
 
+/*
+            testIEReady: function (){
+                var n = document.createElement('p'), ready = false;
+                try {
+                    // throws an error until the doc is ready
+                    n.doScroll('left'); 
+                    ready = true;
+                } catch(ex){ 
+                    // document is not ready
+                }
+
+                n = null;
+                return ready;
+            },
+*/
+
             /**
              * Adds a DOM event directly without the caching, cleanup, scope adj, etc
              *
@@ -1892,7 +1946,9 @@
                     YAHOO.util.Event._tryPreloadAttach,
                     YAHOO.util.Event, true);
 
+            /*
 
+
             var el, d=document, b=d.body;
 
             // If the library is being injected after window.onload, it
@@ -1926,17 +1982,48 @@
 
             el=null;
 
+            */
+
+/*
+            (function (){
+                var n = document.createElement('p');  
+                try {
+                    // throws an error if doc is not ready
+                    n.doScroll('left');
+                    n = null;
+                    YAHOO.util.Event._ready();
+                } catch (ex){
+                    n = null;
+setTimeout(arguments.callee, YAHOO.util.Event.POLL_INTERVAL);
+                }
+            })();
+*/
+
+            EU._dri = setInterval(function() {
+                var n = document.createElement('p');  
+                try {
+                    // throws an error if doc is not ready
+                    n.doScroll('left');
+                    clearInterval(EU._dri);
+                    EU._dri = null;
+                    EU._ready();
+                    n = null;
+                } catch (ex) { 
+                    n = null;
+                }
+            }, EU.POLL_INTERVAL); 
+
         
         // Safari: The document's readyState in Safari currently will
         // change to loaded/complete before images are loaded.
         //} else if (EU.webkit) {
         } else if (EU.webkit) {
 
-            EU._drwatch = setInterval(function(){
+            EU._dri = setInterval(function() {
                 var rs=document.readyState;
                 if ("loaded" == rs || "complete" == rs) {
-                    clearInterval(EU._drwatch);
-                    EU._drwatch = null;
+                    clearInterval(EU._dri);
+                    EU._dri = null;
                     EU._ready();
                 }
             }, EU.POLL_INTERVAL); 
@@ -2286,7 +2373,6 @@
             e.ctrlKey  == keyData.ctrl) { // if we pass this, all modifiers match
             
             var dataItem;
-            var keyPressed;
 
             if (keyData.keys instanceof Array) {
                 for (var i=0;i<keyData.keys.length;i++) {
@@ -2371,4 +2457,36 @@
 * @type String
 */
 YAHOO.util.KeyListener.KEYUP = "keyup";
-YAHOO.register("event", YAHOO.util.Event, {version: "2.3.1", build: "541"});
+
+/**
+ * keycode constants for a subset of the special keys
+ * @property KEY
+ * @static
+ * @final
+ */
+YAHOO.util.KeyListener.KEY = {
+    ALT          : 18,
+    BACK_SPACE   : 8,
+    CAPS_LOCK    : 20,
+    CONTROL      : 17,
+    DELETE       : 46,
+    DOWN         : 40,
+    END          : 35,
+    ENTER        : 13,
+    ESCAPE       : 27,
+    HOME         : 36,
+    LEFT         : 37,
+    META         : 224,
+    NUM_LOCK     : 144,
+    PAGE_DOWN    : 34,
+    PAGE_UP      : 33, 
+    PAUSE        : 19,
+    PRINTSCREEN  : 44,
+    RIGHT        : 39,
+    SCROLL_LOCK  : 145,
+    SHIFT        : 16,
+    SPACE        : 32,
+    TAB          : 9,
+    UP           : 38
+};
+YAHOO.register("event", YAHOO.util.Event, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/fonts/README
===================================================================
--- trunk/root/static/yui/fonts/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/fonts/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,13 @@
 YUI Library - Fonts - Release Notes
 
+Version 2.4.1
+No change
+
+Version 2.4.0
+
+  * Rechanged core line-height from 1.22 to 1.231, sans units.
+  * Updated line-height value for monospcaed elements. 
+
 Version 2.3.0
 
   * Updated %-to-px conversion charted for increased accuracy

Modified: trunk/root/static/yui/fonts/fonts-min.css
===================================================================
--- trunk/root/static/yui/fonts/fonts-min.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/fonts/fonts-min.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-body {font:13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}table {font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:99%;}
+body {font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}table {font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}

Modified: trunk/root/static/yui/fonts/fonts.css
===================================================================
--- trunk/root/static/yui/fonts/fonts.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/fonts/fonts.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,15 +2,15 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * Percents could work for IE, but for backCompat purposes, we are using keywords.
  * x-small is for IE6/7 quirks mode.
  */
-body {font:13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}
+body {font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}
 table {font-size:inherit;font:100%;}
 /**
  * Bump up IE to get to 13px equivalent
  */
-pre,code,kbd,samp,tt {font-family:monospace;*font-size:108%;line-height:99%;}
+pre,code,kbd,samp,tt {font-family:monospace;*font-size:108%;line-height:100%;}

Added: trunk/root/static/yui/get/README
===================================================================
--- trunk/root/static/yui/get/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/get/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,8 @@
+get - Release Notes
+
+2.4.1
+
+No change
+
+2.4.0
+   * Inital release

Added: trunk/root/static/yui/get/get-beta-debug.js
===================================================================
--- trunk/root/static/yui/get/get-beta-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/get/get-beta-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,643 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+/**
+ * Provides a mechanism to fetch remote resources and
+ * insert them into a document
+ * @module get
+ * @requires yahoo
+ */
+
+/**
+ * Fetches and inserts one or more script or link nodes into the document 
+ * @namespace YAHOO.util
+ * @class YAHOO.util.Get
+ */
+YAHOO.util.Get = function() {
+
+    /**
+     * hash of queues to manage multiple requests
+     * @property queues
+     * @private
+     */
+    var queues={}, 
+        
+    /**
+     * queue index used to generate transaction ids
+     * @property qidx
+     * @type int
+     * @private
+     */
+        qidx=0, 
+        
+    /**
+     * node index used to generate unique node ids
+     * @property nidx
+     * @type int
+     * @private
+     */
+        nidx=0, 
+
+        // ridx=0,
+
+        // sandboxFrame=null,
+
+    /**
+     * interal property used to prevent multiple simultaneous purge 
+     * processes
+     * @property purging
+     * @type boolean
+     * @private
+     */
+        purging=false,
+
+        ua=YAHOO.env.ua, 
+        
+        lang=YAHOO.lang;
+    
+    /** 
+     * Generates an HTML element, this is not appended to a document
+     * @method _node
+     * @param type {string} the type of element
+     * @param attr {string} the attributes
+     * @param win {Window} optional window to create the element in
+     * @return {HTMLElement} the generated node
+     * @private
+     */
+    var _node = function(type, attr, win) {
+        var w = win || window, d=w.document, n=d.createElement(type);
+
+        for (var i in attr) {
+            if (attr[i] && YAHOO.lang.hasOwnProperty(attr, i)) {
+                n.setAttribute(i, attr[i]);
+            }
+        }
+
+        return n;
+    };
+
+    /**
+     * Generates a link node
+     * @method _linkNode
+     * @param url {string} the url for the css file
+     * @param win {Window} optional window to create the node in
+     * @return {HTMLElement} the generated node
+     * @private
+     */
+    var _linkNode = function(url, win) {
+        return _node("link", {
+                "id": "yui__dyn_" + (nidx++),
+                "type": "text/css",
+                "rel": "stylesheet",
+                "href": url
+            }, win);
+    };
+
+    /**
+     * Generates a script node
+     * @method _scriptNode
+     * @param url {string} the url for the script file
+     * @param win {Window} optional window to create the node in
+     * @return {HTMLElement} the generated node
+     * @private
+     */
+    var _scriptNode = function(url, win) {
+        return _node("script", {
+                "id": "yui__dyn_" + (nidx++),
+                "type": "text/javascript",
+                "src": url
+            }, win);
+    };
+
+    /**
+     * Returns the data payload for callback functions
+     * @method _returnData
+     * @private
+     */
+    var _returnData = function(q) {
+        return {
+                tId: q.tId,
+                win: q.win,
+                data: q.data,
+                nodes: q.nodes,
+                purge: function() {
+                    _purge(this.tId);
+                }
+            };
+    };
+
+    /*
+     * The request failed, execute fail handler with whatever
+     * was accomplished.  There isn't a failure case at the
+     * moment unless you count aborted transactions
+     * @method _fail
+     * @param id {string} the id of the request
+     * @private
+     */
+    var _fail = function(id) {
+        var q = queues[id];
+        // execute failure callback
+        if (q.onFailure) {
+            var sc=q.scope || q.win;
+            q.onFailure.call(sc, _returnData(q));
+        }
+    };
+
+    /**
+     * The request is complete, so executing the requester's callback
+     * @method _finish
+     * @param id {string} the id of the request
+     * @private
+     */
+    var _finish = function(id) {
+        YAHOO.log("Finishing transaction " + id);
+        var q = queues[id];
+        q.finished = true;
+
+        if (q.aborted) {
+            YAHOO.log("transaction " + id + " was aborted", "info", "Get");
+            _fail(id);
+            return;
+        }
+
+        // execute success callback
+        if (q.onSuccess) {
+            var sc=q.scope || q.win;
+            q.onSuccess.call(sc, _returnData(q));
+        }
+    };
+
+    /**
+     * Loads the next item for a given request
+     * @method _next
+     * @param id {string} the id of the request
+     * @param loaded {string} the url that was just loaded, if any
+     * @private
+     */
+    var _next = function(id, loaded) {
+        YAHOO.log("_next: " + id + ", loaded: " + loaded, "info", "Get");
+        var q = queues[id];
+
+        if (q.aborted) {
+            YAHOO.log("transaction " + id + " was aborted", "info", "Get");
+            _fail(id);
+            return;
+        }
+
+        if (loaded) {
+            q.url.shift(); 
+            if (q.varName) {
+                q.varName.shift(); 
+            }
+        } else {
+            // This is the first pass: make sure the url is an array
+            q.url = (lang.isString(q.url)) ? [q.url] : q.url;
+            if (q.varName) {
+                q.varName = (lang.isString(q.varName)) ? [q.varName] : q.varName;
+            }
+        }
+
+        var w=q.win, d=w.document, h=d.getElementsByTagName("head")[0], n;
+
+        if (q.url.length === 0) {
+            // Safari 2.x workaround - There is no way to know when 
+            // a script is ready in versions of Safari prior to 3.x.
+            // Adding an extra node reduces the problem, but doesn't
+            // eliminate it completely because the browser executes
+            // them asynchronously. 
+            if (q.type === "script" && ua.webkit && ua.webkit < 420 && 
+                    !q.finalpass && !q.varName) {
+                // Add another script node.  This does not guarantee that the
+                // scripts will execute in order, but it does appear to fix the
+                // problem on fast connections more effectively than using an
+                // arbitrary timeout.  It is possible that the browser does
+                // block subsequent script execution in this case for a limited
+                // time.
+                var extra = _scriptNode(null, q.win);
+                extra.innerHTML='YAHOO.util.Get._finalize("' + id + '");';
+                q.nodes.push(extra); h.appendChild(extra);
+
+            } else {
+                _finish(id);
+            }
+
+            return;
+        } 
+
+
+        var url = q.url[0];
+        YAHOO.log("attempting to load " + url, "info", "Get");
+
+        if (q.type === "script") {
+            n = _scriptNode(url, w);
+        } else {
+            n = _linkNode(url, w);
+        }
+
+        // track this node's load progress
+        _track(q.type, n, id, url, w, q.url.length);
+
+        // add the node to the queue so we can return it to the user supplied callback
+        q.nodes.push(n);
+
+        // add it to the head
+        h.appendChild(n);
+        
+        YAHOO.log("Appending node: " + url, "info", "Get");
+
+        // FireFox does not support the onload event for link nodes, so there is
+        // no way to make the css requests synchronous. This means that the css 
+        // rules in multiple files could be applied out of order in this browser
+        // if a later request returns before an earlier one.  Safari too.
+        if ((ua.webkit || ua.gecko) && q.type === "css") {
+            _next(id, url);
+        }
+    };
+
+    /**
+     * Removes processed queues and corresponding nodes
+     * @method _autoPurge
+     * @private
+     */
+    var _autoPurge = function() {
+
+        if (purging) {
+            return;
+        }
+
+        purging = true;
+        for (var i in queues) {
+            var q = queues[i];
+            if (q.autopurge && q.finished) {
+                _purge(q.tId);
+            }
+        }
+
+        purging = false;
+    };
+
+    /**
+     * Removes the nodes for the specified queue
+     * @method _purge
+     * @private
+     */
+    var _purge = function(tId) {
+        var q=queues[tId];
+        if (q) {
+            var n=q.nodes, l=n.length, d=q.win.document, 
+                h=d.getElementsByTagName("head")[0];
+            for (var i=0; i<l; i=i+1) {
+                h.removeChild(n[i]);
+            }
+        }
+    };
+
+    /**
+     * Saves the state for the request and begins loading
+     * the requested urls
+     * @method queue
+     * @param type {string} the type of node to insert
+     * @param url {string} the url to load
+     * @param opts the hash of options for this request
+     * @private
+     */
+    var _queue = function(type, url, opts) {
+
+        var id = "q" + (qidx++);
+        opts = opts || {};
+
+        if (qidx % YAHOO.util.Get.PURGE_THRESH === 0) {
+            _autoPurge();
+        }
+
+        queues[id] = lang.merge(opts, {
+            tId: id,
+            type: type,
+            url: url,
+            finished: false,
+            nodes: []
+        });
+
+        var q = queues[id];
+        q.win = q.win || window;
+        q.scope = q.scope || q.win;
+        q.autopurge = ("autopurge" in q) ? q.autopurge : 
+                      (type === "script") ? true : false;
+
+        lang.later(0, q, _next, id);
+
+        return {
+            tId: id
+        };
+    };
+
+    /**
+     * Detects when a node has been loaded.  In the case of
+     * script nodes, this does not guarantee that contained
+     * script is ready to use.
+     * @method _track
+     * @param type {string} the type of node to track
+     * @param n {HTMLElement} the node to track
+     * @param id {string} the id of the request
+     * @param url {string} the url that is being loaded
+     * @param win {Window} the targeted window
+     * @param qlength the number of remaining items in the queue,
+     * including this one
+     * @param trackfn {Function} function to execute when finished
+     * the default is _next
+     * @private
+     */
+    var _track = function(type, n, id, url, win, qlength, trackfn) {
+        var f = trackfn || _next;
+
+        // IE supports the readystatechange event for script and css nodes
+        if (ua.ie) {
+            n.onreadystatechange = function() {
+                var rs = this.readyState;
+                if ("loaded" === rs || "complete" === rs) {
+                    YAHOO.log(id + " onload " + url, "info", "Get");
+                    f(id, url);
+                }
+            };
+
+        // webkit prior to 3.x is problemmatic
+        } else if (ua.webkit) {
+
+            if (type === "script") {
+
+                // Safari 3.x supports the load event for script nodes (DOM2)
+                if (ua.webkit > 419) {
+
+                    n.addEventListener("load", function() {
+                        YAHOO.log(id + " DOM2 onload " + url, "info", "Get");
+                        f(id, url);
+                    });
+
+                // Nothing can be done with Safari < 3.x except to pause and hope
+                // for the best, particularly after last script is inserted. The
+                // scripts will always execute in the order they arrive, not
+                // necessarily the order in which they were inserted.  To support
+                // script nodes with complete reliability in these browsers, script
+                // nodes either need to invoke a function in the window once they
+                // are loaded or the implementer needs to provide a well-known
+                // property that the utility can poll for.
+                } else {
+                    // Poll for the existence of the named variable, if it
+                    // was supplied.
+                    var q = queues[id];
+                    if (q.varName) {
+                        var freq=YAHOO.util.Get.POLL_FREQ;
+                        YAHOO.log("Polling for " + q.varName[0]);
+                        q.maxattempts = YAHOO.util.Get.TIMEOUT/freq;
+                        q.attempts = 0;
+                        q._cache = q.varName[0].split(".");
+                        q.timer = lang.later(freq, q, function(o) {
+                            var a=this._cache, l=a.length, w=this.win, i;
+                            for (i=0; i<l; i=i+1) {
+                                w = w[a[i]];
+                                if (!w) {
+                                    // if we have exausted our attempts, give up
+                                    this.attempts++;
+                                    if (this.attempts++ > this.maxattempts) {
+                                        YAHOO.log("Over retry limit, giving up");
+                                        q.timer.cancel();
+                                        _fail(id);
+                                    } else {
+                                        YAHOO.log(a[i] + " failed, retrying");
+                                    }
+                                    return;
+                                }
+                            }
+                            
+                            YAHOO.log("Safari poll complete");
+
+                            q.timer.cancel();
+                            f(id, url);
+
+                        }, null, true);
+                    } else {
+                        lang.later(YAHOO.util.Get.POLL_FREQ, null, f, [id, url]);
+                    }
+                }
+            } 
+
+        // FireFox and Opera support onload (but not DOM2 in FF) handlers for
+        // script nodes.  Opera, but not FF, supports the onload event for link
+        // nodes.
+        } else { 
+            n.onload = function() {
+                YAHOO.log(id + " onload " + url, "info", "Get");
+                f(id, url);
+            };
+        }
+    };
+
+    return {
+
+        /**
+         * The default poll freqency in ms, when needed
+         * @property POLL_FREQ
+         * @static
+         * @type int
+         * @default 10
+         */
+        POLL_FREQ: 10,
+
+        /**
+         * The number of request required before an automatic purge.
+         * property PURGE_THRESH
+         * @static
+         * @type int
+         * @default 20
+         */
+        PURGE_THRESH: 20,
+
+        /**
+         * The length time to poll for varName when loading a script in
+         * Safari 2.x before the transaction fails.
+         * property TIMEOUT
+         * @static
+         * @type int
+         * @default 2000
+         */
+        TIMEOUT: 2000,
+        
+        /**
+         * Called by the the helper for detecting script load in Safari
+         * @method _finalize
+         * @param id {string} the transaction id
+         * @private
+         */
+        _finalize: function(id) {
+            YAHOO.log(id + " finalized ", "info", "Get");
+            lang.later(0, null, _finish, id);
+        },
+
+        /**
+         * Abort a transaction
+         * @method abort
+         * @param {string|object} either the tId or the object returned from
+         * script() or css()
+         */
+        abort: function(o) {
+            var id = (lang.isString(o)) ? o : o.tId;
+            var q = queues[id];
+            if (q) {
+                YAHOO.log("Aborting " + id, "info", "Get");
+                q.aborted = true;
+            }
+        }, 
+
+        /**
+         * Fetches and inserts one or more script nodes into the head
+         * of the current document or the document in a specified window.
+         *
+         * @method script
+         * @static
+         * @param url {string|string[]} the url or urls to the script(s)
+         * @param opts {object} Options: 
+         * <dl>
+         * <dt>onSuccess</dt>
+         * <dd>
+         * callback to execute when the script(s) are finished loading
+         * The callback receives an object back with the following
+         * data:
+         * <dl>
+         * <dt>win</dt>
+         * <dd>the window the script(s) were inserted into</dd>
+         * <dt>data</dt>
+         * <dd>the data object passed in when the request was made</dd>
+         * <dt>nodes</dt>
+         * <dd>An array containing references to the nodes that were
+         * inserted</dd>
+         * <dt>purge</dt>
+         * <dd>A function that, when executed, will remove the nodes
+         * that were inserted</dd>
+         * <dt>
+         * </dl>
+         * </dd>
+         * <dt>onFailure</dt>
+         * <dd>
+         * callback to execute when the script load operation fails
+         * The callback receives an object back with the following
+         * data:
+         * <dl>
+         * <dt>win</dt>
+         * <dd>the window the script(s) were inserted into</dd>
+         * <dt>data</dt>
+         * <dd>the data object passed in when the request was made</dd>
+         * <dt>nodes</dt>
+         * <dd>An array containing references to the nodes that were
+         * inserted successfully</dd>
+         * <dt>purge</dt>
+         * <dd>A function that, when executed, will remove any nodes
+         * that were inserted</dd>
+         * <dt>
+         * </dl>
+         * </dd>
+         * <dt>scope</dt>
+         * <dd>the execution context for the callbacks</dd>
+         * <dt>win</dt>
+         * <dd>a window other than the one the utility occupies</dd>
+         * <dt>autopurge</dt>
+         * <dd>
+         * setting to true will let the utilities cleanup routine purge 
+         * the script once loaded
+         * </dd>
+         * <dt>data</dt>
+         * <dd>
+         * data that is supplied to the callback when the script(s) are
+         * loaded.
+         * </dd>
+         * <dt>varName</dt>
+         * <dd>
+         * variable that should be available when a script is finished
+         * loading.  Used to help Safari 2.x and below with script load 
+         * detection.  The type of this property should match what was
+         * passed into the url parameter: if loading a single url, a
+         * string can be supplied.  If loading multiple scripts, you
+         * must supply an array that contains the variable name for
+         * each script.
+         * </dd>
+         * </dl>
+         * <pre>
+         * // assumes yahoo, dom, and event are already on the page
+         *   YAHOO.util.Get.script(
+         *   ["http://yui.yahooapis.com/2.3.1/build/dragdrop/dragdrop-min.js",
+         *    "http://yui.yahooapis.com/2.3.1/build/animation/animation-min.js"], {
+         *     onSuccess: function(o) {
+         *       YAHOO.log(o.data); // foo
+         *       new YAHOO.util.DDProxy("dd1"); // also new o.reference("dd1"); would work
+         *       this.log("won't cause error because YAHOO is the scope");
+         *       this.log(o.nodes.length === 2) // true
+         *       // o.purge(); // optionally remove the script nodes immediately
+         *     },
+         *     onFailure: function(o) {
+         *       YAHOO.log("transaction failed");
+         *     },
+         *     data: "foo",
+         *     scope: YAHOO,
+         *     // win: otherframe // target another window/frame
+         *     autopurge: true // allow the utility to choose when to remove the nodes
+         *   });
+         * </pre>
+         * @return {tId: string} an object containing info about the transaction
+         */
+        script: function(url, opts) { return _queue("script", url, opts); },
+
+        /**
+         * Fetches and inserts one or more css link nodes into the 
+         * head of the current document or the document in a specified
+         * window.
+         * @method css
+         * @static
+         * @param url {string} the url or urls to the css file(s)
+         * @param opts Options: 
+         * <dl>
+         * <dt>onSuccess</dt>
+         * <dd>
+         * callback to execute when the css file(s) are finished loading
+         * The callback receives an object back with the following
+         * data:
+         * <dl>win</dl>
+         * <dd>the window the link nodes(s) were inserted into</dd>
+         * <dt>data</dt>
+         * <dd>the data object passed in when the request was made</dd>
+         * <dt>nodes</dt>
+         * <dd>An array containing references to the nodes that were
+         * inserted</dd>
+         * <dt>purge</dt>
+         * <dd>A function that, when executed, will remove the nodes
+         * that were inserted</dd>
+         * <dt>
+         * </dl>
+         * </dd>
+         * <dt>scope</dt>
+         * <dd>the execution context for the callbacks</dd>
+         * <dt>win</dt>
+         * <dd>a window other than the one the utility occupies</dd>
+         * <dt>data</dt>
+         * <dd>
+         * data that is supplied to the callbacks when the nodes(s) are
+         * loaded.
+         * </dd>
+         * </dl>
+         * <pre>
+         *      YAHOO.util.Get.css("http://yui.yahooapis.com/2.3.1/build/menu/assets/skins/sam/menu.css");
+         * </pre>
+         * <pre>
+         *      YAHOO.util.Get.css(["http://yui.yahooapis.com/2.3.1/build/menu/assets/skins/sam/menu.css",
+         *                          "http://yui.yahooapis.com/2.3.1/build/logger/assets/skins/sam/logger.css"]);
+         * </pre>
+         * @return {tId: string} an object containing info about the transaction
+         */
+        css: function(url, opts) {
+            return _queue("css", url, opts); 
+        }
+    };
+}();
+
+YAHOO.register("get", YAHOO.util.Get, {version: "2.4.1", build: "742"});

Added: trunk/root/static/yui/get/get-beta-min.js
===================================================================
--- trunk/root/static/yui/get/get-beta-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/get/get-beta-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+YAHOO.util.Get=function(){var I={},H=0,B=0,O=false,A=YAHOO.env.ua,D=YAHOO.lang;var Q=function(U,R,V){var S=V||window,W=S.document,X=W.createElement(U);for(var T in R){if(R[T]&&YAHOO.lang.hasOwnProperty(R,T)){X.setAttribute(T,R[T]);}}return X;};var N=function(R,S){return Q("link",{"id":"yui__dyn_"+(B++),"type":"text/css","rel":"stylesheet","href":R},S);};var M=function(R,S){return Q("script",{"id":"yui__dyn_"+(B++),"type":"text/javascript","src":R},S);};var K=function(R){return{tId:R.tId,win:R.win,data:R.data,nodes:R.nodes,purge:function(){J(this.tId);}};};var P=function(T){var R=I[T];if(R.onFailure){var S=R.scope||R.win;R.onFailure.call(S,K(R));}};var F=function(T){var R=I[T];R.finished=true;if(R.aborted){P(T);return ;}if(R.onSuccess){var S=R.scope||R.win;R.onSuccess.call(S,K(R));}};var E=function(T,W){var S=I[T];if(S.aborted){P(T);return ;}if(W){S.url.shift();if(S.varName){S.varName.shift();}}else{S.url=(D.isString(S.url))?[S.url]:S.url;if(S.varName){S.varName=(D.isString(!
 S.varName))?[S.varName]:S.varName;}}var Z=S.win,Y=Z.document,X=Y.getElementsByTagName("head")[0],U;if(S.url.length===0){if(S.type==="script"&&A.webkit&&A.webkit<420&&!S.finalpass&&!S.varName){var V=M(null,S.win);V.innerHTML="YAHOO.util.Get._finalize(\""+T+"\");";S.nodes.push(V);X.appendChild(V);}else{F(T);}return ;}var R=S.url[0];if(S.type==="script"){U=M(R,Z);}else{U=N(R,Z);}G(S.type,U,T,R,Z,S.url.length);S.nodes.push(U);X.appendChild(U);if((A.webkit||A.gecko)&&S.type==="css"){E(T,R);}};var C=function(){if(O){return ;}O=true;for(var R in I){var S=I[R];if(S.autopurge&&S.finished){J(S.tId);}}O=false;};var J=function(X){var U=I[X];if(U){var W=U.nodes,R=W.length,V=U.win.document,T=V.getElementsByTagName("head")[0];for(var S=0;S<R;S=S+1){T.removeChild(W[S]);}}};var L=function(S,R,T){var V="q"+(H++);T=T||{};if(H%YAHOO.util.Get.PURGE_THRESH===0){C();}I[V]=D.merge(T,{tId:V,type:S,url:R,finished:false,nodes:[]});var U=I[V];U.win=U.win||window;U.scope=U.scope||U.win;U.autopurge=("au!
 topurge" in U)?U.autopurge:(S==="script")?true:false;D.later(0!
 ,U,E,V);
return{tId:V};};var G=function(a,V,U,S,W,X,Z){var Y=Z||E;if(A.ie){V.onreadystatechange=function(){var b=this.readyState;if("loaded"===b||"complete"===b){Y(U,S);}};}else{if(A.webkit){if(a==="script"){if(A.webkit>419){V.addEventListener("load",function(){Y(U,S);});}else{var R=I[U];if(R.varName){var T=YAHOO.util.Get.POLL_FREQ;R.maxattempts=YAHOO.util.Get.TIMEOUT/T;R.attempts=0;R._cache=R.varName[0].split(".");R.timer=D.later(T,R,function(f){var d=this._cache,c=d.length,b=this.win,e;for(e=0;e<c;e=e+1){b=b[d[e]];if(!b){this.attempts++;if(this.attempts++>this.maxattempts){R.timer.cancel();P(U);}else{}return ;}}R.timer.cancel();Y(U,S);},null,true);}else{D.later(YAHOO.util.Get.POLL_FREQ,null,Y,[U,S]);}}}}else{V.onload=function(){Y(U,S);};}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(R){D.later(0,null,F,R);},abort:function(S){var T=(D.isString(S))?S:S.tId;var R=I[T];if(R){R.aborted=true;}},script:function(R,S){return L("script",R,S);},css:function(R,S){retur!
 n L("css",R,S);}};}();YAHOO.register("get",YAHOO.util.Get,{version:"2.4.1",build:"742"});
\ No newline at end of file

Added: trunk/root/static/yui/get/get-beta.js
===================================================================
--- trunk/root/static/yui/get/get-beta.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/get/get-beta.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,625 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+/**
+ * Provides a mechanism to fetch remote resources and
+ * insert them into a document
+ * @module get
+ * @requires yahoo
+ */
+
+/**
+ * Fetches and inserts one or more script or link nodes into the document 
+ * @namespace YAHOO.util
+ * @class YAHOO.util.Get
+ */
+YAHOO.util.Get = function() {
+
+    /**
+     * hash of queues to manage multiple requests
+     * @property queues
+     * @private
+     */
+    var queues={}, 
+        
+    /**
+     * queue index used to generate transaction ids
+     * @property qidx
+     * @type int
+     * @private
+     */
+        qidx=0, 
+        
+    /**
+     * node index used to generate unique node ids
+     * @property nidx
+     * @type int
+     * @private
+     */
+        nidx=0, 
+
+        // ridx=0,
+
+        // sandboxFrame=null,
+
+    /**
+     * interal property used to prevent multiple simultaneous purge 
+     * processes
+     * @property purging
+     * @type boolean
+     * @private
+     */
+        purging=false,
+
+        ua=YAHOO.env.ua, 
+        
+        lang=YAHOO.lang;
+    
+    /** 
+     * Generates an HTML element, this is not appended to a document
+     * @method _node
+     * @param type {string} the type of element
+     * @param attr {string} the attributes
+     * @param win {Window} optional window to create the element in
+     * @return {HTMLElement} the generated node
+     * @private
+     */
+    var _node = function(type, attr, win) {
+        var w = win || window, d=w.document, n=d.createElement(type);
+
+        for (var i in attr) {
+            if (attr[i] && YAHOO.lang.hasOwnProperty(attr, i)) {
+                n.setAttribute(i, attr[i]);
+            }
+        }
+
+        return n;
+    };
+
+    /**
+     * Generates a link node
+     * @method _linkNode
+     * @param url {string} the url for the css file
+     * @param win {Window} optional window to create the node in
+     * @return {HTMLElement} the generated node
+     * @private
+     */
+    var _linkNode = function(url, win) {
+        return _node("link", {
+                "id": "yui__dyn_" + (nidx++),
+                "type": "text/css",
+                "rel": "stylesheet",
+                "href": url
+            }, win);
+    };
+
+    /**
+     * Generates a script node
+     * @method _scriptNode
+     * @param url {string} the url for the script file
+     * @param win {Window} optional window to create the node in
+     * @return {HTMLElement} the generated node
+     * @private
+     */
+    var _scriptNode = function(url, win) {
+        return _node("script", {
+                "id": "yui__dyn_" + (nidx++),
+                "type": "text/javascript",
+                "src": url
+            }, win);
+    };
+
+    /**
+     * Returns the data payload for callback functions
+     * @method _returnData
+     * @private
+     */
+    var _returnData = function(q) {
+        return {
+                tId: q.tId,
+                win: q.win,
+                data: q.data,
+                nodes: q.nodes,
+                purge: function() {
+                    _purge(this.tId);
+                }
+            };
+    };
+
+    /*
+     * The request failed, execute fail handler with whatever
+     * was accomplished.  There isn't a failure case at the
+     * moment unless you count aborted transactions
+     * @method _fail
+     * @param id {string} the id of the request
+     * @private
+     */
+    var _fail = function(id) {
+        var q = queues[id];
+        // execute failure callback
+        if (q.onFailure) {
+            var sc=q.scope || q.win;
+            q.onFailure.call(sc, _returnData(q));
+        }
+    };
+
+    /**
+     * The request is complete, so executing the requester's callback
+     * @method _finish
+     * @param id {string} the id of the request
+     * @private
+     */
+    var _finish = function(id) {
+        var q = queues[id];
+        q.finished = true;
+
+        if (q.aborted) {
+            _fail(id);
+            return;
+        }
+
+        // execute success callback
+        if (q.onSuccess) {
+            var sc=q.scope || q.win;
+            q.onSuccess.call(sc, _returnData(q));
+        }
+    };
+
+    /**
+     * Loads the next item for a given request
+     * @method _next
+     * @param id {string} the id of the request
+     * @param loaded {string} the url that was just loaded, if any
+     * @private
+     */
+    var _next = function(id, loaded) {
+        var q = queues[id];
+
+        if (q.aborted) {
+            _fail(id);
+            return;
+        }
+
+        if (loaded) {
+            q.url.shift(); 
+            if (q.varName) {
+                q.varName.shift(); 
+            }
+        } else {
+            // This is the first pass: make sure the url is an array
+            q.url = (lang.isString(q.url)) ? [q.url] : q.url;
+            if (q.varName) {
+                q.varName = (lang.isString(q.varName)) ? [q.varName] : q.varName;
+            }
+        }
+
+        var w=q.win, d=w.document, h=d.getElementsByTagName("head")[0], n;
+
+        if (q.url.length === 0) {
+            // Safari 2.x workaround - There is no way to know when 
+            // a script is ready in versions of Safari prior to 3.x.
+            // Adding an extra node reduces the problem, but doesn't
+            // eliminate it completely because the browser executes
+            // them asynchronously. 
+            if (q.type === "script" && ua.webkit && ua.webkit < 420 && 
+                    !q.finalpass && !q.varName) {
+                // Add another script node.  This does not guarantee that the
+                // scripts will execute in order, but it does appear to fix the
+                // problem on fast connections more effectively than using an
+                // arbitrary timeout.  It is possible that the browser does
+                // block subsequent script execution in this case for a limited
+                // time.
+                var extra = _scriptNode(null, q.win);
+                extra.innerHTML='YAHOO.util.Get._finalize("' + id + '");';
+                q.nodes.push(extra); h.appendChild(extra);
+
+            } else {
+                _finish(id);
+            }
+
+            return;
+        } 
+
+
+        var url = q.url[0];
+
+        if (q.type === "script") {
+            n = _scriptNode(url, w);
+        } else {
+            n = _linkNode(url, w);
+        }
+
+        // track this node's load progress
+        _track(q.type, n, id, url, w, q.url.length);
+
+        // add the node to the queue so we can return it to the user supplied callback
+        q.nodes.push(n);
+
+        // add it to the head
+        h.appendChild(n);
+        
+
+        // FireFox does not support the onload event for link nodes, so there is
+        // no way to make the css requests synchronous. This means that the css 
+        // rules in multiple files could be applied out of order in this browser
+        // if a later request returns before an earlier one.  Safari too.
+        if ((ua.webkit || ua.gecko) && q.type === "css") {
+            _next(id, url);
+        }
+    };
+
+    /**
+     * Removes processed queues and corresponding nodes
+     * @method _autoPurge
+     * @private
+     */
+    var _autoPurge = function() {
+
+        if (purging) {
+            return;
+        }
+
+        purging = true;
+        for (var i in queues) {
+            var q = queues[i];
+            if (q.autopurge && q.finished) {
+                _purge(q.tId);
+            }
+        }
+
+        purging = false;
+    };
+
+    /**
+     * Removes the nodes for the specified queue
+     * @method _purge
+     * @private
+     */
+    var _purge = function(tId) {
+        var q=queues[tId];
+        if (q) {
+            var n=q.nodes, l=n.length, d=q.win.document, 
+                h=d.getElementsByTagName("head")[0];
+            for (var i=0; i<l; i=i+1) {
+                h.removeChild(n[i]);
+            }
+        }
+    };
+
+    /**
+     * Saves the state for the request and begins loading
+     * the requested urls
+     * @method queue
+     * @param type {string} the type of node to insert
+     * @param url {string} the url to load
+     * @param opts the hash of options for this request
+     * @private
+     */
+    var _queue = function(type, url, opts) {
+
+        var id = "q" + (qidx++);
+        opts = opts || {};
+
+        if (qidx % YAHOO.util.Get.PURGE_THRESH === 0) {
+            _autoPurge();
+        }
+
+        queues[id] = lang.merge(opts, {
+            tId: id,
+            type: type,
+            url: url,
+            finished: false,
+            nodes: []
+        });
+
+        var q = queues[id];
+        q.win = q.win || window;
+        q.scope = q.scope || q.win;
+        q.autopurge = ("autopurge" in q) ? q.autopurge : 
+                      (type === "script") ? true : false;
+
+        lang.later(0, q, _next, id);
+
+        return {
+            tId: id
+        };
+    };
+
+    /**
+     * Detects when a node has been loaded.  In the case of
+     * script nodes, this does not guarantee that contained
+     * script is ready to use.
+     * @method _track
+     * @param type {string} the type of node to track
+     * @param n {HTMLElement} the node to track
+     * @param id {string} the id of the request
+     * @param url {string} the url that is being loaded
+     * @param win {Window} the targeted window
+     * @param qlength the number of remaining items in the queue,
+     * including this one
+     * @param trackfn {Function} function to execute when finished
+     * the default is _next
+     * @private
+     */
+    var _track = function(type, n, id, url, win, qlength, trackfn) {
+        var f = trackfn || _next;
+
+        // IE supports the readystatechange event for script and css nodes
+        if (ua.ie) {
+            n.onreadystatechange = function() {
+                var rs = this.readyState;
+                if ("loaded" === rs || "complete" === rs) {
+                    f(id, url);
+                }
+            };
+
+        // webkit prior to 3.x is problemmatic
+        } else if (ua.webkit) {
+
+            if (type === "script") {
+
+                // Safari 3.x supports the load event for script nodes (DOM2)
+                if (ua.webkit > 419) {
+
+                    n.addEventListener("load", function() {
+                        f(id, url);
+                    });
+
+                // Nothing can be done with Safari < 3.x except to pause and hope
+                // for the best, particularly after last script is inserted. The
+                // scripts will always execute in the order they arrive, not
+                // necessarily the order in which they were inserted.  To support
+                // script nodes with complete reliability in these browsers, script
+                // nodes either need to invoke a function in the window once they
+                // are loaded or the implementer needs to provide a well-known
+                // property that the utility can poll for.
+                } else {
+                    // Poll for the existence of the named variable, if it
+                    // was supplied.
+                    var q = queues[id];
+                    if (q.varName) {
+                        var freq=YAHOO.util.Get.POLL_FREQ;
+                        q.maxattempts = YAHOO.util.Get.TIMEOUT/freq;
+                        q.attempts = 0;
+                        q._cache = q.varName[0].split(".");
+                        q.timer = lang.later(freq, q, function(o) {
+                            var a=this._cache, l=a.length, w=this.win, i;
+                            for (i=0; i<l; i=i+1) {
+                                w = w[a[i]];
+                                if (!w) {
+                                    // if we have exausted our attempts, give up
+                                    this.attempts++;
+                                    if (this.attempts++ > this.maxattempts) {
+                                        q.timer.cancel();
+                                        _fail(id);
+                                    } else {
+                                    }
+                                    return;
+                                }
+                            }
+                            
+
+                            q.timer.cancel();
+                            f(id, url);
+
+                        }, null, true);
+                    } else {
+                        lang.later(YAHOO.util.Get.POLL_FREQ, null, f, [id, url]);
+                    }
+                }
+            } 
+
+        // FireFox and Opera support onload (but not DOM2 in FF) handlers for
+        // script nodes.  Opera, but not FF, supports the onload event for link
+        // nodes.
+        } else { 
+            n.onload = function() {
+                f(id, url);
+            };
+        }
+    };
+
+    return {
+
+        /**
+         * The default poll freqency in ms, when needed
+         * @property POLL_FREQ
+         * @static
+         * @type int
+         * @default 10
+         */
+        POLL_FREQ: 10,
+
+        /**
+         * The number of request required before an automatic purge.
+         * property PURGE_THRESH
+         * @static
+         * @type int
+         * @default 20
+         */
+        PURGE_THRESH: 20,
+
+        /**
+         * The length time to poll for varName when loading a script in
+         * Safari 2.x before the transaction fails.
+         * property TIMEOUT
+         * @static
+         * @type int
+         * @default 2000
+         */
+        TIMEOUT: 2000,
+        
+        /**
+         * Called by the the helper for detecting script load in Safari
+         * @method _finalize
+         * @param id {string} the transaction id
+         * @private
+         */
+        _finalize: function(id) {
+            lang.later(0, null, _finish, id);
+        },
+
+        /**
+         * Abort a transaction
+         * @method abort
+         * @param {string|object} either the tId or the object returned from
+         * script() or css()
+         */
+        abort: function(o) {
+            var id = (lang.isString(o)) ? o : o.tId;
+            var q = queues[id];
+            if (q) {
+                q.aborted = true;
+            }
+        }, 
+
+        /**
+         * Fetches and inserts one or more script nodes into the head
+         * of the current document or the document in a specified window.
+         *
+         * @method script
+         * @static
+         * @param url {string|string[]} the url or urls to the script(s)
+         * @param opts {object} Options: 
+         * <dl>
+         * <dt>onSuccess</dt>
+         * <dd>
+         * callback to execute when the script(s) are finished loading
+         * The callback receives an object back with the following
+         * data:
+         * <dl>
+         * <dt>win</dt>
+         * <dd>the window the script(s) were inserted into</dd>
+         * <dt>data</dt>
+         * <dd>the data object passed in when the request was made</dd>
+         * <dt>nodes</dt>
+         * <dd>An array containing references to the nodes that were
+         * inserted</dd>
+         * <dt>purge</dt>
+         * <dd>A function that, when executed, will remove the nodes
+         * that were inserted</dd>
+         * <dt>
+         * </dl>
+         * </dd>
+         * <dt>onFailure</dt>
+         * <dd>
+         * callback to execute when the script load operation fails
+         * The callback receives an object back with the following
+         * data:
+         * <dl>
+         * <dt>win</dt>
+         * <dd>the window the script(s) were inserted into</dd>
+         * <dt>data</dt>
+         * <dd>the data object passed in when the request was made</dd>
+         * <dt>nodes</dt>
+         * <dd>An array containing references to the nodes that were
+         * inserted successfully</dd>
+         * <dt>purge</dt>
+         * <dd>A function that, when executed, will remove any nodes
+         * that were inserted</dd>
+         * <dt>
+         * </dl>
+         * </dd>
+         * <dt>scope</dt>
+         * <dd>the execution context for the callbacks</dd>
+         * <dt>win</dt>
+         * <dd>a window other than the one the utility occupies</dd>
+         * <dt>autopurge</dt>
+         * <dd>
+         * setting to true will let the utilities cleanup routine purge 
+         * the script once loaded
+         * </dd>
+         * <dt>data</dt>
+         * <dd>
+         * data that is supplied to the callback when the script(s) are
+         * loaded.
+         * </dd>
+         * <dt>varName</dt>
+         * <dd>
+         * variable that should be available when a script is finished
+         * loading.  Used to help Safari 2.x and below with script load 
+         * detection.  The type of this property should match what was
+         * passed into the url parameter: if loading a single url, a
+         * string can be supplied.  If loading multiple scripts, you
+         * must supply an array that contains the variable name for
+         * each script.
+         * </dd>
+         * </dl>
+         * <pre>
+         * // assumes yahoo, dom, and event are already on the page
+         *   YAHOO.util.Get.script(
+         *   ["http://yui.yahooapis.com/2.3.1/build/dragdrop/dragdrop-min.js",
+         *    "http://yui.yahooapis.com/2.3.1/build/animation/animation-min.js"], {
+         *     onSuccess: function(o) {
+         *       new YAHOO.util.DDProxy("dd1"); // also new o.reference("dd1"); would work
+         *       this.log("won't cause error because YAHOO is the scope");
+         *       this.log(o.nodes.length === 2) // true
+         *       // o.purge(); // optionally remove the script nodes immediately
+         *     },
+         *     onFailure: function(o) {
+         *     },
+         *     data: "foo",
+         *     scope: YAHOO,
+         *     // win: otherframe // target another window/frame
+         *     autopurge: true // allow the utility to choose when to remove the nodes
+         *   });
+         * </pre>
+         * @return {tId: string} an object containing info about the transaction
+         */
+        script: function(url, opts) { return _queue("script", url, opts); },
+
+        /**
+         * Fetches and inserts one or more css link nodes into the 
+         * head of the current document or the document in a specified
+         * window.
+         * @method css
+         * @static
+         * @param url {string} the url or urls to the css file(s)
+         * @param opts Options: 
+         * <dl>
+         * <dt>onSuccess</dt>
+         * <dd>
+         * callback to execute when the css file(s) are finished loading
+         * The callback receives an object back with the following
+         * data:
+         * <dl>win</dl>
+         * <dd>the window the link nodes(s) were inserted into</dd>
+         * <dt>data</dt>
+         * <dd>the data object passed in when the request was made</dd>
+         * <dt>nodes</dt>
+         * <dd>An array containing references to the nodes that were
+         * inserted</dd>
+         * <dt>purge</dt>
+         * <dd>A function that, when executed, will remove the nodes
+         * that were inserted</dd>
+         * <dt>
+         * </dl>
+         * </dd>
+         * <dt>scope</dt>
+         * <dd>the execution context for the callbacks</dd>
+         * <dt>win</dt>
+         * <dd>a window other than the one the utility occupies</dd>
+         * <dt>data</dt>
+         * <dd>
+         * data that is supplied to the callbacks when the nodes(s) are
+         * loaded.
+         * </dd>
+         * </dl>
+         * <pre>
+         *      YAHOO.util.Get.css("http://yui.yahooapis.com/2.3.1/build/menu/assets/skins/sam/menu.css");
+         * </pre>
+         * <pre>
+         *      YAHOO.util.Get.css(["http://yui.yahooapis.com/2.3.1/build/menu/assets/skins/sam/menu.css",
+         * </pre>
+         * @return {tId: string} an object containing info about the transaction
+         */
+        css: function(url, opts) {
+            return _queue("css", url, opts); 
+        }
+    };
+}();
+
+YAHOO.register("get", YAHOO.util.Get, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/grids/README
===================================================================
--- trunk/root/static/yui/grids/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/grids/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,14 @@
 YUI Library - Grids - Release Notes
 
+Version 2.4.1
+
+No change
+
+
+Version 2.4.0
+
+  * No changes.
+
 Version 2.3.1
 
   * Fixed bug in 2.3.0 that transposed the columns in deeply-
@@ -58,4 +67,4 @@
   
 Version 0.10.0
 
-  * Initial release.
\ No newline at end of file
+  * Initial release.

Modified: trunk/root/static/yui/grids/grids-min.css
===================================================================
--- trunk/root/static/yui/grids/grids-min.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/grids/grids-min.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 body{text-align:center;}#ft{clear:both;}#doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.301em;min-width:750px;}#doc2{width:73.074em;*width:71.313em;}#doc3{margin:auto 10px;width:auto;}#doc4{width:74.923em;*width:73.117em;}.yui-b{position:relative;}.yui-b{_position:static;}#yui-main .yui-b{position:static;}#yui-main{width:100%;}.yui-t1 #yui-main,.yui-t2 #yui-main,.yui-t3 #yui-main{float:right;margin-left:-25em;}.yui-t4 #yui-main,.yui-t5 #yui-main,.yui-t6 #yui-main{float:left;margin-right:-25em;}.yui-t1 .yui-b{float:left;width:12.3207em;*width:12.0106em;}.yui-t1 #yui-main .yui-b{margin-left:13.3207em;*margin-left:13.0106em;}.yui-t2 .yui-b{float:left;width:13.8456em;*width:13.512em;}.yui-t2 #yui-main .yui-b{margin-left:14.8456em;*margin-left:14.512em;}.yui-t3 .yui-b{float:left;width:23.0759em;*width:22.52em;}.yui-t3 #yui-main .yui-b{margin-left:24.0759em;*margin-left:23.52em;}.yui-t4 .yui-b{floa!
 t:right;width:13.8456em;*width:13.512em;}.yui-t4 #yui-main .yui-b{margin-right:14.8456em;*margin-right:14.512em;}.yui-t5 .yui-b{float:right;width:18.4608em;*width:18.016em;}.yui-t5 #yui-main .yui-b{margin-right:19.4608em;*margin-right:19.016em;}.yui-t6 .yui-b{float:right;width:23.0759em;*width:22.52em;}.yui-t6 #yui-main .yui-b{margin-right:24.0759em;*margin-right:23.52em;}.yui-t7 #yui-main .yui-b{display:block;margin:0 0 1em 0;}#yui-main .yui-b{float:none;width:auto;}.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gb .yui-u,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{float:left;margin-left:2%;width:32%;}.yui-gb .yui-gb .yui-u,.yui-gb .yui-gc .yui-u{*margin-left:1.8%;_margin-left:4%;}.yui-g .yui-gb .yui-u{_margin-left:.8%;}.yui-gb .yui-u{float:right;}.yui-gb div.first{margin-left:0;float:left;}.yui-g .yui-gb div.first,.yui-gb .yui-gb div.first{*margin-right:0;*width:32%;_width:31.7%;}.yui-gb .yui-gc d!
 iv.first,.yui-gb .yui-gd div.first{*margin-right:0;}.yui-gb .y!
 ui-gd .y
ui-u{*width:66%;_width:61.2%;}.yui-gb .yui-gd div.first{*width:31%;_width:29.5%;}.yui-g .yui-gc .yui-u,.yui-gb .yui-gc .yui-u{width:32%;_float:right;margin-right:0;_margin-left:0;}.yui-gb .yui-gc div.first{width:66%;*float:left;*margin-left:0;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf .yui-u{margin:0;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf,.yui-gc .yui-u,.yui-gd .yui-g,.yui-g .yui-gc .yui-u,.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf .yui-g,.yui-gf .yui-u{float:right;}.yui-g .yui-gc div.first,.yui-g .yui-ge div.first,.yui-g div.first,.yui-gc div.first,.yui-gc div.first div.first,.yui-gd div.first,.yui-ge div.first,.yui-gf div.first{float:left;}.yui-g .yui-g .yui-u,.yui-gb .yui-g .yui-u,.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u,.yui-ge .yui-g .yui-u,.yui-gf .yui-g .yui-u{width:49%;*width:48.1%;*margin-left:0;}.yui-g .yui-g div.first{*margin:0;}.yui-gb .yui-g div.first{*margin-right:4%;_margin-right:1.3%;}.yui-gb .yui-gb!
  .yui-u{_margin-left:.7%;}.yui-gb .yui-g div.first,.yui-gb .yui-gb div.first{*margin-left:0;}.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u{*width:48.1%;*margin-left:0;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf{width:49.1%;}.yui-g .yui-gb div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first{margin-left:0;}.yui-g .yui-gc div.first,.yui-gc div.first,.yui-gd .yui-g,.yui-gd .yui-u{width:66%;}.yui-gd div.first,.yui-gb .yui-gd div.first{width:32%;}.yui-g .yui-gd div.first{_width:29.9%;}.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf div.first{width:24%;}.yui-gb .yui-ge div.yui-u,.yui-gb .yui-gf div.yui-u{float:right;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf div.first {float:left;}.yui-ge div.first,.yui-gf .yui-g,.yui-gf .yui-u{width:74.2%;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf div.first{*width:24%;_width:20%;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf .yui-u{*width:73.5%;_width:65.5%;}#bd:after,.yui-g:after,.yui-gb:after!
 ,.yui-gc:after,.yui-gd:after,.yui-ge:after,.yui-gf:after{conte!
 nt:".";d
isplay:block;height:0;clear:both;visibility:hidden;}#bd,.yui-g,.yui-gb,.yui-gc,.yui-gd,.yui-ge,.yui-gf{zoom:1;}.yui-gb .yui-u{float:left;}
\ No newline at end of file

Modified: trunk/root/static/yui/grids/grids.css
===================================================================
--- trunk/root/static/yui/grids/grids.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/grids/grids.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* for all templates and grids */
 body{text-align:center;}

Modified: trunk/root/static/yui/history/README
===================================================================
--- trunk/root/static/yui/history/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/history/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,9 +1,21 @@
 YUI Library - History - Release Notes
 
-2.3.1
+2.4.1
+No change
 
-  * No Change
+2.4.0
 
+  * Added onReady method (similar to the Event utility's DOMReady method)
+  * Fixed SourceForge bugs 1794347, 1490803, 1490818 and 1420015.
+  * Starting with YUI 2.4.0, the necessary markup (see documentation) must be
+    statically created in the HTML document, and passed to the Browser History
+    Manager initialize method. This has two major benefits over older versions:
+      - The Browser History Manager may be initialized much later than before,
+        allowing for the corresponding <script> tag to be embedded at the
+        bottom of the page (which is good for performance)
+      - IE had a tendency to "forget" part or all of the history when returning
+        to a page.
+
 2.3.0
 
   * The Browser History Manager now works on IE if used inside an IFrame

Deleted: trunk/root/static/yui/history/history-beta-debug.js
===================================================================
--- trunk/root/static/yui/history/history-beta-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/history/history-beta-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,768 +0,0 @@
-/*
-Copyright (c) 2007, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
-*/
-/**
- * The Browser History Manager provides the ability to use the
- * back/forward navigation buttons in a DHTML application. It also allows
- * a DHTML application to be bookmarked in a specific state.
- *
- * @module history
- * @requires yahoo,event
- * @namespace YAHOO.util
- * @title Browser History Manager
- * @experimental
- */
-
-/**
- * The History class provides the ability to use the back/forward navigation
- * buttons in a DHTML application. It also allows a DHTML application to
- * be bookmarked in a specific state.
- *
- * @class History
- * @constructor
- */
-YAHOO.util.History = ( function () {
-
-    /**
-     * Our hidden IFrame used to store the browsing history.
-     *
-     * @property _iframe
-     * @type HTMLIFrameElement
-     * @default null
-     * @private
-     */
-    var _iframe = null;
-
-    /**
-     * INPUT field (with type="hidden" or type="text") or TEXTAREA.
-     * This field keeps the value of the initial state, current state
-     * the list of all states across pages within a single browser session.
-     *
-     * @property _storageField
-     * @type HTMLInputElement|HTMLTextAreaElement
-     * @default null
-     * @private
-     */
-    var _storageField = null;
-
-    /**
-     * Flag used to tell whether YAHOO.util.History.initialize has been called.
-     *
-     * @property _initialized
-     * @type boolean
-     * @default false
-     * @private
-     */
-    var _initialized = false;
-
-    /**
-     * Flag used to tell whether the storage field is ready to be used.
-     *
-     * @property _storageFieldReady
-     * @type boolean
-     * @default false
-     * @private
-     */
-    var _storageFieldReady = false;
-
-    /**
-     * Flag used to tell whether the Browser History Manager is ready.
-     *
-     * @property _bhmReady
-     * @type boolean
-     * @default false
-     * @private
-     */
-    var _bhmReady = false;
-
-    /**
-     * List of registered modules.
-     *
-     * @property _modules
-     * @type array
-     * @default []
-     * @private
-     */
-    var _modules = [];
-
-    /**
-     * List of fully qualified states. This is used only by Safari.
-     *
-     * @property _fqstates
-     * @type array
-     * @default []
-     * @private
-     */
-    var _fqstates = [];
-
-    /**
-     * Trims a string.
-     *
-     * @method _trim
-     * @param {string} str The string to be trimmed.
-     * @return {string} The trimmed string
-     * @private
-     */
-    function _trim( str ) {
-        return str.replace( /^\s*(\S*(\s+\S+)*)\s*$/, "$1" );
-    }
-
-    /**
-     * location.hash is a bit buggy on Opera. I have seen instances where
-     * navigating the history using the back/forward buttons, and hence
-     * changing the URL, would not change location.hash. That's ok, the
-     * implementation of an equivalent is trivial.
-     *
-     * @method _getHash
-     * @return {string} The hash portion of the document's location
-     * @private
-     */
-    function _getHash() {
-
-        var href;
-        var i;
-
-        href = top.location.href;
-        i = href.indexOf( "#" );
-        return i >= 0 ? href.substr( i + 1 ) : null;
-    }
-
-    /**
-     * Stores all the registered modules' initial state and current state.
-     * On Safari, we also store all the fully qualified states visited by
-     * the application within a single browser session. The storage takes
-     * place in the form field specified during initialization.
-     *
-     * @method _storeStates
-     * @private
-     */
-    function _storeStates() {
-
-        var moduleName;
-        var moduleObj;
-        var initialStates = [];
-        var currentStates = [];
-
-        for ( moduleName in _modules ) {
-            if ( YAHOO.lang.hasOwnProperty( _modules, moduleName ) ) {
-                moduleObj = _modules[moduleName];
-                initialStates.push( moduleName + "=" + moduleObj.initialState );
-                currentStates.push( moduleName + "=" + moduleObj.currentState );
-            }
-        }
-
-        _storageField.value = initialStates.join( "&" ) + "|" + currentStates.join( "&" );
-
-        if ( YAHOO.env.ua.webkit ) {
-            _storageField.value += "|" + _fqstates.join( "," );
-        }
-    }
-
-    /**
-     * Sets the new currentState attribute of all modules depending on the new
-     * fully qualified state. Also notifies the modules which current state has
-     * changed.
-     *
-     * @method _handleFQStateChange
-     * @param {string} fqstate Fully qualified state
-     * @private
-     */
-    function _handleFQStateChange( fqstate ) {
-
-        var i;
-        var len;
-        var moduleName;
-        var moduleObj;
-        var modules;
-        var states;
-        var tokens;
-        var currentState;
-
-        if ( !fqstate ) {
-            // Notifies all modules
-            for ( moduleName in _modules ) {
-                if ( YAHOO.lang.hasOwnProperty( _modules, moduleName ) ) {
-                    moduleObj = _modules[moduleName];
-                    moduleObj.currentState = moduleObj.initialState;
-                    moduleObj.onStateChange( unescape( moduleObj.currentState ) );
-                }
-            }
-            return;
-        }
-
-        modules = [];
-        states = fqstate.split( "&" );
-        for ( i = 0, len = states.length ; i < len ; i++ ) {
-            tokens = states[i].split( "=" );
-            if ( tokens.length === 2 ) {
-                moduleName = tokens[0];
-                currentState = tokens[1];
-                modules[moduleName] = currentState;
-            }
-        }
-
-        for ( moduleName in _modules ) {
-            if ( YAHOO.lang.hasOwnProperty( _modules, moduleName ) ) {
-                moduleObj = _modules[moduleName];
-                currentState = modules[moduleName];
-                if ( !currentState || moduleObj.currentState !== currentState ) {
-                    moduleObj.currentState = currentState || moduleObj.initialState;
-                    moduleObj.onStateChange( unescape( moduleObj.currentState ) );
-                }
-            }
-        }
-    }
-
-    /**
-     * Periodically checks whether our internal IFrame is ready to be used.
-     *
-     * @method _checkIframeLoaded
-     * @private
-     */
-    function _checkIframeLoaded() {
-
-        var doc;
-        var elem;
-        var fqstate;
-
-        if ( !_iframe.contentWindow || !_iframe.contentWindow.document ) {
-            // Check again in 10 msec...
-            setTimeout( _checkIframeLoaded, 10 );
-            return;
-        }
-
-        // Start the thread that will have the responsibility to
-        // periodically check whether a navigate operation has been
-        // requested on the main window. This will happen when
-        // YAHOO.util.History.navigate has been called or after
-        // the user has hit the back/forward button.
-
-        doc = _iframe.contentWindow.document;
-        elem = doc.getElementById( "state" );
-        // We must use innerText, and not innerHTML because our string contains
-        // the "&" character (which would end up being escaped as "&") and
-        // the string comparison would fail...
-        fqstate = elem ? elem.innerText : null;
-
-        setInterval( function () {
-
-            var newfqstate;
-            var hash;
-            var states;
-            var moduleName;
-            var moduleObj;
-
-            doc = _iframe.contentWindow.document;
-            elem = doc.getElementById( "state" );
-            // See my comment above about using innerText instead of innerHTML...
-            newfqstate = elem ? elem.innerText : null;
-
-            if ( newfqstate !== fqstate ) {
-                fqstate = newfqstate;
-                _handleFQStateChange( fqstate );
-
-                if ( !fqstate ) {
-                    states = [];
-                    for ( moduleName in _modules ) {
-                        if ( YAHOO.lang.hasOwnProperty( _modules, moduleName ) ) {
-                            moduleObj = _modules[moduleName];
-                            states.push( moduleName + "=" + moduleObj.initialState );
-                        }
-                    }
-                    hash = states.join( "&" );
-                } else {
-                    hash = fqstate;
-                }
-
-                // Allow the state to be bookmarked by setting the top window's
-                // URL fragment identifier. Note that here, we are on IE, and
-                // IE does not touch the browser history when setting the hash
-                // (unlike all the other browsers). I used to write:
-                //     top.location.replace( "#" + hash );
-                // but this had a side effect when the page was not the top frame.
-                top.location.hash = hash;
-
-                _storeStates();
-            }
-        }, 50 );
-
-        _bhmReady = true;
-
-        YAHOO.util.History.onLoadEvent.fire();
-    }
-
-    /**
-     * Finish up the initialization of the Browser History Manager.
-     *
-     * @method _initialize
-     * @private
-     */
-    function _initialize() {
-
-        var i;
-        var len;
-        var parts;
-        var tokens;
-        var moduleName;
-        var moduleObj;
-        var initialStates;
-        var initialState;
-        var currentStates;
-        var currentState;
-        var counter;
-        var hash;
-
-        _storageField = document.getElementById( "yui_hist_field" );
-
-        // Decode the content of our storage field...
-        parts = _storageField.value.split( "|" );
-
-        if ( parts.length > 1 ) {
-
-            initialStates = parts[0].split( "&" );
-            for ( i = 0, len = initialStates.length ; i < len ; i++ ) {
-                tokens = initialStates[i].split( "=" );
-                if ( tokens.length === 2 ) {
-                    moduleName = tokens[0];
-                    initialState = tokens[1];
-                    moduleObj = _modules[moduleName];
-                    if ( moduleObj ) {
-                        moduleObj.initialState = initialState;
-                    }
-                }
-            }
-
-            currentStates = parts[1].split( "&" );
-            for ( i = 0, len = currentStates.length ; i < len ; i++ ) {
-                tokens = currentStates[i].split( "=" );
-                if ( tokens.length >= 2 ) {
-                    moduleName = tokens[0];
-                    currentState = tokens[1];
-                    moduleObj = _modules[moduleName];
-                    if ( moduleObj ) {
-                        moduleObj.currentState = currentState;
-                    }
-                }
-            }
-        }
-
-        if ( parts.length > 2 ) {
-            _fqstates = parts[2].split( "," );
-        }
-
-        _storageFieldReady = true;
-
-        if ( YAHOO.env.ua.ie ) {
-
-            _iframe = document.getElementById( "yui_hist_iframe" );
-            _checkIframeLoaded();
-
-        } else {
-
-            // Start the thread that will have the responsibility to
-            // periodically check whether a navigate operation has been
-            // requested on the main window. This will happen when
-            // YAHOO.util.History.navigate has been called or after
-            // the user has hit the back/forward button.
-
-            // On Safari 1.x and 2.0, the only way to catch a back/forward
-            // operation is to watch history.length... We basically exploit
-            // what I consider to be a bug (history.length is not supposed
-            // to change when going back/forward in the history...) This is
-            // why, in the following thread, we first compare the hash,
-            // because the hash thing will be fixed in the next major
-            // version of Safari. So even if they fix the history.length
-            // bug, all this will still work!
-            counter = history.length;
-
-            // On Gecko and Opera, we just need to watch the hash...
-            hash = _getHash();
-
-            setInterval( function () {
-
-                var state;
-                var newHash;
-                var newCounter;
-
-                newHash = _getHash();
-                newCounter = history.length;
-                if ( newHash !== hash ) {
-                    hash = newHash;
-                    counter = newCounter;
-                    _handleFQStateChange( hash );
-                    _storeStates();
-                } else if ( newCounter !== counter ) {
-                    // If we ever get here, we should be on Safari...
-                    hash = newHash;
-                    counter = newCounter;
-                    state = _fqstates[counter - 1];
-                    _handleFQStateChange( state );
-                    _storeStates();
-                }
-            }, 50 );
-
-            _bhmReady = true;
-
-            YAHOO.util.History.onLoadEvent.fire();
-        }
-    }
-
-    return {
-
-        /**
-         * Fired when the Browser History Manager is ready.
-         *
-         * @event onLoadEvent
-         */
-        onLoadEvent: new YAHOO.util.CustomEvent( "onLoad" ),
-
-        /**
-         * Registers a new module.
-         *
-         * @method register
-         * @param {string} module Non-empty string uniquely identifying the
-         *     module you wish to register.
-         * @param {string} initialState The initial state of the specified
-         *     module corresponding to its earliest history entry.
-         * @param {function} onStateChange Callback called when the
-         *     state of the specified module has changed.
-         * @param {object} obj An arbitrary object that will be passed as a
-         *     parameter to the handler.
-         * @param {boolean} override If true, the obj passed in becomes the
-         *     execution scope of the listener.
-         */
-        register: function ( module, initialState, onStateChange, obj, override ) {
-
-            var scope;
-            var wrappedFn;
-
-            if ( typeof module !== "string" || _trim( module ) === "" ||
-                 typeof initialState !== "string" ||
-                 typeof onStateChange !== "function" ) {
-                throw new Error( "Missing or invalid argument passed to YAHOO.util.History.register" );
-            }
-
-            if ( _modules[module] ) {
-                // Here, we used to throw an exception. However, users have
-                // complained about this behavior, so we now just return.
-                return;
-            }
-
-            // Note: A module CANNOT be registered after calling
-            // YAHOO.util.History.initialize. Indeed, we set the initial state
-            // of each registered module in YAHOO.util.History.initialize.
-            // If you could register a module after initializing the Browser
-            // History Manager, you would not read the correct state using
-            // YAHOO.util.History.getCurrentState when coming back to the
-            // page using the back button.
-            if ( _initialized ) {
-                throw new Error( "All modules must be registered before calling YAHOO.util.History.initialize" );
-            }
-
-            // Make sure the strings passed in do not contain our separators "," and "|"
-            module = escape( module );
-            initialState = escape( initialState );
-
-            // If the user chooses to override the scope, we use the
-            // custom object passed in as the execution scope.
-            scope = null;
-            if ( override === true ) {
-                scope = obj;
-            } else {
-                scope = override;
-            }
-
-            wrappedFn = function ( state ) {
-                return onStateChange.call( scope, state, obj );
-            };
-
-            _modules[module] = {
-                name: module,
-                initialState: initialState,
-                currentState: initialState,
-                onStateChange: wrappedFn
-            };
-        },
-
-        /**
-         * Initializes the Browser History Manager. Call this method
-         * from a script block located right after the opening body tag.
-         *
-         * @method initialize
-         * @param {string} iframeTarget Optional - Path to an existing
-         *     HTML document accessible from the same domain. If not
-         *     specified, defaults to "blank.html". This is only useful
-         *     if you use https.
-         * @public
-         */
-        initialize: function ( iframeTarget ) {
-
-            // Return if the browser history manager has already been initialized
-            if ( _initialized ) {
-                return;
-            }
-
-            if ( !iframeTarget ) {
-                iframeTarget = "blank.html";
-            }
-
-            if ( typeof iframeTarget !== "string" || _trim( iframeTarget ) === "" ) {
-                throw new Error( "Invalid argument passed to YAHOO.util.History.initialize" );
-            }
-
-            document.write( '<input type="hidden" id="yui_hist_field">' );
-
-            if ( YAHOO.env.ua.ie ) {
-                if ( location.protocol === "https:" ) {
-                    // If we use https, we MUST point the IFrame to a valid
-                    // document on the same server. If we don't, we will get
-                    // a warning (do you want to display non secure items?)
-                    document.write( '<iframe id="yui_hist_iframe" src="' + iframeTarget + '" style="position:absolute;visibility:hidden;"></iframe>' );
-                } else {
-                    // This trick allows us to do without having to download
-                    // the asset, saving one HTTP request...
-                    document.write( '<iframe id="yui_hist_iframe" src="javascript:document.open();document.write("' + new Date().getTime() + '");document.close();" style="position:absolute;visibility:hidden;"></iframe>' );
-                }
-            }
-
-            // We have to wait for the window's onload handler. Otherwise, our
-            // hidden form field will always be empty (i.e. the browser won't
-            // have had enough time to restore the session)
-            YAHOO.util.Event.addListener( window, "load", _initialize );
-
-            _initialized = true;
-        },
-
-        /**
-         * Call this method when you want to store a new entry in the browser's history.
-         *
-         * @method navigate
-         * @param {string} module Non-empty string representing your module.
-         * @param {string} state String representing the new state of the specified module.
-         * @return {boolean} Indicates whether the new state was successfully added to the history.
-         * @public
-         */
-        navigate: function ( module, state ) {
-
-            var currentStates;
-            var moduleName;
-            var moduleObj;
-            var currentState;
-            var states;
-
-            if ( typeof module !== "string" || typeof state !== "string" ) {
-                throw new Error( "Missing or invalid argument passed to YAHOO.util.History.navigate" );
-            }
-
-            states = {};
-            states[module] = state;
-
-            return YAHOO.util.History.multiNavigate( states );
-        },
-
-        /**
-         * Call this method when you want to store a new entry in the browser's history.
-         *
-         * @method multiNavigate
-         * @param {object} states Associative array of module-state pairs to set simultaneously.
-         * @return {boolean} Indicates whether the new state was successfully added to the history.
-         * @public
-         */
-        multiNavigate: function ( states ) {
-
-            var currentStates;
-            var moduleName;
-            var moduleObj;
-            var currentState;
-            var fqstate;
-            var html;
-            var doc;
-
-            if ( typeof states !== "object" ) {
-                throw new Error( "Missing or invalid argument passed to YAHOO.util.History.multiNavigate" );
-            }
-
-            if ( !_bhmReady ) {
-                throw new Error( "The Browser History Manager is not initialized" );
-            }
-
-            for ( moduleName in states ) {
-                if ( !_modules[moduleName] ) {
-                    throw new Error( "The following module has not been registered: " + moduleName );
-                }
-            }
-
-            // Generate our new full state string mod1=xxx&mod2=yyy
-            currentStates = [];
-
-            for ( moduleName in _modules ) {
-                if ( YAHOO.lang.hasOwnProperty( _modules, moduleName ) ) {
-                    moduleObj = _modules[moduleName];
-                    if ( YAHOO.lang.hasOwnProperty( states, moduleName ) ) {
-                        currentState = states[moduleName];
-                    } else {
-                        currentState = moduleObj.currentState;
-                    }
-
-                    // Make sure the strings passed in do not contain our separators "," and "|"
-                    moduleName = escape( moduleName );
-                    currentState = escape( currentState );
-
-                    currentStates.push( moduleName + "=" + currentState );
-                }
-            }
-
-            fqstate = currentStates.join( "&" );
-
-            if ( YAHOO.env.ua.ie ) {
-
-                html = '<html><body><div id="state">' + fqstate + '</div></body></html>';
-                try {
-                    doc = _iframe.contentWindow.document;
-                    doc.open();
-                    doc.write( html );
-                    doc.close();
-                } catch ( e ) {
-                    return false;
-                }
-
-            } else {
-
-                // Known bug: On Safari 1.x and 2.0, if you have tab browsing
-                // enabled, Safari will show an endless loading icon in the
-                // tab. This has apparently been fixed in recent WebKit builds.
-                // One work around found by Dav Glass is to submit a form that
-                // points to the same document. This indeed works on Safari 1.x
-                // and 2.0 but creates bigger problems on WebKit. So for now,
-                // we'll consider this an acceptable bug, and hope that Apple
-                // comes out with their next version of Safari very soon.
-                top.location.hash = fqstate;
-                if ( YAHOO.env.ua.webkit ) {
-                    // The following two lines are only useful for Safari 1.x
-                    // and 2.0. Recent nightly builds of WebKit do not require
-                    // that, but unfortunately, it is not easy to differentiate
-                    // between the two. Once Safari 2.0 departs the A-grade
-                    // list, we can remove the following two lines...
-                    _fqstates[history.length] = fqstate;
-                    _storeStates();
-                }
-
-            }
-
-            return true;
-        },
-
-        /**
-         * Returns the current state of the specified module.
-         *
-         * @method getCurrentState
-         * @param {string} module Non-empty string representing your module.
-         * @return {string} The current state of the specified module.
-         * @public
-         */
-        getCurrentState: function ( module ) {
-
-            var moduleObj;
-
-            if ( typeof module !== "string" ) {
-                throw new Error( "Missing or invalid argument passed to YAHOO.util.History.getCurrentState" );
-            }
-
-            if ( !_storageFieldReady ) {
-                throw new Error( "The Browser History Manager is not initialized" );
-            }
-
-            moduleObj = _modules[module];
-            if ( !moduleObj ) {
-                throw new Error( "No such registered module: " + module );
-            }
-
-            return unescape( moduleObj.currentState );
-        },
-
-        /**
-         * Returns the state of a module according to the URL fragment
-         * identifier. This method is useful to initialize your modules
-         * if your application was bookmarked from a particular state.
-         *
-         * @method getBookmarkedState
-         * @param {string} module Non-empty string representing your module.
-         * @return {string} The bookmarked state of the specified module.
-         * @public
-         */
-        getBookmarkedState: function ( module ) {
-
-            var i;
-            var len;
-            var hash;
-            var states;
-            var tokens;
-            var moduleName;
-
-            if ( typeof module !== "string" ) {
-                throw new Error( "Missing or invalid argument passed to YAHOO.util.History.getBookmarkedState" );
-            }
-
-            hash = top.location.hash.substr(1);
-            states = hash.split( "&" );
-            for ( i = 0, len = states.length ; i < len ; i++ ) {
-                tokens = states[i].split( "=" );
-                if ( tokens.length === 2 ) {
-                    moduleName = tokens[0];
-                    if ( moduleName === module ) {
-                        return unescape( tokens[1] );
-                    }
-                }
-            }
-
-            return null;
-        },
-
-        /**
-         * Returns the value of the specified query string parameter.
-         * This method is not used internally by the Browser History Manager.
-         * However, it is provided here as a helper since many applications
-         * using the Browser History Manager will want to read the value of
-         * url parameters to initialize themselves.
-         *
-         * @method getQueryStringParameter
-         * @param {string} paramName Name of the parameter we want to look up.
-         * @param {string} queryString Optional URL to look at. If not specified,
-         *     this method uses the URL in the address bar.
-         * @return {string} The value of the specified parameter, or null.
-         * @public
-         */
-        getQueryStringParameter: function ( paramName, url ) {
-
-            var i;
-            var len;
-            var idx;
-            var queryString;
-            var params;
-            var tokens;
-
-            url = url || top.location.href;
-
-            idx = url.indexOf( "?" );
-            queryString = idx >= 0 ? url.substr( idx + 1 ) : url;
-            params = queryString.split( "&" );
-
-            for ( i = 0, len = params.length ; i < len ; i++ ) {
-                tokens = params[i].split( "=" );
-                if ( tokens.length >= 2 ) {
-                    if ( tokens[0] === paramName ) {
-                        return unescape( tokens[1] );
-                    }
-                }
-            }
-
-            return null;
-        }
-
-    };
-
-} )();
-YAHOO.register("history", YAHOO.util.History, {version: "2.3.1", build: "541"});

Deleted: trunk/root/static/yui/history/history-beta-min.js
===================================================================
--- trunk/root/static/yui/history/history-beta-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/history/history-beta-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,7 +0,0 @@
-/*
-Copyright (c) 2007, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
-*/
-YAHOO.util.History=(function(){var L=null;var G=null;var H=false;var E=false;var B=false;var D=[];var C=[];function M(N){return N.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1");}function K(){var N;var O;N=top.location.href;O=N.indexOf("#");return O>=0?N.substr(O+1):null;}function A(){var O;var P;var Q=[];var N=[];for(O in D){if(YAHOO.lang.hasOwnProperty(D,O)){P=D[O];Q.push(O+"="+P.initialState);N.push(O+"="+P.currentState);}}G.value=Q.join("&")+"|"+N.join("&");if(YAHOO.env.ua.webkit){G.value+="|"+C.join(",");}}function J(N){var S;var T;var O;var Q;var R;var V;var U;var P;if(!N){for(O in D){if(YAHOO.lang.hasOwnProperty(D,O)){Q=D[O];Q.currentState=Q.initialState;Q.onStateChange(unescape(Q.currentState));}}return ;}R=[];V=N.split("&");for(S=0,T=V.length;S<T;S++){U=V[S].split("=");if(U.length===2){O=U[0];P=U[1];R[O]=P;}}for(O in D){if(YAHOO.lang.hasOwnProperty(D,O)){Q=D[O];P=R[O];if(!P||Q.currentState!==P){Q.currentState=P||Q.initialState;Q.onStateChange(unescape(Q.currentState));}}}}f!
 unction I(){var P;var N;var O;if(!L.contentWindow||!L.contentWindow.document){setTimeout(I,10);return ;}P=L.contentWindow.document;N=P.getElementById("state");O=N?N.innerText:null;setInterval(function(){var T;var U;var Q;var R;var S;P=L.contentWindow.document;N=P.getElementById("state");T=N?N.innerText:null;if(T!==O){O=T;J(O);if(!O){Q=[];for(R in D){if(YAHOO.lang.hasOwnProperty(D,R)){S=D[R];Q.push(R+"="+S.initialState);}}U=Q.join("&");}else{U=O;}top.location.hash=U;A();}},50);B=true;YAHOO.util.History.onLoadEvent.fire();}function F(){var U;var W;var S;var Y;var O;var Q;var X;var R;var V;var P;var N;var T;G=document.getElementById("yui_hist_field");S=G.value.split("|");if(S.length>1){X=S[0].split("&");for(U=0,W=X.length;U<W;U++){Y=X[U].split("=");if(Y.length===2){O=Y[0];R=Y[1];Q=D[O];if(Q){Q.initialState=R;}}}V=S[1].split("&");for(U=0,W=V.length;U<W;U++){Y=V[U].split("=");if(Y.length>=2){O=Y[0];P=Y[1];Q=D[O];if(Q){Q.currentState=P;}}}}if(S.length>2){C=S[2].split(",");}E=true!
 ;if(YAHOO.env.ua.ie){L=document.getElementById("yui_hist_ifram!
 e");I();
}else{N=history.length;T=K();setInterval(function(){var b;var Z;var a;Z=K();a=history.length;if(Z!==T){T=Z;N=a;J(T);A();}else{if(a!==N){T=Z;N=a;b=C[N-1];J(b);A();}}},50);B=true;YAHOO.util.History.onLoadEvent.fire();}}return{onLoadEvent:new YAHOO.util.CustomEvent("onLoad"),register:function(Q,N,S,T,P){var R;var O;if(typeof Q!=="string"||M(Q)===""||typeof N!=="string"||typeof S!=="function"){throw new Error("Missing or invalid argument passed to YAHOO.util.History.register");}if(D[Q]){return ;}if(H){throw new Error("All modules must be registered before calling YAHOO.util.History.initialize");}Q=escape(Q);N=escape(N);R=null;if(P===true){R=T;}else{R=P;}O=function(U){return S.call(R,U,T);};D[Q]={name:Q,initialState:N,currentState:N,onStateChange:O};},initialize:function(N){if(H){return ;}if(!N){N="blank.html";}if(typeof N!=="string"||M(N)===""){throw new Error("Invalid argument passed to YAHOO.util.History.initialize");}document.write("<input type=\"hidden\" id=\"yui_hist_field\!
 ">");if(YAHOO.env.ua.ie){if(location.protocol==="https:"){document.write("<iframe id=\"yui_hist_iframe\" src=\""+N+"\" style=\"position:absolute;visibility:hidden;\"></iframe>");}else{document.write("<iframe id=\"yui_hist_iframe\" src=\"javascript:document.open();document.write(""+new Date().getTime()+"");document.close();\" style=\"position:absolute;visibility:hidden;\"></iframe>");}}YAHOO.util.Event.addListener(window,"load",F);H=true;},navigate:function(Q,T){var O;var P;var S;var R;var N;if(typeof Q!=="string"||typeof T!=="string"){throw new Error("Missing or invalid argument passed to YAHOO.util.History.navigate");}N={};N[Q]=T;return YAHOO.util.History.multiNavigate(N);},multiNavigate:function(V){var S;var O;var Q;var P;var N;var R;var U;if(typeof V!=="object"){throw new Error("Missing or invalid argument passed to YAHOO.util.History.multiNavigate");}if(!B){throw new Error("The Browser History Manager is not initialized");}for(O in V){if(!D[O]){throw new Error!
 ("The following module has not been registered: "+O);}}S=[];fo!
 r(O in D
){if(YAHOO.lang.hasOwnProperty(D,O)){Q=D[O];if(YAHOO.lang.hasOwnProperty(V,O)){P=V[O];}else{P=Q.currentState;}O=escape(O);P=escape(P);S.push(O+"="+P);}}N=S.join("&");if(YAHOO.env.ua.ie){R="<html><body><div id=\"state\">"+N+"</div></body></html>";try{U=L.contentWindow.document;U.open();U.write(R);U.close();}catch(T){return false;}}else{top.location.hash=N;if(YAHOO.env.ua.webkit){C[history.length]=N;A();}}return true;},getCurrentState:function(N){var O;if(typeof N!=="string"){throw new Error("Missing or invalid argument passed to YAHOO.util.History.getCurrentState");}if(!E){throw new Error("The Browser History Manager is not initialized");}O=D[N];if(!O){throw new Error("No such registered module: "+N);}return unescape(O.currentState);},getBookmarkedState:function(R){var Q;var N;var T;var O;var S;var P;if(typeof R!=="string"){throw new Error("Missing or invalid argument passed to YAHOO.util.History.getBookmarkedState");}T=top.location.hash.substr(1);O=T.split("&");for(Q=0,N=O.l!
 ength;Q<N;Q++){S=O[Q].split("=");if(S.length===2){P=S[0];if(P===R){return unescape(S[1]);}}}return null;},getQueryStringParameter:function(S,P){var Q;var O;var N;var U;var T;var R;P=P||top.location.href;N=P.indexOf("?");U=N>=0?P.substr(N+1):P;T=U.split("&");for(Q=0,O=T.length;Q<O;Q++){R=T[Q].split("=");if(R.length>=2){if(R[0]===S){return unescape(R[1]);}}}return null;}};})();YAHOO.register("history",YAHOO.util.History,{version:"2.3.1",build:"541"});
\ No newline at end of file

Deleted: trunk/root/static/yui/history/history-beta.js
===================================================================
--- trunk/root/static/yui/history/history-beta.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/history/history-beta.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,768 +0,0 @@
-/*
-Copyright (c) 2007, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
-*/
-/**
- * The Browser History Manager provides the ability to use the
- * back/forward navigation buttons in a DHTML application. It also allows
- * a DHTML application to be bookmarked in a specific state.
- *
- * @module history
- * @requires yahoo,event
- * @namespace YAHOO.util
- * @title Browser History Manager
- * @experimental
- */
-
-/**
- * The History class provides the ability to use the back/forward navigation
- * buttons in a DHTML application. It also allows a DHTML application to
- * be bookmarked in a specific state.
- *
- * @class History
- * @constructor
- */
-YAHOO.util.History = ( function () {
-
-    /**
-     * Our hidden IFrame used to store the browsing history.
-     *
-     * @property _iframe
-     * @type HTMLIFrameElement
-     * @default null
-     * @private
-     */
-    var _iframe = null;
-
-    /**
-     * INPUT field (with type="hidden" or type="text") or TEXTAREA.
-     * This field keeps the value of the initial state, current state
-     * the list of all states across pages within a single browser session.
-     *
-     * @property _storageField
-     * @type HTMLInputElement|HTMLTextAreaElement
-     * @default null
-     * @private
-     */
-    var _storageField = null;
-
-    /**
-     * Flag used to tell whether YAHOO.util.History.initialize has been called.
-     *
-     * @property _initialized
-     * @type boolean
-     * @default false
-     * @private
-     */
-    var _initialized = false;
-
-    /**
-     * Flag used to tell whether the storage field is ready to be used.
-     *
-     * @property _storageFieldReady
-     * @type boolean
-     * @default false
-     * @private
-     */
-    var _storageFieldReady = false;
-
-    /**
-     * Flag used to tell whether the Browser History Manager is ready.
-     *
-     * @property _bhmReady
-     * @type boolean
-     * @default false
-     * @private
-     */
-    var _bhmReady = false;
-
-    /**
-     * List of registered modules.
-     *
-     * @property _modules
-     * @type array
-     * @default []
-     * @private
-     */
-    var _modules = [];
-
-    /**
-     * List of fully qualified states. This is used only by Safari.
-     *
-     * @property _fqstates
-     * @type array
-     * @default []
-     * @private
-     */
-    var _fqstates = [];
-
-    /**
-     * Trims a string.
-     *
-     * @method _trim
-     * @param {string} str The string to be trimmed.
-     * @return {string} The trimmed string
-     * @private
-     */
-    function _trim( str ) {
-        return str.replace( /^\s*(\S*(\s+\S+)*)\s*$/, "$1" );
-    }
-
-    /**
-     * location.hash is a bit buggy on Opera. I have seen instances where
-     * navigating the history using the back/forward buttons, and hence
-     * changing the URL, would not change location.hash. That's ok, the
-     * implementation of an equivalent is trivial.
-     *
-     * @method _getHash
-     * @return {string} The hash portion of the document's location
-     * @private
-     */
-    function _getHash() {
-
-        var href;
-        var i;
-
-        href = top.location.href;
-        i = href.indexOf( "#" );
-        return i >= 0 ? href.substr( i + 1 ) : null;
-    }
-
-    /**
-     * Stores all the registered modules' initial state and current state.
-     * On Safari, we also store all the fully qualified states visited by
-     * the application within a single browser session. The storage takes
-     * place in the form field specified during initialization.
-     *
-     * @method _storeStates
-     * @private
-     */
-    function _storeStates() {
-
-        var moduleName;
-        var moduleObj;
-        var initialStates = [];
-        var currentStates = [];
-
-        for ( moduleName in _modules ) {
-            if ( YAHOO.lang.hasOwnProperty( _modules, moduleName ) ) {
-                moduleObj = _modules[moduleName];
-                initialStates.push( moduleName + "=" + moduleObj.initialState );
-                currentStates.push( moduleName + "=" + moduleObj.currentState );
-            }
-        }
-
-        _storageField.value = initialStates.join( "&" ) + "|" + currentStates.join( "&" );
-
-        if ( YAHOO.env.ua.webkit ) {
-            _storageField.value += "|" + _fqstates.join( "," );
-        }
-    }
-
-    /**
-     * Sets the new currentState attribute of all modules depending on the new
-     * fully qualified state. Also notifies the modules which current state has
-     * changed.
-     *
-     * @method _handleFQStateChange
-     * @param {string} fqstate Fully qualified state
-     * @private
-     */
-    function _handleFQStateChange( fqstate ) {
-
-        var i;
-        var len;
-        var moduleName;
-        var moduleObj;
-        var modules;
-        var states;
-        var tokens;
-        var currentState;
-
-        if ( !fqstate ) {
-            // Notifies all modules
-            for ( moduleName in _modules ) {
-                if ( YAHOO.lang.hasOwnProperty( _modules, moduleName ) ) {
-                    moduleObj = _modules[moduleName];
-                    moduleObj.currentState = moduleObj.initialState;
-                    moduleObj.onStateChange( unescape( moduleObj.currentState ) );
-                }
-            }
-            return;
-        }
-
-        modules = [];
-        states = fqstate.split( "&" );
-        for ( i = 0, len = states.length ; i < len ; i++ ) {
-            tokens = states[i].split( "=" );
-            if ( tokens.length === 2 ) {
-                moduleName = tokens[0];
-                currentState = tokens[1];
-                modules[moduleName] = currentState;
-            }
-        }
-
-        for ( moduleName in _modules ) {
-            if ( YAHOO.lang.hasOwnProperty( _modules, moduleName ) ) {
-                moduleObj = _modules[moduleName];
-                currentState = modules[moduleName];
-                if ( !currentState || moduleObj.currentState !== currentState ) {
-                    moduleObj.currentState = currentState || moduleObj.initialState;
-                    moduleObj.onStateChange( unescape( moduleObj.currentState ) );
-                }
-            }
-        }
-    }
-
-    /**
-     * Periodically checks whether our internal IFrame is ready to be used.
-     *
-     * @method _checkIframeLoaded
-     * @private
-     */
-    function _checkIframeLoaded() {
-
-        var doc;
-        var elem;
-        var fqstate;
-
-        if ( !_iframe.contentWindow || !_iframe.contentWindow.document ) {
-            // Check again in 10 msec...
-            setTimeout( _checkIframeLoaded, 10 );
-            return;
-        }
-
-        // Start the thread that will have the responsibility to
-        // periodically check whether a navigate operation has been
-        // requested on the main window. This will happen when
-        // YAHOO.util.History.navigate has been called or after
-        // the user has hit the back/forward button.
-
-        doc = _iframe.contentWindow.document;
-        elem = doc.getElementById( "state" );
-        // We must use innerText, and not innerHTML because our string contains
-        // the "&" character (which would end up being escaped as "&") and
-        // the string comparison would fail...
-        fqstate = elem ? elem.innerText : null;
-
-        setInterval( function () {
-
-            var newfqstate;
-            var hash;
-            var states;
-            var moduleName;
-            var moduleObj;
-
-            doc = _iframe.contentWindow.document;
-            elem = doc.getElementById( "state" );
-            // See my comment above about using innerText instead of innerHTML...
-            newfqstate = elem ? elem.innerText : null;
-
-            if ( newfqstate !== fqstate ) {
-                fqstate = newfqstate;
-                _handleFQStateChange( fqstate );
-
-                if ( !fqstate ) {
-                    states = [];
-                    for ( moduleName in _modules ) {
-                        if ( YAHOO.lang.hasOwnProperty( _modules, moduleName ) ) {
-                            moduleObj = _modules[moduleName];
-                            states.push( moduleName + "=" + moduleObj.initialState );
-                        }
-                    }
-                    hash = states.join( "&" );
-                } else {
-                    hash = fqstate;
-                }
-
-                // Allow the state to be bookmarked by setting the top window's
-                // URL fragment identifier. Note that here, we are on IE, and
-                // IE does not touch the browser history when setting the hash
-                // (unlike all the other browsers). I used to write:
-                //     top.location.replace( "#" + hash );
-                // but this had a side effect when the page was not the top frame.
-                top.location.hash = hash;
-
-                _storeStates();
-            }
-        }, 50 );
-
-        _bhmReady = true;
-
-        YAHOO.util.History.onLoadEvent.fire();
-    }
-
-    /**
-     * Finish up the initialization of the Browser History Manager.
-     *
-     * @method _initialize
-     * @private
-     */
-    function _initialize() {
-
-        var i;
-        var len;
-        var parts;
-        var tokens;
-        var moduleName;
-        var moduleObj;
-        var initialStates;
-        var initialState;
-        var currentStates;
-        var currentState;
-        var counter;
-        var hash;
-
-        _storageField = document.getElementById( "yui_hist_field" );
-
-        // Decode the content of our storage field...
-        parts = _storageField.value.split( "|" );
-
-        if ( parts.length > 1 ) {
-
-            initialStates = parts[0].split( "&" );
-            for ( i = 0, len = initialStates.length ; i < len ; i++ ) {
-                tokens = initialStates[i].split( "=" );
-                if ( tokens.length === 2 ) {
-                    moduleName = tokens[0];
-                    initialState = tokens[1];
-                    moduleObj = _modules[moduleName];
-                    if ( moduleObj ) {
-                        moduleObj.initialState = initialState;
-                    }
-                }
-            }
-
-            currentStates = parts[1].split( "&" );
-            for ( i = 0, len = currentStates.length ; i < len ; i++ ) {
-                tokens = currentStates[i].split( "=" );
-                if ( tokens.length >= 2 ) {
-                    moduleName = tokens[0];
-                    currentState = tokens[1];
-                    moduleObj = _modules[moduleName];
-                    if ( moduleObj ) {
-                        moduleObj.currentState = currentState;
-                    }
-                }
-            }
-        }
-
-        if ( parts.length > 2 ) {
-            _fqstates = parts[2].split( "," );
-        }
-
-        _storageFieldReady = true;
-
-        if ( YAHOO.env.ua.ie ) {
-
-            _iframe = document.getElementById( "yui_hist_iframe" );
-            _checkIframeLoaded();
-
-        } else {
-
-            // Start the thread that will have the responsibility to
-            // periodically check whether a navigate operation has been
-            // requested on the main window. This will happen when
-            // YAHOO.util.History.navigate has been called or after
-            // the user has hit the back/forward button.
-
-            // On Safari 1.x and 2.0, the only way to catch a back/forward
-            // operation is to watch history.length... We basically exploit
-            // what I consider to be a bug (history.length is not supposed
-            // to change when going back/forward in the history...) This is
-            // why, in the following thread, we first compare the hash,
-            // because the hash thing will be fixed in the next major
-            // version of Safari. So even if they fix the history.length
-            // bug, all this will still work!
-            counter = history.length;
-
-            // On Gecko and Opera, we just need to watch the hash...
-            hash = _getHash();
-
-            setInterval( function () {
-
-                var state;
-                var newHash;
-                var newCounter;
-
-                newHash = _getHash();
-                newCounter = history.length;
-                if ( newHash !== hash ) {
-                    hash = newHash;
-                    counter = newCounter;
-                    _handleFQStateChange( hash );
-                    _storeStates();
-                } else if ( newCounter !== counter ) {
-                    // If we ever get here, we should be on Safari...
-                    hash = newHash;
-                    counter = newCounter;
-                    state = _fqstates[counter - 1];
-                    _handleFQStateChange( state );
-                    _storeStates();
-                }
-            }, 50 );
-
-            _bhmReady = true;
-
-            YAHOO.util.History.onLoadEvent.fire();
-        }
-    }
-
-    return {
-
-        /**
-         * Fired when the Browser History Manager is ready.
-         *
-         * @event onLoadEvent
-         */
-        onLoadEvent: new YAHOO.util.CustomEvent( "onLoad" ),
-
-        /**
-         * Registers a new module.
-         *
-         * @method register
-         * @param {string} module Non-empty string uniquely identifying the
-         *     module you wish to register.
-         * @param {string} initialState The initial state of the specified
-         *     module corresponding to its earliest history entry.
-         * @param {function} onStateChange Callback called when the
-         *     state of the specified module has changed.
-         * @param {object} obj An arbitrary object that will be passed as a
-         *     parameter to the handler.
-         * @param {boolean} override If true, the obj passed in becomes the
-         *     execution scope of the listener.
-         */
-        register: function ( module, initialState, onStateChange, obj, override ) {
-
-            var scope;
-            var wrappedFn;
-
-            if ( typeof module !== "string" || _trim( module ) === "" ||
-                 typeof initialState !== "string" ||
-                 typeof onStateChange !== "function" ) {
-                throw new Error( "Missing or invalid argument passed to YAHOO.util.History.register" );
-            }
-
-            if ( _modules[module] ) {
-                // Here, we used to throw an exception. However, users have
-                // complained about this behavior, so we now just return.
-                return;
-            }
-
-            // Note: A module CANNOT be registered after calling
-            // YAHOO.util.History.initialize. Indeed, we set the initial state
-            // of each registered module in YAHOO.util.History.initialize.
-            // If you could register a module after initializing the Browser
-            // History Manager, you would not read the correct state using
-            // YAHOO.util.History.getCurrentState when coming back to the
-            // page using the back button.
-            if ( _initialized ) {
-                throw new Error( "All modules must be registered before calling YAHOO.util.History.initialize" );
-            }
-
-            // Make sure the strings passed in do not contain our separators "," and "|"
-            module = escape( module );
-            initialState = escape( initialState );
-
-            // If the user chooses to override the scope, we use the
-            // custom object passed in as the execution scope.
-            scope = null;
-            if ( override === true ) {
-                scope = obj;
-            } else {
-                scope = override;
-            }
-
-            wrappedFn = function ( state ) {
-                return onStateChange.call( scope, state, obj );
-            };
-
-            _modules[module] = {
-                name: module,
-                initialState: initialState,
-                currentState: initialState,
-                onStateChange: wrappedFn
-            };
-        },
-
-        /**
-         * Initializes the Browser History Manager. Call this method
-         * from a script block located right after the opening body tag.
-         *
-         * @method initialize
-         * @param {string} iframeTarget Optional - Path to an existing
-         *     HTML document accessible from the same domain. If not
-         *     specified, defaults to "blank.html". This is only useful
-         *     if you use https.
-         * @public
-         */
-        initialize: function ( iframeTarget ) {
-
-            // Return if the browser history manager has already been initialized
-            if ( _initialized ) {
-                return;
-            }
-
-            if ( !iframeTarget ) {
-                iframeTarget = "blank.html";
-            }
-
-            if ( typeof iframeTarget !== "string" || _trim( iframeTarget ) === "" ) {
-                throw new Error( "Invalid argument passed to YAHOO.util.History.initialize" );
-            }
-
-            document.write( '<input type="hidden" id="yui_hist_field">' );
-
-            if ( YAHOO.env.ua.ie ) {
-                if ( location.protocol === "https:" ) {
-                    // If we use https, we MUST point the IFrame to a valid
-                    // document on the same server. If we don't, we will get
-                    // a warning (do you want to display non secure items?)
-                    document.write( '<iframe id="yui_hist_iframe" src="' + iframeTarget + '" style="position:absolute;visibility:hidden;"></iframe>' );
-                } else {
-                    // This trick allows us to do without having to download
-                    // the asset, saving one HTTP request...
-                    document.write( '<iframe id="yui_hist_iframe" src="javascript:document.open();document.write("' + new Date().getTime() + '");document.close();" style="position:absolute;visibility:hidden;"></iframe>' );
-                }
-            }
-
-            // We have to wait for the window's onload handler. Otherwise, our
-            // hidden form field will always be empty (i.e. the browser won't
-            // have had enough time to restore the session)
-            YAHOO.util.Event.addListener( window, "load", _initialize );
-
-            _initialized = true;
-        },
-
-        /**
-         * Call this method when you want to store a new entry in the browser's history.
-         *
-         * @method navigate
-         * @param {string} module Non-empty string representing your module.
-         * @param {string} state String representing the new state of the specified module.
-         * @return {boolean} Indicates whether the new state was successfully added to the history.
-         * @public
-         */
-        navigate: function ( module, state ) {
-
-            var currentStates;
-            var moduleName;
-            var moduleObj;
-            var currentState;
-            var states;
-
-            if ( typeof module !== "string" || typeof state !== "string" ) {
-                throw new Error( "Missing or invalid argument passed to YAHOO.util.History.navigate" );
-            }
-
-            states = {};
-            states[module] = state;
-
-            return YAHOO.util.History.multiNavigate( states );
-        },
-
-        /**
-         * Call this method when you want to store a new entry in the browser's history.
-         *
-         * @method multiNavigate
-         * @param {object} states Associative array of module-state pairs to set simultaneously.
-         * @return {boolean} Indicates whether the new state was successfully added to the history.
-         * @public
-         */
-        multiNavigate: function ( states ) {
-
-            var currentStates;
-            var moduleName;
-            var moduleObj;
-            var currentState;
-            var fqstate;
-            var html;
-            var doc;
-
-            if ( typeof states !== "object" ) {
-                throw new Error( "Missing or invalid argument passed to YAHOO.util.History.multiNavigate" );
-            }
-
-            if ( !_bhmReady ) {
-                throw new Error( "The Browser History Manager is not initialized" );
-            }
-
-            for ( moduleName in states ) {
-                if ( !_modules[moduleName] ) {
-                    throw new Error( "The following module has not been registered: " + moduleName );
-                }
-            }
-
-            // Generate our new full state string mod1=xxx&mod2=yyy
-            currentStates = [];
-
-            for ( moduleName in _modules ) {
-                if ( YAHOO.lang.hasOwnProperty( _modules, moduleName ) ) {
-                    moduleObj = _modules[moduleName];
-                    if ( YAHOO.lang.hasOwnProperty( states, moduleName ) ) {
-                        currentState = states[moduleName];
-                    } else {
-                        currentState = moduleObj.currentState;
-                    }
-
-                    // Make sure the strings passed in do not contain our separators "," and "|"
-                    moduleName = escape( moduleName );
-                    currentState = escape( currentState );
-
-                    currentStates.push( moduleName + "=" + currentState );
-                }
-            }
-
-            fqstate = currentStates.join( "&" );
-
-            if ( YAHOO.env.ua.ie ) {
-
-                html = '<html><body><div id="state">' + fqstate + '</div></body></html>';
-                try {
-                    doc = _iframe.contentWindow.document;
-                    doc.open();
-                    doc.write( html );
-                    doc.close();
-                } catch ( e ) {
-                    return false;
-                }
-
-            } else {
-
-                // Known bug: On Safari 1.x and 2.0, if you have tab browsing
-                // enabled, Safari will show an endless loading icon in the
-                // tab. This has apparently been fixed in recent WebKit builds.
-                // One work around found by Dav Glass is to submit a form that
-                // points to the same document. This indeed works on Safari 1.x
-                // and 2.0 but creates bigger problems on WebKit. So for now,
-                // we'll consider this an acceptable bug, and hope that Apple
-                // comes out with their next version of Safari very soon.
-                top.location.hash = fqstate;
-                if ( YAHOO.env.ua.webkit ) {
-                    // The following two lines are only useful for Safari 1.x
-                    // and 2.0. Recent nightly builds of WebKit do not require
-                    // that, but unfortunately, it is not easy to differentiate
-                    // between the two. Once Safari 2.0 departs the A-grade
-                    // list, we can remove the following two lines...
-                    _fqstates[history.length] = fqstate;
-                    _storeStates();
-                }
-
-            }
-
-            return true;
-        },
-
-        /**
-         * Returns the current state of the specified module.
-         *
-         * @method getCurrentState
-         * @param {string} module Non-empty string representing your module.
-         * @return {string} The current state of the specified module.
-         * @public
-         */
-        getCurrentState: function ( module ) {
-
-            var moduleObj;
-
-            if ( typeof module !== "string" ) {
-                throw new Error( "Missing or invalid argument passed to YAHOO.util.History.getCurrentState" );
-            }
-
-            if ( !_storageFieldReady ) {
-                throw new Error( "The Browser History Manager is not initialized" );
-            }
-
-            moduleObj = _modules[module];
-            if ( !moduleObj ) {
-                throw new Error( "No such registered module: " + module );
-            }
-
-            return unescape( moduleObj.currentState );
-        },
-
-        /**
-         * Returns the state of a module according to the URL fragment
-         * identifier. This method is useful to initialize your modules
-         * if your application was bookmarked from a particular state.
-         *
-         * @method getBookmarkedState
-         * @param {string} module Non-empty string representing your module.
-         * @return {string} The bookmarked state of the specified module.
-         * @public
-         */
-        getBookmarkedState: function ( module ) {
-
-            var i;
-            var len;
-            var hash;
-            var states;
-            var tokens;
-            var moduleName;
-
-            if ( typeof module !== "string" ) {
-                throw new Error( "Missing or invalid argument passed to YAHOO.util.History.getBookmarkedState" );
-            }
-
-            hash = top.location.hash.substr(1);
-            states = hash.split( "&" );
-            for ( i = 0, len = states.length ; i < len ; i++ ) {
-                tokens = states[i].split( "=" );
-                if ( tokens.length === 2 ) {
-                    moduleName = tokens[0];
-                    if ( moduleName === module ) {
-                        return unescape( tokens[1] );
-                    }
-                }
-            }
-
-            return null;
-        },
-
-        /**
-         * Returns the value of the specified query string parameter.
-         * This method is not used internally by the Browser History Manager.
-         * However, it is provided here as a helper since many applications
-         * using the Browser History Manager will want to read the value of
-         * url parameters to initialize themselves.
-         *
-         * @method getQueryStringParameter
-         * @param {string} paramName Name of the parameter we want to look up.
-         * @param {string} queryString Optional URL to look at. If not specified,
-         *     this method uses the URL in the address bar.
-         * @return {string} The value of the specified parameter, or null.
-         * @public
-         */
-        getQueryStringParameter: function ( paramName, url ) {
-
-            var i;
-            var len;
-            var idx;
-            var queryString;
-            var params;
-            var tokens;
-
-            url = url || top.location.href;
-
-            idx = url.indexOf( "?" );
-            queryString = idx >= 0 ? url.substr( idx + 1 ) : url;
-            params = queryString.split( "&" );
-
-            for ( i = 0, len = params.length ; i < len ; i++ ) {
-                tokens = params[i].split( "=" );
-                if ( tokens.length >= 2 ) {
-                    if ( tokens[0] === paramName ) {
-                        return unescape( tokens[1] );
-                    }
-                }
-            }
-
-            return null;
-        }
-
-    };
-
-} )();
-YAHOO.register("history", YAHOO.util.History, {version: "2.3.1", build: "541"});

Added: trunk/root/static/yui/history/history-debug.js
===================================================================
--- trunk/root/static/yui/history/history-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/history/history-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,789 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+/**
+ * The Browser History Manager provides the ability to use the back/forward
+ * navigation buttons in a DHTML application. It also allows a DHTML
+ * application to be bookmarked in a specific state.
+ *
+ * This library requires the following static markup:
+ *
+ * <iframe id="yui-history-iframe" src="path-to-real-asset-in-same-domain"></iframe>
+ * <input id="yui-history-field" type="hidden">
+ *
+ * @module history
+ * @requires yahoo,event
+ * @namespace YAHOO.util
+ * @title Browser History Manager
+ */
+
+/**
+ * The History class provides the ability to use the back/forward navigation
+ * buttons in a DHTML application. It also allows a DHTML application to
+ * be bookmarked in a specific state.
+ *
+ * @class History
+ * @constructor
+ */
+YAHOO.util.History = (function () {
+
+    /**
+     * Our hidden IFrame used to store the browsing history.
+     *
+     * @property _histFrame
+     * @type HTMLIFrameElement
+     * @default null
+     * @private
+     */
+    var _histFrame = null;
+
+    /**
+     * INPUT field (with type="hidden" or type="text") or TEXTAREA.
+     * This field keeps the value of the initial state, current state
+     * the list of all states across pages within a single browser session.
+     *
+     * @property _stateField
+     * @type HTMLInputElement|HTMLTextAreaElement
+     * @default null
+     * @private
+     */
+    var _stateField = null;
+
+    /**
+     * Flag used to tell whether YAHOO.util.History.initialize has been called.
+     *
+     * @property _initialized
+     * @type boolean
+     * @default false
+     * @private
+     */
+    var _initialized = false;
+
+    /**
+     * List of registered modules.
+     *
+     * @property _modules
+     * @type array
+     * @default []
+     * @private
+     */
+    var _modules = [];
+
+    /**
+     * List of fully qualified states. This is used only by Safari.
+     *
+     * @property _fqstates
+     * @type array
+     * @default []
+     * @private
+     */
+    var _fqstates = [];
+
+    /**
+     * location.hash is a bit buggy on Opera. I have seen instances where
+     * navigating the history using the back/forward buttons, and hence
+     * changing the URL, would not change location.hash. That's ok, the
+     * implementation of an equivalent is trivial.
+     *
+     * @method _getHash
+     * @return {string} The hash portion of the document's location
+     * @private
+     */
+    function _getHash() {
+        var i, href;
+        href = top.location.href;
+        i = href.indexOf("#");
+        return i >= 0 ? href.substr(i + 1) : null;
+    }
+
+    /**
+     * Stores all the registered modules' initial state and current state.
+     * On Safari, we also store all the fully qualified states visited by
+     * the application within a single browser session. The storage takes
+     * place in the form field specified during initialization.
+     *
+     * @method _storeStates
+     * @private
+     */
+    function _storeStates() {
+
+        var moduleName, moduleObj, initialStates = [], currentStates = [];
+
+        for (moduleName in _modules) {
+            if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) {
+                moduleObj = _modules[moduleName];
+                initialStates.push(moduleName + "=" + moduleObj.initialState);
+                currentStates.push(moduleName + "=" + moduleObj.currentState);
+            }
+        }
+
+        _stateField.value = initialStates.join("&") + "|" + currentStates.join("&");
+
+        if (YAHOO.env.ua.webkit) {
+            _stateField.value += "|" + _fqstates.join(",");
+        }
+    }
+
+    /**
+     * Sets the new currentState attribute of all modules depending on the new
+     * fully qualified state. Also notifies the modules which current state has
+     * changed.
+     *
+     * @method _handleFQStateChange
+     * @param {string} fqstate Fully qualified state
+     * @private
+     */
+    function _handleFQStateChange(fqstate) {
+
+        var i, len, moduleName, moduleObj, modules, states, tokens, currentState;
+
+        if (!fqstate) {
+            // Notifies all modules
+            for (moduleName in _modules) {
+                if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) {
+                    moduleObj = _modules[moduleName];
+                    moduleObj.currentState = moduleObj.initialState;
+                    moduleObj.onStateChange(unescape(moduleObj.currentState));
+                }
+            }
+            return;
+        }
+
+        modules = [];
+        states = fqstate.split("&");
+        for (i = 0, len = states.length; i < len; i++) {
+            tokens = states[i].split("=");
+            if (tokens.length === 2) {
+                moduleName = tokens[0];
+                currentState = tokens[1];
+                modules[moduleName] = currentState;
+            }
+        }
+
+        for (moduleName in _modules) {
+            if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) {
+                moduleObj = _modules[moduleName];
+                currentState = modules[moduleName];
+                if (!currentState || moduleObj.currentState !== currentState) {
+                    moduleObj.currentState = currentState || moduleObj.initialState;
+                    moduleObj.onStateChange(unescape(moduleObj.currentState));
+                }
+            }
+        }
+    }
+
+    /**
+     * Update the IFrame with our new state.
+     *
+     * @method _updateIFrame
+     * @private
+     * @return {boolean} true if successful. false otherwise.
+     */
+    function _updateIFrame (fqstate) {
+
+        var html, doc;
+
+        html = '<html><body><div id="state">' + fqstate + '</div></body></html>';
+
+        try {
+            doc = _histFrame.contentWindow.document;
+            doc.open();
+            doc.write(html);
+            doc.close();
+            return true;
+        } catch (e) {
+            return false;
+        }
+    }
+
+    /**
+     * Periodically checks whether our internal IFrame is ready to be used.
+     *
+     * @method _checkIframeLoaded
+     * @private
+     */
+    function _checkIframeLoaded() {
+
+        var doc, elem, fqstate, hash;
+
+        if (!_histFrame.contentWindow || !_histFrame.contentWindow.document) {
+            // Check again in 10 msec...
+            setTimeout(_checkIframeLoaded, 10);
+            return;
+        }
+
+        // Start the thread that will have the responsibility to
+        // periodically check whether a navigate operation has been
+        // requested on the main window. This will happen when
+        // YAHOO.util.History.navigate has been called or after
+        // the user has hit the back/forward button.
+
+        doc = _histFrame.contentWindow.document;
+        elem = doc.getElementById("state");
+        // We must use innerText, and not innerHTML because our string contains
+        // the "&" character (which would end up being escaped as "&") and
+        // the string comparison would fail...
+        fqstate = elem ? elem.innerText : null;
+
+        hash = _getHash();
+
+        setInterval(function () {
+
+            var newfqstate, states, moduleName, moduleObj, newHash, historyLength;
+
+            doc = _histFrame.contentWindow.document;
+            elem = doc.getElementById("state");
+            // See my comment above about using innerText instead of innerHTML...
+            newfqstate = elem ? elem.innerText : null;
+
+            newHash = _getHash();
+
+            if (newfqstate !== fqstate) {
+
+                fqstate = newfqstate;
+                _handleFQStateChange(fqstate);
+
+                if (!fqstate) {
+                    states = [];
+                    for (moduleName in _modules) {
+                        if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) {
+                            moduleObj = _modules[moduleName];
+                            states.push(moduleName + "=" + moduleObj.initialState);
+                        }
+                    }
+                    newHash = states.join("&");
+                } else {
+                    newHash = fqstate;
+                }
+
+                // Allow the state to be bookmarked by setting the top window's
+                // URL fragment identifier. Note that here, we are on IE, and
+                // IE does not touch the browser history when setting the hash
+                // (unlike all the other browsers). I used to write:
+                //     top.location.replace( "#" + hash );
+                // but this had a side effect when the page was not the top frame.
+                top.location.hash = newHash;
+                hash = newHash;
+
+                _storeStates();
+
+            } else if (newHash !== hash) {
+
+                // The hash has changed. The user might have clicked on a link,
+                // or modified the URL directly, or opened the same application
+                // bookmarked in a specific state using a bookmark. However, we
+                // know the hash change was not caused by a hit on the back or
+                // forward buttons, or by a call to navigate() (because it would
+                // have been handled above) We must handle these cases, which is
+                // why we also need to keep track of hash changes on IE!
+
+                // Note that IE6 has some major issues with this kind of user
+                // interaction (the history stack gets completely messed up)
+                // but it seems to work fine on IE7.
+
+                hash = newHash;
+
+                // Now, store a new history entry. The following will cause the
+                // code above to execute, doing all the dirty work for us...
+                _updateIFrame(newHash);
+            }
+
+        }, 50);
+
+        _initialized = true;
+        YAHOO.util.History.onLoadEvent.fire();
+    }
+
+    /**
+     * Finish up the initialization of the Browser History Manager.
+     *
+     * @method _initialize
+     * @private
+     */
+    function _initialize() {
+
+        var i, len, parts, tokens, moduleName, moduleObj, initialStates, initialState, currentStates, currentState, counter, hash;
+
+        // Decode the content of our storage field...
+        parts = _stateField.value.split("|");
+
+        if (parts.length > 1) {
+
+            initialStates = parts[0].split("&");
+            for (i = 0, len = initialStates.length; i < len; i++) {
+                tokens = initialStates[i].split("=");
+                if (tokens.length === 2) {
+                    moduleName = tokens[0];
+                    initialState = tokens[1];
+                    moduleObj = _modules[moduleName];
+                    if (moduleObj) {
+                        moduleObj.initialState = initialState;
+                    }
+                }
+            }
+
+            currentStates = parts[1].split("&");
+            for (i = 0, len = currentStates.length; i < len; i++) {
+                tokens = currentStates[i].split("=");
+                if (tokens.length >= 2) {
+                    moduleName = tokens[0];
+                    currentState = tokens[1];
+                    moduleObj = _modules[moduleName];
+                    if (moduleObj) {
+                        moduleObj.currentState = currentState;
+                    }
+                }
+            }
+        }
+
+        if (parts.length > 2) {
+            _fqstates = parts[2].split(",");
+        }
+
+        if (YAHOO.env.ua.ie) {
+
+            _checkIframeLoaded();
+
+        } else {
+
+            // Start the thread that will have the responsibility to
+            // periodically check whether a navigate operation has been
+            // requested on the main window. This will happen when
+            // YAHOO.util.History.navigate has been called or after
+            // the user has hit the back/forward button.
+
+            // On Safari 1.x and 2.0, the only way to catch a back/forward
+            // operation is to watch history.length... We basically exploit
+            // what I consider to be a bug (history.length is not supposed
+            // to change when going back/forward in the history...) This is
+            // why, in the following thread, we first compare the hash,
+            // because the hash thing will be fixed in the next major
+            // version of Safari. So even if they fix the history.length
+            // bug, all this will still work!
+            counter = history.length;
+
+            // On Gecko and Opera, we just need to watch the hash...
+            hash = _getHash();
+
+            setInterval(function () {
+
+                var state, newHash, newCounter;
+
+                newHash = _getHash();
+                newCounter = history.length;
+                if (newHash !== hash) {
+                    hash = newHash;
+                    counter = newCounter;
+                    _handleFQStateChange(hash);
+                    _storeStates();
+                } else if (newCounter !== counter && YAHOO.env.ua.webkit) {
+                    hash = newHash;
+                    counter = newCounter;
+                    state = _fqstates[counter - 1];
+                    _handleFQStateChange(state);
+                    _storeStates();
+                }
+
+            }, 50);
+
+            _initialized = true;
+            YAHOO.util.History.onLoadEvent.fire();
+        }
+    }
+
+    return {
+
+        /**
+         * Fired when the Browser History Manager is ready. If you subscribe to
+         * this event after the Browser History Manager has been initialized,
+         * it will not fire. Therefore, it is recommended to use the onReady
+         * method instead.
+         *
+         * @event onLoadEvent
+         * @see onReady
+         */
+        onLoadEvent: new YAHOO.util.CustomEvent("onLoad"),
+
+        /**
+         * Executes the supplied callback when the Browser History Manager is
+         * ready. This will execute immediately if called after the Browser
+         * History Manager onLoad event has fired.
+         *
+         * @method onReady
+         * @param {function} fn what to execute when the Browser History Manager is ready.
+         * @param {object} obj an optional object to be passed back as a parameter to fn.
+         * @param {boolean|object} override If true, the obj passed in becomes fn's execution scope.
+         * @see onLoadEvent
+         */
+        onReady: function (fn, obj, override) {
+
+            if (_initialized) {
+
+                setTimeout(function () {
+                    var ctx = window;
+                    if (override) {
+                        if (override === true) {
+                            ctx = obj;
+                        } else {
+                            ctx = override;
+                        }
+                    }
+                    fn.call(ctx, "onLoad", [], obj);
+                }, 0);
+
+            } else {
+
+                YAHOO.util.History.onLoadEvent.subscribe(fn, obj, override);
+
+            }
+        },
+
+        /**
+         * Registers a new module.
+         *
+         * @method register
+         * @param {string} module Non-empty string uniquely identifying the
+         *     module you wish to register.
+         * @param {string} initialState The initial state of the specified
+         *     module corresponding to its earliest history entry.
+         * @param {function} onStateChange Callback called when the
+         *     state of the specified module has changed.
+         * @param {object} obj An arbitrary object that will be passed as a
+         *     parameter to the handler.
+         * @param {boolean} override If true, the obj passed in becomes the
+         *     execution scope of the listener.
+         */
+        register: function (module, initialState, onStateChange, obj, override) {
+
+            var scope, wrappedFn;
+
+            if (typeof module !== "string" || YAHOO.lang.trim(module) === "" ||
+                typeof initialState !== "string" ||
+                typeof onStateChange !== "function") {
+                throw new Error("Missing or invalid argument");
+            }
+
+            if (_modules[module]) {
+                // Here, we used to throw an exception. However, users have
+                // complained about this behavior, so we now just return.
+                return;
+            }
+
+            // Note: A module CANNOT be registered after calling
+            // YAHOO.util.History.initialize. Indeed, we set the initial state
+            // of each registered module in YAHOO.util.History.initialize.
+            // If you could register a module after initializing the Browser
+            // History Manager, you would not read the correct state using
+            // YAHOO.util.History.getCurrentState when coming back to the
+            // page using the back button.
+            if (_initialized) {
+                throw new Error("All modules must be registered before calling YAHOO.util.History.initialize");
+            }
+
+            // Make sure the strings passed in do not contain our separators "," and "|"
+            module = escape(module);
+            initialState = escape(initialState);
+
+            // If the user chooses to override the scope, we use the
+            // custom object passed in as the execution scope.
+            scope = null;
+            if (override === true) {
+                scope = obj;
+            } else {
+                scope = override;
+            }
+
+            wrappedFn = function (state) {
+                return onStateChange.call(scope, state, obj);
+            };
+
+            _modules[module] = {
+                name: module,
+                initialState: initialState,
+                currentState: initialState,
+                onStateChange: wrappedFn
+            };
+        },
+
+        /**
+         * Initializes the Browser History Manager. Call this method
+         * from a script block located right after the opening body tag.
+         *
+         * @method initialize
+         * @param {string|HTML Element} stateField <input type="hidden"> used
+         *     to store application states. Must be in the static markup.
+         * @param {string|HTML Element} histFrame IFrame used to store
+         *     the history (only required on Internet Explorer)
+         * @public
+         */
+        initialize: function (stateField, histFrame) {
+
+            if (_initialized) {
+                // The browser history manager has already been initialized.
+                return;
+            }
+
+            if (YAHOO.env.ua.opera) {
+                // Opera cannot be supported because of several problems that
+                // have been reported to the Opera team, but never addressed:
+                //   1) Hash changes are not detected (started happening with
+                //      recent versions of Opera)
+                //   2) The entire DOM gets cached, so when you come back to
+                //      a page, the window's onload event does not get fired,
+                //      which prevents us from initializing the browser history
+                //      manager.
+                // As a consequence, the best thing we can do is to throw an
+                // exception. The application should catch it, and degrade
+                // gracefully. This is the sad state of history management.
+                throw new Error("Unsupported browser");
+            }
+
+            if (typeof stateField === "string") {
+                stateField = document.getElementById(stateField);
+            }
+
+            if (!stateField ||
+                stateField.tagName !== "TEXTAREA" &&
+                (stateField.tagName !== "INPUT" ||
+                 stateField.type !== "hidden" &&
+                 stateField.type !== "text")) {
+                throw new Error("Missing or invalid argument");
+            }
+
+            _stateField = stateField;
+
+            if (YAHOO.env.ua.ie) {
+
+                if (typeof histFrame === "string") {
+                    histFrame = document.getElementById(histFrame);
+                }
+
+                if (!histFrame || histFrame.tagName !== "IFRAME") {
+                    throw new Error("Missing or invalid argument");
+                }
+
+                _histFrame = histFrame;
+            }
+
+            // Note that the event utility MUST be included inline in the page.
+            // If it gets loaded later (which you may want to do to improve the
+            // loading speed of your site), the onDOMReady event never fires,
+            // and the history library never gets fully initialized.
+            YAHOO.util.Event.onDOMReady(_initialize);
+        },
+
+        /**
+         * Call this method when you want to store a new entry in the browser's history.
+         *
+         * @method navigate
+         * @param {string} module Non-empty string representing your module.
+         * @param {string} state String representing the new state of the specified module.
+         * @return {boolean} Indicates whether the new state was successfully added to the history.
+         * @public
+         */
+        navigate: function (module, state) {
+
+            var states;
+
+            if (typeof module !== "string" || typeof state !== "string") {
+                throw new Error("Missing or invalid argument");
+            }
+
+            states = {};
+            states[module] = state;
+
+            return YAHOO.util.History.multiNavigate(states);
+        },
+
+        /**
+         * Call this method when you want to store a new entry in the browser's history.
+         *
+         * @method multiNavigate
+         * @param {object} states Associative array of module-state pairs to set simultaneously.
+         * @return {boolean} Indicates whether the new state was successfully added to the history.
+         * @public
+         */
+        multiNavigate: function (states) {
+
+            var currentStates, moduleName, moduleObj, currentState, fqstate;
+
+            if (typeof states !== "object") {
+                throw new Error("Missing or invalid argument");
+            }
+
+            if (!_initialized) {
+                throw new Error("The Browser History Manager is not initialized");
+            }
+
+            for (moduleName in states) {
+                if (!_modules[moduleName]) {
+                    throw new Error("The following module has not been registered: " + moduleName);
+                }
+            }
+
+            // Generate our new full state string mod1=xxx&mod2=yyy
+            currentStates = [];
+
+            for (moduleName in _modules) {
+                if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) {
+                    moduleObj = _modules[moduleName];
+                    if (YAHOO.lang.hasOwnProperty(states, moduleName)) {
+                        currentState = states[moduleName];
+                    } else {
+                        currentState = moduleObj.currentState;
+                    }
+
+                    // Make sure the strings passed in do not contain our separators "," and "|"
+                    moduleName = escape(moduleName);
+                    currentState = escape(currentState);
+
+                    currentStates.push(moduleName + "=" + currentState);
+                }
+            }
+
+            fqstate = currentStates.join("&");
+
+            if (YAHOO.env.ua.ie) {
+
+                return _updateIFrame(fqstate);
+
+            } else {
+
+                // Known bug: On Safari 1.x and 2.0, if you have tab browsing
+                // enabled, Safari will show an endless loading icon in the
+                // tab. This has apparently been fixed in recent WebKit builds.
+                // One work around found by Dav Glass is to submit a form that
+                // points to the same document. This indeed works on Safari 1.x
+                // and 2.0 but creates bigger problems on WebKit. So for now,
+                // we'll consider this an acceptable bug, and hope that Apple
+                // comes out with their next version of Safari very soon.
+                top.location.hash = fqstate;
+                if (YAHOO.env.ua.webkit) {
+                    // The following two lines are only useful for Safari 1.x
+                    // and 2.0. Recent nightly builds of WebKit do not require
+                    // that, but unfortunately, it is not easy to differentiate
+                    // between the two. Once Safari 2.0 departs the A-grade
+                    // list, we can remove the following two lines...
+                    _fqstates[history.length] = fqstate;
+                    _storeStates();
+                }
+
+                return true;
+
+            }
+        },
+
+        /**
+         * Returns the current state of the specified module.
+         *
+         * @method getCurrentState
+         * @param {string} module Non-empty string representing your module.
+         * @return {string} The current state of the specified module.
+         * @public
+         */
+        getCurrentState: function (module) {
+
+            var moduleObj;
+
+            if (typeof module !== "string") {
+                throw new Error("Missing or invalid argument");
+            }
+
+            if (!_initialized) {
+                throw new Error("The Browser History Manager is not initialized");
+            }
+
+            moduleObj = _modules[module];
+            if (!moduleObj) {
+                throw new Error("No such registered module: " + module);
+            }
+
+            return unescape(moduleObj.currentState);
+        },
+
+        /**
+         * Returns the state of a module according to the URL fragment
+         * identifier. This method is useful to initialize your modules
+         * if your application was bookmarked from a particular state.
+         *
+         * @method getBookmarkedState
+         * @param {string} module Non-empty string representing your module.
+         * @return {string} The bookmarked state of the specified module.
+         * @public
+         */
+        getBookmarkedState: function (module) {
+
+            var i, len, idx, hash, states, tokens, moduleName;
+
+            if (typeof module !== "string") {
+                throw new Error("Missing or invalid argument");
+            }
+
+            // Use location.href instead of location.hash which is already
+            // URL-decoded, which creates problems if the state value
+            // contained special characters...
+            idx = top.location.href.indexOf("#");
+            hash = idx >= 0 ? top.location.href.substr(idx + 1) : top.location.href;
+
+            states = hash.split("&");
+            for (i = 0, len = states.length; i < len; i++) {
+                tokens = states[i].split("=");
+                if (tokens.length === 2) {
+                    moduleName = tokens[0];
+                    if (moduleName === module) {
+                        return unescape(tokens[1]);
+                    }
+                }
+            }
+
+            return null;
+        },
+
+        /**
+         * Returns the value of the specified query string parameter.
+         * This method is not used internally by the Browser History Manager.
+         * However, it is provided here as a helper since many applications
+         * using the Browser History Manager will want to read the value of
+         * url parameters to initialize themselves.
+         *
+         * @method getQueryStringParameter
+         * @param {string} paramName Name of the parameter we want to look up.
+         * @param {string} queryString Optional URL to look at. If not specified,
+         *     this method uses the URL in the address bar.
+         * @return {string} The value of the specified parameter, or null.
+         * @public
+         */
+        getQueryStringParameter: function (paramName, url) {
+
+            var i, len, idx, queryString, params, tokens;
+
+            url = url || top.location.href;
+
+            idx = url.indexOf("?");
+            queryString = idx >= 0 ? url.substr(idx + 1) : url;
+
+            // Remove the hash if any
+            idx = queryString.lastIndexOf("#");
+            queryString = idx >= 0 ? queryString.substr(0, idx) : queryString;
+
+            params = queryString.split("&");
+
+            for (i = 0, len = params.length; i < len; i++) {
+                tokens = params[i].split("=");
+                if (tokens.length >= 2) {
+                    if (tokens[0] === paramName) {
+                        return unescape(tokens[1]);
+                    }
+                }
+            }
+
+            return null;
+        }
+
+    };
+
+})();
+YAHOO.register("history", YAHOO.util.History, {version: "2.4.1", build: "742"});

Added: trunk/root/static/yui/history/history-min.js
===================================================================
--- trunk/root/static/yui/history/history-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/history/history-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+YAHOO.util.History=(function(){var C=null;var K=null;var F=false;var D=[];var B=[];function I(){var M,L;L=top.location.href;M=L.indexOf("#");return M>=0?L.substr(M+1):null;}function A(){var M,N,O=[],L=[];for(M in D){if(YAHOO.lang.hasOwnProperty(D,M)){N=D[M];O.push(M+"="+N.initialState);L.push(M+"="+N.currentState);}}K.value=O.join("&")+"|"+L.join("&");if(YAHOO.env.ua.webkit){K.value+="|"+B.join(",");}}function H(L){var Q,R,M,O,P,T,S,N;if(!L){for(M in D){if(YAHOO.lang.hasOwnProperty(D,M)){O=D[M];O.currentState=O.initialState;O.onStateChange(unescape(O.currentState));}}return ;}P=[];T=L.split("&");for(Q=0,R=T.length;Q<R;Q++){S=T[Q].split("=");if(S.length===2){M=S[0];N=S[1];P[M]=N;}}for(M in D){if(YAHOO.lang.hasOwnProperty(D,M)){O=D[M];N=P[M];if(!N||O.currentState!==N){O.currentState=N||O.initialState;O.onStateChange(unescape(O.currentState));}}}}function J(O){var L,N;L="<html><body><div id=\"state\">"+O+"</div></body></html>";try{N=C.contentWindow.document;N.open();N.write(L)!
 ;N.close();return true;}catch(M){return false;}}function G(){var O,L,N,M;if(!C.contentWindow||!C.contentWindow.document){setTimeout(G,10);return ;}O=C.contentWindow.document;L=O.getElementById("state");N=L?L.innerText:null;M=I();setInterval(function(){var U,Q,R,S,T,P;O=C.contentWindow.document;L=O.getElementById("state");U=L?L.innerText:null;T=I();if(U!==N){N=U;H(N);if(!N){Q=[];for(R in D){if(YAHOO.lang.hasOwnProperty(D,R)){S=D[R];Q.push(R+"="+S.initialState);}}T=Q.join("&");}else{T=N;}top.location.hash=T;M=T;A();}else{if(T!==M){M=T;J(T);}}},50);F=true;YAHOO.util.History.onLoadEvent.fire();}function E(){var S,U,Q,W,M,O,V,P,T,N,L,R;Q=K.value.split("|");if(Q.length>1){V=Q[0].split("&");for(S=0,U=V.length;S<U;S++){W=V[S].split("=");if(W.length===2){M=W[0];P=W[1];O=D[M];if(O){O.initialState=P;}}}T=Q[1].split("&");for(S=0,U=T.length;S<U;S++){W=T[S].split("=");if(W.length>=2){M=W[0];N=W[1];O=D[M];if(O){O.currentState=N;}}}}if(Q.length>2){B=Q[2].split(",");}if(YAHOO.env.ua.ie){G()!
 ;}else{L=history.length;R=I();setInterval(function(){var Z,X,Y!
 ;X=I();Y
=history.length;if(X!==R){R=X;L=Y;H(R);A();}else{if(Y!==L&&YAHOO.env.ua.webkit){R=X;L=Y;Z=B[L-1];H(Z);A();}}},50);F=true;YAHOO.util.History.onLoadEvent.fire();}}return{onLoadEvent:new YAHOO.util.CustomEvent("onLoad"),onReady:function(M,N,L){if(F){setTimeout(function(){var O=window;if(L){if(L===true){O=N;}else{O=L;}}M.call(O,"onLoad",[],N);},0);}else{YAHOO.util.History.onLoadEvent.subscribe(M,N,L);}},register:function(O,L,Q,R,N){var P,M;if(typeof O!=="string"||YAHOO.lang.trim(O)===""||typeof L!=="string"||typeof Q!=="function"){throw new Error("Missing or invalid argument");}if(D[O]){return ;}if(F){throw new Error("All modules must be registered before calling YAHOO.util.History.initialize");}O=escape(O);L=escape(L);P=null;if(N===true){P=R;}else{P=N;}M=function(S){return Q.call(P,S,R);};D[O]={name:O,initialState:L,currentState:L,onStateChange:M};},initialize:function(L,M){if(F){return ;}if(YAHOO.env.ua.opera){throw new Error("Unsupported browser");}if(typeof L==="string"){L=d!
 ocument.getElementById(L);}if(!L||L.tagName!=="TEXTAREA"&&(L.tagName!=="INPUT"||L.type!=="hidden"&&L.type!=="text")){throw new Error("Missing or invalid argument");}K=L;if(YAHOO.env.ua.ie){if(typeof M==="string"){M=document.getElementById(M);}if(!M||M.tagName!=="IFRAME"){throw new Error("Missing or invalid argument");}C=M;}YAHOO.util.Event.onDOMReady(E);},navigate:function(M,N){var L;if(typeof M!=="string"||typeof N!=="string"){throw new Error("Missing or invalid argument");}L={};L[M]=N;return YAHOO.util.History.multiNavigate(L);},multiNavigate:function(M){var L,N,P,O,Q;if(typeof M!=="object"){throw new Error("Missing or invalid argument");}if(!F){throw new Error("The Browser History Manager is not initialized");}for(N in M){if(!D[N]){throw new Error("The following module has not been registered: "+N);}}L=[];for(N in D){if(YAHOO.lang.hasOwnProperty(D,N)){P=D[N];if(YAHOO.lang.hasOwnProperty(M,N)){O=M[N];}else{O=P.currentState;}N=escape(N);O=escape(O);L.push(N+"="+O);}}Q=L.jo!
 in("&");if(YAHOO.env.ua.ie){return J(Q);}else{top.location.has!
 h=Q;if(Y
AHOO.env.ua.webkit){B[history.length]=Q;A();}return true;}},getCurrentState:function(L){var M;if(typeof L!=="string"){throw new Error("Missing or invalid argument");}if(!F){throw new Error("The Browser History Manager is not initialized");}M=D[L];if(!M){throw new Error("No such registered module: "+L);}return unescape(M.currentState);},getBookmarkedState:function(Q){var P,M,L,S,N,R,O;if(typeof Q!=="string"){throw new Error("Missing or invalid argument");}L=top.location.href.indexOf("#");S=L>=0?top.location.href.substr(L+1):top.location.href;N=S.split("&");for(P=0,M=N.length;P<M;P++){R=N[P].split("=");if(R.length===2){O=R[0];if(O===Q){return unescape(R[1]);}}}return null;},getQueryStringParameter:function(Q,N){var O,M,L,S,R,P;N=N||top.location.href;L=N.indexOf("?");S=L>=0?N.substr(L+1):N;L=S.lastIndexOf("#");S=L>=0?S.substr(0,L):S;R=S.split("&");for(O=0,M=R.length;O<M;O++){P=R[O].split("=");if(P.length>=2){if(P[0]===Q){return unescape(P[1]);}}}return null;}};})();YAHOO.regist!
 er("history",YAHOO.util.History,{version:"2.4.1",build:"742"});
\ No newline at end of file

Added: trunk/root/static/yui/history/history.js
===================================================================
--- trunk/root/static/yui/history/history.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/history/history.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,789 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+/**
+ * The Browser History Manager provides the ability to use the back/forward
+ * navigation buttons in a DHTML application. It also allows a DHTML
+ * application to be bookmarked in a specific state.
+ *
+ * This library requires the following static markup:
+ *
+ * <iframe id="yui-history-iframe" src="path-to-real-asset-in-same-domain"></iframe>
+ * <input id="yui-history-field" type="hidden">
+ *
+ * @module history
+ * @requires yahoo,event
+ * @namespace YAHOO.util
+ * @title Browser History Manager
+ */
+
+/**
+ * The History class provides the ability to use the back/forward navigation
+ * buttons in a DHTML application. It also allows a DHTML application to
+ * be bookmarked in a specific state.
+ *
+ * @class History
+ * @constructor
+ */
+YAHOO.util.History = (function () {
+
+    /**
+     * Our hidden IFrame used to store the browsing history.
+     *
+     * @property _histFrame
+     * @type HTMLIFrameElement
+     * @default null
+     * @private
+     */
+    var _histFrame = null;
+
+    /**
+     * INPUT field (with type="hidden" or type="text") or TEXTAREA.
+     * This field keeps the value of the initial state, current state
+     * the list of all states across pages within a single browser session.
+     *
+     * @property _stateField
+     * @type HTMLInputElement|HTMLTextAreaElement
+     * @default null
+     * @private
+     */
+    var _stateField = null;
+
+    /**
+     * Flag used to tell whether YAHOO.util.History.initialize has been called.
+     *
+     * @property _initialized
+     * @type boolean
+     * @default false
+     * @private
+     */
+    var _initialized = false;
+
+    /**
+     * List of registered modules.
+     *
+     * @property _modules
+     * @type array
+     * @default []
+     * @private
+     */
+    var _modules = [];
+
+    /**
+     * List of fully qualified states. This is used only by Safari.
+     *
+     * @property _fqstates
+     * @type array
+     * @default []
+     * @private
+     */
+    var _fqstates = [];
+
+    /**
+     * location.hash is a bit buggy on Opera. I have seen instances where
+     * navigating the history using the back/forward buttons, and hence
+     * changing the URL, would not change location.hash. That's ok, the
+     * implementation of an equivalent is trivial.
+     *
+     * @method _getHash
+     * @return {string} The hash portion of the document's location
+     * @private
+     */
+    function _getHash() {
+        var i, href;
+        href = top.location.href;
+        i = href.indexOf("#");
+        return i >= 0 ? href.substr(i + 1) : null;
+    }
+
+    /**
+     * Stores all the registered modules' initial state and current state.
+     * On Safari, we also store all the fully qualified states visited by
+     * the application within a single browser session. The storage takes
+     * place in the form field specified during initialization.
+     *
+     * @method _storeStates
+     * @private
+     */
+    function _storeStates() {
+
+        var moduleName, moduleObj, initialStates = [], currentStates = [];
+
+        for (moduleName in _modules) {
+            if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) {
+                moduleObj = _modules[moduleName];
+                initialStates.push(moduleName + "=" + moduleObj.initialState);
+                currentStates.push(moduleName + "=" + moduleObj.currentState);
+            }
+        }
+
+        _stateField.value = initialStates.join("&") + "|" + currentStates.join("&");
+
+        if (YAHOO.env.ua.webkit) {
+            _stateField.value += "|" + _fqstates.join(",");
+        }
+    }
+
+    /**
+     * Sets the new currentState attribute of all modules depending on the new
+     * fully qualified state. Also notifies the modules which current state has
+     * changed.
+     *
+     * @method _handleFQStateChange
+     * @param {string} fqstate Fully qualified state
+     * @private
+     */
+    function _handleFQStateChange(fqstate) {
+
+        var i, len, moduleName, moduleObj, modules, states, tokens, currentState;
+
+        if (!fqstate) {
+            // Notifies all modules
+            for (moduleName in _modules) {
+                if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) {
+                    moduleObj = _modules[moduleName];
+                    moduleObj.currentState = moduleObj.initialState;
+                    moduleObj.onStateChange(unescape(moduleObj.currentState));
+                }
+            }
+            return;
+        }
+
+        modules = [];
+        states = fqstate.split("&");
+        for (i = 0, len = states.length; i < len; i++) {
+            tokens = states[i].split("=");
+            if (tokens.length === 2) {
+                moduleName = tokens[0];
+                currentState = tokens[1];
+                modules[moduleName] = currentState;
+            }
+        }
+
+        for (moduleName in _modules) {
+            if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) {
+                moduleObj = _modules[moduleName];
+                currentState = modules[moduleName];
+                if (!currentState || moduleObj.currentState !== currentState) {
+                    moduleObj.currentState = currentState || moduleObj.initialState;
+                    moduleObj.onStateChange(unescape(moduleObj.currentState));
+                }
+            }
+        }
+    }
+
+    /**
+     * Update the IFrame with our new state.
+     *
+     * @method _updateIFrame
+     * @private
+     * @return {boolean} true if successful. false otherwise.
+     */
+    function _updateIFrame (fqstate) {
+
+        var html, doc;
+
+        html = '<html><body><div id="state">' + fqstate + '</div></body></html>';
+
+        try {
+            doc = _histFrame.contentWindow.document;
+            doc.open();
+            doc.write(html);
+            doc.close();
+            return true;
+        } catch (e) {
+            return false;
+        }
+    }
+
+    /**
+     * Periodically checks whether our internal IFrame is ready to be used.
+     *
+     * @method _checkIframeLoaded
+     * @private
+     */
+    function _checkIframeLoaded() {
+
+        var doc, elem, fqstate, hash;
+
+        if (!_histFrame.contentWindow || !_histFrame.contentWindow.document) {
+            // Check again in 10 msec...
+            setTimeout(_checkIframeLoaded, 10);
+            return;
+        }
+
+        // Start the thread that will have the responsibility to
+        // periodically check whether a navigate operation has been
+        // requested on the main window. This will happen when
+        // YAHOO.util.History.navigate has been called or after
+        // the user has hit the back/forward button.
+
+        doc = _histFrame.contentWindow.document;
+        elem = doc.getElementById("state");
+        // We must use innerText, and not innerHTML because our string contains
+        // the "&" character (which would end up being escaped as "&") and
+        // the string comparison would fail...
+        fqstate = elem ? elem.innerText : null;
+
+        hash = _getHash();
+
+        setInterval(function () {
+
+            var newfqstate, states, moduleName, moduleObj, newHash, historyLength;
+
+            doc = _histFrame.contentWindow.document;
+            elem = doc.getElementById("state");
+            // See my comment above about using innerText instead of innerHTML...
+            newfqstate = elem ? elem.innerText : null;
+
+            newHash = _getHash();
+
+            if (newfqstate !== fqstate) {
+
+                fqstate = newfqstate;
+                _handleFQStateChange(fqstate);
+
+                if (!fqstate) {
+                    states = [];
+                    for (moduleName in _modules) {
+                        if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) {
+                            moduleObj = _modules[moduleName];
+                            states.push(moduleName + "=" + moduleObj.initialState);
+                        }
+                    }
+                    newHash = states.join("&");
+                } else {
+                    newHash = fqstate;
+                }
+
+                // Allow the state to be bookmarked by setting the top window's
+                // URL fragment identifier. Note that here, we are on IE, and
+                // IE does not touch the browser history when setting the hash
+                // (unlike all the other browsers). I used to write:
+                //     top.location.replace( "#" + hash );
+                // but this had a side effect when the page was not the top frame.
+                top.location.hash = newHash;
+                hash = newHash;
+
+                _storeStates();
+
+            } else if (newHash !== hash) {
+
+                // The hash has changed. The user might have clicked on a link,
+                // or modified the URL directly, or opened the same application
+                // bookmarked in a specific state using a bookmark. However, we
+                // know the hash change was not caused by a hit on the back or
+                // forward buttons, or by a call to navigate() (because it would
+                // have been handled above) We must handle these cases, which is
+                // why we also need to keep track of hash changes on IE!
+
+                // Note that IE6 has some major issues with this kind of user
+                // interaction (the history stack gets completely messed up)
+                // but it seems to work fine on IE7.
+
+                hash = newHash;
+
+                // Now, store a new history entry. The following will cause the
+                // code above to execute, doing all the dirty work for us...
+                _updateIFrame(newHash);
+            }
+
+        }, 50);
+
+        _initialized = true;
+        YAHOO.util.History.onLoadEvent.fire();
+    }
+
+    /**
+     * Finish up the initialization of the Browser History Manager.
+     *
+     * @method _initialize
+     * @private
+     */
+    function _initialize() {
+
+        var i, len, parts, tokens, moduleName, moduleObj, initialStates, initialState, currentStates, currentState, counter, hash;
+
+        // Decode the content of our storage field...
+        parts = _stateField.value.split("|");
+
+        if (parts.length > 1) {
+
+            initialStates = parts[0].split("&");
+            for (i = 0, len = initialStates.length; i < len; i++) {
+                tokens = initialStates[i].split("=");
+                if (tokens.length === 2) {
+                    moduleName = tokens[0];
+                    initialState = tokens[1];
+                    moduleObj = _modules[moduleName];
+                    if (moduleObj) {
+                        moduleObj.initialState = initialState;
+                    }
+                }
+            }
+
+            currentStates = parts[1].split("&");
+            for (i = 0, len = currentStates.length; i < len; i++) {
+                tokens = currentStates[i].split("=");
+                if (tokens.length >= 2) {
+                    moduleName = tokens[0];
+                    currentState = tokens[1];
+                    moduleObj = _modules[moduleName];
+                    if (moduleObj) {
+                        moduleObj.currentState = currentState;
+                    }
+                }
+            }
+        }
+
+        if (parts.length > 2) {
+            _fqstates = parts[2].split(",");
+        }
+
+        if (YAHOO.env.ua.ie) {
+
+            _checkIframeLoaded();
+
+        } else {
+
+            // Start the thread that will have the responsibility to
+            // periodically check whether a navigate operation has been
+            // requested on the main window. This will happen when
+            // YAHOO.util.History.navigate has been called or after
+            // the user has hit the back/forward button.
+
+            // On Safari 1.x and 2.0, the only way to catch a back/forward
+            // operation is to watch history.length... We basically exploit
+            // what I consider to be a bug (history.length is not supposed
+            // to change when going back/forward in the history...) This is
+            // why, in the following thread, we first compare the hash,
+            // because the hash thing will be fixed in the next major
+            // version of Safari. So even if they fix the history.length
+            // bug, all this will still work!
+            counter = history.length;
+
+            // On Gecko and Opera, we just need to watch the hash...
+            hash = _getHash();
+
+            setInterval(function () {
+
+                var state, newHash, newCounter;
+
+                newHash = _getHash();
+                newCounter = history.length;
+                if (newHash !== hash) {
+                    hash = newHash;
+                    counter = newCounter;
+                    _handleFQStateChange(hash);
+                    _storeStates();
+                } else if (newCounter !== counter && YAHOO.env.ua.webkit) {
+                    hash = newHash;
+                    counter = newCounter;
+                    state = _fqstates[counter - 1];
+                    _handleFQStateChange(state);
+                    _storeStates();
+                }
+
+            }, 50);
+
+            _initialized = true;
+            YAHOO.util.History.onLoadEvent.fire();
+        }
+    }
+
+    return {
+
+        /**
+         * Fired when the Browser History Manager is ready. If you subscribe to
+         * this event after the Browser History Manager has been initialized,
+         * it will not fire. Therefore, it is recommended to use the onReady
+         * method instead.
+         *
+         * @event onLoadEvent
+         * @see onReady
+         */
+        onLoadEvent: new YAHOO.util.CustomEvent("onLoad"),
+
+        /**
+         * Executes the supplied callback when the Browser History Manager is
+         * ready. This will execute immediately if called after the Browser
+         * History Manager onLoad event has fired.
+         *
+         * @method onReady
+         * @param {function} fn what to execute when the Browser History Manager is ready.
+         * @param {object} obj an optional object to be passed back as a parameter to fn.
+         * @param {boolean|object} override If true, the obj passed in becomes fn's execution scope.
+         * @see onLoadEvent
+         */
+        onReady: function (fn, obj, override) {
+
+            if (_initialized) {
+
+                setTimeout(function () {
+                    var ctx = window;
+                    if (override) {
+                        if (override === true) {
+                            ctx = obj;
+                        } else {
+                            ctx = override;
+                        }
+                    }
+                    fn.call(ctx, "onLoad", [], obj);
+                }, 0);
+
+            } else {
+
+                YAHOO.util.History.onLoadEvent.subscribe(fn, obj, override);
+
+            }
+        },
+
+        /**
+         * Registers a new module.
+         *
+         * @method register
+         * @param {string} module Non-empty string uniquely identifying the
+         *     module you wish to register.
+         * @param {string} initialState The initial state of the specified
+         *     module corresponding to its earliest history entry.
+         * @param {function} onStateChange Callback called when the
+         *     state of the specified module has changed.
+         * @param {object} obj An arbitrary object that will be passed as a
+         *     parameter to the handler.
+         * @param {boolean} override If true, the obj passed in becomes the
+         *     execution scope of the listener.
+         */
+        register: function (module, initialState, onStateChange, obj, override) {
+
+            var scope, wrappedFn;
+
+            if (typeof module !== "string" || YAHOO.lang.trim(module) === "" ||
+                typeof initialState !== "string" ||
+                typeof onStateChange !== "function") {
+                throw new Error("Missing or invalid argument");
+            }
+
+            if (_modules[module]) {
+                // Here, we used to throw an exception. However, users have
+                // complained about this behavior, so we now just return.
+                return;
+            }
+
+            // Note: A module CANNOT be registered after calling
+            // YAHOO.util.History.initialize. Indeed, we set the initial state
+            // of each registered module in YAHOO.util.History.initialize.
+            // If you could register a module after initializing the Browser
+            // History Manager, you would not read the correct state using
+            // YAHOO.util.History.getCurrentState when coming back to the
+            // page using the back button.
+            if (_initialized) {
+                throw new Error("All modules must be registered before calling YAHOO.util.History.initialize");
+            }
+
+            // Make sure the strings passed in do not contain our separators "," and "|"
+            module = escape(module);
+            initialState = escape(initialState);
+
+            // If the user chooses to override the scope, we use the
+            // custom object passed in as the execution scope.
+            scope = null;
+            if (override === true) {
+                scope = obj;
+            } else {
+                scope = override;
+            }
+
+            wrappedFn = function (state) {
+                return onStateChange.call(scope, state, obj);
+            };
+
+            _modules[module] = {
+                name: module,
+                initialState: initialState,
+                currentState: initialState,
+                onStateChange: wrappedFn
+            };
+        },
+
+        /**
+         * Initializes the Browser History Manager. Call this method
+         * from a script block located right after the opening body tag.
+         *
+         * @method initialize
+         * @param {string|HTML Element} stateField <input type="hidden"> used
+         *     to store application states. Must be in the static markup.
+         * @param {string|HTML Element} histFrame IFrame used to store
+         *     the history (only required on Internet Explorer)
+         * @public
+         */
+        initialize: function (stateField, histFrame) {
+
+            if (_initialized) {
+                // The browser history manager has already been initialized.
+                return;
+            }
+
+            if (YAHOO.env.ua.opera) {
+                // Opera cannot be supported because of several problems that
+                // have been reported to the Opera team, but never addressed:
+                //   1) Hash changes are not detected (started happening with
+                //      recent versions of Opera)
+                //   2) The entire DOM gets cached, so when you come back to
+                //      a page, the window's onload event does not get fired,
+                //      which prevents us from initializing the browser history
+                //      manager.
+                // As a consequence, the best thing we can do is to throw an
+                // exception. The application should catch it, and degrade
+                // gracefully. This is the sad state of history management.
+                throw new Error("Unsupported browser");
+            }
+
+            if (typeof stateField === "string") {
+                stateField = document.getElementById(stateField);
+            }
+
+            if (!stateField ||
+                stateField.tagName !== "TEXTAREA" &&
+                (stateField.tagName !== "INPUT" ||
+                 stateField.type !== "hidden" &&
+                 stateField.type !== "text")) {
+                throw new Error("Missing or invalid argument");
+            }
+
+            _stateField = stateField;
+
+            if (YAHOO.env.ua.ie) {
+
+                if (typeof histFrame === "string") {
+                    histFrame = document.getElementById(histFrame);
+                }
+
+                if (!histFrame || histFrame.tagName !== "IFRAME") {
+                    throw new Error("Missing or invalid argument");
+                }
+
+                _histFrame = histFrame;
+            }
+
+            // Note that the event utility MUST be included inline in the page.
+            // If it gets loaded later (which you may want to do to improve the
+            // loading speed of your site), the onDOMReady event never fires,
+            // and the history library never gets fully initialized.
+            YAHOO.util.Event.onDOMReady(_initialize);
+        },
+
+        /**
+         * Call this method when you want to store a new entry in the browser's history.
+         *
+         * @method navigate
+         * @param {string} module Non-empty string representing your module.
+         * @param {string} state String representing the new state of the specified module.
+         * @return {boolean} Indicates whether the new state was successfully added to the history.
+         * @public
+         */
+        navigate: function (module, state) {
+
+            var states;
+
+            if (typeof module !== "string" || typeof state !== "string") {
+                throw new Error("Missing or invalid argument");
+            }
+
+            states = {};
+            states[module] = state;
+
+            return YAHOO.util.History.multiNavigate(states);
+        },
+
+        /**
+         * Call this method when you want to store a new entry in the browser's history.
+         *
+         * @method multiNavigate
+         * @param {object} states Associative array of module-state pairs to set simultaneously.
+         * @return {boolean} Indicates whether the new state was successfully added to the history.
+         * @public
+         */
+        multiNavigate: function (states) {
+
+            var currentStates, moduleName, moduleObj, currentState, fqstate;
+
+            if (typeof states !== "object") {
+                throw new Error("Missing or invalid argument");
+            }
+
+            if (!_initialized) {
+                throw new Error("The Browser History Manager is not initialized");
+            }
+
+            for (moduleName in states) {
+                if (!_modules[moduleName]) {
+                    throw new Error("The following module has not been registered: " + moduleName);
+                }
+            }
+
+            // Generate our new full state string mod1=xxx&mod2=yyy
+            currentStates = [];
+
+            for (moduleName in _modules) {
+                if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) {
+                    moduleObj = _modules[moduleName];
+                    if (YAHOO.lang.hasOwnProperty(states, moduleName)) {
+                        currentState = states[moduleName];
+                    } else {
+                        currentState = moduleObj.currentState;
+                    }
+
+                    // Make sure the strings passed in do not contain our separators "," and "|"
+                    moduleName = escape(moduleName);
+                    currentState = escape(currentState);
+
+                    currentStates.push(moduleName + "=" + currentState);
+                }
+            }
+
+            fqstate = currentStates.join("&");
+
+            if (YAHOO.env.ua.ie) {
+
+                return _updateIFrame(fqstate);
+
+            } else {
+
+                // Known bug: On Safari 1.x and 2.0, if you have tab browsing
+                // enabled, Safari will show an endless loading icon in the
+                // tab. This has apparently been fixed in recent WebKit builds.
+                // One work around found by Dav Glass is to submit a form that
+                // points to the same document. This indeed works on Safari 1.x
+                // and 2.0 but creates bigger problems on WebKit. So for now,
+                // we'll consider this an acceptable bug, and hope that Apple
+                // comes out with their next version of Safari very soon.
+                top.location.hash = fqstate;
+                if (YAHOO.env.ua.webkit) {
+                    // The following two lines are only useful for Safari 1.x
+                    // and 2.0. Recent nightly builds of WebKit do not require
+                    // that, but unfortunately, it is not easy to differentiate
+                    // between the two. Once Safari 2.0 departs the A-grade
+                    // list, we can remove the following two lines...
+                    _fqstates[history.length] = fqstate;
+                    _storeStates();
+                }
+
+                return true;
+
+            }
+        },
+
+        /**
+         * Returns the current state of the specified module.
+         *
+         * @method getCurrentState
+         * @param {string} module Non-empty string representing your module.
+         * @return {string} The current state of the specified module.
+         * @public
+         */
+        getCurrentState: function (module) {
+
+            var moduleObj;
+
+            if (typeof module !== "string") {
+                throw new Error("Missing or invalid argument");
+            }
+
+            if (!_initialized) {
+                throw new Error("The Browser History Manager is not initialized");
+            }
+
+            moduleObj = _modules[module];
+            if (!moduleObj) {
+                throw new Error("No such registered module: " + module);
+            }
+
+            return unescape(moduleObj.currentState);
+        },
+
+        /**
+         * Returns the state of a module according to the URL fragment
+         * identifier. This method is useful to initialize your modules
+         * if your application was bookmarked from a particular state.
+         *
+         * @method getBookmarkedState
+         * @param {string} module Non-empty string representing your module.
+         * @return {string} The bookmarked state of the specified module.
+         * @public
+         */
+        getBookmarkedState: function (module) {
+
+            var i, len, idx, hash, states, tokens, moduleName;
+
+            if (typeof module !== "string") {
+                throw new Error("Missing or invalid argument");
+            }
+
+            // Use location.href instead of location.hash which is already
+            // URL-decoded, which creates problems if the state value
+            // contained special characters...
+            idx = top.location.href.indexOf("#");
+            hash = idx >= 0 ? top.location.href.substr(idx + 1) : top.location.href;
+
+            states = hash.split("&");
+            for (i = 0, len = states.length; i < len; i++) {
+                tokens = states[i].split("=");
+                if (tokens.length === 2) {
+                    moduleName = tokens[0];
+                    if (moduleName === module) {
+                        return unescape(tokens[1]);
+                    }
+                }
+            }
+
+            return null;
+        },
+
+        /**
+         * Returns the value of the specified query string parameter.
+         * This method is not used internally by the Browser History Manager.
+         * However, it is provided here as a helper since many applications
+         * using the Browser History Manager will want to read the value of
+         * url parameters to initialize themselves.
+         *
+         * @method getQueryStringParameter
+         * @param {string} paramName Name of the parameter we want to look up.
+         * @param {string} queryString Optional URL to look at. If not specified,
+         *     this method uses the URL in the address bar.
+         * @return {string} The value of the specified parameter, or null.
+         * @public
+         */
+        getQueryStringParameter: function (paramName, url) {
+
+            var i, len, idx, queryString, params, tokens;
+
+            url = url || top.location.href;
+
+            idx = url.indexOf("?");
+            queryString = idx >= 0 ? url.substr(idx + 1) : url;
+
+            // Remove the hash if any
+            idx = queryString.lastIndexOf("#");
+            queryString = idx >= 0 ? queryString.substr(0, idx) : queryString;
+
+            params = queryString.split("&");
+
+            for (i = 0, len = params.length; i < len; i++) {
+                tokens = params[i].split("=");
+                if (tokens.length >= 2) {
+                    if (tokens[0] === paramName) {
+                        return unescape(tokens[1]);
+                    }
+                }
+            }
+
+            return null;
+        }
+
+    };
+
+})();
+YAHOO.register("history", YAHOO.util.History, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/imageloader/README
===================================================================
--- trunk/root/static/yui/imageloader/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/imageloader/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,11 @@
 ImageLoader - Release Notes
 
+2.4.1
+   * No Change
+
+2.4.0
+   * No Change
+
 2.3.1
    * No Change
 

Added: trunk/root/static/yui/imageloader/imageloader-beta-debug.js
===================================================================
--- trunk/root/static/yui/imageloader/imageloader-beta-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/imageloader/imageloader-beta-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,442 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+/**
+ * The image loader is a framework to dynamically load images
+ * according to certain triggers, enabling faster load times
+ * and a more responsive UI.
+ *
+ * @module imageloader
+ * @namespace YAHOO.util
+ * @experimental
+ */
+
+if (typeof(YAHOO.util.ImageLoader) == 'undefined') {
+	YAHOO.util.ImageLoader = {};
+}
+
+/**
+ * A group for images. A group can have one time limit and a series of triggers. Thus the images belonging to this group must share these constraints.
+ * @class YAHOO.util.ImageLoader.group
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @constructor
+ * @param {String|HTMLElement}	trigEl	The HTML element id or reference to assign the trigger event to. Can be null for no trigger
+ * @param {String}	trigAct The type of event to assign to trigEl. Can be null for no trigger
+ * @param {Number}	timeout	Timeout (time limit) length, in seconds. Can be undefined, or <= 0, for no time limit
+ */
+YAHOO.util.ImageLoader.group = function(trigEl, trigAct, timeout) {
+	/**
+	 * Name for the group. Only used to identify the group in logging statements
+	 * @property name
+	 * @type String
+	 */
+	this.name = 'unnamed';
+	
+	/**
+	 * Collection of images registered with this group
+	 * @property _imgObjs
+	 * @private
+	 * @type Object
+	 */
+	this._imgObjs = {};
+	
+	/**
+	 * Timeout (time limit) length, in seconds
+	 * @property timeoutLen
+	 * @type Number
+	 */
+	this.timeoutLen = timeout;
+	
+	/**
+	 * Timeout object to keep a handle on the time limit
+	 * @property _timeout
+	 * @private
+	 * @type Object
+	 */
+	this._timeout = null;
+	
+	/**
+	 * Collection of triggers for this group.
+	 * Keeps track of each trigger's element, event, and event-listener-callback "fetch" function
+	 * @property _triggers
+	 * @private
+	 * @type Array
+	 */
+	this._triggers = [];
+
+	/**
+	 * Flag to check if images are above the fold. If foldConditional is true, the group will check each of its image locations at page load. If any part of the image is within the client viewport, the image is displayed immediately
+	 * @property foldConditional
+	 * @type Boolean
+	 */
+	this.foldConditional = false;
+
+	/**
+	 * Class name that will identify images belonging to the group. This class name will be removed from each element in order to fetch images.
+	 * This class should have, in its CSS style definition, "background:none !important;"
+	 * @property className
+	 * @type String
+	 */
+	this.className = null;
+
+	/**
+	 * HTML elements having the class name that is associated with this group
+	 * Elements are stored during the _foldCheck function and reused later during the fetch function. Gives a slight performance improvement when className and foldConditional are both used
+	 * @property _classImageEls
+	 * @private
+	 * @type Array
+	 */
+	this._classImageEls = null;
+
+	// add a listener to set the time limit in the onload
+	YAHOO.util.Event.addListener(window, 'load', this._onloadTasks, this, true);
+	// add the trigger
+	this.addTrigger(trigEl, trigAct);
+
+};
+
+/**
+ * Adds a trigger to the group. Call this with the same style as YAHOO.util.Event.addListener
+ * @method addTrigger
+ * @param {String|HTMLElement} trigEl  The HTML element id or reference to assign the trigger event to
+ * @param {String} trigAct The type of event to assign to trigEl
+ */
+YAHOO.util.ImageLoader.group.prototype.addTrigger = function(trigEl, trigAct) {
+	if (! trigEl || ! trigAct) {
+		return;
+	}
+	/* Need to wrap the fetch function. Event Util can't distinguish prototyped functions of different instantiations
+	 *   Leads to this scenario: groupA and groupZ both have window-scroll triggers. groupZ also has a 2-sec timeout (groupA has no timeout).
+	 *   groupZ's timeout fires; we remove the triggers. The removeListener call finds the first window-scroll event with Y.u.IL.p.fetch, which is groupA's. 
+	 *   groupA's trigger is removed and never fires, leaving images unfetched
+	 */
+	var wrappedFetch = function() {
+		this.fetch();
+	};
+	this._triggers.push([trigEl, trigAct, wrappedFetch]);
+	YAHOO.util.Event.addListener(trigEl, trigAct, wrappedFetch, this, true);
+};
+
+/**
+ * Setup to do in the window's onload
+ * Initiates time limit for group; executes the fold check for the images
+ * @method _onloadTasks
+ * @private
+ */
+YAHOO.util.ImageLoader.group.prototype._onloadTasks = function() {
+	if (this.timeoutLen && typeof(this.timeoutLen) == 'number' && this.timeoutLen > 0) {
+		this._timeout = setTimeout(this._getFetchTimeout(), this.timeoutLen * 1000);
+	}
+
+	if (this.foldConditional) {
+		this._foldCheck();
+	}
+};
+
+/**
+ * Returns the group's fetch method, with the proper closure, for use with setTimeout
+ * @method _getFetchTimeout
+ * @return {Function}  group's fetch method
+ * @private
+ */
+YAHOO.util.ImageLoader.group.prototype._getFetchTimeout = function() {
+	var self = this;
+	return function() { self.fetch(); };
+};
+
+/**
+ * Registers a background image with the group
+ * @method registerBgImage
+ * @param {String}	domId	HTML DOM id of the image element
+ * @param {String}	url	URL for the image
+ * @return {Object}	bgImgObj that was registered, for modifying any attributes in the object
+ */
+YAHOO.util.ImageLoader.group.prototype.registerBgImage = function(domId, url) {
+	this._imgObjs[domId] = new YAHOO.util.ImageLoader.bgImgObj(domId, url);
+	return this._imgObjs[domId];
+};
+/**
+ * Registers a src image with the group
+ * @method registerSrcImage
+ * @param {String}	domId	HTML DOM id of the image element
+ * @param {String}	url	URL for the image
+ * @param {Int}	width	pixel width of the image - defaults to image's natural size
+ * @param {Int}	height	pixel height of the image - defaults to image's natural size
+ * @return {Object}	srcImgObj that was registered, for modifying any attributes in the object
+ */
+YAHOO.util.ImageLoader.group.prototype.registerSrcImage = function(domId, url, width, height) {
+	this._imgObjs[domId] = new YAHOO.util.ImageLoader.srcImgObj(domId, url, width, height);
+	return this._imgObjs[domId];
+};
+/**
+ * Registers an alpha-channel-type png background image with the group
+ * @method registerPngBgImage
+ * @param {String}	domId	HTML DOM id of the image element
+ * @param {String}	url	URL for the image
+ * @return {Object}	pngBgImgObj that was registered, for modifying any attributes in the object
+ */
+YAHOO.util.ImageLoader.group.prototype.registerPngBgImage = function(domId, url) {
+	this._imgObjs[domId] = new YAHOO.util.ImageLoader.pngBgImgObj(domId, url);
+	return this._imgObjs[domId];
+};
+
+/**
+ * Displays the images in the group
+ * @method fetch
+ */
+YAHOO.util.ImageLoader.group.prototype.fetch = function() {
+	YAHOO.log('Fetching images in group: "' + this.name + '".', 'info', 'imageloader');
+
+	clearTimeout(this._timeout);
+	// remove all listeners
+	for (var i=0; i < this._triggers.length; i++) {
+		YAHOO.util.Event.removeListener(this._triggers[i][0], this._triggers[i][1], this._triggers[i][2]);
+	}
+
+	// fetch whatever we need to by className
+	this._fetchByClass();
+
+	// fetch registered images
+	for (var id in this._imgObjs) {
+		if (YAHOO.lang.hasOwnProperty(this._imgObjs, id)) {
+			this._imgObjs[id].fetch();
+		}
+	}
+};
+
+/**
+ * Checks the position of each image in the group. If any part of the image is within the client viewport, shows the image immediately.
+ * @method _foldCheck
+ * @private
+ */
+YAHOO.util.ImageLoader.group.prototype._foldCheck = function() {
+	YAHOO.log('Checking for images above the fold in group: "' + this.name + '"', 'info', 'imageloader');
+	var scrollTop = (document.compatMode != 'CSS1Compat') ? document.body.scrollTop : document.documentElement.scrollTop;
+	var viewHeight = YAHOO.util.Dom.getViewportHeight();
+	var hLimit = scrollTop + viewHeight;
+	var scrollLeft = (document.compatMode != 'CSS1Compat') ? document.body.scrollLeft : document.documentElement.scrollLeft;
+	var viewWidth = YAHOO.util.Dom.getViewportWidth();
+	var wLimit = scrollLeft + viewWidth;
+	for (var id in this._imgObjs) {
+		if (YAHOO.lang.hasOwnProperty(this._imgObjs, id)) {
+			var elPos = YAHOO.util.Dom.getXY(this._imgObjs[id].domId);
+			if (elPos[1] < hLimit && elPos[0] < wLimit) {
+				YAHOO.log('Image with id "' + this._imgObjs[id].domId + '" is above the fold. Fetching image.', 'info', 'imageloader');
+				this._imgObjs[id].fetch();
+			}
+		}
+	}
+	// and by class
+	if (this.className) {
+		this._classImageEls = YAHOO.util.Dom.getElementsByClassName(this.className);
+		for (var i=0; i < this._classImageEls.length; i++) {
+			var elPos = YAHOO.util.Dom.getXY(this._classImageEls[i]);
+			if (elPos[1] < hLimit && elPos[0] < wLimit) {
+				YAHOO.log('Image with id "' + this._classImageEls[i].id + '" is above the fold. Fetching image. (Image registered by class name with the group - may not have an id.)', 'info', 'imageloader');
+				YAHOO.util.Dom.removeClass(this._classImageEls[i], this.className);
+			}
+		}
+	}
+};
+
+/**
+ * Finds all elements in the Dom with the class name specified in the group. Removes the class from the element in order to let the style definitions trigger the image fetching
+ * @method _fetchByClass
+ * @private
+ */
+YAHOO.util.ImageLoader.group.prototype._fetchByClass = function() {
+	if (! this.className) {
+		return;
+	}
+
+	YAHOO.log('Fetching all images with class "' + this.className + '" in group "' + this.name + '".', 'info', 'imageloader');
+	// this._classImageEls may have been set during _foldCheck
+	if (this._classImageEls === null) {
+		this._classImageEls = YAHOO.util.Dom.getElementsByClassName(this.className);
+	}
+	YAHOO.util.Dom.removeClass(this._classImageEls, this.className);
+};
+
+
+/**
+ * Base class for image objects to be registered with the groups
+ * @class YAHOO.util.ImageLoader.imgObj
+ * @constructor
+ * @param {String}	domId	HTML DOM id of the image element
+ * @param {String}	url	URL for the image
+ */
+YAHOO.util.ImageLoader.imgObj = function(domId, url) {
+	/**
+	 * HTML DOM id of the image element
+	 * @property domId
+	 * @type String
+	 */
+	this.domId = domId;
+
+	/**
+	 * URL for the image
+	 * @property url
+	 * @type String
+	 */
+	this.url = url;
+
+	/**
+	 * Pixel width of the image. Will be set as a "width" attribute after the image is fetched.
+	 * Detaults to the natural width of the image.
+	 * Only appropriate with src images
+	 * @property width
+	 * @type Int
+	 */
+	this.width = null;
+
+	/**
+	 * Pixel height of the image. Will be set as a "height" attribute after the image is fetched.
+	 * Detaults to the natural height of the image.
+	 * Only appropriate with src images
+	 * @property height
+	 * @type Int
+	 */
+	this.height = null;
+
+	/**
+	 * Whether the style.visibility should be set to "visible" after the image is fetched.
+	 * Used when setting src images as visibility:hidden prior to image fetching
+	 * @property setVisible
+	 * @type Boolean
+	 */
+	this.setVisible = false;
+
+	/**
+	 * Whether the image has already been fetched. In the case of a foldCondional group, keeps track for when the trigger is fired so images aren't fetched twice
+	 * @property _fetched
+	 * @type Boolean
+	 * @private
+	 */
+	this._fetched = false;
+};
+
+/**
+ * Displays the image; puts the URL into the DOM
+ * @method fetch
+ */
+YAHOO.util.ImageLoader.imgObj.prototype.fetch = function() {
+	if (this._fetched) {
+		return;
+	}
+	var el = document.getElementById(this.domId);
+	if (! el) {
+		return;
+	}
+	YAHOO.log('Fetching image with id "' + this.domId + '".', 'info', 'imageloader');
+	this._applyUrl(el);
+
+	if (this.setVisible) {
+		el.style.visibility = 'visible';
+	}
+	if (this.width) {
+		el.width = this.width;
+	}
+	if (this.height) {
+		el.height = this.height;
+	}
+	this._fetched = true;
+};
+
+/**
+ * Inserts the image URL into the DOM so that the image is displayed.
+ * Must be overridden by child class
+ * @method _applyUrl
+ * @param {Object}	el	HTML DOM element
+ * @private
+ */
+YAHOO.util.ImageLoader.imgObj.prototype._applyUrl = function(el) {
+};
+
+/**
+ * Background image object. A background image is one whose URL is specified by "background-image" in the element's style
+ * @class YAHOO.util.ImageLoader.bgImgObj
+ * @constructor
+ * @extends YAHOO.util.ImageLoader.imgObj
+ * @param {String}	domId	HTML DOM id of the image element
+ * @param {String}	url	URL for the image
+ */
+YAHOO.util.ImageLoader.bgImgObj = function(domId, url) {
+	YAHOO.util.ImageLoader.bgImgObj.superclass.constructor.call(this, domId, url);
+};
+
+YAHOO.lang.extend(YAHOO.util.ImageLoader.bgImgObj, YAHOO.util.ImageLoader.imgObj);
+
+/**
+ * Inserts the image URL into the DOM so that the image is displayed.
+ * Sets style.backgroundImage
+ * @method _applyUrl
+ * @param {Object}	el	HTML DOM element
+ * @private
+ */
+YAHOO.util.ImageLoader.bgImgObj.prototype._applyUrl = function(el) {
+	el.style.backgroundImage = "url('" + this.url + "')";
+};
+
+/**
+ * Source image object. A source image is one whose URL is specified by a src attribute in the DOM element
+ * @class YAHOO.util.ImageLoader.srcImgObj
+ * @constructor
+ * @extends YAHOO.util.ImageLoader.imgObj
+ * @param {String}	domId	HTML DOM id of the image element
+ * @param {String}	url	URL for the image
+ * @param {Int}	width	pixel width of the image - defaults to image's natural size
+ * @param {Int}	height	pixel height of the image - defaults to image's natural size
+ */
+YAHOO.util.ImageLoader.srcImgObj = function(domId, url, width, height) {
+	YAHOO.util.ImageLoader.srcImgObj.superclass.constructor.call(this, domId, url);
+	this.width = width;
+	this.height = height;
+};
+
+YAHOO.lang.extend(YAHOO.util.ImageLoader.srcImgObj, YAHOO.util.ImageLoader.imgObj);
+
+/**
+ * Inserts the image URL into the DOM so that the image is displayed.
+ * Sets src
+ * @method _applyUrl
+ * @param {Object}	el	HTML DOM element
+ * @private
+ */
+YAHOO.util.ImageLoader.srcImgObj.prototype._applyUrl = function(el) {
+	el.src = this.url;
+};
+
+/**
+ * PNG background image object. A PNG background image is one whose URL is specified through AlphaImageLoader or by "background-image" in the element's style
+ * @class YAHOO.util.ImageLoader.pngBgImgObj
+ * @constructor
+ * @extends YAHOO.util.ImageLoader.imgObj
+ * @param {String}	domId	HTML DOM id of the image element
+ * @param {String}	url	URL for the image
+ */
+YAHOO.util.ImageLoader.pngBgImgObj = function(domId, url) {
+	YAHOO.util.ImageLoader.pngBgImgObj.superclass.constructor.call(this, domId, url);
+};
+
+YAHOO.lang.extend(YAHOO.util.ImageLoader.pngBgImgObj, YAHOO.util.ImageLoader.imgObj);
+
+/**
+ * Inserts the image URL into the DOM so that the image is displayed.
+ * If the browser is determined to be IE6 (or older), sets the AlphaImageLoader src; otherwise sets style.backgroundImage
+ * @method _applyUrl
+ * @param {Object}	el	HTML DOM element
+ * @private
+ */
+YAHOO.util.ImageLoader.pngBgImgObj.prototype._applyUrl = function(el) {
+	if (YAHOO.env.ua.ie && YAHOO.env.ua.ie <= 6) {
+		el.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + this.url + '", sizingMethod="scale")';
+	}
+	else {
+		el.style.backgroundImage = "url('" + this.url + "')";
+	}
+};
+YAHOO.register("imageloader", YAHOO.util.ImageLoader, {version: "2.4.1", build: "742"});

Added: trunk/root/static/yui/imageloader/imageloader-beta-min.js
===================================================================
--- trunk/root/static/yui/imageloader/imageloader-beta-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/imageloader/imageloader-beta-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+if(typeof (YAHOO.util.ImageLoader)=="undefined"){YAHOO.util.ImageLoader={};}YAHOO.util.ImageLoader.group=function(A,B,C){this.name="unnamed";this._imgObjs={};this.timeoutLen=C;this._timeout=null;this._triggers=[];this.foldConditional=false;this.className=null;this._classImageEls=null;YAHOO.util.Event.addListener(window,"load",this._onloadTasks,this,true);this.addTrigger(A,B);};YAHOO.util.ImageLoader.group.prototype.addTrigger=function(B,C){if(!B||!C){return ;}var A=function(){this.fetch();};this._triggers.push([B,C,A]);YAHOO.util.Event.addListener(B,C,A,this,true);};YAHOO.util.ImageLoader.group.prototype._onloadTasks=function(){if(this.timeoutLen&&typeof (this.timeoutLen)=="number"&&this.timeoutLen>0){this._timeout=setTimeout(this._getFetchTimeout(),this.timeoutLen*1000);}if(this.foldConditional){this._foldCheck();}};YAHOO.util.ImageLoader.group.prototype._getFetchTimeout=function(){var A=this;return function(){A.fetch();};};YAHOO.util.ImageLoader.group.prototype.registerBg!
 Image=function(B,A){this._imgObjs[B]=new YAHOO.util.ImageLoader.bgImgObj(B,A);return this._imgObjs[B];};YAHOO.util.ImageLoader.group.prototype.registerSrcImage=function(D,B,C,A){this._imgObjs[D]=new YAHOO.util.ImageLoader.srcImgObj(D,B,C,A);return this._imgObjs[D];};YAHOO.util.ImageLoader.group.prototype.registerPngBgImage=function(B,A){this._imgObjs[B]=new YAHOO.util.ImageLoader.pngBgImgObj(B,A);return this._imgObjs[B];};YAHOO.util.ImageLoader.group.prototype.fetch=function(){clearTimeout(this._timeout);for(var A=0;A<this._triggers.length;A++){YAHOO.util.Event.removeListener(this._triggers[A][0],this._triggers[A][1],this._triggers[A][2]);}this._fetchByClass();for(var B in this._imgObjs){if(YAHOO.lang.hasOwnProperty(this._imgObjs,B)){this._imgObjs[B].fetch();}}};YAHOO.util.ImageLoader.group.prototype._foldCheck=function(){var C=(document.compatMode!="CSS1Compat")?document.body.scrollTop:document.documentElement.scrollTop;var D=YAHOO.util.Dom.getViewportHeight();var A=C+D;va!
 r E=(document.compatMode!="CSS1Compat")?document.body.scrollLe!
 ft:docum
ent.documentElement.scrollLeft;var G=YAHOO.util.Dom.getViewportWidth();var H=E+G;for(var B in this._imgObjs){if(YAHOO.lang.hasOwnProperty(this._imgObjs,B)){var I=YAHOO.util.Dom.getXY(this._imgObjs[B].domId);if(I[1]<A&&I[0]<H){this._imgObjs[B].fetch();}}}if(this.className){this._classImageEls=YAHOO.util.Dom.getElementsByClassName(this.className);for(var F=0;F<this._classImageEls.length;F++){var I=YAHOO.util.Dom.getXY(this._classImageEls[F]);if(I[1]<A&&I[0]<H){YAHOO.util.Dom.removeClass(this._classImageEls[F],this.className);}}}};YAHOO.util.ImageLoader.group.prototype._fetchByClass=function(){if(!this.className){return ;}if(this._classImageEls===null){this._classImageEls=YAHOO.util.Dom.getElementsByClassName(this.className);}YAHOO.util.Dom.removeClass(this._classImageEls,this.className);};YAHOO.util.ImageLoader.imgObj=function(B,A){this.domId=B;this.url=A;this.width=null;this.height=null;this.setVisible=false;this._fetched=false;};YAHOO.util.ImageLoader.imgObj.prototype.fetch=!
 function(){if(this._fetched){return ;}var A=document.getElementById(this.domId);if(!A){return ;}this._applyUrl(A);if(this.setVisible){A.style.visibility="visible";}if(this.width){A.width=this.width;}if(this.height){A.height=this.height;}this._fetched=true;};YAHOO.util.ImageLoader.imgObj.prototype._applyUrl=function(A){};YAHOO.util.ImageLoader.bgImgObj=function(B,A){YAHOO.util.ImageLoader.bgImgObj.superclass.constructor.call(this,B,A);};YAHOO.lang.extend(YAHOO.util.ImageLoader.bgImgObj,YAHOO.util.ImageLoader.imgObj);YAHOO.util.ImageLoader.bgImgObj.prototype._applyUrl=function(A){A.style.backgroundImage="url('"+this.url+"')";};YAHOO.util.ImageLoader.srcImgObj=function(D,B,C,A){YAHOO.util.ImageLoader.srcImgObj.superclass.constructor.call(this,D,B);this.width=C;this.height=A;};YAHOO.lang.extend(YAHOO.util.ImageLoader.srcImgObj,YAHOO.util.ImageLoader.imgObj);YAHOO.util.ImageLoader.srcImgObj.prototype._applyUrl=function(A){A.src=this.url;};YAHOO.util.ImageLoader.pngBgImgObj=funct!
 ion(B,A){YAHOO.util.ImageLoader.pngBgImgObj.superclass.constru!
 ctor.cal
l(this,B,A);};YAHOO.lang.extend(YAHOO.util.ImageLoader.pngBgImgObj,YAHOO.util.ImageLoader.imgObj);YAHOO.util.ImageLoader.pngBgImgObj.prototype._applyUrl=function(A){if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6){A.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\""+this.url+"\", sizingMethod=\"scale\")";}else{A.style.backgroundImage="url('"+this.url+"')";}};YAHOO.register("imageloader",YAHOO.util.ImageLoader,{version:"2.4.1",build:"742"});
\ No newline at end of file

Added: trunk/root/static/yui/imageloader/imageloader-beta.js
===================================================================
--- trunk/root/static/yui/imageloader/imageloader-beta.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/imageloader/imageloader-beta.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,436 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+/**
+ * The image loader is a framework to dynamically load images
+ * according to certain triggers, enabling faster load times
+ * and a more responsive UI.
+ *
+ * @module imageloader
+ * @namespace YAHOO.util
+ * @experimental
+ */
+
+if (typeof(YAHOO.util.ImageLoader) == 'undefined') {
+	YAHOO.util.ImageLoader = {};
+}
+
+/**
+ * A group for images. A group can have one time limit and a series of triggers. Thus the images belonging to this group must share these constraints.
+ * @class YAHOO.util.ImageLoader.group
+ * @requires YAHOO.util.Dom
+ * @requires YAHOO.util.Event
+ * @constructor
+ * @param {String|HTMLElement}	trigEl	The HTML element id or reference to assign the trigger event to. Can be null for no trigger
+ * @param {String}	trigAct The type of event to assign to trigEl. Can be null for no trigger
+ * @param {Number}	timeout	Timeout (time limit) length, in seconds. Can be undefined, or <= 0, for no time limit
+ */
+YAHOO.util.ImageLoader.group = function(trigEl, trigAct, timeout) {
+	/**
+	 * Name for the group. Only used to identify the group in logging statements
+	 * @property name
+	 * @type String
+	 */
+	this.name = 'unnamed';
+	
+	/**
+	 * Collection of images registered with this group
+	 * @property _imgObjs
+	 * @private
+	 * @type Object
+	 */
+	this._imgObjs = {};
+	
+	/**
+	 * Timeout (time limit) length, in seconds
+	 * @property timeoutLen
+	 * @type Number
+	 */
+	this.timeoutLen = timeout;
+	
+	/**
+	 * Timeout object to keep a handle on the time limit
+	 * @property _timeout
+	 * @private
+	 * @type Object
+	 */
+	this._timeout = null;
+	
+	/**
+	 * Collection of triggers for this group.
+	 * Keeps track of each trigger's element, event, and event-listener-callback "fetch" function
+	 * @property _triggers
+	 * @private
+	 * @type Array
+	 */
+	this._triggers = [];
+
+	/**
+	 * Flag to check if images are above the fold. If foldConditional is true, the group will check each of its image locations at page load. If any part of the image is within the client viewport, the image is displayed immediately
+	 * @property foldConditional
+	 * @type Boolean
+	 */
+	this.foldConditional = false;
+
+	/**
+	 * Class name that will identify images belonging to the group. This class name will be removed from each element in order to fetch images.
+	 * This class should have, in its CSS style definition, "background:none !important;"
+	 * @property className
+	 * @type String
+	 */
+	this.className = null;
+
+	/**
+	 * HTML elements having the class name that is associated with this group
+	 * Elements are stored during the _foldCheck function and reused later during the fetch function. Gives a slight performance improvement when className and foldConditional are both used
+	 * @property _classImageEls
+	 * @private
+	 * @type Array
+	 */
+	this._classImageEls = null;
+
+	// add a listener to set the time limit in the onload
+	YAHOO.util.Event.addListener(window, 'load', this._onloadTasks, this, true);
+	// add the trigger
+	this.addTrigger(trigEl, trigAct);
+
+};
+
+/**
+ * Adds a trigger to the group. Call this with the same style as YAHOO.util.Event.addListener
+ * @method addTrigger
+ * @param {String|HTMLElement} trigEl  The HTML element id or reference to assign the trigger event to
+ * @param {String} trigAct The type of event to assign to trigEl
+ */
+YAHOO.util.ImageLoader.group.prototype.addTrigger = function(trigEl, trigAct) {
+	if (! trigEl || ! trigAct) {
+		return;
+	}
+	/* Need to wrap the fetch function. Event Util can't distinguish prototyped functions of different instantiations
+	 *   Leads to this scenario: groupA and groupZ both have window-scroll triggers. groupZ also has a 2-sec timeout (groupA has no timeout).
+	 *   groupZ's timeout fires; we remove the triggers. The removeListener call finds the first window-scroll event with Y.u.IL.p.fetch, which is groupA's. 
+	 *   groupA's trigger is removed and never fires, leaving images unfetched
+	 */
+	var wrappedFetch = function() {
+		this.fetch();
+	};
+	this._triggers.push([trigEl, trigAct, wrappedFetch]);
+	YAHOO.util.Event.addListener(trigEl, trigAct, wrappedFetch, this, true);
+};
+
+/**
+ * Setup to do in the window's onload
+ * Initiates time limit for group; executes the fold check for the images
+ * @method _onloadTasks
+ * @private
+ */
+YAHOO.util.ImageLoader.group.prototype._onloadTasks = function() {
+	if (this.timeoutLen && typeof(this.timeoutLen) == 'number' && this.timeoutLen > 0) {
+		this._timeout = setTimeout(this._getFetchTimeout(), this.timeoutLen * 1000);
+	}
+
+	if (this.foldConditional) {
+		this._foldCheck();
+	}
+};
+
+/**
+ * Returns the group's fetch method, with the proper closure, for use with setTimeout
+ * @method _getFetchTimeout
+ * @return {Function}  group's fetch method
+ * @private
+ */
+YAHOO.util.ImageLoader.group.prototype._getFetchTimeout = function() {
+	var self = this;
+	return function() { self.fetch(); };
+};
+
+/**
+ * Registers a background image with the group
+ * @method registerBgImage
+ * @param {String}	domId	HTML DOM id of the image element
+ * @param {String}	url	URL for the image
+ * @return {Object}	bgImgObj that was registered, for modifying any attributes in the object
+ */
+YAHOO.util.ImageLoader.group.prototype.registerBgImage = function(domId, url) {
+	this._imgObjs[domId] = new YAHOO.util.ImageLoader.bgImgObj(domId, url);
+	return this._imgObjs[domId];
+};
+/**
+ * Registers a src image with the group
+ * @method registerSrcImage
+ * @param {String}	domId	HTML DOM id of the image element
+ * @param {String}	url	URL for the image
+ * @param {Int}	width	pixel width of the image - defaults to image's natural size
+ * @param {Int}	height	pixel height of the image - defaults to image's natural size
+ * @return {Object}	srcImgObj that was registered, for modifying any attributes in the object
+ */
+YAHOO.util.ImageLoader.group.prototype.registerSrcImage = function(domId, url, width, height) {
+	this._imgObjs[domId] = new YAHOO.util.ImageLoader.srcImgObj(domId, url, width, height);
+	return this._imgObjs[domId];
+};
+/**
+ * Registers an alpha-channel-type png background image with the group
+ * @method registerPngBgImage
+ * @param {String}	domId	HTML DOM id of the image element
+ * @param {String}	url	URL for the image
+ * @return {Object}	pngBgImgObj that was registered, for modifying any attributes in the object
+ */
+YAHOO.util.ImageLoader.group.prototype.registerPngBgImage = function(domId, url) {
+	this._imgObjs[domId] = new YAHOO.util.ImageLoader.pngBgImgObj(domId, url);
+	return this._imgObjs[domId];
+};
+
+/**
+ * Displays the images in the group
+ * @method fetch
+ */
+YAHOO.util.ImageLoader.group.prototype.fetch = function() {
+
+	clearTimeout(this._timeout);
+	// remove all listeners
+	for (var i=0; i < this._triggers.length; i++) {
+		YAHOO.util.Event.removeListener(this._triggers[i][0], this._triggers[i][1], this._triggers[i][2]);
+	}
+
+	// fetch whatever we need to by className
+	this._fetchByClass();
+
+	// fetch registered images
+	for (var id in this._imgObjs) {
+		if (YAHOO.lang.hasOwnProperty(this._imgObjs, id)) {
+			this._imgObjs[id].fetch();
+		}
+	}
+};
+
+/**
+ * Checks the position of each image in the group. If any part of the image is within the client viewport, shows the image immediately.
+ * @method _foldCheck
+ * @private
+ */
+YAHOO.util.ImageLoader.group.prototype._foldCheck = function() {
+	var scrollTop = (document.compatMode != 'CSS1Compat') ? document.body.scrollTop : document.documentElement.scrollTop;
+	var viewHeight = YAHOO.util.Dom.getViewportHeight();
+	var hLimit = scrollTop + viewHeight;
+	var scrollLeft = (document.compatMode != 'CSS1Compat') ? document.body.scrollLeft : document.documentElement.scrollLeft;
+	var viewWidth = YAHOO.util.Dom.getViewportWidth();
+	var wLimit = scrollLeft + viewWidth;
+	for (var id in this._imgObjs) {
+		if (YAHOO.lang.hasOwnProperty(this._imgObjs, id)) {
+			var elPos = YAHOO.util.Dom.getXY(this._imgObjs[id].domId);
+			if (elPos[1] < hLimit && elPos[0] < wLimit) {
+				this._imgObjs[id].fetch();
+			}
+		}
+	}
+	// and by class
+	if (this.className) {
+		this._classImageEls = YAHOO.util.Dom.getElementsByClassName(this.className);
+		for (var i=0; i < this._classImageEls.length; i++) {
+			var elPos = YAHOO.util.Dom.getXY(this._classImageEls[i]);
+			if (elPos[1] < hLimit && elPos[0] < wLimit) {
+				YAHOO.util.Dom.removeClass(this._classImageEls[i], this.className);
+			}
+		}
+	}
+};
+
+/**
+ * Finds all elements in the Dom with the class name specified in the group. Removes the class from the element in order to let the style definitions trigger the image fetching
+ * @method _fetchByClass
+ * @private
+ */
+YAHOO.util.ImageLoader.group.prototype._fetchByClass = function() {
+	if (! this.className) {
+		return;
+	}
+
+	// this._classImageEls may have been set during _foldCheck
+	if (this._classImageEls === null) {
+		this._classImageEls = YAHOO.util.Dom.getElementsByClassName(this.className);
+	}
+	YAHOO.util.Dom.removeClass(this._classImageEls, this.className);
+};
+
+
+/**
+ * Base class for image objects to be registered with the groups
+ * @class YAHOO.util.ImageLoader.imgObj
+ * @constructor
+ * @param {String}	domId	HTML DOM id of the image element
+ * @param {String}	url	URL for the image
+ */
+YAHOO.util.ImageLoader.imgObj = function(domId, url) {
+	/**
+	 * HTML DOM id of the image element
+	 * @property domId
+	 * @type String
+	 */
+	this.domId = domId;
+
+	/**
+	 * URL for the image
+	 * @property url
+	 * @type String
+	 */
+	this.url = url;
+
+	/**
+	 * Pixel width of the image. Will be set as a "width" attribute after the image is fetched.
+	 * Detaults to the natural width of the image.
+	 * Only appropriate with src images
+	 * @property width
+	 * @type Int
+	 */
+	this.width = null;
+
+	/**
+	 * Pixel height of the image. Will be set as a "height" attribute after the image is fetched.
+	 * Detaults to the natural height of the image.
+	 * Only appropriate with src images
+	 * @property height
+	 * @type Int
+	 */
+	this.height = null;
+
+	/**
+	 * Whether the style.visibility should be set to "visible" after the image is fetched.
+	 * Used when setting src images as visibility:hidden prior to image fetching
+	 * @property setVisible
+	 * @type Boolean
+	 */
+	this.setVisible = false;
+
+	/**
+	 * Whether the image has already been fetched. In the case of a foldCondional group, keeps track for when the trigger is fired so images aren't fetched twice
+	 * @property _fetched
+	 * @type Boolean
+	 * @private
+	 */
+	this._fetched = false;
+};
+
+/**
+ * Displays the image; puts the URL into the DOM
+ * @method fetch
+ */
+YAHOO.util.ImageLoader.imgObj.prototype.fetch = function() {
+	if (this._fetched) {
+		return;
+	}
+	var el = document.getElementById(this.domId);
+	if (! el) {
+		return;
+	}
+	this._applyUrl(el);
+
+	if (this.setVisible) {
+		el.style.visibility = 'visible';
+	}
+	if (this.width) {
+		el.width = this.width;
+	}
+	if (this.height) {
+		el.height = this.height;
+	}
+	this._fetched = true;
+};
+
+/**
+ * Inserts the image URL into the DOM so that the image is displayed.
+ * Must be overridden by child class
+ * @method _applyUrl
+ * @param {Object}	el	HTML DOM element
+ * @private
+ */
+YAHOO.util.ImageLoader.imgObj.prototype._applyUrl = function(el) {
+};
+
+/**
+ * Background image object. A background image is one whose URL is specified by "background-image" in the element's style
+ * @class YAHOO.util.ImageLoader.bgImgObj
+ * @constructor
+ * @extends YAHOO.util.ImageLoader.imgObj
+ * @param {String}	domId	HTML DOM id of the image element
+ * @param {String}	url	URL for the image
+ */
+YAHOO.util.ImageLoader.bgImgObj = function(domId, url) {
+	YAHOO.util.ImageLoader.bgImgObj.superclass.constructor.call(this, domId, url);
+};
+
+YAHOO.lang.extend(YAHOO.util.ImageLoader.bgImgObj, YAHOO.util.ImageLoader.imgObj);
+
+/**
+ * Inserts the image URL into the DOM so that the image is displayed.
+ * Sets style.backgroundImage
+ * @method _applyUrl
+ * @param {Object}	el	HTML DOM element
+ * @private
+ */
+YAHOO.util.ImageLoader.bgImgObj.prototype._applyUrl = function(el) {
+	el.style.backgroundImage = "url('" + this.url + "')";
+};
+
+/**
+ * Source image object. A source image is one whose URL is specified by a src attribute in the DOM element
+ * @class YAHOO.util.ImageLoader.srcImgObj
+ * @constructor
+ * @extends YAHOO.util.ImageLoader.imgObj
+ * @param {String}	domId	HTML DOM id of the image element
+ * @param {String}	url	URL for the image
+ * @param {Int}	width	pixel width of the image - defaults to image's natural size
+ * @param {Int}	height	pixel height of the image - defaults to image's natural size
+ */
+YAHOO.util.ImageLoader.srcImgObj = function(domId, url, width, height) {
+	YAHOO.util.ImageLoader.srcImgObj.superclass.constructor.call(this, domId, url);
+	this.width = width;
+	this.height = height;
+};
+
+YAHOO.lang.extend(YAHOO.util.ImageLoader.srcImgObj, YAHOO.util.ImageLoader.imgObj);
+
+/**
+ * Inserts the image URL into the DOM so that the image is displayed.
+ * Sets src
+ * @method _applyUrl
+ * @param {Object}	el	HTML DOM element
+ * @private
+ */
+YAHOO.util.ImageLoader.srcImgObj.prototype._applyUrl = function(el) {
+	el.src = this.url;
+};
+
+/**
+ * PNG background image object. A PNG background image is one whose URL is specified through AlphaImageLoader or by "background-image" in the element's style
+ * @class YAHOO.util.ImageLoader.pngBgImgObj
+ * @constructor
+ * @extends YAHOO.util.ImageLoader.imgObj
+ * @param {String}	domId	HTML DOM id of the image element
+ * @param {String}	url	URL for the image
+ */
+YAHOO.util.ImageLoader.pngBgImgObj = function(domId, url) {
+	YAHOO.util.ImageLoader.pngBgImgObj.superclass.constructor.call(this, domId, url);
+};
+
+YAHOO.lang.extend(YAHOO.util.ImageLoader.pngBgImgObj, YAHOO.util.ImageLoader.imgObj);
+
+/**
+ * Inserts the image URL into the DOM so that the image is displayed.
+ * If the browser is determined to be IE6 (or older), sets the AlphaImageLoader src; otherwise sets style.backgroundImage
+ * @method _applyUrl
+ * @param {Object}	el	HTML DOM element
+ * @private
+ */
+YAHOO.util.ImageLoader.pngBgImgObj.prototype._applyUrl = function(el) {
+	if (YAHOO.env.ua.ie && YAHOO.env.ua.ie <= 6) {
+		el.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + this.url + '", sizingMethod="scale")';
+	}
+	else {
+		el.style.backgroundImage = "url('" + this.url + "')";
+	}
+};
+YAHOO.register("imageloader", YAHOO.util.ImageLoader, {version: "2.4.1", build: "742"});

Deleted: trunk/root/static/yui/imageloader/imageloader-experimental-debug.js
===================================================================
--- trunk/root/static/yui/imageloader/imageloader-experimental-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/imageloader/imageloader-experimental-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,442 +0,0 @@
-/*
-Copyright (c) 2007, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
-*/
-/**
- * The image loader is a framework to dynamically load images
- * according to certain triggers, enabling faster load times
- * and a more responsive UI.
- *
- * @module imageloader
- * @namespace YAHOO.util
- * @experimental
- */
-
-if (typeof(YAHOO.util.ImageLoader) == 'undefined') {
-	YAHOO.util.ImageLoader = {};
-}
-
-/**
- * A group for images. A group can have one time limit and a series of triggers. Thus the images belonging to this group must share these constraints.
- * @class YAHOO.util.ImageLoader.group
- * @requires YAHOO.util.Dom
- * @requires YAHOO.util.Event
- * @constructor
- * @param {String|HTMLElement}	trigEl	The HTML element id or reference to assign the trigger event to. Can be null for no trigger
- * @param {String}	trigAct The type of event to assign to trigEl. Can be null for no trigger
- * @param {Number}	timeout	Timeout (time limit) length, in seconds. Can be undefined, or <= 0, for no time limit
- */
-YAHOO.util.ImageLoader.group = function(trigEl, trigAct, timeout) {
-	/**
-	 * Name for the group. Only used to identify the group in logging statements
-	 * @property name
-	 * @type String
-	 */
-	this.name = 'unnamed';
-	
-	/**
-	 * Collection of images registered with this group
-	 * @property _imgObjs
-	 * @private
-	 * @type Object
-	 */
-	this._imgObjs = {};
-	
-	/**
-	 * Timeout (time limit) length, in seconds
-	 * @property timeoutLen
-	 * @type Number
-	 */
-	this.timeoutLen = timeout;
-	
-	/**
-	 * Timeout object to keep a handle on the time limit
-	 * @property _timeout
-	 * @private
-	 * @type Object
-	 */
-	this._timeout = null;
-	
-	/**
-	 * Collection of triggers for this group.
-	 * Keeps track of each trigger's element, event, and event-listener-callback "fetch" function
-	 * @property _triggers
-	 * @private
-	 * @type Array
-	 */
-	this._triggers = [];
-
-	/**
-	 * Flag to check if images are above the fold. If foldConditional is true, the group will check each of its image locations at page load. If any part of the image is within the client viewport, the image is displayed immediately
-	 * @property foldConditional
-	 * @type Boolean
-	 */
-	this.foldConditional = false;
-
-	/**
-	 * Class name that will identify images belonging to the group. This class name will be removed from each element in order to fetch images.
-	 * This class should have, in its CSS style definition, "background:none !important;"
-	 * @property className
-	 * @type String
-	 */
-	this.className = null;
-
-	/**
-	 * HTML elements having the class name that is associated with this group
-	 * Elements are stored during the _foldCheck function and reused later during the fetch function. Gives a slight performance improvement when className and foldConditional are both used
-	 * @property _classImageEls
-	 * @private
-	 * @type Array
-	 */
-	this._classImageEls = null;
-
-	// add a listener to set the time limit in the onload
-	YAHOO.util.Event.addListener(window, 'load', this._onloadTasks, this, true);
-	// add the trigger
-	this.addTrigger(trigEl, trigAct);
-
-};
-
-/**
- * Adds a trigger to the group. Call this with the same style as YAHOO.util.Event.addListener
- * @method addTrigger
- * @param {String|HTMLElement} trigEl  The HTML element id or reference to assign the trigger event to
- * @param {String} trigAct The type of event to assign to trigEl
- */
-YAHOO.util.ImageLoader.group.prototype.addTrigger = function(trigEl, trigAct) {
-	if (! trigEl || ! trigAct) {
-		return;
-	}
-	/* Need to wrap the fetch function. Event Util can't distinguish prototyped functions of different instantiations
-	 *   Leads to this scenario: groupA and groupZ both have window-scroll triggers. groupZ also has a 2-sec timeout (groupA has no timeout).
-	 *   groupZ's timeout fires; we remove the triggers. The removeListener call finds the first window-scroll event with Y.u.IL.p.fetch, which is groupA's. 
-	 *   groupA's trigger is removed and never fires, leaving images unfetched
-	 */
-	var wrappedFetch = function() {
-		this.fetch();
-	};
-	this._triggers.push([trigEl, trigAct, wrappedFetch]);
-	YAHOO.util.Event.addListener(trigEl, trigAct, wrappedFetch, this, true);
-};
-
-/**
- * Setup to do in the window's onload
- * Initiates time limit for group; executes the fold check for the images
- * @method _onloadTasks
- * @private
- */
-YAHOO.util.ImageLoader.group.prototype._onloadTasks = function() {
-	if (this.timeoutLen && typeof(this.timeoutLen) == 'number' && this.timeoutLen > 0) {
-		this._timeout = setTimeout(this._getFetchTimeout(), this.timeoutLen * 1000);
-	}
-
-	if (this.foldConditional) {
-		this._foldCheck();
-	}
-};
-
-/**
- * Returns the group's fetch method, with the proper closure, for use with setTimeout
- * @method _getFetchTimeout
- * @return {Function}  group's fetch method
- * @private
- */
-YAHOO.util.ImageLoader.group.prototype._getFetchTimeout = function() {
-	var self = this;
-	return function() { self.fetch(); };
-};
-
-/**
- * Registers a background image with the group
- * @method registerBgImage
- * @param {String}	domId	HTML DOM id of the image element
- * @param {String}	url	URL for the image
- * @return {Object}	bgImgObj that was registered, for modifying any attributes in the object
- */
-YAHOO.util.ImageLoader.group.prototype.registerBgImage = function(domId, url) {
-	this._imgObjs[domId] = new YAHOO.util.ImageLoader.bgImgObj(domId, url);
-	return this._imgObjs[domId];
-};
-/**
- * Registers a src image with the group
- * @method registerSrcImage
- * @param {String}	domId	HTML DOM id of the image element
- * @param {String}	url	URL for the image
- * @param {Int}	width	pixel width of the image - defaults to image's natural size
- * @param {Int}	height	pixel height of the image - defaults to image's natural size
- * @return {Object}	srcImgObj that was registered, for modifying any attributes in the object
- */
-YAHOO.util.ImageLoader.group.prototype.registerSrcImage = function(domId, url, width, height) {
-	this._imgObjs[domId] = new YAHOO.util.ImageLoader.srcImgObj(domId, url, width, height);
-	return this._imgObjs[domId];
-};
-/**
- * Registers an alpha-channel-type png background image with the group
- * @method registerPngBgImage
- * @param {String}	domId	HTML DOM id of the image element
- * @param {String}	url	URL for the image
- * @return {Object}	pngBgImgObj that was registered, for modifying any attributes in the object
- */
-YAHOO.util.ImageLoader.group.prototype.registerPngBgImage = function(domId, url) {
-	this._imgObjs[domId] = new YAHOO.util.ImageLoader.pngBgImgObj(domId, url);
-	return this._imgObjs[domId];
-};
-
-/**
- * Displays the images in the group
- * @method fetch
- */
-YAHOO.util.ImageLoader.group.prototype.fetch = function() {
-	YAHOO.log('Fetching images in group: "' + this.name + '".', 'info', 'imageloader');
-
-	clearTimeout(this._timeout);
-	// remove all listeners
-	for (var i=0; i < this._triggers.length; i++) {
-		YAHOO.util.Event.removeListener(this._triggers[i][0], this._triggers[i][1], this._triggers[i][2]);
-	}
-
-	// fetch whatever we need to by className
-	this._fetchByClass();
-
-	// fetch registered images
-	for (var id in this._imgObjs) {
-		if (YAHOO.lang.hasOwnProperty(this._imgObjs, id)) {
-			this._imgObjs[id].fetch();
-		}
-	}
-};
-
-/**
- * Checks the position of each image in the group. If any part of the image is within the client viewport, shows the image immediately.
- * @method _foldCheck
- * @private
- */
-YAHOO.util.ImageLoader.group.prototype._foldCheck = function() {
-	YAHOO.log('Checking for images above the fold in group: "' + this.name + '"', 'info', 'imageloader');
-	var scrollTop = (document.compatMode != 'CSS1Compat') ? document.body.scrollTop : document.documentElement.scrollTop;
-	var viewHeight = YAHOO.util.Dom.getViewportHeight();
-	var hLimit = scrollTop + viewHeight;
-	var scrollLeft = (document.compatMode != 'CSS1Compat') ? document.body.scrollLeft : document.documentElement.scrollLeft;
-	var viewWidth = YAHOO.util.Dom.getViewportWidth();
-	var wLimit = scrollLeft + viewWidth;
-	for (var id in this._imgObjs) {
-		if (YAHOO.lang.hasOwnProperty(this._imgObjs, id)) {
-			var elPos = YAHOO.util.Dom.getXY(this._imgObjs[id].domId);
-			if (elPos[1] < hLimit && elPos[0] < wLimit) {
-				YAHOO.log('Image with id "' + this._imgObjs[id].domId + '" is above the fold. Fetching image.', 'info', 'imageloader');
-				this._imgObjs[id].fetch();
-			}
-		}
-	}
-	// and by class
-	if (this.className) {
-		this._classImageEls = YAHOO.util.Dom.getElementsByClassName(this.className);
-		for (var i=0; i < this._classImageEls.length; i++) {
-			var elPos = YAHOO.util.Dom.getXY(this._classImageEls[i]);
-			if (elPos[1] < hLimit && elPos[0] < wLimit) {
-				YAHOO.log('Image with id "' + this._classImageEls[i].id + '" is above the fold. Fetching image. (Image registered by class name with the group - may not have an id.)', 'info', 'imageloader');
-				YAHOO.util.Dom.removeClass(this._classImageEls[i], this.className);
-			}
-		}
-	}
-};
-
-/**
- * Finds all elements in the Dom with the class name specified in the group. Removes the class from the element in order to let the style definitions trigger the image fetching
- * @method _fetchByClass
- * @private
- */
-YAHOO.util.ImageLoader.group.prototype._fetchByClass = function() {
-	if (! this.className) {
-		return;
-	}
-
-	YAHOO.log('Fetching all images with class "' + this.className + '" in group "' + this.name + '".', 'info', 'imageloader');
-	// this._classImageEls may have been set during _foldCheck
-	if (this._classImageEls === null) {
-		this._classImageEls = YAHOO.util.Dom.getElementsByClassName(this.className);
-	}
-	YAHOO.util.Dom.removeClass(this._classImageEls, this.className);
-};
-
-
-/**
- * Base class for image objects to be registered with the groups
- * @class YAHOO.util.ImageLoader.imgObj
- * @constructor
- * @param {String}	domId	HTML DOM id of the image element
- * @param {String}	url	URL for the image
- */
-YAHOO.util.ImageLoader.imgObj = function(domId, url) {
-	/**
-	 * HTML DOM id of the image element
-	 * @property domId
-	 * @type String
-	 */
-	this.domId = domId;
-
-	/**
-	 * URL for the image
-	 * @property url
-	 * @type String
-	 */
-	this.url = url;
-
-	/**
-	 * Pixel width of the image. Will be set as a "width" attribute after the image is fetched.
-	 * Detaults to the natural width of the image.
-	 * Only appropriate with src images
-	 * @property width
-	 * @type Int
-	 */
-	this.width = null;
-
-	/**
-	 * Pixel height of the image. Will be set as a "height" attribute after the image is fetched.
-	 * Detaults to the natural height of the image.
-	 * Only appropriate with src images
-	 * @property height
-	 * @type Int
-	 */
-	this.height = null;
-
-	/**
-	 * Whether the style.visibility should be set to "visible" after the image is fetched.
-	 * Used when setting src images as visibility:hidden prior to image fetching
-	 * @property setVisible
-	 * @type Boolean
-	 */
-	this.setVisible = false;
-
-	/**
-	 * Whether the image has already been fetched. In the case of a foldCondional group, keeps track for when the trigger is fired so images aren't fetched twice
-	 * @property _fetched
-	 * @type Boolean
-	 * @private
-	 */
-	this._fetched = false;
-};
-
-/**
- * Displays the image; puts the URL into the DOM
- * @method fetch
- */
-YAHOO.util.ImageLoader.imgObj.prototype.fetch = function() {
-	if (this._fetched) {
-		return;
-	}
-	var el = document.getElementById(this.domId);
-	if (! el) {
-		return;
-	}
-	YAHOO.log('Fetching image with id "' + this.domId + '".', 'info', 'imageloader');
-	this._applyUrl(el);
-
-	if (this.setVisible) {
-		el.style.visibility = 'visible';
-	}
-	if (this.width) {
-		el.width = this.width;
-	}
-	if (this.height) {
-		el.height = this.height;
-	}
-	this._fetched = true;
-};
-
-/**
- * Inserts the image URL into the DOM so that the image is displayed.
- * Must be overridden by child class
- * @method _applyUrl
- * @param {Object}	el	HTML DOM element
- * @private
- */
-YAHOO.util.ImageLoader.imgObj.prototype._applyUrl = function(el) {
-};
-
-/**
- * Background image object. A background image is one whose URL is specified by "background-image" in the element's style
- * @class YAHOO.util.ImageLoader.bgImgObj
- * @constructor
- * @extends YAHOO.util.ImageLoader.imgObj
- * @param {String}	domId	HTML DOM id of the image element
- * @param {String}	url	URL for the image
- */
-YAHOO.util.ImageLoader.bgImgObj = function(domId, url) {
-	YAHOO.util.ImageLoader.bgImgObj.superclass.constructor.call(this, domId, url);
-};
-
-YAHOO.lang.extend(YAHOO.util.ImageLoader.bgImgObj, YAHOO.util.ImageLoader.imgObj);
-
-/**
- * Inserts the image URL into the DOM so that the image is displayed.
- * Sets style.backgroundImage
- * @method _applyUrl
- * @param {Object}	el	HTML DOM element
- * @private
- */
-YAHOO.util.ImageLoader.bgImgObj.prototype._applyUrl = function(el) {
-	el.style.backgroundImage = "url('" + this.url + "')";
-};
-
-/**
- * Source image object. A source image is one whose URL is specified by a src attribute in the DOM element
- * @class YAHOO.util.ImageLoader.srcImgObj
- * @constructor
- * @extends YAHOO.util.ImageLoader.imgObj
- * @param {String}	domId	HTML DOM id of the image element
- * @param {String}	url	URL for the image
- * @param {Int}	width	pixel width of the image - defaults to image's natural size
- * @param {Int}	height	pixel height of the image - defaults to image's natural size
- */
-YAHOO.util.ImageLoader.srcImgObj = function(domId, url, width, height) {
-	YAHOO.util.ImageLoader.srcImgObj.superclass.constructor.call(this, domId, url);
-	this.width = width;
-	this.height = height;
-};
-
-YAHOO.lang.extend(YAHOO.util.ImageLoader.srcImgObj, YAHOO.util.ImageLoader.imgObj);
-
-/**
- * Inserts the image URL into the DOM so that the image is displayed.
- * Sets src
- * @method _applyUrl
- * @param {Object}	el	HTML DOM element
- * @private
- */
-YAHOO.util.ImageLoader.srcImgObj.prototype._applyUrl = function(el) {
-	el.src = this.url;
-};
-
-/**
- * PNG background image object. A PNG background image is one whose URL is specified through AlphaImageLoader or by "background-image" in the element's style
- * @class YAHOO.util.ImageLoader.pngBgImgObj
- * @constructor
- * @extends YAHOO.util.ImageLoader.imgObj
- * @param {String}	domId	HTML DOM id of the image element
- * @param {String}	url	URL for the image
- */
-YAHOO.util.ImageLoader.pngBgImgObj = function(domId, url) {
-	YAHOO.util.ImageLoader.pngBgImgObj.superclass.constructor.call(this, domId, url);
-};
-
-YAHOO.lang.extend(YAHOO.util.ImageLoader.pngBgImgObj, YAHOO.util.ImageLoader.imgObj);
-
-/**
- * Inserts the image URL into the DOM so that the image is displayed.
- * If the browser is determined to be IE6 (or older), sets the AlphaImageLoader src; otherwise sets style.backgroundImage
- * @method _applyUrl
- * @param {Object}	el	HTML DOM element
- * @private
- */
-YAHOO.util.ImageLoader.pngBgImgObj.prototype._applyUrl = function(el) {
-	if (YAHOO.env.ua.ie && YAHOO.env.ua.ie <= 6) {
-		el.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + this.url + '", sizingMethod="scale")';
-	}
-	else {
-		el.style.backgroundImage = "url('" + this.url + "')";
-	}
-};
-YAHOO.register("imageloader", YAHOO.util.ImageLoader, {version: "2.3.1", build: "541"});

Deleted: trunk/root/static/yui/imageloader/imageloader-experimental-min.js
===================================================================
--- trunk/root/static/yui/imageloader/imageloader-experimental-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/imageloader/imageloader-experimental-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,7 +0,0 @@
-/*
-Copyright (c) 2007, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
-*/
-if(typeof (YAHOO.util.ImageLoader)=="undefined"){YAHOO.util.ImageLoader={};}YAHOO.util.ImageLoader.group=function(A,B,C){this.name="unnamed";this._imgObjs={};this.timeoutLen=C;this._timeout=null;this._triggers=[];this.foldConditional=false;this.className=null;this._classImageEls=null;YAHOO.util.Event.addListener(window,"load",this._onloadTasks,this,true);this.addTrigger(A,B);};YAHOO.util.ImageLoader.group.prototype.addTrigger=function(B,C){if(!B||!C){return ;}var A=function(){this.fetch();};this._triggers.push([B,C,A]);YAHOO.util.Event.addListener(B,C,A,this,true);};YAHOO.util.ImageLoader.group.prototype._onloadTasks=function(){if(this.timeoutLen&&typeof (this.timeoutLen)=="number"&&this.timeoutLen>0){this._timeout=setTimeout(this._getFetchTimeout(),this.timeoutLen*1000);}if(this.foldConditional){this._foldCheck();}};YAHOO.util.ImageLoader.group.prototype._getFetchTimeout=function(){var A=this;return function(){A.fetch();};};YAHOO.util.ImageLoader.group.prototype.registerBg!
 Image=function(B,A){this._imgObjs[B]=new YAHOO.util.ImageLoader.bgImgObj(B,A);return this._imgObjs[B];};YAHOO.util.ImageLoader.group.prototype.registerSrcImage=function(D,B,C,A){this._imgObjs[D]=new YAHOO.util.ImageLoader.srcImgObj(D,B,C,A);return this._imgObjs[D];};YAHOO.util.ImageLoader.group.prototype.registerPngBgImage=function(B,A){this._imgObjs[B]=new YAHOO.util.ImageLoader.pngBgImgObj(B,A);return this._imgObjs[B];};YAHOO.util.ImageLoader.group.prototype.fetch=function(){clearTimeout(this._timeout);for(var A=0;A<this._triggers.length;A++){YAHOO.util.Event.removeListener(this._triggers[A][0],this._triggers[A][1],this._triggers[A][2]);}this._fetchByClass();for(var B in this._imgObjs){if(YAHOO.lang.hasOwnProperty(this._imgObjs,B)){this._imgObjs[B].fetch();}}};YAHOO.util.ImageLoader.group.prototype._foldCheck=function(){var C=(document.compatMode!="CSS1Compat")?document.body.scrollTop:document.documentElement.scrollTop;var D=YAHOO.util.Dom.getViewportHeight();var A=C+D;va!
 r E=(document.compatMode!="CSS1Compat")?document.body.scrollLe!
 ft:docum
ent.documentElement.scrollLeft;var G=YAHOO.util.Dom.getViewportWidth();var H=E+G;for(var B in this._imgObjs){if(YAHOO.lang.hasOwnProperty(this._imgObjs,B)){var I=YAHOO.util.Dom.getXY(this._imgObjs[B].domId);if(I[1]<A&&I[0]<H){this._imgObjs[B].fetch();}}}if(this.className){this._classImageEls=YAHOO.util.Dom.getElementsByClassName(this.className);for(var F=0;F<this._classImageEls.length;F++){var I=YAHOO.util.Dom.getXY(this._classImageEls[F]);if(I[1]<A&&I[0]<H){YAHOO.util.Dom.removeClass(this._classImageEls[F],this.className);}}}};YAHOO.util.ImageLoader.group.prototype._fetchByClass=function(){if(!this.className){return ;}if(this._classImageEls===null){this._classImageEls=YAHOO.util.Dom.getElementsByClassName(this.className);}YAHOO.util.Dom.removeClass(this._classImageEls,this.className);};YAHOO.util.ImageLoader.imgObj=function(B,A){this.domId=B;this.url=A;this.width=null;this.height=null;this.setVisible=false;this._fetched=false;};YAHOO.util.ImageLoader.imgObj.prototype.fetch=!
 function(){if(this._fetched){return ;}var A=document.getElementById(this.domId);if(!A){return ;}this._applyUrl(A);if(this.setVisible){A.style.visibility="visible";}if(this.width){A.width=this.width;}if(this.height){A.height=this.height;}this._fetched=true;};YAHOO.util.ImageLoader.imgObj.prototype._applyUrl=function(A){};YAHOO.util.ImageLoader.bgImgObj=function(B,A){YAHOO.util.ImageLoader.bgImgObj.superclass.constructor.call(this,B,A);};YAHOO.lang.extend(YAHOO.util.ImageLoader.bgImgObj,YAHOO.util.ImageLoader.imgObj);YAHOO.util.ImageLoader.bgImgObj.prototype._applyUrl=function(A){A.style.backgroundImage="url('"+this.url+"')";};YAHOO.util.ImageLoader.srcImgObj=function(D,B,C,A){YAHOO.util.ImageLoader.srcImgObj.superclass.constructor.call(this,D,B);this.width=C;this.height=A;};YAHOO.lang.extend(YAHOO.util.ImageLoader.srcImgObj,YAHOO.util.ImageLoader.imgObj);YAHOO.util.ImageLoader.srcImgObj.prototype._applyUrl=function(A){A.src=this.url;};YAHOO.util.ImageLoader.pngBgImgObj=funct!
 ion(B,A){YAHOO.util.ImageLoader.pngBgImgObj.superclass.constru!
 ctor.cal
l(this,B,A);};YAHOO.lang.extend(YAHOO.util.ImageLoader.pngBgImgObj,YAHOO.util.ImageLoader.imgObj);YAHOO.util.ImageLoader.pngBgImgObj.prototype._applyUrl=function(A){if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6){A.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\""+this.url+"\", sizingMethod=\"scale\")";}else{A.style.backgroundImage="url('"+this.url+"')";}};YAHOO.register("imageloader",YAHOO.util.ImageLoader,{version:"2.3.1",build:"541"});
\ No newline at end of file

Deleted: trunk/root/static/yui/imageloader/imageloader-experimental.js
===================================================================
--- trunk/root/static/yui/imageloader/imageloader-experimental.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/imageloader/imageloader-experimental.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,436 +0,0 @@
-/*
-Copyright (c) 2007, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
-*/
-/**
- * The image loader is a framework to dynamically load images
- * according to certain triggers, enabling faster load times
- * and a more responsive UI.
- *
- * @module imageloader
- * @namespace YAHOO.util
- * @experimental
- */
-
-if (typeof(YAHOO.util.ImageLoader) == 'undefined') {
-	YAHOO.util.ImageLoader = {};
-}
-
-/**
- * A group for images. A group can have one time limit and a series of triggers. Thus the images belonging to this group must share these constraints.
- * @class YAHOO.util.ImageLoader.group
- * @requires YAHOO.util.Dom
- * @requires YAHOO.util.Event
- * @constructor
- * @param {String|HTMLElement}	trigEl	The HTML element id or reference to assign the trigger event to. Can be null for no trigger
- * @param {String}	trigAct The type of event to assign to trigEl. Can be null for no trigger
- * @param {Number}	timeout	Timeout (time limit) length, in seconds. Can be undefined, or <= 0, for no time limit
- */
-YAHOO.util.ImageLoader.group = function(trigEl, trigAct, timeout) {
-	/**
-	 * Name for the group. Only used to identify the group in logging statements
-	 * @property name
-	 * @type String
-	 */
-	this.name = 'unnamed';
-	
-	/**
-	 * Collection of images registered with this group
-	 * @property _imgObjs
-	 * @private
-	 * @type Object
-	 */
-	this._imgObjs = {};
-	
-	/**
-	 * Timeout (time limit) length, in seconds
-	 * @property timeoutLen
-	 * @type Number
-	 */
-	this.timeoutLen = timeout;
-	
-	/**
-	 * Timeout object to keep a handle on the time limit
-	 * @property _timeout
-	 * @private
-	 * @type Object
-	 */
-	this._timeout = null;
-	
-	/**
-	 * Collection of triggers for this group.
-	 * Keeps track of each trigger's element, event, and event-listener-callback "fetch" function
-	 * @property _triggers
-	 * @private
-	 * @type Array
-	 */
-	this._triggers = [];
-
-	/**
-	 * Flag to check if images are above the fold. If foldConditional is true, the group will check each of its image locations at page load. If any part of the image is within the client viewport, the image is displayed immediately
-	 * @property foldConditional
-	 * @type Boolean
-	 */
-	this.foldConditional = false;
-
-	/**
-	 * Class name that will identify images belonging to the group. This class name will be removed from each element in order to fetch images.
-	 * This class should have, in its CSS style definition, "background:none !important;"
-	 * @property className
-	 * @type String
-	 */
-	this.className = null;
-
-	/**
-	 * HTML elements having the class name that is associated with this group
-	 * Elements are stored during the _foldCheck function and reused later during the fetch function. Gives a slight performance improvement when className and foldConditional are both used
-	 * @property _classImageEls
-	 * @private
-	 * @type Array
-	 */
-	this._classImageEls = null;
-
-	// add a listener to set the time limit in the onload
-	YAHOO.util.Event.addListener(window, 'load', this._onloadTasks, this, true);
-	// add the trigger
-	this.addTrigger(trigEl, trigAct);
-
-};
-
-/**
- * Adds a trigger to the group. Call this with the same style as YAHOO.util.Event.addListener
- * @method addTrigger
- * @param {String|HTMLElement} trigEl  The HTML element id or reference to assign the trigger event to
- * @param {String} trigAct The type of event to assign to trigEl
- */
-YAHOO.util.ImageLoader.group.prototype.addTrigger = function(trigEl, trigAct) {
-	if (! trigEl || ! trigAct) {
-		return;
-	}
-	/* Need to wrap the fetch function. Event Util can't distinguish prototyped functions of different instantiations
-	 *   Leads to this scenario: groupA and groupZ both have window-scroll triggers. groupZ also has a 2-sec timeout (groupA has no timeout).
-	 *   groupZ's timeout fires; we remove the triggers. The removeListener call finds the first window-scroll event with Y.u.IL.p.fetch, which is groupA's. 
-	 *   groupA's trigger is removed and never fires, leaving images unfetched
-	 */
-	var wrappedFetch = function() {
-		this.fetch();
-	};
-	this._triggers.push([trigEl, trigAct, wrappedFetch]);
-	YAHOO.util.Event.addListener(trigEl, trigAct, wrappedFetch, this, true);
-};
-
-/**
- * Setup to do in the window's onload
- * Initiates time limit for group; executes the fold check for the images
- * @method _onloadTasks
- * @private
- */
-YAHOO.util.ImageLoader.group.prototype._onloadTasks = function() {
-	if (this.timeoutLen && typeof(this.timeoutLen) == 'number' && this.timeoutLen > 0) {
-		this._timeout = setTimeout(this._getFetchTimeout(), this.timeoutLen * 1000);
-	}
-
-	if (this.foldConditional) {
-		this._foldCheck();
-	}
-};
-
-/**
- * Returns the group's fetch method, with the proper closure, for use with setTimeout
- * @method _getFetchTimeout
- * @return {Function}  group's fetch method
- * @private
- */
-YAHOO.util.ImageLoader.group.prototype._getFetchTimeout = function() {
-	var self = this;
-	return function() { self.fetch(); };
-};
-
-/**
- * Registers a background image with the group
- * @method registerBgImage
- * @param {String}	domId	HTML DOM id of the image element
- * @param {String}	url	URL for the image
- * @return {Object}	bgImgObj that was registered, for modifying any attributes in the object
- */
-YAHOO.util.ImageLoader.group.prototype.registerBgImage = function(domId, url) {
-	this._imgObjs[domId] = new YAHOO.util.ImageLoader.bgImgObj(domId, url);
-	return this._imgObjs[domId];
-};
-/**
- * Registers a src image with the group
- * @method registerSrcImage
- * @param {String}	domId	HTML DOM id of the image element
- * @param {String}	url	URL for the image
- * @param {Int}	width	pixel width of the image - defaults to image's natural size
- * @param {Int}	height	pixel height of the image - defaults to image's natural size
- * @return {Object}	srcImgObj that was registered, for modifying any attributes in the object
- */
-YAHOO.util.ImageLoader.group.prototype.registerSrcImage = function(domId, url, width, height) {
-	this._imgObjs[domId] = new YAHOO.util.ImageLoader.srcImgObj(domId, url, width, height);
-	return this._imgObjs[domId];
-};
-/**
- * Registers an alpha-channel-type png background image with the group
- * @method registerPngBgImage
- * @param {String}	domId	HTML DOM id of the image element
- * @param {String}	url	URL for the image
- * @return {Object}	pngBgImgObj that was registered, for modifying any attributes in the object
- */
-YAHOO.util.ImageLoader.group.prototype.registerPngBgImage = function(domId, url) {
-	this._imgObjs[domId] = new YAHOO.util.ImageLoader.pngBgImgObj(domId, url);
-	return this._imgObjs[domId];
-};
-
-/**
- * Displays the images in the group
- * @method fetch
- */
-YAHOO.util.ImageLoader.group.prototype.fetch = function() {
-
-	clearTimeout(this._timeout);
-	// remove all listeners
-	for (var i=0; i < this._triggers.length; i++) {
-		YAHOO.util.Event.removeListener(this._triggers[i][0], this._triggers[i][1], this._triggers[i][2]);
-	}
-
-	// fetch whatever we need to by className
-	this._fetchByClass();
-
-	// fetch registered images
-	for (var id in this._imgObjs) {
-		if (YAHOO.lang.hasOwnProperty(this._imgObjs, id)) {
-			this._imgObjs[id].fetch();
-		}
-	}
-};
-
-/**
- * Checks the position of each image in the group. If any part of the image is within the client viewport, shows the image immediately.
- * @method _foldCheck
- * @private
- */
-YAHOO.util.ImageLoader.group.prototype._foldCheck = function() {
-	var scrollTop = (document.compatMode != 'CSS1Compat') ? document.body.scrollTop : document.documentElement.scrollTop;
-	var viewHeight = YAHOO.util.Dom.getViewportHeight();
-	var hLimit = scrollTop + viewHeight;
-	var scrollLeft = (document.compatMode != 'CSS1Compat') ? document.body.scrollLeft : document.documentElement.scrollLeft;
-	var viewWidth = YAHOO.util.Dom.getViewportWidth();
-	var wLimit = scrollLeft + viewWidth;
-	for (var id in this._imgObjs) {
-		if (YAHOO.lang.hasOwnProperty(this._imgObjs, id)) {
-			var elPos = YAHOO.util.Dom.getXY(this._imgObjs[id].domId);
-			if (elPos[1] < hLimit && elPos[0] < wLimit) {
-				this._imgObjs[id].fetch();
-			}
-		}
-	}
-	// and by class
-	if (this.className) {
-		this._classImageEls = YAHOO.util.Dom.getElementsByClassName(this.className);
-		for (var i=0; i < this._classImageEls.length; i++) {
-			var elPos = YAHOO.util.Dom.getXY(this._classImageEls[i]);
-			if (elPos[1] < hLimit && elPos[0] < wLimit) {
-				YAHOO.util.Dom.removeClass(this._classImageEls[i], this.className);
-			}
-		}
-	}
-};
-
-/**
- * Finds all elements in the Dom with the class name specified in the group. Removes the class from the element in order to let the style definitions trigger the image fetching
- * @method _fetchByClass
- * @private
- */
-YAHOO.util.ImageLoader.group.prototype._fetchByClass = function() {
-	if (! this.className) {
-		return;
-	}
-
-	// this._classImageEls may have been set during _foldCheck
-	if (this._classImageEls === null) {
-		this._classImageEls = YAHOO.util.Dom.getElementsByClassName(this.className);
-	}
-	YAHOO.util.Dom.removeClass(this._classImageEls, this.className);
-};
-
-
-/**
- * Base class for image objects to be registered with the groups
- * @class YAHOO.util.ImageLoader.imgObj
- * @constructor
- * @param {String}	domId	HTML DOM id of the image element
- * @param {String}	url	URL for the image
- */
-YAHOO.util.ImageLoader.imgObj = function(domId, url) {
-	/**
-	 * HTML DOM id of the image element
-	 * @property domId
-	 * @type String
-	 */
-	this.domId = domId;
-
-	/**
-	 * URL for the image
-	 * @property url
-	 * @type String
-	 */
-	this.url = url;
-
-	/**
-	 * Pixel width of the image. Will be set as a "width" attribute after the image is fetched.
-	 * Detaults to the natural width of the image.
-	 * Only appropriate with src images
-	 * @property width
-	 * @type Int
-	 */
-	this.width = null;
-
-	/**
-	 * Pixel height of the image. Will be set as a "height" attribute after the image is fetched.
-	 * Detaults to the natural height of the image.
-	 * Only appropriate with src images
-	 * @property height
-	 * @type Int
-	 */
-	this.height = null;
-
-	/**
-	 * Whether the style.visibility should be set to "visible" after the image is fetched.
-	 * Used when setting src images as visibility:hidden prior to image fetching
-	 * @property setVisible
-	 * @type Boolean
-	 */
-	this.setVisible = false;
-
-	/**
-	 * Whether the image has already been fetched. In the case of a foldCondional group, keeps track for when the trigger is fired so images aren't fetched twice
-	 * @property _fetched
-	 * @type Boolean
-	 * @private
-	 */
-	this._fetched = false;
-};
-
-/**
- * Displays the image; puts the URL into the DOM
- * @method fetch
- */
-YAHOO.util.ImageLoader.imgObj.prototype.fetch = function() {
-	if (this._fetched) {
-		return;
-	}
-	var el = document.getElementById(this.domId);
-	if (! el) {
-		return;
-	}
-	this._applyUrl(el);
-
-	if (this.setVisible) {
-		el.style.visibility = 'visible';
-	}
-	if (this.width) {
-		el.width = this.width;
-	}
-	if (this.height) {
-		el.height = this.height;
-	}
-	this._fetched = true;
-};
-
-/**
- * Inserts the image URL into the DOM so that the image is displayed.
- * Must be overridden by child class
- * @method _applyUrl
- * @param {Object}	el	HTML DOM element
- * @private
- */
-YAHOO.util.ImageLoader.imgObj.prototype._applyUrl = function(el) {
-};
-
-/**
- * Background image object. A background image is one whose URL is specified by "background-image" in the element's style
- * @class YAHOO.util.ImageLoader.bgImgObj
- * @constructor
- * @extends YAHOO.util.ImageLoader.imgObj
- * @param {String}	domId	HTML DOM id of the image element
- * @param {String}	url	URL for the image
- */
-YAHOO.util.ImageLoader.bgImgObj = function(domId, url) {
-	YAHOO.util.ImageLoader.bgImgObj.superclass.constructor.call(this, domId, url);
-};
-
-YAHOO.lang.extend(YAHOO.util.ImageLoader.bgImgObj, YAHOO.util.ImageLoader.imgObj);
-
-/**
- * Inserts the image URL into the DOM so that the image is displayed.
- * Sets style.backgroundImage
- * @method _applyUrl
- * @param {Object}	el	HTML DOM element
- * @private
- */
-YAHOO.util.ImageLoader.bgImgObj.prototype._applyUrl = function(el) {
-	el.style.backgroundImage = "url('" + this.url + "')";
-};
-
-/**
- * Source image object. A source image is one whose URL is specified by a src attribute in the DOM element
- * @class YAHOO.util.ImageLoader.srcImgObj
- * @constructor
- * @extends YAHOO.util.ImageLoader.imgObj
- * @param {String}	domId	HTML DOM id of the image element
- * @param {String}	url	URL for the image
- * @param {Int}	width	pixel width of the image - defaults to image's natural size
- * @param {Int}	height	pixel height of the image - defaults to image's natural size
- */
-YAHOO.util.ImageLoader.srcImgObj = function(domId, url, width, height) {
-	YAHOO.util.ImageLoader.srcImgObj.superclass.constructor.call(this, domId, url);
-	this.width = width;
-	this.height = height;
-};
-
-YAHOO.lang.extend(YAHOO.util.ImageLoader.srcImgObj, YAHOO.util.ImageLoader.imgObj);
-
-/**
- * Inserts the image URL into the DOM so that the image is displayed.
- * Sets src
- * @method _applyUrl
- * @param {Object}	el	HTML DOM element
- * @private
- */
-YAHOO.util.ImageLoader.srcImgObj.prototype._applyUrl = function(el) {
-	el.src = this.url;
-};
-
-/**
- * PNG background image object. A PNG background image is one whose URL is specified through AlphaImageLoader or by "background-image" in the element's style
- * @class YAHOO.util.ImageLoader.pngBgImgObj
- * @constructor
- * @extends YAHOO.util.ImageLoader.imgObj
- * @param {String}	domId	HTML DOM id of the image element
- * @param {String}	url	URL for the image
- */
-YAHOO.util.ImageLoader.pngBgImgObj = function(domId, url) {
-	YAHOO.util.ImageLoader.pngBgImgObj.superclass.constructor.call(this, domId, url);
-};
-
-YAHOO.lang.extend(YAHOO.util.ImageLoader.pngBgImgObj, YAHOO.util.ImageLoader.imgObj);
-
-/**
- * Inserts the image URL into the DOM so that the image is displayed.
- * If the browser is determined to be IE6 (or older), sets the AlphaImageLoader src; otherwise sets style.backgroundImage
- * @method _applyUrl
- * @param {Object}	el	HTML DOM element
- * @private
- */
-YAHOO.util.ImageLoader.pngBgImgObj.prototype._applyUrl = function(el) {
-	if (YAHOO.env.ua.ie && YAHOO.env.ua.ie <= 6) {
-		el.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + this.url + '", sizingMethod="scale")';
-	}
-	else {
-		el.style.backgroundImage = "url('" + this.url + "')";
-	}
-};
-YAHOO.register("imageloader", YAHOO.util.ImageLoader, {version: "2.3.1", build: "541"});

Added: trunk/root/static/yui/json/README
===================================================================
--- trunk/root/static/yui/json/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/json/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,7 @@
+*** version 2.4.1 ***
+
+No change
+
+*** version 2.4.0 ***
+
+* Initial release

Added: trunk/root/static/yui/json/json-beta-debug.js
===================================================================
--- trunk/root/static/yui/json/json-beta-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/json/json-beta-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,271 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+/**
+ * Provides methods to parse JSON strings and convert objects to JSON strings.
+ * @module json
+ * @requires yahoo
+ * @class YAHOO.lang.JSON
+ * @static
+ */
+YAHOO.namespace('lang');
+YAHOO.lang.JSON = {
+
+    /**
+     * Parse a JSON string, returning the native JavaScript representation.
+     * Only minor modifications from http://www.json.org/json.js.
+     * @param s {string} JSON string data
+     * @param filter {function} (optional) function(k,v) passed each key value pair of object literals, allowing pruning or altering values
+     * @return {MIXED} the native JavaScript representation of the JSON string
+     * @throws SyntaxError
+     * @method parse
+     * @static
+     * @public
+     */
+    parse : function (s,filter) {
+        var j;
+
+        function walk(k, v) {
+            var i, n;
+            if (v && typeof v === 'object') {
+                for (i in v) {
+                    if (YAHOO.lang.hasOwnProperty.apply(v, [i])) {
+                        n = walk(i, v[i]);
+                        if (n !== undefined) {
+                            v[i] = n;
+                        }
+                    }
+                }
+            }
+            return filter(k, v);
+        }
+
+
+// Parsing happens in three stages. In the first stage, we run the text against
+// a regular expression which looks for non-JSON characters. We are especially
+// concerned with '()' and 'new' because they can cause invocation, and '='
+// because it can cause mutation. But just to be safe, we will reject all
+// unexpected characters.
+
+// We split the first stage into 4 regexp operations in order to work around
+// crippling deficiencies in IE's and Safari's regexp engines. First we replace
+// all backslash pairs with '@' (a non-JSON character). Second, we replace all
+// simple value tokens with ']' characters. Third, we delete all open brackets
+// that follow a colon or comma or that begin the text. Finally, we look to see
+// that the remaining characters are only whitespace or ']' or ',' or ':' or '{'
+// or '}'. If that is so, then the text is safe for eval.
+
+        if (/^[\],:{}\s]*$/.test(s.replace(/\\./g, '@').
+                replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g, ']').
+                replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
+
+// In the second stage we use the eval function to compile the text into a
+// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
+// in JavaScript: it can begin a block or an object literal. We wrap the text
+// in parens to eliminate the ambiguity.
+
+            j = eval('(' + s + ')');
+
+// In the optional third stage, we recursively walk the new structure, passing
+// each name/value pair to a filter function for possible transformation.
+
+            return typeof filter === 'function' ? walk('', j) : j;
+        }
+
+// If the text is not JSON parseable, then a SyntaxError is thrown.
+
+        throw new SyntaxError('parseJSON');
+    },
+
+
+    /**
+     * Converts an arbitrary value to a JSON string representation.
+     * Cyclical object or array references are replaced with null.
+     * If a whitelist is provided, only matching object keys will be included.
+     * If a depth limit is provided, objects and arrays at that depth will
+     * be stringified as empty.
+     * @param o {MIXED} any arbitrary object to convert to JSON string
+     * @param w {Array} (optional) whitelist of acceptable object keys to include
+     * @param d {number} (optional) depth limit to recurse objects/arrays (practical minimum 1)
+     * @return {string} JSON string representation of the input
+     * @method stringify
+     * @static
+     * @public
+     */
+    stringify : function (o,w,d) {
+
+        var l = YAHOO.lang,
+
+            // Regex used to encode strings as safe JSON values
+            str_re = /["\\\x00-\x1f]/g,
+
+            // Character substitution map used by regex to prepare strings
+            m = {
+                '\b': '\\b',
+                '\t': '\\t',
+                '\n': '\\n',
+                '\f': '\\f',
+                '\r': '\\r',
+                '"' : '\\"',
+                '\\': '\\\\'
+            },
+
+            // Processing stack used to prevent cyclical references
+            pstack  = [];
+
+
+        /**
+        * Encode odd characters.  Translated characters are cached.
+        * @private
+        */
+        function _encodeChar(c) {
+            if (!m[c]) {
+                var a = c.charCodeAt();
+                m[c] = '\\u00' + Math.floor(a / 16).toString(16) +
+                                           (a % 16).toString(16);
+            }
+            return m[c];
+        }
+
+        /**
+         * zero pad single digits in dates.
+         * @private
+         */
+        function _zeroPad(v) {
+            return v < 10 ? '0' + v : v;
+        }
+
+        /**
+         * Wrap string values and object keys in double quotes after replacing
+         * any odd characters.
+         * @private
+         */
+        function _string(o) {
+            return '"' + o.replace(str_re, _encodeChar) + '"';
+        }
+    
+        /**
+         * Worker function.  Fork behavior on data type and recurse objects and
+         * arrays per the configured depth.
+         * @private
+         */
+        function _stringify(o,w,d) {
+            var t = typeof o,
+                i,len,j, // array iteration
+                k,v,     // object iteration
+                vt,      // typeof v during iteration
+                a;       // composition array for performance over string concat
+
+            // String
+            if (t === 'string') {
+                return _string(o);
+            }
+
+            // native boolean and Boolean instance
+            if (t === 'boolean' || o instanceof Boolean) {
+                return String(o);
+            }
+
+            // native number and Number instance
+            if (t === 'number' || o instanceof Number) {
+                return isFinite(o) ? String(o) : 'null';
+            }
+
+            // Date
+            if (o instanceof Date) {
+                return ['"',         o.getUTCFullYear(),  '-',
+                            _zeroPad(o.getUTCMonth() + 1),'-',
+                            _zeroPad(o.getUTCDate()),     'T',
+                            _zeroPad(o.getUTCHours()),    ':',
+                            _zeroPad(o.getUTCMinutes()),  ':',
+                            _zeroPad(o.getUTCSeconds()),  'Z"'].join('');
+            }
+
+            // Array
+            if (l.isArray(o)) {
+                // Check for cyclical references
+                for (i = 0, len = pstack.length; i < len; ++i) {
+                    if (pstack[i] === o) {
+                        return 'null';
+                    }
+                }
+
+                // Add the array to the processing stack
+                pstack[pstack.length] = o;
+
+                a = [];
+                // Only recurse if we're above depth config
+                if (d > 0) {
+                    for (i = 0, len = o.length; i < len; ++i) {
+                        a[i] = _stringify(o[i],w,d-1);
+                    }
+                }
+
+                // remove the array from the stack
+                pstack.pop();
+
+                return '[' + a.join(',') + ']';
+            }
+
+            // Object
+            if (t === 'object' && o) {
+                // Check for cyclical references
+                for (i = 0, len = pstack.length; i < len; ++i) {
+                    if (pstack[i] === o) {
+                        return 'null';
+                    }
+                }
+
+                // Add the object to the  processing stack
+                pstack[pstack.length] = o;
+
+                a = [];
+                // Only recurse if we're above depth config
+                if (d > 0) {
+
+                    // If whitelist provided, take only those keys
+                    if (w) {
+                        for (i = 0, j = 0, len = w.length; i < len; ++i) {
+                            v = o[w[i]];
+                            vt = typeof v;
+
+                            // Omit invalid values
+                            if (vt !== 'undefined' && vt !== 'function') {
+                                a[j++] = _string(w[i]) + ':' + _stringify(v,w,d-1);
+                            }
+                        }
+
+                    // Otherwise, take all valid object properties
+                    // omitting the prototype chain properties
+                    } else {
+                        j = 0;
+                        for (k in o) {
+                            if (typeof k === 'string' && l.hasOwnProperty(o,k)) {
+                                v = o[k];
+                                vt = typeof v;
+                                if (vt !== 'undefined' && vt !== 'function') {
+                                    a[j++] = _string(k) + ':' + _stringify(v,w,d-1);
+                                }
+                            }
+                        }
+                    }
+                }
+
+                // Remove the object from processing stack
+                pstack.pop();
+
+                return '{' + a.join(',') + '}';
+            }
+
+            return 'null';
+        }
+
+        // process the input
+        d = d >= 0 ? d : 1/0;  // Default depth to POSITIVE_INFINITY
+        return _stringify(o,w,d);
+    }
+};
+YAHOO.register("json", YAHOO.lang.JSON, {version: "2.4.1", build: "742"});

Added: trunk/root/static/yui/json/json-beta-min.js
===================================================================
--- trunk/root/static/yui/json/json-beta-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/json/json-beta-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+YAHOO.namespace("lang");YAHOO.lang.JSON={parse:function(s,filter){var j;function walk(k,v){var i,n;if(v&&typeof v==="object"){for(i in v){if(YAHOO.lang.hasOwnProperty.apply(v,[i])){n=walk(i,v[i]);if(n!==undefined){v[i]=n;}}}}return filter(k,v);}if(/^[\],:{}\s]*$/.test(s.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+s+")");return typeof filter==="function"?walk("",j):j;}throw new SyntaxError("parseJSON");},stringify:function(D,J,H){var F=YAHOO.lang,A=/["\\\x00-\x1f]/g,E={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"},C=[];function B(M){if(!E[M]){var L=M.charCodeAt();E[M]="\\u00"+Math.floor(L/16).toString(16)+(L%16).toString(16);}return E[M];}function G(L){return L<10?"0"+L:L;}function K(L){return"\""+L.replace(A,B)+"\"";}function I(L,S,Q){var V=typeof L,O,P,N,M,T,U,R;if(V==="string"){return K(L);}if(V==="boolean"||L instanceof Boolean){return!
  String(L);}if(V==="number"||L instanceof Number){return isFinite(L)?String(L):"null";}if(L instanceof Date){return["\"",L.getUTCFullYear(),"-",G(L.getUTCMonth()+1),"-",G(L.getUTCDate()),"T",G(L.getUTCHours()),":",G(L.getUTCMinutes()),":",G(L.getUTCSeconds()),"Z\""].join("");}if(F.isArray(L)){for(O=0,P=C.length;O<P;++O){if(C[O]===L){return"null";}}C[C.length]=L;R=[];if(Q>0){for(O=0,P=L.length;O<P;++O){R[O]=I(L[O],S,Q-1);}}C.pop();return"["+R.join(",")+"]";}if(V==="object"&&L){for(O=0,P=C.length;O<P;++O){if(C[O]===L){return"null";}}C[C.length]=L;R=[];if(Q>0){if(S){for(O=0,N=0,P=S.length;O<P;++O){T=L[S[O]];U=typeof T;if(U!=="undefined"&&U!=="function"){R[N++]=K(S[O])+":"+I(T,S,Q-1);}}}else{N=0;for(M in L){if(typeof M==="string"&&F.hasOwnProperty(L,M)){T=L[M];U=typeof T;if(U!=="undefined"&&U!=="function"){R[N++]=K(M)+":"+I(T,S,Q-1);}}}}}C.pop();return"{"+R.join(",")+"}";}return"null";}H=H>=0?H:1/0;return I(D,J,H);}};YAHOO.register("json",YAHOO.lang.JSON,{version:"2.4.1",build:!
 "742"});
\ No newline at end of file

Added: trunk/root/static/yui/json/json-beta.js
===================================================================
--- trunk/root/static/yui/json/json-beta.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/json/json-beta.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,271 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+/**
+ * Provides methods to parse JSON strings and convert objects to JSON strings.
+ * @module json
+ * @requires yahoo
+ * @class YAHOO.lang.JSON
+ * @static
+ */
+YAHOO.namespace('lang');
+YAHOO.lang.JSON = {
+
+    /**
+     * Parse a JSON string, returning the native JavaScript representation.
+     * Only minor modifications from http://www.json.org/json.js.
+     * @param s {string} JSON string data
+     * @param filter {function} (optional) function(k,v) passed each key value pair of object literals, allowing pruning or altering values
+     * @return {MIXED} the native JavaScript representation of the JSON string
+     * @throws SyntaxError
+     * @method parse
+     * @static
+     * @public
+     */
+    parse : function (s,filter) {
+        var j;
+
+        function walk(k, v) {
+            var i, n;
+            if (v && typeof v === 'object') {
+                for (i in v) {
+                    if (YAHOO.lang.hasOwnProperty.apply(v, [i])) {
+                        n = walk(i, v[i]);
+                        if (n !== undefined) {
+                            v[i] = n;
+                        }
+                    }
+                }
+            }
+            return filter(k, v);
+        }
+
+
+// Parsing happens in three stages. In the first stage, we run the text against
+// a regular expression which looks for non-JSON characters. We are especially
+// concerned with '()' and 'new' because they can cause invocation, and '='
+// because it can cause mutation. But just to be safe, we will reject all
+// unexpected characters.
+
+// We split the first stage into 4 regexp operations in order to work around
+// crippling deficiencies in IE's and Safari's regexp engines. First we replace
+// all backslash pairs with '@' (a non-JSON character). Second, we replace all
+// simple value tokens with ']' characters. Third, we delete all open brackets
+// that follow a colon or comma or that begin the text. Finally, we look to see
+// that the remaining characters are only whitespace or ']' or ',' or ':' or '{'
+// or '}'. If that is so, then the text is safe for eval.
+
+        if (/^[\],:{}\s]*$/.test(s.replace(/\\./g, '@').
+                replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g, ']').
+                replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
+
+// In the second stage we use the eval function to compile the text into a
+// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
+// in JavaScript: it can begin a block or an object literal. We wrap the text
+// in parens to eliminate the ambiguity.
+
+            j = eval('(' + s + ')');
+
+// In the optional third stage, we recursively walk the new structure, passing
+// each name/value pair to a filter function for possible transformation.
+
+            return typeof filter === 'function' ? walk('', j) : j;
+        }
+
+// If the text is not JSON parseable, then a SyntaxError is thrown.
+
+        throw new SyntaxError('parseJSON');
+    },
+
+
+    /**
+     * Converts an arbitrary value to a JSON string representation.
+     * Cyclical object or array references are replaced with null.
+     * If a whitelist is provided, only matching object keys will be included.
+     * If a depth limit is provided, objects and arrays at that depth will
+     * be stringified as empty.
+     * @param o {MIXED} any arbitrary object to convert to JSON string
+     * @param w {Array} (optional) whitelist of acceptable object keys to include
+     * @param d {number} (optional) depth limit to recurse objects/arrays (practical minimum 1)
+     * @return {string} JSON string representation of the input
+     * @method stringify
+     * @static
+     * @public
+     */
+    stringify : function (o,w,d) {
+
+        var l = YAHOO.lang,
+
+            // Regex used to encode strings as safe JSON values
+            str_re = /["\\\x00-\x1f]/g,
+
+            // Character substitution map used by regex to prepare strings
+            m = {
+                '\b': '\\b',
+                '\t': '\\t',
+                '\n': '\\n',
+                '\f': '\\f',
+                '\r': '\\r',
+                '"' : '\\"',
+                '\\': '\\\\'
+            },
+
+            // Processing stack used to prevent cyclical references
+            pstack  = [];
+
+
+        /**
+        * Encode odd characters.  Translated characters are cached.
+        * @private
+        */
+        function _encodeChar(c) {
+            if (!m[c]) {
+                var a = c.charCodeAt();
+                m[c] = '\\u00' + Math.floor(a / 16).toString(16) +
+                                           (a % 16).toString(16);
+            }
+            return m[c];
+        }
+
+        /**
+         * zero pad single digits in dates.
+         * @private
+         */
+        function _zeroPad(v) {
+            return v < 10 ? '0' + v : v;
+        }
+
+        /**
+         * Wrap string values and object keys in double quotes after replacing
+         * any odd characters.
+         * @private
+         */
+        function _string(o) {
+            return '"' + o.replace(str_re, _encodeChar) + '"';
+        }
+    
+        /**
+         * Worker function.  Fork behavior on data type and recurse objects and
+         * arrays per the configured depth.
+         * @private
+         */
+        function _stringify(o,w,d) {
+            var t = typeof o,
+                i,len,j, // array iteration
+                k,v,     // object iteration
+                vt,      // typeof v during iteration
+                a;       // composition array for performance over string concat
+
+            // String
+            if (t === 'string') {
+                return _string(o);
+            }
+
+            // native boolean and Boolean instance
+            if (t === 'boolean' || o instanceof Boolean) {
+                return String(o);
+            }
+
+            // native number and Number instance
+            if (t === 'number' || o instanceof Number) {
+                return isFinite(o) ? String(o) : 'null';
+            }
+
+            // Date
+            if (o instanceof Date) {
+                return ['"',         o.getUTCFullYear(),  '-',
+                            _zeroPad(o.getUTCMonth() + 1),'-',
+                            _zeroPad(o.getUTCDate()),     'T',
+                            _zeroPad(o.getUTCHours()),    ':',
+                            _zeroPad(o.getUTCMinutes()),  ':',
+                            _zeroPad(o.getUTCSeconds()),  'Z"'].join('');
+            }
+
+            // Array
+            if (l.isArray(o)) {
+                // Check for cyclical references
+                for (i = 0, len = pstack.length; i < len; ++i) {
+                    if (pstack[i] === o) {
+                        return 'null';
+                    }
+                }
+
+                // Add the array to the processing stack
+                pstack[pstack.length] = o;
+
+                a = [];
+                // Only recurse if we're above depth config
+                if (d > 0) {
+                    for (i = 0, len = o.length; i < len; ++i) {
+                        a[i] = _stringify(o[i],w,d-1);
+                    }
+                }
+
+                // remove the array from the stack
+                pstack.pop();
+
+                return '[' + a.join(',') + ']';
+            }
+
+            // Object
+            if (t === 'object' && o) {
+                // Check for cyclical references
+                for (i = 0, len = pstack.length; i < len; ++i) {
+                    if (pstack[i] === o) {
+                        return 'null';
+                    }
+                }
+
+                // Add the object to the  processing stack
+                pstack[pstack.length] = o;
+
+                a = [];
+                // Only recurse if we're above depth config
+                if (d > 0) {
+
+                    // If whitelist provided, take only those keys
+                    if (w) {
+                        for (i = 0, j = 0, len = w.length; i < len; ++i) {
+                            v = o[w[i]];
+                            vt = typeof v;
+
+                            // Omit invalid values
+                            if (vt !== 'undefined' && vt !== 'function') {
+                                a[j++] = _string(w[i]) + ':' + _stringify(v,w,d-1);
+                            }
+                        }
+
+                    // Otherwise, take all valid object properties
+                    // omitting the prototype chain properties
+                    } else {
+                        j = 0;
+                        for (k in o) {
+                            if (typeof k === 'string' && l.hasOwnProperty(o,k)) {
+                                v = o[k];
+                                vt = typeof v;
+                                if (vt !== 'undefined' && vt !== 'function') {
+                                    a[j++] = _string(k) + ':' + _stringify(v,w,d-1);
+                                }
+                            }
+                        }
+                    }
+                }
+
+                // Remove the object from processing stack
+                pstack.pop();
+
+                return '{' + a.join(',') + '}';
+            }
+
+            return 'null';
+        }
+
+        // process the input
+        d = d >= 0 ? d : 1/0;  // Default depth to POSITIVE_INFINITY
+        return _stringify(o,w,d);
+    }
+};
+YAHOO.register("json", YAHOO.lang.JSON, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/logger/README
===================================================================
--- trunk/root/static/yui/logger/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/logger/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,15 @@
 Logger Release Notes
 
+*** version 2.4.1 ***
+No change
+
+*** version 2.4.0 ***
+
+* Global window error event no longer being handled by default. Implemented
+ handleWindowErrors() and unhandleWindowErrors().
+
+
+
 *** version 2.3.1 ***
 
 * No changes.

Modified: trunk/root/static/yui/logger/assets/logger-core.css
===================================================================
--- trunk/root/static/yui/logger/assets/logger-core.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/logger/assets/logger-core.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* This file intentionally left blank */

Modified: trunk/root/static/yui/logger/assets/logger.css
===================================================================
--- trunk/root/static/yui/logger/assets/logger.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/logger/assets/logger.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* logger default styles */
 /* default width: 31em */

Modified: trunk/root/static/yui/logger/assets/skins/sam/logger-skin.css
===================================================================
--- trunk/root/static/yui/logger/assets/skins/sam/logger-skin.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/logger/assets/skins/sam/logger-skin.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* logger default styles */
 /* default width: 31em */

Modified: trunk/root/static/yui/logger/assets/skins/sam/logger.css
===================================================================
--- trunk/root/static/yui/logger/assets/skins/sam/logger.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/logger/assets/skins/sam/logger.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 .yui-skin-sam .yui-log{padding:1em;width:31em;background-color:#AAA;color:#000;border:1px solid black;font-family:monospace;font-size:77%;text-align:left;z-index:9000;}.yui-skin-sam .yui-log-container{position:absolute;top:1em;right:1em;}.yui-skin-sam .yui-log input{margin:0;padding:0;font-family:arial;font-size:100%;font-weight:normal;}.yui-skin-sam .yui-log .yui-log-btns{position:relative;float:right;bottom:.25em;}.yui-skin-sam .yui-log .yui-log-hd{margin-top:1em;padding:.5em;background-color:#575757;}.yui-skin-sam .yui-log .yui-log-hd h4{margin:0;padding:0;font-size:108%;font-weight:bold;color:#FFF;}.yui-skin-sam .yui-log .yui-log-bd{width:100%;height:20em;background-color:#FFF;border:1px solid gray;overflow:auto;}.yui-skin-sam .yui-log p{margin:1px;padding:.1em;}.yui-skin-sam .yui-log pre{margin:0;padding:0;}.yui-skin-sam .yui-log pre.yui-log-verbose{white-space:pre-wrap;white-space:-moz-pre-wrap !important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-w!
 ord;}.yui-skin-sam .yui-log .yui-log-ft{margin-top:.5em;}.yui-skin-sam .yui-log .yui-log-ft .yui-log-categoryfilters{}.yui-skin-sam .yui-log .yui-log-ft .yui-log-sourcefilters{width:100%;border-top:1px solid #575757;margin-top:.75em;padding-top:.75em;}.yui-skin-sam .yui-log .yui-log-filtergrp{margin-right:.5em;}.yui-skin-sam .yui-log .info{background-color:#A7CC25;}.yui-skin-sam .yui-log .warn{background-color:#F58516;}.yui-skin-sam .yui-log .error{background-color:#E32F0B;}.yui-skin-sam .yui-log .time{background-color:#A6C9D7;}.yui-skin-sam .yui-log .window{background-color:#F2E886;}

Modified: trunk/root/static/yui/logger/logger-debug.js
===================================================================
--- trunk/root/static/yui/logger/logger-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/logger/logger-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /****************************************************************************/
 /****************************************************************************/
@@ -653,8 +653,9 @@
     // not the absolute previous item in the stack
 
     var time = oLogMsg.time;
+    var localTime;
     if (time.toLocaleTimeString) {
-        var localTime  = time.toLocaleTimeString();
+        localTime  = time.toLocaleTimeString();
     }
     else {
         localTime = time.toString();
@@ -1540,7 +1541,9 @@
         _stack: [], // holds all log msgs
         maxStackEntries: 2500,
         _startTime: new Date().getTime(), // static start timestamp
-        _lastTime: null // timestamp of last logged message
+        _lastTime: null, // timestamp of last logged message
+        _windowErrorsHandled: false,
+        _origOnWindowError: null
     };
 
     /////////////////////////////////////////////////////////////////////////////
@@ -1751,6 +1754,53 @@
         YAHOO.log("Logger output to the function console.log() has been enabled.");
     };
 
+    /**
+     * Surpresses native JavaScript errors and outputs to console. By default,
+     * Logger does not handle JavaScript window error events.
+     * NB: Not all browsers support the window.onerror event.
+     *
+     * @method handleWindowErrors
+     */
+    YAHOO.widget.Logger.handleWindowErrors = function() {
+        if(!YAHOO.widget.Logger._windowErrorsHandled) {
+            // Save any previously defined handler to call
+            if(window.error) {
+                YAHOO.widget.Logger._origOnWindowError = window.onerror;
+            }
+            window.onerror = YAHOO.widget.Logger._onWindowError;
+            YAHOO.widget.Logger._windowErrorsHandled = true;
+            YAHOO.log("Logger handling of window.onerror has been enabled.");
+        }
+        else {
+            YAHOO.log("Logger handling of window.onerror had already been enabled.");
+        }
+    };
+
+    /**
+     * Unsurpresses native JavaScript errors. By default,
+     * Logger does not handle JavaScript window error events.
+     * NB: Not all browsers support the window.onerror event.
+     *
+     * @method unhandleWindowErrors
+     */
+    YAHOO.widget.Logger.unhandleWindowErrors = function() {
+        if(YAHOO.widget.Logger._windowErrorsHandled) {
+            // Revert to any previously defined handler to call
+            if(YAHOO.widget.Logger._origOnWindowError) {
+                window.onerror = YAHOO.widget.Logger._origOnWindowError;
+                YAHOO.widget.Logger._origOnWindowError = null;
+            }
+            else {
+                window.onerror = null;
+            }
+            YAHOO.widget.Logger._windowErrorsHandled = false;
+            YAHOO.log("Logger handling of window.onerror has been disabled.");
+        }
+        else {
+            YAHOO.log("Logger handling of window.onerror had already been disabled.");
+        }
+    };
+    
     /////////////////////////////////////////////////////////////////////////////
     //
     // Public events
@@ -1869,8 +1919,9 @@
             var label = oEntry.category.substring(0,4).toUpperCase();
 
             var time = oEntry.time;
+            var localTime;
             if (time.toLocaleTimeString) {
-                var localTime  = time.toLocaleTimeString();
+                localTime  = time.toLocaleTimeString();
             }
             else {
                 localTime = time.toString();
@@ -1921,19 +1972,6 @@
 
     /////////////////////////////////////////////////////////////////////////////
     //
-    // Enable handling of native JavaScript errors
-    // NB: Not all browsers support the window.onerror event
-    //
-    /////////////////////////////////////////////////////////////////////////////
-
-    if(window.onerror) {
-        // Save any previously defined handler to call
-        YAHOO.widget.Logger._origOnWindowError = window.onerror;
-    }
-    window.onerror = YAHOO.widget.Logger._onWindowError;
-
-    /////////////////////////////////////////////////////////////////////////////
-    //
     // First log
     //
     /////////////////////////////////////////////////////////////////////////////
@@ -1942,4 +1980,4 @@
 }
 
 
-YAHOO.register("logger", YAHOO.widget.Logger, {version: "2.3.1", build: "541"});
+YAHOO.register("logger", YAHOO.widget.Logger, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/logger/logger-min.js
===================================================================
--- trunk/root/static/yui/logger/logger-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/logger/logger-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,8 +2,9 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-YAHOO.widget.LogMsg=function(A){if(A&&(A.constructor==Object)){for(var B in A){this[B]=A[B];}}};YAHOO.widget.LogMsg.prototype.msg=null;YAHOO.widget.LogMsg.prototype.time=null;YAHOO.widget.LogMsg.prototype.category=null;YAHOO.widget.LogMsg.prototype.source=null;YAHOO.widget.LogMsg.prototype.sourceDetail=null;YAHOO.widget.LogWriter=function(A){if(!A){YAHOO.log("Could not instantiate LogWriter due to invalid source.","error","LogWriter");return ;}this._source=A;};YAHOO.widget.LogWriter.prototype.toString=function(){return"LogWriter "+this._sSource;};YAHOO.widget.LogWriter.prototype.log=function(A,B){YAHOO.widget.Logger.log(A,B,this._source);};YAHOO.widget.LogWriter.prototype.getSource=function(){return this._sSource;};YAHOO.widget.LogWriter.prototype.setSource=function(A){if(!A){YAHOO.log("Could not set source due to invalid source.","error",this.toString());return ;}else{this._sSource=A;}};YAHOO.widget.LogWriter.prototype._source=null;YAHOO.widget.LogReader=function(B,A){this!
 ._sName=YAHOO.widget.LogReader._index;YAHOO.widget.LogReader._index++;this._buffer=[];this._filterCheckboxes={};this._lastTime=YAHOO.widget.Logger.getStartTime();if(A&&(A.constructor==Object)){for(var C in A){this[C]=A[C];}}this._initContainerEl(B);if(!this._elContainer){YAHOO.log("Could not instantiate LogReader due to an invalid container element "+B,"error",this.toString());return ;}this._initHeaderEl();this._initConsoleEl();this._initFooterEl();this._initDragDrop();this._initCategories();this._initSources();YAHOO.widget.Logger.newLogEvent.subscribe(this._onNewLog,this);YAHOO.widget.Logger.logResetEvent.subscribe(this._onReset,this);YAHOO.widget.Logger.categoryCreateEvent.subscribe(this._onCategoryCreate,this);YAHOO.widget.Logger.sourceCreateEvent.subscribe(this._onSourceCreate,this);this._filterLogs();YAHOO.log("LogReader initialized",null,this.toString());};YAHOO.widget.LogReader.prototype.logReaderEnabled=true;YAHOO.widget.LogReader.prototype.width=null;YAHOO.widget.L!
 ogReader.prototype.height=null;YAHOO.widget.LogReader.prototyp!
 e.top=nu
ll;YAHOO.widget.LogReader.prototype.left=null;YAHOO.widget.LogReader.prototype.right=null;YAHOO.widget.LogReader.prototype.bottom=null;YAHOO.widget.LogReader.prototype.fontSize=null;YAHOO.widget.LogReader.prototype.footerEnabled=true;YAHOO.widget.LogReader.prototype.verboseOutput=true;YAHOO.widget.LogReader.prototype.newestOnTop=true;YAHOO.widget.LogReader.prototype.outputBuffer=100;YAHOO.widget.LogReader.prototype.thresholdMax=500;YAHOO.widget.LogReader.prototype.thresholdMin=100;YAHOO.widget.LogReader.prototype.isCollapsed=false;YAHOO.widget.LogReader.prototype.isPaused=false;YAHOO.widget.LogReader.prototype.draggable=true;YAHOO.widget.LogReader.prototype.toString=function(){return"LogReader instance"+this._sName;};YAHOO.widget.LogReader.prototype.pause=function(){this.isPaused=true;this._btnPause.value="Resume";this._timeout=null;this.logReaderEnabled=false;};YAHOO.widget.LogReader.prototype.resume=function(){this.isPaused=false;this._btnPause.value="Pause";this.logReader!
 Enabled=true;this._printBuffer();};YAHOO.widget.LogReader.prototype.hide=function(){this._elContainer.style.display="none";};YAHOO.widget.LogReader.prototype.show=function(){this._elContainer.style.display="block";};YAHOO.widget.LogReader.prototype.collapse=function(){this._elConsole.style.display="none";if(this._elFt){this._elFt.style.display="none";}this._btnCollapse.value="Expand";this.isCollapsed=true;};YAHOO.widget.LogReader.prototype.expand=function(){this._elConsole.style.display="block";if(this._elFt){this._elFt.style.display="block";}this._btnCollapse.value="Collapse";this.isCollapsed=false;};YAHOO.widget.LogReader.prototype.getCheckbox=function(A){return this._filterCheckboxes[A];};YAHOO.widget.LogReader.prototype.getCategories=function(){return this._categoryFilters;};YAHOO.widget.LogReader.prototype.showCategory=function(B){var D=this._categoryFilters;if(D.indexOf){if(D.indexOf(B)>-1){return ;}}else{for(var A=0;A<D.length;A++){if(D[A]===B){return ;}}}this._categ!
 oryFilters.push(B);this._filterLogs();var C=this.getCheckbox(B!
 );if(C){
C.checked=true;}};YAHOO.widget.LogReader.prototype.hideCategory=function(B){var D=this._categoryFilters;for(var A=0;A<D.length;A++){if(B==D[A]){D.splice(A,1);break;}}this._filterLogs();var C=this.getCheckbox(B);if(C){C.checked=false;}};YAHOO.widget.LogReader.prototype.getSources=function(){return this._sourceFilters;};YAHOO.widget.LogReader.prototype.showSource=function(A){var D=this._sourceFilters;if(D.indexOf){if(D.indexOf(A)>-1){return ;}}else{for(var B=0;B<D.length;B++){if(A==D[B]){return ;}}}D.push(A);this._filterLogs();var C=this.getCheckbox(A);if(C){C.checked=true;}};YAHOO.widget.LogReader.prototype.hideSource=function(A){var D=this._sourceFilters;for(var B=0;B<D.length;B++){if(A==D[B]){D.splice(B,1);break;}}this._filterLogs();var C=this.getCheckbox(A);if(C){C.checked=false;}};YAHOO.widget.LogReader.prototype.clearConsole=function(){this._timeout=null;this._buffer=[];this._consoleMsgCount=0;var A=this._elConsole;while(A.hasChildNodes()){A.removeChild(A.firstChild);}};!
 YAHOO.widget.LogReader.prototype.setTitle=function(A){this._title.innerHTML=this.html2Text(A);};YAHOO.widget.LogReader.prototype.getLastTime=function(){return this._lastTime;};YAHOO.widget.LogReader.prototype.formatMsg=function(D){var E=D.category;var L=E.substring(0,4).toUpperCase();var I=D.time;if(I.toLocaleTimeString){var J=I.toLocaleTimeString();}else{J=I.toString();}var B=I.getTime();var F=YAHOO.widget.Logger.getStartTime();var C=B-F;var N=B-this.getLastTime();var A=D.source;var M=D.sourceDetail;var K=(M)?A+" "+M:A;var H=this.html2Text(YAHOO.lang.dump(D.msg));var G=(this.verboseOutput)?["<pre class=\"yui-log-verbose\"><p><span class='",E,"'>",L,"</span> ",C,"ms (+",N,") ",J,": ","</p><p>",K,": </p><p>",H,"</p></pre>"]:["<pre><p><span class='",E,"'>",L,"</span> ",C,"ms (+",N,") ",J,": ",K,": ",H,"</p></pre>"];return G.join("");};YAHOO.widget.LogReader.prototype.html2Text=function(A){if(A){A+="";return A.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
+YAHOO.widget.LogMsg=function(A){if(A&&(A.constructor==Object)){for(var B in A){this[B]=A[B];}}};YAHOO.widget.LogMsg.prototype.msg=null;YAHOO.widget.LogMsg.prototype.time=null;YAHOO.widget.LogMsg.prototype.category=null;YAHOO.widget.LogMsg.prototype.source=null;YAHOO.widget.LogMsg.prototype.sourceDetail=null;YAHOO.widget.LogWriter=function(A){if(!A){YAHOO.log("Could not instantiate LogWriter due to invalid source.","error","LogWriter");return ;}this._source=A;};YAHOO.widget.LogWriter.prototype.toString=function(){return"LogWriter "+this._sSource;};YAHOO.widget.LogWriter.prototype.log=function(A,B){YAHOO.widget.Logger.log(A,B,this._source);};YAHOO.widget.LogWriter.prototype.getSource=function(){return this._sSource;};YAHOO.widget.LogWriter.prototype.setSource=function(A){if(!A){YAHOO.log("Could not set source due to invalid source.","error",this.toString());return ;}else{this._sSource=A;}};YAHOO.widget.LogWriter.prototype._source=null;YAHOO.widget.LogReader=function(B,A){this!
 ._sName=YAHOO.widget.LogReader._index;YAHOO.widget.LogReader._index++;this._buffer=[];this._filterCheckboxes={};this._lastTime=YAHOO.widget.Logger.getStartTime();if(A&&(A.constructor==Object)){for(var C in A){this[C]=A[C];}}this._initContainerEl(B);if(!this._elContainer){YAHOO.log("Could not instantiate LogReader due to an invalid container element "+B,"error",this.toString());return ;}this._initHeaderEl();this._initConsoleEl();this._initFooterEl();this._initDragDrop();this._initCategories();this._initSources();YAHOO.widget.Logger.newLogEvent.subscribe(this._onNewLog,this);YAHOO.widget.Logger.logResetEvent.subscribe(this._onReset,this);YAHOO.widget.Logger.categoryCreateEvent.subscribe(this._onCategoryCreate,this);YAHOO.widget.Logger.sourceCreateEvent.subscribe(this._onSourceCreate,this);this._filterLogs();YAHOO.log("LogReader initialized",null,this.toString());};YAHOO.widget.LogReader.prototype.logReaderEnabled=true;YAHOO.widget.LogReader.prototype.width=null;YAHOO.widget.L!
 ogReader.prototype.height=null;YAHOO.widget.LogReader.prototyp!
 e.top=nu
ll;YAHOO.widget.LogReader.prototype.left=null;YAHOO.widget.LogReader.prototype.right=null;YAHOO.widget.LogReader.prototype.bottom=null;YAHOO.widget.LogReader.prototype.fontSize=null;YAHOO.widget.LogReader.prototype.footerEnabled=true;YAHOO.widget.LogReader.prototype.verboseOutput=true;YAHOO.widget.LogReader.prototype.newestOnTop=true;YAHOO.widget.LogReader.prototype.outputBuffer=100;YAHOO.widget.LogReader.prototype.thresholdMax=500;YAHOO.widget.LogReader.prototype.thresholdMin=100;YAHOO.widget.LogReader.prototype.isCollapsed=false;YAHOO.widget.LogReader.prototype.isPaused=false;YAHOO.widget.LogReader.prototype.draggable=true;YAHOO.widget.LogReader.prototype.toString=function(){return"LogReader instance"+this._sName;};YAHOO.widget.LogReader.prototype.pause=function(){this.isPaused=true;this._btnPause.value="Resume";this._timeout=null;this.logReaderEnabled=false;};YAHOO.widget.LogReader.prototype.resume=function(){this.isPaused=false;this._btnPause.value="Pause";this.logReader!
 Enabled=true;this._printBuffer();};YAHOO.widget.LogReader.prototype.hide=function(){this._elContainer.style.display="none";};YAHOO.widget.LogReader.prototype.show=function(){this._elContainer.style.display="block";};YAHOO.widget.LogReader.prototype.collapse=function(){this._elConsole.style.display="none";if(this._elFt){this._elFt.style.display="none";}this._btnCollapse.value="Expand";this.isCollapsed=true;};YAHOO.widget.LogReader.prototype.expand=function(){this._elConsole.style.display="block";if(this._elFt){this._elFt.style.display="block";}this._btnCollapse.value="Collapse";this.isCollapsed=false;};YAHOO.widget.LogReader.prototype.getCheckbox=function(A){return this._filterCheckboxes[A];};YAHOO.widget.LogReader.prototype.getCategories=function(){return this._categoryFilters;};YAHOO.widget.LogReader.prototype.showCategory=function(B){var D=this._categoryFilters;if(D.indexOf){if(D.indexOf(B)>-1){return ;}}else{for(var A=0;A<D.length;A++){if(D[A]===B){return ;}}}this._categ!
 oryFilters.push(B);this._filterLogs();var C=this.getCheckbox(B!
 );if(C){
C.checked=true;}};YAHOO.widget.LogReader.prototype.hideCategory=function(B){var D=this._categoryFilters;for(var A=0;A<D.length;A++){if(B==D[A]){D.splice(A,1);break;}}this._filterLogs();var C=this.getCheckbox(B);if(C){C.checked=false;}};YAHOO.widget.LogReader.prototype.getSources=function(){return this._sourceFilters;};YAHOO.widget.LogReader.prototype.showSource=function(A){var D=this._sourceFilters;if(D.indexOf){if(D.indexOf(A)>-1){return ;}}else{for(var B=0;B<D.length;B++){if(A==D[B]){return ;}}}D.push(A);this._filterLogs();var C=this.getCheckbox(A);if(C){C.checked=true;}};YAHOO.widget.LogReader.prototype.hideSource=function(A){var D=this._sourceFilters;for(var B=0;B<D.length;B++){if(A==D[B]){D.splice(B,1);break;}}this._filterLogs();var C=this.getCheckbox(A);if(C){C.checked=false;}};YAHOO.widget.LogReader.prototype.clearConsole=function(){this._timeout=null;this._buffer=[];this._consoleMsgCount=0;var A=this._elConsole;while(A.hasChildNodes()){A.removeChild(A.firstChild);}};!
 YAHOO.widget.LogReader.prototype.setTitle=function(A){this._title.innerHTML=this.html2Text(A);};YAHOO.widget.LogReader.prototype.getLastTime=function(){return this._lastTime;};YAHOO.widget.LogReader.prototype.formatMsg=function(D){var E=D.category;var L=E.substring(0,4).toUpperCase();var I=D.time;var J;if(I.toLocaleTimeString){J=I.toLocaleTimeString();}else{J=I.toString();}var B=I.getTime();var F=YAHOO.widget.Logger.getStartTime();var C=B-F;var N=B-this.getLastTime();var A=D.source;var M=D.sourceDetail;var K=(M)?A+" "+M:A;var H=this.html2Text(YAHOO.lang.dump(D.msg));var G=(this.verboseOutput)?["<pre class=\"yui-log-verbose\"><p><span class='",E,"'>",L,"</span> ",C,"ms (+",N,") ",J,": ","</p><p>",K,": </p><p>",H,"</p></pre>"]:["<pre><p><span class='",E,"'>",L,"</span> ",C,"ms (+",N,") ",J,": ",K,": ",H,"</p></pre>"];return G.join("");};YAHOO.widget.LogReader.prototype.html2Text=function(A){if(A){A+="";return A.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
 }return"";};YAHOO.widget.LogReader._index=0;YAHOO.widget.LogReader.prototype._sName=null;YAHOO.widget.LogReader.prototype._buffer=null;YAHOO.widget.LogReader.prototype._consoleMsgCount=0;YAHOO.widget.LogReader.prototype._lastTime=null;YAHOO.widget.LogReader.prototype._timeout=null;YAHOO.widget.LogReader.prototype._filterCheckboxes=null;YAHOO.widget.LogReader.prototype._categoryFilters=null;YAHOO.widget.LogReader.prototype._sourceFilters=null;YAHOO.widget.LogReader.prototype._elContainer=null;YAHOO.widget.LogReader.prototype._elHd=null;YAHOO.widget.LogReader.prototype._elCollapse=null;YAHOO.widget.LogReader.prototype._btnCollapse=null;YAHOO.widget.LogReader.prototype._title=null;YAHOO.widget.LogReader.prototype._elConsole=null;YAHOO.widget.LogReader.prototype._elFt=null;YAHOO.widget.LogReader.prototype._elBtns=null;YAHOO.widget.LogReader.prototype._elCategoryFilters=null;YAHOO.widget.LogReader.prototype._elSourceFilters=null;YAHOO.widget.LogReader.prototype._btnPause=null;YA!
 HOO.widget.LogReader.prototype._btnClear=null;YAHOO.widget.LogReader.prototype._initContainerEl=function(B){B=YAHOO.util.Dom.get(B);if(B&&B.tagName&&(B.tagName.toLowerCase()=="div")){this._elContainer=B;YAHOO.util.Dom.addClass(this._elContainer,"yui-log");}else{this._elContainer=document.body.appendChild(document.createElement("div"));YAHOO.util.Dom.addClass(this._elContainer,"yui-log");YAHOO.util.Dom.addClass(this._elContainer,"yui-log-container");var A=this._elContainer.style;if(this.width){A.width=this.width;}if(this.right){A.right=this.right;}if(this.top){A.top=this.top;}if(this.left){A.left=this.left;A.right="auto";}if(this.bottom){A.bottom=this.bottom;A.top="auto";}if(this.fontSize){A.fontSize=this.fontSize;}if(navigator.userAgent.toLowerCase().indexOf("opera")!=-1){document.body.style+="";}}};YAHOO.widget.LogReader.prototype._initHeaderEl=function(){var A=this;if(this._elHd){YAHOO.util.Event.purgeElement(this._elHd,true);this._elHd.innerHTML="";}this._elHd=this._elCo!
 ntainer.appendChild(document.createElement("div"));this._elHd.!
 id="yui-
log-hd"+this._sName;this._elHd.className="yui-log-hd";this._elCollapse=this._elHd.appendChild(document.createElement("div"));this._elCollapse.className="yui-log-btns";this._btnCollapse=document.createElement("input");this._btnCollapse.type="button";this._btnCollapse.className="yui-log-button";this._btnCollapse.value="Collapse";this._btnCollapse=this._elCollapse.appendChild(this._btnCollapse);YAHOO.util.Event.addListener(A._btnCollapse,"click",A._onClickCollapseBtn,A);this._title=this._elHd.appendChild(document.createElement("h4"));this._title.innerHTML="Logger Console";};YAHOO.widget.LogReader.prototype._initConsoleEl=function(){if(this._elConsole){YAHOO.util.Event.purgeElement(this._elConsole,true);this._elConsole.innerHTML="";}this._elConsole=this._elContainer.appendChild(document.createElement("div"));this._elConsole.className="yui-log-bd";if(this.height){this._elConsole.style.height=this.height;}};YAHOO.widget.LogReader.prototype._initFooterEl=function(){var A=this;if(th!
 is.footerEnabled){if(this._elFt){YAHOO.util.Event.purgeElement(this._elFt,true);this._elFt.innerHTML="";}this._elFt=this._elContainer.appendChild(document.createElement("div"));this._elFt.className="yui-log-ft";this._elBtns=this._elFt.appendChild(document.createElement("div"));this._elBtns.className="yui-log-btns";this._btnPause=document.createElement("input");this._btnPause.type="button";this._btnPause.className="yui-log-button";this._btnPause.value="Pause";this._btnPause=this._elBtns.appendChild(this._btnPause);YAHOO.util.Event.addListener(A._btnPause,"click",A._onClickPauseBtn,A);this._btnClear=document.createElement("input");this._btnClear.type="button";this._btnClear.className="yui-log-button";this._btnClear.value="Clear";this._btnClear=this._elBtns.appendChild(this._btnClear);YAHOO.util.Event.addListener(A._btnClear,"click",A._onClickClearBtn,A);this._elCategoryFilters=this._elFt.appendChild(document.createElement("div"));this._elCategoryFilters.className="yui-log-cat!
 egoryfilters";this._elSourceFilters=this._elFt.appendChild(doc!
 ument.cr
eateElement("div"));this._elSourceFilters.className="yui-log-sourcefilters";}};YAHOO.widget.LogReader.prototype._initDragDrop=function(){if(YAHOO.util.DD&&this.draggable&&this._elHd){var A=new YAHOO.util.DD(this._elContainer);A.setHandleElId(this._elHd.id);this._elHd.style.cursor="move";}};YAHOO.widget.LogReader.prototype._initCategories=function(){this._categoryFilters=[];var C=YAHOO.widget.Logger.categories;for(var A=0;A<C.length;A++){var B=C[A];this._categoryFilters.push(B);if(this._elCategoryFilters){this._createCategoryCheckbox(B);}}};YAHOO.widget.LogReader.prototype._initSources=function(){this._sourceFilters=[];var C=YAHOO.widget.Logger.sources;for(var B=0;B<C.length;B++){var A=C[B];this._sourceFilters.push(A);if(this._elSourceFilters){this._createSourceCheckbox(A);}}};YAHOO.widget.LogReader.prototype._createCategoryCheckbox=function(B){var A=this;if(this._elFt){var E=this._elCategoryFilters;var D=E.appendChild(document.createElement("span"));D.className="yui-log-filt!
 ergrp";var C=document.createElement("input");C.id="yui-log-filter-"+B+this._sName;C.className="yui-log-filter-"+B;C.type="checkbox";C.category=B;C=D.appendChild(C);C.checked=true;YAHOO.util.Event.addListener(C,"click",A._onCheckCategory,A);var F=D.appendChild(document.createElement("label"));F.htmlFor=C.id;F.className=B;F.innerHTML=B;this._filterCheckboxes[B]=C;}};YAHOO.widget.LogReader.prototype._createSourceCheckbox=function(A){var D=this;if(this._elFt){var F=this._elSourceFilters;var E=F.appendChild(document.createElement("span"));E.className="yui-log-filtergrp";var C=document.createElement("input");C.id="yui-log-filter"+A+this._sName;C.className="yui-log-filter"+A;C.type="checkbox";C.source=A;C=E.appendChild(C);C.checked=true;YAHOO.util.Event.addListener(C,"click",D._onCheckSource,D);var B=E.appendChild(document.createElement("label"));B.htmlFor=C.id;B.className=A;B.innerHTML=A;this._filterCheckboxes[A]=C;
-}};YAHOO.widget.LogReader.prototype._filterLogs=function(){if(this._elConsole!==null){this.clearConsole();this._printToConsole(YAHOO.widget.Logger.getStack());}};YAHOO.widget.LogReader.prototype._printBuffer=function(){this._timeout=null;if(this._elConsole!==null){var B=this.thresholdMax;B=(B&&!isNaN(B))?B:500;if(this._consoleMsgCount<B){var A=[];for(var C=0;C<this._buffer.length;C++){A[C]=this._buffer[C];}this._buffer=[];this._printToConsole(A);}else{this._filterLogs();}if(!this.newestOnTop){this._elConsole.scrollTop=this._elConsole.scrollHeight;}}};YAHOO.widget.LogReader.prototype._printToConsole=function(J){var B=J.length;var O=this.thresholdMin;if(isNaN(O)||(O>this.thresholdMax)){O=0;}var L=(B>O)?(B-O):0;var C=this._sourceFilters.length;var M=this._categoryFilters.length;for(var I=L;I<B;I++){var F=false;var K=false;var N=J[I];var A=N.source;var D=N.category;for(var H=0;H<C;H++){if(A==this._sourceFilters[H]){K=true;break;}}if(K){for(var G=0;G<M;G++){if(D==this._categoryF!
 ilters[G]){F=true;break;}}}if(F){var E=this.formatMsg(N);if(this.newestOnTop){this._elConsole.innerHTML=E+this._elConsole.innerHTML;}else{this._elConsole.innerHTML+=E;}this._consoleMsgCount++;this._lastTime=N.time.getTime();}}};YAHOO.widget.LogReader.prototype._onCategoryCreate=function(D,C,A){var B=C[0];A._categoryFilters.push(B);if(A._elFt){A._createCategoryCheckbox(B);}};YAHOO.widget.LogReader.prototype._onSourceCreate=function(D,C,A){var B=C[0];A._sourceFilters.push(B);if(A._elFt){A._createSourceCheckbox(B);}};YAHOO.widget.LogReader.prototype._onCheckCategory=function(A,B){var C=this.category;if(!this.checked){B.hideCategory(C);}else{B.showCategory(C);}};YAHOO.widget.LogReader.prototype._onCheckSource=function(A,B){var C=this.source;if(!this.checked){B.hideSource(C);}else{B.showSource(C);}};YAHOO.widget.LogReader.prototype._onClickCollapseBtn=function(A,B){if(!B.isCollapsed){B.collapse();}else{B.expand();}};YAHOO.widget.LogReader.prototype._onClickPauseBtn=function(A,B)!
 {if(!B.isPaused){B.pause();}else{B.resume();}};YAHOO.widget.Lo!
 gReader.
prototype._onClickClearBtn=function(A,B){B.clearConsole();};YAHOO.widget.LogReader.prototype._onNewLog=function(D,C,A){var B=C[0];A._buffer.push(B);if(A.logReaderEnabled===true&&A._timeout===null){A._timeout=setTimeout(function(){A._printBuffer();},A.outputBuffer);}};YAHOO.widget.LogReader.prototype._onReset=function(C,B,A){A._filterLogs();};if(!YAHOO.widget.Logger){YAHOO.widget.Logger={loggerEnabled:true,_browserConsoleEnabled:false,categories:["info","warn","error","time","window"],sources:["global"],_stack:[],maxStackEntries:2500,_startTime:new Date().getTime(),_lastTime:null};YAHOO.widget.Logger.log=function(B,F,G){if(this.loggerEnabled){if(!F){F="info";}else{F=F.toLocaleLowerCase();if(this._isNewCategory(F)){this._createNewCategory(F);}}var C="global";var A=null;if(G){var D=G.indexOf(" ");if(D>0){C=G.substring(0,D);A=G.substring(D,G.length);}else{C=G;}if(this._isNewSource(C)){this._createNewSource(C);}}var H=new Date();var J=new YAHOO.widget.LogMsg({msg:B,time:H,categor!
 y:F,source:C,sourceDetail:A});var I=this._stack;var E=this.maxStackEntries;if(E&&!isNaN(E)&&(I.length>=E)){I.shift();}I.push(J);this.newLogEvent.fire(J);if(this._browserConsoleEnabled){this._printToBrowserConsole(J);}return true;}else{return false;}};YAHOO.widget.Logger.reset=function(){this._stack=[];this._startTime=new Date().getTime();this.loggerEnabled=true;this.log("Logger reset");this.logResetEvent.fire();};YAHOO.widget.Logger.getStack=function(){return this._stack;};YAHOO.widget.Logger.getStartTime=function(){return this._startTime;};YAHOO.widget.Logger.disableBrowserConsole=function(){YAHOO.log("Logger output to the function console.log() has been disabled.");this._browserConsoleEnabled=false;};YAHOO.widget.Logger.enableBrowserConsole=function(){this._browserConsoleEnabled=true;YAHOO.log("Logger output to the function console.log() has been enabled.");};YAHOO.widget.Logger.categoryCreateEvent=new YAHOO.util.CustomEvent("categoryCreate",this,true);YAHOO.widget.Logger!
 .sourceCreateEvent=new YAHOO.util.CustomEvent("sourceCreate",t!
 his,true
);YAHOO.widget.Logger.newLogEvent=new YAHOO.util.CustomEvent("newLog",this,true);YAHOO.widget.Logger.logResetEvent=new YAHOO.util.CustomEvent("logReset",this,true);YAHOO.widget.Logger._createNewCategory=function(A){this.categories.push(A);this.categoryCreateEvent.fire(A);};YAHOO.widget.Logger._isNewCategory=function(B){for(var A=0;A<this.categories.length;A++){if(B==this.categories[A]){return false;}}return true;};YAHOO.widget.Logger._createNewSource=function(A){this.sources.push(A);this.sourceCreateEvent.fire(A);};YAHOO.widget.Logger._isNewSource=function(A){if(A){for(var B=0;B<this.sources.length;B++){if(A==this.sources[B]){return false;}}return true;}};YAHOO.widget.Logger._printToBrowserConsole=function(C){if(window.console&&console.log){var E=C.category;var D=C.category.substring(0,4).toUpperCase();var G=C.time;if(G.toLocaleTimeString){var F=G.toLocaleTimeString();}else{F=G.toString();}var H=G.getTime();var B=(YAHOO.widget.Logger._lastTime)?(H-YAHOO.widget.Logger._lastTi!
 me):0;YAHOO.widget.Logger._lastTime=H;var A=F+" ("+B+"ms): "+C.source+": "+C.msg;console.log(A);}};YAHOO.widget.Logger._onWindowError=function(A,C,B){try{YAHOO.widget.Logger.log(A+" ("+C+", line "+B+")","window");if(YAHOO.widget.Logger._origOnWindowError){YAHOO.widget.Logger._origOnWindowError();}}catch(D){return false;}};if(window.onerror){YAHOO.widget.Logger._origOnWindowError=window.onerror;}window.onerror=YAHOO.widget.Logger._onWindowError;YAHOO.widget.Logger.log("Logger initialized");}YAHOO.register("logger",YAHOO.widget.Logger,{version:"2.3.1",build:"541"});
\ No newline at end of file
+}};YAHOO.widget.LogReader.prototype._filterLogs=function(){if(this._elConsole!==null){this.clearConsole();this._printToConsole(YAHOO.widget.Logger.getStack());}};YAHOO.widget.LogReader.prototype._printBuffer=function(){this._timeout=null;if(this._elConsole!==null){var B=this.thresholdMax;B=(B&&!isNaN(B))?B:500;if(this._consoleMsgCount<B){var A=[];for(var C=0;C<this._buffer.length;C++){A[C]=this._buffer[C];}this._buffer=[];this._printToConsole(A);}else{this._filterLogs();}if(!this.newestOnTop){this._elConsole.scrollTop=this._elConsole.scrollHeight;}}};YAHOO.widget.LogReader.prototype._printToConsole=function(J){var B=J.length;var O=this.thresholdMin;if(isNaN(O)||(O>this.thresholdMax)){O=0;}var L=(B>O)?(B-O):0;var C=this._sourceFilters.length;var M=this._categoryFilters.length;for(var I=L;I<B;I++){var F=false;var K=false;var N=J[I];var A=N.source;var D=N.category;for(var H=0;H<C;H++){if(A==this._sourceFilters[H]){K=true;break;}}if(K){for(var G=0;G<M;G++){if(D==this._categoryF!
 ilters[G]){F=true;break;}}}if(F){var E=this.formatMsg(N);if(this.newestOnTop){this._elConsole.innerHTML=E+this._elConsole.innerHTML;}else{this._elConsole.innerHTML+=E;}this._consoleMsgCount++;this._lastTime=N.time.getTime();}}};YAHOO.widget.LogReader.prototype._onCategoryCreate=function(D,C,A){var B=C[0];A._categoryFilters.push(B);if(A._elFt){A._createCategoryCheckbox(B);}};YAHOO.widget.LogReader.prototype._onSourceCreate=function(D,C,A){var B=C[0];A._sourceFilters.push(B);if(A._elFt){A._createSourceCheckbox(B);}};YAHOO.widget.LogReader.prototype._onCheckCategory=function(A,B){var C=this.category;if(!this.checked){B.hideCategory(C);}else{B.showCategory(C);}};YAHOO.widget.LogReader.prototype._onCheckSource=function(A,B){var C=this.source;if(!this.checked){B.hideSource(C);}else{B.showSource(C);}};YAHOO.widget.LogReader.prototype._onClickCollapseBtn=function(A,B){if(!B.isCollapsed){B.collapse();}else{B.expand();}};YAHOO.widget.LogReader.prototype._onClickPauseBtn=function(A,B)!
 {if(!B.isPaused){B.pause();}else{B.resume();}};YAHOO.widget.Lo!
 gReader.
prototype._onClickClearBtn=function(A,B){B.clearConsole();};YAHOO.widget.LogReader.prototype._onNewLog=function(D,C,A){var B=C[0];A._buffer.push(B);if(A.logReaderEnabled===true&&A._timeout===null){A._timeout=setTimeout(function(){A._printBuffer();},A.outputBuffer);}};YAHOO.widget.LogReader.prototype._onReset=function(C,B,A){A._filterLogs();};if(!YAHOO.widget.Logger){YAHOO.widget.Logger={loggerEnabled:true,_browserConsoleEnabled:false,categories:["info","warn","error","time","window"],sources:["global"],_stack:[],maxStackEntries:2500,_startTime:new Date().getTime(),_lastTime:null,_windowErrorsHandled:false,_origOnWindowError:null};YAHOO.widget.Logger.log=function(B,F,G){if(this.loggerEnabled){if(!F){F="info";}else{F=F.toLocaleLowerCase();if(this._isNewCategory(F)){this._createNewCategory(F);}}var C="global";var A=null;if(G){var D=G.indexOf(" ");if(D>0){C=G.substring(0,D);A=G.substring(D,G.length);}else{C=G;}if(this._isNewSource(C)){this._createNewSource(C);}}var H=new Date();!
 var J=new YAHOO.widget.LogMsg({msg:B,time:H,category:F,source:C,sourceDetail:A});var I=this._stack;var E=this.maxStackEntries;if(E&&!isNaN(E)&&(I.length>=E)){I.shift();}I.push(J);this.newLogEvent.fire(J);if(this._browserConsoleEnabled){this._printToBrowserConsole(J);}return true;}else{return false;}};YAHOO.widget.Logger.reset=function(){this._stack=[];this._startTime=new Date().getTime();this.loggerEnabled=true;this.log("Logger reset");this.logResetEvent.fire();};YAHOO.widget.Logger.getStack=function(){return this._stack;};YAHOO.widget.Logger.getStartTime=function(){return this._startTime;};YAHOO.widget.Logger.disableBrowserConsole=function(){YAHOO.log("Logger output to the function console.log() has been disabled.");this._browserConsoleEnabled=false;};YAHOO.widget.Logger.enableBrowserConsole=function(){this._browserConsoleEnabled=true;YAHOO.log("Logger output to the function console.log() has been enabled.");};YAHOO.widget.Logger.handleWindowErrors=function(){if(!YAHOO.wid!
 get.Logger._windowErrorsHandled){if(window.error){YAHOO.widget!
 .Logger.
_origOnWindowError=window.onerror;}window.onerror=YAHOO.widget.Logger._onWindowError;YAHOO.widget.Logger._windowErrorsHandled=true;YAHOO.log("Logger handling of window.onerror has been enabled.");}else{YAHOO.log("Logger handling of window.onerror had already been enabled.");}};YAHOO.widget.Logger.unhandleWindowErrors=function(){if(YAHOO.widget.Logger._windowErrorsHandled){if(YAHOO.widget.Logger._origOnWindowError){window.onerror=YAHOO.widget.Logger._origOnWindowError;YAHOO.widget.Logger._origOnWindowError=null;}else{window.onerror=null;}YAHOO.widget.Logger._windowErrorsHandled=false;YAHOO.log("Logger handling of window.onerror has been disabled.");}else{YAHOO.log("Logger handling of window.onerror had already been disabled.");}};YAHOO.widget.Logger.categoryCreateEvent=new YAHOO.util.CustomEvent("categoryCreate",this,true);YAHOO.widget.Logger.sourceCreateEvent=new YAHOO.util.CustomEvent("sourceCreate",this,true);YAHOO.widget.Logger.newLogEvent=new YAHOO.util.CustomEvent("newL!
 og",this,true);YAHOO.widget.Logger.logResetEvent=new YAHOO.util.CustomEvent("logReset",this,true);YAHOO.widget.Logger._createNewCategory=function(A){this.categories.push(A);this.categoryCreateEvent.fire(A);};YAHOO.widget.Logger._isNewCategory=function(B){for(var A=0;A<this.categories.length;A++){if(B==this.categories[A]){return false;}}return true;};YAHOO.widget.Logger._createNewSource=function(A){this.sources.push(A);this.sourceCreateEvent.fire(A);};YAHOO.widget.Logger._isNewSource=function(A){if(A){for(var B=0;B<this.sources.length;B++){if(A==this.sources[B]){return false;}}return true;}};YAHOO.widget.Logger._printToBrowserConsole=function(C){if(window.console&&console.log){var E=C.category;var D=C.category.substring(0,4).toUpperCase();var G=C.time;var F;if(G.toLocaleTimeString){F=G.toLocaleTimeString();}else{F=G.toString();}var H=G.getTime();var B=(YAHOO.widget.Logger._lastTime)?(H-YAHOO.widget.Logger._lastTime):0;
+YAHOO.widget.Logger._lastTime=H;var A=F+" ("+B+"ms): "+C.source+": "+C.msg;console.log(A);}};YAHOO.widget.Logger._onWindowError=function(A,C,B){try{YAHOO.widget.Logger.log(A+" ("+C+", line "+B+")","window");if(YAHOO.widget.Logger._origOnWindowError){YAHOO.widget.Logger._origOnWindowError();}}catch(D){return false;}};YAHOO.widget.Logger.log("Logger initialized");}YAHOO.register("logger",YAHOO.widget.Logger,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/logger/logger.js
===================================================================
--- trunk/root/static/yui/logger/logger.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/logger/logger.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /****************************************************************************/
 /****************************************************************************/
@@ -653,8 +653,9 @@
     // not the absolute previous item in the stack
 
     var time = oLogMsg.time;
+    var localTime;
     if (time.toLocaleTimeString) {
-        var localTime  = time.toLocaleTimeString();
+        localTime  = time.toLocaleTimeString();
     }
     else {
         localTime = time.toString();
@@ -1540,7 +1541,9 @@
         _stack: [], // holds all log msgs
         maxStackEntries: 2500,
         _startTime: new Date().getTime(), // static start timestamp
-        _lastTime: null // timestamp of last logged message
+        _lastTime: null, // timestamp of last logged message
+        _windowErrorsHandled: false,
+        _origOnWindowError: null
     };
 
     /////////////////////////////////////////////////////////////////////////////
@@ -1751,6 +1754,53 @@
         YAHOO.log("Logger output to the function console.log() has been enabled.");
     };
 
+    /**
+     * Surpresses native JavaScript errors and outputs to console. By default,
+     * Logger does not handle JavaScript window error events.
+     * NB: Not all browsers support the window.onerror event.
+     *
+     * @method handleWindowErrors
+     */
+    YAHOO.widget.Logger.handleWindowErrors = function() {
+        if(!YAHOO.widget.Logger._windowErrorsHandled) {
+            // Save any previously defined handler to call
+            if(window.error) {
+                YAHOO.widget.Logger._origOnWindowError = window.onerror;
+            }
+            window.onerror = YAHOO.widget.Logger._onWindowError;
+            YAHOO.widget.Logger._windowErrorsHandled = true;
+            YAHOO.log("Logger handling of window.onerror has been enabled.");
+        }
+        else {
+            YAHOO.log("Logger handling of window.onerror had already been enabled.");
+        }
+    };
+
+    /**
+     * Unsurpresses native JavaScript errors. By default,
+     * Logger does not handle JavaScript window error events.
+     * NB: Not all browsers support the window.onerror event.
+     *
+     * @method unhandleWindowErrors
+     */
+    YAHOO.widget.Logger.unhandleWindowErrors = function() {
+        if(YAHOO.widget.Logger._windowErrorsHandled) {
+            // Revert to any previously defined handler to call
+            if(YAHOO.widget.Logger._origOnWindowError) {
+                window.onerror = YAHOO.widget.Logger._origOnWindowError;
+                YAHOO.widget.Logger._origOnWindowError = null;
+            }
+            else {
+                window.onerror = null;
+            }
+            YAHOO.widget.Logger._windowErrorsHandled = false;
+            YAHOO.log("Logger handling of window.onerror has been disabled.");
+        }
+        else {
+            YAHOO.log("Logger handling of window.onerror had already been disabled.");
+        }
+    };
+    
     /////////////////////////////////////////////////////////////////////////////
     //
     // Public events
@@ -1869,8 +1919,9 @@
             var label = oEntry.category.substring(0,4).toUpperCase();
 
             var time = oEntry.time;
+            var localTime;
             if (time.toLocaleTimeString) {
-                var localTime  = time.toLocaleTimeString();
+                localTime  = time.toLocaleTimeString();
             }
             else {
                 localTime = time.toString();
@@ -1921,19 +1972,6 @@
 
     /////////////////////////////////////////////////////////////////////////////
     //
-    // Enable handling of native JavaScript errors
-    // NB: Not all browsers support the window.onerror event
-    //
-    /////////////////////////////////////////////////////////////////////////////
-
-    if(window.onerror) {
-        // Save any previously defined handler to call
-        YAHOO.widget.Logger._origOnWindowError = window.onerror;
-    }
-    window.onerror = YAHOO.widget.Logger._onWindowError;
-
-    /////////////////////////////////////////////////////////////////////////////
-    //
     // First log
     //
     /////////////////////////////////////////////////////////////////////////////
@@ -1942,4 +1980,4 @@
 }
 
 
-YAHOO.register("logger", YAHOO.widget.Logger, {version: "2.3.1", build: "541"});
+YAHOO.register("logger", YAHOO.widget.Logger, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/menu/README
===================================================================
--- trunk/root/static/yui/menu/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/menu/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,48 +1,213 @@
-*** version 2.3.1 ***
+*** version 2.4.1 ***
 
+No change
+
+*** version 2.4.0 ***
+
+
 Fixed the following bugs:
 -------------------------
 
-+ Including both the Container and Menu CSS on a page will no longer result in 
-  statically positioned Menu instances rendering as hidden.
++ The "context" property of YAHOO.widget.Menu works better in IE 6.
 
-+ The focus outline for MenuItem instances no longer sticks in Opera.
++ Immediate submenus of a YAHOO.widget.MenuBar instance will now re-align 
+  themselves to their parent YAHOO.widget.MenuBarItem instance to remain inside 
+  the boundaries of the browser viewport when the "constraintoviewport" 
+  property is set to "true."
 
-+ Clicking MenuItem instances without a value for the "url" configuration 
-  property will no longer result in the MenuItem losing focus.
++ A submenu will now appear in the correct position when its parent menu 
+  is scrolled.
+
++ YAHOO.widget.MenuItem instances will no longer increase in height when their
+  submenu is made visible.
+
++ Removed superfluous white space between YAHOO.widget.MenuItem instances in 
+  IE 6 (Strict Mode and Quirks Mode) and IE 7 (Quirks Mode).
   
-+ Menu and MenuBar instances will no longer be rendered with bullets when a 
-  page includes the YUI Base CSS.
++ Statically positioned YAHOO.widget.MenuBar instances will no longer be 
+  rendered in the wrong position when the Container CSS file is included in 
+  the page.
 
-+ Submenus of scrolling menus are now able to be displayed.
++ Usage of the "maxheight" configuration property will no longer change the 
+  position of a YAHOO.widget.Menu instance's shadow element 
+  (<DIV class="yui-menu-shadow">).  The shadow element will alway be the last 
+  child node of a menu's root element.
 
-+ MenuItem instances now correctly navigate to the URL specified by their 
-  "url" configuration property when clicked in Opera.
++ YAHOO.widget.MenuBar instances with their "position" configuration property 
+  set to "dynamic" are no longer rendered with scrollbars in Firefox for 
+  Mac OS X.
+		
 
-+ Applying the "yui-sam-skin" CSS class name to elements other than the <BODY>
-  will no longer result in submenus of Menu instances being rendered at 
-  an incorrect width.
 
-+ Replaced hard coded absolute path in Menu CSS file with correct relative path.
+Added the following features:
+-----------------------------
 
-+ Menu instances will now render at the correct with if the browser's font size 
-  is changed prior its initial display.
++ Added a new "minscrollheight" configuration property to YAHOO.widget.Menu
+  that defines the minimum threshold for the "maxheight" configuration property.
 
-+ Clearing and repopulating Menu instances via the "clearContent" method no
-  longer triggers JavaScript errors.
++ Added a new "scrollincrement" configuration property to YAHOO.widget.Menu 
+  which can be used to increase or decrease the scroll speed of scolled menu.
 
-+ Submenus are now rendered at their correct width in Opera.
++ Hidden YAHOO.widget.Menu instances are now positioned off screen to 
+  prevent them from introducing scrollbars on the browser viewport.  The 
+  default off-screen position is -10000 for both the x and y coordinates and is
+  defined in a new constant: "YAHOO.widget.Menu.prototype.OFF_SCREEN_POSITION".
+  The method responsible for moving a menu off the screen is 
+  "YAHOO.widget.Menu.prototype.positionOffScreen" which is called in response
+  to the firing of the "hide" event.
+    
 
+Changes:
+--------
 
-Added the following features:
------------------------------
++ Setting "iframe" configuration property on a YAHOO.widget.MenuBar instance
+  will now result in the property cascading down to all submenus.
 
-+ Added new CSS class "yui-menu-body-scrolled" that is applied to the body 
-  element of a Menu instance when it is scrolled via use of the "maxheight" 
-  cofiguration property.
++ The "position" configuration property no longer automatically enables the 
+  iframe shim for YAHOO.widget.Menu instances.  Previously, setting the 
+  "position" configuration property to "static" would automatically 
+  set the "iframe" configuration property to "false," and setting "position" to
+  "dynamic" would set the "iframe" configuration property to "true" for IE 6.
 
++ YAHOO.widget.Menu instances no longer have their widths set automatically 
+  as they are rendered.
 
++ Modified the DOM structure for a YAHOO.widget.MenuItem instance so that the 
+  submenu indicator node (<EM class="submenuindicator" />) and checked 
+  indicator node (<EM class="checkedindicator" />) that were previously direct 
+  descendants of the <A/> node are no longer present.  The updated DOM
+  structure of a YAHOO.widget.MenuItem instance is now:
 
+    <LI class="yuimenuitem">
+    
+        <A class="yuimenuitemlabel">
+    
+            Text Label
+    
+            <EM class="helptext"> Help Text </EM>   (Optional)
+    
+        </A>
+    
+        <DIV class="yuimenu"> ... </DIV> (Optional submenu node)
+    
+    </LI>
+
+
+  With the removal of the submenu indicator and checked indicator nodes,
+  the following YAHOO.widget.MenuItem constants, used to define the inner 
+  text of these nodes, have been removed:
+
+    - YAHOO.widget.MenuItem.prototype.COLLAPSED_SUBMENU_INDICATOR_TEXT
+    - YAHOO.widget.MenuItem.prototype.EXPANDED_SUBMENU_INDICATOR_TEXT
+    - YAHOO.widget.MenuItem.prototype.DISABLED_SUBMENU_INDICATOR_TEXT
+    - YAHOO.widget.MenuItem.prototype.CHECKED_TEXT
+    - YAHOO.widget.MenuItem.prototype.DISABLED_CHECKED_TEXT
+    
+  The "submenuIndicator" property of YAHOO.widget.MenuItem has also 
+  been removed.
+
+
++ Modified the CSS class names used to represent the state of 
+  YAHOO.widget.MenuItem and YAHOO.widget.MenuBarItem instances.  Previous to 
+  2.4.0 the following CSS class names were applied only to the <A> element 
+  representing the text label for YAHOO.widget.MenuItem and 
+  YAHOO.widget.MenuBarItem instances:
+
+    + hashelptext
+    + checked
+    + hassubmenu
+    + selected
+    + disabled
+
+
+  To provide more flexibility and facilitate easier styling of state, a set of
+  new CSS class names have been created that are applied to both the root 
+  <LI> node and its child <A> node for YAHOO.widget.MenuItem and 
+  YAHOO.widget.MenuBarItem instances:
+  
+
+    New YAHOO.widget.MenuItem CSS classes:
+    --------------------------------------
+    
+    The following are applied to the <LI> element:
+    
+    .yuimenuitem-hassubmenu
+    .yuimenuitem-checked
+    .yuimenuitem-selected
+    .yuimenuitem-disabled
+    
+    .yuimenuitem-checked-selected
+    .yuimenuitem-checked-disabled
+    
+    .yuimenuitem-hassubmenu-selected
+    .yuimenuitem-hassubmenu-disabled
+    
+
+    The following are applied to the <A> element:
+
+    .yuimenuitemlabel-hassubmenu
+    .yuimenuitemlabel-checked
+    .yuimenuitemlabel-selected
+    .yuimenuitemlabel-disabled
+    
+    .yuimenuitemlabel-checked-selected
+    .yuimenuitemlabel-checked-disabled
+    
+    .yuimenuitemlabel-hassubmenu-selected
+    .yuimenuitemlabel-hassubmenu-disabled
+
+
+    New YAHOO.widget.MenuBarItem CSS classes:
+    -----------------------------------------
+    
+    The following are applied to the <LI> element:
+    
+    .yuimenubaritem-hassubmenu
+    .yuimenubaritem-selected
+    .yuimenubaritem-disabled
+    
+    .yuimenubaritem-hassubmenu-selected
+    .yuimenubaritem-hassubmenu-disabled
+    
+
+    The following are applied to the <A> element:
+    
+    .yuimenubaritemlabel-hassubmenu
+    .yuimenubaritemlabel-selected
+    .yuimenubaritemlabel-disabled
+    
+    .yuimenubaritemlabel-hassubmenu-selected
+    .yuimenubaritemlabel-hassubmenu-disabled
+
+
++ Deprecated the YAHOO.widget.ContextMenuItem class and replaced it 
+  with YAHOO.widget.MenuItem.
+
++ All submenus of a YAHOO.widget.ContextMenu instance are now of type
+  YAHOO.widget.Menu.
+
++ Updated the behavior of the "clicktohide" configuration property of 
+  YAHOO.widget.Menu so that it behaves as documented: controls whether or not 
+  clicking outside a menu results in the menu hiding.
+
+
+
+*** version 2.3.1 ***
+
+Fixed the following bugs:
+-------------------------
+
++ Including the Container CSS along with Menu CSS on a page will no longer 
+  result in statically positioned Menu instances rendering as hidden.
+
++ The focus outline for MenuItem instances no longer sticks in Opera.
+
++ Clicking MenuItem instances without a value for the "url" configuration 
+  property will no longer result in the MenuItem losing focus.
+  
++ Improved compatibility with Menu CSS and YUI Base CSS.
+
+
 *** version 2.3 ***
 
 Fixed the following bugs:
@@ -812,4 +977,4 @@
   "first-of-type" class
 
 * Changed case of MenuModuleItem class's "subMenuIndicator" property 
-  to "submenuIndicator"
\ No newline at end of file
+  to "submenuIndicator"

Deleted: trunk/root/static/yui/menu/assets/map.gif
===================================================================
(Binary files differ)

Modified: trunk/root/static/yui/menu/assets/menu-core.css
===================================================================
--- trunk/root/static/yui/menu/assets/menu-core.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/menu/assets/menu-core.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,15 +2,24 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* Menu & MenuBar styles */
 
+.yuimenubar {
+
+    visibility: visible;
+    position: static;
+
+}
+
 .yuimenu .yuimenu,
 .yuimenubar .yuimenu {
 
+    visibility: hidden;
     position: absolute;
-    visibility: hidden;
+    top: -10000px;
+    left: -10000px;
 
 }
 
@@ -36,13 +45,83 @@
 .yuimenuitemlabel,
 .yuimenubaritemlabel {
 
+    text-align: left;
     white-space: nowrap;
 
 }
 
 
+/* 
+    The following style rule trigger the "hasLayout" property in 
+    IE (http://msdn2.microsoft.com/en-us/library/ms533776.aspx) for a
+    MenuBar instance's <ul> element, allowing both to clear their floated 
+    child <li> elements.
+*/
+
+.yuimenubar ul {
+
+    *zoom: 1;
+
+}
+
+
+/* 
+    Remove the "hasLayout" trigger for submenus of MenuBar instances as it 
+    is unnecessary. 
+*/
+
+.yuimenubar .yuimenu ul {
+
+    *zoom: normal;
+
+}
+
 /*
-    PLEASE NOTE: The <DIV> element used for a menu's shadow is appended 
+    The following style rule allows a MenuBar instance's <ul> element to clear
+    its floated <li> elements in Firefox, Safari and and Opera.
+*/
+
+.yuimenubar>.bd>ul:after {
+
+    content: ".";
+    display: block;
+    clear: both;
+    visibility: hidden;
+    height: 0;
+    line-height: 0;
+
+}
+
+.yuimenubaritem {
+
+    float: left;
+
+}
+
+.yuimenubaritemlabel,
+.yuimenuitemlabel {
+
+    display: block;
+
+}
+
+.yuimenuitemlabel .helptext {
+
+    font-style: normal;
+    display: block;
+    
+    /*
+        The value for the left margin controls how much the help text is
+        offset from the text of the menu item.  This value will need to 
+        be customized depending on the longest text label of a menu item.
+    */
+    
+    margin: -1em 0 0 10em;
+    
+}
+
+/*
+    PLEASE NOTE: The <div> element used for a menu's shadow is appended 
     to its root element via JavaScript once it has been rendered.  The 
     code that creates the shadow lives in the menu's public "onRender" 
     event handler that is a prototype method of YAHOO.widget.Menu.  
@@ -53,12 +132,22 @@
 .yui-menu-shadow {
 
     position: absolute;
+    visibility: hidden;
     z-index: -1;
 
 }
 
+.yui-skin-sam .yui-menu-shadow-visible {
 
+    top: 2px;
+    right: -3px;
+    left: -3px;
+    bottom: -3px;
+    visibility: visible;
 
+}
+
+
 /*
 
 There are two known issues with YAHOO.widget.Overlay (the superclass class of 
@@ -78,7 +167,7 @@
        as its "visibility" configuration property is toggled between 
        "false" and "true."
     
-    2) The "display" property of <SELECT> elements that are child nodes of the 
+    2) The "display" property of <select> elements that are child nodes of the 
        Menu instance's root element is set to "none" when it is hidden.
 
 PLEASE NOTE:  
@@ -124,19 +213,22 @@
 
 */
 
-.yuimenu.show-scrollbars {
+.yuimenu.show-scrollbars,
+.yuimenubar.show-scrollbars {
 
 	overflow: visible; 
 
 }
 
-.yuimenu.hide-scrollbars .yui-menu-shadow {
+.yuimenu.hide-scrollbars .yui-menu-shadow,
+.yuimenubar.hide-scrollbars .yui-menu-shadow {
 
     overflow: hidden;
 
 }
 
-.yuimenu.show-scrollbars .yui-menu-shadow {
+.yuimenu.show-scrollbars .yui-menu-shadow,
+.yuimenubar.show-scrollbars .yui-menu-shadow {
 
     overflow: auto;
 

Modified: trunk/root/static/yui/menu/assets/menu.css
===================================================================
--- trunk/root/static/yui/menu/assets/menu.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/menu/assets/menu.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,116 +2,310 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* Menu & MenuBar styles */
 
-.yuimenu {
+.yuimenubar {
 
-    background-color:#f6f7ee;
-    border:solid 1px #c4c4be;
-    padding:1px;
+    visibility: visible;
+    position: static;
+
+}
+
+.yuimenu .yuimenu,
+.yuimenubar .yuimenu {
+
+    visibility: hidden;
+    position: absolute;
+    top: -10000px;
+    left: -10000px;
+
+}
+
+.yuimenubar li, 
+.yuimenu li {
+
+    list-style-type: none;    
+
+}
+
+.yuimenubar ul, 
+.yuimenu ul,
+.yuimenubar li, 
+.yuimenu li,
+.yuimenu h6,
+.yuimenubar h6 { 
+
+    margin: 0;
+    padding: 0;
+
+}
+
+.yuimenuitemlabel,
+.yuimenubaritemlabel {
+
+    text-align: left;
+    white-space: nowrap;
+
+}
+
+
+/* 
+    The following style rule trigger the "hasLayout" property in 
+    IE (http://msdn2.microsoft.com/en-us/library/ms533776.aspx) for a
+    MenuBar instance's <ul> element, allowing both to clear their floated 
+    child <li> elements.
+*/
+
+.yuimenubar ul {
+
+    *zoom: 1;
+
+}
+
+
+/* 
+    Remove the "hasLayout" trigger for submenus of MenuBar instances as it 
+    is unnecessary. 
+*/
+
+.yuimenubar .yuimenu ul {
+
+    *zoom: normal;
+
+}
+
+/*
+    The following style rule allows a MenuBar instance's <ul> element to clear
+    its floated <li> elements in Firefox, Safari and and Opera.
+*/
+
+.yuimenubar>.bd>ul:after {
+
+    content: ".";
+    display: block;
+    clear: both;
+    visibility: hidden;
+    height: 0;
+    line-height: 0;
+
+}
+
+.yuimenubaritem {
+
+    float: left;
+
+}
+
+.yuimenubaritemlabel,
+.yuimenuitemlabel {
+
+    display: block;
+
+}
+
+.yuimenuitemlabel .helptext {
+
+    font-style: normal;
+    display: block;
     
+    /*
+        The value for the left margin controls how much the help text is
+        offset from the text of the menu item.  This value will need to 
+        be customized depending on the longest text label of a menu item.
+    */
+    
+    margin: -1em 0 0 10em;
+    
 }
 
 /*
+    PLEASE NOTE: The <div> element used for a menu's shadow is appended 
+    to its root element via JavaScript once it has been rendered.  The 
+    code that creates the shadow lives in the menu's public "onRender" 
+    event handler that is a prototype method of YAHOO.widget.Menu.  
+    Implementers wishing to remove a menu's shadow or add any other markup
+    required for a given skin for menu should override the "onRender" method.
+*/
 
+.yui-menu-shadow {
+
+    position: absolute;
+    visibility: hidden;
+    z-index: -1;
+
+}
+
+.yui-skin-sam .yui-menu-shadow-visible {
+
+    top: 2px;
+    right: -3px;
+    left: -3px;
+    bottom: -3px;
+    visibility: visible;
+
+}
+
+
+/*
+
+There are two known issues with YAHOO.widget.Overlay (the superclass class of 
+Menu) that manifest in Gecko-based browsers on Mac OS X:
+
+    1) Elements with scrollbars will poke through Overlay instances floating 
+       above them.
+    
+    2) An Overlay's scrollbars and the scrollbars of its child nodes remain  
+       visible when the Overlay is hidden.
+
+To fix these bugs in Menu (a subclass of YAHOO.widget.Overlay):
+
+    1) The "overflow" property of a Menu instance's shadow element and child 
+       nodes is toggled between "hidden" and "auto" (through the application  
+       and removal of the "hide-scrollbars" and "show-scrollbars" CSS classes)
+       as its "visibility" configuration property is toggled between 
+       "false" and "true."
+    
+    2) The "display" property of <select> elements that are child nodes of the 
+       Menu instance's root element is set to "none" when it is hidden.
+
+PLEASE NOTE:  
+  
+    1) The "hide-scrollbars" and "show-scrollbars" CSS classes classes are 
+       applied only for Gecko on Mac OS X and are added/removed to/from the 
+       Overlay's root HTML element (DIV) via the "hideMacGeckoScrollbars" and 
+       "showMacGeckoScrollbars" methods of YAHOO.widget.Overlay.
+    
+    2) There may be instances where the CSS for a web page or application 
+       contains style rules whose specificity override the rules implemented by 
+       the Menu CSS files to fix this bug.  In such cases, is necessary to 
+       leverage the provided "hide-scrollbars" and "show-scrollbars" classes to 
+       write custom style rules to guard against this bug.
+
+** For more information on this issue, see:
+
+   + https://bugzilla.mozilla.org/show_bug.cgi?id=187435
+   + SourceForge bug #1723530
+
+*/
+
+.hide-scrollbars * {
+
+	overflow: hidden;
+
+}
+
+.hide-scrollbars select {
+
+	display: none;
+
+}
+
+
+/*
+
 The following style rule (".yuimenu.show-scrollbars") overrides the 
-".show-scrollbars" rule defined in container.css which sets the 
+".show-scrollbars" rule defined in container-core.css which sets the 
 "overflow" property of a YAHOO.widget.Overlay instance's root HTML element to 
 "auto" when it is visible.  Without this override, a Menu would have scrollbars
 when one of its submenus is visible.
 
 */
 
-.yuimenu.show-scrollbars {
+.yuimenu.show-scrollbars,
+.yuimenubar.show-scrollbars {
 
 	overflow: visible; 
 
 }
 
-.yui-menu-shadow {
+.yuimenu.hide-scrollbars .yui-menu-shadow,
+.yuimenubar.hide-scrollbars .yui-menu-shadow {
 
-    display: none;
+    overflow: hidden;
 
 }
 
-.yuimenu .yuimenu,
-.yuimenubar .yuimenu {
+.yuimenu.show-scrollbars .yui-menu-shadow,
+.yuimenubar.show-scrollbars .yui-menu-shadow {
 
-    position:absolute;
-    visibility:hidden;
+    overflow: auto;
 
 }
 
+
+/* MenuBar style rules */
+
 .yuimenubar {
 
-    background-color:#f6f7ee;
+    background-color: #f6f7ee;
     
 }
 
-.yuimenubar ul {
 
-    *zoom:1;
 
+/* Menu style rules */
+
+.yuimenu {
+
+    background-color: #f6f7ee;
+    border: solid 1px #c4c4be;
+    padding: 1px;
+    
 }
 
-.yuimenubar ul:after {
+.yui-menu-shadow {
 
-    content:".";
-    display:block;
-    clear:both;
-    visibility:hidden;
-    height:0;
-    line-height:0;
+    display: none;
 
 }
 
-.yuimenu h6,
-.yuimenubar h6 { 
+.yuimenu ul {
 
-    font-size:100%;
-    font-weight:normal;
-    margin:0;
-    border:solid 1px #c4c4be;
-    color:#b9b9b9;    
+    border: solid 1px #c4c4be;
+    border-width: 1px 0 0 0;
+    padding: 10px 0;
 
 }
 
-.yuimenubar h6 {
+.yuimenu .yui-menu-body-scrolled {
 
-    float:left;
-    padding:4px 12px;
-    border-width:0 1px 0 0;
+    overflow: hidden;
 
 }
 
-.yuimenubar .yuimenu h6 {
 
-    float:none;
+/* Group titles */
 
+.yuimenu h6,
+.yuimenubar h6 { 
+
+    font-size: 100%;
+    font-weight: normal;
+    border: solid 1px #c4c4be;
+    color: #b9b9b9;    
+
 }
 
-.yuimenu h6 {
+.yuimenubar h6 {
 
-    border-width:1px 0 0 0;
-    padding:5px 10px 0 10px;
+    float: left;
+    padding: 4px 12px;
+    border-width: 0 1px 0 0;
 
 }
 
-.yuimenubar ul {
+.yuimenubar .yuimenu h6 {
 
-    margin:0;
-    padding:0;
+    float: none;
 
 }
 
-.yuimenu ul {
+.yuimenu h6 {
 
-    border:solid 1px #c4c4be;
-    border-width:1px 0 0 0;
-    margin:0;
-    padding:10px 0;
+    border-width: 1px 0 0 0;
+    padding: 5px 10px 0 10px;
 
 }
 
@@ -119,237 +313,182 @@
 .yuimenu ul.hastitle,
 .yuimenu h6.first-of-type {
 
-    border-width:0;
+    border-width: 0;
 
 }
 
-.yuimenubar li, 
-.yuimenu li {
 
-    list-style-type: none;    
 
-}
+/* Top and bottom scroll controls */
 
-.yuimenu .yui-menu-body-scrolled {
-
-    overflow: hidden;
-
-}
-
 .yuimenu .topscrollbar,
 .yuimenu .bottomscrollbar {
 
-    height:16px;
-    background-image:url(map.gif);
-    background-repeat:no-repeat;
+    height: 16px;
+    background-position: center center;
+    background-repeat: no-repeat;
 
 }
 
 .yuimenu .topscrollbar {
 
-    background-image:url(map.gif);
-    background-position:center -72px;
+    background-image: url(menu_up_arrow.png);
 
 }
 
 .yuimenu .topscrollbar_disabled {
 
-    background-image:url(map.gif);
-    background-position:center -88px;
+    background-image: url(menu_up_arrow_disabled.png);
 
 }
 
 .yuimenu .bottomscrollbar {
 
-    background-image:url(map.gif);
-    background-position:center -104px;
+    background-image: url(menu_down_arrow.png);
 
 }
 
 .yuimenu .bottomscrollbar_disabled {
 
-    background-image:url(map.gif);
-    background-position:center -120px;
+    background-image: url(menu_down_arrow_disabled.png);
 
 }
 
 
 /* MenuItem and MenuBarItem styles */
 
-.yuimenubaritem {
+.yuimenuitem {
 
-    float:left;
+    /*
+        For IE: Used to collapse superfluous white space between <li> elements
+        that is triggered by the "display" property of the <a> elements being
+        set to "block."
+    */
 
+    *border-bottom: solid 1px #f6f7ee;
+
 }
 
 .yuimenuitemlabel,
 .yuimenubaritemlabel {
 
-    white-space: nowrap;
-    font-size:85%;
-    display:block;
-    color:#000;
-    text-decoration:none;
+    font-size: 85%;
+    color: #000;
+    text-decoration: none;
 
 }
 
 .yuimenuitemlabel {
 
-    padding:2px 24px;
-    outline:none;
+    padding: 2px 24px;
     
 }
 
 .yuimenubaritemlabel {
 
-    border-width:0 0 0 1px;
-    border-style:solid;
-    border-color:#c4c4be;
-    padding:4px 24px;
+    border-width: 0 0 0 1px;
+    border-style: solid;
+    border-color: #c4c4be;
+    padding: 4px 24px;
 
 }
 
-li.first-of-type .yuimenubaritemlabel {
+.yuimenubar li.first-of-type .yuimenubaritemlabel {
 
-    border-width:0;
+    border-width: 0;
 
 }
 
-.yuimenuitemlabel .helptext {
+.yuimenubaritem-hassubmenu {
 
-    font-style:normal;
-    margin:0 0 0 40px;
-    
-}
+    background: url(menubaritem_submenuindicator.png) right center no-repeat;
 
-.yuimenuitemlabel .submenuindicator,
-.yuimenuitemlabel .checkedindicator, 
-.yuimenubaritemlabel .submenuindicator {
-    
-    display:block;
-    height:8px;
-    width:8px;
-    overflow:hidden;
-    vertical-align:middle;
-    text-indent:9px;
-    background-image:url(map.gif);
-    background-repeat:no-repeat;
-
 }
 
-.yuimenubaritemlabel .submenuindicator {
+.yuimenuitem-hassubmenu {
 
-    display:-moz-inline-stack; /* Gecko */
-    display:inline-block; /* IE, Opera and Safari */
-    font:0/0 arial; /* Gecko */
+    background: url(menuitem_submenuindicator.png) right center no-repeat;
 
 }
 
-.yuimenuitemlabel .submenuindicator {
+.yuimenuitem-checked {
 
-    background-position:0 0;
+    background: url(menuitem_checkbox.png) left center no-repeat;
 
 }
 
-.yuimenubaritemlabel .submenuindicator {
+.yuimenuitemlabel .helptext {
 
-    background-position:0 -24px;
-    margin:0 0 0 10px;
-
+    margin-top: -1.1em;
+    *margin-top: -1.2em;  /* For IE*/
+    
 }
 
-.yuimenuitemlabel .checkedindicator {
 
-    background-position:0 -48px;
 
-}
+/* MenuItem states */
 
-.visible .yuimenuitem,
-.visible .yuimenuitemlabel {
 
-    *zoom:1;
+/* Selected MenuItem */
 
-}
+.yuimenubaritem-selected,
+.yuimenuitem-selected {
 
-.visible .yuimenuitemlabel .helptext {
+    background-color: #8c8ad0;
 
-    float:right;
-    width:100%;
-    text-align:right;
-    margin:-1.2em 0 0 0;
-    *cursor:hand; /* Required to restore the style of the cursor in IE */
-
 }
 
-.visible .yuimenuitemlabel .submenuindicator {
+.yuimenubaritemlabel-selected,
+.yuimenuitemlabel-selected {
 
-    margin:-.9em -16px 4px auto;
-    *margin:-.9em -16px 0 105%;
+    text-decoration: underline;
+    color: #fff;
 
 }
 
-.visible .yuimenuitemlabel .checkedindicator {
+.yuimenubaritem-hassubmenu-selected {
 
-    margin:-.9em auto 4px -16px;
-    *margin-bottom:0;
+    background-image: url(menubaritem_submenuindicator_selected.png);
 
 }
 
+.yuimenuitem-hassubmenu-selected {
 
+    background-image: url(menuitem_submenuindicator_selected.png);
 
-/* Matches selected menu items */
-
-.yuimenuitem a.selected,
-.yuimenubaritem a.selected {
-
-    background-color:#8c8ad0;
-    text-decoration:underline;
-    color:#fff;
-
 }
 
-.yuimenubaritem a.selected .submenuindicator {
+.yuimenuitem-checked-selected {
 
-    background-position:0 -32px;
+    background-image: url(menuitem_checkbox_selected.png);
 
 }
 
-.yuimenuitem a.selected .submenuindicator {
 
-    background-position:0 -8px;
+/* Disabled MenuItem */
 
-}
+.yuimenubaritemlabel-disabled,
+.yuimenuitemlabel-disabled {
 
-.yuimenuitem a.selected .checkedindicator {
+    cursor: default;
+    color: #b9b9b9;
 
-    background-position:0 -56px;
-
 }
 
+.yuimenubaritem-hassubmenu-disabled {
 
-/* Matches disabled menu items */
+    background-image: url(menubaritem_submenuindicator_disabled.png);
 
-.yuimenubaritem a.disabled .submenuindicator {
-
-    background-position:0 -40px;
-
 }
 
-.yuimenuitem a.disabled {
+.yuimenuitem-hassubmenu-disabled {
 
-    cursor:default;
-    color:#b9b9b9;
+    background-image: url(menuitem_submenuindicator_disabled.png);
 
 }
 
-.yuimenuitem a.disabled .submenuindicator {
+.yuimenuitem-checked-disabled {
 
-    background-position:0 -16px;
+    background-image: url(menuitem_checkbox_disabled.png);
 
-}
-
-.yuimenuitem a.disabled .checkedindicator {
-
-    background-position:0 -64px;
-
 }
\ No newline at end of file

Added: trunk/root/static/yui/menu/assets/menu_down_arrow.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/menu_down_arrow.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/menu/assets/menu_down_arrow_disabled.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/menu_down_arrow_disabled.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/menu/assets/menu_down_arrow_selected.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/menu_down_arrow_selected.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/menu/assets/menu_up_arrow.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/menu_up_arrow.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/menu/assets/menu_up_arrow_disabled.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/menu_up_arrow_disabled.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/menu/assets/menubaritem_submenuindicator.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/menubaritem_submenuindicator.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/menu/assets/menubaritem_submenuindicator_disabled.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/menubaritem_submenuindicator_disabled.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/menu/assets/menubaritem_submenuindicator_selected.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/menubaritem_submenuindicator_selected.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/menu/assets/menuitem_checked.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/menuitem_checked.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/menu/assets/menuitem_checked_disabled.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/menuitem_checked_disabled.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/menu/assets/menuitem_checked_selected.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/menuitem_checked_selected.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/menu/assets/menuitem_submenuindicator.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/menuitem_submenuindicator.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/menu/assets/menuitem_submenuindicator_disabled.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/menuitem_submenuindicator_disabled.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/menu/assets/menuitem_submenuindicator_selected.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/menuitem_submenuindicator_selected.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/root/static/yui/menu/assets/skins/sam/menu-skin.css
===================================================================
--- trunk/root/static/yui/menu/assets/skins/sam/menu-skin.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/menu/assets/skins/sam/menu-skin.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,49 +2,23 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* MenuBar style rules */
 
 .yui-skin-sam .yuimenubar {
 
+    font-size: 93%;  /* 12px */
+    line-height: 2;  /* ~24px */
+    *line-height: 1.9; /* For IE */
     border: solid 1px #808080;
     background: url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;
 
 }
 
-/* 
-    The following two style rules cause a MenuBar's UL to clear its 
-    floating LIs.
-*/
 
-.yui-skin-sam .yuimenubar .bd,
-.yui-skin-sam .yuimenubar ul {
-
-    *zoom: 1;   /* For IE */
-
-}
-
-.yui-skin-sam .yuimenubar>.bd>ul:after {
-
-    content: ".";
-    display: block;
-    clear: both;
-    visibility: hidden;
-    height: 0;
-    line-height: 0;
-
-}
-
-
 /* MenuBarItem style rules */
 
-.yui-skin-sam .yuimenubaritem {
-
-    float: left;
-
-}
-
 .yui-skin-sam .yuimenubarnav .yuimenubaritem {
 
     border-right: solid 1px #ccc;
@@ -53,20 +27,14 @@
 
 .yui-skin-sam .yuimenubaritemlabel {
 
-    display: block;
-    *display: inline-block; /* For IE */
-    font-size: 93%;  /* 12px */
-    line-height: 2;  /* ~24px */
-    *line-height: 1.9; /* For IE */
     padding: 0 10px;
     color: #000;
     text-decoration: none;
-    outline: none;
     cursor: default;
     border-style: solid;
     border-color: #808080;
     border-width: 1px 0;
-    position: relative;
+    *position: relative; /*  Necessary to get negative margins in IE. */
     margin: -1px 0;
 
 }
@@ -75,48 +43,41 @@
 
     padding-right: 20px;
 
-}
-
-.yui-skin-sam .yuimenubaritemlabel .submenuindicator {
-    
     /*
-        Set height and width to 1px so screen readers announce the content of 
-        the element.
+        Prevents the label from shifting left in IE when the 
+        ".yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-selected" 
+        rule us applied.
     */
 
-    width: 1px;
-    height: 1px;
-    top: 0;
-    left: 0;
+    *display: inline-block;
 
 }
 
-.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel .submenuindicator {
-    
-    top: 50%;
-    right: 8px;
-    left: auto; /* Override "left" property set by previous style rule */
-    margin-top: -3px;
-    height: 4px;
-    width: 7px;
-    text-indent: 8px;
-    background-position: -16px -856px;
+.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu {
 
+    background: url(menubaritem_submenuindicator.png) right center no-repeat;
+
 }
 
 
+
 /* MenuBarItem states */
 
 /* Selected MenuBarItem */
 
-.yui-skin-sam .yuimenubaritem a.selected {
+.yui-skin-sam .yuimenubaritem-selected {
 
     background: url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1700px;
+
+}
+
+.yui-skin-sam .yuimenubaritemlabel-selected {
+
     border-color: #7D98B8;
 
 }
 
-.yui-skin-sam .yuimenubarnav .yuimenubaritem a.selected {
+.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-selected {
 
     border-left-width: 1px;
     margin-left: -1px;
@@ -124,42 +85,41 @@
 
 }
 
-.yui-skin-sam .yuimenubar a.selected .submenuindicator {
 
-    background: transparent;
+/* Disabled  MenuBarItem */
 
-}
+.yui-skin-sam .yuimenubaritemlabel-disabled {
 
-.yui-skin-sam .yuimenubarnav a.selected .submenuindicator {
+    cursor: default;
+    color: #A6A6A6;
 
-    /*
-        Reset the value of the "background" property since it is set to 
-        "transparent" by the previous rule.
-    */
+}
 
-    background: url(../../../../assets/skins/sam/sprite.png) repeat-x -16px -856px;
+.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu-disabled {
 
+    background-image: url(menubaritem_submenuindicator_disabled.png);
+
 }
 
 
-/* Disabled  MenuBarItem */
 
-.yui-skin-sam .yuimenubaritem a.disabled {
+/* Menu style rules */
 
-    cursor: default;
-    color: #A6A6A6;
+.yui-skin-sam .yuimenu {
 
+    font-size: 93%;  /* 12px */
+    line-height: 1.5;  /* 18px */
+    *line-height: 1.45; /* For IE */
+
 }
 
-.yui-skin-sam .yuimenubarnav .yuimenubaritem a.disabled .submenuindicator {
+.yui-skin-sam .yuimenubar .yuimenu,
+.yui-skin-sam .yuimenu .yuimenu {
 
-    background-position: -16px -881px;
+    font-size: 100%;
 
 }
 
-
-/* Menu style rules */
-
 .yui-skin-sam .yuimenu .bd {
 
     border: solid 1px #808080;
@@ -187,10 +147,7 @@
 
 .yui-skin-sam .yuimenu h6 { 
 
-    font-size: 93%;  /* 12px */
     font-weight: bold;
-    line-height: 1.5;  /* 18px */
-    *line-height: 1.45; /* For IE */
     border-style: solid;
     border-color: #ccc;
     border-width: 1px 0 0 0;
@@ -254,205 +211,102 @@
 
 /* MenuItem style rules */
 
+.yui-skin-sam .yuimenuitem {
+
+    /*
+        For IE 7 Quirks and IE 6 Strict Mode and Quirks Mode:
+        Used to collapse superfluous white space between <li> elements
+        that is triggered by the "display" property of the <a> elements being
+        set to "block."
+    */
+
+    _border-bottom: solid 1px #fff;
+
+}
+
 .yui-skin-sam .yuimenuitemlabel {
 
-    font-size: 93%;  /* 12px */
-    line-height: 1.5;  /* 18px */
-    *line-height: 1.45; /* For IE */
     padding: 0 20px;
-    display: block;
     color: #000;
     text-decoration: none;
-    outline: none;
-    position: relative;
-
-    /* 
-        Need to set the "position" property to "static" for IE otherwise the
-        MenuItem instances will not respect the value of the "overflow" 
-        property that is applied to its body element (see the above 
-        ".yui-skin-sam .yuimenu .yui-menu-body-scrolled" rule) when it 
-        is scrolled.
-    */
-
-    *position: static;
     cursor: default;
 
 }
 
 .yui-skin-sam .yuimenuitemlabel .helptext {
 
-    font-style: normal;
-    display: block;
-    margin: -1.5em 0 0 10em;
+    margin-top: -1.5em;
     *margin-top: -1.45em;  /* For IE*/
     
 }
 
-.yui-skin-sam .yuimenuitemlabel .submenuindicator,
-.yui-skin-sam .yuimenuitemlabel .checkedindicator,
-.yui-skin-sam .yuimenubaritemlabel .submenuindicator {
-    
-    position: absolute;
-    overflow: hidden;
-    background: url(../../../../assets/skins/sam/sprite.png) no-repeat;
+.yui-skin-sam .yuimenuitem-hassubmenu {
 
-}
+    background-image: url(menuitem_submenuindicator.png);
+    background-position: right center;
+    background-repeat: no-repeat;
 
-/*
-    Set special values for the "position" and "display" properties for IE since
-    it is necessary to position the submenu and checked indicator nodes 
-    differently since their parent element isn't relatively positioned.
-*/
-
-.yui-skin-sam .yuimenuitemlabel .submenuindicator,
-.yui-skin-sam .yuimenuitemlabel .checkedindicator {
-
-    *position: static;
-    *display: inline-block;
-
 }
 
-.yui-skin-sam .yuimenuitemlabel .submenuindicator {
+.yui-skin-sam .yuimenuitem-checked {
 
-    top: 50%;
-    right: 8px;
-    margin-top: -3px;
-    height: 7px;
-    width: 4px;
-    text-indent: 5px;
-    background-position: 0 -906px;
+    background-image: url(menuitem_checkbox.png);
+    background-position: left center;
+    background-repeat: no-repeat;
 
 }
 
-.yui-skin-sam .yuimenuitemlabel .checkedindicator {
 
-    top: 50%;
-    left: 8px;
-    margin-top: -3px;
-    height: 7px;
-    width: 7px;
-    text-indent: 8px;
-    background-position: 0 -1006px;
-
-}
-
-
 /* Menu states */
 
+
 /* Visible Menu */
 
-/*
-    The following three rules are used to position the submenu and checked
-    indicator nodes for IE since their parent element isn't 
-    relatively positioned.
-*/
-
-.yui-skin-sam .visible .yuimenuitemlabel .submenuindicator {
-
-    *float: right;
-    *margin: -1em 8px 0 8px;
-
-}
-
-.yui-skin-sam .visible .yuimenuitem .hassubmenu {
-
-    *padding-right: 0;
-
-}
-
-.yui-skin-sam .visible .yuimenuitemlabel .checkedindicator {
-
-    *float: left;
-    *margin: -1em 0 0 -12px;
-
-}
-
 .yui-skin-sam .yui-menu-shadow-visible {
 
-    top: 2px;
-    right: -3px;
-    left: -3px;
-    bottom: -3px;
     background-color: #000;
-    opacity: .12;
-    *filter: alpha(opacity=12);  /* For IE */
-    visibility: visible;
 
-}
-
-.yui-skin-sam .visible .bd,
-.yui-skin-sam .visible .yuimenuitem {
-
-    _zoom: 1;   /* For IE 7 Quirks Mode and IE 6 Standards and Quirks Mode */
-
-}
-
-.yui-skin-sam .visible .yuimenuitemlabel {
-
-    *zoom: 1;   /* For IE */
-
-}
-
-
-/* MenuItem states */
-
-/* Selected MenuItem */
-
-.yui-skin-sam .yuimenuitem a.selected {
-
     /*
-        Use "background" over "background-color" to clear background image 
-        set by the ".yuimenubaritem a.selected" rule.
+        Opacity can be expensive, so defer the use of opacity until the 
+        menu is visible.
     */
 
-    background: #B3D4FF;
+    opacity: .12;
+    *filter: alpha(opacity=12);  /* For IE */
 
 }
 
-/*
-    Redefine the background for MenuItem instances that are children of
-    a Menubar since the 
-    ".yui-skin-sam .yuimenubar a.selected .submenuindicator" rule sets the 
-    "background" property to "transparent"
-*/
 
-.yui-skin-sam .yuimenubar .yuimenuitem a.selected .submenuindicator {
 
-    background: url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -906px;
+/* MenuItem states */
 
-}
 
-/*
-    Remove borders and margin added by the style rule 
-    ".yui-skin-sam .yuimenubarnav .yuimenubaritem a.selected"
-*/
+/* Selected MenuItem */
 
-.yui-skin-sam .yuimenubarnav .yuimenuitem a.selected {
+.yui-skin-sam .yuimenuitem-selected {
 
-    border-width: 0;
-    margin: 0;
-    *left: 0;   /* For IE */
+    background-color: #B3D4FF;
 
 }
 
 
 /* Disabled MenuItem */
 
-.yui-skin-sam .yuimenuitem a.disabled {
+.yui-skin-sam .yuimenuitemlabel-disabled {
 
     cursor: default;
     color: #A6A6A6;
 
 }
 
-.yui-skin-sam .yuimenuitem a.disabled .submenuindicator {
+.yui-skin-sam .yuimenuitem-hassubmenu-disabled {
 
-    background-position: 0 -931px;
+    background-image: url(menuitem_submenuindicator_disabled.png);
 
 }
 
-.yui-skin-sam .yuimenuitem a.disabled .checkedindicator {
+.yui-skin-sam .yuimenuitem-checked-disabled {
 
-    background-position: 0 -1031px;
+    background-image: url(menuitem_checkbox_disabled.png);
 
 }
\ No newline at end of file

Modified: trunk/root/static/yui/menu/assets/skins/sam/menu.css
===================================================================
--- trunk/root/static/yui/menu/assets/skins/sam/menu.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/menu/assets/skins/sam/menu.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-.yuimenu .yuimenu,.yuimenubar .yuimenu{position:absolute;visibility:hidden;}.yuimenubar li,.yuimenu li{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{white-space:nowrap;}.yui-menu-shadow{position:absolute;z-index:-1;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars{overflow:visible;}.yuimenu.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-skin-sam .yuimenubar{border:solid 1px #808080;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubar .bd,.yui-skin-sam .yuimenubar ul{*zoom:1;}.yui-skin-sam .yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yui-skin-sam .yuimenubaritem{float:left;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}!
 .yui-skin-sam .yuimenubaritemlabel{display:block;*display:inline-block;font-size:93%;line-height:2;*line-height:1.9;padding:0 10px;color:#000;text-decoration:none;outline:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;}.yui-skin-sam .yuimenubaritemlabel .submenuindicator{width:1px;height:1px;top:0;left:0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel .submenuindicator{top:50%;right:8px;left:auto;margin-top:-3px;height:4px;width:7px;text-indent:8px;background-position:-16px -856px;}.yui-skin-sam .yuimenubaritem a.selected{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1700px;border-color:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenubaritem a.selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubar a.selected .submenuindicator{background:transparent;}.yui-skin-sam .yuimenubarnav a.selected !
 .submenuindicator{background:url(../../../../assets/skins/sam/!
 sprite.p
ng) repeat-x -16px -856px;}.yui-skin-sam .yuimenubaritem a.disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritem a.disabled .submenuindicator{background-position:-16px -881px;}.yui-skin-sam .yuimenu .bd{border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-size:93%;font-weight:bold;line-height:1.5;*line-height:1.45;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .yui-menu-body-scrolled{border-color:#ccc #808080;overflow:hidden;}.yui-skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{height:16px;border:solid 1px #808080;background:#fff url(../../../../assets/skins/sam/sprite.png) no-re!
 peat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{border-bottom-width:0;background-position:center -950px;}.yui-skin-sam .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{border-top-width:0;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitemlabel{font-size:93%;line-height:1.5;*line-height:1.45;padding:0 20px;display:block;color:#000;text-decoration:none;outline:none;position:relative;*position:static;cursor:default;}.yui-skin-sam .yuimenuitemlabel .helptext{font-style:normal;display:block;margin:-1.5em 0 0 10em;*margin-top:-1.45em;}.yui-skin-sam .yuimenuitemlabel .submenuindicator,.yui-skin-sam .yuimenuitemlabel .checkedindicator,.yui-skin-sam .yuimenubaritemlabel .submenuindicator{position:absolute;overflow:hidden;background:url(../../../../assets/skins/sam/sprite.png) no-repeat;}.yui-skin-sam .yuimenuitemlabel .submenuindicato!
 r,.yui-skin-sam .yuimenuitemlabel .checkedindicator{*position:!
 static;*
display:inline-block;}.yui-skin-sam .yuimenuitemlabel .submenuindicator{top:50%;right:8px;margin-top:-3px;height:7px;width:4px;text-indent:5px;background-position:0 -906px;}.yui-skin-sam .yuimenuitemlabel .checkedindicator{top:50%;left:8px;margin-top:-3px;height:7px;width:7px;text-indent:8px;background-position:0 -1006px;}.yui-skin-sam .visible .yuimenuitemlabel .submenuindicator{*float:right;*margin:-1em 8px 0 8px;}.yui-skin-sam .visible .yuimenuitem .hassubmenu{*padding-right:0;}.yui-skin-sam .visible .yuimenuitemlabel .checkedindicator{*float:left;*margin:-1em 0 0 -12px;}.yui-skin-sam .yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;opacity:.12;*filter:alpha(opacity=12);visibility:visible;}.yui-skin-sam .visible .bd,.yui-skin-sam .visible .yuimenuitem{_zoom:1;}.yui-skin-sam .visible .yuimenuitemlabel{*zoom:1;}.yui-skin-sam .yuimenuitem a.selected{background:#B3D4FF;}.yui-skin-sam .yuimenubar .yuimenuitem a.selected .submenuindicator{!
 background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -906px;}.yui-skin-sam .yuimenubarnav .yuimenuitem a.selected{border-width:0;margin:0;*left:0;}.yui-skin-sam .yuimenuitem a.disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem a.disabled .submenuindicator{background-position:0 -931px;}.yui-skin-sam .yuimenuitem a.disabled .checkedindicator{background-position:0 -1031px;}
+.yuimenubar{visibility:visible;position:static;}.yuimenu .yuimenu,.yuimenubar .yuimenu{visibility:hidden;position:absolute;top:-10000px;left:-10000px;}.yuimenubar li,.yuimenu li{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{text-align:left;white-space:nowrap;}.yuimenubar ul{*zoom:1;}.yuimenubar .yuimenu ul{*zoom:normal;}.yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yuimenubaritem{float:left;}.yuimenubaritemlabel,.yuimenuitemlabel{display:block;}.yuimenuitemlabel .helptext{font-style:normal;display:block;margin:-1em 0 0 10em;}.yui-menu-shadow{position:absolute;visibility:hidden;z-index:-1;}.yui-skin-sam .yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;visibility:visible;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars,.yuimenubar.show-s!
 crollbars{overflow:visible;}.yuimenu.hide-scrollbars .yui-menu-shadow,.yuimenubar.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow,.yuimenubar.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-skin-sam .yuimenubar{font-size:93%;line-height:2;*line-height:1.9;border:solid 1px #808080;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}.yui-skin-sam .yuimenubaritemlabel{padding:0 10px;color:#000;text-decoration:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;*position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;*display:inline-block;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu{background:url(menubaritem_submenuindicator.png) right center no-repeat;}.yui-skin-sam .yuimenubaritem-selected{background:url(../../../../assets/skins/sam/sprite.png) rep!
 eat-x 0 -1700px;}.yui-skin-sam .yuimenubaritemlabel-selected{b!
 order-co
lor:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubaritemlabel-disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu-disabled{background-image:url(menubaritem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenu{font-size:93%;line-height:1.5;*line-height:1.45;}.yui-skin-sam .yuimenubar .yuimenu,.yui-skin-sam .yuimenu .yuimenu{font-size:100%;}.yui-skin-sam .yuimenu .bd{border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-weight:bold;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .yui-menu-body!
 -scrolled{border-color:#ccc #808080;overflow:hidden;}.yui-skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{height:16px;border:solid 1px #808080;background:#fff url(../../../../assets/skins/sam/sprite.png) no-repeat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{border-bottom-width:0;background-position:center -950px;}.yui-skin-sam .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{border-top-width:0;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitem{_border-bottom:solid 1px #fff;}.yui-skin-sam .yuimenuitemlabel{padding:0 20px;color:#000;text-decoration:none;cursor:default;}.yui-skin-sam .yuimenuitemlabel .helptext{margin-top:-1.5em;*margin-top:-1.45em;}.yui-skin-sam .yuimenuitem-hassubmenu{background-image:url(menuitem_submenuindicator.png);background-position:right center;background-repeat:no-repeat;}.yui-s!
 kin-sam .yuimenuitem-checked{background-image:url(menuitem_che!
 ckbox.pn
g);background-position:left center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-shadow-visible{background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yuimenuitem-selected{background-color:#B3D4FF;}.yui-skin-sam .yuimenuitemlabel-disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem-hassubmenu-disabled{background-image:url(menuitem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenuitem-checked-disabled{background-image:url(menuitem_checkbox_disabled.png);}

Added: trunk/root/static/yui/menu/assets/skins/sam/menubaritem_submenuindicator.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/skins/sam/menubaritem_submenuindicator.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/menu/assets/skins/sam/menubaritem_submenuindicator_disabled.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/skins/sam/menubaritem_submenuindicator_disabled.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/menu/assets/skins/sam/menuitem_checkbox.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/skins/sam/menuitem_checkbox.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/menu/assets/skins/sam/menuitem_checkbox_disabled.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/skins/sam/menuitem_checkbox_disabled.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/menu/assets/skins/sam/menuitem_submenuindicator.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/skins/sam/menuitem_submenuindicator.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/root/static/yui/menu/assets/skins/sam/menuitem_submenuindicator_disabled.png
===================================================================
(Binary files differ)


Property changes on: trunk/root/static/yui/menu/assets/skins/sam/menuitem_submenuindicator_disabled.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/root/static/yui/menu/menu-debug.js
===================================================================
--- trunk/root/static/yui/menu/menu-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/menu/menu-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 
 
@@ -14,7 +14,6 @@
 * context menus, or application-style menu bars with just a small amount of 
 * scripting.</p><p>The Menu family of controls features:</p>
 * <ul>
-*    <li>Screen-reader accessibility.</li>
 *    <li>Keyboard and mouse navigation.</li>
 *    <li>A rich event model that provides access to all of a menu's 
 *    interesting moments.</li>
@@ -270,11 +269,11 @@
                     dynamically positioned menus
                 */
                 
-                for (var i in m_oMenus) {
+                for (var i in m_oVisibleMenus) {
         
-                    if (YAHOO.lang.hasOwnProperty(m_oMenus, i)) {
+                    if (YAHOO.lang.hasOwnProperty(m_oVisibleMenus, i)) {
         
-                        oMenu = m_oMenus[i];
+                        oMenu = m_oVisibleMenus[i];
         
                         if (oMenu.cfg.getProperty("clicktohide") && 
                             !(oMenu instanceof YAHOO.widget.MenuBar) && 
@@ -644,11 +643,24 @@
                 }        
     
             },
+
+
+            /**
+            * @method getVisible
+            * @description Returns a collection of all visible menus registered
+            * with the menu manger.
+            * @return {Array}
+            */
+            getVisible: function () {
+            
+                return m_oVisibleMenus;
+            
+            },
+
     
-    
             /**
             * @method getMenus
-            * @description Returns an array of all menus registered with the 
+            * @description Returns a collection of all menus registered with the 
             * menu manger.
             * @return {Array}
             */
@@ -943,19 +955,22 @@
     
         "SUBMENU_ALIGNMENT": { 
             key: "submenualignment", 
-            value: ["tl","tr"]
+            value: ["tl","tr"],
+            suppressEvent: true
         },
     
         "AUTO_SUBMENU_DISPLAY": { 
             key: "autosubmenudisplay", 
             value: true, 
-            validator: Lang.isBoolean 
+            validator: Lang.isBoolean,
+            suppressEvent: true
         }, 
     
         "SHOW_DELAY": { 
             key: "showdelay", 
             value: 250, 
-            validator: Lang.isNumber 
+            validator: Lang.isNumber, 
+            suppressEvent: true
         }, 
     
         "HIDE_DELAY": { 
@@ -968,30 +983,51 @@
         "SUBMENU_HIDE_DELAY": { 
             key: "submenuhidedelay", 
             value: 250, 
-            validator: Lang.isNumber
+            validator: Lang.isNumber,
+            suppressEvent: true
         }, 
     
         "CLICK_TO_HIDE": { 
             key: "clicktohide", 
             value: true, 
-            validator: Lang.isBoolean
+            validator: Lang.isBoolean,
+            suppressEvent: true
         },
     
         "CONTAINER": { 
-            key: "container"
+            key: "container",
+            suppressEvent: true
         }, 
+
+        "SCROLL_INCREMENT": { 
+            key: "scrollincrement", 
+            value: 1, 
+            validator: Lang.isNumber,
+            supercedes: ["maxheight"],
+            suppressEvent: true
+        },
+
+        "MIN_SCROLL_HEIGHT": { 
+            key: "minscrollheight", 
+            value: 90, 
+            validator: Lang.isNumber,
+            supercedes: ["maxheight"],
+            suppressEvent: true
+        },    
     
         "MAX_HEIGHT": { 
             key: "maxheight", 
             value: 0, 
             validator: Lang.isNumber,
-            supercedes: ["iframe"]
+            supercedes: ["iframe"],
+            suppressEvent: true
         }, 
     
         "CLASS_NAME": { 
             key: "classname", 
             value: null, 
-            validator: Lang.isString
+            validator: Lang.isString,
+            suppressEvent: true
         }, 
     
         "DISABLED": { 
@@ -1046,7 +1082,18 @@
 GROUP_TITLE_TAG_NAME: "h6",
 
 
+/**
+* @property OFF_SCREEN_POSITION
+* @description Array representing the default x and y position that a menu 
+* should have when it is positioned outside the viewport by the 
+* "poistionOffScreen" method.
+* @default [-10000, -10000]
+* @final
+* @type Array
+*/
+OFF_SCREEN_POSITION: [-10000, -10000],
 
+
 // Private properties
 
 
@@ -1172,17 +1219,6 @@
 
 
 /**
-* @property _nMaxHeight
-* @description The original value of the "maxheight" configuration property 
-* as set by the user.
-* @default -1
-* @private
-* @type Number
-*/
-_nMaxHeight: -1,
-
-
-/**
 * @property _bStopMouseEventHandlers
 * @description Stops "mouseover," "mouseout," and "mousemove" event handlers 
 * from executing.
@@ -1497,16 +1533,23 @@
         this.renderEvent.subscribe(this._onRender);
         this.renderEvent.subscribe(this.onRender);
         this.beforeShowEvent.subscribe(this._onBeforeShow);
+        this.hideEvent.subscribe(this.positionOffScreen);
         this.showEvent.subscribe(this._onShow);
         this.beforeHideEvent.subscribe(this._onBeforeHide);
-        this.hideEvent.subscribe(this._onHide);
         this.mouseOverEvent.subscribe(this._onMouseOver);
         this.mouseOutEvent.subscribe(this._onMouseOut);
         this.clickEvent.subscribe(this._onClick);
         this.keyDownEvent.subscribe(this._onKeyDown);
         this.keyPressEvent.subscribe(this._onKeyPress);
+        
 
+        if (UA.gecko || UA.webkit) {
 
+            this.cfg.subscribeToConfigEvent("y", this._onYChange);
+
+        }
+
+
         if (p_oConfig) {
     
             this.cfg.applyConfig(p_oConfig, true);
@@ -1761,7 +1804,6 @@
 _addItemToGroup: function (p_nGroupIndex, p_oItem, p_nItemIndex) {
 
     var oItem,
-        bDisabled = this.cfg.getProperty("disabled"),
         nGroupIndex,
         aGroup,
         oGroupItem,
@@ -2205,6 +2247,8 @@
 },
 
 
+
+
 /**
 * @method _subscribeToItemEvents
 * @description Subscribes a menu to a menu item's event.
@@ -2218,6 +2262,8 @@
 
     p_oItem.blurEvent.subscribe(this._onMenuItemBlur);
 
+    p_oItem.destroyEvent.subscribe(this._onMenuItemDestroy, p_oItem, this);
+
     p_oItem.cfg.configChangedEvent.subscribe(this._onMenuItemConfigChange,
         p_oItem, this);
 
@@ -2225,118 +2271,6 @@
 
 
 /**
-* @method _getOffsetWidth
-* @description Returns the offset width of the menu's 
-* <code><div></code> element.
-* @private
-*/
-_getOffsetWidth: function () {
-
-    var oClone = this.element.cloneNode(true),
-        oRoot = this.getRoot(),
-        oParentNode = oRoot.element.parentNode,
-        sWidth;
-
-    Dom.removeClass(oClone, "visible");
-
-    Dom.setStyle(oClone, "width", "");
-
-
-    if (oParentNode) {
-
-        oParentNode.appendChild(oClone);
-    
-        sWidth = oClone.offsetWidth;
-    
-        oParentNode.removeChild(oClone);
-    
-        return sWidth;
-
-    }
-
-},
-
-
-/**
-* @method _setWidth
-* @description Sets the width of the menu's root <code><div></code> 
-* element to its offsetWidth.
-* @private
-*/
-_setWidth: function () {
-
-    var oElement = this.element,
-        bVisible = Dom.removeClass(oElement, "visible"),
-        sWidth;
-
-    if (oElement.parentNode.tagName.toUpperCase() == "BODY") {
-
-        if (YAHOO.env.ua.opera) {
-
-            sWidth = this._getOffsetWidth();
-        
-        }
-        else {
-
-            Dom.setStyle(oElement, "width", "auto");
-            
-            sWidth = oElement.offsetWidth;
-        
-        }
-
-    }
-    else {
-    
-        sWidth = this._getOffsetWidth();
-    
-    }
-
-    this.cfg.setProperty("width", (sWidth + "px"));
-    
-
-    if (bVisible) {
-    
-        Dom.addClass(oElement, "visible");
-    
-    }
-
-},
-
-
-/**
-* @method _onWidthChange
-* @description Change event handler for the the menu's "width" configuration
-* property.
-* @private
-* @param {String} p_sType String representing the name of the event that 
-* was fired.
-* @param {Array} p_aArgs Array of arguments sent when the event was fired.
-*/
-_onWidthChange: function (p_sType, p_aArgs) {
-
-    var sWidth = p_aArgs[0];
-    
-    if (sWidth && !this._hasSetWidthHandlers) {
-
-        this.itemAddedEvent.subscribe(this._setWidth);
-        this.itemRemovedEvent.subscribe(this._setWidth);
-
-        this._hasSetWidthHandlers = true;
-
-    }
-    else if (this._hasSetWidthHandlers) {
-
-        this.itemAddedEvent.unsubscribe(this._setWidth);
-        this.itemRemovedEvent.unsubscribe(this._setWidth);
-
-        this._hasSetWidthHandlers = false;
-
-    }
-
-},
-
-
-/**
 * @method _onVisibleChange
 * @description Change event handler for the the menu's "visible" configuration
 * property.
@@ -2845,83 +2779,86 @@
 
     var oEvent = p_aArgs[0],
         oItem = p_aArgs[1],
-        oTarget,
-        oItemCfg,
         oSubmenu,
+        bInMenuAnchor = false,
+        oRoot,
+        sId,
         sURL,
-        nURL,
-        oRoot;
+        nHashPos,
+        nLen;
 
 
     if (oItem && !oItem.cfg.getProperty("disabled")) {
 
-        oTarget = Event.getTarget(oEvent);
-        oItemCfg = oItem.cfg;
-        oSubmenu = oItemCfg.getProperty("submenu");
+        oSubmenu = oItem.cfg.getProperty("submenu");
 
-
+        
         /*
-            ACCESSIBILITY FEATURE FOR SCREEN READERS: 
-            Expand/collapse the submenu when the user clicks 
-            on the submenu indicator image.
-        */        
+             Check if the URL of the anchor is pointing to an element that is 
+             a child of the menu.
+        */
+        
+        sURL = oItem.cfg.getProperty("url");
 
-        if (oTarget == oItem.submenuIndicator && oSubmenu) {
+        
+        if (sURL) {
 
-            if (oSubmenu.cfg.getProperty("visible")) {
+            nHashPos = sURL.indexOf("#");
 
-                oSubmenu.hide();
-                
-                oSubmenu.parent.focus();
+            nLen = sURL.length;
+
+
+            if (nHashPos != -1) {
+
+                sURL = sURL.substr(nHashPos, nLen);
     
-            }
-            else {
+                nLen = sURL.length;
 
-                this.clearActiveItem();
 
-                oItemCfg.setProperty("selected", true);
+                if (nLen > 1) {
 
-                oSubmenu.show();
+                    sId = sURL.substr(1, nLen);
+
+                    bInMenuAnchor = Dom.isAncestor(this.element, sId);
+                    
+                }
+                else if (nLen === 1) {
+
+                    bInMenuAnchor = true;
                 
-                oSubmenu.setInitialFocus();
-    
+                }
+
             }
+        
+        }
 
+
+        if (bInMenuAnchor && !oItem.cfg.getProperty("target")) {
+
             Event.preventDefault(oEvent);
-    
+
+            oItem.focus();
+        
         }
-        else {
 
-            sURL = oItemCfg.getProperty("url");
-            
-            if ((sURL.substr(0,1) == "#")) {
 
-                Event.preventDefault(oEvent);
+        if (!oSubmenu) {
 
-                oItem.focus();
+            oRoot = this.getRoot();
             
-            }
+            if (oRoot instanceof YAHOO.widget.MenuBar || 
+                oRoot.cfg.getProperty("position") == "static") {
 
+                oRoot.clearActiveItem();
 
-            if (!oSubmenu) {
-    
-                oRoot = this.getRoot();
-                
-                if (oRoot instanceof YAHOO.widget.MenuBar || 
-                    oRoot.cfg.getProperty("position") == "static") {
-    
-                    oRoot.clearActiveItem();
-    
-                }
-                else if (oRoot.cfg.getProperty("clicktohide")) {
+            }
+            else {
 
-                    oRoot.hide();
-                
-                }
-    
+                oRoot.hide();
+            
             }
 
-        }                    
+        }
     
     }
 
@@ -3257,31 +3194,45 @@
 
 
 /**
-* @method _onTextResize
-* @description "textresize" event handler for the menu.
+* @method _onYChange
+* @description "y" event handler for a Menu instance.
 * @protected
-* @param {String} p_sType String representing the name of the event that 
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
 * was fired.
-* @param {Array} p_aArgs Array of arguments sent when the event was fired.
-* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that 
-* fired the event.
 */
-_onTextResize: function (p_sType, p_aArgs, p_oMenu) {
+_onYChange: function (p_sType, p_aArgs) {
 
-    if (YAHOO.env.ua.gecko && !this._handleResize) {
+    var oParent = this.parent,
+        nScrollTop,
+        oIFrame,
+        nY;
 
-        this._handleResize = true;
-        return;
-    
-    }
 
+    if (oParent) {
 
-    var oConfig = this.cfg;
+        nScrollTop = oParent.parent.body.scrollTop;
 
-    if (oConfig.getProperty("position") == "dynamic") {
 
-        oConfig.setProperty("width", (this._getOffsetWidth() + "px"));
+        if (nScrollTop > 0) {
+    
+            nY = (this.cfg.getProperty("y") - nScrollTop);
+            
+            Dom.setY(this.element, nY);
 
+            oIFrame = this.iframe;            
+    
+
+            if (oIFrame) {
+    
+                Dom.setY(oIFrame, nY);
+    
+            }
+            
+            this.cfg.setProperty("y", nY, true);
+        
+        }
+    
     }
 
 },
@@ -3305,6 +3256,7 @@
     var oTarget = Event.getTarget(p_oEvent),
         oBody = this.body,
         me = this,
+        nScrollIncrement = this.cfg.getProperty("scrollincrement"),
         nScrollTarget,
         fnScrollFunction;
 
@@ -3316,7 +3268,7 @@
 
         if (nScrollTop < nScrollTarget) {
 
-            oBody.scrollTop = (nScrollTop + 1);
+            oBody.scrollTop = (nScrollTop + nScrollIncrement);
 
             me._enableScrollHeader();
 
@@ -3341,7 +3293,7 @@
 
         if (nScrollTop > 0) {
 
-            oBody.scrollTop = (nScrollTop - 1);
+            oBody.scrollTop = (nScrollTop - nScrollIncrement);
 
             me._enableScrollFooter();
 
@@ -3412,7 +3364,6 @@
 */
 _onInit: function (p_sType, p_aArgs) {
 
-    this.cfg.subscribeToConfigEvent("width", this._onWidthChange);
     this.cfg.subscribeToConfigEvent("visible", this._onVisibleChange);
 
     var bRootMenu = !this.parent,
@@ -3472,8 +3423,7 @@
 */
 _onBeforeRender: function (p_sType, p_aArgs) {
 
-    var oConfig = this.cfg,
-        oEl = this.element,
+    var oEl = this.element,
         nListElements = this._aListElements.length,
         bFirstList = true,
         i = 0,
@@ -3540,18 +3490,22 @@
 */
 _onRender: function (p_sType, p_aArgs) {
 
-    Module.textResizeEvent.subscribe(this._onTextResize, this, true);
+    if (this.cfg.getProperty("position") == "dynamic") { 
 
-    if (this.cfg.getProperty("position") == "dynamic" && 
-        !this.cfg.getProperty("width")) {
+        if (!this.cfg.getProperty("visible")) {
 
-        this._setWidth();
+            this.positionOffScreen();
+
+        }
     
     }
 
 },
 
 
+
+
+
 /**
 * @method _onBeforeShow
 * @description "beforeshow" event handler for the menu.
@@ -3566,8 +3520,6 @@
         n,
         nViewportHeight,
         oRegion,
-        nMaxHeight,
-        oBody,
         oSrcElement;
 
 
@@ -3644,7 +3596,6 @@
             else {
 
                 this.render(this.cfg.getProperty("container"));
-                this.cfg.refireEvent("xy");
 
             }                
 
@@ -3653,55 +3604,65 @@
     }
 
 
-    if (!(this instanceof YAHOO.widget.MenuBar) && 
-        this.cfg.getProperty("position") == "dynamic") {
+    var nMaxHeight = this.cfg.getProperty("maxheight"),
+        nMinScrollHeight = this.cfg.getProperty("minscrollheight"),
+        bDynamicPos = this.cfg.getProperty("position") == "dynamic";
 
-        nViewportHeight = Dom.getViewportHeight();
 
+    if (!this.parent && bDynamicPos) {
 
-        if (this.parent && this.parent.parent instanceof YAHOO.widget.MenuBar) {
-           
-            oRegion = YAHOO.util.Region.getRegion(this.parent.element);
-            
-            nViewportHeight = (nViewportHeight - oRegion.bottom);
+        this.cfg.refireEvent("xy");
+   
+    }
 
-        }
 
-
-        if (this.element.offsetHeight >= nViewportHeight) {
+    function clearMaxHeight() {
     
-            nMaxHeight = this.cfg.getProperty("maxheight");
-
-            /*
-                Cache the original value for the "maxheight" configuration  
-                property so that we can set it back when the menu is hidden.
-            */
+        this.cfg.setProperty("maxheight", 0);
     
-            this._nMaxHeight = nMaxHeight;
+        this.hideEvent.unsubscribe(clearMaxHeight);
+    
+    }
 
-            this.cfg.setProperty("maxheight", (nViewportHeight - 20));
-        
-        }
+
+    if (!(this instanceof YAHOO.widget.MenuBar) && bDynamicPos) {
+
+
+        if (nMaxHeight === 0) {
+
+            nViewportHeight = Dom.getViewportHeight();
     
     
-        if (this.cfg.getProperty("maxheight") > 0) {
+            if (this.parent && 
+                this.parent.parent instanceof YAHOO.widget.MenuBar) {
+               
+                oRegion = YAHOO.util.Region.getRegion(this.parent.element);
+                
+                nViewportHeight = (nViewportHeight - oRegion.bottom);
     
-            oBody = this.body;
+            }
     
-            if (oBody.scrollTop > 0) {
     
-                oBody.scrollTop = 0;
+            if (this.element.offsetHeight >= nViewportHeight) {
     
+                nMaxHeight = (nViewportHeight - (Overlay.VIEWPORT_OFFSET * 2));
+
+                if (nMaxHeight < nMinScrollHeight) {
+
+                    nMaxHeight = nMinScrollHeight;
+                
+                }
+
+                this.cfg.setProperty("maxheight", nMaxHeight);
+
+                this.hideEvent.subscribe(clearMaxHeight);
+
             }
-
-            this._disableScrollHeader();
-            this._enableScrollFooter();
-    
+        
         }
 
     }
 
-
 },
 
 
@@ -3825,27 +3786,6 @@
 
 
 /**
-* @method _onHide
-* @description "hide" event handler for the menu.
-* @private
-* @param {String} p_sType String representing the name of the event that 
-* was fired.
-* @param {Array} p_aArgs Array of arguments sent when the event was fired.
-*/
-_onHide: function (p_sType, p_aArgs) {
-
-    if (this._nMaxHeight != -1) {
-
-        this.cfg.setProperty("maxheight", this._nMaxHeight);
-
-        this._nMaxHeight = -1;
-
-    }
-
-},
-
-
-/**
 * @method _onParentMenuConfigChange
 * @description "configchange" event handler for a submenu.
 * @private
@@ -3870,6 +3810,8 @@
         case "clicktohide":
         case "effect":
         case "classname":
+        case "scrollincrement":
+        case "minscrollheight":
 
             p_oSubmenu.cfg.setProperty(sPropertyName, oPropertyValue);
                 
@@ -3893,45 +3835,37 @@
 */
 _onParentMenuRender: function (p_sType, p_aArgs, p_oSubmenu) {
 
-    var oParentMenu = p_oSubmenu.parent.parent,
+    var oParentCfg = p_oSubmenu.parent.parent.cfg,
 
         oConfig = {
 
-            constraintoviewport: 
-                oParentMenu.cfg.getProperty("constraintoviewport"),
+            constraintoviewport: oParentCfg.getProperty("constraintoviewport"),
 
             xy: [0,0],
+
+            clicktohide: oParentCfg.getProperty("clicktohide"),
                 
-            clicktohide: oParentMenu.cfg.getProperty("clicktohide"),
-                
-            effect: oParentMenu.cfg.getProperty("effect"),
+            effect: oParentCfg.getProperty("effect"),
 
-            showdelay: oParentMenu.cfg.getProperty("showdelay"),
+            showdelay: oParentCfg.getProperty("showdelay"),
             
-            hidedelay: oParentMenu.cfg.getProperty("hidedelay"),
+            hidedelay: oParentCfg.getProperty("hidedelay"),
 
-            submenuhidedelay: oParentMenu.cfg.getProperty("submenuhidedelay"),
+            submenuhidedelay: oParentCfg.getProperty("submenuhidedelay"),
 
-            classname: oParentMenu.cfg.getProperty("classname")
+            classname: oParentCfg.getProperty("classname"),
+            
+            scrollincrement: oParentCfg.getProperty("scrollincrement"),
+            
+            minscrollheight: oParentCfg.getProperty("minscrollheight"),
+            
+            iframe: oParentCfg.getProperty("iframe")
 
         },
         
         oLI;
 
 
-    /*
-        Only sync the "iframe" configuration property if the parent
-        menu's "position" configuration is the same.
-    */
-
-    if (this.cfg.getProperty("position") == 
-        oParentMenu.cfg.getProperty("position")) {
-
-        oConfig.iframe = oParentMenu.cfg.getProperty("iframe");
-    
-    }
-               
-
     p_oSubmenu.cfg.applyConfig(oConfig);
 
 
@@ -3964,28 +3898,26 @@
 * @param {Array} p_aArgs Array of arguments sent when the event was fired.
 */
 _onSubmenuBeforeShow: function (p_sType, p_aArgs) {
-    
+
     var oParent = this.parent,
         aAlignment = oParent.parent.cfg.getProperty("submenualignment");
 
-    this.cfg.setProperty("context", 
-        [oParent.element, aAlignment[0], aAlignment[1]]);
 
+    if (!this.cfg.getProperty("context")) {
+    
+        this.cfg.setProperty("context", 
+            [oParent.element, aAlignment[0], aAlignment[1]]);
 
-    var nScrollTop = oParent.parent.body.scrollTop;
+    }
+    else {
 
-    if ((UA.gecko || UA.webkit) && nScrollTop > 0) {
-
-         this.cfg.setProperty("y", (this.cfg.getProperty("y") - nScrollTop));
+        this.align();
     
     }
 
 },
 
 
-
-
-
 /**
 * @method _onMenuItemFocus
 * @description "focus" event handler for the menu's items.
@@ -4017,6 +3949,23 @@
 
 
 /**
+* @method _onMenuItemDestroy
+* @description "destroy" event handler for the menu's items.
+* @private
+* @param {String} p_sType String representing the name of the event 
+* that was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item 
+* that fired the event.
+*/
+_onMenuItemDestroy: function (p_sType, p_aArgs, p_oItem) {
+
+    this._removeItemFromGroupByValue(p_oItem.groupIndex, p_oItem);
+
+},
+
+
+/**
 * @method _onMenuItemConfigChange
 * @description "configchange" event handler for the menu's items.
 * @private
@@ -4057,23 +4006,6 @@
 
         break;
 
-        case "text":
-        case "helptext":
-
-            /*
-                A change to an item's "text" or "helptext"
-                configuration properties requires the width of the parent
-                menu to be recalculated.
-            */
-
-            if (this.element.style.width) {
-
-                this.cfg.setProperty("width", (this._getOffsetWidth() + "px"));
-
-            }
-
-        break;
-
     }
 
 },
@@ -4096,70 +4028,57 @@
 enforceConstraints: function (type, args, obj) {
 
     var oParentMenuItem = this.parent,
-        oElement,
-        oConfig,
-        pos,
-        x,
-        y,
-        offsetHeight,
-        offsetWidth,
-        viewPortWidth,
-        viewPortHeight,
-        scrollX,
-        scrollY,
-        nPadding,
+        nViewportOffset = Overlay.VIEWPORT_OFFSET,
+        oElement = this.element,
+        oConfig = this.cfg,
+        pos = args[0],
+        offsetHeight = oElement.offsetHeight,
+        offsetWidth = oElement.offsetWidth,
+        viewPortWidth = Dom.getViewportWidth(),
+        viewPortHeight = Dom.getViewportHeight(),
+        nPadding = (oParentMenuItem && 
+            oParentMenuItem.parent instanceof YAHOO.widget.MenuBar) ? 
+            0 : nViewportOffset,
+        aContext = oConfig.getProperty("context"),
+        oContextElement = aContext ? aContext[0] : null,
         topConstraint,
         leftConstraint,
         bottomConstraint,
         rightConstraint,
-        aContext,
-        oContextElement;
+        scrollX,
+        scrollY,
+        x,
+        y;
+    
 
+    if (offsetWidth < viewPortWidth) {
 
-    if (oParentMenuItem && 
-        !(oParentMenuItem.parent instanceof YAHOO.widget.MenuBar)) {
-
-        oElement = this.element;
-    
-        oConfig = this.cfg;
-        pos = args[0];
-        
         x = pos[0];
-        y = pos[1];
-        
-        offsetHeight = oElement.offsetHeight;
-        offsetWidth = oElement.offsetWidth;
-        
-        viewPortWidth = Dom.getViewportWidth();
-        viewPortHeight = Dom.getViewportHeight();
-        
         scrollX = Dom.getDocumentScrollLeft();
-        scrollY = Dom.getDocumentScrollTop();
-        
-        nPadding = 
-            (oParentMenuItem.parent instanceof YAHOO.widget.MenuBar) ? 0 : 10;
-        
-        topConstraint = scrollY + nPadding;
         leftConstraint = scrollX + nPadding;
-        
-        bottomConstraint = scrollY + viewPortHeight - offsetHeight - nPadding;
         rightConstraint = scrollX + viewPortWidth - offsetWidth - nPadding;
-        
-        aContext = oConfig.getProperty("context");
-        oContextElement = aContext ? aContext[0] : null;
+
+        if (x < nViewportOffset) {
     
-    
-        if (x < 10) {
-    
             x = leftConstraint;
     
         } else if ((x + offsetWidth) > viewPortWidth) {
     
-            if (oContextElement &&
+            if(oContextElement &&
                 ((x - oContextElement.offsetWidth) > offsetWidth)) {
     
-                x = (x - (oContextElement.offsetWidth + offsetWidth));
+                if (oParentMenuItem && 
+                    oParentMenuItem.parent instanceof YAHOO.widget.MenuBar) {
     
+                    x = (x - (offsetWidth - oContextElement.offsetWidth));
+    
+                }
+                else {
+    
+                    x = (x - (oContextElement.offsetWidth + offsetWidth));
+    
+                }
+    
             }
             else {
     
@@ -4169,7 +4088,19 @@
     
         }
     
-        if (y < 10) {
+    }
+
+
+    if (offsetHeight < viewPortHeight) {
+
+        y = pos[1];
+        scrollY = Dom.getDocumentScrollTop();
+        topConstraint = scrollY + nPadding;
+        bottomConstraint = scrollY + viewPortHeight - offsetHeight - nPadding;
+
+
+
+        if (y < nViewportOffset) {
     
             y = topConstraint;
     
@@ -4183,23 +4114,20 @@
             else {
     
                 y = bottomConstraint;
+                
+
     
             }
     
         }
-    
-        oConfig.setProperty("x", x, true);
-        oConfig.setProperty("y", y, true);
-        oConfig.setProperty("xy", [x,y], true);
-    
+
     }
-    else if (this == this.getRoot() && 
-        this.cfg.getProperty("position") == "dynamic") {
-    
-        Menu.superclass.enforceConstraints.call(this, type, args, obj);
-    
-    }
 
+
+    oConfig.setProperty("x", x, true);
+    oConfig.setProperty("y", y, true);
+    oConfig.setProperty("xy", [x,y], true);
+
 },
 
 
@@ -4268,39 +4196,24 @@
 
     var oElement = this.element,
         sCSSPosition = p_aArgs[0] == "static" ? "static" : "absolute",
-        sCurrentPosition = Dom.getStyle(oElement, "position"),
         oCfg = this.cfg,
         nZIndex;
 
 
-    Dom.setStyle(this.element, "position", sCSSPosition);
+    Dom.setStyle(oElement, "position", sCSSPosition);
 
 
     if (sCSSPosition == "static") {
 
-        /*
-            Remove the iframe for statically positioned menus since it will 
-            intercept mouse events.
-        */
-
-        oCfg.setProperty("iframe", false);
-
-
         // Statically positioned menus are visible by default
         
-        Dom.setStyle(this.element, "display", "block");
+        Dom.setStyle(oElement, "display", "block");
 
         oCfg.setProperty("visible", true);
 
     }
     else {
 
-        if (sCurrentPosition != "absolute") {
-
-            oCfg.setProperty("iframe", (UA.ie == 6 ? true : false));
-
-        }
-
         /*
             Even though the "visible" property is queued to 
             "false" by default, we need to set the "visibility" property to 
@@ -4309,7 +4222,7 @@
             or not to show an Overlay instance.
         */
 
-        Dom.setStyle(this.element, "visibility", "hidden");
+        Dom.setStyle(oElement, "visibility", "hidden");
     
     }
 
@@ -4404,7 +4317,7 @@
 /**
 * @method configContainer
 * @description Event handler for when the "container" configuration property 
-of the menu changes.
+* of the menu changes.
 * @param {String} p_sType String representing the name of the event that 
 * was fired.
 * @param {Array} p_aArgs Array of arguments sent when the event was fired.
@@ -4458,14 +4371,24 @@
 configMaxHeight: function (p_sType, p_aArgs, p_oMenu) {
 
     var nMaxHeight = p_aArgs[0],
+        oElement = this.element,
         oBody = this.body,
         oHeader = this.header,
         oFooter = this.footer,
         fnMouseOver = this._onScrollTargetMouseOver,
         fnMouseOut = this._onScrollTargetMouseOut,
-        nHeight;
+        nMinScrollHeight = this.cfg.getProperty("minscrollheight"),
+        nHeight,
+        nOffsetWidth;
 
 
+    if (nMaxHeight !== 0 && nMaxHeight < nMinScrollHeight) {
+    
+        nMaxHeight = nMinScrollHeight;
+    
+    }
+
+
     if (this.lazyLoad && !oBody) {
 
         this.renderEvent.unsubscribe(this._setMaxHeight);
@@ -4480,56 +4403,88 @@
     
     }
 
-    Dom.setStyle(oBody, "height", "auto");
+
+    Dom.setStyle(oBody, "height", "");
     Dom.removeClass(oBody, "yui-menu-body-scrolled");
 
-    if ((nMaxHeight > 0) && (oBody.offsetHeight > nMaxHeight)) {
 
-        if (!this.cfg.getProperty("width")) {
+    /*
+        There is a bug in gecko-based browsers where an element whose 
+        "position" property is set to "absolute" and "overflow" property is set 
+        to "hidden" will not render at the correct width when its 
+        offsetParent's "position" property is also set to "absolute."  It is 
+        possible to work around this bug by specifying a value for the width 
+        property in addition to overflow.
+    */
 
-            this._setWidth();
+    if (UA.gecko && this.parent && this.parent.parent && 
+        this.parent.parent.cfg.getProperty("position") == "dynamic" && 
+        !this.cfg.getProperty("width")) {
 
-        }
+        nOffsetWidth = oElement.offsetWidth;
 
-        if (!oHeader && !oFooter) {
+        /*
+            Measuring the difference of the offsetWidth before and after
+            setting the "width" style attribute allows us to compute the 
+            about of padding and borders applied to the element, which in 
+            turn allows us to set the "width" property correctly.
+        */
+        
+        oElement.style.width = nOffsetWidth + "px";
+        oElement.style.width = 
+                (nOffsetWidth - (oElement.offsetWidth - nOffsetWidth)) + "px";
 
-            this.setHeader(" ");
-            this.setFooter(" ");
+    }
 
-            oHeader = this.header;
-            oFooter = this.footer;
 
-            Dom.addClass(oHeader, "topscrollbar");
-            Dom.addClass(oFooter, "bottomscrollbar");
-            
-            this.element.insertBefore(oHeader, oBody);
-            this.element.appendChild(oFooter);
+    if (!oHeader && !oFooter) {
 
-            Event.on(oHeader, "mouseover", fnMouseOver, this, true);
-            Event.on(oHeader, "mouseout", fnMouseOut, this, true);
-            Event.on(oFooter, "mouseover", fnMouseOver, this, true);
-            Event.on(oFooter, "mouseout", fnMouseOut, this, true);
+        this.setHeader(" ");
+        this.setFooter(" ");
+
+        oHeader = this.header;
+        oFooter = this.footer;
+
+        Dom.addClass(oHeader, "topscrollbar");
+        Dom.addClass(oFooter, "bottomscrollbar");
         
-        }
+        oElement.insertBefore(oHeader, oBody);
+        oElement.appendChild(oFooter);
+    
+    }
 
-        Dom.addClass(oBody, "yui-menu-body-scrolled");
 
-        nHeight = (nMaxHeight - (this.footer.offsetHeight + 
-                    this.header.offsetHeight));
+    nHeight = (nMaxHeight - (oHeader.offsetHeight + oHeader.offsetHeight));
 
+
+
+    if (nHeight > 0 && (oBody.offsetHeight > nMaxHeight)) {
+
+        Dom.addClass(oBody, "yui-menu-body-scrolled");
         Dom.setStyle(oBody, "height", (nHeight + "px"));
 
+        Event.on(oHeader, "mouseover", fnMouseOver, this, true);
+        Event.on(oHeader, "mouseout", fnMouseOut, this, true);
+        Event.on(oFooter, "mouseover", fnMouseOver, this, true);
+        Event.on(oFooter, "mouseout", fnMouseOut, this, true);
+
+        this._disableScrollHeader();
+        this._enableScrollFooter();
+
     }
     else if (oHeader && oFooter) {
 
+        this._enableScrollHeader();
+        this._enableScrollFooter();
+
         Event.removeListener(oHeader, "mouseover", fnMouseOver);
         Event.removeListener(oHeader, "mouseout", fnMouseOut);
         Event.removeListener(oFooter, "mouseover", fnMouseOver);
         Event.removeListener(oFooter, "mouseout", fnMouseOut);
 
-        this.element.removeChild(oHeader);
-        this.element.removeChild(oFooter);
-    
+        oElement.removeChild(oHeader);
+        oElement.removeChild(oFooter);
+
         this.header = null;
         this.footer = null;
     
@@ -4620,6 +4575,8 @@
 
         if (bDisabled) {
 
+            this.clearActiveItem(true);
+
             Dom.addClass(this.element, "disabled");
 
             this.itemAddedEvent.subscribe(this._onItemAdded);
@@ -4652,7 +4609,7 @@
         var oElement = this.element,
             oShadow = this._shadow;
     
-        if (oShadow) {
+        if (oShadow && oElement) {
 
             oShadow.style.width = (oElement.offsetWidth + 6) + "px";
             oShadow.style.height = (oElement.offsetHeight + 1) + "px";
@@ -4662,6 +4619,13 @@
     }
 
 
+    function replaceShadow() {
+
+        this.element.appendChild(this._shadow);
+
+    }
+
+
     function addShadowVisibleClass() {
     
         Dom.addClass(this._shadow, "yui-menu-shadow-visible");
@@ -4690,7 +4654,8 @@
             if (!m_oShadowTemplate) {
 
                 m_oShadowTemplate = document.createElement("div");
-                m_oShadowTemplate.className = "yui-menu-shadow";
+                m_oShadowTemplate.className = 
+                    "yui-menu-shadow yui-menu-shadow-visible";
             
             }
 
@@ -4700,8 +4665,6 @@
             
             this._shadow = oShadow;
 
-            addShadowVisibleClass.call(this);
-
             this.beforeShowEvent.subscribe(addShadowVisibleClass);
             this.beforeHideEvent.subscribe(removeShadowVisibleClass);
 
@@ -4735,7 +4698,9 @@
                 });
         
             }
-        
+
+            this.cfg.subscribeToConfigEvent("maxheight", replaceShadow);
+
         }
 
     }
@@ -4823,6 +4788,28 @@
 
 
 /**
+* @method positionOffScreen
+* @description Positions the menu outside of the boundaries of the browser's 
+* viewport.  Called automatically when a menu is hidden to ensure that 
+* it doesn't force the browser to render uncessary scrollbars.
+*/
+positionOffScreen: function () {
+
+    var oIFrame = this.iframe,
+        aPos = this.OFF_SCREEN_POSITION;
+
+    Dom.setXY(this.element, aPos);
+    
+    if (oIFrame) {
+
+        Dom.setXY(oIFrame, aPos);
+    
+    }
+
+},
+
+
+/**
 * @method getRoot
 * @description Finds the menu's root menu.
 */
@@ -5196,6 +5183,7 @@
 
 },
 
+
 /**
 * @method clearContent
 * @description Removes all of the content from the menu, including the menu 
@@ -5287,8 +5275,6 @@
 */
 destroy: function () {
 
-    Module.textResizeEvent.unsubscribe(this._onTextResize, this);
-
     // Remove all items
 
     this.clearContent();
@@ -5465,34 +5451,60 @@
     }
 
 
+    function onSubmenuAdded(p_sType, p_aArgs, p_oObject) { 
+    
+        var oSubmenu = this.cfg.getProperty("submenu");
+        
+        if (oSubmenu) {
+
+            oSubmenu.subscribe.apply(oSubmenu, p_oObject);
+        
+        }
+    
+    }
+
+
     Menu.superclass.subscribe.apply(this, arguments);
     Menu.superclass.subscribe.call(this, "itemAdded", onItemAdded, arguments);
 
 
-    var aSubmenus = this.getSubmenus(),
-        nSubmenus,
+    var aItems = this.getItems(),
+        nItems,
+        oItem,
         oSubmenu,
         i;
+        
 
-    if (aSubmenus) {
+    if (aItems) {
 
-        nSubmenus = aSubmenus.length;
-
-        if (nSubmenus > 0) {
+        nItems = aItems.length;
         
-            i = nSubmenus - 1;
+        if (nItems > 0) {
+        
+            i = nItems - 1;
             
             do {
-    
-                oSubmenu = aSubmenus[i];
+
+                oItem = aItems[i];
                 
-                oSubmenu.subscribe.apply(oSubmenu, arguments);
-    
+                oSubmenu = oItem.cfg.getProperty("submenu");
+                
+                if (oSubmenu) {
+                
+                    oSubmenu.subscribe.apply(oSubmenu, arguments);
+                
+                }
+                else {
+                
+                    oItem.cfg.subscribeToConfigEvent("submenu", onSubmenuAdded, arguments);
+                
+                }
+
             }
-            while(i--);
+            while (i--);
         
         }
-    
+
     }
 
 },
@@ -5509,6 +5521,98 @@
 
     var oConfig = this.cfg;
 
+
+    // Module documentation overrides
+
+    /**
+    * @config effect
+    * @description Object or array of objects representing the ContainerEffect 
+    * classes that are active for animating the container.  When set this 
+    * property is automatically applied to all submenus.
+    * @type Object
+    * @default null
+    */
+
+    // Overlay documentation overrides
+
+
+    /**
+    * @config x
+    * @description Number representing the absolute x-coordinate position of 
+    * the Menu.  This property is only applied when the "position" 
+    * configuration property is set to dynamic.
+    * @type Number
+    * @default null
+    */
+    
+
+    /**
+    * @config y
+    * @description Number representing the absolute y-coordinate position of 
+    * the Menu.  This property is only applied when the "position" 
+    * configuration property is set to dynamic.
+    * @type Number
+    * @default null
+    */
+
+
+    /**
+    * @description Array of the absolute x and y positions of the Menu.  This 
+    * property is only applied when the "position" configuration property is 
+    * set to dynamic.
+    * @config xy
+    * @type Number[]
+    * @default null
+    */
+    
+
+    /**
+    * @config context
+    * @description Array of context arguments for context-sensitive positioning.  
+    * The format is: [id or element, element corner, context corner]. 
+    * For example, setting this property to ["img1", "tl", "bl"] would 
+    * align the Mnu's top left corner to the context element's 
+    * bottom left corner.  This property is only applied when the "position" 
+    * configuration property is set to dynamic.
+    * @type Array
+    * @default null
+    */
+    
+    
+    /**
+    * @config fixedcenter
+    * @description Boolean indicating if the Menu should be anchored to the 
+    * center of the viewport.  This property is only applied when the 
+    * "position" configuration property is set to dynamic.
+    * @type Boolean
+    * @default false
+    */
+
+    
+    /**
+    * @config zindex
+    * @description Number representing the CSS z-index of the Menu.  This 
+    * property is only applied when the "position" configuration property is 
+    * set to dynamic.
+    * @type Number
+    * @default null
+    */
+    
+    
+    /**
+    * @config iframe
+    * @description Boolean indicating whether or not the Menu should 
+    * have an IFRAME shim; used to prevent SELECT elements from 
+    * poking through an Overlay instance in IE6.  When set to "true", 
+    * the iframe shim is created when the Menu instance is intially
+    * made visible.  This property is only applied when the "position" 
+    * configuration property is set to dynamic and is automatically applied 
+    * to all submenus.
+    * @type Boolean
+    * @default true for IE6 and below, false for all other browsers.
+    */
+
+
 	// Add configuration attributes
 
     /*
@@ -5547,7 +5651,9 @@
     /**
     * @config constraintoviewport
     * @description Boolean indicating if the menu will try to remain inside 
-    * the boundaries of the size of viewport.
+    * the boundaries of the size of viewport.  This property is only applied 
+    * when the "position" configuration property is set to dynamic and is 
+    * automatically applied to all submenus.
     * @default true
     * @type Boolean
     */
@@ -5596,7 +5702,8 @@
     oConfig.addProperty(
         DEFAULT_CONFIG.SUBMENU_ALIGNMENT.key, 
         { 
-            value: DEFAULT_CONFIG.SUBMENU_ALIGNMENT.value 
+            value: DEFAULT_CONFIG.SUBMENU_ALIGNMENT.value,
+            suppressEvent: DEFAULT_CONFIG.SUBMENU_ALIGNMENT.suppressEvent
         }
     );
 
@@ -5612,7 +5719,8 @@
 	   DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.key, 
 	   { 
 	       value: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.value, 
-	       validator: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.validator
+	       validator: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.validator,
+	       suppressEvent: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.suppressEvent
        } 
     );
 
@@ -5621,7 +5729,9 @@
     * @config showdelay
     * @description Number indicating the time (in milliseconds) that should 
     * expire before a submenu is made visible when the user mouses over 
-    * the menu's items.
+    * the menu's items.  This property is only applied when the "position" 
+    * configuration property is set to dynamic and is automatically applied 
+    * to all submenus.
     * @default 250
     * @type Number
     */
@@ -5629,7 +5739,8 @@
 	   DEFAULT_CONFIG.SHOW_DELAY.key, 
 	   { 
 	       value: DEFAULT_CONFIG.SHOW_DELAY.value, 
-	       validator: DEFAULT_CONFIG.SHOW_DELAY.validator
+	       validator: DEFAULT_CONFIG.SHOW_DELAY.validator,
+	       suppressEvent: DEFAULT_CONFIG.SHOW_DELAY.suppressEvent
        } 
     );
 
@@ -5637,7 +5748,9 @@
     /**
     * @config hidedelay
     * @description Number indicating the time (in milliseconds) that should 
-    * expire before the menu is hidden.
+    * expire before the menu is hidden.  This property is only applied when 
+    * the "position" configuration property is set to dynamic and is 
+    * automatically applied to all submenus.
     * @default 0
     * @type Number
     */
@@ -5658,6 +5771,8 @@
     * expire before a submenu is hidden when the user mouses out of a menu item 
     * heading in the direction of a submenu.  The value must be greater than or 
     * equal to the value specified for the "showdelay" configuration property.
+    * This property is only applied when the "position" configuration property 
+    * is set to dynamic and is automatically applied to all submenus.
     * @default 250
     * @type Number
     */
@@ -5665,7 +5780,8 @@
 	   DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.key, 
 	   { 
 	       value: DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.value, 
-	       validator: DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.validator
+	       validator: DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.validator,
+	       suppressEvent: DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.suppressEvent
        } 
     );
 
@@ -5673,7 +5789,9 @@
     /**
     * @config clicktohide
     * @description Boolean indicating if the menu will automatically be 
-    * hidden if the user clicks outside of it.
+    * hidden if the user clicks outside of it.  This property is only 
+    * applied when the "position" configuration property is set to dynamic 
+    * and is automatically applied to all submenus.
     * @default true
     * @type Boolean
     */
@@ -5681,7 +5799,8 @@
         DEFAULT_CONFIG.CLICK_TO_HIDE.key,
         {
             value: DEFAULT_CONFIG.CLICK_TO_HIDE.value,
-            validator: DEFAULT_CONFIG.CLICK_TO_HIDE.validator
+            validator: DEFAULT_CONFIG.CLICK_TO_HIDE.validator,
+            suppressEvent: DEFAULT_CONFIG.CLICK_TO_HIDE.suppressEvent
         }
     );
 
@@ -5699,15 +5818,58 @@
 	   DEFAULT_CONFIG.CONTAINER.key, 
 	   { 
 	       handler: this.configContainer,
-	       value: document.body
+	       value: document.body,
+           suppressEvent: DEFAULT_CONFIG.CONTAINER.suppressEvent
        } 
    );
 
 
     /**
+    * @config scrollincrement
+    * @description Number used to control the scroll speed of a menu.  Used to 
+    * increment the "scrollTop" property of the menu's body by when a menu's 
+    * content is scrolling.  When set this property is automatically applied 
+    * to all submenus.
+    * @default 1
+    * @type Number
+    */
+    oConfig.addProperty(
+        DEFAULT_CONFIG.SCROLL_INCREMENT.key, 
+        { 
+            value: DEFAULT_CONFIG.SCROLL_INCREMENT.value, 
+            validator: DEFAULT_CONFIG.SCROLL_INCREMENT.validator,
+            supercedes: DEFAULT_CONFIG.SCROLL_INCREMENT.supercedes,
+            suppressEvent: DEFAULT_CONFIG.SCROLL_INCREMENT.suppressEvent
+        }
+    );
+
+
+    /**
+    * @config minscrollheight
+    * @description Number defining the minimum threshold for the "maxheight" 
+    * configuration property.  When set this property is automatically applied 
+    * to all submenus.
+    * @default 90
+    * @type Number
+    */
+    oConfig.addProperty(
+        DEFAULT_CONFIG.MIN_SCROLL_HEIGHT.key, 
+        { 
+            value: DEFAULT_CONFIG.MIN_SCROLL_HEIGHT.value, 
+            validator: DEFAULT_CONFIG.MIN_SCROLL_HEIGHT.validator,
+            supercedes: DEFAULT_CONFIG.MIN_SCROLL_HEIGHT.supercedes,
+            suppressEvent: DEFAULT_CONFIG.MIN_SCROLL_HEIGHT.suppressEvent
+        }
+    );
+
+
+    /**
     * @config maxheight
-    * @description Defines the maximum height (in pixels) for a menu before the
-    * contents of the body are scrolled.
+    * @description Number defining the maximum height (in pixels) for a menu's 
+    * body element (<code><div class="bd"<</code>).  Once a menu's body 
+    * exceeds this height, the contents of the body are scrolled to maintain 
+    * this value.  This value cannot be set lower than the value of the 
+    * "minscrollheight" configuration property.
     * @default 0
     * @type Number
     */
@@ -5716,17 +5878,20 @@
        {
             handler: this.configMaxHeight,
             value: DEFAULT_CONFIG.MAX_HEIGHT.value,
-            validator: DEFAULT_CONFIG.MAX_HEIGHT.validator
+            validator: DEFAULT_CONFIG.MAX_HEIGHT.validator,
+            suppressEvent: DEFAULT_CONFIG.MAX_HEIGHT.suppressEvent,
+            supercedes: DEFAULT_CONFIG.MAX_HEIGHT.supercedes            
        } 
     );
 
 
     /**
     * @config classname
-    * @description CSS class to be applied to the menu's root 
-    * <code><div></code> element.  The specified class(es) are 
-    * appended in addition to the default class as specified by the menu's
-    * CSS_CLASS_NAME constant.
+    * @description String representing the CSS class to be applied to the 
+    * menu's root <code><div></code> element.  The specified class(es)  
+    * are appended in addition to the default class as specified by the menu's
+    * CSS_CLASS_NAME constant. When set this property is automatically 
+    * applied to all submenus.
     * @default null
     * @type String
     */
@@ -5735,7 +5900,8 @@
         { 
             handler: this.configClassName,
             value: DEFAULT_CONFIG.CLASS_NAME.value, 
-            validator: DEFAULT_CONFIG.CLASS_NAME.validator
+            validator: DEFAULT_CONFIG.CLASS_NAME.validator,
+            supercedes: DEFAULT_CONFIG.CLASS_NAME.supercedes      
         }
     );
 
@@ -5768,7 +5934,7 @@
 
 
 
-(function() {
+(function () {
 
 
 /**
@@ -5790,11 +5956,11 @@
 * @class MenuItem
 * @constructor
 */
-YAHOO.widget.MenuItem = function(p_oObject, p_oConfig) {
+YAHOO.widget.MenuItem = function (p_oObject, p_oConfig) {
 
-    if(p_oObject) {
+    if (p_oObject) {
 
-        if(p_oConfig) {
+        if (p_oConfig) {
     
             this.parent = p_oConfig.parent;
             this.value = p_oConfig.value;
@@ -5808,6 +5974,7 @@
 
 };
 
+
 var Dom = YAHOO.util.Dom,
     Module = YAHOO.widget.Module,
     Menu = YAHOO.widget.Menu,
@@ -5860,7 +6027,8 @@
     
         "HELP_TEXT": { 
             key: "helptext",
-            supercedes: ["text"]
+            supercedes: ["text"], 
+            suppressEvent: true 
         },
     
         "URL": { 
@@ -5895,15 +6063,21 @@
             value: false, 
             validator: Lang.isBoolean, 
             suppressEvent: true, 
-            supercedes: ["text"]
+            supercedes: ["disabled", "selected"]
         }, 
+
+        "SUBMENU": { 
+            key: "submenu",
+            suppressEvent: true,
+            supercedes: ["disabled", "selected"]
+        },
     
         "DISABLED": { 
             key: "disabled", 
             value: false, 
             validator: Lang.isBoolean, 
             suppressEvent: true,
-            supercedes: ["text"]
+            supercedes: ["text", "selected"]
         },
     
         "SELECTED": { 
@@ -5913,19 +6087,16 @@
             suppressEvent: true
         },
     
-        "SUBMENU": { 
-            key: "submenu",
-            supercedes: ["text"]
-        },
-    
         "ONCLICK": { 
-            key: "onclick"
+            key: "onclick",
+            suppressEvent: true
         },
     
         "CLASS_NAME": { 
             key: "classname", 
             value: null, 
-            validator: Lang.isString
+            validator: Lang.isString,
+            suppressEvent: true
         }
     
     };
@@ -5933,67 +6104,7 @@
 
 MenuItem.prototype = {
 
-    // Constants
-
     /**
-    * @property COLLAPSED_SUBMENU_INDICATOR_TEXT
-    * @description String representing the text for the <code><em></code>
-    * element used for the submenu arrow indicator.
-    * @default "Submenu collapsed.  Click to expand submenu."
-    * @final
-    * @type String
-    */
-    COLLAPSED_SUBMENU_INDICATOR_TEXT: 
-        "Submenu collapsed.  Click to expand submenu.",
-
-
-    /**
-    * @property EXPANDED_SUBMENU_INDICATOR_TEXT
-    * @description String representing the text for the submenu arrow indicator 
-    * element (<code><em></code>) when the submenu is visible.
-    * @default "Submenu expanded.  Click to collapse submenu."
-    * @final
-    * @type String
-    */
-    EXPANDED_SUBMENU_INDICATOR_TEXT: 
-        "Submenu expanded.  Click to collapse submenu.",
-
-
-    /**
-    * @property DISABLED_SUBMENU_INDICATOR_TEXT
-    * @description String representing the text for the submenu arrow indicator 
-    * element (<code><em></code>) when the menu item is disabled.
-    * @default "Submenu collapsed.  (Item disabled.)."
-    * @final
-    * @type String
-    */
-    DISABLED_SUBMENU_INDICATOR_TEXT: "Submenu collapsed.  (Item disabled.)",
-
-
-    /**
-    * @property CHECKED_TEXT
-    * @description String representing the text to be used for the checked 
-    * indicator element (<code><em></code>).
-    * @default "Checked."
-    * @final
-    * @type String
-    */
-    CHECKED_TEXT: "Menu item checked.",
-    
-    
-    /**
-    * @property DISABLED_CHECKED_TEXT
-    * @description String representing the text to be used for the checked 
-    * indicator element (<code><em></code>) when the menu item 
-    * is disabled.
-    * @default "Checked. (Item disabled.)"
-    * @final
-    * @type String
-    */
-    DISABLED_CHECKED_TEXT: "Checked. (Item disabled.)",
-
-
-    /**
     * @property CSS_CLASS_NAME
     * @description String representing the CSS class(es) to be applied to the 
     * <code><li></code> element of the menu item.
@@ -6061,20 +6172,8 @@
     * @type YAHOO.widget.Menu
     */
     _oSubmenu: null,
-    
 
-    /**
-    * @property _oCheckedIndicator
-    * @description Object reference to the menu item's checkmark image.
-    * @default <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-    * level-one-html.html#ID-58190037">HTMLElement</a>
-    * @private
-    * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-    * level-one-html.html#ID-58190037">HTMLElement</a>
-    */
-    _oCheckedIndicator: null,
 
-
     /** 
     * @property _oOnclickAttributeValue
     * @description Object reference to the menu item's current value for the 
@@ -6178,18 +6277,6 @@
     value: null,
 
 
-    /**
-    * @property submenuIndicator
-    * @description Object reference to the <code><em></code> element 
-    * used to create the submenu indicator for the menu item.
-    * @default <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-    * level-one-html.html#ID-58190037">HTMLElement</a>
-    * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-    * level-one-html.html#ID-58190037">HTMLElement</a>
-    */
-    submenuIndicator: null,
-
-
 	/**
     * @property browser
     * @deprecated Use YAHOO.env.ua
@@ -6332,10 +6419,10 @@
     * configuration for the menu item. See configuration class documentation 
     * for more details.
     */
-    init: function(p_oObject, p_oConfig) {
+    init: function (p_oObject, p_oConfig) {
 
 
-        if(!this.SUBMENU_TYPE) {
+        if (!this.SUBMENU_TYPE) {
     
             this.SUBMENU_TYPE = Menu;
     
@@ -6357,14 +6444,14 @@
             sId;
 
 
-        if(Lang.isString(p_oObject)) {
+        if (Lang.isString(p_oObject)) {
 
             this._createRootNodeStructure();
 
             oConfig.queueProperty("text", p_oObject);
 
         }
-        else if(p_oObject && p_oObject.tagName) {
+        else if (p_oObject && p_oObject.tagName) {
 
             switch(p_oObject.tagName.toUpperCase()) {
 
@@ -6373,7 +6460,8 @@
                     this._createRootNodeStructure();
 
                     oConfig.queueProperty("text", p_oObject.text);
-                    
+                    oConfig.queueProperty("disabled", p_oObject.disabled);
+
                     this.value = p_oObject.value;
 
                     this.srcElement = p_oObject;
@@ -6385,6 +6473,7 @@
                     this._createRootNodeStructure();
 
                     oConfig.queueProperty("text", p_oObject.label);
+                    oConfig.queueProperty("disabled", p_oObject.disabled);
 
                     this.srcElement = p_oObject;
 
@@ -6401,18 +6490,11 @@
 
                     // Capture the "text" and/or the "URL"
 
-                    if(oAnchor) {
+                    if (oAnchor) {
 
                         sURL = oAnchor.getAttribute("href");
+                        sTarget = oAnchor.getAttribute("target");
 
-                        if (YAHOO.env.ua.ie) {
-            
-                            sURL = sURL.substring(
-                                document.location.href.length, sURL.length);
-            
-                        }
-
-                        sTarget = oAnchor.getAttribute("target");
                         sText = oAnchor.innerHTML;
 
                     }
@@ -6440,11 +6522,11 @@
         }
 
 
-        if(this.element) {
+        if (this.element) {
 
-            sId = this.element.id;
+            sId = (this.srcElement || this.element).id;
 
-            if(!sId) {
+            if (!sId) {
 
                 sId = this.id || Dom.generateId();
 
@@ -6494,7 +6576,7 @@
             this.destroyEvent = this.createEvent(EVENT_TYPES.DESTROY);
             this.destroyEvent.signature = SIGNATURE;
 
-            if(p_oConfig) {
+            if (p_oConfig) {
     
                 oConfig.applyConfig(p_oConfig);
     
@@ -6521,7 +6603,7 @@
         var oElement,
             oAnchor;
 
-        if(!m_oMenuItemTemplate) {
+        if (!m_oMenuItemTemplate) {
 
             m_oMenuItemTemplate = document.createElement("li");
             m_oMenuItemTemplate.innerHTML = "<a href=\"#\"></a>";
@@ -6546,7 +6628,7 @@
     * the child nodes to instantiate other menus.
     * @private
     */
-    _initSubTree: function() {
+    _initSubTree: function () {
 
         var oSrcEl = this.srcElement,
             oConfig = this.cfg,
@@ -6557,9 +6639,9 @@
             n;
 
 
-        if(oSrcEl.childNodes.length > 0) {
+        if (oSrcEl.childNodes.length > 0) {
 
-            if(this.parent.lazyLoad && this.parent.srcElement && 
+            if (this.parent.lazyLoad && this.parent.srcElement && 
                 this.parent.srcElement.tagName.toUpperCase() == "SELECT") {
 
                 oConfig.setProperty(
@@ -6575,7 +6657,7 @@
     
                 do {
     
-                    if(oNode && oNode.tagName) {
+                    if (oNode && oNode.tagName) {
     
                         switch(oNode.tagName.toUpperCase()) {
                 
@@ -6601,7 +6683,7 @@
     
                 nOptions = aOptions.length;
     
-                if(nOptions > 0) {
+                if (nOptions > 0) {
     
                     oMenu = new this.SUBMENU_TYPE(Dom.generateId());
                     
@@ -6636,16 +6718,13 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */
-    configText: function(p_sType, p_aArgs, p_oItem) {
+    configText: function (p_sType, p_aArgs, p_oItem) {
 
         var sText = p_aArgs[0],
             oConfig = this.cfg,
             oAnchor = this._oAnchor,
             sHelpText = oConfig.getProperty("helptext"),
             sHelpTextHTML = "",
-            sCheckHTML = "",
-            oSubmenu = oConfig.getProperty("submenu"),
-            sSubmenuIndicatorHTML = "",
             sEmphasisStartTag = "",
             sEmphasisEndTag = "";
 
@@ -6660,25 +6739,6 @@
             }
 
 
-            if (oConfig.getProperty("checked")) {
-
-                sCheckHTML = "<em class=\"checkedindicator\">" + 
-                    this.CHECKED_TEXT + "</em>";
-            
-            }
-            
-            
-            if (oSubmenu) {
-
-                sSubmenuIndicatorHTML =  "<em class=\"submenuindicator\">" + 
-                    ((oSubmenu instanceof Menu && 
-                    oSubmenu.cfg.getProperty("visible")) ? 
-                    this.EXPANDED_SUBMENU_INDICATOR_TEXT : 
-                    this.COLLAPSED_SUBMENU_INDICATOR_TEXT) + "</em>";
-            
-            }
-            
-
             if (oConfig.getProperty("emphasis")) {
 
                 sEmphasisStartTag = "<em>";
@@ -6696,16 +6756,8 @@
 
 
             oAnchor.innerHTML = (sEmphasisStartTag + sText + 
-                sEmphasisEndTag + sHelpTextHTML + 
-                sCheckHTML + sSubmenuIndicatorHTML);
+                sEmphasisEndTag + sHelpTextHTML);
 
-
-            if (oSubmenu) {
-
-                this.submenuIndicator = oAnchor.lastChild;
-            
-            }
-
         }
 
     },
@@ -6721,22 +6773,8 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */    
-    configHelpText: function(p_sType, p_aArgs, p_oItem) {
+    configHelpText: function (p_sType, p_aArgs, p_oItem) {
 
-        var sHelpText = p_aArgs[0],
-            oAnchor = this._oAnchor;
-
-        if (sHelpText) {
-
-            Dom.addClass(oAnchor, "hashelptext");
-
-        }
-        else {
-
-            Dom.removeClass(oAnchor, "hashelptext");
-        
-        }
-
         this.cfg.refireEvent("text");
 
     },
@@ -6752,11 +6790,11 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */    
-    configURL: function(p_sType, p_aArgs, p_oItem) {
+    configURL: function (p_sType, p_aArgs, p_oItem) {
 
         var sURL = p_aArgs[0];
 
-        if(!sURL) {
+        if (!sURL) {
 
             sURL = "#";
 
@@ -6785,12 +6823,12 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */    
-    configTarget: function(p_sType, p_aArgs, p_oItem) {
+    configTarget: function (p_sType, p_aArgs, p_oItem) {
 
         var sTarget = p_aArgs[0],
             oAnchor = this._oAnchor;
 
-        if(sTarget && sTarget.length > 0) {
+        if (sTarget && sTarget.length > 0) {
 
             oAnchor.setAttribute("target", sTarget);
 
@@ -6814,13 +6852,13 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */    
-    configEmphasis: function(p_sType, p_aArgs, p_oItem) {
+    configEmphasis: function (p_sType, p_aArgs, p_oItem) {
 
         var bEmphasis = p_aArgs[0],
             oConfig = this.cfg;
 
 
-        if(bEmphasis && oConfig.getProperty("strongemphasis")) {
+        if (bEmphasis && oConfig.getProperty("strongemphasis")) {
 
             oConfig.setProperty("strongemphasis", false);
 
@@ -6842,13 +6880,13 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */    
-    configStrongEmphasis: function(p_sType, p_aArgs, p_oItem) {
+    configStrongEmphasis: function (p_sType, p_aArgs, p_oItem) {
 
         var bStrongEmphasis = p_aArgs[0],
             oConfig = this.cfg;
 
 
-        if(bStrongEmphasis && oConfig.getProperty("emphasis")) {
+        if (bStrongEmphasis && oConfig.getProperty("emphasis")) {
 
             oConfig.setProperty("emphasis", false);
 
@@ -6869,24 +6907,47 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */    
-    configChecked: function(p_sType, p_aArgs, p_oItem) {
+    configChecked: function (p_sType, p_aArgs, p_oItem) {
 
         var bChecked = p_aArgs[0],
-            oAnchor = this._oAnchor;
+            oElement = this.element,
+            oAnchor = this._oAnchor,
+            oConfig = this.cfg,
+            sState = "-checked",
+            sClassName = this.CSS_CLASS_NAME + sState,
+            sLabelClassName = this.CSS_LABEL_CLASS_NAME + sState;
 
+
         if (bChecked) {
 
-            Dom.addClass(oAnchor, "checked");
+            Dom.addClass(oElement, sClassName);
+            Dom.addClass(oAnchor, sLabelClassName);
 
         }
         else {
 
-            Dom.removeClass(oAnchor, "checked");
+            Dom.removeClass(oElement, sClassName);
+            Dom.removeClass(oAnchor, sLabelClassName);
         
         }
 
-        this.cfg.refireEvent("text");
 
+        oConfig.refireEvent("text");
+
+
+        if (oConfig.getProperty("disabled")) {
+
+            oConfig.refireEvent("disabled");
+
+        }
+
+
+        if (oConfig.getProperty("selected")) {
+
+            oConfig.refireEvent("selected");
+
+        }
+
     },
 
 
@@ -6901,32 +6962,74 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */    
-    configDisabled: function(p_sType, p_aArgs, p_oItem) {
+    configDisabled: function (p_sType, p_aArgs, p_oItem) {
 
         var bDisabled = p_aArgs[0],
             oConfig = this.cfg,
-            oAnchor = this._oAnchor;
+            oSubmenu = oConfig.getProperty("submenu"),
+            bChecked = oConfig.getProperty("checked"),
+            oElement = this.element,
+            oAnchor = this._oAnchor,
+            sState = "-disabled",
+            sCheckedState = "-checked" + sState,
+            sSubmenuState = "-hassubmenu" + sState,
+            sClassName = this.CSS_CLASS_NAME + sState,
+            sLabelClassName = this.CSS_LABEL_CLASS_NAME + sState,
+            sCheckedClassName = this.CSS_CLASS_NAME + sCheckedState,
+            sLabelCheckedClassName = this.CSS_LABEL_CLASS_NAME + sCheckedState,
+            sSubmenuClassName = this.CSS_CLASS_NAME + sSubmenuState,
+            sLabelSubmenuClassName = this.CSS_LABEL_CLASS_NAME + sSubmenuState;
 
 
-        if(bDisabled) {
+        if (bDisabled) {
 
-            if(oConfig.getProperty("selected")) {
+            if (oConfig.getProperty("selected")) {
 
                 oConfig.setProperty("selected", false);
 
             }
 
-            oAnchor.removeAttribute("href");
+            Dom.addClass(oElement, sClassName);
+            Dom.addClass(oAnchor, sLabelClassName);
 
-            Dom.addClass(oAnchor, "disabled");
 
+            if (oSubmenu) {
+
+                Dom.addClass(oElement, sSubmenuClassName);
+                Dom.addClass(oAnchor, sLabelSubmenuClassName);
+            
+            }
+            
+
+            if (bChecked) {
+
+                Dom.addClass(oElement, sCheckedClassName);
+                Dom.addClass(oAnchor, sLabelCheckedClassName);
+
+            }
+
         }
         else {
 
-            oAnchor.setAttribute("href", oConfig.getProperty("url"));
+            Dom.removeClass(oElement, sClassName);
+            Dom.removeClass(oAnchor, sLabelClassName);
 
-            Dom.removeClass(oAnchor, "disabled");
 
+            if (oSubmenu) {
+
+                Dom.removeClass(oElement, sSubmenuClassName);
+                Dom.removeClass(oAnchor, sLabelSubmenuClassName);
+            
+            }
+            
+
+            if (bChecked) {
+
+                Dom.removeClass(oElement, sCheckedClassName);
+                Dom.removeClass(oAnchor, sLabelCheckedClassName);
+
+            }
+
         }
 
     },
@@ -6942,62 +7045,84 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */    
-    configSelected: function(p_sType, p_aArgs, p_oItem) {
+    configSelected: function (p_sType, p_aArgs, p_oItem) {
 
-        var bSelected,
-            oAnchor;
+        var oConfig = this.cfg,
+            bSelected = p_aArgs[0],
+            oElement = this.element,
+            oAnchor = this._oAnchor,
+            bChecked = oConfig.getProperty("checked"),
+            oSubmenu = oConfig.getProperty("submenu"),
+            sState = "-selected",
+            sCheckedState = "-checked" + sState,
+            sSubmenuState = "-hassubmenu" + sState,
+            sClassName = this.CSS_CLASS_NAME + sState,
+            sLabelClassName = this.CSS_LABEL_CLASS_NAME + sState,
+            sCheckedClassName = this.CSS_CLASS_NAME + sCheckedState,
+            sLabelCheckedClassName = this.CSS_LABEL_CLASS_NAME + sCheckedState,
+            sSubmenuClassName = this.CSS_CLASS_NAME + sSubmenuState,
+            sLabelSubmenuClassName = this.CSS_LABEL_CLASS_NAME + sSubmenuState;
 
-        if(!this.cfg.getProperty("disabled")) {
 
-            bSelected = p_aArgs[0];
-            oAnchor = this._oAnchor;
+        if (YAHOO.env.ua.opera) {
 
-            if (YAHOO.env.ua.opera) {
+            oAnchor.blur();
+        
+        }
 
-                oAnchor.blur();
+
+        if (bSelected && !oConfig.getProperty("disabled")) {
+
+            Dom.addClass(oElement, sClassName);
+            Dom.addClass(oAnchor, sLabelClassName);
+
+
+            if (oSubmenu) {
+
+                Dom.addClass(oElement, sSubmenuClassName);
+                Dom.addClass(oAnchor, sLabelSubmenuClassName);
             
             }
 
-            if(bSelected) {
-    
-                Dom.addClass(oAnchor, "selected");
-    
-            }
-            else {
-    
-                Dom.removeClass(oAnchor, "selected");
-    
-            }
 
-            if (this.hasFocus() && YAHOO.env.ua.opera) {
-            
-                oAnchor.focus();
-            
+            if (bChecked) {
+
+                Dom.addClass(oElement, sCheckedClassName);
+                Dom.addClass(oAnchor, sLabelCheckedClassName);
+
             }
 
         }
+        else {
 
-    },
+            Dom.removeClass(oElement, sClassName);
+            Dom.removeClass(oAnchor, sLabelClassName);
 
 
-    /**
-    * @method _onSubmenuShow
-    * @description "show" event handler for a submenu.
-    * @private
-    * @param {String} p_sType String representing the name of the event that 
-    * was fired.
-    * @param {Array} p_aArgs Array of arguments sent when the event was fired.
-    */
-    _onSubmenuShow: function (p_sType, p_aArgs) {
+            if (oSubmenu) {
 
-        var oTextNode = this.submenuIndicator.firstChild;
+                Dom.removeClass(oElement, sSubmenuClassName);
+                Dom.removeClass(oAnchor, sLabelSubmenuClassName);
+            
+            }
+
         
-        if (oTextNode) {
+            if (bChecked) {
 
-            oTextNode.nodeValue = this.EXPANDED_SUBMENU_INDICATOR_TEXT;
+                Dom.removeClass(oElement, sCheckedClassName);
+                Dom.removeClass(oAnchor, sLabelCheckedClassName);
 
+            }
+
         }
 
+
+        if (this.hasFocus() && YAHOO.env.ua.opera) {
+        
+            oAnchor.focus();
+        
+        }
+
     },
 
 
@@ -7020,7 +7145,8 @@
             oMenu.beforeHideEvent.unsubscribe(onHide);
         
         }
-    
+
+
         if (oItem.hasFocus()) {
 
             oMenu = oItem.parent;
@@ -7030,29 +7156,8 @@
         }
     
     },
-    
 
-    /**
-    * @method _onSubmenuHide
-    * @description "hide" Custom Event handler for a submenu.
-    * @private
-    * @param {String} p_sType String representing the name of the event that 
-    * was fired.
-    * @param {Array} p_aArgs Array of arguments sent when the event was fired.
-    */
-    _onSubmenuHide: function (p_sType, p_aArgs) {
 
-        var oTextNode = this.submenuIndicator.firstChild;
-        
-        if (oTextNode) {
-
-            oTextNode.nodeValue = this.COLLAPSED_SUBMENU_INDICATOR_TEXT;
-
-        }
-
-    },
-
-
     /**
     * @method configSubmenu
     * @description Event handler for when the "submenu" configuration property 
@@ -7063,28 +7168,31 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */
-    configSubmenu: function(p_sType, p_aArgs, p_oItem) {
+    configSubmenu: function (p_sType, p_aArgs, p_oItem) {
 
-        var oAnchor = this._oAnchor,
-            oSubmenu = p_aArgs[0],
-            oSubmenuIndicator = this.submenuIndicator,
+        var oSubmenu = p_aArgs[0],
             oConfig = this.cfg,
+            oElement = this.element,
+            oAnchor = this._oAnchor,
             bLazyLoad = this.parent && this.parent.lazyLoad,
+            sState = "-hassubmenu",
+            sClassName = this.CSS_CLASS_NAME + sState,
+            sLabelClassName = this.CSS_LABEL_CLASS_NAME + sState,
             oMenu,
             sSubmenuId,
             oSubmenuConfig;
 
 
-        if(oSubmenu) {
+        if (oSubmenu) {
 
-            if(oSubmenu instanceof Menu) {
+            if (oSubmenu instanceof Menu) {
 
                 oMenu = oSubmenu;
                 oMenu.parent = this;
                 oMenu.lazyLoad = bLazyLoad;
 
             }
-            else if(typeof oSubmenu == "object" && oSubmenu.id && 
+            else if (typeof oSubmenu == "object" && oSubmenu.id && 
                 !oSubmenu.nodeType) {
 
                 sSubmenuId = oSubmenu.id;
@@ -7098,7 +7206,7 @@
 
                 // Set the value of the property to the Menu instance
 
-                this.cfg.setProperty("submenu", oMenu, true);
+                oConfig.setProperty("submenu", oMenu, true);
 
             }
             else {
@@ -7109,20 +7217,18 @@
 
                 // Set the value of the property to the Menu instance
                 
-                this.cfg.setProperty("submenu", oMenu, true);
+                oConfig.setProperty("submenu", oMenu, true);
 
             }
 
 
-            if(oMenu) {
+            if (oMenu) {
 
-                Dom.addClass(oAnchor, "hassubmenu");
+                Dom.addClass(oElement, sClassName);
+                Dom.addClass(oAnchor, sLabelClassName);
 
                 this._oSubmenu = oMenu;
-                
-                oMenu.showEvent.subscribe(this._onSubmenuShow, null, this);
-                oMenu.hideEvent.subscribe(this._onSubmenuHide, null, this);
-            
+
                 if (YAHOO.env.ua.opera) {
                 
                     oMenu.beforeHideEvent.subscribe(this._onSubmenuBeforeHide);               
@@ -7134,24 +7240,31 @@
         }
         else {
 
-            Dom.removeClass(oAnchor, "hassubmenu");
+            Dom.removeClass(oElement, sClassName);
+            Dom.removeClass(oAnchor, sLabelClassName);
 
-            if(oSubmenuIndicator) {
+            if (this._oSubmenu) {
 
-                oAnchor.removeChild(oSubmenuIndicator);
+                this._oSubmenu.destroy();
 
             }
 
-            if(this._oSubmenu) {
+        }
 
-                this._oSubmenu.destroy();
 
-            }
+        if (oConfig.getProperty("disabled")) {
 
+            oConfig.refireEvent("disabled");
+
         }
-        
-        oConfig.refireEvent("text");
 
+
+        if (oConfig.getProperty("selected")) {
+
+            oConfig.refireEvent("selected");
+
+        }
+
     },
 
 
@@ -7165,7 +7278,7 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */
-    configOnClick: function(p_sType, p_aArgs, p_oItem) {
+    configOnClick: function (p_sType, p_aArgs, p_oItem) {
 
         var oObject = p_aArgs[0];
 
@@ -7174,7 +7287,7 @@
             already been specified.
         */
 
-        if(this._oOnclickAttributeValue && 
+        if (this._oOnclickAttributeValue && 
             (this._oOnclickAttributeValue != oObject)) {
 
             this.clickEvent.unsubscribe(this._oOnclickAttributeValue.fn, 
@@ -7185,7 +7298,7 @@
         }
 
 
-        if(!this._oOnclickAttributeValue && typeof oObject == "object" && 
+        if (!this._oOnclickAttributeValue && typeof oObject == "object" && 
             typeof oObject.fn == "function") {
             
             this.clickEvent.subscribe(oObject.fn, 
@@ -7209,11 +7322,11 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */
-    configClassName: function(p_sType, p_aArgs, p_oItem) {
+    configClassName: function (p_sType, p_aArgs, p_oItem) {
     
         var sClassName = p_aArgs[0];
     
-        if(this._sClassName) {
+        if (this._sClassName) {
     
             Dom.removeClass(this.element, this._sClassName);
     
@@ -7233,7 +7346,7 @@
     * @method initDefaultConfig
 	* @description Initializes an item's configurable properties.
 	*/
-	initDefaultConfig : function() {
+	initDefaultConfig : function () {
 
         var oConfig = this.cfg;
 
@@ -7273,7 +7386,11 @@
         */
         oConfig.addProperty(
             DEFAULT_CONFIG.HELP_TEXT.key,
-            { handler: this.configHelpText }
+            {
+                handler: this.configHelpText, 
+                supercedes: DEFAULT_CONFIG.HELP_TEXT.supercedes,
+                suppressEvent: DEFAULT_CONFIG.HELP_TEXT.suppressEvent 
+            }
         );
 
 
@@ -7331,7 +7448,8 @@
                 handler: this.configEmphasis, 
                 value: DEFAULT_CONFIG.EMPHASIS.value, 
                 validator: DEFAULT_CONFIG.EMPHASIS.validator, 
-                suppressEvent: DEFAULT_CONFIG.EMPHASIS.suppressEvent 
+                suppressEvent: DEFAULT_CONFIG.EMPHASIS.suppressEvent,
+                supercedes: DEFAULT_CONFIG.EMPHASIS.supercedes
             }
         );
 
@@ -7352,7 +7470,8 @@
                 handler: this.configStrongEmphasis,
                 value: DEFAULT_CONFIG.STRONG_EMPHASIS.value,
                 validator: DEFAULT_CONFIG.STRONG_EMPHASIS.validator,
-                suppressEvent: DEFAULT_CONFIG.STRONG_EMPHASIS.suppressEvent
+                suppressEvent: DEFAULT_CONFIG.STRONG_EMPHASIS.suppressEvent,
+                supercedes: DEFAULT_CONFIG.STRONG_EMPHASIS.supercedes
             }
         );
 
@@ -7431,7 +7550,11 @@
         */
         oConfig.addProperty(
             DEFAULT_CONFIG.SUBMENU.key, 
-            { handler: this.configSubmenu }
+            {
+                handler: this.configSubmenu, 
+                supercedes: DEFAULT_CONFIG.SUBMENU.supercedes,
+                suppressEvent: DEFAULT_CONFIG.SUBMENU.suppressEvent
+            }
         );
 
 
@@ -7449,7 +7572,10 @@
         */
         oConfig.addProperty(
             DEFAULT_CONFIG.ONCLICK.key, 
-            { handler: this.configOnClick }
+            {
+                handler: this.configOnClick, 
+                suppressEvent: DEFAULT_CONFIG.ONCLICK.suppressEvent 
+            }
         );
 
 
@@ -7467,7 +7593,8 @@
             { 
                 handler: this.configClassName,
                 value: DEFAULT_CONFIG.CLASS_NAME.value, 
-                validator: DEFAULT_CONFIG.CLASS_NAME.validator
+                validator: DEFAULT_CONFIG.CLASS_NAME.validator,
+                suppressEvent: DEFAULT_CONFIG.CLASS_NAME.suppressEvent 
             }
         );
 
@@ -7479,7 +7606,7 @@
     * @description Finds the menu item's next enabled sibling.
     * @return YAHOO.widget.MenuItem
     */
-    getNextEnabledSibling: function() {
+    getNextEnabledSibling: function () {
 
         var nGroupIndex,
             aItemGroups,
@@ -7494,13 +7621,13 @@
 
         }
 
-        if(this.parent instanceof Menu) {
+        if (this.parent instanceof Menu) {
 
             nGroupIndex = this.groupIndex;
     
             aItemGroups = this.parent.getItemGroups();
     
-            if(this.index < (aItemGroups[nGroupIndex].length - 1)) {
+            if (this.index < (aItemGroups[nGroupIndex].length - 1)) {
     
                 oNextItem = getNextArrayItem(aItemGroups[nGroupIndex], 
                         (this.index+1));
@@ -7508,7 +7635,7 @@
             }
             else {
     
-                if(nGroupIndex < (aItemGroups.length - 1)) {
+                if (nGroupIndex < (aItemGroups.length - 1)) {
     
                     nNextGroupIndex = nGroupIndex + 1;
     
@@ -7541,7 +7668,7 @@
     * @description Finds the menu item's previous enabled sibling.
     * @return {YAHOO.widget.MenuItem}
     */
-    getPreviousEnabledSibling: function() {
+    getPreviousEnabledSibling: function () {
 
         var nGroupIndex,
             aItemGroups,
@@ -7563,13 +7690,13 @@
 
         }
 
-       if(this.parent instanceof Menu) {
+       if (this.parent instanceof Menu) {
 
             nGroupIndex = this.groupIndex;
             aItemGroups = this.parent.getItemGroups();
 
     
-            if(this.index > getFirstItemIndex(aItemGroups[nGroupIndex], 0)) {
+            if (this.index > getFirstItemIndex(aItemGroups[nGroupIndex], 0)) {
     
                 oPreviousItem = getPreviousArrayItem(aItemGroups[nGroupIndex], 
                         (this.index-1));
@@ -7577,7 +7704,7 @@
             }
             else {
     
-                if(nGroupIndex > getFirstItemIndex(aItemGroups, 0)) {
+                if (nGroupIndex > getFirstItemIndex(aItemGroups, 0)) {
     
                     nPreviousGroupIndex = nGroupIndex - 1;
     
@@ -7610,7 +7737,7 @@
     * @description Causes the menu item to receive the focus and fires the 
     * focus event.
     */
-    focus: function() {
+    focus: function () {
 
         var oParent = this.parent,
             oAnchor = this._oAnchor,
@@ -7628,7 +7755,15 @@
                 
                 }
 
+                if (oActiveItem) {
+    
+                    oActiveItem.blurEvent.fire();
+    
+                }
+
                 oAnchor.focus();
+                
+                me.focusEvent.fire();
 
             }
             catch(e) {
@@ -7638,17 +7773,11 @@
         }
 
 
-        if(!this.cfg.getProperty("disabled") && oParent && 
+        if (!this.cfg.getProperty("disabled") && oParent && 
             oParent.cfg.getProperty("visible") && 
             this.element.style.display != "none") {
 
-            if(oActiveItem) {
 
-                oActiveItem.blur();
-
-            }
-
-
             /*
                 Setting focus via a timer fixes a race condition in Firefox, IE 
                 and Opera where the browser viewport jumps as it trys to 
@@ -7656,8 +7785,6 @@
             */
 
             window.setTimeout(setFocus, 0);
-            
-            this.focusEvent.fire();
 
         }
 
@@ -7669,24 +7796,30 @@
     * @description Causes the menu item to lose focus and fires the 
     * blur event.
     */    
-    blur: function() {
+    blur: function () {
 
         var oParent = this.parent;
 
-        if(!this.cfg.getProperty("disabled") && oParent && 
+        if (!this.cfg.getProperty("disabled") && oParent && 
             oParent.cfg.getProperty("visible")) {
 
-            try {
 
-                this._oAnchor.blur();
+            var me = this;
             
-            }
-            catch (e) {
-            
-            }
+            window.setTimeout(function () {
 
-            this.blurEvent.fire();
+                try {
+    
+                    me._oAnchor.blur();
+                    me.blurEvent.fire();    
 
+                } 
+                catch (e) {
+                
+                }
+                
+            }, 0);
+
         }
 
     },
@@ -7698,7 +7831,7 @@
     * has focus.
     * @return {Boolean}
     */
-    hasFocus: function() {
+    hasFocus: function () {
     
         return (YAHOO.widget.MenuManager.getFocusedMenuItem() == this);
     
@@ -7710,20 +7843,20 @@
 	* @description Removes the menu item's <code><li></code> element 
 	* from its parent <code><ul></code> element.
 	*/
-    destroy: function() {
+    destroy: function () {
 
         var oEl = this.element,
             oSubmenu,
             oParentNode;
 
-        if(oEl) {
+        if (oEl) {
 
 
             // If the item has a submenu, destroy it first
 
             oSubmenu = this.cfg.getProperty("submenu");
 
-            if(oSubmenu) {
+            if (oSubmenu) {
             
                 oSubmenu.destroy();
             
@@ -7749,7 +7882,7 @@
 
             oParentNode = oEl.parentNode;
 
-            if(oParentNode) {
+            if (oParentNode) {
 
                 oParentNode.removeChild(oEl);
 
@@ -7769,12 +7902,12 @@
     * @description Returns a string representing the menu item.
     * @return {String}
     */
-    toString: function() {
+    toString: function () {
 
         var sReturnVal = "MenuItem",
             sId = this.id;
 
-        if(sId) {
+        if (sId) {
     
             sReturnVal += (" " + sId);
         
@@ -7823,16 +7956,19 @@
 
 };
 
+
 var Event = YAHOO.util.Event,
     ContextMenu = YAHOO.widget.ContextMenu,
 
-/**
-* Constant representing the name of the ContextMenu's events
-* @property EVENT_TYPES
-* @private
-* @final
-* @type Object
-*/
+
+
+    /**
+    * Constant representing the name of the ContextMenu's events
+    * @property EVENT_TYPES
+    * @private
+    * @final
+    * @type Object
+    */
     EVENT_TYPES = {
 
         "TRIGGER_CONTEXT_MENU": "triggerContextMenu",
@@ -7852,12 +7988,31 @@
     DEFAULT_CONFIG = {
     
         "TRIGGER": { 
-            key: "trigger" 
+            key: "trigger",
+            suppressEvent: true
         }
     
     };
 
 
+/**
+* @method position
+* @description "beforeShow" event handler used to position the contextmenu.
+* @private
+* @param {String} p_sType String representing the name of the event that 
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {Array} p_aPos Array representing the xy position for the context menu.
+*/
+function position(p_sType, p_aArgs, p_aPos) {
+
+    this.cfg.setProperty("xy", p_aPos);
+    
+    this.beforeShowEvent.unsubscribe(position, p_aPos);
+
+}
+
+
 YAHOO.lang.extend(ContextMenu, YAHOO.widget.Menu, {
 
 
@@ -7941,13 +8096,7 @@
 */
 init: function(p_oElement, p_oConfig) {
 
-    if(!this.ITEM_TYPE) {
 
-        this.ITEM_TYPE = YAHOO.widget.ContextMenuItem;
-
-    }
-
-
     // Call the init of the superclass (YAHOO.widget.Menu)
 
     ContextMenu.superclass.init.call(this, p_oElement);
@@ -8036,6 +8185,7 @@
 // Private event handlers
 
 
+
 /**
 * @method _onTriggerClick
 * @description "click" event handler for the HTML element(s) identified as the 
@@ -8069,13 +8219,16 @@
 */
 _onTriggerContextMenu: function(p_oEvent, p_oMenu) {
 
-    if(p_oEvent.type == "mousedown" && !p_oEvent.ctrlKey) {
+    if (p_oEvent.type == "mousedown" && !p_oEvent.ctrlKey) {
 
         return;
 
     }
 
 
+    var aXY;
+
+
     /*
         Prevent the browser's default context menu from appearing and 
         stop the propagation of the "contextmenu" event so that 
@@ -8085,22 +8238,36 @@
     Event.stopEvent(p_oEvent);
 
 
-    // Hide any other ContextMenu instances that might be visible
+    this.contextEventTarget = Event.getTarget(p_oEvent);
 
-    YAHOO.widget.MenuManager.hideVisible();
+    this.triggerContextMenuEvent.fire(p_oEvent);
 
 
-    this.contextEventTarget = Event.getTarget(p_oEvent);
+    // Hide any other Menu instances that might be visible
 
-    this.triggerContextMenuEvent.fire(p_oEvent);
+    YAHOO.widget.MenuManager.hideVisible();
+    
 
 
     if(!this._bCancelled) {
 
         // Position and display the context menu
-    
-        this.cfg.setProperty("xy", Event.getXY(p_oEvent));
 
+        aXY = Event.getXY(p_oEvent);
+
+
+        if (!YAHOO.util.Dom.inDocument(this.element)) {
+
+            this.beforeShowEvent.subscribe(position, aXY);
+
+        }
+        else {
+
+            this.cfg.setProperty("xy", aXY);
+        
+        }
+
+
         this.show();
 
     }
@@ -8155,7 +8322,11 @@
     * level-one-html.html#ID-58190037">HTMLElement</a>|Array
     */
     this.cfg.addProperty(DEFAULT_CONFIG.TRIGGER.key, 
-        { handler: this.configTrigger });
+        {
+            handler: this.configTrigger, 
+            suppressEvent: DEFAULT_CONFIG.TRIGGER.suppressEvent 
+        }
+    );
 
 },
 
@@ -8170,8 +8341,8 @@
     // Remove the DOM event handlers from the current trigger(s)
 
     this._removeEventHandlers();
-    
 
+
     // Continue with the superclass implementation of this method
 
     ContextMenu.superclass.destroy.call(this);
@@ -8269,93 +8440,10 @@
 * @class ContextMenuItem
 * @constructor
 * @extends YAHOO.widget.MenuItem
+* @deprecated As of version 2.4.0 items for YAHOO.widget.ContextMenu instances
+* are of type YAHOO.widget.MenuItem.
 */
-YAHOO.widget.ContextMenuItem = function(p_oObject, p_oConfig) {
-
-    YAHOO.widget.ContextMenuItem.superclass.constructor.call(this, 
-        p_oObject, p_oConfig);
-
-};
-
-YAHOO.lang.extend(YAHOO.widget.ContextMenuItem, YAHOO.widget.MenuItem, {
-
-
-/**
-* @method init
-* @description The ContextMenuItem class's initialization method. This method 
-* is automatically called by the constructor, and sets up all DOM references 
-* for pre-existing markup, and creates required markup if it is not 
-* already present.
-* @param {String} p_oObject String specifying the text of the context menu item.
-* @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
-* one-html.html#ID-74680021">HTMLLIElement</a>} p_oObject Object specifying the 
-* <code><li></code> element of the context menu item.
-* @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
-* one-html.html#ID-38450247">HTMLOptGroupElement</a>} p_oObject Object 
-* specifying the <code><optgroup></code> element of the context 
-* menu item.
-* @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
-* one-html.html#ID-70901257">HTMLOptionElement</a>} p_oObject Object specifying 
-* the <code><option></code> element of the context menu item.
-* @param {Object} p_oConfig Optional. Object literal specifying the 
-* configuration for the context menu item. See configuration class 
-* documentation for more details.
-*/
-init: function(p_oObject, p_oConfig) {
-    
-    if(!this.SUBMENU_TYPE) {
-
-        this.SUBMENU_TYPE = YAHOO.widget.ContextMenu;
-
-    }
-
-
-    /* 
-        Call the init of the superclass (YAHOO.widget.MenuItem)
-        Note: We don't pass the user config in here yet 
-        because we only want it executed once, at the lowest 
-        subclass level.
-    */ 
-
-    YAHOO.widget.ContextMenuItem.superclass.init.call(this, p_oObject);
-
-    var oConfig = this.cfg;
-
-    if(p_oConfig) {
-
-        oConfig.applyConfig(p_oConfig, true);
-
-    }
-
-    oConfig.fireQueue();
-
-},
-
-
-
-// Public methods
-
-
-/**
-* @method toString
-* @description Returns a string representing the context menu item.
-* @return {String}
-*/
-toString: function() {
-
-    var sReturnVal = "ContextMenuItem";
-
-    if(this.cfg && this.cfg.getProperty("text")) {
-
-        sReturnVal += (": " + this.cfg.getProperty("text"));
-
-    }
-
-    return sReturnVal;
-
-}
-    
-}); // END YAHOO.lang.extend
+YAHOO.widget.ContextMenuItem = YAHOO.widget.MenuItem;
 (function () {
 
 
@@ -8410,7 +8498,6 @@
 
 
 var Event = YAHOO.util.Event,
-    Dom = YAHOO.util.Dom,
     MenuBar = YAHOO.widget.MenuBar,
 
     /**
@@ -8431,13 +8518,15 @@
     
         "SUBMENU_ALIGNMENT": { 
             key: "submenualignment", 
-            value: ["tl","bl"] 
+            value: ["tl","bl"],
+            suppressEvent: true 
         },
     
         "AUTO_SUBMENU_DISPLAY": { 
             key: "autosubmenudisplay", 
             value: false, 
-            validator: YAHOO.lang.isBoolean 
+            validator: YAHOO.lang.isBoolean,
+            suppressEvent: true
         }
     
     };
@@ -8692,7 +8781,7 @@
         oSubmenu = oItem.cfg.getProperty("submenu");
 
 
-        if(oSubmenu && oTarget != oItem.submenuIndicator) {
+        if(oSubmenu) {
         
             if(oSubmenu.cfg.getProperty("visible")) {
             
@@ -8794,7 +8883,8 @@
     oConfig.addProperty(
         DEFAULT_CONFIG.SUBMENU_ALIGNMENT.key, 
         {
-            value: DEFAULT_CONFIG.SUBMENU_ALIGNMENT.value
+            value: DEFAULT_CONFIG.SUBMENU_ALIGNMENT.value,
+            suppressEvent: DEFAULT_CONFIG.SUBMENU_ALIGNMENT.suppressEvent
         }
     );
 
@@ -8815,7 +8905,8 @@
 	   DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.key, 
 	   {
 	       value: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.value, 
-	       validator: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.validator
+	       validator: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.validator,
+	       suppressEvent: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.suppressEvent
        } 
     );
 
@@ -8959,4 +9050,4 @@
 }
     
 }); // END YAHOO.lang.extend
-YAHOO.register("menu", YAHOO.widget.Menu, {version: "2.3.1", build: "541"});
+YAHOO.register("menu", YAHOO.widget.Menu, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/menu/menu-min.js
===================================================================
--- trunk/root/static/yui/menu/menu-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/menu/menu-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,15 +2,15 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-(function(){var B=YAHOO.util.Dom,A=YAHOO.util.Event;YAHOO.widget.MenuManager=function(){var N=false,F={},Q={},J={},E={"click":"clickEvent","mousedown":"mouseDownEvent","mouseup":"mouseUpEvent","mouseover":"mouseOverEvent","mouseout":"mouseOutEvent","keydown":"keyDownEvent","keyup":"keyUpEvent","keypress":"keyPressEvent"},K=null;function D(S){var R;if(S&&S.tagName){switch(S.tagName.toUpperCase()){case"DIV":R=S.parentNode;if((B.hasClass(S,"hd")||B.hasClass(S,"bd")||B.hasClass(S,"ft"))&&R&&R.tagName&&R.tagName.toUpperCase()=="DIV"){return R;}else{return S;}break;case"LI":return S;default:R=S.parentNode;if(R){return D(R);}break;}}}function G(V){var R=A.getTarget(V),S=D(R),X,T,U,Z,Y;if(S){T=S.tagName.toUpperCase();if(T=="LI"){U=S.id;if(U&&J[U]){Z=J[U];Y=Z.parent;}}else{if(T=="DIV"){if(S.id){Y=F[S.id];}}}}if(Y){X=E[V.type];if(Z&&!Z.cfg.getProperty("disabled")){Z[X].fire(V);if(V.type=="keyup"||V.type=="mousedown"){if(K!=Z){if(K){K.blurEvent.fire();}Z.focusEvent.fire();}}}Y[X].fire!
 (V,Z);}else{if(V.type=="mousedown"){if(K){K.blurEvent.fire();K=null;}for(var W in F){if(YAHOO.lang.hasOwnProperty(F,W)){Y=F[W];if(Y.cfg.getProperty("clicktohide")&&!(Y instanceof YAHOO.widget.MenuBar)&&Y.cfg.getProperty("position")=="dynamic"){Y.hide();}else{Y.clearActiveItem(true);}}}}else{if(V.type=="keyup"){if(K){K.blurEvent.fire();K=null;}}}}}function P(S,R,T){if(F[T.id]){this.removeMenu(T);}}function M(S,R){var T=R[0];if(T){K=T;}}function H(S,R){K=null;}function C(T,S){var R=S[0],U=this.id;if(R){Q[U]=this;}else{if(Q[U]){delete Q[U];}}}function L(S,R){O(this);}function O(S){var R=S.id;if(R&&J[R]){if(K==S){K=null;}delete J[R];S.destroyEvent.unsubscribe(L);}}function I(S,R){var U=R[0],T;if(U instanceof YAHOO.widget.MenuItem){T=U.id;if(!J[T]){J[T]=U;U.destroyEvent.subscribe(L);}}}return{addMenu:function(S){var R;if(S instanceof YAHOO.widget.Menu&&S.id&&!F[S.id]){F[S.id]=S;if(!N){R=document;A.on(R,"mouseover",G,this,true);A.on(R,"mouseout",G,this,true);A.on(R,"mousedown",G,!
 this,true);A.on(R,"mouseup",G,this,true);A.on(R,"click",G,this!
 ,true);A
.on(R,"keydown",G,this,true);A.on(R,"keyup",G,this,true);A.on(R,"keypress",G,this,true);N=true;}S.cfg.subscribeToConfigEvent("visible",C);S.destroyEvent.subscribe(P,S,this);S.itemAddedEvent.subscribe(I);S.focusEvent.subscribe(M);S.blurEvent.subscribe(H);}},removeMenu:function(U){var S,R,T;if(U){S=U.id;if(F[S]==U){R=U.getItems();if(R&&R.length>0){T=R.length-1;do{O(R[T]);}while(T--);}delete F[S];if(Q[S]==U){delete Q[S];}if(U.cfg){U.cfg.unsubscribeFromConfigEvent("visible",C);}U.destroyEvent.unsubscribe(P,U);U.itemAddedEvent.unsubscribe(I);U.focusEvent.unsubscribe(M);U.blurEvent.unsubscribe(H);}}},hideVisible:function(){var R;for(var S in Q){if(YAHOO.lang.hasOwnProperty(Q,S)){R=Q[S];if(!(R instanceof YAHOO.widget.MenuBar)&&R.cfg.getProperty("position")=="dynamic"){R.hide();}}}},getMenus:function(){return F;},getMenu:function(S){var R=F[S];if(R){return R;}},getMenuItem:function(R){var S=J[R];if(S){return S;}},getMenuItemGroup:function(U){var S=B.get(U),R,W,V,T;if(S&&S.tagName&&S!
 .tagName.toUpperCase()=="UL"){W=S.firstChild;if(W){R=[];do{T=W.id;if(T){V=this.getMenuItem(T);if(V){R[R.length]=V;}}}while((W=W.nextSibling));if(R.length>0){return R;}}}},getFocusedMenuItem:function(){return K;},getFocusedMenu:function(){if(K){return(K.parent.getRoot());}},toString:function(){return"MenuManager";}};}();})();(function(){YAHOO.widget.Menu=function(O,N){if(N){this.parent=N.parent;this.lazyLoad=N.lazyLoad||N.lazyload;this.itemData=N.itemData||N.itemdata;}YAHOO.widget.Menu.superclass.constructor.call(this,O,N);};function I(N){if(typeof N=="string"){return("dynamic,static".indexOf((N.toLowerCase()))!=-1);}}var C=YAHOO.util.Dom,M=YAHOO.util.Event,D=YAHOO.widget.Module,B=YAHOO.widget.Overlay,F=YAHOO.widget.Menu,K=YAHOO.widget.MenuManager,L=YAHOO.util.CustomEvent,E=YAHOO.lang,H=YAHOO.env.ua,G,A={"MOUSE_OVER":"mouseover","MOUSE_OUT":"mouseout","MOUSE_DOWN":"mousedown","MOUSE_UP":"mouseup","CLICK":"click","KEY_PRESS":"keypress","KEY_DOWN":"keydown","KEY_UP":"keyup","F!
 OCUS":"focus","BLUR":"blur","ITEM_ADDED":"itemAdded","ITEM_REM!
 OVED":"i
temRemoved"},J={"VISIBLE":{key:"visible",value:false,validator:E.isBoolean},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:true,validator:E.isBoolean,supercedes:["iframe","x","y","xy"]},"POSITION":{key:"position",value:"dynamic",validator:I,supercedes:["visible","iframe"]},"SUBMENU_ALIGNMENT":{key:"submenualignment",value:["tl","tr"]},"AUTO_SUBMENU_DISPLAY":{key:"autosubmenudisplay",value:true,validator:E.isBoolean},"SHOW_DELAY":{key:"showdelay",value:250,validator:E.isNumber},"HIDE_DELAY":{key:"hidedelay",value:0,validator:E.isNumber,suppressEvent:true},"SUBMENU_HIDE_DELAY":{key:"submenuhidedelay",value:250,validator:E.isNumber},"CLICK_TO_HIDE":{key:"clicktohide",value:true,validator:E.isBoolean},"CONTAINER":{key:"container"},"MAX_HEIGHT":{key:"maxheight",value:0,validator:E.isNumber,supercedes:["iframe"]},"CLASS_NAME":{key:"classname",value:null,validator:E.isString},"DISABLED":{key:"disabled",value:false,validator:E.isBoolean,suppressEvent:true}};YAHOO.lang.exte!
 nd(F,B,{CSS_CLASS_NAME:"yuimenu",ITEM_TYPE:null,GROUP_TITLE_TAG_NAME:"h6",_nHideDelayId:null,_nShowDelayId:null,_nSubmenuHideDelayId:null,_nBodyScrollId:null,_bHideDelayEventHandlersAssigned:false,_bHandledMouseOverEvent:false,_bHandledMouseOutEvent:false,_aGroupTitleElements:null,_aItemGroups:null,_aListElements:null,_nCurrentMouseX:0,_nMaxHeight:-1,_bStopMouseEventHandlers:false,_sClassName:null,lazyLoad:false,itemData:null,activeItem:null,parent:null,srcElement:null,mouseOverEvent:null,mouseOutEvent:null,mouseDownEvent:null,mouseUpEvent:null,clickEvent:null,keyPressEvent:null,keyDownEvent:null,keyUpEvent:null,itemAddedEvent:null,itemRemovedEvent:null,init:function(P,O){this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuItem;}var N;if(typeof P=="string"){N=document.getElementById(P);}else{if(P.tagName){N=P;}}if(N&&N.tagName){switch(N.tagName.toUpperCase()){case"DIV":this.srcElement=N;
-if(!N.id){N.setAttribute("id",C.generateId());}F.superclass.init.call(this,N);this.beforeInitEvent.fire(F);break;case"SELECT":this.srcElement=N;F.superclass.init.call(this,C.generateId());this.beforeInitEvent.fire(F);break;}}else{F.superclass.init.call(this,P);this.beforeInitEvent.fire(F);}if(this.element){C.addClass(this.element,this.CSS_CLASS_NAME);this.initEvent.subscribe(this._onInit);this.beforeRenderEvent.subscribe(this._onBeforeRender);this.renderEvent.subscribe(this._onRender);this.renderEvent.subscribe(this.onRender);this.beforeShowEvent.subscribe(this._onBeforeShow);this.showEvent.subscribe(this._onShow);this.beforeHideEvent.subscribe(this._onBeforeHide);this.hideEvent.subscribe(this._onHide);this.mouseOverEvent.subscribe(this._onMouseOver);this.mouseOutEvent.subscribe(this._onMouseOut);this.clickEvent.subscribe(this._onClick);this.keyDownEvent.subscribe(this._onKeyDown);this.keyPressEvent.subscribe(this._onKeyPress);if(O){this.cfg.applyConfig(O,true);}K.addMenu(t!
 his);this.initEvent.fire(F);}},_initSubTree:function(){var O=this.srcElement,N,Q,T,U,S,R,P;if(O){N=(O.tagName&&O.tagName.toUpperCase());if(N=="DIV"){U=this.body.firstChild;if(U){Q=0;T=this.GROUP_TITLE_TAG_NAME.toUpperCase();do{if(U&&U.tagName){switch(U.tagName.toUpperCase()){case T:this._aGroupTitleElements[Q]=U;break;case"UL":this._aListElements[Q]=U;this._aItemGroups[Q]=[];Q++;break;}}}while((U=U.nextSibling));if(this._aListElements[0]){C.addClass(this._aListElements[0],"first-of-type");}}}U=null;if(N){switch(N){case"DIV":S=this._aListElements;R=S.length;if(R>0){P=R-1;do{U=S[P].firstChild;if(U){do{if(U&&U.tagName&&U.tagName.toUpperCase()=="LI"){this.addItem(new this.ITEM_TYPE(U,{parent:this}),P);}}while((U=U.nextSibling));}}while(P--);}break;case"SELECT":U=O.firstChild;do{if(U&&U.tagName){switch(U.tagName.toUpperCase()){case"OPTGROUP":case"OPTION":this.addItem(new this.ITEM_TYPE(U,{parent:this}));break;}}}while((U=U.nextSibling));break;}}}},_getFirstEnabledItem:function()!
 {var N=this.getItems(),Q=N.length,P;for(var O=0;O<Q;O++){P=N[O!
 ];if(P&&
!P.cfg.getProperty("disabled")&&P.element.style.display!="none"){return P;}}},_addItemToGroup:function(T,U,X){var V,P=this.cfg.getProperty("disabled"),Y,R,W,S,O,Q;function N(Z,a){return(Z[a]||N(Z,(a+1)));}if(U instanceof this.ITEM_TYPE){V=U;V.parent=this;}else{if(typeof U=="string"){V=new this.ITEM_TYPE(U,{parent:this});}else{if(typeof U=="object"){U.parent=this;V=new this.ITEM_TYPE(U.text,U);}}}if(V){if(V.cfg.getProperty("selected")){this.activeItem=V;}Y=typeof T=="number"?T:0;R=this._getItemGroup(Y);if(!R){R=this._createItemGroup(Y);}if(typeof X=="number"){S=(X>=R.length);if(R[X]){R.splice(X,0,V);}else{R[X]=V;}W=R[X];if(W){if(S&&(!W.element.parentNode||W.element.parentNode.nodeType==11)){this._aListElements[Y].appendChild(W.element);}else{O=N(R,(X+1));if(O&&(!W.element.parentNode||W.element.parentNode.nodeType==11)){this._aListElements[Y].insertBefore(W.element,O.element);}}W.parent=this;this._subscribeToItemEvents(W);this._configureSubmenu(W);this._updateItemProperties(Y)!
 ;this.itemAddedEvent.fire(W);this.changeContentEvent.fire();return W;}}else{Q=R.length;R[Q]=V;W=R[Q];if(W){if(!C.isAncestor(this._aListElements[Y],W.element)){this._aListElements[Y].appendChild(W.element);}W.element.setAttribute("groupindex",Y);W.element.setAttribute("index",Q);W.parent=this;W.index=Q;W.groupIndex=Y;this._subscribeToItemEvents(W);this._configureSubmenu(W);if(Q===0){C.addClass(W.element,"first-of-type");}this.itemAddedEvent.fire(W);this.changeContentEvent.fire();return W;}}}},_removeItemFromGroupByIndex:function(Q,O){var P=typeof Q=="number"?Q:0,R=this._getItemGroup(P),T,S,N;if(R){T=R.splice(O,1);S=T[0];if(S){this._updateItemProperties(P);if(R.length===0){N=this._aListElements[P];if(this.body&&N){this.body.removeChild(N);}this._aItemGroups.splice(P,1);this._aListElements.splice(P,1);N=this._aListElements[0];if(N){C.addClass(N,"first-of-type");}}this.itemRemovedEvent.fire(S);this.changeContentEvent.fire();return S;}}},_removeItemFromGroupByValue:function(P,N)!
 {var R=this._getItemGroup(P),S,Q,O;if(R){S=R.length;Q=-1;if(S>!
 0){O=S-1
;do{if(R[O]==N){Q=O;break;}}while(O--);if(Q>-1){return(this._removeItemFromGroupByIndex(P,Q));}}}},_updateItemProperties:function(O){var P=this._getItemGroup(O),S=P.length,R,Q,N;if(S>0){N=S-1;do{R=P[N];if(R){Q=R.element;R.index=N;R.groupIndex=O;Q.setAttribute("groupindex",O);Q.setAttribute("index",N);C.removeClass(Q,"first-of-type");}}while(N--);if(Q){C.addClass(Q,"first-of-type");}}},_createItemGroup:function(O){var N;if(!this._aItemGroups[O]){this._aItemGroups[O]=[];N=document.createElement("ul");this._aListElements[O]=N;return this._aItemGroups[O];}},_getItemGroup:function(O){var N=((typeof O=="number")?O:0);return this._aItemGroups[N];},_configureSubmenu:function(N){var O=N.cfg.getProperty("submenu");if(O){this.cfg.configChangedEvent.subscribe(this._onParentMenuConfigChange,O,true);this.renderEvent.subscribe(this._onParentMenuRender,O,true);O.beforeShowEvent.subscribe(this._onSubmenuBeforeShow);}},_subscribeToItemEvents:function(N){N.focusEvent.subscribe(this._onMenuItem!
 Focus);N.blurEvent.subscribe(this._onMenuItemBlur);N.cfg.configChangedEvent.subscribe(this._onMenuItemConfigChange,N,this);},_getOffsetWidth:function(){var P=this.element.cloneNode(true),O=this.getRoot(),N=O.element.parentNode,Q;C.removeClass(P,"visible");C.setStyle(P,"width","");if(N){N.appendChild(P);Q=P.offsetWidth;N.removeChild(P);return Q;}},_setWidth:function(){var O=this.element,N=C.removeClass(O,"visible"),P;if(O.parentNode.tagName.toUpperCase()=="BODY"){if(YAHOO.env.ua.opera){P=this._getOffsetWidth();}else{C.setStyle(O,"width","auto");P=O.offsetWidth;}}else{P=this._getOffsetWidth();}this.cfg.setProperty("width",(P+"px"));if(N){C.addClass(O,"visible");}},_onWidthChange:function(O,N){var P=N[0];if(P&&!this._hasSetWidthHandlers){this.itemAddedEvent.subscribe(this._setWidth);this.itemRemovedEvent.subscribe(this._setWidth);this._hasSetWidthHandlers=true;}else{if(this._hasSetWidthHandlers){this.itemAddedEvent.unsubscribe(this._setWidth);
-this.itemRemovedEvent.unsubscribe(this._setWidth);this._hasSetWidthHandlers=false;}}},_onVisibleChange:function(P,O){var N=O[0];if(N){C.addClass(this.element,"visible");}else{C.removeClass(this.element,"visible");}},_cancelHideDelay:function(){var N=this.getRoot();if(N._nHideDelayId){window.clearTimeout(N._nHideDelayId);}},_execHideDelay:function(){this._cancelHideDelay();var O=this.getRoot(),P=this;function N(){if(O.activeItem){O.clearActiveItem();}if(O==P&&!(P instanceof YAHOO.widget.MenuBar)&&P.cfg.getProperty("position")=="dynamic"){P.hide();}}O._nHideDelayId=window.setTimeout(N,O.cfg.getProperty("hidedelay"));},_cancelShowDelay:function(){var N=this.getRoot();if(N._nShowDelayId){window.clearTimeout(N._nShowDelayId);}},_execShowDelay:function(P){var O=this.getRoot();function N(){if(P.parent.cfg.getProperty("selected")){P.show();}}O._nShowDelayId=window.setTimeout(N,O.cfg.getProperty("showdelay"));},_execSubmenuHideDelay:function(Q,O,N){var P=this;Q._nSubmenuHideDelayId=!
 window.setTimeout(function(){if(P._nCurrentMouseX>(O+10)){Q._nSubmenuHideDelayId=window.setTimeout(function(){Q.hide();},N);}else{Q.hide();}},50);},_disableScrollHeader:function(){if(!this._bHeaderDisabled){C.addClass(this.header,"topscrollbar_disabled");this._bHeaderDisabled=true;}},_disableScrollFooter:function(){if(!this._bFooterDisabled){C.addClass(this.footer,"bottomscrollbar_disabled");this._bFooterDisabled=true;}},_enableScrollHeader:function(){if(this._bHeaderDisabled){C.removeClass(this.header,"topscrollbar_disabled");this._bHeaderDisabled=false;}},_enableScrollFooter:function(){if(this._bFooterDisabled){C.removeClass(this.footer,"bottomscrollbar_disabled");this._bFooterDisabled=false;}},_onMouseOver:function(W,R){if(this._bStopMouseEventHandlers){return false;}var X=R[0],V=R[1],N=M.getTarget(X),O,Q,U,P,T,S;if(!this._bHandledMouseOverEvent&&(N==this.element||C.isAncestor(this.element,N))){this._nCurrentMouseX=0;M.on(this.element,"mousemove",this._onMouseMove,this,t!
 rue);this.clearActiveItem();if(this.parent&&this._nSubmenuHide!
 DelayId)
{window.clearTimeout(this._nSubmenuHideDelayId);this.parent.cfg.setProperty("selected",true);O=this.parent.parent;O._bHandledMouseOutEvent=true;O._bHandledMouseOverEvent=false;}this._bHandledMouseOverEvent=true;this._bHandledMouseOutEvent=false;}if(V&&!V.handledMouseOverEvent&&!V.cfg.getProperty("disabled")&&(N==V.element||C.isAncestor(V.element,N))){Q=this.cfg.getProperty("showdelay");U=(Q>0);if(U){this._cancelShowDelay();}P=this.activeItem;if(P){P.cfg.setProperty("selected",false);}T=V.cfg;T.setProperty("selected",true);if(this.hasFocus()){V.focus();}if(this.cfg.getProperty("autosubmenudisplay")){S=T.getProperty("submenu");if(S){if(U){this._execShowDelay(S);}else{S.show();}}}V.handledMouseOverEvent=true;V.handledMouseOutEvent=false;}},_onMouseOut:function(V,P){if(this._bStopMouseEventHandlers){return false;}var W=P[0],T=P[1],Q=M.getRelatedTarget(W),U=false,S,R,N,O;if(T&&!T.cfg.getProperty("disabled")){S=T.cfg;R=S.getProperty("submenu");if(R&&(Q==R.element||C.isAncestor(R.e!
 lement,Q))){U=true;}if(!T.handledMouseOutEvent&&((Q!=T.element&&!C.isAncestor(T.element,Q))||U)){if(!U){T.cfg.setProperty("selected",false);if(R){N=this.cfg.getProperty("submenuhidedelay");O=this.cfg.getProperty("showdelay");if(!(this instanceof YAHOO.widget.MenuBar)&&N>0&&O>=N){this._execSubmenuHideDelay(R,M.getPageX(W),N);}else{R.hide();}}}T.handledMouseOutEvent=true;T.handledMouseOverEvent=false;}}if(!this._bHandledMouseOutEvent&&((Q!=this.element&&!C.isAncestor(this.element,Q))||U)){M.removeListener(this.element,"mousemove",this._onMouseMove);this._nCurrentMouseX=M.getPageX(W);this._bHandledMouseOutEvent=true;this._bHandledMouseOverEvent=false;}},_onMouseMove:function(O,N){if(this._bStopMouseEventHandlers){return false;}this._nCurrentMouseX=M.getPageX(O);},_onClick:function(U,P){var V=P[0],S=P[1],N,R,Q,T,W,O;if(S&&!S.cfg.getProperty("disabled")){N=M.getTarget(V);R=S.cfg;Q=R.getProperty("submenu");if(N==S.submenuIndicator&&Q){if(Q.cfg.getProperty("visible")){Q.hide();Q.p!
 arent.focus();}else{this.clearActiveItem();R.setProperty("sele!
 cted",tr
ue);Q.show();Q.setInitialFocus();}M.preventDefault(V);}else{T=R.getProperty("url");if((T.substr(0,1)=="#")){M.preventDefault(V);S.focus();}if(!Q){O=this.getRoot();if(O instanceof YAHOO.widget.MenuBar||O.cfg.getProperty("position")=="static"){O.clearActiveItem();}else{if(O.cfg.getProperty("clicktohide")){O.hide();}}}}}},_onKeyDown:function(b,V){var Y=V[0],X=V[1],f=this,U,Z,O,S,c,N,e,R,a,Q,W,d,T;function P(){f._bStopMouseEventHandlers=true;window.setTimeout(function(){f._bStopMouseEventHandlers=false;},10);}if(X&&!X.cfg.getProperty("disabled")){Z=X.cfg;O=this.parent;switch(Y.keyCode){case 38:case 40:c=(Y.keyCode==38)?X.getPreviousEnabledSibling():X.getNextEnabledSibling();if(c){this.clearActiveItem();c.cfg.setProperty("selected",true);c.focus();if(this.cfg.getProperty("maxheight")>0){N=this.body;e=N.scrollTop;R=N.offsetHeight;a=this.getItems();Q=a.length-1;W=c.element.offsetTop;if(Y.keyCode==40){if(W>=(R+e)){N.scrollTop=W-R;}else{if(W<=e){N.scrollTop=0;}}if(c==a[Q]){N.scrollTo!
 p=c.element.offsetTop;}}else{if(W<=e){N.scrollTop=W-c.element.offsetHeight;}else{if(W>=(e+R)){N.scrollTop=W;}}if(c==a[0]){N.scrollTop=0;}}e=N.scrollTop;d=N.scrollHeight-N.offsetHeight;if(e===0){this._disableScrollHeader();this._enableScrollFooter();}else{if(e==d){this._enableScrollHeader();this._disableScrollFooter();}else{this._enableScrollHeader();this._enableScrollFooter();}}}}M.preventDefault(Y);P();break;case 39:U=Z.getProperty("submenu");if(U){if(!Z.getProperty("selected")){Z.setProperty("selected",true);}U.show();U.setInitialFocus();U.setInitialSelection();}else{S=this.getRoot();if(S instanceof YAHOO.widget.MenuBar){c=S.activeItem.getNextEnabledSibling();if(c){S.clearActiveItem();c.cfg.setProperty("selected",true);U=c.cfg.getProperty("submenu");if(U){U.show();}c.focus();}}}M.preventDefault(Y);P();break;case 37:if(O){T=O.parent;if(T instanceof YAHOO.widget.MenuBar){c=T.activeItem.getPreviousEnabledSibling();
-if(c){T.clearActiveItem();c.cfg.setProperty("selected",true);U=c.cfg.getProperty("submenu");if(U){U.show();}c.focus();}}else{this.hide();O.focus();}}M.preventDefault(Y);P();break;}}if(Y.keyCode==27){if(this.cfg.getProperty("position")=="dynamic"){this.hide();if(this.parent){this.parent.focus();}}else{if(this.activeItem){U=this.activeItem.cfg.getProperty("submenu");if(U&&U.cfg.getProperty("visible")){U.hide();this.activeItem.focus();}else{this.activeItem.blur();this.activeItem.cfg.setProperty("selected",false);}}}M.preventDefault(Y);}},_onKeyPress:function(P,O){var N=O[0];if(N.keyCode==40||N.keyCode==38){M.preventDefault(N);}},_onTextResize:function(O,N,P){if(YAHOO.env.ua.gecko&&!this._handleResize){this._handleResize=true;return ;}var Q=this.cfg;if(Q.getProperty("position")=="dynamic"){Q.setProperty("width",(this._getOffsetWidth()+"px"));}},_onScrollTargetMouseOver:function(S,V){this._cancelHideDelay();var P=M.getTarget(S),Q=this.body,U=this,N,O;function T(){var W=Q.scrollT!
 op;if(W<N){Q.scrollTop=(W+1);U._enableScrollHeader();}else{Q.scrollTop=N;window.clearInterval(U._nBodyScrollId);U._disableScrollFooter();}}function R(){var W=Q.scrollTop;if(W>0){Q.scrollTop=(W-1);U._enableScrollFooter();}else{Q.scrollTop=0;window.clearInterval(U._nBodyScrollId);U._disableScrollHeader();}}if(C.hasClass(P,"hd")){O=R;}else{N=Q.scrollHeight-Q.offsetHeight;O=T;}this._nBodyScrollId=window.setInterval(O,10);},_onScrollTargetMouseOut:function(O,N){window.clearInterval(this._nBodyScrollId);this._cancelHideDelay();},_onInit:function(O,N){this.cfg.subscribeToConfigEvent("width",this._onWidthChange);this.cfg.subscribeToConfigEvent("visible",this._onVisibleChange);var P=!this.parent,Q=this.lazyLoad;if(((P&&!Q)||(P&&(this.cfg.getProperty("visible")||this.cfg.getProperty("position")=="static"))||(!P&&!Q))&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree();}if(this.itemData){this.addItems(this.itemData);}}else{if(Q){this.cfg.fireQueue();}}},_onBefore!
 Render:function(V,Q){var R=this.cfg,P=this.element,S=this._aLi!
 stElemen
ts.length,T=true,O=0,N,U;if(S>0){do{N=this._aListElements[O];if(N){if(T){C.addClass(N,"first-of-type");T=false;}if(!C.isAncestor(P,N)){this.appendToBody(N);}U=this._aGroupTitleElements[O];if(U){if(!C.isAncestor(P,U)){N.parentNode.insertBefore(U,N);}C.addClass(N,"hastitle");}}O++;}while(O<S);}},_onRender:function(O,N){D.textResizeEvent.subscribe(this._onTextResize,this,true);if(this.cfg.getProperty("position")=="dynamic"&&!this.cfg.getProperty("width")){this._setWidth();}},_onBeforeShow:function(V,R){var U,N,T,Q,P,O,S;if(this.lazyLoad&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree();}if(this.itemData){if(this.parent&&this.parent.parent&&this.parent.parent.srcElement&&this.parent.parent.srcElement.tagName.toUpperCase()=="SELECT"){U=this.itemData.length;for(N=0;N<U;N++){if(this.itemData[N].tagName){this.addItem((new this.ITEM_TYPE(this.itemData[N])));}}}else{this.addItems(this.itemData);}}S=this.srcElement;if(S){if(S.tagName.toUpperCase()=="SELECT"){if(!
 C.inDocument(S)){this.render(S.parentNode);}else{this.render(this.cfg.getProperty("container"));}}else{this.render();}}else{if(this.parent){this.render(this.parent.element);}else{this.render(this.cfg.getProperty("container"));this.cfg.refireEvent("xy");}}}if(!(this instanceof YAHOO.widget.MenuBar)&&this.cfg.getProperty("position")=="dynamic"){T=C.getViewportHeight();if(this.parent&&this.parent.parent instanceof YAHOO.widget.MenuBar){Q=YAHOO.util.Region.getRegion(this.parent.element);T=(T-Q.bottom);}if(this.element.offsetHeight>=T){P=this.cfg.getProperty("maxheight");this._nMaxHeight=P;this.cfg.setProperty("maxheight",(T-20));}if(this.cfg.getProperty("maxheight")>0){O=this.body;if(O.scrollTop>0){O.scrollTop=0;}this._disableScrollHeader();this._enableScrollFooter();}}},_onShow:function(Q,P){var T=this.parent,S,N,O;function R(V){var U;if(V.type=="mousedown"||(V.type=="keydown"&&V.keyCode==27)){U=M.getTarget(V);if(U!=S.element||!C.isAncestor(S.element,U)){S.cfg.setProperty("aut!
 osubmenudisplay",false);M.removeListener(document,"mousedown",!
 R);M.rem
oveListener(document,"keydown",R);}}}if(T){S=T.parent;N=S.cfg.getProperty("submenualignment");O=this.cfg.getProperty("submenualignment");if((N[0]!=O[0])&&(N[1]!=O[1])){this.cfg.setProperty("submenualignment",[N[0],N[1]]);}if(!S.cfg.getProperty("autosubmenudisplay")&&(S instanceof YAHOO.widget.MenuBar||S.cfg.getProperty("position")=="static")){S.cfg.setProperty("autosubmenudisplay",true);M.on(document,"mousedown",R);M.on(document,"keydown",R);}}},_onBeforeHide:function(P,O){var N=this.activeItem,R,Q;if(N){R=N.cfg;R.setProperty("selected",false);Q=R.getProperty("submenu");if(Q){Q.hide();}}if(this.getRoot()==this){this.blur();}},_onHide:function(O,N){if(this._nMaxHeight!=-1){this.cfg.setProperty("maxheight",this._nMaxHeight);this._nMaxHeight=-1;}},_onParentMenuConfigChange:function(O,N,R){var P=N[0][0],Q=N[0][1];switch(P){case"iframe":case"constraintoviewport":case"hidedelay":case"showdelay":case"submenuhidedelay":case"clicktohide":case"effect":case"classname":R.cfg.setProperty!
 (P,Q);break;}},_onParentMenuRender:function(O,N,S){var P=S.parent.parent,Q={constraintoviewport:P.cfg.getProperty("constraintoviewport"),xy:[0,0],clicktohide:P.cfg.getProperty("clicktohide"),effect:P.cfg.getProperty("effect"),showdelay:P.cfg.getProperty("showdelay"),hidedelay:P.cfg.getProperty("hidedelay"),submenuhidedelay:P.cfg.getProperty("submenuhidedelay"),classname:P.cfg.getProperty("classname")},R;if(this.cfg.getProperty("position")==P.cfg.getProperty("position")){Q.iframe=P.cfg.getProperty("iframe");}S.cfg.applyConfig(Q);if(!this.lazyLoad){R=this.parent.element;if(this.element.parentNode==R){this.render();}else{this.render(R);}}},_onSubmenuBeforeShow:function(P,O){var Q=this.parent,N=Q.parent.cfg.getProperty("submenualignment");this.cfg.setProperty("context",[Q.element,N[0],N[1]]);var R=Q.parent.body.scrollTop;if((H.gecko||H.webkit)&&R>0){this.cfg.setProperty("y",(this.cfg.getProperty("y")-R));}},_onMenuItemFocus:function(O,N){this.parent.focusEvent.fire(this);
-},_onMenuItemBlur:function(O,N){this.parent.blurEvent.fire(this);},_onMenuItemConfigChange:function(P,O,N){var R=O[0][0],S=O[0][1],Q;switch(R){case"selected":if(S===true){this.activeItem=N;}break;case"submenu":Q=O[0][1];if(Q){this._configureSubmenu(N);}break;case"text":case"helptext":if(this.element.style.width){this.cfg.setProperty("width",(this._getOffsetWidth()+"px"));}break;}},enforceConstraints:function(Q,P,W){var i=this.parent,b,S,T,V,U,R,d,h,a,f,e,Z,Y,g,O,N,c,X;if(i&&!(i.parent instanceof YAHOO.widget.MenuBar)){b=this.element;S=this.cfg;T=P[0];V=T[0];U=T[1];R=b.offsetHeight;d=b.offsetWidth;h=C.getViewportWidth();a=C.getViewportHeight();f=C.getDocumentScrollLeft();e=C.getDocumentScrollTop();Z=(i.parent instanceof YAHOO.widget.MenuBar)?0:10;Y=e+Z;g=f+Z;O=e+a-R-Z;N=f+h-d-Z;c=S.getProperty("context");X=c?c[0]:null;if(V<10){V=g;}else{if((V+d)>h){if(X&&((V-X.offsetWidth)>d)){V=(V-(X.offsetWidth+d));}else{V=N;}}}if(U<10){U=Y;}else{if(U>O){if(X&&(U>R)){U=((U+X.offsetHeight)-!
 R);}else{U=O;}}}S.setProperty("x",V,true);S.setProperty("y",U,true);S.setProperty("xy",[V,U],true);}else{if(this==this.getRoot()&&this.cfg.getProperty("position")=="dynamic"){F.superclass.enforceConstraints.call(this,Q,P,W);}}},configVisible:function(P,O,Q){var N,R;if(this.cfg.getProperty("position")=="dynamic"){F.superclass.configVisible.call(this,P,O,Q);}else{N=O[0];R=C.getStyle(this.element,"display");C.setStyle(this.element,"visibility","visible");if(N){if(R!="block"){this.beforeShowEvent.fire();C.setStyle(this.element,"display","block");this.showEvent.fire();}}else{if(R=="block"){this.beforeHideEvent.fire();C.setStyle(this.element,"display","none");this.hideEvent.fire();}}}},configPosition:function(P,O,S){var R=this.element,Q=O[0]=="static"?"static":"absolute",U=C.getStyle(R,"position"),T=this.cfg,N;C.setStyle(this.element,"position",Q);if(Q=="static"){T.setProperty("iframe",false);C.setStyle(this.element,"display","block");T.setProperty("visible",true);}else{if(U!="ab!
 solute"){T.setProperty("iframe",(H.ie==6?true:false));}C.setSt!
 yle(this
.element,"visibility","hidden");}if(Q=="absolute"){N=T.getProperty("zindex");if(!N||N===0){N=this.parent?(this.parent.parent.cfg.getProperty("zindex")+1):1;T.setProperty("zindex",N);}}},configIframe:function(O,N,P){if(this.cfg.getProperty("position")=="dynamic"){F.superclass.configIframe.call(this,O,N,P);}},configHideDelay:function(O,N,R){var T=N[0],S=this.mouseOutEvent,P=this.mouseOverEvent,Q=this.keyDownEvent;if(T>0){if(!this._bHideDelayEventHandlersAssigned){S.subscribe(this._execHideDelay);P.subscribe(this._cancelHideDelay);Q.subscribe(this._cancelHideDelay);this._bHideDelayEventHandlersAssigned=true;}}else{S.unsubscribe(this._execHideDelay);P.unsubscribe(this._cancelHideDelay);Q.unsubscribe(this._cancelHideDelay);this._bHideDelayEventHandlersAssigned=false;}},configContainer:function(O,N,Q){var P=N[0];if(typeof P=="string"){this.cfg.setProperty("container",document.getElementById(P),true);}},_setMaxHeight:function(O,N,P){this.cfg.setProperty("maxheight",P);this.renderEv!
 ent.unsubscribe(this._setMaxHeight);},configMaxHeight:function(V,Q,T){var P=Q[0],O=this.body,U=this.header,N=this.footer,S=this._onScrollTargetMouseOver,W=this._onScrollTargetMouseOut,R;if(this.lazyLoad&&!O){this.renderEvent.unsubscribe(this._setMaxHeight);if(P>0){this.renderEvent.subscribe(this._setMaxHeight,P,this);}return ;}C.setStyle(O,"height","auto");C.removeClass(O,"yui-menu-body-scrolled");if((P>0)&&(O.offsetHeight>P)){if(!this.cfg.getProperty("width")){this._setWidth();}if(!U&&!N){this.setHeader(" ");this.setFooter(" ");U=this.header;N=this.footer;C.addClass(U,"topscrollbar");C.addClass(N,"bottomscrollbar");this.element.insertBefore(U,O);this.element.appendChild(N);M.on(U,"mouseover",S,this,true);M.on(U,"mouseout",W,this,true);M.on(N,"mouseover",S,this,true);M.on(N,"mouseout",W,this,true);}C.addClass(O,"yui-menu-body-scrolled");R=(P-(this.footer.offsetHeight+this.header.offsetHeight));C.setStyle(O,"height",(R+"px"));}else{if(U&&N){M.removeListener(U,"mouseo!
 ver",S);M.removeListener(U,"mouseout",W);M.removeListener(N,"m!
 ouseover
",S);M.removeListener(N,"mouseout",W);this.element.removeChild(U);this.element.removeChild(N);this.header=null;this.footer=null;}}this.cfg.refireEvent("iframe");},configClassName:function(P,O,Q){var N=O[0];if(this._sClassName){C.removeClass(this.element,this._sClassName);}C.addClass(this.element,N);this._sClassName=N;},_onItemAdded:function(O,N){var P=N[0];if(P){P.cfg.setProperty("disabled",true);}},configDisabled:function(P,O,S){var R=O[0],N=this.getItems(),T,Q;if(E.isArray(N)){T=N.length;if(T>0){Q=T-1;do{N[Q].cfg.setProperty("disabled",R);}while(Q--);}if(R){C.addClass(this.element,"disabled");this.itemAddedEvent.subscribe(this._onItemAdded);}else{C.removeClass(this.element,"disabled");this.itemAddedEvent.unsubscribe(this._onItemAdded);}}},onRender:function(R,Q){function S(){var V=this.element,U=this._shadow;if(U){U.style.width=(V.offsetWidth+6)+"px";U.style.height=(V.offsetHeight+1)+"px";}}function O(){C.addClass(this._shadow,"yui-menu-shadow-visible");}function N(){C.remo!
 veClass(this._shadow,"yui-menu-shadow-visible");}function T(){var V=this._shadow,U,W;if(!V){U=this.element;W=this;if(!G){G=document.createElement("div");G.className="yui-menu-shadow";}V=G.cloneNode(false);U.appendChild(V);this._shadow=V;O.call(this);this.beforeShowEvent.subscribe(O);this.beforeHideEvent.subscribe(N);if(H.ie){window.setTimeout(function(){S.call(W);W.syncIframe();},0);this.cfg.subscribeToConfigEvent("width",S);this.cfg.subscribeToConfigEvent("height",S);this.cfg.subscribeToConfigEvent("maxheight",S);this.changeContentEvent.subscribe(S);D.textResizeEvent.subscribe(S,W,true);this.destroyEvent.subscribe(function(){D.textResizeEvent.unsubscribe(S,W);});}}}function P(){T.call(this);this.beforeShowEvent.unsubscribe(P);}if(this.cfg.getProperty("position")=="dynamic"){if(this.cfg.getProperty("visible")){T.call(this);}else{this.beforeShowEvent.subscribe(P);}}},initEvents:function(){F.superclass.initEvents.call(this);
-var N=L.LIST;this.mouseOverEvent=this.createEvent(A.MOUSE_OVER);this.mouseOverEvent.signature=N;this.mouseOutEvent=this.createEvent(A.MOUSE_OUT);this.mouseOutEvent.signature=N;this.mouseDownEvent=this.createEvent(A.MOUSE_DOWN);this.mouseDownEvent.signature=N;this.mouseUpEvent=this.createEvent(A.MOUSE_UP);this.mouseUpEvent.signature=N;this.clickEvent=this.createEvent(A.CLICK);this.clickEvent.signature=N;this.keyPressEvent=this.createEvent(A.KEY_PRESS);this.keyPressEvent.signature=N;this.keyDownEvent=this.createEvent(A.KEY_DOWN);this.keyDownEvent.signature=N;this.keyUpEvent=this.createEvent(A.KEY_UP);this.keyUpEvent.signature=N;this.focusEvent=this.createEvent(A.FOCUS);this.focusEvent.signature=N;this.blurEvent=this.createEvent(A.BLUR);this.blurEvent.signature=N;this.itemAddedEvent=this.createEvent(A.ITEM_ADDED);this.itemAddedEvent.signature=N;this.itemRemovedEvent=this.createEvent(A.ITEM_REMOVED);this.itemRemovedEvent.signature=N;},getRoot:function(){var O=this.parent,N;if(O!
 ){N=O.parent;return N?N.getRoot():this;}else{return this;}},toString:function(){var O="Menu",N=this.id;if(N){O+=(" "+N);}return O;},setItemGroupTitle:function(S,R){var Q,P,O,N;if(typeof S=="string"&&S.length>0){Q=typeof R=="number"?R:0;P=this._aGroupTitleElements[Q];if(P){P.innerHTML=S;}else{P=document.createElement(this.GROUP_TITLE_TAG_NAME);P.innerHTML=S;this._aGroupTitleElements[Q]=P;}O=this._aGroupTitleElements.length-1;do{if(this._aGroupTitleElements[O]){C.removeClass(this._aGroupTitleElements[O],"first-of-type");N=O;}}while(O--);if(N!==null){C.addClass(this._aGroupTitleElements[N],"first-of-type");}this.changeContentEvent.fire();}},addItem:function(N,O){if(N){return this._addItemToGroup(O,N);}},addItems:function(Q,P){var S,N,R,O;if(E.isArray(Q)){S=Q.length;N=[];for(O=0;O<S;O++){R=Q[O];if(R){if(E.isArray(R)){N[N.length]=this.addItems(R,O);}else{N[N.length]=this._addItemToGroup(P,R);}}}if(N.length){return N;}}},insertItem:function(N,O,P){if(N){return this._addItemToGrou!
 p(P,N,O);}},removeItem:function(N,O){var P;if(typeof N!="undef!
 ined"){i
f(N instanceof YAHOO.widget.MenuItem){P=this._removeItemFromGroupByValue(O,N);}else{if(typeof N=="number"){P=this._removeItemFromGroupByIndex(O,N);}}if(P){P.destroy();return P;}}},getItems:function(){var P=this._aItemGroups,O,N=[];if(E.isArray(P)){O=P.length;return((O==1)?P[0]:(Array.prototype.concat.apply(N,P)));}},getItemGroups:function(){return this._aItemGroups;},getItem:function(N,O){var P;if(typeof N=="number"){P=this._getItemGroup(O);if(P){return P[N];}}},getSubmenus:function(){var O=this.getItems(),S=O.length,N,P,R,Q;if(S>0){N=[];for(Q=0;Q<S;Q++){R=O[Q];if(R){P=R.cfg.getProperty("submenu");if(P){N[N.length]=P;}}}}return N;},clearContent:function(){var R=this.getItems(),O=R.length,P=this.element,Q=this.body,V=this.header,N=this.footer,U,T,S;if(O>0){S=O-1;do{U=R[S];if(U){T=U.cfg.getProperty("submenu");if(T){this.cfg.configChangedEvent.unsubscribe(this._onParentMenuConfigChange,T);this.renderEvent.unsubscribe(this._onParentMenuRender,T);}this.removeItem(U);}}while(S--);!
 }if(V){M.purgeElement(V);P.removeChild(V);}if(N){M.purgeElement(N);P.removeChild(N);}if(Q){M.purgeElement(Q);Q.innerHTML="";}this.activeItem=null;this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];this.cfg.setProperty("width",null);},destroy:function(){D.textResizeEvent.unsubscribe(this._onTextResize,this);this.clearContent();this._aItemGroups=null;this._aListElements=null;this._aGroupTitleElements=null;F.superclass.destroy.call(this);},setInitialFocus:function(){var N=this._getFirstEnabledItem();if(N){N.focus();}},setInitialSelection:function(){var N=this._getFirstEnabledItem();if(N){N.cfg.setProperty("selected",true);}},clearActiveItem:function(P){if(this.cfg.getProperty("showdelay")>0){this._cancelShowDelay();}var N=this.activeItem,Q,O;if(N){Q=N.cfg;if(P){N.blur();}Q.setProperty("selected",false);O=Q.getProperty("submenu");if(O){O.hide();}this.activeItem=null;}},focus:function(){if(!this.hasFocus()){this.setInitialFocus();}},blur:function(){var N;if!
 (this.hasFocus()){N=K.getFocusedMenuItem();if(N){N.blur();}}},!
 hasFocus
:function(){return(K.getFocusedMenu()==this.getRoot());},subscribe:function(){function R(T,S,V){var W=S[0],U=W.cfg.getProperty("submenu");if(U){U.subscribe.apply(U,V);}}F.superclass.subscribe.apply(this,arguments);F.superclass.subscribe.call(this,"itemAdded",R,arguments);var N=this.getSubmenus(),P,O,Q;if(N){P=N.length;if(P>0){Q=P-1;do{O=N[Q];O.subscribe.apply(O,arguments);}while(Q--);}}},initDefaultConfig:function(){F.superclass.initDefaultConfig.call(this);var N=this.cfg;N.addProperty(J.VISIBLE.key,{handler:this.configVisible,value:J.VISIBLE.value,validator:J.VISIBLE.validator});N.addProperty(J.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:J.CONSTRAIN_TO_VIEWPORT.value,validator:J.CONSTRAIN_TO_VIEWPORT.validator,supercedes:J.CONSTRAIN_TO_VIEWPORT.supercedes});N.addProperty(J.POSITION.key,{handler:this.configPosition,value:J.POSITION.value,validator:J.POSITION.validator,supercedes:J.POSITION.supercedes});N.addProperty(J.SUBMENU_ALIGNMENT.key,{value:!
 J.SUBMENU_ALIGNMENT.value});N.addProperty(J.AUTO_SUBMENU_DISPLAY.key,{value:J.AUTO_SUBMENU_DISPLAY.value,validator:J.AUTO_SUBMENU_DISPLAY.validator});N.addProperty(J.SHOW_DELAY.key,{value:J.SHOW_DELAY.value,validator:J.SHOW_DELAY.validator});N.addProperty(J.HIDE_DELAY.key,{handler:this.configHideDelay,value:J.HIDE_DELAY.value,validator:J.HIDE_DELAY.validator,suppressEvent:J.HIDE_DELAY.suppressEvent});N.addProperty(J.SUBMENU_HIDE_DELAY.key,{value:J.SUBMENU_HIDE_DELAY.value,validator:J.SUBMENU_HIDE_DELAY.validator});N.addProperty(J.CLICK_TO_HIDE.key,{value:J.CLICK_TO_HIDE.value,validator:J.CLICK_TO_HIDE.validator});N.addProperty(J.CONTAINER.key,{handler:this.configContainer,value:document.body});N.addProperty(J.MAX_HEIGHT.key,{handler:this.configMaxHeight,value:J.MAX_HEIGHT.value,validator:J.MAX_HEIGHT.validator});N.addProperty(J.CLASS_NAME.key,{handler:this.configClassName,value:J.CLASS_NAME.value,validator:J.CLASS_NAME.validator});
-N.addProperty(J.DISABLED.key,{handler:this.configDisabled,value:J.DISABLED.value,validator:J.DISABLED.validator,suppressEvent:J.DISABLED.suppressEvent});}});})();(function(){YAHOO.widget.MenuItem=function(K,J){if(K){if(J){this.parent=J.parent;this.value=J.value;this.id=J.id;}this.init(K,J);}};var B=YAHOO.util.Dom,C=YAHOO.widget.Module,E=YAHOO.widget.Menu,H=YAHOO.widget.MenuItem,I=YAHOO.util.CustomEvent,F=YAHOO.lang,D,A={"MOUSE_OVER":"mouseover","MOUSE_OUT":"mouseout","MOUSE_DOWN":"mousedown","MOUSE_UP":"mouseup","CLICK":"click","KEY_PRESS":"keypress","KEY_DOWN":"keydown","KEY_UP":"keyup","ITEM_ADDED":"itemAdded","ITEM_REMOVED":"itemRemoved","FOCUS":"focus","BLUR":"blur","DESTROY":"destroy"},G={"TEXT":{key:"text",value:"",validator:F.isString,suppressEvent:true},"HELP_TEXT":{key:"helptext",supercedes:["text"]},"URL":{key:"url",value:"#",suppressEvent:true},"TARGET":{key:"target",suppressEvent:true},"EMPHASIS":{key:"emphasis",value:false,validator:F.isBoolean,suppressEvent:tr!
 ue,supercedes:["text"]},"STRONG_EMPHASIS":{key:"strongemphasis",value:false,validator:F.isBoolean,suppressEvent:true,supercedes:["text"]},"CHECKED":{key:"checked",value:false,validator:F.isBoolean,suppressEvent:true,supercedes:["text"]},"DISABLED":{key:"disabled",value:false,validator:F.isBoolean,suppressEvent:true,supercedes:["text"]},"SELECTED":{key:"selected",value:false,validator:F.isBoolean,suppressEvent:true},"SUBMENU":{key:"submenu",supercedes:["text"]},"ONCLICK":{key:"onclick"},"CLASS_NAME":{key:"classname",value:null,validator:F.isString}};H.prototype={COLLAPSED_SUBMENU_INDICATOR_TEXT:"Submenu collapsed.  Click to expand submenu.",EXPANDED_SUBMENU_INDICATOR_TEXT:"Submenu expanded.  Click to collapse submenu.",DISABLED_SUBMENU_INDICATOR_TEXT:"Submenu collapsed.  (Item disabled.)",CHECKED_TEXT:"Menu item checked.",DISABLED_CHECKED_TEXT:"Checked. (Item disabled.)",CSS_CLASS_NAME:"yuimenuitem",CSS_LABEL_CLASS_NAME:"yuimenuitemlabel",SUBMENU_TYPE:null,_oAnchor:null,_oHe!
 lpTextEM:null,_oSubmenu:null,_oCheckedIndicator:null,_oOnclick!
 Attribut
eValue:null,_sClassName:null,constructor:H,index:null,groupIndex:null,parent:null,element:null,srcElement:null,value:null,submenuIndicator:null,browser:C.prototype.browser,id:null,destroyEvent:null,mouseOverEvent:null,mouseOutEvent:null,mouseDownEvent:null,mouseUpEvent:null,clickEvent:null,keyPressEvent:null,keyDownEvent:null,keyUpEvent:null,focusEvent:null,blurEvent:null,init:function(J,R){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=E;}this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();var O=I.LIST,N=this.cfg,P="#",Q,K,M,L;if(F.isString(J)){this._createRootNodeStructure();N.queueProperty("text",J);}else{if(J&&J.tagName){switch(J.tagName.toUpperCase()){case"OPTION":this._createRootNodeStructure();N.queueProperty("text",J.text);this.value=J.value;this.srcElement=J;break;case"OPTGROUP":this._createRootNodeStructure();N.queueProperty("text",J.label);this.srcElement=J;this._initSubTree();break;case"LI":Q=B.getFirstChild(J);if(Q){P=Q.getAttribute("href");if(YAHOO.env.ua.i!
 e){P=P.substring(document.location.href.length,P.length);}K=Q.getAttribute("target");M=Q.innerHTML;}this.srcElement=J;this.element=J;this._oAnchor=Q;N.setProperty("text",M,true);N.setProperty("url",P,true);N.setProperty("target",K,true);this._initSubTree();break;}}}if(this.element){L=this.element.id;if(!L){L=this.id||B.generateId();this.element.id=L;}this.id=L;B.addClass(this.element,this.CSS_CLASS_NAME);B.addClass(this._oAnchor,this.CSS_LABEL_CLASS_NAME);this.mouseOverEvent=this.createEvent(A.MOUSE_OVER);this.mouseOverEvent.signature=O;this.mouseOutEvent=this.createEvent(A.MOUSE_OUT);this.mouseOutEvent.signature=O;this.mouseDownEvent=this.createEvent(A.MOUSE_DOWN);this.mouseDownEvent.signature=O;this.mouseUpEvent=this.createEvent(A.MOUSE_UP);this.mouseUpEvent.signature=O;this.clickEvent=this.createEvent(A.CLICK);this.clickEvent.signature=O;this.keyPressEvent=this.createEvent(A.KEY_PRESS);this.keyPressEvent.signature=O;this.keyDownEvent=this.createEvent(A.KEY_DOWN);this.key!
 DownEvent.signature=O;this.keyUpEvent=this.createEvent(A.KEY_U!
 P);this.
keyUpEvent.signature=O;this.focusEvent=this.createEvent(A.FOCUS);this.focusEvent.signature=O;this.blurEvent=this.createEvent(A.BLUR);this.blurEvent.signature=O;this.destroyEvent=this.createEvent(A.DESTROY);this.destroyEvent.signature=O;if(R){N.applyConfig(R);}N.fireQueue();}},_createRootNodeStructure:function(){var J,K;if(!D){D=document.createElement("li");D.innerHTML="<a href=\"#\"></a>";}J=D.cloneNode(true);J.className=this.CSS_CLASS_NAME;K=J.firstChild;K.className=this.CSS_LABEL_CLASS_NAME;this.element=J;this._oAnchor=K;},_initSubTree:function(){var P=this.srcElement,L=this.cfg,N,M,K,J,O;if(P.childNodes.length>0){if(this.parent.lazyLoad&&this.parent.srcElement&&this.parent.srcElement.tagName.toUpperCase()=="SELECT"){L.setProperty("submenu",{id:B.generateId(),itemdata:P.childNodes});}else{N=P.firstChild;M=[];do{if(N&&N.tagName){switch(N.tagName.toUpperCase()){case"DIV":L.setProperty("submenu",N);break;case"OPTION":M[M.length]=N;break;}}}while((N=N.nextSibling));K=M.length;!
 if(K>0){J=new this.SUBMENU_TYPE(B.generateId());L.setProperty("submenu",J);for(O=0;O<K;O++){J.addItem((new J.ITEM_TYPE(M[O])));}}}}},configText:function(V,M,P){var K=M[0],N=this.cfg,S=this._oAnchor,J=N.getProperty("helptext"),U="",T="",O=N.getProperty("submenu"),L="",Q="",R="";if(K){if(J){U="<em class=\"helptext\">"+J+"</em>";}if(N.getProperty("checked")){T="<em class=\"checkedindicator\">"+this.CHECKED_TEXT+"</em>";}if(O){L="<em class=\"submenuindicator\">"+((O instanceof E&&O.cfg.getProperty("visible"))?this.EXPANDED_SUBMENU_INDICATOR_TEXT:this.COLLAPSED_SUBMENU_INDICATOR_TEXT)+"</em>";}if(N.getProperty("emphasis")){Q="<em>";R="</em>";}if(N.getProperty("strongemphasis")){Q="<strong>";R="</strong>";}S.innerHTML=(Q+K+R+U+T+L);if(O){this.submenuIndicator=S.lastChild;}}},configHelpText:function(L,K,J){var M=K[0],N=this._oAnchor;if(M){B.addClass(N,"hashelptext");}else{B.removeClass(N,"hashelptext");}this.cfg.refireEvent("text");
-},configURL:function(L,K,J){var N=K[0];if(!N){N="#";}var M=this._oAnchor;if(YAHOO.env.ua.opera){M.removeAttribute("href");}M.setAttribute("href",N);},configTarget:function(M,L,K){var J=L[0],N=this._oAnchor;if(J&&J.length>0){N.setAttribute("target",J);}else{N.removeAttribute("target");}},configEmphasis:function(L,K,J){var N=K[0],M=this.cfg;if(N&&M.getProperty("strongemphasis")){M.setProperty("strongemphasis",false);}M.refireEvent("text");},configStrongEmphasis:function(M,L,K){var J=L[0],N=this.cfg;if(J&&N.getProperty("emphasis")){N.setProperty("emphasis",false);}N.refireEvent("text");},configChecked:function(L,K,J){var N=K[0],M=this._oAnchor;if(N){B.addClass(M,"checked");}else{B.removeClass(M,"checked");}this.cfg.refireEvent("text");},configDisabled:function(L,K,J){var M=K[0],O=this.cfg,N=this._oAnchor;if(M){if(O.getProperty("selected")){O.setProperty("selected",false);}N.removeAttribute("href");B.addClass(N,"disabled");}else{N.setAttribute("href",O.getProperty("url"));B.rem!
 oveClass(N,"disabled");}},configSelected:function(L,K,J){var N,M;if(!this.cfg.getProperty("disabled")){N=K[0];M=this._oAnchor;if(YAHOO.env.ua.opera){M.blur();}if(N){B.addClass(M,"selected");}else{B.removeClass(M,"selected");}if(this.hasFocus()&&YAHOO.env.ua.opera){M.focus();}}},_onSubmenuShow:function(L,K){var J=this.submenuIndicator.firstChild;if(J){J.nodeValue=this.EXPANDED_SUBMENU_INDICATOR_TEXT;}},_onSubmenuBeforeHide:function(M,L){var N=this.parent,J;function K(){N._oAnchor.blur();J.beforeHideEvent.unsubscribe(K);}if(N.hasFocus()){J=N.parent;J.beforeHideEvent.subscribe(K);}},_onSubmenuHide:function(L,K){var J=this.submenuIndicator.firstChild;if(J){J.nodeValue=this.COLLAPSED_SUBMENU_INDICATOR_TEXT;}},configSubmenu:function(S,L,O){var Q=this._oAnchor,N=L[0],P=this.submenuIndicator,M=this.cfg,K=this.parent&&this.parent.lazyLoad,R,T,J;if(N){if(N instanceof E){R=N;R.parent=this;R.lazyLoad=K;}else{if(typeof N=="object"&&N.id&&!N.nodeType){T=N.id;J=N;J.lazyload=K;J.parent=thi!
 s;R=new this.SUBMENU_TYPE(T,J);this.cfg.setProperty("submenu",!
 R,true);
}else{R=new this.SUBMENU_TYPE(N,{lazyload:K,parent:this});this.cfg.setProperty("submenu",R,true);}}if(R){B.addClass(Q,"hassubmenu");this._oSubmenu=R;R.showEvent.subscribe(this._onSubmenuShow,null,this);R.hideEvent.subscribe(this._onSubmenuHide,null,this);if(YAHOO.env.ua.opera){R.beforeHideEvent.subscribe(this._onSubmenuBeforeHide);}}}else{B.removeClass(Q,"hassubmenu");if(P){Q.removeChild(P);}if(this._oSubmenu){this._oSubmenu.destroy();}}M.refireEvent("text");},configOnClick:function(L,K,J){var M=K[0];if(this._oOnclickAttributeValue&&(this._oOnclickAttributeValue!=M)){this.clickEvent.unsubscribe(this._oOnclickAttributeValue.fn,this._oOnclickAttributeValue.obj);this._oOnclickAttributeValue=null;}if(!this._oOnclickAttributeValue&&typeof M=="object"&&typeof M.fn=="function"){this.clickEvent.subscribe(M.fn,((!YAHOO.lang.isUndefined(M.obj))?M.obj:this),M.scope);this._oOnclickAttributeValue=M;}},configClassName:function(M,L,K){var J=L[0];if(this._sClassName){B.removeClass(this.elem!
 ent,this._sClassName);}B.addClass(this.element,J);this._sClassName=J;},initDefaultConfig:function(){var J=this.cfg;J.addProperty(G.TEXT.key,{handler:this.configText,value:G.TEXT.value,validator:G.TEXT.validator,suppressEvent:G.TEXT.suppressEvent});J.addProperty(G.HELP_TEXT.key,{handler:this.configHelpText});J.addProperty(G.URL.key,{handler:this.configURL,value:G.URL.value,suppressEvent:G.URL.suppressEvent});J.addProperty(G.TARGET.key,{handler:this.configTarget,suppressEvent:G.TARGET.suppressEvent});J.addProperty(G.EMPHASIS.key,{handler:this.configEmphasis,value:G.EMPHASIS.value,validator:G.EMPHASIS.validator,suppressEvent:G.EMPHASIS.suppressEvent});J.addProperty(G.STRONG_EMPHASIS.key,{handler:this.configStrongEmphasis,value:G.STRONG_EMPHASIS.value,validator:G.STRONG_EMPHASIS.validator,suppressEvent:G.STRONG_EMPHASIS.suppressEvent});J.addProperty(G.CHECKED.key,{handler:this.configChecked,value:G.CHECKED.value,validator:G.CHECKED.validator,suppressEvent:G.CHECKED.suppressEven!
 t,supercedes:G.CHECKED.supercedes});J.addProperty(G.DISABLED.k!
 ey,{hand
ler:this.configDisabled,value:G.DISABLED.value,validator:G.DISABLED.validator,suppressEvent:G.DISABLED.suppressEvent});J.addProperty(G.SELECTED.key,{handler:this.configSelected,value:G.SELECTED.value,validator:G.SELECTED.validator,suppressEvent:G.SELECTED.suppressEvent});J.addProperty(G.SUBMENU.key,{handler:this.configSubmenu});J.addProperty(G.ONCLICK.key,{handler:this.configOnClick});J.addProperty(G.CLASS_NAME.key,{handler:this.configClassName,value:G.CLASS_NAME.value,validator:G.CLASS_NAME.validator});},getNextEnabledSibling:function(){var L,O,J,N,M;function K(P,Q){return P[Q]||K(P,(Q+1));}if(this.parent instanceof E){L=this.groupIndex;O=this.parent.getItemGroups();if(this.index<(O[L].length-1)){J=K(O[L],(this.index+1));}else{if(L<(O.length-1)){N=L+1;}else{N=0;}M=K(O,N);J=K(M,0);}return(J.cfg.getProperty("disabled")||J.element.style.display=="none")?J.getNextEnabledSibling():J;}},getPreviousEnabledSibling:function(){var N,P,K,J,M;function O(Q,R){return Q[R]||O(Q,(R-1));}fu!
 nction L(Q,R){return Q[R]?R:L(Q,(R+1));}if(this.parent instanceof E){N=this.groupIndex;P=this.parent.getItemGroups();if(this.index>L(P[N],0)){K=O(P[N],(this.index-1));}else{if(N>L(P,0)){J=N-1;}else{J=P.length-1;}M=O(P,J);K=O(M,(M.length-1));}return(K.cfg.getProperty("disabled")||K.element.style.display=="none")?K.getPreviousEnabledSibling():K;}},focus:function(){var N=this.parent,M=this._oAnchor,J=N.activeItem,L=this;function K(){try{if(YAHOO.env.ua.ie&&!document.hasFocus()){return ;}M.focus();}catch(O){}}if(!this.cfg.getProperty("disabled")&&N&&N.cfg.getProperty("visible")&&this.element.style.display!="none"){if(J){J.blur();}window.setTimeout(K,0);this.focusEvent.fire();}},blur:function(){var K=this.parent;if(!this.cfg.getProperty("disabled")&&K&&K.cfg.getProperty("visible")){try{this._oAnchor.blur();}catch(J){}this.blurEvent.fire();}},hasFocus:function(){return(YAHOO.widget.MenuManager.getFocusedMenuItem()==this);
-},destroy:function(){var L=this.element,K,J;if(L){K=this.cfg.getProperty("submenu");if(K){K.destroy();}this.mouseOverEvent.unsubscribeAll();this.mouseOutEvent.unsubscribeAll();this.mouseDownEvent.unsubscribeAll();this.mouseUpEvent.unsubscribeAll();this.clickEvent.unsubscribeAll();this.keyPressEvent.unsubscribeAll();this.keyDownEvent.unsubscribeAll();this.keyUpEvent.unsubscribeAll();this.focusEvent.unsubscribeAll();this.blurEvent.unsubscribeAll();this.cfg.configChangedEvent.unsubscribeAll();J=L.parentNode;if(J){J.removeChild(L);this.destroyEvent.fire();}this.destroyEvent.unsubscribeAll();}},toString:function(){var K="MenuItem",J=this.id;if(J){K+=(" "+J);}return K;}};F.augmentProto(H,YAHOO.util.EventProvider);})();(function(){YAHOO.widget.ContextMenu=function(F,E){YAHOO.widget.ContextMenu.superclass.constructor.call(this,F,E);};var A=YAHOO.util.Event,D=YAHOO.widget.ContextMenu,C={"TRIGGER_CONTEXT_MENU":"triggerContextMenu","CONTEXT_MENU":(YAHOO.env.ua.opera?"mousedown":"conte!
 xtmenu"),"CLICK":"click"},B={"TRIGGER":{key:"trigger"}};YAHOO.lang.extend(D,YAHOO.widget.Menu,{_oTrigger:null,_bCancelled:false,contextEventTarget:null,triggerContextMenuEvent:null,init:function(F,E){if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.ContextMenuItem;}D.superclass.init.call(this,F);this.beforeInitEvent.fire(D);if(E){this.cfg.applyConfig(E,true);}this.initEvent.fire(D);},initEvents:function(){D.superclass.initEvents.call(this);this.triggerContextMenuEvent=this.createEvent(C.TRIGGER_CONTEXT_MENU);this.triggerContextMenuEvent.signature=YAHOO.util.CustomEvent.LIST;},cancel:function(){this._bCancelled=true;},_removeEventHandlers:function(){var E=this._oTrigger;if(E){A.removeListener(E,C.CONTEXT_MENU,this._onTriggerContextMenu);if(YAHOO.env.ua.opera){A.removeListener(E,C.CLICK,this._onTriggerClick);}}},_onTriggerClick:function(F,E){if(F.ctrlKey){A.stopEvent(F);}},_onTriggerContextMenu:function(F,E){if(F.type=="mousedown"&&!F.ctrlKey){return ;}A.stopEvent(F);YAHOO.wid!
 get.MenuManager.hideVisible();this.contextEventTarget=A.getTar!
 get(F);t
his.triggerContextMenuEvent.fire(F);if(!this._bCancelled){this.cfg.setProperty("xy",A.getXY(F));this.show();}this._bCancelled=false;},toString:function(){var F="ContextMenu",E=this.id;if(E){F+=(" "+E);}return F;},initDefaultConfig:function(){D.superclass.initDefaultConfig.call(this);this.cfg.addProperty(B.TRIGGER.key,{handler:this.configTrigger});},destroy:function(){this._removeEventHandlers();D.superclass.destroy.call(this);},configTrigger:function(F,E,H){var G=E[0];if(G){if(this._oTrigger){this._removeEventHandlers();}this._oTrigger=G;A.on(G,C.CONTEXT_MENU,this._onTriggerContextMenu,this,true);if(YAHOO.env.ua.opera){A.on(G,C.CLICK,this._onTriggerClick,this,true);}}else{this._removeEventHandlers();}}});}());YAHOO.widget.ContextMenuItem=function(B,A){YAHOO.widget.ContextMenuItem.superclass.constructor.call(this,B,A);};YAHOO.lang.extend(YAHOO.widget.ContextMenuItem,YAHOO.widget.MenuItem,{init:function(B,A){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.ContextMenu;}YA!
 HOO.widget.ContextMenuItem.superclass.init.call(this,B);var C=this.cfg;if(A){C.applyConfig(A,true);}C.fireQueue();},toString:function(){var A="ContextMenuItem";if(this.cfg&&this.cfg.getProperty("text")){A+=(": "+this.cfg.getProperty("text"));}return A;}});(function(){YAHOO.widget.MenuBar=function(G,F){YAHOO.widget.MenuBar.superclass.constructor.call(this,G,F);};function E(F){if(typeof F=="string"){return("dynamic,static".indexOf((F.toLowerCase()))!=-1);}}var B=YAHOO.util.Event,D=YAHOO.util.Dom,A=YAHOO.widget.MenuBar,C={"POSITION":{key:"position",value:"static",validator:E,supercedes:["visible"]},"SUBMENU_ALIGNMENT":{key:"submenualignment",value:["tl","bl"]},"AUTO_SUBMENU_DISPLAY":{key:"autosubmenudisplay",value:false,validator:YAHOO.lang.isBoolean}};YAHOO.lang.extend(A,YAHOO.widget.Menu,{init:function(G,F){if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuBarItem;}A.superclass.init.call(this,G);this.beforeInitEvent.fire(A);if(F){this.cfg.applyConfig(F,true);}this.initEven!
 t.fire(A);},CSS_CLASS_NAME:"yuimenubar",_onKeyDown:function(H,!
 G,L){var
 F=G[0],M=G[1],J,K,I;if(M&&!M.cfg.getProperty("disabled")){K=M.cfg;switch(F.keyCode){case 37:case 39:if(M==this.activeItem&&!K.getProperty("selected")){K.setProperty("selected",true);}else{I=(F.keyCode==37)?M.getPreviousEnabledSibling():M.getNextEnabledSibling();if(I){this.clearActiveItem();I.cfg.setProperty("selected",true);if(this.cfg.getProperty("autosubmenudisplay")){J=I.cfg.getProperty("submenu");if(J){J.show();}}I.focus();}}B.preventDefault(F);break;case 40:if(this.activeItem!=M){this.clearActiveItem();K.setProperty("selected",true);M.focus();}J=K.getProperty("submenu");if(J){if(J.cfg.getProperty("visible")){J.setInitialSelection();J.setInitialFocus();}else{J.show();}}B.preventDefault(F);break;}}if(F.keyCode==27&&this.activeItem){J=this.activeItem.cfg.getProperty("submenu");if(J&&J.cfg.getProperty("visible")){J.hide();this.activeItem.focus();}else{this.activeItem.cfg.setProperty("selected",false);this.activeItem.blur();}B.preventDefault(F);}},_onClick:function(M,H,K){A!
 .superclass._onClick.call(this,M,H,K);var L=H[1],N,F,G,I,J;if(L&&!L.cfg.getProperty("disabled")){N=H[0];F=B.getTarget(N);G=this.activeItem;I=this.cfg;if(G&&G!=L){this.clearActiveItem();}L.cfg.setProperty("selected",true);J=L.cfg.getProperty("submenu");if(J&&F!=L.submenuIndicator){if(J.cfg.getProperty("visible")){J.hide();}else{J.show();}}}},toString:function(){var G="MenuBar",F=this.id;if(F){G+=(" "+F);}return G;},initDefaultConfig:function(){A.superclass.initDefaultConfig.call(this);var F=this.cfg;F.addProperty(C.POSITION.key,{handler:this.configPosition,value:C.POSITION.value,validator:C.POSITION.validator,supercedes:C.POSITION.supercedes});F.addProperty(C.SUBMENU_ALIGNMENT.key,{value:C.SUBMENU_ALIGNMENT.value});F.addProperty(C.AUTO_SUBMENU_DISPLAY.key,{value:C.AUTO_SUBMENU_DISPLAY.value,validator:C.AUTO_SUBMENU_DISPLAY.validator});}});}());YAHOO.widget.MenuBarItem=function(B,A){YAHOO.widget.MenuBarItem.superclass.constructor.call(this,B,A);
-};YAHOO.lang.extend(YAHOO.widget.MenuBarItem,YAHOO.widget.MenuItem,{init:function(B,A){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.Menu;}YAHOO.widget.MenuBarItem.superclass.init.call(this,B);var C=this.cfg;if(A){C.applyConfig(A,true);}C.fireQueue();},CSS_CLASS_NAME:"yuimenubaritem",CSS_LABEL_CLASS_NAME:"yuimenubaritemlabel",toString:function(){var A="MenuBarItem";if(this.cfg&&this.cfg.getProperty("text")){A+=(": "+this.cfg.getProperty("text"));}return A;}});YAHOO.register("menu",YAHOO.widget.Menu,{version:"2.3.1",build:"541"});
\ No newline at end of file
+(function(){var B=YAHOO.util.Dom,A=YAHOO.util.Event;YAHOO.widget.MenuManager=function(){var N=false,F={},Q={},J={},E={"click":"clickEvent","mousedown":"mouseDownEvent","mouseup":"mouseUpEvent","mouseover":"mouseOverEvent","mouseout":"mouseOutEvent","keydown":"keyDownEvent","keyup":"keyUpEvent","keypress":"keyPressEvent"},K=null;function D(S){var R;if(S&&S.tagName){switch(S.tagName.toUpperCase()){case"DIV":R=S.parentNode;if((B.hasClass(S,"hd")||B.hasClass(S,"bd")||B.hasClass(S,"ft"))&&R&&R.tagName&&R.tagName.toUpperCase()=="DIV"){return R;}else{return S;}break;case"LI":return S;default:R=S.parentNode;if(R){return D(R);}break;}}}function G(V){var R=A.getTarget(V),S=D(R),X,T,U,Z,Y;if(S){T=S.tagName.toUpperCase();if(T=="LI"){U=S.id;if(U&&J[U]){Z=J[U];Y=Z.parent;}}else{if(T=="DIV"){if(S.id){Y=F[S.id];}}}}if(Y){X=E[V.type];if(Z&&!Z.cfg.getProperty("disabled")){Z[X].fire(V);if(V.type=="keyup"||V.type=="mousedown"){if(K!=Z){if(K){K.blurEvent.fire();}Z.focusEvent.fire();}}}Y[X].fire!
 (V,Z);}else{if(V.type=="mousedown"){if(K){K.blurEvent.fire();K=null;}for(var W in Q){if(YAHOO.lang.hasOwnProperty(Q,W)){Y=Q[W];if(Y.cfg.getProperty("clicktohide")&&!(Y instanceof YAHOO.widget.MenuBar)&&Y.cfg.getProperty("position")=="dynamic"){Y.hide();}else{Y.clearActiveItem(true);}}}}else{if(V.type=="keyup"){if(K){K.blurEvent.fire();K=null;}}}}}function P(S,R,T){if(F[T.id]){this.removeMenu(T);}}function M(S,R){var T=R[0];if(T){K=T;}}function H(S,R){K=null;}function C(T,S){var R=S[0],U=this.id;if(R){Q[U]=this;}else{if(Q[U]){delete Q[U];}}}function L(S,R){O(this);}function O(S){var R=S.id;if(R&&J[R]){if(K==S){K=null;}delete J[R];S.destroyEvent.unsubscribe(L);}}function I(S,R){var U=R[0],T;if(U instanceof YAHOO.widget.MenuItem){T=U.id;if(!J[T]){J[T]=U;U.destroyEvent.subscribe(L);}}}return{addMenu:function(S){var R;if(S instanceof YAHOO.widget.Menu&&S.id&&!F[S.id]){F[S.id]=S;if(!N){R=document;A.on(R,"mouseover",G,this,true);A.on(R,"mouseout",G,this,true);A.on(R,"mousedown",G,!
 this,true);A.on(R,"mouseup",G,this,true);A.on(R,"click",G,this!
 ,true);A
.on(R,"keydown",G,this,true);A.on(R,"keyup",G,this,true);A.on(R,"keypress",G,this,true);N=true;}S.cfg.subscribeToConfigEvent("visible",C);S.destroyEvent.subscribe(P,S,this);S.itemAddedEvent.subscribe(I);S.focusEvent.subscribe(M);S.blurEvent.subscribe(H);}},removeMenu:function(U){var S,R,T;if(U){S=U.id;if(F[S]==U){R=U.getItems();if(R&&R.length>0){T=R.length-1;do{O(R[T]);}while(T--);}delete F[S];if(Q[S]==U){delete Q[S];}if(U.cfg){U.cfg.unsubscribeFromConfigEvent("visible",C);}U.destroyEvent.unsubscribe(P,U);U.itemAddedEvent.unsubscribe(I);U.focusEvent.unsubscribe(M);U.blurEvent.unsubscribe(H);}}},hideVisible:function(){var R;for(var S in Q){if(YAHOO.lang.hasOwnProperty(Q,S)){R=Q[S];if(!(R instanceof YAHOO.widget.MenuBar)&&R.cfg.getProperty("position")=="dynamic"){R.hide();}}}},getVisible:function(){return Q;},getMenus:function(){return F;},getMenu:function(S){var R=F[S];if(R){return R;}},getMenuItem:function(R){var S=J[R];if(S){return S;}},getMenuItemGroup:function(U){var S=B.!
 get(U),R,W,V,T;if(S&&S.tagName&&S.tagName.toUpperCase()=="UL"){W=S.firstChild;if(W){R=[];do{T=W.id;if(T){V=this.getMenuItem(T);if(V){R[R.length]=V;}}}while((W=W.nextSibling));if(R.length>0){return R;}}}},getFocusedMenuItem:function(){return K;},getFocusedMenu:function(){if(K){return(K.parent.getRoot());}},toString:function(){return"MenuManager";}};}();})();(function(){YAHOO.widget.Menu=function(O,N){if(N){this.parent=N.parent;this.lazyLoad=N.lazyLoad||N.lazyload;this.itemData=N.itemData||N.itemdata;}YAHOO.widget.Menu.superclass.constructor.call(this,O,N);};function I(N){if(typeof N=="string"){return("dynamic,static".indexOf((N.toLowerCase()))!=-1);}}var C=YAHOO.util.Dom,M=YAHOO.util.Event,D=YAHOO.widget.Module,B=YAHOO.widget.Overlay,F=YAHOO.widget.Menu,K=YAHOO.widget.MenuManager,L=YAHOO.util.CustomEvent,E=YAHOO.lang,H=YAHOO.env.ua,G,A={"MOUSE_OVER":"mouseover","MOUSE_OUT":"mouseout","MOUSE_DOWN":"mousedown","MOUSE_UP":"mouseup","CLICK":"click","KEY_PRESS":"keypress","KEY_DO!
 WN":"keydown","KEY_UP":"keyup","FOCUS":"focus","BLUR":"blur","!
 ITEM_ADD
ED":"itemAdded","ITEM_REMOVED":"itemRemoved"},J={"VISIBLE":{key:"visible",value:false,validator:E.isBoolean},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:true,validator:E.isBoolean,supercedes:["iframe","x","y","xy"]},"POSITION":{key:"position",value:"dynamic",validator:I,supercedes:["visible","iframe"]},"SUBMENU_ALIGNMENT":{key:"submenualignment",value:["tl","tr"],suppressEvent:true},"AUTO_SUBMENU_DISPLAY":{key:"autosubmenudisplay",value:true,validator:E.isBoolean,suppressEvent:true},"SHOW_DELAY":{key:"showdelay",value:250,validator:E.isNumber,suppressEvent:true},"HIDE_DELAY":{key:"hidedelay",value:0,validator:E.isNumber,suppressEvent:true},"SUBMENU_HIDE_DELAY":{key:"submenuhidedelay",value:250,validator:E.isNumber,suppressEvent:true},"CLICK_TO_HIDE":{key:"clicktohide",value:true,validator:E.isBoolean,suppressEvent:true},"CONTAINER":{key:"container",suppressEvent:true},"SCROLL_INCREMENT":{key:"scrollincrement",value:1,validator:E.isNumber,supercedes:["maxheight"]!
 ,suppressEvent:true},"MIN_SCROLL_HEIGHT":{key:"minscrollheight",value:90,validator:E.isNumber,supercedes:["maxheight"],suppressEvent:true},"MAX_HEIGHT":{key:"maxheight",value:0,validator:E.isNumber,supercedes:["iframe"],suppressEvent:true},"CLASS_NAME":{key:"classname",value:null,validator:E.isString,suppressEvent:true},"DISABLED":{key:"disabled",value:false,validator:E.isBoolean,suppressEvent:true}};YAHOO.lang.extend(F,B,{CSS_CLASS_NAME:"yuimenu",ITEM_TYPE:null,GROUP_TITLE_TAG_NAME:"h6",OFF_SCREEN_POSITION:[-10000,-10000],_nHideDelayId:null,_nShowDelayId:null,_nSubmenuHideDelayId:null,_nBodyScrollId:null,_bHideDelayEventHandlersAssigned:false,_bHandledMouseOverEvent:false,_bHandledMouseOutEvent:false,_aGroupTitleElements:null,_aItemGroups:null,_aListElements:null,_nCurrentMouseX:0,_bStopMouseEventHandlers:false,_sClassName:null,lazyLoad:false,itemData:null,activeItem:null,parent:null,srcElement:null,mouseOverEvent:null,mouseOutEvent:null,mouseDownEvent:null,mouseUpEvent:nu!
 ll,clickEvent:null,keyPressEvent:null,keyDownEvent:null,keyUpE!
 vent:nul
l,itemAddedEvent:null,itemRemovedEvent:null,init:function(P,O){this._aItemGroups=[];
+this._aListElements=[];this._aGroupTitleElements=[];if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuItem;}var N;if(typeof P=="string"){N=document.getElementById(P);}else{if(P.tagName){N=P;}}if(N&&N.tagName){switch(N.tagName.toUpperCase()){case"DIV":this.srcElement=N;if(!N.id){N.setAttribute("id",C.generateId());}F.superclass.init.call(this,N);this.beforeInitEvent.fire(F);break;case"SELECT":this.srcElement=N;F.superclass.init.call(this,C.generateId());this.beforeInitEvent.fire(F);break;}}else{F.superclass.init.call(this,P);this.beforeInitEvent.fire(F);}if(this.element){C.addClass(this.element,this.CSS_CLASS_NAME);this.initEvent.subscribe(this._onInit);this.beforeRenderEvent.subscribe(this._onBeforeRender);this.renderEvent.subscribe(this._onRender);this.renderEvent.subscribe(this.onRender);this.beforeShowEvent.subscribe(this._onBeforeShow);this.hideEvent.subscribe(this.positionOffScreen);this.showEvent.subscribe(this._onShow);this.beforeHideEvent.subscribe(this._onBeforeH!
 ide);this.mouseOverEvent.subscribe(this._onMouseOver);this.mouseOutEvent.subscribe(this._onMouseOut);this.clickEvent.subscribe(this._onClick);this.keyDownEvent.subscribe(this._onKeyDown);this.keyPressEvent.subscribe(this._onKeyPress);if(H.gecko||H.webkit){this.cfg.subscribeToConfigEvent("y",this._onYChange);}if(O){this.cfg.applyConfig(O,true);}K.addMenu(this);this.initEvent.fire(F);}},_initSubTree:function(){var O=this.srcElement,N,Q,T,U,S,R,P;if(O){N=(O.tagName&&O.tagName.toUpperCase());if(N=="DIV"){U=this.body.firstChild;if(U){Q=0;T=this.GROUP_TITLE_TAG_NAME.toUpperCase();do{if(U&&U.tagName){switch(U.tagName.toUpperCase()){case T:this._aGroupTitleElements[Q]=U;break;case"UL":this._aListElements[Q]=U;this._aItemGroups[Q]=[];Q++;break;}}}while((U=U.nextSibling));if(this._aListElements[0]){C.addClass(this._aListElements[0],"first-of-type");}}}U=null;if(N){switch(N){case"DIV":S=this._aListElements;R=S.length;if(R>0){P=R-1;do{U=S[P].firstChild;if(U){do{if(U&&U.tagName&&U.tagNa!
 me.toUpperCase()=="LI"){this.addItem(new this.ITEM_TYPE(U,{par!
 ent:this
}),P);}}while((U=U.nextSibling));}}while(P--);}break;case"SELECT":U=O.firstChild;do{if(U&&U.tagName){switch(U.tagName.toUpperCase()){case"OPTGROUP":case"OPTION":this.addItem(new this.ITEM_TYPE(U,{parent:this}));break;}}}while((U=U.nextSibling));break;}}}},_getFirstEnabledItem:function(){var N=this.getItems(),Q=N.length,P;for(var O=0;O<Q;O++){P=N[O];if(P&&!P.cfg.getProperty("disabled")&&P.element.style.display!="none"){return P;}}},_addItemToGroup:function(S,T,W){var U,X,Q,V,R,O,P;function N(Y,Z){return(Y[Z]||N(Y,(Z+1)));}if(T instanceof this.ITEM_TYPE){U=T;U.parent=this;}else{if(typeof T=="string"){U=new this.ITEM_TYPE(T,{parent:this});}else{if(typeof T=="object"){T.parent=this;U=new this.ITEM_TYPE(T.text,T);}}}if(U){if(U.cfg.getProperty("selected")){this.activeItem=U;}X=typeof S=="number"?S:0;Q=this._getItemGroup(X);if(!Q){Q=this._createItemGroup(X);}if(typeof W=="number"){R=(W>=Q.length);if(Q[W]){Q.splice(W,0,U);}else{Q[W]=U;}V=Q[W];if(V){if(R&&(!V.element.parentNode||V.el!
 ement.parentNode.nodeType==11)){this._aListElements[X].appendChild(V.element);}else{O=N(Q,(W+1));if(O&&(!V.element.parentNode||V.element.parentNode.nodeType==11)){this._aListElements[X].insertBefore(V.element,O.element);}}V.parent=this;this._subscribeToItemEvents(V);this._configureSubmenu(V);this._updateItemProperties(X);this.itemAddedEvent.fire(V);this.changeContentEvent.fire();return V;}}else{P=Q.length;Q[P]=U;V=Q[P];if(V){if(!C.isAncestor(this._aListElements[X],V.element)){this._aListElements[X].appendChild(V.element);}V.element.setAttribute("groupindex",X);V.element.setAttribute("index",P);V.parent=this;V.index=P;V.groupIndex=X;this._subscribeToItemEvents(V);this._configureSubmenu(V);if(P===0){C.addClass(V.element,"first-of-type");}this.itemAddedEvent.fire(V);this.changeContentEvent.fire();return V;}}}},_removeItemFromGroupByIndex:function(Q,O){var P=typeof Q=="number"?Q:0,R=this._getItemGroup(P),T,S,N;if(R){T=R.splice(O,1);S=T[0];if(S){this._updateItemProperties(P);if(!
 R.length===0){N=this._aListElements[P];if(this.body&&N){this.b!
 ody.remo
veChild(N);}this._aItemGroups.splice(P,1);this._aListElements.splice(P,1);N=this._aListElements[0];if(N){C.addClass(N,"first-of-type");}}this.itemRemovedEvent.fire(S);this.changeContentEvent.fire();return S;}}},_removeItemFromGroupByValue:function(P,N){var R=this._getItemGroup(P),S,Q,O;if(R){S=R.length;Q=-1;if(S>0){O=S-1;do{if(R[O]==N){Q=O;break;}}while(O--);if(Q>-1){return(this._removeItemFromGroupByIndex(P,Q));}}}},_updateItemProperties:function(O){var P=this._getItemGroup(O),S=P.length,R,Q,N;if(S>0){N=S-1;do{R=P[N];if(R){Q=R.element;R.index=N;R.groupIndex=O;Q.setAttribute("groupindex",O);Q.setAttribute("index",N);C.removeClass(Q,"first-of-type");}}while(N--);if(Q){C.addClass(Q,"first-of-type");}}},_createItemGroup:function(O){var N;if(!this._aItemGroups[O]){this._aItemGroups[O]=[];N=document.createElement("ul");this._aListElements[O]=N;return this._aItemGroups[O];}},_getItemGroup:function(O){var N=((typeof O=="number")?O:0);return this._aItemGroups[N];},_configureSubmenu:!
 function(N){var O=N.cfg.getProperty("submenu");if(O){this.cfg.configChangedEvent.subscribe(this._onParentMenuConfigChange,O,true);this.renderEvent.subscribe(this._onParentMenuRender,O,true);O.beforeShowEvent.subscribe(this._onSubmenuBeforeShow);}},_subscribeToItemEvents:function(N){N.focusEvent.subscribe(this._onMenuItemFocus);N.blurEvent.subscribe(this._onMenuItemBlur);N.destroyEvent.subscribe(this._onMenuItemDestroy,N,this);N.cfg.configChangedEvent.subscribe(this._onMenuItemConfigChange,N,this);},_onVisibleChange:function(P,O){var N=O[0];if(N){C.addClass(this.element,"visible");}else{C.removeClass(this.element,"visible");}},_cancelHideDelay:function(){var N=this.getRoot();if(N._nHideDelayId){window.clearTimeout(N._nHideDelayId);}},_execHideDelay:function(){this._cancelHideDelay();var O=this.getRoot(),P=this;function N(){if(O.activeItem){O.clearActiveItem();}if(O==P&&!(P instanceof YAHOO.widget.MenuBar)&&P.cfg.getProperty("position")=="dynamic"){P.hide();
+}}O._nHideDelayId=window.setTimeout(N,O.cfg.getProperty("hidedelay"));},_cancelShowDelay:function(){var N=this.getRoot();if(N._nShowDelayId){window.clearTimeout(N._nShowDelayId);}},_execShowDelay:function(P){var O=this.getRoot();function N(){if(P.parent.cfg.getProperty("selected")){P.show();}}O._nShowDelayId=window.setTimeout(N,O.cfg.getProperty("showdelay"));},_execSubmenuHideDelay:function(Q,O,N){var P=this;Q._nSubmenuHideDelayId=window.setTimeout(function(){if(P._nCurrentMouseX>(O+10)){Q._nSubmenuHideDelayId=window.setTimeout(function(){Q.hide();},N);}else{Q.hide();}},50);},_disableScrollHeader:function(){if(!this._bHeaderDisabled){C.addClass(this.header,"topscrollbar_disabled");this._bHeaderDisabled=true;}},_disableScrollFooter:function(){if(!this._bFooterDisabled){C.addClass(this.footer,"bottomscrollbar_disabled");this._bFooterDisabled=true;}},_enableScrollHeader:function(){if(this._bHeaderDisabled){C.removeClass(this.header,"topscrollbar_disabled");this._bHeaderDisabl!
 ed=false;}},_enableScrollFooter:function(){if(this._bFooterDisabled){C.removeClass(this.footer,"bottomscrollbar_disabled");this._bFooterDisabled=false;}},_onMouseOver:function(W,R){if(this._bStopMouseEventHandlers){return false;}var X=R[0],V=R[1],N=M.getTarget(X),O,Q,U,P,T,S;if(!this._bHandledMouseOverEvent&&(N==this.element||C.isAncestor(this.element,N))){this._nCurrentMouseX=0;M.on(this.element,"mousemove",this._onMouseMove,this,true);this.clearActiveItem();if(this.parent&&this._nSubmenuHideDelayId){window.clearTimeout(this._nSubmenuHideDelayId);this.parent.cfg.setProperty("selected",true);O=this.parent.parent;O._bHandledMouseOutEvent=true;O._bHandledMouseOverEvent=false;}this._bHandledMouseOverEvent=true;this._bHandledMouseOutEvent=false;}if(V&&!V.handledMouseOverEvent&&!V.cfg.getProperty("disabled")&&(N==V.element||C.isAncestor(V.element,N))){Q=this.cfg.getProperty("showdelay");U=(Q>0);if(U){this._cancelShowDelay();}P=this.activeItem;if(P){P.cfg.setProperty("selected",f!
 alse);}T=V.cfg;T.setProperty("selected",true);if(this.hasFocus!
 ()){V.fo
cus();}if(this.cfg.getProperty("autosubmenudisplay")){S=T.getProperty("submenu");if(S){if(U){this._execShowDelay(S);}else{S.show();}}}V.handledMouseOverEvent=true;V.handledMouseOutEvent=false;}},_onMouseOut:function(V,P){if(this._bStopMouseEventHandlers){return false;}var W=P[0],T=P[1],Q=M.getRelatedTarget(W),U=false,S,R,N,O;if(T&&!T.cfg.getProperty("disabled")){S=T.cfg;R=S.getProperty("submenu");if(R&&(Q==R.element||C.isAncestor(R.element,Q))){U=true;}if(!T.handledMouseOutEvent&&((Q!=T.element&&!C.isAncestor(T.element,Q))||U)){if(!U){T.cfg.setProperty("selected",false);if(R){N=this.cfg.getProperty("submenuhidedelay");O=this.cfg.getProperty("showdelay");if(!(this instanceof YAHOO.widget.MenuBar)&&N>0&&O>=N){this._execSubmenuHideDelay(R,M.getPageX(W),N);}else{R.hide();}}}T.handledMouseOutEvent=true;T.handledMouseOverEvent=false;}}if(!this._bHandledMouseOutEvent&&((Q!=this.element&&!C.isAncestor(this.element,Q))||U)){M.removeListener(this.element,"mousemove",this._onMouseMove)!
 ;this._nCurrentMouseX=M.getPageX(W);this._bHandledMouseOutEvent=true;this._bHandledMouseOverEvent=false;}},_onMouseMove:function(O,N){if(this._bStopMouseEventHandlers){return false;}this._nCurrentMouseX=M.getPageX(O);},_onClick:function(W,P){var X=P[0],S=P[1],Q,U=false,O,N,R,T,V;if(S&&!S.cfg.getProperty("disabled")){Q=S.cfg.getProperty("submenu");R=S.cfg.getProperty("url");if(R){T=R.indexOf("#");V=R.length;if(T!=-1){R=R.substr(T,V);V=R.length;if(V>1){N=R.substr(1,V);U=C.isAncestor(this.element,N);}else{if(V===1){U=true;}}}}if(U&&!S.cfg.getProperty("target")){M.preventDefault(X);S.focus();}if(!Q){O=this.getRoot();if(O instanceof YAHOO.widget.MenuBar||O.cfg.getProperty("position")=="static"){O.clearActiveItem();}else{O.hide();}}}},_onKeyDown:function(b,V){var Y=V[0],X=V[1],f=this,U,Z,O,S,c,N,e,R,a,Q,W,d,T;function P(){f._bStopMouseEventHandlers=true;window.setTimeout(function(){f._bStopMouseEventHandlers=false;},10);}if(X&&!X.cfg.getProperty("disabled")){Z=X.cfg;O=this.parent!
 ;switch(Y.keyCode){case 38:case 40:c=(Y.keyCode==38)?X.getPrev!
 iousEnab
ledSibling():X.getNextEnabledSibling();if(c){this.clearActiveItem();c.cfg.setProperty("selected",true);c.focus();if(this.cfg.getProperty("maxheight")>0){N=this.body;e=N.scrollTop;R=N.offsetHeight;a=this.getItems();Q=a.length-1;W=c.element.offsetTop;if(Y.keyCode==40){if(W>=(R+e)){N.scrollTop=W-R;}else{if(W<=e){N.scrollTop=0;}}if(c==a[Q]){N.scrollTop=c.element.offsetTop;}}else{if(W<=e){N.scrollTop=W-c.element.offsetHeight;}else{if(W>=(e+R)){N.scrollTop=W;}}if(c==a[0]){N.scrollTop=0;}}e=N.scrollTop;d=N.scrollHeight-N.offsetHeight;if(e===0){this._disableScrollHeader();this._enableScrollFooter();}else{if(e==d){this._enableScrollHeader();this._disableScrollFooter();}else{this._enableScrollHeader();this._enableScrollFooter();}}}}M.preventDefault(Y);P();break;case 39:U=Z.getProperty("submenu");if(U){if(!Z.getProperty("selected")){Z.setProperty("selected",true);}U.show();U.setInitialFocus();U.setInitialSelection();}else{S=this.getRoot();if(S instanceof YAHOO.widget.MenuBar){c=S.activ!
 eItem.getNextEnabledSibling();if(c){S.clearActiveItem();c.cfg.setProperty("selected",true);U=c.cfg.getProperty("submenu");if(U){U.show();}c.focus();}}}M.preventDefault(Y);P();break;case 37:if(O){T=O.parent;if(T instanceof YAHOO.widget.MenuBar){c=T.activeItem.getPreviousEnabledSibling();if(c){T.clearActiveItem();c.cfg.setProperty("selected",true);U=c.cfg.getProperty("submenu");if(U){U.show();}c.focus();}}else{this.hide();O.focus();}}M.preventDefault(Y);P();break;}}if(Y.keyCode==27){if(this.cfg.getProperty("position")=="dynamic"){this.hide();if(this.parent){this.parent.focus();}}else{if(this.activeItem){U=this.activeItem.cfg.getProperty("submenu");if(U&&U.cfg.getProperty("visible")){U.hide();this.activeItem.focus();}else{this.activeItem.blur();this.activeItem.cfg.setProperty("selected",false);}}}M.preventDefault(Y);}},_onKeyPress:function(P,O){var N=O[0];if(N.keyCode==40||N.keyCode==38){M.preventDefault(N);}},_onYChange:function(O,N){var Q=this.parent,S,P,R;
+if(Q){S=Q.parent.body.scrollTop;if(S>0){R=(this.cfg.getProperty("y")-S);C.setY(this.element,R);P=this.iframe;if(P){C.setY(P,R);}this.cfg.setProperty("y",R,true);}}},_onScrollTargetMouseOver:function(T,W){this._cancelHideDelay();var P=M.getTarget(T),R=this.body,V=this,Q=this.cfg.getProperty("scrollincrement"),N,O;function U(){var X=R.scrollTop;if(X<N){R.scrollTop=(X+Q);V._enableScrollHeader();}else{R.scrollTop=N;window.clearInterval(V._nBodyScrollId);V._disableScrollFooter();}}function S(){var X=R.scrollTop;if(X>0){R.scrollTop=(X-Q);V._enableScrollFooter();}else{R.scrollTop=0;window.clearInterval(V._nBodyScrollId);V._disableScrollHeader();}}if(C.hasClass(P,"hd")){O=S;}else{N=R.scrollHeight-R.offsetHeight;O=U;}this._nBodyScrollId=window.setInterval(O,10);},_onScrollTargetMouseOut:function(O,N){window.clearInterval(this._nBodyScrollId);this._cancelHideDelay();},_onInit:function(O,N){this.cfg.subscribeToConfigEvent("visible",this._onVisibleChange);var P=!this.parent,Q=this.lazy!
 Load;if(((P&&!Q)||(P&&(this.cfg.getProperty("visible")||this.cfg.getProperty("position")=="static"))||(!P&&!Q))&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree();}if(this.itemData){this.addItems(this.itemData);}}else{if(Q){this.cfg.fireQueue();}}},_onBeforeRender:function(Q,P){var R=this.element,U=this._aListElements.length,O=true,T=0,N,S;if(U>0){do{N=this._aListElements[T];if(N){if(O){C.addClass(N,"first-of-type");O=false;}if(!C.isAncestor(R,N)){this.appendToBody(N);}S=this._aGroupTitleElements[T];if(S){if(!C.isAncestor(R,S)){N.parentNode.insertBefore(S,N);}C.addClass(N,"hastitle");}}T++;}while(T<U);}},_onRender:function(O,N){if(this.cfg.getProperty("position")=="dynamic"){if(!this.cfg.getProperty("visible")){this.positionOffScreen();}}},_onBeforeShow:function(W,R){var V,O,S,Q,T;if(this.lazyLoad&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree();}if(this.itemData){if(this.parent&&this.parent.parent&&this.parent.parent.srcEleme!
 nt&&this.parent.parent.srcElement.tagName.toUpperCase()=="SELE!
 CT"){V=t
his.itemData.length;for(O=0;O<V;O++){if(this.itemData[O].tagName){this.addItem((new this.ITEM_TYPE(this.itemData[O])));}}}else{this.addItems(this.itemData);}}T=this.srcElement;if(T){if(T.tagName.toUpperCase()=="SELECT"){if(C.inDocument(T)){this.render(T.parentNode);}else{this.render(this.cfg.getProperty("container"));}}else{this.render();}}else{if(this.parent){this.render(this.parent.element);}else{this.render(this.cfg.getProperty("container"));}}}var P=this.cfg.getProperty("maxheight"),N=this.cfg.getProperty("minscrollheight"),U=this.cfg.getProperty("position")=="dynamic";if(!this.parent&&U){this.cfg.refireEvent("xy");}function X(){this.cfg.setProperty("maxheight",0);this.hideEvent.unsubscribe(X);}if(!(this instanceof YAHOO.widget.MenuBar)&&U){if(P===0){S=C.getViewportHeight();if(this.parent&&this.parent.parent instanceof YAHOO.widget.MenuBar){Q=YAHOO.util.Region.getRegion(this.parent.element);S=(S-Q.bottom);}if(this.element.offsetHeight>=S){P=(S-(B.VIEWPORT_OFFSET*2));if(P!
 <N){P=N;}this.cfg.setProperty("maxheight",P);this.hideEvent.subscribe(X);}}}},_onShow:function(Q,P){var T=this.parent,S,N,O;function R(V){var U;if(V.type=="mousedown"||(V.type=="keydown"&&V.keyCode==27)){U=M.getTarget(V);if(U!=S.element||!C.isAncestor(S.element,U)){S.cfg.setProperty("autosubmenudisplay",false);M.removeListener(document,"mousedown",R);M.removeListener(document,"keydown",R);}}}if(T){S=T.parent;N=S.cfg.getProperty("submenualignment");O=this.cfg.getProperty("submenualignment");if((N[0]!=O[0])&&(N[1]!=O[1])){this.cfg.setProperty("submenualignment",[N[0],N[1]]);}if(!S.cfg.getProperty("autosubmenudisplay")&&(S instanceof YAHOO.widget.MenuBar||S.cfg.getProperty("position")=="static")){S.cfg.setProperty("autosubmenudisplay",true);M.on(document,"mousedown",R);M.on(document,"keydown",R);}}},_onBeforeHide:function(P,O){var N=this.activeItem,R,Q;if(N){R=N.cfg;R.setProperty("selected",false);Q=R.getProperty("submenu");if(Q){Q.hide();}}if(this.getRoot()==this){this.blur()!
 ;}},_onParentMenuConfigChange:function(O,N,R){var P=N[0][0],Q=!
 N[0][1];
switch(P){case"iframe":case"constraintoviewport":case"hidedelay":case"showdelay":case"submenuhidedelay":case"clicktohide":case"effect":case"classname":case"scrollincrement":case"minscrollheight":R.cfg.setProperty(P,Q);break;}},_onParentMenuRender:function(O,N,S){var P=S.parent.parent.cfg,Q={constraintoviewport:P.getProperty("constraintoviewport"),xy:[0,0],clicktohide:P.getProperty("clicktohide"),effect:P.getProperty("effect"),showdelay:P.getProperty("showdelay"),hidedelay:P.getProperty("hidedelay"),submenuhidedelay:P.getProperty("submenuhidedelay"),classname:P.getProperty("classname"),scrollincrement:P.getProperty("scrollincrement"),minscrollheight:P.getProperty("minscrollheight"),iframe:P.getProperty("iframe")},R;S.cfg.applyConfig(Q);if(!this.lazyLoad){R=this.parent.element;if(this.element.parentNode==R){this.render();}else{this.render(R);}}},_onSubmenuBeforeShow:function(P,O){var Q=this.parent,N=Q.parent.cfg.getProperty("submenualignment");if(!this.cfg.getProperty("context!
 ")){this.cfg.setProperty("context",[Q.element,N[0],N[1]]);}else{this.align();}},_onMenuItemFocus:function(O,N){this.parent.focusEvent.fire(this);},_onMenuItemBlur:function(O,N){this.parent.blurEvent.fire(this);},_onMenuItemDestroy:function(P,O,N){this._removeItemFromGroupByValue(N.groupIndex,N);},_onMenuItemConfigChange:function(P,O,N){var R=O[0][0],S=O[0][1],Q;switch(R){case"selected":if(S===true){this.activeItem=N;}break;case"submenu":Q=O[0][1];if(Q){this._configureSubmenu(N);}break;}},enforceConstraints:function(Q,P,W){var j=this.parent,f=B.VIEWPORT_OFFSET,b=this.element,S=this.cfg,T=P[0],R=b.offsetHeight,c=b.offsetWidth,i=C.getViewportWidth(),a=C.getViewportHeight(),Z=(j&&j.parent instanceof YAHOO.widget.MenuBar)?0:f,d=S.getProperty("context"),X=d?d[0]:null,Y,h,O,N,g,e,V,U;if(c<i){V=T[0];g=C.getDocumentScrollLeft();h=g+Z;N=g+i-c-Z;if(V<f){V=h;}else{if((V+c)>i){if(X&&((V-X.offsetWidth)>c)){if(j&&j.parent instanceof YAHOO.widget.MenuBar){V=(V-(c-X.offsetWidth));
+}else{V=(V-(X.offsetWidth+c));}}else{V=N;}}}}if(R<a){U=T[1];e=C.getDocumentScrollTop();Y=e+Z;O=e+a-R-Z;if(U<f){U=Y;}else{if(U>O){if(X&&(U>R)){U=((U+X.offsetHeight)-R);}else{U=O;}}}}S.setProperty("x",V,true);S.setProperty("y",U,true);S.setProperty("xy",[V,U],true);},configVisible:function(P,O,Q){var N,R;if(this.cfg.getProperty("position")=="dynamic"){F.superclass.configVisible.call(this,P,O,Q);}else{N=O[0];R=C.getStyle(this.element,"display");C.setStyle(this.element,"visibility","visible");if(N){if(R!="block"){this.beforeShowEvent.fire();C.setStyle(this.element,"display","block");this.showEvent.fire();}}else{if(R=="block"){this.beforeHideEvent.fire();C.setStyle(this.element,"display","none");this.hideEvent.fire();}}}},configPosition:function(P,O,S){var R=this.element,Q=O[0]=="static"?"static":"absolute",T=this.cfg,N;C.setStyle(R,"position",Q);if(Q=="static"){C.setStyle(R,"display","block");T.setProperty("visible",true);}else{C.setStyle(R,"visibility","hidden");}if(Q=="absolu!
 te"){N=T.getProperty("zindex");if(!N||N===0){N=this.parent?(this.parent.parent.cfg.getProperty("zindex")+1):1;T.setProperty("zindex",N);}}},configIframe:function(O,N,P){if(this.cfg.getProperty("position")=="dynamic"){F.superclass.configIframe.call(this,O,N,P);}},configHideDelay:function(O,N,R){var T=N[0],S=this.mouseOutEvent,P=this.mouseOverEvent,Q=this.keyDownEvent;if(T>0){if(!this._bHideDelayEventHandlersAssigned){S.subscribe(this._execHideDelay);P.subscribe(this._cancelHideDelay);Q.subscribe(this._cancelHideDelay);this._bHideDelayEventHandlersAssigned=true;}}else{S.unsubscribe(this._execHideDelay);P.unsubscribe(this._cancelHideDelay);Q.unsubscribe(this._cancelHideDelay);this._bHideDelayEventHandlersAssigned=false;}},configContainer:function(O,N,Q){var P=N[0];if(typeof P=="string"){this.cfg.setProperty("container",document.getElementById(P),true);}},_setMaxHeight:function(O,N,P){this.cfg.setProperty("maxheight",P);this.renderEvent.unsubscribe(this._setMaxHeight);},configM!
 axHeight:function(Y,T,W){var S=T[0],P=this.element,Q=this.body!
 ,X=this.
header,O=this.footer,V=this._onScrollTargetMouseOver,Z=this._onScrollTargetMouseOut,N=this.cfg.getProperty("minscrollheight"),U,R;if(S!==0&&S<N){S=N;}if(this.lazyLoad&&!Q){this.renderEvent.unsubscribe(this._setMaxHeight);if(S>0){this.renderEvent.subscribe(this._setMaxHeight,S,this);}return ;}C.setStyle(Q,"height","");C.removeClass(Q,"yui-menu-body-scrolled");if(H.gecko&&this.parent&&this.parent.parent&&this.parent.parent.cfg.getProperty("position")=="dynamic"&&!this.cfg.getProperty("width")){R=P.offsetWidth;P.style.width=R+"px";P.style.width=(R-(P.offsetWidth-R))+"px";}if(!X&&!O){this.setHeader(" ");this.setFooter(" ");X=this.header;O=this.footer;C.addClass(X,"topscrollbar");C.addClass(O,"bottomscrollbar");P.insertBefore(X,Q);P.appendChild(O);}U=(S-(X.offsetHeight+X.offsetHeight));if(U>0&&(Q.offsetHeight>S)){C.addClass(Q,"yui-menu-body-scrolled");C.setStyle(Q,"height",(U+"px"));M.on(X,"mouseover",V,this,true);M.on(X,"mouseout",Z,this,true);M.on(O,"mouseover",V,this,t!
 rue);M.on(O,"mouseout",Z,this,true);this._disableScrollHeader();this._enableScrollFooter();}else{if(X&&O){this._enableScrollHeader();this._enableScrollFooter();M.removeListener(X,"mouseover",V);M.removeListener(X,"mouseout",Z);M.removeListener(O,"mouseover",V);M.removeListener(O,"mouseout",Z);P.removeChild(X);P.removeChild(O);this.header=null;this.footer=null;}}this.cfg.refireEvent("iframe");},configClassName:function(P,O,Q){var N=O[0];if(this._sClassName){C.removeClass(this.element,this._sClassName);}C.addClass(this.element,N);this._sClassName=N;},_onItemAdded:function(O,N){var P=N[0];if(P){P.cfg.setProperty("disabled",true);}},configDisabled:function(P,O,S){var R=O[0],N=this.getItems(),T,Q;if(E.isArray(N)){T=N.length;if(T>0){Q=T-1;do{N[Q].cfg.setProperty("disabled",R);}while(Q--);}if(R){this.clearActiveItem(true);C.addClass(this.element,"disabled");this.itemAddedEvent.subscribe(this._onItemAdded);}else{C.removeClass(this.element,"disabled");this.itemAddedEvent.unsubscribe!
 (this._onItemAdded);}}},onRender:function(R,Q){function S(){va!
 r W=this
.element,V=this._shadow;if(V&&W){V.style.width=(W.offsetWidth+6)+"px";V.style.height=(W.offsetHeight+1)+"px";}}function U(){this.element.appendChild(this._shadow);}function O(){C.addClass(this._shadow,"yui-menu-shadow-visible");}function N(){C.removeClass(this._shadow,"yui-menu-shadow-visible");}function T(){var W=this._shadow,V,X;if(!W){V=this.element;X=this;if(!G){G=document.createElement("div");G.className="yui-menu-shadow yui-menu-shadow-visible";}W=G.cloneNode(false);V.appendChild(W);this._shadow=W;this.beforeShowEvent.subscribe(O);this.beforeHideEvent.subscribe(N);if(H.ie){window.setTimeout(function(){S.call(X);X.syncIframe();},0);this.cfg.subscribeToConfigEvent("width",S);this.cfg.subscribeToConfigEvent("height",S);this.cfg.subscribeToConfigEvent("maxheight",S);this.changeContentEvent.subscribe(S);D.textResizeEvent.subscribe(S,X,true);this.destroyEvent.subscribe(function(){D.textResizeEvent.unsubscribe(S,X);});}this.cfg.subscribeToConfigEvent("maxheight",U);}}function!
  P(){T.call(this);this.beforeShowEvent.unsubscribe(P);}if(this.cfg.getProperty("position")=="dynamic"){if(this.cfg.getProperty("visible")){T.call(this);}else{this.beforeShowEvent.subscribe(P);}}},initEvents:function(){F.superclass.initEvents.call(this);var N=L.LIST;this.mouseOverEvent=this.createEvent(A.MOUSE_OVER);this.mouseOverEvent.signature=N;this.mouseOutEvent=this.createEvent(A.MOUSE_OUT);this.mouseOutEvent.signature=N;this.mouseDownEvent=this.createEvent(A.MOUSE_DOWN);this.mouseDownEvent.signature=N;this.mouseUpEvent=this.createEvent(A.MOUSE_UP);this.mouseUpEvent.signature=N;this.clickEvent=this.createEvent(A.CLICK);this.clickEvent.signature=N;this.keyPressEvent=this.createEvent(A.KEY_PRESS);this.keyPressEvent.signature=N;this.keyDownEvent=this.createEvent(A.KEY_DOWN);this.keyDownEvent.signature=N;this.keyUpEvent=this.createEvent(A.KEY_UP);this.keyUpEvent.signature=N;this.focusEvent=this.createEvent(A.FOCUS);
+this.focusEvent.signature=N;this.blurEvent=this.createEvent(A.BLUR);this.blurEvent.signature=N;this.itemAddedEvent=this.createEvent(A.ITEM_ADDED);this.itemAddedEvent.signature=N;this.itemRemovedEvent=this.createEvent(A.ITEM_REMOVED);this.itemRemovedEvent.signature=N;},positionOffScreen:function(){var O=this.iframe,N=this.OFF_SCREEN_POSITION;C.setXY(this.element,N);if(O){C.setXY(O,N);}},getRoot:function(){var O=this.parent,N;if(O){N=O.parent;return N?N.getRoot():this;}else{return this;}},toString:function(){var O="Menu",N=this.id;if(N){O+=(" "+N);}return O;},setItemGroupTitle:function(S,R){var Q,P,O,N;if(typeof S=="string"&&S.length>0){Q=typeof R=="number"?R:0;P=this._aGroupTitleElements[Q];if(P){P.innerHTML=S;}else{P=document.createElement(this.GROUP_TITLE_TAG_NAME);P.innerHTML=S;this._aGroupTitleElements[Q]=P;}O=this._aGroupTitleElements.length-1;do{if(this._aGroupTitleElements[O]){C.removeClass(this._aGroupTitleElements[O],"first-of-type");N=O;}}while(O--);if(N!==null){C.!
 addClass(this._aGroupTitleElements[N],"first-of-type");}this.changeContentEvent.fire();}},addItem:function(N,O){if(N){return this._addItemToGroup(O,N);}},addItems:function(Q,P){var S,N,R,O;if(E.isArray(Q)){S=Q.length;N=[];for(O=0;O<S;O++){R=Q[O];if(R){if(E.isArray(R)){N[N.length]=this.addItems(R,O);}else{N[N.length]=this._addItemToGroup(P,R);}}}if(N.length){return N;}}},insertItem:function(N,O,P){if(N){return this._addItemToGroup(P,N,O);}},removeItem:function(N,O){var P;if(typeof N!="undefined"){if(N instanceof YAHOO.widget.MenuItem){P=this._removeItemFromGroupByValue(O,N);}else{if(typeof N=="number"){P=this._removeItemFromGroupByIndex(O,N);}}if(P){P.destroy();return P;}}},getItems:function(){var P=this._aItemGroups,O,N=[];if(E.isArray(P)){O=P.length;return((O==1)?P[0]:(Array.prototype.concat.apply(N,P)));}},getItemGroups:function(){return this._aItemGroups;},getItem:function(N,O){var P;if(typeof N=="number"){P=this._getItemGroup(O);if(P){return P[N];}}},getSubmenus:functio!
 n(){var O=this.getItems(),S=O.length,N,P,R,Q;if(S>0){N=[];for(!
 Q=0;Q<S;
Q++){R=O[Q];if(R){P=R.cfg.getProperty("submenu");if(P){N[N.length]=P;}}}}return N;},clearContent:function(){var R=this.getItems(),O=R.length,P=this.element,Q=this.body,V=this.header,N=this.footer,U,T,S;if(O>0){S=O-1;do{U=R[S];if(U){T=U.cfg.getProperty("submenu");if(T){this.cfg.configChangedEvent.unsubscribe(this._onParentMenuConfigChange,T);this.renderEvent.unsubscribe(this._onParentMenuRender,T);}this.removeItem(U);}}while(S--);}if(V){M.purgeElement(V);P.removeChild(V);}if(N){M.purgeElement(N);P.removeChild(N);}if(Q){M.purgeElement(Q);Q.innerHTML="";}this.activeItem=null;this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];this.cfg.setProperty("width",null);},destroy:function(){this.clearContent();this._aItemGroups=null;this._aListElements=null;this._aGroupTitleElements=null;F.superclass.destroy.call(this);},setInitialFocus:function(){var N=this._getFirstEnabledItem();if(N){N.focus();}},setInitialSelection:function(){var N=this._getFirstEnabledItem();if(!
 N){N.cfg.setProperty("selected",true);}},clearActiveItem:function(P){if(this.cfg.getProperty("showdelay")>0){this._cancelShowDelay();}var N=this.activeItem,Q,O;if(N){Q=N.cfg;if(P){N.blur();}Q.setProperty("selected",false);O=Q.getProperty("submenu");if(O){O.hide();}this.activeItem=null;}},focus:function(){if(!this.hasFocus()){this.setInitialFocus();}},blur:function(){var N;if(this.hasFocus()){N=K.getFocusedMenuItem();if(N){N.blur();}}},hasFocus:function(){return(K.getFocusedMenu()==this.getRoot());},subscribe:function(){function Q(V,U,X){var Y=U[0],W=Y.cfg.getProperty("submenu");if(W){W.subscribe.apply(W,X);}}function T(V,U,X){var W=this.cfg.getProperty("submenu");if(W){W.subscribe.apply(W,X);}}F.superclass.subscribe.apply(this,arguments);F.superclass.subscribe.call(this,"itemAdded",Q,arguments);var N=this.getItems(),S,R,O,P;if(N){S=N.length;if(S>0){P=S-1;do{R=N[P];O=R.cfg.getProperty("submenu");if(O){O.subscribe.apply(O,arguments);}else{R.cfg.subscribeToConfigEvent("submenu!
 ",T,arguments);}}while(P--);}}},initDefaultConfig:function(){F!
 .supercl
ass.initDefaultConfig.call(this);var N=this.cfg;N.addProperty(J.VISIBLE.key,{handler:this.configVisible,value:J.VISIBLE.value,validator:J.VISIBLE.validator});N.addProperty(J.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:J.CONSTRAIN_TO_VIEWPORT.value,validator:J.CONSTRAIN_TO_VIEWPORT.validator,supercedes:J.CONSTRAIN_TO_VIEWPORT.supercedes});N.addProperty(J.POSITION.key,{handler:this.configPosition,value:J.POSITION.value,validator:J.POSITION.validator,supercedes:J.POSITION.supercedes});N.addProperty(J.SUBMENU_ALIGNMENT.key,{value:J.SUBMENU_ALIGNMENT.value,suppressEvent:J.SUBMENU_ALIGNMENT.suppressEvent});N.addProperty(J.AUTO_SUBMENU_DISPLAY.key,{value:J.AUTO_SUBMENU_DISPLAY.value,validator:J.AUTO_SUBMENU_DISPLAY.validator,suppressEvent:J.AUTO_SUBMENU_DISPLAY.suppressEvent});N.addProperty(J.SHOW_DELAY.key,{value:J.SHOW_DELAY.value,validator:J.SHOW_DELAY.validator,suppressEvent:J.SHOW_DELAY.suppressEvent});N.addProperty(J.HIDE_DELAY.key,{handler:this.co!
 nfigHideDelay,value:J.HIDE_DELAY.value,validator:J.HIDE_DELAY.validator,suppressEvent:J.HIDE_DELAY.suppressEvent});N.addProperty(J.SUBMENU_HIDE_DELAY.key,{value:J.SUBMENU_HIDE_DELAY.value,validator:J.SUBMENU_HIDE_DELAY.validator,suppressEvent:J.SUBMENU_HIDE_DELAY.suppressEvent});N.addProperty(J.CLICK_TO_HIDE.key,{value:J.CLICK_TO_HIDE.value,validator:J.CLICK_TO_HIDE.validator,suppressEvent:J.CLICK_TO_HIDE.suppressEvent});N.addProperty(J.CONTAINER.key,{handler:this.configContainer,value:document.body,suppressEvent:J.CONTAINER.suppressEvent});N.addProperty(J.SCROLL_INCREMENT.key,{value:J.SCROLL_INCREMENT.value,validator:J.SCROLL_INCREMENT.validator,supercedes:J.SCROLL_INCREMENT.supercedes,suppressEvent:J.SCROLL_INCREMENT.suppressEvent});N.addProperty(J.MIN_SCROLL_HEIGHT.key,{value:J.MIN_SCROLL_HEIGHT.value,validator:J.MIN_SCROLL_HEIGHT.validator,supercedes:J.MIN_SCROLL_HEIGHT.supercedes,suppressEvent:J.MIN_SCROLL_HEIGHT.suppressEvent});
+N.addProperty(J.MAX_HEIGHT.key,{handler:this.configMaxHeight,value:J.MAX_HEIGHT.value,validator:J.MAX_HEIGHT.validator,suppressEvent:J.MAX_HEIGHT.suppressEvent,supercedes:J.MAX_HEIGHT.supercedes});N.addProperty(J.CLASS_NAME.key,{handler:this.configClassName,value:J.CLASS_NAME.value,validator:J.CLASS_NAME.validator,supercedes:J.CLASS_NAME.supercedes});N.addProperty(J.DISABLED.key,{handler:this.configDisabled,value:J.DISABLED.value,validator:J.DISABLED.validator,suppressEvent:J.DISABLED.suppressEvent});}});})();(function(){YAHOO.widget.MenuItem=function(K,J){if(K){if(J){this.parent=J.parent;this.value=J.value;this.id=J.id;}this.init(K,J);}};var B=YAHOO.util.Dom,C=YAHOO.widget.Module,E=YAHOO.widget.Menu,H=YAHOO.widget.MenuItem,I=YAHOO.util.CustomEvent,F=YAHOO.lang,D,A={"MOUSE_OVER":"mouseover","MOUSE_OUT":"mouseout","MOUSE_DOWN":"mousedown","MOUSE_UP":"mouseup","CLICK":"click","KEY_PRESS":"keypress","KEY_DOWN":"keydown","KEY_UP":"keyup","ITEM_ADDED":"itemAdded","ITEM_REMOVED":!
 "itemRemoved","FOCUS":"focus","BLUR":"blur","DESTROY":"destroy"},G={"TEXT":{key:"text",value:"",validator:F.isString,suppressEvent:true},"HELP_TEXT":{key:"helptext",supercedes:["text"],suppressEvent:true},"URL":{key:"url",value:"#",suppressEvent:true},"TARGET":{key:"target",suppressEvent:true},"EMPHASIS":{key:"emphasis",value:false,validator:F.isBoolean,suppressEvent:true,supercedes:["text"]},"STRONG_EMPHASIS":{key:"strongemphasis",value:false,validator:F.isBoolean,suppressEvent:true,supercedes:["text"]},"CHECKED":{key:"checked",value:false,validator:F.isBoolean,suppressEvent:true,supercedes:["disabled","selected"]},"SUBMENU":{key:"submenu",suppressEvent:true,supercedes:["disabled","selected"]},"DISABLED":{key:"disabled",value:false,validator:F.isBoolean,suppressEvent:true,supercedes:["text","selected"]},"SELECTED":{key:"selected",value:false,validator:F.isBoolean,suppressEvent:true},"ONCLICK":{key:"onclick",suppressEvent:true},"CLASS_NAME":{key:"classname",value:null,valid!
 ator:F.isString,suppressEvent:true}};H.prototype={CSS_CLASS_NA!
 ME:"yuim
enuitem",CSS_LABEL_CLASS_NAME:"yuimenuitemlabel",SUBMENU_TYPE:null,_oAnchor:null,_oHelpTextEM:null,_oSubmenu:null,_oOnclickAttributeValue:null,_sClassName:null,constructor:H,index:null,groupIndex:null,parent:null,element:null,srcElement:null,value:null,browser:C.prototype.browser,id:null,destroyEvent:null,mouseOverEvent:null,mouseOutEvent:null,mouseDownEvent:null,mouseUpEvent:null,clickEvent:null,keyPressEvent:null,keyDownEvent:null,keyUpEvent:null,focusEvent:null,blurEvent:null,init:function(J,R){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=E;}this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();var O=I.LIST,N=this.cfg,P="#",Q,K,M,L;if(F.isString(J)){this._createRootNodeStructure();N.queueProperty("text",J);}else{if(J&&J.tagName){switch(J.tagName.toUpperCase()){case"OPTION":this._createRootNodeStructure();N.queueProperty("text",J.text);N.queueProperty("disabled",J.disabled);this.value=J.value;this.srcElement=J;break;case"OPTGROUP":this._createRootNodeStructure();N.queu!
 eProperty("text",J.label);N.queueProperty("disabled",J.disabled);this.srcElement=J;this._initSubTree();break;case"LI":Q=B.getFirstChild(J);if(Q){P=Q.getAttribute("href");K=Q.getAttribute("target");M=Q.innerHTML;}this.srcElement=J;this.element=J;this._oAnchor=Q;N.setProperty("text",M,true);N.setProperty("url",P,true);N.setProperty("target",K,true);this._initSubTree();break;}}}if(this.element){L=(this.srcElement||this.element).id;if(!L){L=this.id||B.generateId();this.element.id=L;}this.id=L;B.addClass(this.element,this.CSS_CLASS_NAME);B.addClass(this._oAnchor,this.CSS_LABEL_CLASS_NAME);this.mouseOverEvent=this.createEvent(A.MOUSE_OVER);this.mouseOverEvent.signature=O;this.mouseOutEvent=this.createEvent(A.MOUSE_OUT);this.mouseOutEvent.signature=O;this.mouseDownEvent=this.createEvent(A.MOUSE_DOWN);this.mouseDownEvent.signature=O;this.mouseUpEvent=this.createEvent(A.MOUSE_UP);this.mouseUpEvent.signature=O;this.clickEvent=this.createEvent(A.CLICK);this.clickEvent.signature=O;this!
 .keyPressEvent=this.createEvent(A.KEY_PRESS);this.keyPressEven!
 t.signat
ure=O;this.keyDownEvent=this.createEvent(A.KEY_DOWN);this.keyDownEvent.signature=O;this.keyUpEvent=this.createEvent(A.KEY_UP);this.keyUpEvent.signature=O;this.focusEvent=this.createEvent(A.FOCUS);this.focusEvent.signature=O;this.blurEvent=this.createEvent(A.BLUR);this.blurEvent.signature=O;this.destroyEvent=this.createEvent(A.DESTROY);this.destroyEvent.signature=O;if(R){N.applyConfig(R);}N.fireQueue();}},_createRootNodeStructure:function(){var J,K;if(!D){D=document.createElement("li");D.innerHTML="<a href=\"#\"></a>";}J=D.cloneNode(true);J.className=this.CSS_CLASS_NAME;K=J.firstChild;K.className=this.CSS_LABEL_CLASS_NAME;this.element=J;this._oAnchor=K;},_initSubTree:function(){var P=this.srcElement,L=this.cfg,N,M,K,J,O;if(P.childNodes.length>0){if(this.parent.lazyLoad&&this.parent.srcElement&&this.parent.srcElement.tagName.toUpperCase()=="SELECT"){L.setProperty("submenu",{id:B.generateId(),itemdata:P.childNodes});}else{N=P.firstChild;M=[];do{if(N&&N.tagName){switch(N.tagName!
 .toUpperCase()){case"DIV":L.setProperty("submenu",N);break;case"OPTION":M[M.length]=N;break;}}}while((N=N.nextSibling));K=M.length;if(K>0){J=new this.SUBMENU_TYPE(B.generateId());L.setProperty("submenu",J);for(O=0;O<K;O++){J.addItem((new J.ITEM_TYPE(M[O])));}}}}},configText:function(S,L,N){var K=L[0],M=this.cfg,Q=this._oAnchor,J=M.getProperty("helptext"),R="",O="",P="";if(K){if(J){R="<em class=\"helptext\">"+J+"</em>";}if(M.getProperty("emphasis")){O="<em>";P="</em>";}if(M.getProperty("strongemphasis")){O="<strong>";P="</strong>";}Q.innerHTML=(O+K+P+R);}},configHelpText:function(L,K,J){this.cfg.refireEvent("text");},configURL:function(L,K,J){var N=K[0];if(!N){N="#";}var M=this._oAnchor;if(YAHOO.env.ua.opera){M.removeAttribute("href");}M.setAttribute("href",N);},configTarget:function(M,L,K){var J=L[0],N=this._oAnchor;if(J&&J.length>0){N.setAttribute("target",J);}else{N.removeAttribute("target");}},configEmphasis:function(L,K,J){var N=K[0],M=this.cfg;
+if(N&&M.getProperty("strongemphasis")){M.setProperty("strongemphasis",false);}M.refireEvent("text");},configStrongEmphasis:function(M,L,K){var J=L[0],N=this.cfg;if(J&&N.getProperty("emphasis")){N.setProperty("emphasis",false);}N.refireEvent("text");},configChecked:function(S,M,O){var R=M[0],K=this.element,Q=this._oAnchor,N=this.cfg,J="-checked",L=this.CSS_CLASS_NAME+J,P=this.CSS_LABEL_CLASS_NAME+J;if(R){B.addClass(K,L);B.addClass(Q,P);}else{B.removeClass(K,L);B.removeClass(Q,P);}N.refireEvent("text");if(N.getProperty("disabled")){N.refireEvent("disabled");}if(N.getProperty("selected")){N.refireEvent("selected");}},configDisabled:function(X,R,a){var Z=R[0],L=this.cfg,P=L.getProperty("submenu"),O=L.getProperty("checked"),S=this.element,V=this._oAnchor,U="-disabled",W="-checked"+U,Y="-hassubmenu"+U,M=this.CSS_CLASS_NAME+U,N=this.CSS_LABEL_CLASS_NAME+U,T=this.CSS_CLASS_NAME+W,Q=this.CSS_LABEL_CLASS_NAME+W,K=this.CSS_CLASS_NAME+Y,J=this.CSS_LABEL_CLASS_NAME+Y;if(Z){if(L.getPrope!
 rty("selected")){L.setProperty("selected",false);}B.addClass(S,M);B.addClass(V,N);if(P){B.addClass(S,K);B.addClass(V,J);}if(O){B.addClass(S,T);B.addClass(V,Q);}}else{B.removeClass(S,M);B.removeClass(V,N);if(P){B.removeClass(S,K);B.removeClass(V,J);}if(O){B.removeClass(S,T);B.removeClass(V,Q);}}},configSelected:function(X,R,a){var L=this.cfg,Y=R[0],S=this.element,V=this._oAnchor,O=L.getProperty("checked"),P=L.getProperty("submenu"),U="-selected",W="-checked"+U,Z="-hassubmenu"+U,M=this.CSS_CLASS_NAME+U,N=this.CSS_LABEL_CLASS_NAME+U,T=this.CSS_CLASS_NAME+W,Q=this.CSS_LABEL_CLASS_NAME+W,K=this.CSS_CLASS_NAME+Z,J=this.CSS_LABEL_CLASS_NAME+Z;if(YAHOO.env.ua.opera){V.blur();}if(Y&&!L.getProperty("disabled")){B.addClass(S,M);B.addClass(V,N);if(P){B.addClass(S,K);B.addClass(V,J);}if(O){B.addClass(S,T);B.addClass(V,Q);}}else{B.removeClass(S,M);B.removeClass(V,N);if(P){B.removeClass(S,K);B.removeClass(V,J);}if(O){B.removeClass(S,T);B.removeClass(V,Q);}}if(this.hasFocus()&&YAHOO.env.ua!
 .opera){V.focus();}},_onSubmenuBeforeHide:function(M,L){var N=!
 this.par
ent,J;function K(){N._oAnchor.blur();J.beforeHideEvent.unsubscribe(K);}if(N.hasFocus()){J=N.parent;J.beforeHideEvent.subscribe(K);}},configSubmenu:function(V,O,R){var Q=O[0],P=this.cfg,K=this.element,T=this._oAnchor,N=this.parent&&this.parent.lazyLoad,J="-hassubmenu",L=this.CSS_CLASS_NAME+J,S=this.CSS_LABEL_CLASS_NAME+J,U,W,M;if(Q){if(Q instanceof E){U=Q;U.parent=this;U.lazyLoad=N;}else{if(typeof Q=="object"&&Q.id&&!Q.nodeType){W=Q.id;M=Q;M.lazyload=N;M.parent=this;U=new this.SUBMENU_TYPE(W,M);P.setProperty("submenu",U,true);}else{U=new this.SUBMENU_TYPE(Q,{lazyload:N,parent:this});P.setProperty("submenu",U,true);}}if(U){B.addClass(K,L);B.addClass(T,S);this._oSubmenu=U;if(YAHOO.env.ua.opera){U.beforeHideEvent.subscribe(this._onSubmenuBeforeHide);}}}else{B.removeClass(K,L);B.removeClass(T,S);if(this._oSubmenu){this._oSubmenu.destroy();}}if(P.getProperty("disabled")){P.refireEvent("disabled");}if(P.getProperty("selected")){P.refireEvent("selected");}},configOnClick:function(L,!
 K,J){var M=K[0];if(this._oOnclickAttributeValue&&(this._oOnclickAttributeValue!=M)){this.clickEvent.unsubscribe(this._oOnclickAttributeValue.fn,this._oOnclickAttributeValue.obj);this._oOnclickAttributeValue=null;}if(!this._oOnclickAttributeValue&&typeof M=="object"&&typeof M.fn=="function"){this.clickEvent.subscribe(M.fn,((!YAHOO.lang.isUndefined(M.obj))?M.obj:this),M.scope);this._oOnclickAttributeValue=M;}},configClassName:function(M,L,K){var J=L[0];if(this._sClassName){B.removeClass(this.element,this._sClassName);}B.addClass(this.element,J);this._sClassName=J;},initDefaultConfig:function(){var J=this.cfg;J.addProperty(G.TEXT.key,{handler:this.configText,value:G.TEXT.value,validator:G.TEXT.validator,suppressEvent:G.TEXT.suppressEvent});J.addProperty(G.HELP_TEXT.key,{handler:this.configHelpText,supercedes:G.HELP_TEXT.supercedes,suppressEvent:G.HELP_TEXT.suppressEvent});J.addProperty(G.URL.key,{handler:this.configURL,value:G.URL.value,suppressEvent:G.URL.suppressEvent});J.ad!
 dProperty(G.TARGET.key,{handler:this.configTarget,suppressEven!
 t:G.TARG
ET.suppressEvent});J.addProperty(G.EMPHASIS.key,{handler:this.configEmphasis,value:G.EMPHASIS.value,validator:G.EMPHASIS.validator,suppressEvent:G.EMPHASIS.suppressEvent,supercedes:G.EMPHASIS.supercedes});J.addProperty(G.STRONG_EMPHASIS.key,{handler:this.configStrongEmphasis,value:G.STRONG_EMPHASIS.value,validator:G.STRONG_EMPHASIS.validator,suppressEvent:G.STRONG_EMPHASIS.suppressEvent,supercedes:G.STRONG_EMPHASIS.supercedes});J.addProperty(G.CHECKED.key,{handler:this.configChecked,value:G.CHECKED.value,validator:G.CHECKED.validator,suppressEvent:G.CHECKED.suppressEvent,supercedes:G.CHECKED.supercedes});J.addProperty(G.DISABLED.key,{handler:this.configDisabled,value:G.DISABLED.value,validator:G.DISABLED.validator,suppressEvent:G.DISABLED.suppressEvent});J.addProperty(G.SELECTED.key,{handler:this.configSelected,value:G.SELECTED.value,validator:G.SELECTED.validator,suppressEvent:G.SELECTED.suppressEvent});J.addProperty(G.SUBMENU.key,{handler:this.configSubmenu,supercedes:G.SU!
 BMENU.supercedes,suppressEvent:G.SUBMENU.suppressEvent});J.addProperty(G.ONCLICK.key,{handler:this.configOnClick,suppressEvent:G.ONCLICK.suppressEvent});J.addProperty(G.CLASS_NAME.key,{handler:this.configClassName,value:G.CLASS_NAME.value,validator:G.CLASS_NAME.validator,suppressEvent:G.CLASS_NAME.suppressEvent});},getNextEnabledSibling:function(){var L,O,J,N,M;function K(P,Q){return P[Q]||K(P,(Q+1));}if(this.parent instanceof E){L=this.groupIndex;O=this.parent.getItemGroups();if(this.index<(O[L].length-1)){J=K(O[L],(this.index+1));}else{if(L<(O.length-1)){N=L+1;}else{N=0;}M=K(O,N);J=K(M,0);}return(J.cfg.getProperty("disabled")||J.element.style.display=="none")?J.getNextEnabledSibling():J;}},getPreviousEnabledSibling:function(){var N,P,K,J,M;function O(Q,R){return Q[R]||O(Q,(R-1));}function L(Q,R){return Q[R]?R:L(Q,(R+1));}if(this.parent instanceof E){N=this.groupIndex;P=this.parent.getItemGroups();if(this.index>L(P[N],0)){K=O(P[N],(this.index-1));
+}else{if(N>L(P,0)){J=N-1;}else{J=P.length-1;}M=O(P,J);K=O(M,(M.length-1));}return(K.cfg.getProperty("disabled")||K.element.style.display=="none")?K.getPreviousEnabledSibling():K;}},focus:function(){var N=this.parent,M=this._oAnchor,J=N.activeItem,L=this;function K(){try{if(YAHOO.env.ua.ie&&!document.hasFocus()){return ;}if(J){J.blurEvent.fire();}M.focus();L.focusEvent.fire();}catch(O){}}if(!this.cfg.getProperty("disabled")&&N&&N.cfg.getProperty("visible")&&this.element.style.display!="none"){window.setTimeout(K,0);}},blur:function(){var K=this.parent;if(!this.cfg.getProperty("disabled")&&K&&K.cfg.getProperty("visible")){var J=this;window.setTimeout(function(){try{J._oAnchor.blur();J.blurEvent.fire();}catch(L){}},0);}},hasFocus:function(){return(YAHOO.widget.MenuManager.getFocusedMenuItem()==this);},destroy:function(){var L=this.element,K,J;if(L){K=this.cfg.getProperty("submenu");if(K){K.destroy();}this.mouseOverEvent.unsubscribeAll();this.mouseOutEvent.unsubscribeAll();this!
 .mouseDownEvent.unsubscribeAll();this.mouseUpEvent.unsubscribeAll();this.clickEvent.unsubscribeAll();this.keyPressEvent.unsubscribeAll();this.keyDownEvent.unsubscribeAll();this.keyUpEvent.unsubscribeAll();this.focusEvent.unsubscribeAll();this.blurEvent.unsubscribeAll();this.cfg.configChangedEvent.unsubscribeAll();J=L.parentNode;if(J){J.removeChild(L);this.destroyEvent.fire();}this.destroyEvent.unsubscribeAll();}},toString:function(){var K="MenuItem",J=this.id;if(J){K+=(" "+J);}return K;}};F.augmentProto(H,YAHOO.util.EventProvider);})();(function(){YAHOO.widget.ContextMenu=function(G,F){YAHOO.widget.ContextMenu.superclass.constructor.call(this,G,F);};var B=YAHOO.util.Event,E=YAHOO.widget.ContextMenu,D={"TRIGGER_CONTEXT_MENU":"triggerContextMenu","CONTEXT_MENU":(YAHOO.env.ua.opera?"mousedown":"contextmenu"),"CLICK":"click"},C={"TRIGGER":{key:"trigger",suppressEvent:true}};function A(G,F,H){this.cfg.setProperty("xy",H);this.beforeShowEvent.unsubscribe(A,H);}YAHOO.lang.extend(E!
 ,YAHOO.widget.Menu,{_oTrigger:null,_bCancelled:false,contextEv!
 entTarge
t:null,triggerContextMenuEvent:null,init:function(G,F){E.superclass.init.call(this,G);this.beforeInitEvent.fire(E);if(F){this.cfg.applyConfig(F,true);}this.initEvent.fire(E);},initEvents:function(){E.superclass.initEvents.call(this);this.triggerContextMenuEvent=this.createEvent(D.TRIGGER_CONTEXT_MENU);this.triggerContextMenuEvent.signature=YAHOO.util.CustomEvent.LIST;},cancel:function(){this._bCancelled=true;},_removeEventHandlers:function(){var F=this._oTrigger;if(F){B.removeListener(F,D.CONTEXT_MENU,this._onTriggerContextMenu);if(YAHOO.env.ua.opera){B.removeListener(F,D.CLICK,this._onTriggerClick);}}},_onTriggerClick:function(G,F){if(G.ctrlKey){B.stopEvent(G);}},_onTriggerContextMenu:function(H,F){if(H.type=="mousedown"&&!H.ctrlKey){return ;}var G;B.stopEvent(H);this.contextEventTarget=B.getTarget(H);this.triggerContextMenuEvent.fire(H);YAHOO.widget.MenuManager.hideVisible();if(!this._bCancelled){G=B.getXY(H);if(!YAHOO.util.Dom.inDocument(this.element)){this.beforeShowEven!
 t.subscribe(A,G);}else{this.cfg.setProperty("xy",G);}this.show();}this._bCancelled=false;},toString:function(){var G="ContextMenu",F=this.id;if(F){G+=(" "+F);}return G;},initDefaultConfig:function(){E.superclass.initDefaultConfig.call(this);this.cfg.addProperty(C.TRIGGER.key,{handler:this.configTrigger,suppressEvent:C.TRIGGER.suppressEvent});},destroy:function(){this._removeEventHandlers();E.superclass.destroy.call(this);},configTrigger:function(G,F,I){var H=F[0];if(H){if(this._oTrigger){this._removeEventHandlers();}this._oTrigger=H;B.on(H,D.CONTEXT_MENU,this._onTriggerContextMenu,this,true);if(YAHOO.env.ua.opera){B.on(H,D.CLICK,this._onTriggerClick,this,true);}}else{this._removeEventHandlers();}}});}());YAHOO.widget.ContextMenuItem=YAHOO.widget.MenuItem;(function(){YAHOO.widget.MenuBar=function(F,E){YAHOO.widget.MenuBar.superclass.constructor.call(this,F,E);};function D(E){if(typeof E=="string"){return("dynamic,static".indexOf((E.toLowerCase()))!=-1);}}var B=YAHOO.util.Eve!
 nt,A=YAHOO.widget.MenuBar,C={"POSITION":{key:"position",value:!
 "static"
,validator:D,supercedes:["visible"]},"SUBMENU_ALIGNMENT":{key:"submenualignment",value:["tl","bl"],suppressEvent:true},"AUTO_SUBMENU_DISPLAY":{key:"autosubmenudisplay",value:false,validator:YAHOO.lang.isBoolean,suppressEvent:true}};YAHOO.lang.extend(A,YAHOO.widget.Menu,{init:function(F,E){if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuBarItem;}A.superclass.init.call(this,F);this.beforeInitEvent.fire(A);if(E){this.cfg.applyConfig(E,true);}this.initEvent.fire(A);},CSS_CLASS_NAME:"yuimenubar",_onKeyDown:function(G,F,K){var E=F[0],L=F[1],I,J,H;if(L&&!L.cfg.getProperty("disabled")){J=L.cfg;switch(E.keyCode){case 37:case 39:if(L==this.activeItem&&!J.getProperty("selected")){J.setProperty("selected",true);}else{H=(E.keyCode==37)?L.getPreviousEnabledSibling():L.getNextEnabledSibling();if(H){this.clearActiveItem();H.cfg.setProperty("selected",true);if(this.cfg.getProperty("autosubmenudisplay")){I=H.cfg.getProperty("submenu");if(I){I.show();}}H.focus();}}B.preventDefault(E);break!
 ;case 40:if(this.activeItem!=L){this.clearActiveItem();J.setProperty("selected",true);L.focus();}I=J.getProperty("submenu");if(I){if(I.cfg.getProperty("visible")){I.setInitialSelection();I.setInitialFocus();}else{I.show();}}B.preventDefault(E);break;}}if(E.keyCode==27&&this.activeItem){I=this.activeItem.cfg.getProperty("submenu");if(I&&I.cfg.getProperty("visible")){I.hide();this.activeItem.focus();}else{this.activeItem.cfg.setProperty("selected",false);this.activeItem.blur();}B.preventDefault(E);}},_onClick:function(L,G,J){A.superclass._onClick.call(this,L,G,J);var K=G[1],M,E,F,H,I;if(K&&!K.cfg.getProperty("disabled")){M=G[0];E=B.getTarget(M);F=this.activeItem;H=this.cfg;if(F&&F!=K){this.clearActiveItem();}K.cfg.setProperty("selected",true);I=K.cfg.getProperty("submenu");if(I){if(I.cfg.getProperty("visible")){I.hide();}else{I.show();}}}},toString:function(){var F="MenuBar",E=this.id;if(E){F+=(" "+E);}return F;
+},initDefaultConfig:function(){A.superclass.initDefaultConfig.call(this);var E=this.cfg;E.addProperty(C.POSITION.key,{handler:this.configPosition,value:C.POSITION.value,validator:C.POSITION.validator,supercedes:C.POSITION.supercedes});E.addProperty(C.SUBMENU_ALIGNMENT.key,{value:C.SUBMENU_ALIGNMENT.value,suppressEvent:C.SUBMENU_ALIGNMENT.suppressEvent});E.addProperty(C.AUTO_SUBMENU_DISPLAY.key,{value:C.AUTO_SUBMENU_DISPLAY.value,validator:C.AUTO_SUBMENU_DISPLAY.validator,suppressEvent:C.AUTO_SUBMENU_DISPLAY.suppressEvent});}});}());YAHOO.widget.MenuBarItem=function(B,A){YAHOO.widget.MenuBarItem.superclass.constructor.call(this,B,A);};YAHOO.lang.extend(YAHOO.widget.MenuBarItem,YAHOO.widget.MenuItem,{init:function(B,A){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.Menu;}YAHOO.widget.MenuBarItem.superclass.init.call(this,B);var C=this.cfg;if(A){C.applyConfig(A,true);}C.fireQueue();},CSS_CLASS_NAME:"yuimenubaritem",CSS_LABEL_CLASS_NAME:"yuimenubaritemlabel",toString:fun!
 ction(){var A="MenuBarItem";if(this.cfg&&this.cfg.getProperty("text")){A+=(": "+this.cfg.getProperty("text"));}return A;}});YAHOO.register("menu",YAHOO.widget.Menu,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/menu/menu.js
===================================================================
--- trunk/root/static/yui/menu/menu.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/menu/menu.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 
 
@@ -14,7 +14,6 @@
 * context menus, or application-style menu bars with just a small amount of 
 * scripting.</p><p>The Menu family of controls features:</p>
 * <ul>
-*    <li>Screen-reader accessibility.</li>
 *    <li>Keyboard and mouse navigation.</li>
 *    <li>A rich event model that provides access to all of a menu's 
 *    interesting moments.</li>
@@ -269,11 +268,11 @@
                     dynamically positioned menus
                 */
                 
-                for (var i in m_oMenus) {
+                for (var i in m_oVisibleMenus) {
         
-                    if (YAHOO.lang.hasOwnProperty(m_oMenus, i)) {
+                    if (YAHOO.lang.hasOwnProperty(m_oVisibleMenus, i)) {
         
-                        oMenu = m_oMenus[i];
+                        oMenu = m_oVisibleMenus[i];
         
                         if (oMenu.cfg.getProperty("clicktohide") && 
                             !(oMenu instanceof YAHOO.widget.MenuBar) && 
@@ -630,11 +629,24 @@
                 }        
     
             },
+
+
+            /**
+            * @method getVisible
+            * @description Returns a collection of all visible menus registered
+            * with the menu manger.
+            * @return {Array}
+            */
+            getVisible: function () {
+            
+                return m_oVisibleMenus;
+            
+            },
+
     
-    
             /**
             * @method getMenus
-            * @description Returns an array of all menus registered with the 
+            * @description Returns a collection of all menus registered with the 
             * menu manger.
             * @return {Array}
             */
@@ -929,19 +941,22 @@
     
         "SUBMENU_ALIGNMENT": { 
             key: "submenualignment", 
-            value: ["tl","tr"]
+            value: ["tl","tr"],
+            suppressEvent: true
         },
     
         "AUTO_SUBMENU_DISPLAY": { 
             key: "autosubmenudisplay", 
             value: true, 
-            validator: Lang.isBoolean 
+            validator: Lang.isBoolean,
+            suppressEvent: true
         }, 
     
         "SHOW_DELAY": { 
             key: "showdelay", 
             value: 250, 
-            validator: Lang.isNumber 
+            validator: Lang.isNumber, 
+            suppressEvent: true
         }, 
     
         "HIDE_DELAY": { 
@@ -954,30 +969,51 @@
         "SUBMENU_HIDE_DELAY": { 
             key: "submenuhidedelay", 
             value: 250, 
-            validator: Lang.isNumber
+            validator: Lang.isNumber,
+            suppressEvent: true
         }, 
     
         "CLICK_TO_HIDE": { 
             key: "clicktohide", 
             value: true, 
-            validator: Lang.isBoolean
+            validator: Lang.isBoolean,
+            suppressEvent: true
         },
     
         "CONTAINER": { 
-            key: "container"
+            key: "container",
+            suppressEvent: true
         }, 
+
+        "SCROLL_INCREMENT": { 
+            key: "scrollincrement", 
+            value: 1, 
+            validator: Lang.isNumber,
+            supercedes: ["maxheight"],
+            suppressEvent: true
+        },
+
+        "MIN_SCROLL_HEIGHT": { 
+            key: "minscrollheight", 
+            value: 90, 
+            validator: Lang.isNumber,
+            supercedes: ["maxheight"],
+            suppressEvent: true
+        },    
     
         "MAX_HEIGHT": { 
             key: "maxheight", 
             value: 0, 
             validator: Lang.isNumber,
-            supercedes: ["iframe"]
+            supercedes: ["iframe"],
+            suppressEvent: true
         }, 
     
         "CLASS_NAME": { 
             key: "classname", 
             value: null, 
-            validator: Lang.isString
+            validator: Lang.isString,
+            suppressEvent: true
         }, 
     
         "DISABLED": { 
@@ -1032,7 +1068,18 @@
 GROUP_TITLE_TAG_NAME: "h6",
 
 
+/**
+* @property OFF_SCREEN_POSITION
+* @description Array representing the default x and y position that a menu 
+* should have when it is positioned outside the viewport by the 
+* "poistionOffScreen" method.
+* @default [-10000, -10000]
+* @final
+* @type Array
+*/
+OFF_SCREEN_POSITION: [-10000, -10000],
 
+
 // Private properties
 
 
@@ -1158,17 +1205,6 @@
 
 
 /**
-* @property _nMaxHeight
-* @description The original value of the "maxheight" configuration property 
-* as set by the user.
-* @default -1
-* @private
-* @type Number
-*/
-_nMaxHeight: -1,
-
-
-/**
 * @property _bStopMouseEventHandlers
 * @description Stops "mouseover," "mouseout," and "mousemove" event handlers 
 * from executing.
@@ -1476,16 +1512,23 @@
         this.renderEvent.subscribe(this._onRender);
         this.renderEvent.subscribe(this.onRender);
         this.beforeShowEvent.subscribe(this._onBeforeShow);
+        this.hideEvent.subscribe(this.positionOffScreen);
         this.showEvent.subscribe(this._onShow);
         this.beforeHideEvent.subscribe(this._onBeforeHide);
-        this.hideEvent.subscribe(this._onHide);
         this.mouseOverEvent.subscribe(this._onMouseOver);
         this.mouseOutEvent.subscribe(this._onMouseOut);
         this.clickEvent.subscribe(this._onClick);
         this.keyDownEvent.subscribe(this._onKeyDown);
         this.keyPressEvent.subscribe(this._onKeyPress);
+        
 
+        if (UA.gecko || UA.webkit) {
 
+            this.cfg.subscribeToConfigEvent("y", this._onYChange);
+
+        }
+
+
         if (p_oConfig) {
     
             this.cfg.applyConfig(p_oConfig, true);
@@ -1727,7 +1770,6 @@
 _addItemToGroup: function (p_nGroupIndex, p_oItem, p_nItemIndex) {
 
     var oItem,
-        bDisabled = this.cfg.getProperty("disabled"),
         nGroupIndex,
         aGroup,
         oGroupItem,
@@ -2163,6 +2205,8 @@
 },
 
 
+
+
 /**
 * @method _subscribeToItemEvents
 * @description Subscribes a menu to a menu item's event.
@@ -2176,6 +2220,8 @@
 
     p_oItem.blurEvent.subscribe(this._onMenuItemBlur);
 
+    p_oItem.destroyEvent.subscribe(this._onMenuItemDestroy, p_oItem, this);
+
     p_oItem.cfg.configChangedEvent.subscribe(this._onMenuItemConfigChange,
         p_oItem, this);
 
@@ -2183,118 +2229,6 @@
 
 
 /**
-* @method _getOffsetWidth
-* @description Returns the offset width of the menu's 
-* <code><div></code> element.
-* @private
-*/
-_getOffsetWidth: function () {
-
-    var oClone = this.element.cloneNode(true),
-        oRoot = this.getRoot(),
-        oParentNode = oRoot.element.parentNode,
-        sWidth;
-
-    Dom.removeClass(oClone, "visible");
-
-    Dom.setStyle(oClone, "width", "");
-
-
-    if (oParentNode) {
-
-        oParentNode.appendChild(oClone);
-    
-        sWidth = oClone.offsetWidth;
-    
-        oParentNode.removeChild(oClone);
-    
-        return sWidth;
-
-    }
-
-},
-
-
-/**
-* @method _setWidth
-* @description Sets the width of the menu's root <code><div></code> 
-* element to its offsetWidth.
-* @private
-*/
-_setWidth: function () {
-
-    var oElement = this.element,
-        bVisible = Dom.removeClass(oElement, "visible"),
-        sWidth;
-
-    if (oElement.parentNode.tagName.toUpperCase() == "BODY") {
-
-        if (YAHOO.env.ua.opera) {
-
-            sWidth = this._getOffsetWidth();
-        
-        }
-        else {
-
-            Dom.setStyle(oElement, "width", "auto");
-            
-            sWidth = oElement.offsetWidth;
-        
-        }
-
-    }
-    else {
-    
-        sWidth = this._getOffsetWidth();
-    
-    }
-
-    this.cfg.setProperty("width", (sWidth + "px"));
-    
-
-    if (bVisible) {
-    
-        Dom.addClass(oElement, "visible");
-    
-    }
-
-},
-
-
-/**
-* @method _onWidthChange
-* @description Change event handler for the the menu's "width" configuration
-* property.
-* @private
-* @param {String} p_sType String representing the name of the event that 
-* was fired.
-* @param {Array} p_aArgs Array of arguments sent when the event was fired.
-*/
-_onWidthChange: function (p_sType, p_aArgs) {
-
-    var sWidth = p_aArgs[0];
-    
-    if (sWidth && !this._hasSetWidthHandlers) {
-
-        this.itemAddedEvent.subscribe(this._setWidth);
-        this.itemRemovedEvent.subscribe(this._setWidth);
-
-        this._hasSetWidthHandlers = true;
-
-    }
-    else if (this._hasSetWidthHandlers) {
-
-        this.itemAddedEvent.unsubscribe(this._setWidth);
-        this.itemRemovedEvent.unsubscribe(this._setWidth);
-
-        this._hasSetWidthHandlers = false;
-
-    }
-
-},
-
-
-/**
 * @method _onVisibleChange
 * @description Change event handler for the the menu's "visible" configuration
 * property.
@@ -2803,83 +2737,86 @@
 
     var oEvent = p_aArgs[0],
         oItem = p_aArgs[1],
-        oTarget,
-        oItemCfg,
         oSubmenu,
+        bInMenuAnchor = false,
+        oRoot,
+        sId,
         sURL,
-        nURL,
-        oRoot;
+        nHashPos,
+        nLen;
 
 
     if (oItem && !oItem.cfg.getProperty("disabled")) {
 
-        oTarget = Event.getTarget(oEvent);
-        oItemCfg = oItem.cfg;
-        oSubmenu = oItemCfg.getProperty("submenu");
+        oSubmenu = oItem.cfg.getProperty("submenu");
 
-
+        
         /*
-            ACCESSIBILITY FEATURE FOR SCREEN READERS: 
-            Expand/collapse the submenu when the user clicks 
-            on the submenu indicator image.
-        */        
+             Check if the URL of the anchor is pointing to an element that is 
+             a child of the menu.
+        */
+        
+        sURL = oItem.cfg.getProperty("url");
 
-        if (oTarget == oItem.submenuIndicator && oSubmenu) {
+        
+        if (sURL) {
 
-            if (oSubmenu.cfg.getProperty("visible")) {
+            nHashPos = sURL.indexOf("#");
 
-                oSubmenu.hide();
-                
-                oSubmenu.parent.focus();
+            nLen = sURL.length;
+
+
+            if (nHashPos != -1) {
+
+                sURL = sURL.substr(nHashPos, nLen);
     
-            }
-            else {
+                nLen = sURL.length;
 
-                this.clearActiveItem();
 
-                oItemCfg.setProperty("selected", true);
+                if (nLen > 1) {
 
-                oSubmenu.show();
+                    sId = sURL.substr(1, nLen);
+
+                    bInMenuAnchor = Dom.isAncestor(this.element, sId);
+                    
+                }
+                else if (nLen === 1) {
+
+                    bInMenuAnchor = true;
                 
-                oSubmenu.setInitialFocus();
-    
+                }
+
             }
+        
+        }
 
+
+        if (bInMenuAnchor && !oItem.cfg.getProperty("target")) {
+
             Event.preventDefault(oEvent);
-    
+
+            oItem.focus();
+        
         }
-        else {
 
-            sURL = oItemCfg.getProperty("url");
-            
-            if ((sURL.substr(0,1) == "#")) {
 
-                Event.preventDefault(oEvent);
+        if (!oSubmenu) {
 
-                oItem.focus();
+            oRoot = this.getRoot();
             
-            }
+            if (oRoot instanceof YAHOO.widget.MenuBar || 
+                oRoot.cfg.getProperty("position") == "static") {
 
+                oRoot.clearActiveItem();
 
-            if (!oSubmenu) {
-    
-                oRoot = this.getRoot();
-                
-                if (oRoot instanceof YAHOO.widget.MenuBar || 
-                    oRoot.cfg.getProperty("position") == "static") {
-    
-                    oRoot.clearActiveItem();
-    
-                }
-                else if (oRoot.cfg.getProperty("clicktohide")) {
+            }
+            else {
 
-                    oRoot.hide();
-                
-                }
-    
+                oRoot.hide();
+            
             }
 
-        }                    
+        }
     
     }
 
@@ -3215,31 +3152,45 @@
 
 
 /**
-* @method _onTextResize
-* @description "textresize" event handler for the menu.
+* @method _onYChange
+* @description "y" event handler for a Menu instance.
 * @protected
-* @param {String} p_sType String representing the name of the event that 
+* @param {String} p_sType The name of the event that was fired.
+* @param {Array} p_aArgs Collection of arguments sent when the event 
 * was fired.
-* @param {Array} p_aArgs Array of arguments sent when the event was fired.
-* @param {YAHOO.widget.Menu} p_oMenu Object representing the menu that 
-* fired the event.
 */
-_onTextResize: function (p_sType, p_aArgs, p_oMenu) {
+_onYChange: function (p_sType, p_aArgs) {
 
-    if (YAHOO.env.ua.gecko && !this._handleResize) {
+    var oParent = this.parent,
+        nScrollTop,
+        oIFrame,
+        nY;
 
-        this._handleResize = true;
-        return;
-    
-    }
 
+    if (oParent) {
 
-    var oConfig = this.cfg;
+        nScrollTop = oParent.parent.body.scrollTop;
 
-    if (oConfig.getProperty("position") == "dynamic") {
 
-        oConfig.setProperty("width", (this._getOffsetWidth() + "px"));
+        if (nScrollTop > 0) {
+    
+            nY = (this.cfg.getProperty("y") - nScrollTop);
+            
+            Dom.setY(this.element, nY);
 
+            oIFrame = this.iframe;            
+    
+
+            if (oIFrame) {
+    
+                Dom.setY(oIFrame, nY);
+    
+            }
+            
+            this.cfg.setProperty("y", nY, true);
+        
+        }
+    
     }
 
 },
@@ -3263,6 +3214,7 @@
     var oTarget = Event.getTarget(p_oEvent),
         oBody = this.body,
         me = this,
+        nScrollIncrement = this.cfg.getProperty("scrollincrement"),
         nScrollTarget,
         fnScrollFunction;
 
@@ -3274,7 +3226,7 @@
 
         if (nScrollTop < nScrollTarget) {
 
-            oBody.scrollTop = (nScrollTop + 1);
+            oBody.scrollTop = (nScrollTop + nScrollIncrement);
 
             me._enableScrollHeader();
 
@@ -3299,7 +3251,7 @@
 
         if (nScrollTop > 0) {
 
-            oBody.scrollTop = (nScrollTop - 1);
+            oBody.scrollTop = (nScrollTop - nScrollIncrement);
 
             me._enableScrollFooter();
 
@@ -3370,7 +3322,6 @@
 */
 _onInit: function (p_sType, p_aArgs) {
 
-    this.cfg.subscribeToConfigEvent("width", this._onWidthChange);
     this.cfg.subscribeToConfigEvent("visible", this._onVisibleChange);
 
     var bRootMenu = !this.parent,
@@ -3430,8 +3381,7 @@
 */
 _onBeforeRender: function (p_sType, p_aArgs) {
 
-    var oConfig = this.cfg,
-        oEl = this.element,
+    var oEl = this.element,
         nListElements = this._aListElements.length,
         bFirstList = true,
         i = 0,
@@ -3498,18 +3448,22 @@
 */
 _onRender: function (p_sType, p_aArgs) {
 
-    Module.textResizeEvent.subscribe(this._onTextResize, this, true);
+    if (this.cfg.getProperty("position") == "dynamic") { 
 
-    if (this.cfg.getProperty("position") == "dynamic" && 
-        !this.cfg.getProperty("width")) {
+        if (!this.cfg.getProperty("visible")) {
 
-        this._setWidth();
+            this.positionOffScreen();
+
+        }
     
     }
 
 },
 
 
+
+
+
 /**
 * @method _onBeforeShow
 * @description "beforeshow" event handler for the menu.
@@ -3524,8 +3478,6 @@
         n,
         nViewportHeight,
         oRegion,
-        nMaxHeight,
-        oBody,
         oSrcElement;
 
 
@@ -3602,7 +3554,6 @@
             else {
 
                 this.render(this.cfg.getProperty("container"));
-                this.cfg.refireEvent("xy");
 
             }                
 
@@ -3611,55 +3562,65 @@
     }
 
 
-    if (!(this instanceof YAHOO.widget.MenuBar) && 
-        this.cfg.getProperty("position") == "dynamic") {
+    var nMaxHeight = this.cfg.getProperty("maxheight"),
+        nMinScrollHeight = this.cfg.getProperty("minscrollheight"),
+        bDynamicPos = this.cfg.getProperty("position") == "dynamic";
 
-        nViewportHeight = Dom.getViewportHeight();
 
+    if (!this.parent && bDynamicPos) {
 
-        if (this.parent && this.parent.parent instanceof YAHOO.widget.MenuBar) {
-           
-            oRegion = YAHOO.util.Region.getRegion(this.parent.element);
-            
-            nViewportHeight = (nViewportHeight - oRegion.bottom);
+        this.cfg.refireEvent("xy");
+   
+    }
 
-        }
 
-
-        if (this.element.offsetHeight >= nViewportHeight) {
+    function clearMaxHeight() {
     
-            nMaxHeight = this.cfg.getProperty("maxheight");
-
-            /*
-                Cache the original value for the "maxheight" configuration  
-                property so that we can set it back when the menu is hidden.
-            */
+        this.cfg.setProperty("maxheight", 0);
     
-            this._nMaxHeight = nMaxHeight;
+        this.hideEvent.unsubscribe(clearMaxHeight);
+    
+    }
 
-            this.cfg.setProperty("maxheight", (nViewportHeight - 20));
-        
-        }
+
+    if (!(this instanceof YAHOO.widget.MenuBar) && bDynamicPos) {
+
+
+        if (nMaxHeight === 0) {
+
+            nViewportHeight = Dom.getViewportHeight();
     
     
-        if (this.cfg.getProperty("maxheight") > 0) {
+            if (this.parent && 
+                this.parent.parent instanceof YAHOO.widget.MenuBar) {
+               
+                oRegion = YAHOO.util.Region.getRegion(this.parent.element);
+                
+                nViewportHeight = (nViewportHeight - oRegion.bottom);
     
-            oBody = this.body;
+            }
     
-            if (oBody.scrollTop > 0) {
     
-                oBody.scrollTop = 0;
+            if (this.element.offsetHeight >= nViewportHeight) {
     
+                nMaxHeight = (nViewportHeight - (Overlay.VIEWPORT_OFFSET * 2));
+
+                if (nMaxHeight < nMinScrollHeight) {
+
+                    nMaxHeight = nMinScrollHeight;
+                
+                }
+
+                this.cfg.setProperty("maxheight", nMaxHeight);
+
+                this.hideEvent.subscribe(clearMaxHeight);
+
             }
-
-            this._disableScrollHeader();
-            this._enableScrollFooter();
-    
+        
         }
 
     }
 
-
 },
 
 
@@ -3783,27 +3744,6 @@
 
 
 /**
-* @method _onHide
-* @description "hide" event handler for the menu.
-* @private
-* @param {String} p_sType String representing the name of the event that 
-* was fired.
-* @param {Array} p_aArgs Array of arguments sent when the event was fired.
-*/
-_onHide: function (p_sType, p_aArgs) {
-
-    if (this._nMaxHeight != -1) {
-
-        this.cfg.setProperty("maxheight", this._nMaxHeight);
-
-        this._nMaxHeight = -1;
-
-    }
-
-},
-
-
-/**
 * @method _onParentMenuConfigChange
 * @description "configchange" event handler for a submenu.
 * @private
@@ -3828,6 +3768,8 @@
         case "clicktohide":
         case "effect":
         case "classname":
+        case "scrollincrement":
+        case "minscrollheight":
 
             p_oSubmenu.cfg.setProperty(sPropertyName, oPropertyValue);
                 
@@ -3851,45 +3793,37 @@
 */
 _onParentMenuRender: function (p_sType, p_aArgs, p_oSubmenu) {
 
-    var oParentMenu = p_oSubmenu.parent.parent,
+    var oParentCfg = p_oSubmenu.parent.parent.cfg,
 
         oConfig = {
 
-            constraintoviewport: 
-                oParentMenu.cfg.getProperty("constraintoviewport"),
+            constraintoviewport: oParentCfg.getProperty("constraintoviewport"),
 
             xy: [0,0],
+
+            clicktohide: oParentCfg.getProperty("clicktohide"),
                 
-            clicktohide: oParentMenu.cfg.getProperty("clicktohide"),
-                
-            effect: oParentMenu.cfg.getProperty("effect"),
+            effect: oParentCfg.getProperty("effect"),
 
-            showdelay: oParentMenu.cfg.getProperty("showdelay"),
+            showdelay: oParentCfg.getProperty("showdelay"),
             
-            hidedelay: oParentMenu.cfg.getProperty("hidedelay"),
+            hidedelay: oParentCfg.getProperty("hidedelay"),
 
-            submenuhidedelay: oParentMenu.cfg.getProperty("submenuhidedelay"),
+            submenuhidedelay: oParentCfg.getProperty("submenuhidedelay"),
 
-            classname: oParentMenu.cfg.getProperty("classname")
+            classname: oParentCfg.getProperty("classname"),
+            
+            scrollincrement: oParentCfg.getProperty("scrollincrement"),
+            
+            minscrollheight: oParentCfg.getProperty("minscrollheight"),
+            
+            iframe: oParentCfg.getProperty("iframe")
 
         },
         
         oLI;
 
 
-    /*
-        Only sync the "iframe" configuration property if the parent
-        menu's "position" configuration is the same.
-    */
-
-    if (this.cfg.getProperty("position") == 
-        oParentMenu.cfg.getProperty("position")) {
-
-        oConfig.iframe = oParentMenu.cfg.getProperty("iframe");
-    
-    }
-               
-
     p_oSubmenu.cfg.applyConfig(oConfig);
 
 
@@ -3922,28 +3856,26 @@
 * @param {Array} p_aArgs Array of arguments sent when the event was fired.
 */
 _onSubmenuBeforeShow: function (p_sType, p_aArgs) {
-    
+
     var oParent = this.parent,
         aAlignment = oParent.parent.cfg.getProperty("submenualignment");
 
-    this.cfg.setProperty("context", 
-        [oParent.element, aAlignment[0], aAlignment[1]]);
 
+    if (!this.cfg.getProperty("context")) {
+    
+        this.cfg.setProperty("context", 
+            [oParent.element, aAlignment[0], aAlignment[1]]);
 
-    var nScrollTop = oParent.parent.body.scrollTop;
+    }
+    else {
 
-    if ((UA.gecko || UA.webkit) && nScrollTop > 0) {
-
-         this.cfg.setProperty("y", (this.cfg.getProperty("y") - nScrollTop));
+        this.align();
     
     }
 
 },
 
 
-
-
-
 /**
 * @method _onMenuItemFocus
 * @description "focus" event handler for the menu's items.
@@ -3975,6 +3907,23 @@
 
 
 /**
+* @method _onMenuItemDestroy
+* @description "destroy" event handler for the menu's items.
+* @private
+* @param {String} p_sType String representing the name of the event 
+* that was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item 
+* that fired the event.
+*/
+_onMenuItemDestroy: function (p_sType, p_aArgs, p_oItem) {
+
+    this._removeItemFromGroupByValue(p_oItem.groupIndex, p_oItem);
+
+},
+
+
+/**
 * @method _onMenuItemConfigChange
 * @description "configchange" event handler for the menu's items.
 * @private
@@ -4015,23 +3964,6 @@
 
         break;
 
-        case "text":
-        case "helptext":
-
-            /*
-                A change to an item's "text" or "helptext"
-                configuration properties requires the width of the parent
-                menu to be recalculated.
-            */
-
-            if (this.element.style.width) {
-
-                this.cfg.setProperty("width", (this._getOffsetWidth() + "px"));
-
-            }
-
-        break;
-
     }
 
 },
@@ -4054,70 +3986,57 @@
 enforceConstraints: function (type, args, obj) {
 
     var oParentMenuItem = this.parent,
-        oElement,
-        oConfig,
-        pos,
-        x,
-        y,
-        offsetHeight,
-        offsetWidth,
-        viewPortWidth,
-        viewPortHeight,
-        scrollX,
-        scrollY,
-        nPadding,
+        nViewportOffset = Overlay.VIEWPORT_OFFSET,
+        oElement = this.element,
+        oConfig = this.cfg,
+        pos = args[0],
+        offsetHeight = oElement.offsetHeight,
+        offsetWidth = oElement.offsetWidth,
+        viewPortWidth = Dom.getViewportWidth(),
+        viewPortHeight = Dom.getViewportHeight(),
+        nPadding = (oParentMenuItem && 
+            oParentMenuItem.parent instanceof YAHOO.widget.MenuBar) ? 
+            0 : nViewportOffset,
+        aContext = oConfig.getProperty("context"),
+        oContextElement = aContext ? aContext[0] : null,
         topConstraint,
         leftConstraint,
         bottomConstraint,
         rightConstraint,
-        aContext,
-        oContextElement;
+        scrollX,
+        scrollY,
+        x,
+        y;
+    
 
+    if (offsetWidth < viewPortWidth) {
 
-    if (oParentMenuItem && 
-        !(oParentMenuItem.parent instanceof YAHOO.widget.MenuBar)) {
-
-        oElement = this.element;
-    
-        oConfig = this.cfg;
-        pos = args[0];
-        
         x = pos[0];
-        y = pos[1];
-        
-        offsetHeight = oElement.offsetHeight;
-        offsetWidth = oElement.offsetWidth;
-        
-        viewPortWidth = Dom.getViewportWidth();
-        viewPortHeight = Dom.getViewportHeight();
-        
         scrollX = Dom.getDocumentScrollLeft();
-        scrollY = Dom.getDocumentScrollTop();
-        
-        nPadding = 
-            (oParentMenuItem.parent instanceof YAHOO.widget.MenuBar) ? 0 : 10;
-        
-        topConstraint = scrollY + nPadding;
         leftConstraint = scrollX + nPadding;
-        
-        bottomConstraint = scrollY + viewPortHeight - offsetHeight - nPadding;
         rightConstraint = scrollX + viewPortWidth - offsetWidth - nPadding;
-        
-        aContext = oConfig.getProperty("context");
-        oContextElement = aContext ? aContext[0] : null;
+
+        if (x < nViewportOffset) {
     
-    
-        if (x < 10) {
-    
             x = leftConstraint;
     
         } else if ((x + offsetWidth) > viewPortWidth) {
     
-            if (oContextElement &&
+            if(oContextElement &&
                 ((x - oContextElement.offsetWidth) > offsetWidth)) {
     
-                x = (x - (oContextElement.offsetWidth + offsetWidth));
+                if (oParentMenuItem && 
+                    oParentMenuItem.parent instanceof YAHOO.widget.MenuBar) {
     
+                    x = (x - (offsetWidth - oContextElement.offsetWidth));
+    
+                }
+                else {
+    
+                    x = (x - (oContextElement.offsetWidth + offsetWidth));
+    
+                }
+    
             }
             else {
     
@@ -4127,7 +4046,19 @@
     
         }
     
-        if (y < 10) {
+    }
+
+
+    if (offsetHeight < viewPortHeight) {
+
+        y = pos[1];
+        scrollY = Dom.getDocumentScrollTop();
+        topConstraint = scrollY + nPadding;
+        bottomConstraint = scrollY + viewPortHeight - offsetHeight - nPadding;
+
+
+
+        if (y < nViewportOffset) {
     
             y = topConstraint;
     
@@ -4141,23 +4072,20 @@
             else {
     
                 y = bottomConstraint;
+                
+
     
             }
     
         }
-    
-        oConfig.setProperty("x", x, true);
-        oConfig.setProperty("y", y, true);
-        oConfig.setProperty("xy", [x,y], true);
-    
+
     }
-    else if (this == this.getRoot() && 
-        this.cfg.getProperty("position") == "dynamic") {
-    
-        Menu.superclass.enforceConstraints.call(this, type, args, obj);
-    
-    }
 
+
+    oConfig.setProperty("x", x, true);
+    oConfig.setProperty("y", y, true);
+    oConfig.setProperty("xy", [x,y], true);
+
 },
 
 
@@ -4226,39 +4154,24 @@
 
     var oElement = this.element,
         sCSSPosition = p_aArgs[0] == "static" ? "static" : "absolute",
-        sCurrentPosition = Dom.getStyle(oElement, "position"),
         oCfg = this.cfg,
         nZIndex;
 
 
-    Dom.setStyle(this.element, "position", sCSSPosition);
+    Dom.setStyle(oElement, "position", sCSSPosition);
 
 
     if (sCSSPosition == "static") {
 
-        /*
-            Remove the iframe for statically positioned menus since it will 
-            intercept mouse events.
-        */
-
-        oCfg.setProperty("iframe", false);
-
-
         // Statically positioned menus are visible by default
         
-        Dom.setStyle(this.element, "display", "block");
+        Dom.setStyle(oElement, "display", "block");
 
         oCfg.setProperty("visible", true);
 
     }
     else {
 
-        if (sCurrentPosition != "absolute") {
-
-            oCfg.setProperty("iframe", (UA.ie == 6 ? true : false));
-
-        }
-
         /*
             Even though the "visible" property is queued to 
             "false" by default, we need to set the "visibility" property to 
@@ -4267,7 +4180,7 @@
             or not to show an Overlay instance.
         */
 
-        Dom.setStyle(this.element, "visibility", "hidden");
+        Dom.setStyle(oElement, "visibility", "hidden");
     
     }
 
@@ -4362,7 +4275,7 @@
 /**
 * @method configContainer
 * @description Event handler for when the "container" configuration property 
-of the menu changes.
+* of the menu changes.
 * @param {String} p_sType String representing the name of the event that 
 * was fired.
 * @param {Array} p_aArgs Array of arguments sent when the event was fired.
@@ -4416,14 +4329,24 @@
 configMaxHeight: function (p_sType, p_aArgs, p_oMenu) {
 
     var nMaxHeight = p_aArgs[0],
+        oElement = this.element,
         oBody = this.body,
         oHeader = this.header,
         oFooter = this.footer,
         fnMouseOver = this._onScrollTargetMouseOver,
         fnMouseOut = this._onScrollTargetMouseOut,
-        nHeight;
+        nMinScrollHeight = this.cfg.getProperty("minscrollheight"),
+        nHeight,
+        nOffsetWidth;
 
 
+    if (nMaxHeight !== 0 && nMaxHeight < nMinScrollHeight) {
+    
+        nMaxHeight = nMinScrollHeight;
+    
+    }
+
+
     if (this.lazyLoad && !oBody) {
 
         this.renderEvent.unsubscribe(this._setMaxHeight);
@@ -4438,56 +4361,88 @@
     
     }
 
-    Dom.setStyle(oBody, "height", "auto");
+
+    Dom.setStyle(oBody, "height", "");
     Dom.removeClass(oBody, "yui-menu-body-scrolled");
 
-    if ((nMaxHeight > 0) && (oBody.offsetHeight > nMaxHeight)) {
 
-        if (!this.cfg.getProperty("width")) {
+    /*
+        There is a bug in gecko-based browsers where an element whose 
+        "position" property is set to "absolute" and "overflow" property is set 
+        to "hidden" will not render at the correct width when its 
+        offsetParent's "position" property is also set to "absolute."  It is 
+        possible to work around this bug by specifying a value for the width 
+        property in addition to overflow.
+    */
 
-            this._setWidth();
+    if (UA.gecko && this.parent && this.parent.parent && 
+        this.parent.parent.cfg.getProperty("position") == "dynamic" && 
+        !this.cfg.getProperty("width")) {
 
-        }
+        nOffsetWidth = oElement.offsetWidth;
 
-        if (!oHeader && !oFooter) {
+        /*
+            Measuring the difference of the offsetWidth before and after
+            setting the "width" style attribute allows us to compute the 
+            about of padding and borders applied to the element, which in 
+            turn allows us to set the "width" property correctly.
+        */
+        
+        oElement.style.width = nOffsetWidth + "px";
+        oElement.style.width = 
+                (nOffsetWidth - (oElement.offsetWidth - nOffsetWidth)) + "px";
 
-            this.setHeader(" ");
-            this.setFooter(" ");
+    }
 
-            oHeader = this.header;
-            oFooter = this.footer;
 
-            Dom.addClass(oHeader, "topscrollbar");
-            Dom.addClass(oFooter, "bottomscrollbar");
-            
-            this.element.insertBefore(oHeader, oBody);
-            this.element.appendChild(oFooter);
+    if (!oHeader && !oFooter) {
 
-            Event.on(oHeader, "mouseover", fnMouseOver, this, true);
-            Event.on(oHeader, "mouseout", fnMouseOut, this, true);
-            Event.on(oFooter, "mouseover", fnMouseOver, this, true);
-            Event.on(oFooter, "mouseout", fnMouseOut, this, true);
+        this.setHeader(" ");
+        this.setFooter(" ");
+
+        oHeader = this.header;
+        oFooter = this.footer;
+
+        Dom.addClass(oHeader, "topscrollbar");
+        Dom.addClass(oFooter, "bottomscrollbar");
         
-        }
+        oElement.insertBefore(oHeader, oBody);
+        oElement.appendChild(oFooter);
+    
+    }
 
-        Dom.addClass(oBody, "yui-menu-body-scrolled");
 
-        nHeight = (nMaxHeight - (this.footer.offsetHeight + 
-                    this.header.offsetHeight));
+    nHeight = (nMaxHeight - (oHeader.offsetHeight + oHeader.offsetHeight));
 
+
+
+    if (nHeight > 0 && (oBody.offsetHeight > nMaxHeight)) {
+
+        Dom.addClass(oBody, "yui-menu-body-scrolled");
         Dom.setStyle(oBody, "height", (nHeight + "px"));
 
+        Event.on(oHeader, "mouseover", fnMouseOver, this, true);
+        Event.on(oHeader, "mouseout", fnMouseOut, this, true);
+        Event.on(oFooter, "mouseover", fnMouseOver, this, true);
+        Event.on(oFooter, "mouseout", fnMouseOut, this, true);
+
+        this._disableScrollHeader();
+        this._enableScrollFooter();
+
     }
     else if (oHeader && oFooter) {
 
+        this._enableScrollHeader();
+        this._enableScrollFooter();
+
         Event.removeListener(oHeader, "mouseover", fnMouseOver);
         Event.removeListener(oHeader, "mouseout", fnMouseOut);
         Event.removeListener(oFooter, "mouseover", fnMouseOver);
         Event.removeListener(oFooter, "mouseout", fnMouseOut);
 
-        this.element.removeChild(oHeader);
-        this.element.removeChild(oFooter);
-    
+        oElement.removeChild(oHeader);
+        oElement.removeChild(oFooter);
+
         this.header = null;
         this.footer = null;
     
@@ -4578,6 +4533,8 @@
 
         if (bDisabled) {
 
+            this.clearActiveItem(true);
+
             Dom.addClass(this.element, "disabled");
 
             this.itemAddedEvent.subscribe(this._onItemAdded);
@@ -4610,7 +4567,7 @@
         var oElement = this.element,
             oShadow = this._shadow;
     
-        if (oShadow) {
+        if (oShadow && oElement) {
 
             oShadow.style.width = (oElement.offsetWidth + 6) + "px";
             oShadow.style.height = (oElement.offsetHeight + 1) + "px";
@@ -4620,6 +4577,13 @@
     }
 
 
+    function replaceShadow() {
+
+        this.element.appendChild(this._shadow);
+
+    }
+
+
     function addShadowVisibleClass() {
     
         Dom.addClass(this._shadow, "yui-menu-shadow-visible");
@@ -4648,7 +4612,8 @@
             if (!m_oShadowTemplate) {
 
                 m_oShadowTemplate = document.createElement("div");
-                m_oShadowTemplate.className = "yui-menu-shadow";
+                m_oShadowTemplate.className = 
+                    "yui-menu-shadow yui-menu-shadow-visible";
             
             }
 
@@ -4658,8 +4623,6 @@
             
             this._shadow = oShadow;
 
-            addShadowVisibleClass.call(this);
-
             this.beforeShowEvent.subscribe(addShadowVisibleClass);
             this.beforeHideEvent.subscribe(removeShadowVisibleClass);
 
@@ -4693,7 +4656,9 @@
                 });
         
             }
-        
+
+            this.cfg.subscribeToConfigEvent("maxheight", replaceShadow);
+
         }
 
     }
@@ -4781,6 +4746,28 @@
 
 
 /**
+* @method positionOffScreen
+* @description Positions the menu outside of the boundaries of the browser's 
+* viewport.  Called automatically when a menu is hidden to ensure that 
+* it doesn't force the browser to render uncessary scrollbars.
+*/
+positionOffScreen: function () {
+
+    var oIFrame = this.iframe,
+        aPos = this.OFF_SCREEN_POSITION;
+
+    Dom.setXY(this.element, aPos);
+    
+    if (oIFrame) {
+
+        Dom.setXY(oIFrame, aPos);
+    
+    }
+
+},
+
+
+/**
 * @method getRoot
 * @description Finds the menu's root menu.
 */
@@ -5150,6 +5137,7 @@
 
 },
 
+
 /**
 * @method clearContent
 * @description Removes all of the content from the menu, including the menu 
@@ -5241,8 +5229,6 @@
 */
 destroy: function () {
 
-    Module.textResizeEvent.unsubscribe(this._onTextResize, this);
-
     // Remove all items
 
     this.clearContent();
@@ -5418,34 +5404,60 @@
     }
 
 
+    function onSubmenuAdded(p_sType, p_aArgs, p_oObject) { 
+    
+        var oSubmenu = this.cfg.getProperty("submenu");
+        
+        if (oSubmenu) {
+
+            oSubmenu.subscribe.apply(oSubmenu, p_oObject);
+        
+        }
+    
+    }
+
+
     Menu.superclass.subscribe.apply(this, arguments);
     Menu.superclass.subscribe.call(this, "itemAdded", onItemAdded, arguments);
 
 
-    var aSubmenus = this.getSubmenus(),
-        nSubmenus,
+    var aItems = this.getItems(),
+        nItems,
+        oItem,
         oSubmenu,
         i;
+        
 
-    if (aSubmenus) {
+    if (aItems) {
 
-        nSubmenus = aSubmenus.length;
-
-        if (nSubmenus > 0) {
+        nItems = aItems.length;
         
-            i = nSubmenus - 1;
+        if (nItems > 0) {
+        
+            i = nItems - 1;
             
             do {
-    
-                oSubmenu = aSubmenus[i];
+
+                oItem = aItems[i];
                 
-                oSubmenu.subscribe.apply(oSubmenu, arguments);
-    
+                oSubmenu = oItem.cfg.getProperty("submenu");
+                
+                if (oSubmenu) {
+                
+                    oSubmenu.subscribe.apply(oSubmenu, arguments);
+                
+                }
+                else {
+                
+                    oItem.cfg.subscribeToConfigEvent("submenu", onSubmenuAdded, arguments);
+                
+                }
+
             }
-            while(i--);
+            while (i--);
         
         }
-    
+
     }
 
 },
@@ -5462,6 +5474,98 @@
 
     var oConfig = this.cfg;
 
+
+    // Module documentation overrides
+
+    /**
+    * @config effect
+    * @description Object or array of objects representing the ContainerEffect 
+    * classes that are active for animating the container.  When set this 
+    * property is automatically applied to all submenus.
+    * @type Object
+    * @default null
+    */
+
+    // Overlay documentation overrides
+
+
+    /**
+    * @config x
+    * @description Number representing the absolute x-coordinate position of 
+    * the Menu.  This property is only applied when the "position" 
+    * configuration property is set to dynamic.
+    * @type Number
+    * @default null
+    */
+    
+
+    /**
+    * @config y
+    * @description Number representing the absolute y-coordinate position of 
+    * the Menu.  This property is only applied when the "position" 
+    * configuration property is set to dynamic.
+    * @type Number
+    * @default null
+    */
+
+
+    /**
+    * @description Array of the absolute x and y positions of the Menu.  This 
+    * property is only applied when the "position" configuration property is 
+    * set to dynamic.
+    * @config xy
+    * @type Number[]
+    * @default null
+    */
+    
+
+    /**
+    * @config context
+    * @description Array of context arguments for context-sensitive positioning.  
+    * The format is: [id or element, element corner, context corner]. 
+    * For example, setting this property to ["img1", "tl", "bl"] would 
+    * align the Mnu's top left corner to the context element's 
+    * bottom left corner.  This property is only applied when the "position" 
+    * configuration property is set to dynamic.
+    * @type Array
+    * @default null
+    */
+    
+    
+    /**
+    * @config fixedcenter
+    * @description Boolean indicating if the Menu should be anchored to the 
+    * center of the viewport.  This property is only applied when the 
+    * "position" configuration property is set to dynamic.
+    * @type Boolean
+    * @default false
+    */
+
+    
+    /**
+    * @config zindex
+    * @description Number representing the CSS z-index of the Menu.  This 
+    * property is only applied when the "position" configuration property is 
+    * set to dynamic.
+    * @type Number
+    * @default null
+    */
+    
+    
+    /**
+    * @config iframe
+    * @description Boolean indicating whether or not the Menu should 
+    * have an IFRAME shim; used to prevent SELECT elements from 
+    * poking through an Overlay instance in IE6.  When set to "true", 
+    * the iframe shim is created when the Menu instance is intially
+    * made visible.  This property is only applied when the "position" 
+    * configuration property is set to dynamic and is automatically applied 
+    * to all submenus.
+    * @type Boolean
+    * @default true for IE6 and below, false for all other browsers.
+    */
+
+
 	// Add configuration attributes
 
     /*
@@ -5500,7 +5604,9 @@
     /**
     * @config constraintoviewport
     * @description Boolean indicating if the menu will try to remain inside 
-    * the boundaries of the size of viewport.
+    * the boundaries of the size of viewport.  This property is only applied 
+    * when the "position" configuration property is set to dynamic and is 
+    * automatically applied to all submenus.
     * @default true
     * @type Boolean
     */
@@ -5549,7 +5655,8 @@
     oConfig.addProperty(
         DEFAULT_CONFIG.SUBMENU_ALIGNMENT.key, 
         { 
-            value: DEFAULT_CONFIG.SUBMENU_ALIGNMENT.value 
+            value: DEFAULT_CONFIG.SUBMENU_ALIGNMENT.value,
+            suppressEvent: DEFAULT_CONFIG.SUBMENU_ALIGNMENT.suppressEvent
         }
     );
 
@@ -5565,7 +5672,8 @@
 	   DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.key, 
 	   { 
 	       value: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.value, 
-	       validator: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.validator
+	       validator: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.validator,
+	       suppressEvent: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.suppressEvent
        } 
     );
 
@@ -5574,7 +5682,9 @@
     * @config showdelay
     * @description Number indicating the time (in milliseconds) that should 
     * expire before a submenu is made visible when the user mouses over 
-    * the menu's items.
+    * the menu's items.  This property is only applied when the "position" 
+    * configuration property is set to dynamic and is automatically applied 
+    * to all submenus.
     * @default 250
     * @type Number
     */
@@ -5582,7 +5692,8 @@
 	   DEFAULT_CONFIG.SHOW_DELAY.key, 
 	   { 
 	       value: DEFAULT_CONFIG.SHOW_DELAY.value, 
-	       validator: DEFAULT_CONFIG.SHOW_DELAY.validator
+	       validator: DEFAULT_CONFIG.SHOW_DELAY.validator,
+	       suppressEvent: DEFAULT_CONFIG.SHOW_DELAY.suppressEvent
        } 
     );
 
@@ -5590,7 +5701,9 @@
     /**
     * @config hidedelay
     * @description Number indicating the time (in milliseconds) that should 
-    * expire before the menu is hidden.
+    * expire before the menu is hidden.  This property is only applied when 
+    * the "position" configuration property is set to dynamic and is 
+    * automatically applied to all submenus.
     * @default 0
     * @type Number
     */
@@ -5611,6 +5724,8 @@
     * expire before a submenu is hidden when the user mouses out of a menu item 
     * heading in the direction of a submenu.  The value must be greater than or 
     * equal to the value specified for the "showdelay" configuration property.
+    * This property is only applied when the "position" configuration property 
+    * is set to dynamic and is automatically applied to all submenus.
     * @default 250
     * @type Number
     */
@@ -5618,7 +5733,8 @@
 	   DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.key, 
 	   { 
 	       value: DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.value, 
-	       validator: DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.validator
+	       validator: DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.validator,
+	       suppressEvent: DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.suppressEvent
        } 
     );
 
@@ -5626,7 +5742,9 @@
     /**
     * @config clicktohide
     * @description Boolean indicating if the menu will automatically be 
-    * hidden if the user clicks outside of it.
+    * hidden if the user clicks outside of it.  This property is only 
+    * applied when the "position" configuration property is set to dynamic 
+    * and is automatically applied to all submenus.
     * @default true
     * @type Boolean
     */
@@ -5634,7 +5752,8 @@
         DEFAULT_CONFIG.CLICK_TO_HIDE.key,
         {
             value: DEFAULT_CONFIG.CLICK_TO_HIDE.value,
-            validator: DEFAULT_CONFIG.CLICK_TO_HIDE.validator
+            validator: DEFAULT_CONFIG.CLICK_TO_HIDE.validator,
+            suppressEvent: DEFAULT_CONFIG.CLICK_TO_HIDE.suppressEvent
         }
     );
 
@@ -5652,15 +5771,58 @@
 	   DEFAULT_CONFIG.CONTAINER.key, 
 	   { 
 	       handler: this.configContainer,
-	       value: document.body
+	       value: document.body,
+           suppressEvent: DEFAULT_CONFIG.CONTAINER.suppressEvent
        } 
    );
 
 
     /**
+    * @config scrollincrement
+    * @description Number used to control the scroll speed of a menu.  Used to 
+    * increment the "scrollTop" property of the menu's body by when a menu's 
+    * content is scrolling.  When set this property is automatically applied 
+    * to all submenus.
+    * @default 1
+    * @type Number
+    */
+    oConfig.addProperty(
+        DEFAULT_CONFIG.SCROLL_INCREMENT.key, 
+        { 
+            value: DEFAULT_CONFIG.SCROLL_INCREMENT.value, 
+            validator: DEFAULT_CONFIG.SCROLL_INCREMENT.validator,
+            supercedes: DEFAULT_CONFIG.SCROLL_INCREMENT.supercedes,
+            suppressEvent: DEFAULT_CONFIG.SCROLL_INCREMENT.suppressEvent
+        }
+    );
+
+
+    /**
+    * @config minscrollheight
+    * @description Number defining the minimum threshold for the "maxheight" 
+    * configuration property.  When set this property is automatically applied 
+    * to all submenus.
+    * @default 90
+    * @type Number
+    */
+    oConfig.addProperty(
+        DEFAULT_CONFIG.MIN_SCROLL_HEIGHT.key, 
+        { 
+            value: DEFAULT_CONFIG.MIN_SCROLL_HEIGHT.value, 
+            validator: DEFAULT_CONFIG.MIN_SCROLL_HEIGHT.validator,
+            supercedes: DEFAULT_CONFIG.MIN_SCROLL_HEIGHT.supercedes,
+            suppressEvent: DEFAULT_CONFIG.MIN_SCROLL_HEIGHT.suppressEvent
+        }
+    );
+
+
+    /**
     * @config maxheight
-    * @description Defines the maximum height (in pixels) for a menu before the
-    * contents of the body are scrolled.
+    * @description Number defining the maximum height (in pixels) for a menu's 
+    * body element (<code><div class="bd"<</code>).  Once a menu's body 
+    * exceeds this height, the contents of the body are scrolled to maintain 
+    * this value.  This value cannot be set lower than the value of the 
+    * "minscrollheight" configuration property.
     * @default 0
     * @type Number
     */
@@ -5669,17 +5831,20 @@
        {
             handler: this.configMaxHeight,
             value: DEFAULT_CONFIG.MAX_HEIGHT.value,
-            validator: DEFAULT_CONFIG.MAX_HEIGHT.validator
+            validator: DEFAULT_CONFIG.MAX_HEIGHT.validator,
+            suppressEvent: DEFAULT_CONFIG.MAX_HEIGHT.suppressEvent,
+            supercedes: DEFAULT_CONFIG.MAX_HEIGHT.supercedes            
        } 
     );
 
 
     /**
     * @config classname
-    * @description CSS class to be applied to the menu's root 
-    * <code><div></code> element.  The specified class(es) are 
-    * appended in addition to the default class as specified by the menu's
-    * CSS_CLASS_NAME constant.
+    * @description String representing the CSS class to be applied to the 
+    * menu's root <code><div></code> element.  The specified class(es)  
+    * are appended in addition to the default class as specified by the menu's
+    * CSS_CLASS_NAME constant. When set this property is automatically 
+    * applied to all submenus.
     * @default null
     * @type String
     */
@@ -5688,7 +5853,8 @@
         { 
             handler: this.configClassName,
             value: DEFAULT_CONFIG.CLASS_NAME.value, 
-            validator: DEFAULT_CONFIG.CLASS_NAME.validator
+            validator: DEFAULT_CONFIG.CLASS_NAME.validator,
+            supercedes: DEFAULT_CONFIG.CLASS_NAME.supercedes      
         }
     );
 
@@ -5721,7 +5887,7 @@
 
 
 
-(function() {
+(function () {
 
 
 /**
@@ -5743,11 +5909,11 @@
 * @class MenuItem
 * @constructor
 */
-YAHOO.widget.MenuItem = function(p_oObject, p_oConfig) {
+YAHOO.widget.MenuItem = function (p_oObject, p_oConfig) {
 
-    if(p_oObject) {
+    if (p_oObject) {
 
-        if(p_oConfig) {
+        if (p_oConfig) {
     
             this.parent = p_oConfig.parent;
             this.value = p_oConfig.value;
@@ -5761,6 +5927,7 @@
 
 };
 
+
 var Dom = YAHOO.util.Dom,
     Module = YAHOO.widget.Module,
     Menu = YAHOO.widget.Menu,
@@ -5813,7 +5980,8 @@
     
         "HELP_TEXT": { 
             key: "helptext",
-            supercedes: ["text"]
+            supercedes: ["text"], 
+            suppressEvent: true 
         },
     
         "URL": { 
@@ -5848,15 +6016,21 @@
             value: false, 
             validator: Lang.isBoolean, 
             suppressEvent: true, 
-            supercedes: ["text"]
+            supercedes: ["disabled", "selected"]
         }, 
+
+        "SUBMENU": { 
+            key: "submenu",
+            suppressEvent: true,
+            supercedes: ["disabled", "selected"]
+        },
     
         "DISABLED": { 
             key: "disabled", 
             value: false, 
             validator: Lang.isBoolean, 
             suppressEvent: true,
-            supercedes: ["text"]
+            supercedes: ["text", "selected"]
         },
     
         "SELECTED": { 
@@ -5866,19 +6040,16 @@
             suppressEvent: true
         },
     
-        "SUBMENU": { 
-            key: "submenu",
-            supercedes: ["text"]
-        },
-    
         "ONCLICK": { 
-            key: "onclick"
+            key: "onclick",
+            suppressEvent: true
         },
     
         "CLASS_NAME": { 
             key: "classname", 
             value: null, 
-            validator: Lang.isString
+            validator: Lang.isString,
+            suppressEvent: true
         }
     
     };
@@ -5886,67 +6057,7 @@
 
 MenuItem.prototype = {
 
-    // Constants
-
     /**
-    * @property COLLAPSED_SUBMENU_INDICATOR_TEXT
-    * @description String representing the text for the <code><em></code>
-    * element used for the submenu arrow indicator.
-    * @default "Submenu collapsed.  Click to expand submenu."
-    * @final
-    * @type String
-    */
-    COLLAPSED_SUBMENU_INDICATOR_TEXT: 
-        "Submenu collapsed.  Click to expand submenu.",
-
-
-    /**
-    * @property EXPANDED_SUBMENU_INDICATOR_TEXT
-    * @description String representing the text for the submenu arrow indicator 
-    * element (<code><em></code>) when the submenu is visible.
-    * @default "Submenu expanded.  Click to collapse submenu."
-    * @final
-    * @type String
-    */
-    EXPANDED_SUBMENU_INDICATOR_TEXT: 
-        "Submenu expanded.  Click to collapse submenu.",
-
-
-    /**
-    * @property DISABLED_SUBMENU_INDICATOR_TEXT
-    * @description String representing the text for the submenu arrow indicator 
-    * element (<code><em></code>) when the menu item is disabled.
-    * @default "Submenu collapsed.  (Item disabled.)."
-    * @final
-    * @type String
-    */
-    DISABLED_SUBMENU_INDICATOR_TEXT: "Submenu collapsed.  (Item disabled.)",
-
-
-    /**
-    * @property CHECKED_TEXT
-    * @description String representing the text to be used for the checked 
-    * indicator element (<code><em></code>).
-    * @default "Checked."
-    * @final
-    * @type String
-    */
-    CHECKED_TEXT: "Menu item checked.",
-    
-    
-    /**
-    * @property DISABLED_CHECKED_TEXT
-    * @description String representing the text to be used for the checked 
-    * indicator element (<code><em></code>) when the menu item 
-    * is disabled.
-    * @default "Checked. (Item disabled.)"
-    * @final
-    * @type String
-    */
-    DISABLED_CHECKED_TEXT: "Checked. (Item disabled.)",
-
-
-    /**
     * @property CSS_CLASS_NAME
     * @description String representing the CSS class(es) to be applied to the 
     * <code><li></code> element of the menu item.
@@ -6014,20 +6125,8 @@
     * @type YAHOO.widget.Menu
     */
     _oSubmenu: null,
-    
 
-    /**
-    * @property _oCheckedIndicator
-    * @description Object reference to the menu item's checkmark image.
-    * @default <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-    * level-one-html.html#ID-58190037">HTMLElement</a>
-    * @private
-    * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-    * level-one-html.html#ID-58190037">HTMLElement</a>
-    */
-    _oCheckedIndicator: null,
 
-
     /** 
     * @property _oOnclickAttributeValue
     * @description Object reference to the menu item's current value for the 
@@ -6131,18 +6230,6 @@
     value: null,
 
 
-    /**
-    * @property submenuIndicator
-    * @description Object reference to the <code><em></code> element 
-    * used to create the submenu indicator for the menu item.
-    * @default <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-    * level-one-html.html#ID-58190037">HTMLElement</a>
-    * @type <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
-    * level-one-html.html#ID-58190037">HTMLElement</a>
-    */
-    submenuIndicator: null,
-
-
 	/**
     * @property browser
     * @deprecated Use YAHOO.env.ua
@@ -6285,10 +6372,10 @@
     * configuration for the menu item. See configuration class documentation 
     * for more details.
     */
-    init: function(p_oObject, p_oConfig) {
+    init: function (p_oObject, p_oConfig) {
 
 
-        if(!this.SUBMENU_TYPE) {
+        if (!this.SUBMENU_TYPE) {
     
             this.SUBMENU_TYPE = Menu;
     
@@ -6310,14 +6397,14 @@
             sId;
 
 
-        if(Lang.isString(p_oObject)) {
+        if (Lang.isString(p_oObject)) {
 
             this._createRootNodeStructure();
 
             oConfig.queueProperty("text", p_oObject);
 
         }
-        else if(p_oObject && p_oObject.tagName) {
+        else if (p_oObject && p_oObject.tagName) {
 
             switch(p_oObject.tagName.toUpperCase()) {
 
@@ -6326,7 +6413,8 @@
                     this._createRootNodeStructure();
 
                     oConfig.queueProperty("text", p_oObject.text);
-                    
+                    oConfig.queueProperty("disabled", p_oObject.disabled);
+
                     this.value = p_oObject.value;
 
                     this.srcElement = p_oObject;
@@ -6338,6 +6426,7 @@
                     this._createRootNodeStructure();
 
                     oConfig.queueProperty("text", p_oObject.label);
+                    oConfig.queueProperty("disabled", p_oObject.disabled);
 
                     this.srcElement = p_oObject;
 
@@ -6354,18 +6443,11 @@
 
                     // Capture the "text" and/or the "URL"
 
-                    if(oAnchor) {
+                    if (oAnchor) {
 
                         sURL = oAnchor.getAttribute("href");
+                        sTarget = oAnchor.getAttribute("target");
 
-                        if (YAHOO.env.ua.ie) {
-            
-                            sURL = sURL.substring(
-                                document.location.href.length, sURL.length);
-            
-                        }
-
-                        sTarget = oAnchor.getAttribute("target");
                         sText = oAnchor.innerHTML;
 
                     }
@@ -6393,11 +6475,11 @@
         }
 
 
-        if(this.element) {
+        if (this.element) {
 
-            sId = this.element.id;
+            sId = (this.srcElement || this.element).id;
 
-            if(!sId) {
+            if (!sId) {
 
                 sId = this.id || Dom.generateId();
 
@@ -6447,7 +6529,7 @@
             this.destroyEvent = this.createEvent(EVENT_TYPES.DESTROY);
             this.destroyEvent.signature = SIGNATURE;
 
-            if(p_oConfig) {
+            if (p_oConfig) {
     
                 oConfig.applyConfig(p_oConfig);
     
@@ -6474,7 +6556,7 @@
         var oElement,
             oAnchor;
 
-        if(!m_oMenuItemTemplate) {
+        if (!m_oMenuItemTemplate) {
 
             m_oMenuItemTemplate = document.createElement("li");
             m_oMenuItemTemplate.innerHTML = "<a href=\"#\"></a>";
@@ -6499,7 +6581,7 @@
     * the child nodes to instantiate other menus.
     * @private
     */
-    _initSubTree: function() {
+    _initSubTree: function () {
 
         var oSrcEl = this.srcElement,
             oConfig = this.cfg,
@@ -6510,9 +6592,9 @@
             n;
 
 
-        if(oSrcEl.childNodes.length > 0) {
+        if (oSrcEl.childNodes.length > 0) {
 
-            if(this.parent.lazyLoad && this.parent.srcElement && 
+            if (this.parent.lazyLoad && this.parent.srcElement && 
                 this.parent.srcElement.tagName.toUpperCase() == "SELECT") {
 
                 oConfig.setProperty(
@@ -6528,7 +6610,7 @@
     
                 do {
     
-                    if(oNode && oNode.tagName) {
+                    if (oNode && oNode.tagName) {
     
                         switch(oNode.tagName.toUpperCase()) {
                 
@@ -6554,7 +6636,7 @@
     
                 nOptions = aOptions.length;
     
-                if(nOptions > 0) {
+                if (nOptions > 0) {
     
                     oMenu = new this.SUBMENU_TYPE(Dom.generateId());
                     
@@ -6589,16 +6671,13 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */
-    configText: function(p_sType, p_aArgs, p_oItem) {
+    configText: function (p_sType, p_aArgs, p_oItem) {
 
         var sText = p_aArgs[0],
             oConfig = this.cfg,
             oAnchor = this._oAnchor,
             sHelpText = oConfig.getProperty("helptext"),
             sHelpTextHTML = "",
-            sCheckHTML = "",
-            oSubmenu = oConfig.getProperty("submenu"),
-            sSubmenuIndicatorHTML = "",
             sEmphasisStartTag = "",
             sEmphasisEndTag = "";
 
@@ -6613,25 +6692,6 @@
             }
 
 
-            if (oConfig.getProperty("checked")) {
-
-                sCheckHTML = "<em class=\"checkedindicator\">" + 
-                    this.CHECKED_TEXT + "</em>";
-            
-            }
-            
-            
-            if (oSubmenu) {
-
-                sSubmenuIndicatorHTML =  "<em class=\"submenuindicator\">" + 
-                    ((oSubmenu instanceof Menu && 
-                    oSubmenu.cfg.getProperty("visible")) ? 
-                    this.EXPANDED_SUBMENU_INDICATOR_TEXT : 
-                    this.COLLAPSED_SUBMENU_INDICATOR_TEXT) + "</em>";
-            
-            }
-            
-
             if (oConfig.getProperty("emphasis")) {
 
                 sEmphasisStartTag = "<em>";
@@ -6649,16 +6709,8 @@
 
 
             oAnchor.innerHTML = (sEmphasisStartTag + sText + 
-                sEmphasisEndTag + sHelpTextHTML + 
-                sCheckHTML + sSubmenuIndicatorHTML);
+                sEmphasisEndTag + sHelpTextHTML);
 
-
-            if (oSubmenu) {
-
-                this.submenuIndicator = oAnchor.lastChild;
-            
-            }
-
         }
 
     },
@@ -6674,22 +6726,8 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */    
-    configHelpText: function(p_sType, p_aArgs, p_oItem) {
+    configHelpText: function (p_sType, p_aArgs, p_oItem) {
 
-        var sHelpText = p_aArgs[0],
-            oAnchor = this._oAnchor;
-
-        if (sHelpText) {
-
-            Dom.addClass(oAnchor, "hashelptext");
-
-        }
-        else {
-
-            Dom.removeClass(oAnchor, "hashelptext");
-        
-        }
-
         this.cfg.refireEvent("text");
 
     },
@@ -6705,11 +6743,11 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */    
-    configURL: function(p_sType, p_aArgs, p_oItem) {
+    configURL: function (p_sType, p_aArgs, p_oItem) {
 
         var sURL = p_aArgs[0];
 
-        if(!sURL) {
+        if (!sURL) {
 
             sURL = "#";
 
@@ -6738,12 +6776,12 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */    
-    configTarget: function(p_sType, p_aArgs, p_oItem) {
+    configTarget: function (p_sType, p_aArgs, p_oItem) {
 
         var sTarget = p_aArgs[0],
             oAnchor = this._oAnchor;
 
-        if(sTarget && sTarget.length > 0) {
+        if (sTarget && sTarget.length > 0) {
 
             oAnchor.setAttribute("target", sTarget);
 
@@ -6767,13 +6805,13 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */    
-    configEmphasis: function(p_sType, p_aArgs, p_oItem) {
+    configEmphasis: function (p_sType, p_aArgs, p_oItem) {
 
         var bEmphasis = p_aArgs[0],
             oConfig = this.cfg;
 
 
-        if(bEmphasis && oConfig.getProperty("strongemphasis")) {
+        if (bEmphasis && oConfig.getProperty("strongemphasis")) {
 
             oConfig.setProperty("strongemphasis", false);
 
@@ -6795,13 +6833,13 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */    
-    configStrongEmphasis: function(p_sType, p_aArgs, p_oItem) {
+    configStrongEmphasis: function (p_sType, p_aArgs, p_oItem) {
 
         var bStrongEmphasis = p_aArgs[0],
             oConfig = this.cfg;
 
 
-        if(bStrongEmphasis && oConfig.getProperty("emphasis")) {
+        if (bStrongEmphasis && oConfig.getProperty("emphasis")) {
 
             oConfig.setProperty("emphasis", false);
 
@@ -6822,24 +6860,47 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */    
-    configChecked: function(p_sType, p_aArgs, p_oItem) {
+    configChecked: function (p_sType, p_aArgs, p_oItem) {
 
         var bChecked = p_aArgs[0],
-            oAnchor = this._oAnchor;
+            oElement = this.element,
+            oAnchor = this._oAnchor,
+            oConfig = this.cfg,
+            sState = "-checked",
+            sClassName = this.CSS_CLASS_NAME + sState,
+            sLabelClassName = this.CSS_LABEL_CLASS_NAME + sState;
 
+
         if (bChecked) {
 
-            Dom.addClass(oAnchor, "checked");
+            Dom.addClass(oElement, sClassName);
+            Dom.addClass(oAnchor, sLabelClassName);
 
         }
         else {
 
-            Dom.removeClass(oAnchor, "checked");
+            Dom.removeClass(oElement, sClassName);
+            Dom.removeClass(oAnchor, sLabelClassName);
         
         }
 
-        this.cfg.refireEvent("text");
 
+        oConfig.refireEvent("text");
+
+
+        if (oConfig.getProperty("disabled")) {
+
+            oConfig.refireEvent("disabled");
+
+        }
+
+
+        if (oConfig.getProperty("selected")) {
+
+            oConfig.refireEvent("selected");
+
+        }
+
     },
 
 
@@ -6854,32 +6915,74 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */    
-    configDisabled: function(p_sType, p_aArgs, p_oItem) {
+    configDisabled: function (p_sType, p_aArgs, p_oItem) {
 
         var bDisabled = p_aArgs[0],
             oConfig = this.cfg,
-            oAnchor = this._oAnchor;
+            oSubmenu = oConfig.getProperty("submenu"),
+            bChecked = oConfig.getProperty("checked"),
+            oElement = this.element,
+            oAnchor = this._oAnchor,
+            sState = "-disabled",
+            sCheckedState = "-checked" + sState,
+            sSubmenuState = "-hassubmenu" + sState,
+            sClassName = this.CSS_CLASS_NAME + sState,
+            sLabelClassName = this.CSS_LABEL_CLASS_NAME + sState,
+            sCheckedClassName = this.CSS_CLASS_NAME + sCheckedState,
+            sLabelCheckedClassName = this.CSS_LABEL_CLASS_NAME + sCheckedState,
+            sSubmenuClassName = this.CSS_CLASS_NAME + sSubmenuState,
+            sLabelSubmenuClassName = this.CSS_LABEL_CLASS_NAME + sSubmenuState;
 
 
-        if(bDisabled) {
+        if (bDisabled) {
 
-            if(oConfig.getProperty("selected")) {
+            if (oConfig.getProperty("selected")) {
 
                 oConfig.setProperty("selected", false);
 
             }
 
-            oAnchor.removeAttribute("href");
+            Dom.addClass(oElement, sClassName);
+            Dom.addClass(oAnchor, sLabelClassName);
 
-            Dom.addClass(oAnchor, "disabled");
 
+            if (oSubmenu) {
+
+                Dom.addClass(oElement, sSubmenuClassName);
+                Dom.addClass(oAnchor, sLabelSubmenuClassName);
+            
+            }
+            
+
+            if (bChecked) {
+
+                Dom.addClass(oElement, sCheckedClassName);
+                Dom.addClass(oAnchor, sLabelCheckedClassName);
+
+            }
+
         }
         else {
 
-            oAnchor.setAttribute("href", oConfig.getProperty("url"));
+            Dom.removeClass(oElement, sClassName);
+            Dom.removeClass(oAnchor, sLabelClassName);
 
-            Dom.removeClass(oAnchor, "disabled");
 
+            if (oSubmenu) {
+
+                Dom.removeClass(oElement, sSubmenuClassName);
+                Dom.removeClass(oAnchor, sLabelSubmenuClassName);
+            
+            }
+            
+
+            if (bChecked) {
+
+                Dom.removeClass(oElement, sCheckedClassName);
+                Dom.removeClass(oAnchor, sLabelCheckedClassName);
+
+            }
+
         }
 
     },
@@ -6895,62 +6998,84 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */    
-    configSelected: function(p_sType, p_aArgs, p_oItem) {
+    configSelected: function (p_sType, p_aArgs, p_oItem) {
 
-        var bSelected,
-            oAnchor;
+        var oConfig = this.cfg,
+            bSelected = p_aArgs[0],
+            oElement = this.element,
+            oAnchor = this._oAnchor,
+            bChecked = oConfig.getProperty("checked"),
+            oSubmenu = oConfig.getProperty("submenu"),
+            sState = "-selected",
+            sCheckedState = "-checked" + sState,
+            sSubmenuState = "-hassubmenu" + sState,
+            sClassName = this.CSS_CLASS_NAME + sState,
+            sLabelClassName = this.CSS_LABEL_CLASS_NAME + sState,
+            sCheckedClassName = this.CSS_CLASS_NAME + sCheckedState,
+            sLabelCheckedClassName = this.CSS_LABEL_CLASS_NAME + sCheckedState,
+            sSubmenuClassName = this.CSS_CLASS_NAME + sSubmenuState,
+            sLabelSubmenuClassName = this.CSS_LABEL_CLASS_NAME + sSubmenuState;
 
-        if(!this.cfg.getProperty("disabled")) {
 
-            bSelected = p_aArgs[0];
-            oAnchor = this._oAnchor;
+        if (YAHOO.env.ua.opera) {
 
-            if (YAHOO.env.ua.opera) {
+            oAnchor.blur();
+        
+        }
 
-                oAnchor.blur();
+
+        if (bSelected && !oConfig.getProperty("disabled")) {
+
+            Dom.addClass(oElement, sClassName);
+            Dom.addClass(oAnchor, sLabelClassName);
+
+
+            if (oSubmenu) {
+
+                Dom.addClass(oElement, sSubmenuClassName);
+                Dom.addClass(oAnchor, sLabelSubmenuClassName);
             
             }
 
-            if(bSelected) {
-    
-                Dom.addClass(oAnchor, "selected");
-    
-            }
-            else {
-    
-                Dom.removeClass(oAnchor, "selected");
-    
-            }
 
-            if (this.hasFocus() && YAHOO.env.ua.opera) {
-            
-                oAnchor.focus();
-            
+            if (bChecked) {
+
+                Dom.addClass(oElement, sCheckedClassName);
+                Dom.addClass(oAnchor, sLabelCheckedClassName);
+
             }
 
         }
+        else {
 
-    },
+            Dom.removeClass(oElement, sClassName);
+            Dom.removeClass(oAnchor, sLabelClassName);
 
 
-    /**
-    * @method _onSubmenuShow
-    * @description "show" event handler for a submenu.
-    * @private
-    * @param {String} p_sType String representing the name of the event that 
-    * was fired.
-    * @param {Array} p_aArgs Array of arguments sent when the event was fired.
-    */
-    _onSubmenuShow: function (p_sType, p_aArgs) {
+            if (oSubmenu) {
 
-        var oTextNode = this.submenuIndicator.firstChild;
+                Dom.removeClass(oElement, sSubmenuClassName);
+                Dom.removeClass(oAnchor, sLabelSubmenuClassName);
+            
+            }
+
         
-        if (oTextNode) {
+            if (bChecked) {
 
-            oTextNode.nodeValue = this.EXPANDED_SUBMENU_INDICATOR_TEXT;
+                Dom.removeClass(oElement, sCheckedClassName);
+                Dom.removeClass(oAnchor, sLabelCheckedClassName);
 
+            }
+
         }
 
+
+        if (this.hasFocus() && YAHOO.env.ua.opera) {
+        
+            oAnchor.focus();
+        
+        }
+
     },
 
 
@@ -6973,7 +7098,8 @@
             oMenu.beforeHideEvent.unsubscribe(onHide);
         
         }
-    
+
+
         if (oItem.hasFocus()) {
 
             oMenu = oItem.parent;
@@ -6983,29 +7109,8 @@
         }
     
     },
-    
 
-    /**
-    * @method _onSubmenuHide
-    * @description "hide" Custom Event handler for a submenu.
-    * @private
-    * @param {String} p_sType String representing the name of the event that 
-    * was fired.
-    * @param {Array} p_aArgs Array of arguments sent when the event was fired.
-    */
-    _onSubmenuHide: function (p_sType, p_aArgs) {
 
-        var oTextNode = this.submenuIndicator.firstChild;
-        
-        if (oTextNode) {
-
-            oTextNode.nodeValue = this.COLLAPSED_SUBMENU_INDICATOR_TEXT;
-
-        }
-
-    },
-
-
     /**
     * @method configSubmenu
     * @description Event handler for when the "submenu" configuration property 
@@ -7016,28 +7121,31 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */
-    configSubmenu: function(p_sType, p_aArgs, p_oItem) {
+    configSubmenu: function (p_sType, p_aArgs, p_oItem) {
 
-        var oAnchor = this._oAnchor,
-            oSubmenu = p_aArgs[0],
-            oSubmenuIndicator = this.submenuIndicator,
+        var oSubmenu = p_aArgs[0],
             oConfig = this.cfg,
+            oElement = this.element,
+            oAnchor = this._oAnchor,
             bLazyLoad = this.parent && this.parent.lazyLoad,
+            sState = "-hassubmenu",
+            sClassName = this.CSS_CLASS_NAME + sState,
+            sLabelClassName = this.CSS_LABEL_CLASS_NAME + sState,
             oMenu,
             sSubmenuId,
             oSubmenuConfig;
 
 
-        if(oSubmenu) {
+        if (oSubmenu) {
 
-            if(oSubmenu instanceof Menu) {
+            if (oSubmenu instanceof Menu) {
 
                 oMenu = oSubmenu;
                 oMenu.parent = this;
                 oMenu.lazyLoad = bLazyLoad;
 
             }
-            else if(typeof oSubmenu == "object" && oSubmenu.id && 
+            else if (typeof oSubmenu == "object" && oSubmenu.id && 
                 !oSubmenu.nodeType) {
 
                 sSubmenuId = oSubmenu.id;
@@ -7051,7 +7159,7 @@
 
                 // Set the value of the property to the Menu instance
 
-                this.cfg.setProperty("submenu", oMenu, true);
+                oConfig.setProperty("submenu", oMenu, true);
 
             }
             else {
@@ -7062,20 +7170,18 @@
 
                 // Set the value of the property to the Menu instance
                 
-                this.cfg.setProperty("submenu", oMenu, true);
+                oConfig.setProperty("submenu", oMenu, true);
 
             }
 
 
-            if(oMenu) {
+            if (oMenu) {
 
-                Dom.addClass(oAnchor, "hassubmenu");
+                Dom.addClass(oElement, sClassName);
+                Dom.addClass(oAnchor, sLabelClassName);
 
                 this._oSubmenu = oMenu;
-                
-                oMenu.showEvent.subscribe(this._onSubmenuShow, null, this);
-                oMenu.hideEvent.subscribe(this._onSubmenuHide, null, this);
-            
+
                 if (YAHOO.env.ua.opera) {
                 
                     oMenu.beforeHideEvent.subscribe(this._onSubmenuBeforeHide);               
@@ -7087,24 +7193,31 @@
         }
         else {
 
-            Dom.removeClass(oAnchor, "hassubmenu");
+            Dom.removeClass(oElement, sClassName);
+            Dom.removeClass(oAnchor, sLabelClassName);
 
-            if(oSubmenuIndicator) {
+            if (this._oSubmenu) {
 
-                oAnchor.removeChild(oSubmenuIndicator);
+                this._oSubmenu.destroy();
 
             }
 
-            if(this._oSubmenu) {
+        }
 
-                this._oSubmenu.destroy();
 
-            }
+        if (oConfig.getProperty("disabled")) {
 
+            oConfig.refireEvent("disabled");
+
         }
-        
-        oConfig.refireEvent("text");
 
+
+        if (oConfig.getProperty("selected")) {
+
+            oConfig.refireEvent("selected");
+
+        }
+
     },
 
 
@@ -7118,7 +7231,7 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */
-    configOnClick: function(p_sType, p_aArgs, p_oItem) {
+    configOnClick: function (p_sType, p_aArgs, p_oItem) {
 
         var oObject = p_aArgs[0];
 
@@ -7127,7 +7240,7 @@
             already been specified.
         */
 
-        if(this._oOnclickAttributeValue && 
+        if (this._oOnclickAttributeValue && 
             (this._oOnclickAttributeValue != oObject)) {
 
             this.clickEvent.unsubscribe(this._oOnclickAttributeValue.fn, 
@@ -7138,7 +7251,7 @@
         }
 
 
-        if(!this._oOnclickAttributeValue && typeof oObject == "object" && 
+        if (!this._oOnclickAttributeValue && typeof oObject == "object" && 
             typeof oObject.fn == "function") {
             
             this.clickEvent.subscribe(oObject.fn, 
@@ -7162,11 +7275,11 @@
     * @param {YAHOO.widget.MenuItem} p_oItem Object representing the menu item
     * that fired the event.
     */
-    configClassName: function(p_sType, p_aArgs, p_oItem) {
+    configClassName: function (p_sType, p_aArgs, p_oItem) {
     
         var sClassName = p_aArgs[0];
     
-        if(this._sClassName) {
+        if (this._sClassName) {
     
             Dom.removeClass(this.element, this._sClassName);
     
@@ -7186,7 +7299,7 @@
     * @method initDefaultConfig
 	* @description Initializes an item's configurable properties.
 	*/
-	initDefaultConfig : function() {
+	initDefaultConfig : function () {
 
         var oConfig = this.cfg;
 
@@ -7226,7 +7339,11 @@
         */
         oConfig.addProperty(
             DEFAULT_CONFIG.HELP_TEXT.key,
-            { handler: this.configHelpText }
+            {
+                handler: this.configHelpText, 
+                supercedes: DEFAULT_CONFIG.HELP_TEXT.supercedes,
+                suppressEvent: DEFAULT_CONFIG.HELP_TEXT.suppressEvent 
+            }
         );
 
 
@@ -7284,7 +7401,8 @@
                 handler: this.configEmphasis, 
                 value: DEFAULT_CONFIG.EMPHASIS.value, 
                 validator: DEFAULT_CONFIG.EMPHASIS.validator, 
-                suppressEvent: DEFAULT_CONFIG.EMPHASIS.suppressEvent 
+                suppressEvent: DEFAULT_CONFIG.EMPHASIS.suppressEvent,
+                supercedes: DEFAULT_CONFIG.EMPHASIS.supercedes
             }
         );
 
@@ -7305,7 +7423,8 @@
                 handler: this.configStrongEmphasis,
                 value: DEFAULT_CONFIG.STRONG_EMPHASIS.value,
                 validator: DEFAULT_CONFIG.STRONG_EMPHASIS.validator,
-                suppressEvent: DEFAULT_CONFIG.STRONG_EMPHASIS.suppressEvent
+                suppressEvent: DEFAULT_CONFIG.STRONG_EMPHASIS.suppressEvent,
+                supercedes: DEFAULT_CONFIG.STRONG_EMPHASIS.supercedes
             }
         );
 
@@ -7384,7 +7503,11 @@
         */
         oConfig.addProperty(
             DEFAULT_CONFIG.SUBMENU.key, 
-            { handler: this.configSubmenu }
+            {
+                handler: this.configSubmenu, 
+                supercedes: DEFAULT_CONFIG.SUBMENU.supercedes,
+                suppressEvent: DEFAULT_CONFIG.SUBMENU.suppressEvent
+            }
         );
 
 
@@ -7402,7 +7525,10 @@
         */
         oConfig.addProperty(
             DEFAULT_CONFIG.ONCLICK.key, 
-            { handler: this.configOnClick }
+            {
+                handler: this.configOnClick, 
+                suppressEvent: DEFAULT_CONFIG.ONCLICK.suppressEvent 
+            }
         );
 
 
@@ -7420,7 +7546,8 @@
             { 
                 handler: this.configClassName,
                 value: DEFAULT_CONFIG.CLASS_NAME.value, 
-                validator: DEFAULT_CONFIG.CLASS_NAME.validator
+                validator: DEFAULT_CONFIG.CLASS_NAME.validator,
+                suppressEvent: DEFAULT_CONFIG.CLASS_NAME.suppressEvent 
             }
         );
 
@@ -7432,7 +7559,7 @@
     * @description Finds the menu item's next enabled sibling.
     * @return YAHOO.widget.MenuItem
     */
-    getNextEnabledSibling: function() {
+    getNextEnabledSibling: function () {
 
         var nGroupIndex,
             aItemGroups,
@@ -7447,13 +7574,13 @@
 
         }
 
-        if(this.parent instanceof Menu) {
+        if (this.parent instanceof Menu) {
 
             nGroupIndex = this.groupIndex;
     
             aItemGroups = this.parent.getItemGroups();
     
-            if(this.index < (aItemGroups[nGroupIndex].length - 1)) {
+            if (this.index < (aItemGroups[nGroupIndex].length - 1)) {
     
                 oNextItem = getNextArrayItem(aItemGroups[nGroupIndex], 
                         (this.index+1));
@@ -7461,7 +7588,7 @@
             }
             else {
     
-                if(nGroupIndex < (aItemGroups.length - 1)) {
+                if (nGroupIndex < (aItemGroups.length - 1)) {
     
                     nNextGroupIndex = nGroupIndex + 1;
     
@@ -7494,7 +7621,7 @@
     * @description Finds the menu item's previous enabled sibling.
     * @return {YAHOO.widget.MenuItem}
     */
-    getPreviousEnabledSibling: function() {
+    getPreviousEnabledSibling: function () {
 
         var nGroupIndex,
             aItemGroups,
@@ -7516,13 +7643,13 @@
 
         }
 
-       if(this.parent instanceof Menu) {
+       if (this.parent instanceof Menu) {
 
             nGroupIndex = this.groupIndex;
             aItemGroups = this.parent.getItemGroups();
 
     
-            if(this.index > getFirstItemIndex(aItemGroups[nGroupIndex], 0)) {
+            if (this.index > getFirstItemIndex(aItemGroups[nGroupIndex], 0)) {
     
                 oPreviousItem = getPreviousArrayItem(aItemGroups[nGroupIndex], 
                         (this.index-1));
@@ -7530,7 +7657,7 @@
             }
             else {
     
-                if(nGroupIndex > getFirstItemIndex(aItemGroups, 0)) {
+                if (nGroupIndex > getFirstItemIndex(aItemGroups, 0)) {
     
                     nPreviousGroupIndex = nGroupIndex - 1;
     
@@ -7563,7 +7690,7 @@
     * @description Causes the menu item to receive the focus and fires the 
     * focus event.
     */
-    focus: function() {
+    focus: function () {
 
         var oParent = this.parent,
             oAnchor = this._oAnchor,
@@ -7581,7 +7708,15 @@
                 
                 }
 
+                if (oActiveItem) {
+    
+                    oActiveItem.blurEvent.fire();
+    
+                }
+
                 oAnchor.focus();
+                
+                me.focusEvent.fire();
 
             }
             catch(e) {
@@ -7591,17 +7726,11 @@
         }
 
 
-        if(!this.cfg.getProperty("disabled") && oParent && 
+        if (!this.cfg.getProperty("disabled") && oParent && 
             oParent.cfg.getProperty("visible") && 
             this.element.style.display != "none") {
 
-            if(oActiveItem) {
 
-                oActiveItem.blur();
-
-            }
-
-
             /*
                 Setting focus via a timer fixes a race condition in Firefox, IE 
                 and Opera where the browser viewport jumps as it trys to 
@@ -7609,8 +7738,6 @@
             */
 
             window.setTimeout(setFocus, 0);
-            
-            this.focusEvent.fire();
 
         }
 
@@ -7622,24 +7749,30 @@
     * @description Causes the menu item to lose focus and fires the 
     * blur event.
     */    
-    blur: function() {
+    blur: function () {
 
         var oParent = this.parent;
 
-        if(!this.cfg.getProperty("disabled") && oParent && 
+        if (!this.cfg.getProperty("disabled") && oParent && 
             oParent.cfg.getProperty("visible")) {
 
-            try {
 
-                this._oAnchor.blur();
+            var me = this;
             
-            }
-            catch (e) {
-            
-            }
+            window.setTimeout(function () {
 
-            this.blurEvent.fire();
+                try {
+    
+                    me._oAnchor.blur();
+                    me.blurEvent.fire();    
 
+                } 
+                catch (e) {
+                
+                }
+                
+            }, 0);
+
         }
 
     },
@@ -7651,7 +7784,7 @@
     * has focus.
     * @return {Boolean}
     */
-    hasFocus: function() {
+    hasFocus: function () {
     
         return (YAHOO.widget.MenuManager.getFocusedMenuItem() == this);
     
@@ -7663,20 +7796,20 @@
 	* @description Removes the menu item's <code><li></code> element 
 	* from its parent <code><ul></code> element.
 	*/
-    destroy: function() {
+    destroy: function () {
 
         var oEl = this.element,
             oSubmenu,
             oParentNode;
 
-        if(oEl) {
+        if (oEl) {
 
 
             // If the item has a submenu, destroy it first
 
             oSubmenu = this.cfg.getProperty("submenu");
 
-            if(oSubmenu) {
+            if (oSubmenu) {
             
                 oSubmenu.destroy();
             
@@ -7702,7 +7835,7 @@
 
             oParentNode = oEl.parentNode;
 
-            if(oParentNode) {
+            if (oParentNode) {
 
                 oParentNode.removeChild(oEl);
 
@@ -7722,12 +7855,12 @@
     * @description Returns a string representing the menu item.
     * @return {String}
     */
-    toString: function() {
+    toString: function () {
 
         var sReturnVal = "MenuItem",
             sId = this.id;
 
-        if(sId) {
+        if (sId) {
     
             sReturnVal += (" " + sId);
         
@@ -7776,16 +7909,19 @@
 
 };
 
+
 var Event = YAHOO.util.Event,
     ContextMenu = YAHOO.widget.ContextMenu,
 
-/**
-* Constant representing the name of the ContextMenu's events
-* @property EVENT_TYPES
-* @private
-* @final
-* @type Object
-*/
+
+
+    /**
+    * Constant representing the name of the ContextMenu's events
+    * @property EVENT_TYPES
+    * @private
+    * @final
+    * @type Object
+    */
     EVENT_TYPES = {
 
         "TRIGGER_CONTEXT_MENU": "triggerContextMenu",
@@ -7805,12 +7941,31 @@
     DEFAULT_CONFIG = {
     
         "TRIGGER": { 
-            key: "trigger" 
+            key: "trigger",
+            suppressEvent: true
         }
     
     };
 
 
+/**
+* @method position
+* @description "beforeShow" event handler used to position the contextmenu.
+* @private
+* @param {String} p_sType String representing the name of the event that 
+* was fired.
+* @param {Array} p_aArgs Array of arguments sent when the event was fired.
+* @param {Array} p_aPos Array representing the xy position for the context menu.
+*/
+function position(p_sType, p_aArgs, p_aPos) {
+
+    this.cfg.setProperty("xy", p_aPos);
+    
+    this.beforeShowEvent.unsubscribe(position, p_aPos);
+
+}
+
+
 YAHOO.lang.extend(ContextMenu, YAHOO.widget.Menu, {
 
 
@@ -7894,13 +8049,7 @@
 */
 init: function(p_oElement, p_oConfig) {
 
-    if(!this.ITEM_TYPE) {
 
-        this.ITEM_TYPE = YAHOO.widget.ContextMenuItem;
-
-    }
-
-
     // Call the init of the superclass (YAHOO.widget.Menu)
 
     ContextMenu.superclass.init.call(this, p_oElement);
@@ -7989,6 +8138,7 @@
 // Private event handlers
 
 
+
 /**
 * @method _onTriggerClick
 * @description "click" event handler for the HTML element(s) identified as the 
@@ -8022,13 +8172,16 @@
 */
 _onTriggerContextMenu: function(p_oEvent, p_oMenu) {
 
-    if(p_oEvent.type == "mousedown" && !p_oEvent.ctrlKey) {
+    if (p_oEvent.type == "mousedown" && !p_oEvent.ctrlKey) {
 
         return;
 
     }
 
 
+    var aXY;
+
+
     /*
         Prevent the browser's default context menu from appearing and 
         stop the propagation of the "contextmenu" event so that 
@@ -8038,22 +8191,36 @@
     Event.stopEvent(p_oEvent);
 
 
-    // Hide any other ContextMenu instances that might be visible
+    this.contextEventTarget = Event.getTarget(p_oEvent);
 
-    YAHOO.widget.MenuManager.hideVisible();
+    this.triggerContextMenuEvent.fire(p_oEvent);
 
 
-    this.contextEventTarget = Event.getTarget(p_oEvent);
+    // Hide any other Menu instances that might be visible
 
-    this.triggerContextMenuEvent.fire(p_oEvent);
+    YAHOO.widget.MenuManager.hideVisible();
+    
 
 
     if(!this._bCancelled) {
 
         // Position and display the context menu
-    
-        this.cfg.setProperty("xy", Event.getXY(p_oEvent));
 
+        aXY = Event.getXY(p_oEvent);
+
+
+        if (!YAHOO.util.Dom.inDocument(this.element)) {
+
+            this.beforeShowEvent.subscribe(position, aXY);
+
+        }
+        else {
+
+            this.cfg.setProperty("xy", aXY);
+        
+        }
+
+
         this.show();
 
     }
@@ -8108,7 +8275,11 @@
     * level-one-html.html#ID-58190037">HTMLElement</a>|Array
     */
     this.cfg.addProperty(DEFAULT_CONFIG.TRIGGER.key, 
-        { handler: this.configTrigger });
+        {
+            handler: this.configTrigger, 
+            suppressEvent: DEFAULT_CONFIG.TRIGGER.suppressEvent 
+        }
+    );
 
 },
 
@@ -8123,8 +8294,8 @@
     // Remove the DOM event handlers from the current trigger(s)
 
     this._removeEventHandlers();
-    
 
+
     // Continue with the superclass implementation of this method
 
     ContextMenu.superclass.destroy.call(this);
@@ -8222,93 +8393,10 @@
 * @class ContextMenuItem
 * @constructor
 * @extends YAHOO.widget.MenuItem
+* @deprecated As of version 2.4.0 items for YAHOO.widget.ContextMenu instances
+* are of type YAHOO.widget.MenuItem.
 */
-YAHOO.widget.ContextMenuItem = function(p_oObject, p_oConfig) {
-
-    YAHOO.widget.ContextMenuItem.superclass.constructor.call(this, 
-        p_oObject, p_oConfig);
-
-};
-
-YAHOO.lang.extend(YAHOO.widget.ContextMenuItem, YAHOO.widget.MenuItem, {
-
-
-/**
-* @method init
-* @description The ContextMenuItem class's initialization method. This method 
-* is automatically called by the constructor, and sets up all DOM references 
-* for pre-existing markup, and creates required markup if it is not 
-* already present.
-* @param {String} p_oObject String specifying the text of the context menu item.
-* @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
-* one-html.html#ID-74680021">HTMLLIElement</a>} p_oObject Object specifying the 
-* <code><li></code> element of the context menu item.
-* @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
-* one-html.html#ID-38450247">HTMLOptGroupElement</a>} p_oObject Object 
-* specifying the <code><optgroup></code> element of the context 
-* menu item.
-* @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
-* one-html.html#ID-70901257">HTMLOptionElement</a>} p_oObject Object specifying 
-* the <code><option></code> element of the context menu item.
-* @param {Object} p_oConfig Optional. Object literal specifying the 
-* configuration for the context menu item. See configuration class 
-* documentation for more details.
-*/
-init: function(p_oObject, p_oConfig) {
-    
-    if(!this.SUBMENU_TYPE) {
-
-        this.SUBMENU_TYPE = YAHOO.widget.ContextMenu;
-
-    }
-
-
-    /* 
-        Call the init of the superclass (YAHOO.widget.MenuItem)
-        Note: We don't pass the user config in here yet 
-        because we only want it executed once, at the lowest 
-        subclass level.
-    */ 
-
-    YAHOO.widget.ContextMenuItem.superclass.init.call(this, p_oObject);
-
-    var oConfig = this.cfg;
-
-    if(p_oConfig) {
-
-        oConfig.applyConfig(p_oConfig, true);
-
-    }
-
-    oConfig.fireQueue();
-
-},
-
-
-
-// Public methods
-
-
-/**
-* @method toString
-* @description Returns a string representing the context menu item.
-* @return {String}
-*/
-toString: function() {
-
-    var sReturnVal = "ContextMenuItem";
-
-    if(this.cfg && this.cfg.getProperty("text")) {
-
-        sReturnVal += (": " + this.cfg.getProperty("text"));
-
-    }
-
-    return sReturnVal;
-
-}
-    
-}); // END YAHOO.lang.extend
+YAHOO.widget.ContextMenuItem = YAHOO.widget.MenuItem;
 (function () {
 
 
@@ -8363,7 +8451,6 @@
 
 
 var Event = YAHOO.util.Event,
-    Dom = YAHOO.util.Dom,
     MenuBar = YAHOO.widget.MenuBar,
 
     /**
@@ -8384,13 +8471,15 @@
     
         "SUBMENU_ALIGNMENT": { 
             key: "submenualignment", 
-            value: ["tl","bl"] 
+            value: ["tl","bl"],
+            suppressEvent: true 
         },
     
         "AUTO_SUBMENU_DISPLAY": { 
             key: "autosubmenudisplay", 
             value: false, 
-            validator: YAHOO.lang.isBoolean 
+            validator: YAHOO.lang.isBoolean,
+            suppressEvent: true
         }
     
     };
@@ -8645,7 +8734,7 @@
         oSubmenu = oItem.cfg.getProperty("submenu");
 
 
-        if(oSubmenu && oTarget != oItem.submenuIndicator) {
+        if(oSubmenu) {
         
             if(oSubmenu.cfg.getProperty("visible")) {
             
@@ -8747,7 +8836,8 @@
     oConfig.addProperty(
         DEFAULT_CONFIG.SUBMENU_ALIGNMENT.key, 
         {
-            value: DEFAULT_CONFIG.SUBMENU_ALIGNMENT.value
+            value: DEFAULT_CONFIG.SUBMENU_ALIGNMENT.value,
+            suppressEvent: DEFAULT_CONFIG.SUBMENU_ALIGNMENT.suppressEvent
         }
     );
 
@@ -8768,7 +8858,8 @@
 	   DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.key, 
 	   {
 	       value: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.value, 
-	       validator: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.validator
+	       validator: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.validator,
+	       suppressEvent: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.suppressEvent
        } 
     );
 
@@ -8912,4 +9003,4 @@
 }
     
 }); // END YAHOO.lang.extend
-YAHOO.register("menu", YAHOO.widget.Menu, {version: "2.3.1", build: "541"});
+YAHOO.register("menu", YAHOO.widget.Menu, {version: "2.4.1", build: "742"});

Added: trunk/root/static/yui/profiler/README
===================================================================
--- trunk/root/static/yui/profiler/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/profiler/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,9 @@
+YUI Library - Profiler - Release Notes
+
+2.4.1
+
+No change
+
+2.4.0
+
+  * Beta release

Added: trunk/root/static/yui/profiler/profiler-beta-debug.js
===================================================================
--- trunk/root/static/yui/profiler/profiler-beta-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/profiler/profiler-beta-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,381 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+YAHOO.namespace("tool");
+
+/**
+ * The YUI JavaScript profiler.
+ * @module profiler
+ * @namespace YAHOO.tool
+ * @requires yahoo
+ */
+
+/**
+ * Profiles functions in JavaScript.
+ * @namespace YAHOO.tool
+ * @class Profiler
+ * @static
+ */
+YAHOO.tool.Profiler = {
+
+    //-------------------------------------------------------------------------
+    // Private Properties
+    //-------------------------------------------------------------------------
+
+    /**
+     * Container object on which to put the original unprofiled methods.
+     * @type Object
+     * @private
+     * @static
+     * @property _container
+     */
+    _container : new Object(),
+
+    /**
+     * Call information for functions.
+     * @type Object
+     * @private
+     * @static
+     * @property _report
+     */
+    _report : new Object(),
+    
+    //-------------------------------------------------------------------------
+    // Private Methods
+    //-------------------------------------------------------------------------
+    
+    /**
+     * Called when a method ends execution. Marks the start and end time of the 
+     * method so it can calculate how long the function took to execute. Also 
+     * updates min/max/avg calculations for the function.
+     * @param {String} name The name of the function to mark as stopped.
+     * @param {int} duration The number of milliseconds it took the function to
+     *      execute.
+     * @return {Void}
+     * @private
+     * @static
+     */
+    _saveData : function (name /*:String*/, duration /*:int*/){
+        
+        //get the function data
+        var functionData /*:Object*/ = this._report[name];
+    
+        //increment the calls
+        functionData.calls++;
+        functionData.points.push(duration);
+
+        //if it's already been called at least once, do more complex calculations
+        if (functionData.calls > 1) {
+            functionData.avg = ((functionData.avg*(functionData.calls-1))+duration)/functionData.calls;
+            functionData.min = Math.min(functionData.min, duration);
+            functionData.max = Math.max(functionData.max, duration);
+        } else {
+            functionData.avg = duration;
+            functionData.min = duration;
+            functionData.max = duration;
+        }                             
+    
+    },
+
+    //-------------------------------------------------------------------------
+    // Reporting Methods
+    //-------------------------------------------------------------------------    
+    
+    /**
+     * Returns the average amount of time (in milliseconds) that the function
+     * with the given name takes to execute.
+     * @param {String} name The name of the function whose data should be returned.
+     *      If an object type method, it should be 'constructor.prototype.methodName';
+     *      a normal object method would just be 'object.methodName'.
+     * @return {float} The average time it takes the function to execute.
+     * @static
+     */
+    getAverage : function (name /*:String*/) /*:float*/ {
+        return this._report[name].avg;
+    },
+
+    /**
+     * Returns the number of times that the given function has been called.
+     * @param {String} name The name of the function whose data should be returned.
+     * @return {int} The number of times the function was called.
+     * @static
+     */
+    getCallCount : function (name /*:String*/) /*:int*/ {
+        return this._report[name].calls;    
+    },
+    
+    /**
+     * Returns the maximum amount of time (in milliseconds) that the function
+     * with the given name takes to execute.
+     * @param {String} name The name of the function whose data should be returned.
+     *      If an object type method, it should be 'constructor.prototype.methodName';
+     *      a normal object method would just be 'object.methodName'.
+     * @return {float} The maximum time it takes the function to execute.
+     */
+    getMax : function (name /*:String*/) /*:int*/ {
+        return this._report[name].max;
+    },
+    
+    /**
+     * Returns the minimum amount of time (in milliseconds) that the function
+     * with the given name takes to execute.
+     * @param {String} name The name of the function whose data should be returned.
+     *      If an object type method, it should be 'constructor.prototype.methodName';
+     *      a normal object method would just be 'object.methodName'.
+     * @return {float} The minimum time it takes the function to execute.
+     */
+    getMin : function (name /*:String*/) /*:int*/ {
+        return this._report[name].min;
+    },
+
+    /**
+     * Returns an object containing profiling data for a single function.
+     * The object has an entry for min, max, avg, calls, and points).
+     * @return {Object} An object containing profile data for a given function.
+     * @static
+     */
+    getFunctionReport : function (name /*:String*/) /*:Object*/ {
+        return this._report[name];
+    },
+
+    /**
+     * Returns an object containing profiling data for all of the functions 
+     * that were profiled. The object has an entry for each function and 
+     * returns all information (min, max, average, calls, etc.) for each
+     * function.
+     * @return {Object} An object containing all profile data.
+     * @static
+     */
+    getFullReport : function (filter /*:Function*/) /*:Object*/ {
+        filter = filter || function(){return true;};
+    
+        if (YAHOO.lang.isFunction(filter)) {
+            var report = {};
+            
+            for (var name in this._report){
+                if (filter(this._report[name])){
+                    report[name] = this._report[name];    
+                }
+            }
+            
+            return report;
+        }
+    },
+
+    //-------------------------------------------------------------------------
+    // Profiling Methods
+    //-------------------------------------------------------------------------   
+    
+    /**
+     * Sets up a constructor for profiling, including all properties and methods on the prototype.
+     * @param {string} name The fully-qualified name of the function including namespace information.
+     * @param {Object} owner (Optional) The object that owns the function (namespace or containing object).
+     * @return {Void}
+     * @static
+     */
+    registerConstructor : function (name /*:String*/, owner /*:Object*/) /*:Void*/ {    
+        this.registerFunction(name, owner, true);
+    },
+
+    /**
+     * Sets up a function for profiling. It essentially overwrites the function with one
+     * that has instrumentation data. This method also creates an entry for the function
+     * in the profile report. The original function is stored on the _container object.
+     * @param {String} name The full name of the function including namespacing. This
+     *      is the name of the function that is stored in the report.
+     * @param {Object} owner (Optional) The object that owns the function. If the function
+     *      isn't global then this argument is required. This could be the namespace that
+     *      the function belongs to, such as YAHOO.util.Dom, or the object on which it's
+     *      a method.
+     * @return {Void}
+     * @method registerFunction
+     */     
+    registerFunction : function(name /*:String*/, owner /*:Object*/, registerPrototype /*:Boolean*/) /*:Void*/{
+    
+        //figure out the function name without namespacing
+        var funcName /*:String*/ = (name.indexOf(".") > -1 ? name.substring(name.lastIndexOf(".")+1) : name);
+        if (!YAHOO.lang.isObject(owner)){
+            owner = eval(name.substring(0, name.lastIndexOf(".")));
+        }
+        
+        //get the method and prototype
+        var method /*:Function*/ = owner[funcName];
+        var prototype /*:Object*/ = method.prototype;
+        
+        //see if the method has already been registered
+        if (YAHOO.lang.isFunction(method) && !method.__yuiProfiled){
+            
+            //create a new slot for the original method
+            this._container[name] = method;
+            
+            //replace the function with the profiling one
+            owner[funcName] = function () {
+
+                var start = new Date();     
+                var retval = method.apply(this, arguments);
+                var stop = new Date();
+                
+                YAHOO.tool.Profiler._saveData(name, stop-start);
+                
+                return retval;                
+            
+            };
+            
+            //copy the function properties over
+            YAHOO.lang.augmentObject(owner[funcName], method);
+            owner[funcName].__yuiProfiled = true;
+            owner[funcName].prototype = prototype;
+            this._container[name].__yuiOwner = owner;
+            this._container[name].__yuiFuncName = funcName;        
+        
+            //register prototype if necessary
+            if (registerPrototype) {            
+                this.registerObject(name + ".prototype", prototype);          
+            }
+            
+            //store function information
+            this._report[name] = {
+                calls: 0,
+                max: 0,
+                min: 0,
+                avg: 0,
+                points: []
+            };        
+        }
+            
+        return method;
+    
+    },
+        
+    
+    /**
+     * Sets up an object for profiling. It takes the object and looks for functions.
+     * When a function is found, registerMethod() is called on it. If set to recrusive
+     * mode, it will also setup objects found inside of this object for profiling, 
+     * using the same methodology.
+     * @param {String} name The name of the object to profile (shows up in report).
+     * @param {Object} owner (Optional) The object represented by the name.
+     * @param {Boolean} recurse (Optional) Determines if subobject methods are also profiled.
+     * @return {Void}
+     * @static
+     */
+    registerObject : function (name /*:String*/, object /*:Object*/, recurse /*:Boolean*/) /*:Void*/{
+    
+        //get the object
+        object = (YAHOO.lang.isObject(object) ? object : eval(name));
+    
+        //save the object
+        this._container[name] = object;
+    
+        for (var prop in object) {
+            if (typeof object[prop] == "function"){
+                if (prop != "constructor" && prop != "superclass"){ //don't do constructor or superclass, it's recursive
+                    this.registerFunction(name + "." + prop, object);
+                }
+            } else if (typeof object[prop] == "object" && recurse){
+                this.registerObject(name + "." + prop, object[prop], recurse);
+            }
+        }
+    
+    },    
+    
+    /**
+     * Removes a constructor function from profiling. Reverses the registerConstructor() method.
+     * @param {String} name The full name of the function including namespacing. This
+     *      is the name of the function that is stored in the report.
+     * @return {Void}
+     * @method unregisterFunction
+     */     
+    unregisterConstructor : function(name /*:String*/) /*:Void*/{
+            
+        //see if the method has been registered
+        if (YAHOO.lang.isFunction(this._container[name])){
+        
+            //get original data
+            //var owner /*:Object*/ = this._container[name].__yuiOwner;
+            //var funcName /*:String*/ = this._container[name].__yuiFuncName;
+            //delete this._container[name].__yuiOwner;
+            //delete this._container[name].__yuiFuncName;
+            
+            //replace instrumented function
+            //owner[funcName] = this._container[name];
+            //delete this._container[name];
+            this.unregisterFunction(name, true);
+       
+        }
+
+    
+    },
+    
+    /**
+     * Removes function from profiling. Reverses the registerFunction() method.
+     * @param {String} name The full name of the function including namespacing. This
+     *      is the name of the function that is stored in the report.
+     * @return {Void}
+     * @method unregisterFunction
+     */     
+    unregisterFunction : function(name /*:String*/, unregisterPrototype /*:Boolean*/) /*:Void*/{
+            
+        //see if the method has been registered
+        if (YAHOO.lang.isFunction(this._container[name])){
+        
+            //check to see if you should unregister the prototype
+            if (unregisterPrototype){
+                this.unregisterObject(name + ".prototype", this._container[name].prototype);
+            }
+                
+            //get original data
+            var owner /*:Object*/ = this._container[name].__yuiOwner;
+            var funcName /*:String*/ = this._container[name].__yuiFuncName;
+            delete this._container[name].__yuiOwner;
+            delete this._container[name].__yuiFuncName;
+            
+            //replace instrumented function
+            owner[funcName] = this._container[name];
+            
+            //delete supporting information
+            delete this._container[name];
+            delete this._report[name];
+       
+        }
+            
+    
+    },
+    
+    /**
+     * Unregisters an object for profiling. It takes the object and looks for functions.
+     * When a function is found, unregisterMethod() is called on it. If set to recrusive
+     * mode, it will also unregister objects found inside of this object, 
+     * using the same methodology.
+     * @param {String} name The name of the object to unregister.
+     * @param {Boolean} recurse (Optional) Determines if subobject methods should also be
+     *      unregistered.
+     * @return {Void}
+     * @static
+     */
+    unregisterObject : function (name /*:String*/, recurse /*:Boolean*/) /*:Void*/{
+    
+        //get the object
+        if (YAHOO.lang.isObject(this._container[name])){            
+            object = this._container[name];    
+        
+            for (var prop in object) {
+                if (typeof object[prop] == "function"){
+                    this.unregisterFunction(name + "." + prop);
+                } else if (typeof object[prop] == "object" && recurse){
+                    this.unregisterObject(name + "." + prop, recurse);
+                }
+            }
+            
+            delete this._container[name];
+        }
+    
+    }
+         
+
+};
+
+YAHOO.register("profiler", YAHOO.tool.Profiler, {version: "2.4.1", build: "742"});

Added: trunk/root/static/yui/profiler/profiler-beta-min.js
===================================================================
--- trunk/root/static/yui/profiler/profiler-beta-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/profiler/profiler-beta-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+YAHOO.namespace("tool");YAHOO.tool.Profiler={_container:new Object(),_report:new Object(),_saveData:function(B,C){var A=this._report[B];A.calls++;A.points.push(C);if(A.calls>1){A.avg=((A.avg*(A.calls-1))+C)/A.calls;A.min=Math.min(A.min,C);A.max=Math.max(A.max,C);}else{A.avg=C;A.min=C;A.max=C;}},getAverage:function(A){return this._report[A].avg;},getCallCount:function(A){return this._report[A].calls;},getMax:function(A){return this._report[A].max;},getMin:function(A){return this._report[A].min;},getFunctionReport:function(A){return this._report[A];},getFullReport:function(C){C=C||function(){return true;};if(YAHOO.lang.isFunction(C)){var A={};for(var B in this._report){if(C(this._report[B])){A[B]=this._report[B];}}return A;}},registerConstructor:function(B,A){this.registerFunction(B,A,true);},registerFunction:function(name,owner,registerPrototype){var funcName=(name.indexOf(".")>-1?name.substring(name.lastIndexOf(".")+1):name);if(!YAHOO.lang.isObject(owner)){owner=eval(name.s!
 ubstring(0,name.lastIndexOf(".")));}var method=owner[funcName];var prototype=method.prototype;if(YAHOO.lang.isFunction(method)&&!method.__yuiProfiled){this._container[name]=method;owner[funcName]=function(){var start=new Date();var retval=method.apply(this,arguments);var stop=new Date();YAHOO.tool.Profiler._saveData(name,stop-start);return retval;};YAHOO.lang.augmentObject(owner[funcName],method);owner[funcName].__yuiProfiled=true;owner[funcName].prototype=prototype;this._container[name].__yuiOwner=owner;this._container[name].__yuiFuncName=funcName;if(registerPrototype){this.registerObject(name+".prototype",prototype);}this._report[name]={calls:0,max:0,min:0,avg:0,points:[]};}return method;},registerObject:function(name,object,recurse){object=(YAHOO.lang.isObject(object)?object:eval(name));this._container[name]=object;for(var prop in object){if(typeof object[prop]=="function"){if(prop!="constructor"&&prop!="superclass"){this.registerFunction(name+"."+prop,object);}}else{if(!
 typeof object[prop]=="object"&&recurse){this.registerObject(na!
 me+"."+p
rop,object[prop],recurse);}}}},unregisterConstructor:function(A){if(YAHOO.lang.isFunction(this._container[A])){this.unregisterFunction(A,true);}},unregisterFunction:function(B,C){if(YAHOO.lang.isFunction(this._container[B])){if(C){this.unregisterObject(B+".prototype",this._container[B].prototype);}var A=this._container[B].__yuiOwner;var D=this._container[B].__yuiFuncName;delete this._container[B].__yuiOwner;delete this._container[B].__yuiFuncName;A[D]=this._container[B];delete this._container[B];delete this._report[B];}},unregisterObject:function(A,B){if(YAHOO.lang.isObject(this._container[A])){object=this._container[A];for(var C in object){if(typeof object[C]=="function"){this.unregisterFunction(A+"."+C);}else{if(typeof object[C]=="object"&&B){this.unregisterObject(A+"."+C,B);}}}delete this._container[A];}}};YAHOO.register("profiler",YAHOO.tool.Profiler,{version:"2.4.1",build:"742"});
\ No newline at end of file

Added: trunk/root/static/yui/profiler/profiler-beta.js
===================================================================
--- trunk/root/static/yui/profiler/profiler-beta.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/profiler/profiler-beta.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,381 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+YAHOO.namespace("tool");
+
+/**
+ * The YUI JavaScript profiler.
+ * @module profiler
+ * @namespace YAHOO.tool
+ * @requires yahoo
+ */
+
+/**
+ * Profiles functions in JavaScript.
+ * @namespace YAHOO.tool
+ * @class Profiler
+ * @static
+ */
+YAHOO.tool.Profiler = {
+
+    //-------------------------------------------------------------------------
+    // Private Properties
+    //-------------------------------------------------------------------------
+
+    /**
+     * Container object on which to put the original unprofiled methods.
+     * @type Object
+     * @private
+     * @static
+     * @property _container
+     */
+    _container : new Object(),
+
+    /**
+     * Call information for functions.
+     * @type Object
+     * @private
+     * @static
+     * @property _report
+     */
+    _report : new Object(),
+    
+    //-------------------------------------------------------------------------
+    // Private Methods
+    //-------------------------------------------------------------------------
+    
+    /**
+     * Called when a method ends execution. Marks the start and end time of the 
+     * method so it can calculate how long the function took to execute. Also 
+     * updates min/max/avg calculations for the function.
+     * @param {String} name The name of the function to mark as stopped.
+     * @param {int} duration The number of milliseconds it took the function to
+     *      execute.
+     * @return {Void}
+     * @private
+     * @static
+     */
+    _saveData : function (name /*:String*/, duration /*:int*/){
+        
+        //get the function data
+        var functionData /*:Object*/ = this._report[name];
+    
+        //increment the calls
+        functionData.calls++;
+        functionData.points.push(duration);
+
+        //if it's already been called at least once, do more complex calculations
+        if (functionData.calls > 1) {
+            functionData.avg = ((functionData.avg*(functionData.calls-1))+duration)/functionData.calls;
+            functionData.min = Math.min(functionData.min, duration);
+            functionData.max = Math.max(functionData.max, duration);
+        } else {
+            functionData.avg = duration;
+            functionData.min = duration;
+            functionData.max = duration;
+        }                             
+    
+    },
+
+    //-------------------------------------------------------------------------
+    // Reporting Methods
+    //-------------------------------------------------------------------------    
+    
+    /**
+     * Returns the average amount of time (in milliseconds) that the function
+     * with the given name takes to execute.
+     * @param {String} name The name of the function whose data should be returned.
+     *      If an object type method, it should be 'constructor.prototype.methodName';
+     *      a normal object method would just be 'object.methodName'.
+     * @return {float} The average time it takes the function to execute.
+     * @static
+     */
+    getAverage : function (name /*:String*/) /*:float*/ {
+        return this._report[name].avg;
+    },
+
+    /**
+     * Returns the number of times that the given function has been called.
+     * @param {String} name The name of the function whose data should be returned.
+     * @return {int} The number of times the function was called.
+     * @static
+     */
+    getCallCount : function (name /*:String*/) /*:int*/ {
+        return this._report[name].calls;    
+    },
+    
+    /**
+     * Returns the maximum amount of time (in milliseconds) that the function
+     * with the given name takes to execute.
+     * @param {String} name The name of the function whose data should be returned.
+     *      If an object type method, it should be 'constructor.prototype.methodName';
+     *      a normal object method would just be 'object.methodName'.
+     * @return {float} The maximum time it takes the function to execute.
+     */
+    getMax : function (name /*:String*/) /*:int*/ {
+        return this._report[name].max;
+    },
+    
+    /**
+     * Returns the minimum amount of time (in milliseconds) that the function
+     * with the given name takes to execute.
+     * @param {String} name The name of the function whose data should be returned.
+     *      If an object type method, it should be 'constructor.prototype.methodName';
+     *      a normal object method would just be 'object.methodName'.
+     * @return {float} The minimum time it takes the function to execute.
+     */
+    getMin : function (name /*:String*/) /*:int*/ {
+        return this._report[name].min;
+    },
+
+    /**
+     * Returns an object containing profiling data for a single function.
+     * The object has an entry for min, max, avg, calls, and points).
+     * @return {Object} An object containing profile data for a given function.
+     * @static
+     */
+    getFunctionReport : function (name /*:String*/) /*:Object*/ {
+        return this._report[name];
+    },
+
+    /**
+     * Returns an object containing profiling data for all of the functions 
+     * that were profiled. The object has an entry for each function and 
+     * returns all information (min, max, average, calls, etc.) for each
+     * function.
+     * @return {Object} An object containing all profile data.
+     * @static
+     */
+    getFullReport : function (filter /*:Function*/) /*:Object*/ {
+        filter = filter || function(){return true;};
+    
+        if (YAHOO.lang.isFunction(filter)) {
+            var report = {};
+            
+            for (var name in this._report){
+                if (filter(this._report[name])){
+                    report[name] = this._report[name];    
+                }
+            }
+            
+            return report;
+        }
+    },
+
+    //-------------------------------------------------------------------------
+    // Profiling Methods
+    //-------------------------------------------------------------------------   
+    
+    /**
+     * Sets up a constructor for profiling, including all properties and methods on the prototype.
+     * @param {string} name The fully-qualified name of the function including namespace information.
+     * @param {Object} owner (Optional) The object that owns the function (namespace or containing object).
+     * @return {Void}
+     * @static
+     */
+    registerConstructor : function (name /*:String*/, owner /*:Object*/) /*:Void*/ {    
+        this.registerFunction(name, owner, true);
+    },
+
+    /**
+     * Sets up a function for profiling. It essentially overwrites the function with one
+     * that has instrumentation data. This method also creates an entry for the function
+     * in the profile report. The original function is stored on the _container object.
+     * @param {String} name The full name of the function including namespacing. This
+     *      is the name of the function that is stored in the report.
+     * @param {Object} owner (Optional) The object that owns the function. If the function
+     *      isn't global then this argument is required. This could be the namespace that
+     *      the function belongs to, such as YAHOO.util.Dom, or the object on which it's
+     *      a method.
+     * @return {Void}
+     * @method registerFunction
+     */     
+    registerFunction : function(name /*:String*/, owner /*:Object*/, registerPrototype /*:Boolean*/) /*:Void*/{
+    
+        //figure out the function name without namespacing
+        var funcName /*:String*/ = (name.indexOf(".") > -1 ? name.substring(name.lastIndexOf(".")+1) : name);
+        if (!YAHOO.lang.isObject(owner)){
+            owner = eval(name.substring(0, name.lastIndexOf(".")));
+        }
+        
+        //get the method and prototype
+        var method /*:Function*/ = owner[funcName];
+        var prototype /*:Object*/ = method.prototype;
+        
+        //see if the method has already been registered
+        if (YAHOO.lang.isFunction(method) && !method.__yuiProfiled){
+            
+            //create a new slot for the original method
+            this._container[name] = method;
+            
+            //replace the function with the profiling one
+            owner[funcName] = function () {
+
+                var start = new Date();     
+                var retval = method.apply(this, arguments);
+                var stop = new Date();
+                
+                YAHOO.tool.Profiler._saveData(name, stop-start);
+                
+                return retval;                
+            
+            };
+            
+            //copy the function properties over
+            YAHOO.lang.augmentObject(owner[funcName], method);
+            owner[funcName].__yuiProfiled = true;
+            owner[funcName].prototype = prototype;
+            this._container[name].__yuiOwner = owner;
+            this._container[name].__yuiFuncName = funcName;        
+        
+            //register prototype if necessary
+            if (registerPrototype) {            
+                this.registerObject(name + ".prototype", prototype);          
+            }
+            
+            //store function information
+            this._report[name] = {
+                calls: 0,
+                max: 0,
+                min: 0,
+                avg: 0,
+                points: []
+            };        
+        }
+            
+        return method;
+    
+    },
+        
+    
+    /**
+     * Sets up an object for profiling. It takes the object and looks for functions.
+     * When a function is found, registerMethod() is called on it. If set to recrusive
+     * mode, it will also setup objects found inside of this object for profiling, 
+     * using the same methodology.
+     * @param {String} name The name of the object to profile (shows up in report).
+     * @param {Object} owner (Optional) The object represented by the name.
+     * @param {Boolean} recurse (Optional) Determines if subobject methods are also profiled.
+     * @return {Void}
+     * @static
+     */
+    registerObject : function (name /*:String*/, object /*:Object*/, recurse /*:Boolean*/) /*:Void*/{
+    
+        //get the object
+        object = (YAHOO.lang.isObject(object) ? object : eval(name));
+    
+        //save the object
+        this._container[name] = object;
+    
+        for (var prop in object) {
+            if (typeof object[prop] == "function"){
+                if (prop != "constructor" && prop != "superclass"){ //don't do constructor or superclass, it's recursive
+                    this.registerFunction(name + "." + prop, object);
+                }
+            } else if (typeof object[prop] == "object" && recurse){
+                this.registerObject(name + "." + prop, object[prop], recurse);
+            }
+        }
+    
+    },    
+    
+    /**
+     * Removes a constructor function from profiling. Reverses the registerConstructor() method.
+     * @param {String} name The full name of the function including namespacing. This
+     *      is the name of the function that is stored in the report.
+     * @return {Void}
+     * @method unregisterFunction
+     */     
+    unregisterConstructor : function(name /*:String*/) /*:Void*/{
+            
+        //see if the method has been registered
+        if (YAHOO.lang.isFunction(this._container[name])){
+        
+            //get original data
+            //var owner /*:Object*/ = this._container[name].__yuiOwner;
+            //var funcName /*:String*/ = this._container[name].__yuiFuncName;
+            //delete this._container[name].__yuiOwner;
+            //delete this._container[name].__yuiFuncName;
+            
+            //replace instrumented function
+            //owner[funcName] = this._container[name];
+            //delete this._container[name];
+            this.unregisterFunction(name, true);
+       
+        }
+
+    
+    },
+    
+    /**
+     * Removes function from profiling. Reverses the registerFunction() method.
+     * @param {String} name The full name of the function including namespacing. This
+     *      is the name of the function that is stored in the report.
+     * @return {Void}
+     * @method unregisterFunction
+     */     
+    unregisterFunction : function(name /*:String*/, unregisterPrototype /*:Boolean*/) /*:Void*/{
+            
+        //see if the method has been registered
+        if (YAHOO.lang.isFunction(this._container[name])){
+        
+            //check to see if you should unregister the prototype
+            if (unregisterPrototype){
+                this.unregisterObject(name + ".prototype", this._container[name].prototype);
+            }
+                
+            //get original data
+            var owner /*:Object*/ = this._container[name].__yuiOwner;
+            var funcName /*:String*/ = this._container[name].__yuiFuncName;
+            delete this._container[name].__yuiOwner;
+            delete this._container[name].__yuiFuncName;
+            
+            //replace instrumented function
+            owner[funcName] = this._container[name];
+            
+            //delete supporting information
+            delete this._container[name];
+            delete this._report[name];
+       
+        }
+            
+    
+    },
+    
+    /**
+     * Unregisters an object for profiling. It takes the object and looks for functions.
+     * When a function is found, unregisterMethod() is called on it. If set to recrusive
+     * mode, it will also unregister objects found inside of this object, 
+     * using the same methodology.
+     * @param {String} name The name of the object to unregister.
+     * @param {Boolean} recurse (Optional) Determines if subobject methods should also be
+     *      unregistered.
+     * @return {Void}
+     * @static
+     */
+    unregisterObject : function (name /*:String*/, recurse /*:Boolean*/) /*:Void*/{
+    
+        //get the object
+        if (YAHOO.lang.isObject(this._container[name])){            
+            object = this._container[name];    
+        
+            for (var prop in object) {
+                if (typeof object[prop] == "function"){
+                    this.unregisterFunction(name + "." + prop);
+                } else if (typeof object[prop] == "object" && recurse){
+                    this.unregisterObject(name + "." + prop, recurse);
+                }
+            }
+            
+            delete this._container[name];
+        }
+    
+    }
+         
+
+};
+
+YAHOO.register("profiler", YAHOO.tool.Profiler, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/reset/README
===================================================================
--- trunk/root/static/yui/reset/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/reset/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,16 @@
 YUI Library - Reset - Release Notes
 
+Version 2.4.1
+
+No change
+
+Version 2.4.0
+
+  * Moved background and default font color to HTML from BODY
+  * Removed invalid sub/sup negative line-height values because they
+    were invalid and because they weren't have a big impact.
+  * Added legent element color to accomodate IE6 issues.
+
 Version 2.3.0
 
   * Removed: ul,ol {list-style:none;}
@@ -31,4 +42,4 @@
 
 Version 0.10.0
 
-  * Initial release.
\ No newline at end of file
+  * Initial release.

Modified: trunk/root/static/yui/reset/reset-min.css
===================================================================
--- trunk/root/static/yui/reset/reset-min.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/reset/reset-min.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-body{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup,sub{line-height:-1px;vertical-align:text-top;}sub{vertical-align:text-bottom;}input, textarea, select{font-family:inherit;font-size:inherit;font-weight:inherit;}
\ No newline at end of file
+html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym {border:0;font-variant:normal;}sup {vertical-align:text-top;}sub {vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}legend{color:#000;}
\ No newline at end of file

Modified: trunk/root/static/yui/reset/reset.css
===================================================================
--- trunk/root/static/yui/reset/reset.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/reset/reset.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,18 +2,21 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-body {color:#000;background:#FFF;}
+html{color:#000;background:#FFF;}
 body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}
 table{border-collapse:collapse;border-spacing:0;}
 fieldset,img{border:0;}
 address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}
-li {list-style:none;}
-caption,th {text-align:left;}
+li{list-style:none;}
+caption,th{text-align:left;}
 h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}
 q:before,q:after{content:'';}
 abbr,acronym {border:0;font-variant:normal;}
-sup,sub {line-height:-1px;vertical-align: text-top;}
+/* to preserve line-height and selector appearance */
+sup {vertical-align:text-top;}
 sub {vertical-align:text-bottom;}
-input, textarea, select{font-family:inherit;font-size:inherit;font-weight:inherit;}
\ No newline at end of file
+input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}
+/*because legend doesn't inherit in IE */
+legend{color:#000;}
\ No newline at end of file

Added: trunk/root/static/yui/reset-fonts/README
===================================================================
--- trunk/root/static/yui/reset-fonts/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/reset-fonts/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,19 @@
+YUI Library - Reset+Fonts (RF) - Release Notes
+
+*** NOTE ***
+
+This document is not updated with each release.  Changes to
+the reset-fonts.css source are noted in the README
+file for each component that comprises this aggregate:
+
+reset/README
+fonts/README
+
+************
+
+Version 2.4.0
+
+  * Initial release.
+
+  * This file is a convenience file containing an in-order 
+    concatonation of Reset and Fonts.

Added: trunk/root/static/yui/reset-fonts/reset-fonts.css
===================================================================
--- trunk/root/static/yui/reset-fonts/reset-fonts.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/reset-fonts/reset-fonts.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym {border:0;font-variant:normal;}sup {vertical-align:text-top;}sub {vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}legend{color:#000;}body {font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}table {font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}

Modified: trunk/root/static/yui/reset-fonts-grids/reset-fonts-grids.css
===================================================================
--- trunk/root/static/yui/reset-fonts-grids/reset-fonts-grids.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/reset-fonts-grids/reset-fonts-grids.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,8 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-/*reset.css*/body{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup,sub{line-height:-1px;vertical-align:text-top;}sub{vertical-align:text-bottom;}input, textarea, select{font-family:inherit;font-size:inherit;font-weight:inherit;}
-/*fonts.css*/body {font:13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}table {font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:99%;}
-/*grids.css*/body{text-align:center;}#ft{clear:both;}#doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.301em;min-width:750px;}#doc2{width:73.074em;*width:71.313em;}#doc3{margin:auto 10px;width:auto;}#doc4{width:74.923em;*width:73.117em;}.yui-b{position:relative;}.yui-b{_position:static;}#yui-main .yui-b{position:static;}#yui-main{width:100%;}.yui-t1 #yui-main,.yui-t2 #yui-main,.yui-t3 #yui-main{float:right;margin-left:-25em;}.yui-t4 #yui-main,.yui-t5 #yui-main,.yui-t6 #yui-main{float:left;margin-right:-25em;}.yui-t1 .yui-b{float:left;width:12.3207em;*width:12.0106em;}.yui-t1 #yui-main .yui-b{margin-left:13.3207em;*margin-left:13.0106em;}.yui-t2 .yui-b{float:left;width:13.8456em;*width:13.512em;}.yui-t2 #yui-main .yui-b{margin-left:14.8456em;*margin-left:14.512em;}.yui-t3 .yui-b{float:left;width:23.0759em;*width:22.52em;}.yui-t3 #yui-main .yui-b{margin-left:24.0759em;*margin-left:23.52em;}.yui-t!
 4 .yui-b{float:right;width:13.8456em;*width:13.512em;}.yui-t4 #yui-main .yui-b{margin-right:14.8456em;*margin-right:14.512em;}.yui-t5 .yui-b{float:right;width:18.4608em;*width:18.016em;}.yui-t5 #yui-main .yui-b{margin-right:19.4608em;*margin-right:19.016em;}.yui-t6 .yui-b{float:right;width:23.0759em;*width:22.52em;}.yui-t6 #yui-main .yui-b{margin-right:24.0759em;*margin-right:23.52em;}.yui-t7 #yui-main .yui-b{display:block;margin:0 0 1em 0;}#yui-main .yui-b{float:none;width:auto;}.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gb .yui-u,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{float:left;margin-left:2%;width:32%;}.yui-gb .yui-gb .yui-u,.yui-gb .yui-gc .yui-u{*margin-left:1.8%;_margin-left:4%;}.yui-g .yui-gb .yui-u{_margin-left:.8%;}.yui-gb .yui-u{float:right;}.yui-gb div.first{margin-left:0;float:left;}.yui-g .yui-gb div.first,.yui-gb .yui-gb div.first{*margin-right:0;*width:32%;_width:31.7%;}.yui!
 -gb .yui-gc div.first,.yui-gb .yui-gd div.first{*margin-right:!
 0;}.yui-
gb .yui-gd .yui-u{*width:66%;_width:61.2%;}.yui-gb .yui-gd div.first{*width:31%;_width:29.5%;}.yui-g .yui-gc .yui-u,.yui-gb .yui-gc .yui-u{width:32%;_float:right;margin-right:0;_margin-left:0;}.yui-gb .yui-gc div.first{width:66%;*float:left;*margin-left:0;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf .yui-u{margin:0;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf,.yui-gc .yui-u,.yui-gd .yui-g,.yui-g .yui-gc .yui-u,.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf .yui-g,.yui-gf .yui-u{float:right;}.yui-g .yui-gc div.first,.yui-g .yui-ge div.first,.yui-g div.first,.yui-gc div.first,.yui-gc div.first div.first,.yui-gd div.first,.yui-ge div.first,.yui-gf div.first{float:left;}.yui-g .yui-g .yui-u,.yui-gb .yui-g .yui-u,.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u,.yui-ge .yui-g .yui-u,.yui-gf .yui-g .yui-u{width:49%;*width:48.1%;*margin-left:0;}.yui-g .yui-g div.first{*margin:0;}.yui-gb .yui-g div.first{*margin-right:4%;_margin-right:1.3%;}.y!
 ui-gb .yui-gb .yui-u{_margin-left:.7%;}.yui-gb .yui-g div.first,.yui-gb .yui-gb div.first{*margin-left:0;}.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u{*width:48.1%;*margin-left:0;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf{width:49.1%;}.yui-g .yui-gb div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first{margin-left:0;}.yui-g .yui-gc div.first,.yui-gc div.first,.yui-gd .yui-g,.yui-gd .yui-u{width:66%;}.yui-gd div.first,.yui-gb .yui-gd div.first{width:32%;}.yui-g .yui-gd div.first{_width:29.9%;}.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf div.first{width:24%;}.yui-gb .yui-ge div.yui-u,.yui-gb .yui-gf div.yui-u{float:right;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf div.first {float:left;}.yui-ge div.first,.yui-gf .yui-g,.yui-gf .yui-u{width:74.2%;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf div.first{*width:24%;_width:20%;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf .yui-u{*width:73.5%;_width:65.5%;}#bd:after,.yui-g:after,!
 .yui-gb:after,.yui-gc:after,.yui-gd:after,.yui-ge:after,.yui-g!
 f:after{
content:".";display:block;height:0;clear:both;visibility:hidden;}#bd,.yui-g,.yui-gb,.yui-gc,.yui-gd,.yui-ge,.yui-gf{zoom:1;}.yui-gb .yui-u{float:left;}
\ No newline at end of file
+html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym {border:0;font-variant:normal;}sup {vertical-align:text-top;}sub {vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}legend{color:#000;}body {font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}table {font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
+body{text-align:center;}#ft{clear:both;}#doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.301em;min-width:750px;}#doc2{width:73.074em;*width:71.313em;}#doc3{margin:auto 10px;width:auto;}#doc4{width:74.923em;*width:73.117em;}.yui-b{position:relative;}.yui-b{_position:static;}#yui-main .yui-b{position:static;}#yui-main{width:100%;}.yui-t1 #yui-main,.yui-t2 #yui-main,.yui-t3 #yui-main{float:right;margin-left:-25em;}.yui-t4 #yui-main,.yui-t5 #yui-main,.yui-t6 #yui-main{float:left;margin-right:-25em;}.yui-t1 .yui-b{float:left;width:12.3207em;*width:12.0106em;}.yui-t1 #yui-main .yui-b{margin-left:13.3207em;*margin-left:13.0106em;}.yui-t2 .yui-b{float:left;width:13.8456em;*width:13.512em;}.yui-t2 #yui-main .yui-b{margin-left:14.8456em;*margin-left:14.512em;}.yui-t3 .yui-b{float:left;width:23.0759em;*width:22.52em;}.yui-t3 #yui-main .yui-b{margin-left:24.0759em;*margin-left:23.52em;}.yui-t4 .yui-b{floa!
 t:right;width:13.8456em;*width:13.512em;}.yui-t4 #yui-main .yui-b{margin-right:14.8456em;*margin-right:14.512em;}.yui-t5 .yui-b{float:right;width:18.4608em;*width:18.016em;}.yui-t5 #yui-main .yui-b{margin-right:19.4608em;*margin-right:19.016em;}.yui-t6 .yui-b{float:right;width:23.0759em;*width:22.52em;}.yui-t6 #yui-main .yui-b{margin-right:24.0759em;*margin-right:23.52em;}.yui-t7 #yui-main .yui-b{display:block;margin:0 0 1em 0;}#yui-main .yui-b{float:none;width:auto;}.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gb .yui-u,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{float:left;margin-left:2%;width:32%;}.yui-gb .yui-gb .yui-u,.yui-gb .yui-gc .yui-u{*margin-left:1.8%;_margin-left:4%;}.yui-g .yui-gb .yui-u{_margin-left:.8%;}.yui-gb .yui-u{float:right;}.yui-gb div.first{margin-left:0;float:left;}.yui-g .yui-gb div.first,.yui-gb .yui-gb div.first{*margin-right:0;*width:32%;_width:31.7%;}.yui-gb .yui-gc d!
 iv.first,.yui-gb .yui-gd div.first{*margin-right:0;}.yui-gb .y!
 ui-gd .y
ui-u{*width:66%;_width:61.2%;}.yui-gb .yui-gd div.first{*width:31%;_width:29.5%;}.yui-g .yui-gc .yui-u,.yui-gb .yui-gc .yui-u{width:32%;_float:right;margin-right:0;_margin-left:0;}.yui-gb .yui-gc div.first{width:66%;*float:left;*margin-left:0;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf .yui-u{margin:0;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf,.yui-gc .yui-u,.yui-gd .yui-g,.yui-g .yui-gc .yui-u,.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf .yui-g,.yui-gf .yui-u{float:right;}.yui-g .yui-gc div.first,.yui-g .yui-ge div.first,.yui-g div.first,.yui-gc div.first,.yui-gc div.first div.first,.yui-gd div.first,.yui-ge div.first,.yui-gf div.first{float:left;}.yui-g .yui-g .yui-u,.yui-gb .yui-g .yui-u,.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u,.yui-ge .yui-g .yui-u,.yui-gf .yui-g .yui-u{width:49%;*width:48.1%;*margin-left:0;}.yui-g .yui-g div.first{*margin:0;}.yui-gb .yui-g div.first{*margin-right:4%;_margin-right:1.3%;}.yui-gb .yui-gb!
  .yui-u{_margin-left:.7%;}.yui-gb .yui-g div.first,.yui-gb .yui-gb div.first{*margin-left:0;}.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u{*width:48.1%;*margin-left:0;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf{width:49.1%;}.yui-g .yui-gb div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first{margin-left:0;}.yui-g .yui-gc div.first,.yui-gc div.first,.yui-gd .yui-g,.yui-gd .yui-u{width:66%;}.yui-gd div.first,.yui-gb .yui-gd div.first{width:32%;}.yui-g .yui-gd div.first{_width:29.9%;}.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf div.first{width:24%;}.yui-gb .yui-ge div.yui-u,.yui-gb .yui-gf div.yui-u{float:right;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf div.first {float:left;}.yui-ge div.first,.yui-gf .yui-g,.yui-gf .yui-u{width:74.2%;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf div.first{*width:24%;_width:20%;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf .yui-u{*width:73.5%;_width:65.5%;}#bd:after,.yui-g:after,.yui-gb:after!
 ,.yui-gc:after,.yui-gd:after,.yui-ge:after,.yui-gf:after{conte!
 nt:".";d
isplay:block;height:0;clear:both;visibility:hidden;}#bd,.yui-g,.yui-gb,.yui-gc,.yui-gd,.yui-ge,.yui-gf{zoom:1;}.yui-gb .yui-u{float:left;}
\ No newline at end of file

Added: trunk/root/static/yui/selector/README
===================================================================
--- trunk/root/static/yui/selector/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/selector/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,9 @@
+YUI Library - Selector - Release Notes
+
+2.4.1
+
+No change
+
+2.4.0
+
+  * Beta release

Added: trunk/root/static/yui/selector/selector-beta-debug.js
===================================================================
--- trunk/root/static/yui/selector/selector-beta-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/selector/selector-beta-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,648 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+/**
+ * The selector module provides helper methods allowing CSS3 Selectors to be used with DOM elements.
+ * @module selector
+ * @title Selector Utility
+ * @namespace YAHOO.util
+ * @requires yahoo, dom
+ */
+
+(function() {
+/**
+ * Provides helper methods for collecting and filtering DOM elements.
+ * @namespace YAHOO.util
+ * @class Selector
+ * @static
+ */
+var Selector = function() {};
+
+var Y = YAHOO.util;
+
+var X = {
+    IDENT: '-?[_a-z]+[-\\w]*',
+    BEGIN: '^',
+    END: '$',
+    OR: '|',
+    SP: '\\s+'
+};
+
+var CHARS = {
+    SIMPLE: '-+\\w_\\[\\]\\.\\|\\*\\\'\\(\\)#:^~=$!"',
+    COMBINATORS: ',>+~'
+};
+
+X.CAPTURE_IDENT = '(' + X.IDENT + ')';
+X.BEGIN_SPACE = '(?:' + X.BEGIN + X.OR + X.SP +')';
+X.END_SPACE = '(?:' + X.SP + X.OR + X.END + ')';
+X.SELECTOR = '^(' + X.CAPTURE_IDENT + '?([' + CHARS.SIMPLE + ']*)?\\s*([' + CHARS.COMBINATORS + ']?)?\\s*).*$';
+X.SIMPLE = '(' + X.CAPTURE_IDENT + '?([' + CHARS.SIMPLE + ']*)*)?';
+X.ATTRIBUTES = '\\[([a-z]+\\w*)+([~\\|\\^\\$\\*!=]=?)?"?([^\\]"]*)"?\\]';
+X.CAPTURE_ATTRIBUTES = '(' + X.ATTRIBUTES  + ')';
+X.PSEUDO = ':' + X.CAPTURE_IDENT + '(?:\\({1}' + X.SIMPLE + '\\){1})*';
+X.NTH_CHILD = '^(?:(\\d*)(n){1}|(odd|even)$)*([-+]?\\d*)$';
+X.URL_ATTR = '^href|url$';
+Selector.prototype = {
+    /**
+     * Default document for use queries 
+     * @property document
+     * @type object
+     * @default window.document
+     */
+    document: window.document,
+    /**
+     * Mapping of attributes to aliases, normally to work around HTMLAttributes
+     * that conflict with JS reserved words.
+     * @property attrAliases
+     * @type object
+     */
+    attrAliases: {
+        'for': 'htmlFor',
+        'class': 'className'
+    },
+
+    /**
+     * Mapping of shorthand tokens to corresponding attribute selector 
+     * @property shorthand
+     * @type object
+     */
+    shorthand: {
+        //'(?:(?:[^\\)\\]\\s*>+~,]+)(?:-?[_a-z]+[-\\w]))+#(-?[_a-z]+[-\\w]*)': '[id=$1]',
+        '\\#(-?[_a-z]+[-\\w]*)': '[id=$1]',
+        '\\.(-?[_a-z]+[-\\w]*)': '[className~=$1]'
+    },
+
+    /**
+     * List of operators and corresponding boolean functions. 
+     * These functions are passed the attribute and the current node's value of the attribute.
+     * @property operators
+     * @type object
+     */
+    operators: {
+        '=': function(attr, val) { return attr === val; }, // Equality
+        '!=': function(attr, val) { return attr !== val; }, // Inequality
+        '~=': function(attr, val) { // Match one of space seperated words 
+            var str = X.BEGIN_SPACE + val + X.END_SPACE;
+            regexCache[str] = regexCache[str] || new RegExp(str); // skip getRegExp call for perf boost
+
+            //return getRegExp(X.BEGIN_SPACE + val + X.END_SPACE).test(attr);
+            return regexCache[str].test(attr);
+        },
+        '|=': function(attr, val) { return getRegExp(X.BEGIN + val + '[-]?').test(attr); }, // Match start with value followed by optional hyphen
+        '^=': function(attr, val) { return attr.indexOf(val) === 0; }, // Match starts with value
+        '$=': function(attr, val) { return attr.lastIndexOf(val) === attr.length - val.length; }, // Match ends with value
+        '*=': function(attr, val) { return attr.indexOf(val) > -1; }, // Match contains value as substring 
+        '': function(attr, val) { return attr; } // Just test for existence of attribute
+    },
+
+    /**
+     * List of pseudo-classes and corresponding boolean functions. 
+     * These functions are called with the current node, and any value that was parsed with the pseudo regex.
+     * @property pseudos
+     * @type object
+     */
+    pseudos: {
+        'root': function(node) {
+            return node === node.ownerDocument.documentElement;
+        },
+
+        'nth-child': function(node, val) {
+            return getNth(node, val);
+        },
+
+        'nth-last-child': function(node, val) {
+            return getNth(node, val, null, true);
+        },
+
+        'nth-of-type': function(node, val) {
+            return getNth(node, val, node.tagName);
+        },
+         
+        'nth-last-of-type': function(node, val) {
+            return getNth(node, val, node.tagName, true);
+        },
+         
+        'first-child': function(node) {
+            return getChildren(node.parentNode)[0] === node;
+        },
+
+        'last-child': function(node) {
+            var children = getChildren(node.parentNode);
+            return children[children.length - 1] === node;
+        },
+
+        'first-of-type': function(node, val) {
+            return getChildren(node.parentNode, node.tagName.toLowerCase())[0];
+        },
+         
+        'last-of-type': function(node, val) {
+            var children = getChildren(node.parentNode, node.tagName.toLowerCase());
+            return children[children.length - 1];
+        },
+         
+        'only-child': function(node) {
+            var children = getChildren(node.parentNode);
+            return children.length === 1 && children[0] === node;
+        },
+
+        'only-of-type': function(node) {
+            return getChildren(node.parentNode, node.tagName.toLowerCase()).length === 1;
+        },
+
+        'empty': function(node) {
+            return node.childNodes.length === 0;
+        },
+
+        'not': function(node, simple) {
+            return !Selector.test(node, simple);
+        },
+
+        'contains': function(node, str) {
+            return node.innerHTML.indexOf(str) > -1;
+        },
+        'checked': function(node) {
+            return node.checked === true;
+        }
+    },
+
+    /**
+     * Test if the supplied node matches the supplied selector.
+     * @method test
+     *
+     * @param {HTMLElement | String} node An id or node reference to the HTMLElement being tested.
+     * @param {string} selector The CSS Selector to test the node against.
+     * @return{boolean} Whether or not the node matches the selector.
+     * @static
+    
+     */
+    test: function(node, selector) {
+        node = Selector.document.getElementById(node) || node;
+        var groups = selector.split(',');
+        if (groups.length) {
+            for (var i = 0, len = groups.length; i < len; ++i) {
+                if ( rTestNode(node, groups[i]) ) { // passes if ANY group matches
+                    return true;
+                }
+            }
+            return false;
+        }
+        return rTestNode(node, selector);
+    },
+
+    /**
+     * Filters a set of nodes based on a given CSS selector. 
+     * @method filter
+     *
+     * @param {array}  A set of nodes/ids to filter. 
+     * @param {string} selector The selector used to test each node.
+     * @return{array} An array of nodes from the supplied array that match the given selector.
+     * @static
+     */
+    filter: function(arr, selector) {
+        if (!arr || !selector) {
+            YAHOO.log('filter: invalid input, returning array as is', 'warn', 'Selector');
+        }
+        var node,
+            nodes = arr,
+            result = [],
+            tokens = tokenize(selector);
+
+        if (!nodes.item) { // if not HTMLCollection, handle arrays of ids and/or nodes
+            YAHOO.log('filter: scanning input for HTMLElements/IDs', 'info', 'Selector');
+            for (var i = 0, len = arr.length; i < len; ++i) {
+                if (!arr[i].tagName) { // tagName limits to HTMLElements 
+                    node = Selector.document.getElementByid(arr[i]);
+                    if (node) { // skip IDs that return null 
+                        nodes[nodes.length] = node;
+                    } else {
+                        YAHOO.log('filter: skipping invalid node', 'warn', 'Selector');
+                    }
+                }
+            }
+        }
+        result = rFilter(nodes, tokenize(selector)[0]);
+        clearParentCache();
+        YAHOO.log('filter: returning:' + result.length, 'info', 'Selector');
+        return result;
+    },
+
+    /**
+     * Retrieves a set of nodes based on a given CSS selector. 
+     * @method query
+     *
+     * @param {string} selector The CSS Selector to test the node against.
+     * @param {HTMLElement | String} root optional An id or HTMLElement to start the query from. Defaults to Selector.document.
+     * @param {Boolean} firstOnly optional Whether or not to return only the first match.
+     * @return {Array} An array of nodes that match the given selector.
+     * @static
+     */
+    query: function(selector, root, firstOnly) {
+        var result = query(selector, root, firstOnly);
+        YAHOO.log('query: returning ' + result.length + ' nodes', 'info', 'Selector');
+        return result;
+    }
+};
+
+var query = function(selector, root, firstOnly, deDupe) {
+    if (!selector) {
+        return []; // no nodes for you
+    }
+    var result = [];
+    var groups = selector.split(',');
+
+    if (groups.length > 1) {
+        for (var i = 0, len = groups.length; i < len; ++i) {
+            result = result.concat( arguments.callee(groups[i], root, firstOnly, true) ); 
+        }
+        clearFoundCache();
+        return result;
+    }
+
+    if (root && !root.tagName) {
+        root = Selector.document.getElementById(root);
+        if (!root) {
+            YAHOO.log('invalid root node provided', 'warn', 'Selector');
+            return [];
+        }
+    }
+
+    root = root || Selector.document;
+    var tokens = tokenize(selector);
+    var idToken = tokens[getIdTokenIndex(tokens)],
+        nodes = [],
+        node,
+        id,
+        token = tokens.pop();
+        
+    if (idToken) {
+        id = getId(idToken.attributes);
+    }
+    // if no root alternate root is specified use id shortcut
+    if (id) {
+        if (id === token.id) { // only one target
+            nodes = [Selector.document.getElementById(id)] || root;
+        } else { // reset root to id node if passes
+            node = Selector.document.getElementById(id);
+            if (root === Selector.document || contains(node, root)) {
+                if ( node && rTestNode(node, null, idToken) ) {
+                    root = node; // start from here
+                }
+            } else {
+                return [];
+            }
+        }
+    }
+
+    if (root && !nodes.length) {
+        nodes = root.getElementsByTagName(token.tag);
+    }
+
+    if (nodes.length) {
+        result = rFilter(nodes, token, firstOnly, deDupe); 
+    }
+    clearParentCache();
+    return result;
+};
+
+var contains = function() {
+    if (document.documentElement.contains && !YAHOO.env.ua.webkit < 420)  { // IE & Opera, Safari < 3 contains is broken
+        return function(needle, haystack) {
+            return haystack.contains(needle);
+        };
+    } else if ( document.documentElement.compareDocumentPosition ) { // gecko
+        return function(needle, haystack) {
+            return !!(haystack.compareDocumentPosition(needle) & 16);
+        };
+    } else  { // Safari < 3
+        return function(needle, haystack) {
+            var parent = needle.parentNode;
+            while (parent) {
+                if (needle === parent) {
+                    return true;
+                }
+                parent = parent.parentNode;
+            } 
+            return false;
+        }; 
+    }
+}();
+
+var rFilter = function(nodes, token, firstOnly, deDupe) {
+    var result = [],
+        node;
+
+    for (var i = 0, len = nodes.length; i < len; ++i) {
+        node = nodes[i];
+        if ( !rTestNode(node, null, token) || (deDupe && node._found) ) {
+            continue;
+        }
+        if (firstOnly) {
+            return [node];
+        }
+        if (deDupe) {
+            node._found = true;
+            foundCache[foundCache.length] = node;
+        }
+
+        result[result.length] = node;
+    }
+
+    return result;
+};
+
+var rTestNode = function(node, selector, token) {
+    token = token || tokenize(selector).pop();
+
+    if (!node || node._found || (token.tag != '*' && node.tagName.toLowerCase() != token.tag)) {
+        return false; // tag match failed
+    } 
+
+    var ops = Selector.operators,
+        ps = Selector.pseudos,
+        attributes = token.attributes,
+        attr,
+        pseudos = token.pseudos,
+        prev = token.previous;
+
+    for (var i = 0, len = attributes.length; i < len; ++i) {
+        attr = (getRegExp(X.URL_ATTR).test(attributes[i][0])) ?
+                node.getAttribute(attributes[i][0], 2) : // preserve relative urls
+                node[attributes[i][0]];
+
+        if (ops[attributes[i][1]] && !ops[attributes[i][1]](attr, attributes[i][2])) {
+            return false;
+        }
+    }
+    for (var i = 0, len = pseudos.length; i < len; ++i) {
+        if (ps[pseudos[i][0]] &&
+                !ps[pseudos[i][0]](node, pseudos[i][1])) {
+            return false;
+        }
+    }
+
+    if (prev) {
+        if (prev.combinator !== ',') {
+            return combinators[prev.combinator](node, token);
+        }
+    }
+    return true;
+
+};
+
+var foundCache = [];
+var parentCache = [];
+var regexCache = {};
+
+var clearFoundCache = function() {
+    YAHOO.log('getBySelector: clearing found cache of ' + foundCache.length + ' elements');
+    for (var i = 0, len = foundCache.length; i < len; ++i) {
+        try { // IE no like delete
+            delete foundCache[i]._found;
+        } catch(e) {
+            foundCache[i].removeAttribute('_found');
+        }
+    }
+    foundCache = [];
+    YAHOO.log('getBySelector: done clearing foundCache');
+};
+
+var clearParentCache = function() {
+    if (!document.documentElement.children) { // caching children lookups for gecko
+        return function() {
+            for (var i = 0, len = parentCache.length; i < len; ++i) {
+                delete parentCache[i]._children;
+            }
+            parentCache = [];
+        };
+    } else return function() {}; // do nothing
+}();
+
+var getRegExp = function(str, flags) {
+    flags = flags || '';
+    if (!regexCache[str + flags]) {
+        regexCache[str + flags] = new RegExp(str, flags);
+    }
+    return regexCache[str + flags];
+};
+
+var trim = function(str) {
+    return str.replace(getRegExp(X.BEGIN + X.SP + X.OR + X.SP + X.END, 'g'), "");
+};
+
+var combinators = {
+    ' ': function(node, token) {
+        node = node.parentNode;
+        while (node && node.tagName) {
+            if (rTestNode(node, null, token.previous)) {
+                return true;
+            }
+            node = node.parentNode;
+        }  
+        return false;
+    },
+
+    '>': function(node, token) {
+        return rTestNode(node.parentNode, null, token.previous);
+    },
+    '+': function(node, token) {
+        var sib = node.previousSibling;
+        while (sib && sib.nodeType !== 1) {
+            sib = sib.previousSibling;
+        }
+
+        if (sib && rTestNode(sib, null, token.previous)) {
+            return true; 
+        }
+        return false;
+    },
+
+    '~': function(node, token) {
+        var sib = node.previousSibling;
+        while (sib) {
+            if (sib.nodeType === 1 && rTestNode(sib, null, token.previous)) {
+                return true;
+            }
+            sib = sib.previousSibling;
+        }
+
+        return false;
+    }
+};
+
+var getChildren = function() {
+    if (document.documentElement.children) { // document for capability test
+        return function(node, tag) {
+            return tag ? node.children.tags(tag) : node.children;
+        };
+    } else {
+        return function(node, tag) {
+            if (node._children) {
+                return node._children;
+            }
+            var children = [],
+                childNodes = node.childNodes;
+
+            for (var i = 0, len = childNodes.length; i < len; ++i) {
+                if (childNodes[i].tagName) {
+                    if (!tag || childNodes[i].tagName.toLowerCase() === tag) {
+                        children[children.length] = childNodes[i];
+                    }
+                }
+            }
+            node._children = children;
+            parentCache[parentCache.length] = node;
+            return children;
+        };
+    }
+}();
+
+/*
+    an+b = get every _a_th node starting at the _b_th
+    0n+b = no repeat ("0" and "n" may both be omitted (together) , e.g. "0n+1" or "1", not "0+1"), return only the _b_th element
+    1n+b =  get every element starting from b ("1" may may be omitted, e.g. "1n+0" or "n+0" or "n")
+    an+0 = get every _a_th element, "0" may be omitted 
+*/
+var getNth = function(node, expr, tag, reverse) {
+    if (tag) tag = tag.toLowerCase();
+    var re = regexCache[X.NTH_CHILD] = regexCache[X.NTH_CHILD] || new RegExp(X.NTH_CHILD);
+    re.test(expr);
+    var a = parseInt(RegExp.$1, 10), // include every _a_ elements (zero means no repeat, just first _a_)
+        n = RegExp.$2, // "n"
+        oddeven = RegExp.$3, // "odd" or "even"
+        b = parseInt(RegExp.$4, 10) || 0, // start scan from element _b_
+        result = [];
+
+    if ( isNaN(a) ) {
+        a = (n) ? 1 : 0;
+    }
+
+    if (oddeven) {
+        a = 2; // always every other
+        op = '+';
+        n = 'n';
+        b = (oddeven === 'odd') ? 1 : 0;
+    }
+
+    var siblings = getChildren(node.parentNode, tag);
+    if (!siblings) {
+        return false;
+    }
+    if (a === 0) { // just the first
+        if (siblings[b - 1] === node) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    if (!reverse) {
+        for (var i = b - 1, len = siblings.length; i < len; i += a) {
+            if ( i >= 0 && siblings[i] === node ) {
+                return true;
+            }
+        }
+    } else {
+        for (var i = siblings.length - b, len = siblings.length; i >= 0; i -= a) {
+            if ( i < len && siblings[i] === node ) {
+                return true;
+            }
+        }
+    }
+    return false;
+};
+
+var getId = function(attr) {
+    for (var i = 0, len = attr.length; i < len; ++i) {
+        if (attr[i][0] == 'id' && attr[i][1] === '=') {
+            return attr[i][2];
+        }
+    }
+};
+
+var getIdTokenIndex = function(tokens) {
+    for (var i = 0, len = tokens.length; i < len; ++i) {
+        if (getId(tokens[i].attributes)) {
+            return i;
+        }
+    }
+    return -1;
+};
+
+var tokenize = function(selector) {
+    if (!selector) return [];
+        var token,
+        tokens = [],
+        m,
+        aliases = Selector.attrAliases,
+        attr,
+        reAttr = getRegExp(X.ATTRIBUTES, 'g'),
+        rePseudo = getRegExp(X.PSEUDO, 'g');
+
+    selector = replaceShorthand(selector);
+    // break selector into simple selector units
+    while ( selector.length && getRegExp(X.SELECTOR).test(selector) ) {
+        token = {
+            previous: token,
+            simple: RegExp.$1,
+            tag: RegExp.$2.toLowerCase() || '*',
+            predicate: RegExp.$3,
+            attributes: [],
+            pseudos: [],
+            combinator: RegExp.$4
+        };
+
+        // Parse pseudos first, then strip from predicate to 
+        // avoid false positive from :not.
+        while (m = rePseudo.exec(token.predicate)) {
+            token.predicate = token.predicate.replace(m[0], '');
+            token.pseudos[token.pseudos.length] = m.slice(1);
+        }
+        
+        while (m = reAttr.exec(token.predicate)) { // parse attributes
+            if (aliases[m[1]]) { // convert reserved words, etc
+                m[1] = aliases[m[1]];
+            }
+            attr = m.slice(1); // capture attribute tokens
+            if (attr[1] === undefined) {
+                attr[1] = ''; // test for existence if no operator
+            }
+            token.attributes[token.attributes.length] = attr;
+        }
+        
+        token.id = getId(token.attributes);
+        if (token.previous) {
+            token.previous.combinator = token.previous.combinator || ' ';
+        }
+        tokens[tokens.length] = token;
+        selector = trim(selector.substr(token.simple.length));
+    } 
+    return tokens;
+};
+
+var replaceShorthand = function(selector) {
+    var shorthand = Selector.shorthand;
+    var attrs = selector.match(getRegExp(X.CAPTURE_ATTRIBUTES, 'g')); // pull attributes to avoid false pos on "." and "#"
+    if (attrs) {
+        selector = selector.replace(getRegExp(X.CAPTURE_ATTRIBUTES, 'g'), 'REPLACED_ATTRIBUTE');
+    }
+    for (var re in shorthand) {
+        selector = selector.replace(getRegExp(re, 'g'), shorthand[re]);
+    }
+
+    if (attrs)
+        for (var i = 0, len = attrs.length; i < len; ++i) {
+            selector = selector.replace('REPLACED_ATTRIBUTE', attrs[i]);
+        }
+    return selector;
+};
+
+Selector = new Selector();
+Selector.CHARS = CHARS;
+Selector.TOKENS = X;
+Y.Selector = Selector;
+})();
+YAHOO.register("selector", YAHOO.util.Selector, {version: "2.4.1", build: "742"});

Added: trunk/root/static/yui/selector/selector-beta-min.js
===================================================================
--- trunk/root/static/yui/selector/selector-beta-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/selector/selector-beta-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,8 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+(function(){var U=function(){};var D=YAHOO.util;var E={IDENT:"-?[_a-z]+[-\\w]*",BEGIN:"^",END:"$",OR:"|",SP:"\\s+"};var F={SIMPLE:"-+\\w_\\[\\]\\.\\|\\*\\'\\(\\)#:^~=$!\"",COMBINATORS:",>+~"};E.CAPTURE_IDENT="("+E.IDENT+")";E.BEGIN_SPACE="(?:"+E.BEGIN+E.OR+E.SP+")";E.END_SPACE="(?:"+E.SP+E.OR+E.END+")";E.SELECTOR="^("+E.CAPTURE_IDENT+"?(["+F.SIMPLE+"]*)?\\s*(["+F.COMBINATORS+"]?)?\\s*).*$";E.SIMPLE="("+E.CAPTURE_IDENT+"?(["+F.SIMPLE+"]*)*)?";E.ATTRIBUTES="\\[([a-z]+\\w*)+([~\\|\\^\\$\\*!=]=?)?\"?([^\\]\"]*)\"?\\]";E.CAPTURE_ATTRIBUTES="("+E.ATTRIBUTES+")";E.PSEUDO=":"+E.CAPTURE_IDENT+"(?:\\({1}"+E.SIMPLE+"\\){1})*";E.NTH_CHILD="^(?:(\\d*)(n){1}|(odd|even)$)*([-+]?\\d*)$";E.URL_ATTR="^href|url$";U.prototype={document:window.document,attrAliases:{"for":"htmlFor","class":"className"},shorthand:{"\\#(-?[_a-z]+[-\\w]*)":"[id=$1]","\\.(-?[_a-z]+[-\\w]*)":"[className~=$1]"},operators:{"=":function(W,X){return W===X;},"!=":function(W,X){return W!==X;},"~=":function(W,Y){var X=E.BEG!
 IN_SPACE+Y+E.END_SPACE;S[X]=S[X]||new RegExp(X);return S[X].test(W);},"|=":function(W,X){return H(E.BEGIN+X+"[-]?").test(W);},"^=":function(W,X){return W.indexOf(X)===0;},"$=":function(W,X){return W.lastIndexOf(X)===W.length-X.length;},"*=":function(W,X){return W.indexOf(X)>-1;},"":function(W,X){return W;}},pseudos:{"root":function(W){return W===W.ownerDocument.documentElement;},"nth-child":function(W,X){return R(W,X);},"nth-last-child":function(W,X){return R(W,X,null,true);},"nth-of-type":function(W,X){return R(W,X,W.tagName);},"nth-last-of-type":function(W,X){return R(W,X,W.tagName,true);},"first-child":function(W){return G(W.parentNode)[0]===W;},"last-child":function(X){var W=G(X.parentNode);return W[W.length-1]===X;},"first-of-type":function(W,X){return G(W.parentNode,W.tagName.toLowerCase())[0];},"last-of-type":function(X,Y){var W=G(X.parentNode,X.tagName.toLowerCase());return W[W.length-1];},"only-child":function(X){var W=G(X.parentNode);return W.length===1&&W[0]===X;!
 },"only-of-type":function(W){return G(W.parentNode,W.tagName.t!
 oLowerCa
se()).length===1;},"empty":function(W){return W.childNodes.length===0;},"not":function(W,X){return !U.test(W,X);},"contains":function(W,X){return W.innerHTML.indexOf(X)>-1;},"checked":function(W){return W.checked===true;}},test:function(a,Y){a=U.document.getElementById(a)||a;var X=Y.split(",");if(X.length){for(var Z=0,W=X.length;Z<W;++Z){if(V(a,X[Z])){return true;}}return false;}return V(a,Y);},filter:function(Z,Y){if(!Z||!Y){}var c,a=Z,X=[],d=C(Y);if(!a.item){for(var b=0,W=Z.length;b<W;++b){if(!Z[b].tagName){c=U.document.getElementByid(Z[b]);if(c){a[a.length]=c;}else{}}}}X=Q(a,C(Y)[0]);B();return X;},query:function(X,Y,Z){var W=I(X,Y,Z);return W;}};var I=function(c,h,j,a){if(!c){return[];}var k=[];var Y=c.split(",");if(Y.length>1){for(var d=0,e=Y.length;d<e;++d){k=k.concat(arguments.callee(Y[d],h,j,true));}J();return k;}if(h&&!h.tagName){h=U.document.getElementById(h);if(!h){return[];}}h=h||U.document;var g=C(c);var f=g[N(g)],W=[],Z,X,b=g.pop();if(f){X=O(f.attributes);}if(X!
 ){if(X===b.id){W=[U.document.getElementById(X)]||h;}else{Z=U.document.getElementById(X);if(h===U.document||L(Z,h)){if(Z&&V(Z,null,f)){h=Z;}}else{return[];}}}if(h&&!W.length){W=h.getElementsByTagName(b.tag);}if(W.length){k=Q(W,b,j,a);}B();return k;};var L=function(){if(document.documentElement.contains&&!YAHOO.env.ua.webkit<420){return function(X,W){return W.contains(X);};}else{if(document.documentElement.compareDocumentPosition){return function(X,W){return !!(W.compareDocumentPosition(X)&16);};}else{return function(Y,X){var W=Y.parentNode;while(W){if(Y===W){return true;}W=W.parentNode;}return false;};}}}();var Q=function(Z,b,c,Y){var X=[],d;for(var a=0,W=Z.length;a<W;++a){d=Z[a];if(!V(d,null,b)||(Y&&d._found)){continue;}if(c){return[d];}if(Y){d._found=true;M[M.length]=d;}X[X.length]=d;}return X;};var V=function(Y,b,a){a=a||C(b).pop();if(!Y||Y._found||(a.tag!="*"&&Y.tagName.toLowerCase()!=a.tag)){return false;}var X=U.operators,W=U.pseudos,c=a.attributes,f,g=a.pseudos,Z=a.pr!
 evious;for(var d=0,e=c.length;d<e;++d){f=(H(E.URL_ATTR).test(c!
 [d][0]))
?Y.getAttribute(c[d][0],2):Y[c[d][0]];if(X[c[d][1]]&&!X[c[d][1]](f,c[d][2])){return false;}}for(var d=0,e=g.length;d<e;++d){if(W[g[d][0]]&&!W[g[d][0]](Y,g[d][1])){return false;}}if(Z){if(Z.combinator!==","){return P[Z.combinator](Y,a);}}return true;};var M=[];var K=[];var S={};var J=function(){for(var X=0,W=M.length;X<W;++X){try{delete M[X]._found;}catch(Y){M[X].removeAttribute("_found");}}M=[];};var B=function(){if(!document.documentElement.children){return function(){for(var X=0,W=K.length;X<W;++X){delete K[X]._children;}K=[];};}else{return function(){};}}();var H=function(X,W){W=W||"";if(!S[X+W]){S[X+W]=new RegExp(X,W);}return S[X+W];};var T=function(W){return W.replace(H(E.BEGIN+E.SP+E.OR+E.SP+E.END,"g"),"");};var P={" ":function(X,W){X=X.parentNode;while(X&&X.tagName){if(V(X,null,W.previous)){return true;}X=X.parentNode;}return false;},">":function(X,W){return V(X.parentNode,null,W.previous);},"+":function(Y,X){var W=Y.previousSibling;while(W&&W.nodeType!==1){W=W.previo!
 usSibling;}if(W&&V(W,null,X.previous)){return true;}return false;},"~":function(Y,X){var W=Y.previousSibling;while(W){if(W.nodeType===1&&V(W,null,X.previous)){return true;}W=W.previousSibling;}return false;}};var G=function(){if(document.documentElement.children){return function(X,W){return W?X.children.tags(W):X.children;};}else{return function(a,X){if(a._children){return a._children;}var Z=[],b=a.childNodes;for(var Y=0,W=b.length;Y<W;++Y){if(b[Y].tagName){if(!X||b[Y].tagName.toLowerCase()===X){Z[Z.length]=b[Y];}}}a._children=Z;K[K.length]=a;return Z;};}}();var R=function(X,h,l,c){if(l){l=l.toLowerCase();}var j=S[E.NTH_CHILD]=S[E.NTH_CHILD]||new RegExp(E.NTH_CHILD);j.test(h);var g=parseInt(RegExp.$1,10),W=RegExp.$2,d=RegExp.$3,e=parseInt(RegExp.$4,10)||0,k=[];if(isNaN(g)){g=(W)?1:0;}if(d){g=2;op="+";W="n";e=(d==="odd")?1:0;}var f=G(X.parentNode,l);if(!f){return false;}if(g===0){if(f[e-1]===X){return true;
+}else{return false;}}if(!c){for(var Y=e-1,Z=f.length;Y<Z;Y+=g){if(Y>=0&&f[Y]===X){return true;}}}else{for(var Y=f.length-e,Z=f.length;Y>=0;Y-=g){if(Y<Z&&f[Y]===X){return true;}}}return false;};var O=function(X){for(var Y=0,W=X.length;Y<W;++Y){if(X[Y][0]=="id"&&X[Y][1]==="="){return X[Y][2];}}};var N=function(Y){for(var X=0,W=Y.length;X<W;++X){if(O(Y[X].attributes)){return X;}}return -1;};var C=function(Y){if(!Y){return[];}var a,d=[],X,Z=U.attrAliases,W,c=H(E.ATTRIBUTES,"g"),b=H(E.PSEUDO,"g");Y=A(Y);while(Y.length&&H(E.SELECTOR).test(Y)){a={previous:a,simple:RegExp.$1,tag:RegExp.$2.toLowerCase()||"*",predicate:RegExp.$3,attributes:[],pseudos:[],combinator:RegExp.$4};while(X=b.exec(a.predicate)){a.predicate=a.predicate.replace(X[0],"");a.pseudos[a.pseudos.length]=X.slice(1);}while(X=c.exec(a.predicate)){if(Z[X[1]]){X[1]=Z[X[1]];}W=X.slice(1);if(W[1]===undefined){W[1]="";}a.attributes[a.attributes.length]=W;}a.id=O(a.attributes);if(a.previous){a.previous.combinator=a.previous.!
 combinator||" ";}d[d.length]=a;Y=T(Y.substr(a.simple.length));}return d;};var A=function(X){var Y=U.shorthand;var Z=X.match(H(E.CAPTURE_ATTRIBUTES,"g"));if(Z){X=X.replace(H(E.CAPTURE_ATTRIBUTES,"g"),"REPLACED_ATTRIBUTE");}for(var b in Y){X=X.replace(H(b,"g"),Y[b]);}if(Z){for(var a=0,W=Z.length;a<W;++a){X=X.replace("REPLACED_ATTRIBUTE",Z[a]);}}return X;};U=new U();U.CHARS=F;U.TOKENS=E;D.Selector=U;})();YAHOO.register("selector",YAHOO.util.Selector,{version:"2.4.1",build:"742"});
\ No newline at end of file

Added: trunk/root/static/yui/selector/selector-beta.js
===================================================================
--- trunk/root/static/yui/selector/selector-beta.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/selector/selector-beta.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -0,0 +1,640 @@
+/*
+Copyright (c) 2007, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.4.1
+*/
+/**
+ * The selector module provides helper methods allowing CSS3 Selectors to be used with DOM elements.
+ * @module selector
+ * @title Selector Utility
+ * @namespace YAHOO.util
+ * @requires yahoo, dom
+ */
+
+(function() {
+/**
+ * Provides helper methods for collecting and filtering DOM elements.
+ * @namespace YAHOO.util
+ * @class Selector
+ * @static
+ */
+var Selector = function() {};
+
+var Y = YAHOO.util;
+
+var X = {
+    IDENT: '-?[_a-z]+[-\\w]*',
+    BEGIN: '^',
+    END: '$',
+    OR: '|',
+    SP: '\\s+'
+};
+
+var CHARS = {
+    SIMPLE: '-+\\w_\\[\\]\\.\\|\\*\\\'\\(\\)#:^~=$!"',
+    COMBINATORS: ',>+~'
+};
+
+X.CAPTURE_IDENT = '(' + X.IDENT + ')';
+X.BEGIN_SPACE = '(?:' + X.BEGIN + X.OR + X.SP +')';
+X.END_SPACE = '(?:' + X.SP + X.OR + X.END + ')';
+X.SELECTOR = '^(' + X.CAPTURE_IDENT + '?([' + CHARS.SIMPLE + ']*)?\\s*([' + CHARS.COMBINATORS + ']?)?\\s*).*$';
+X.SIMPLE = '(' + X.CAPTURE_IDENT + '?([' + CHARS.SIMPLE + ']*)*)?';
+X.ATTRIBUTES = '\\[([a-z]+\\w*)+([~\\|\\^\\$\\*!=]=?)?"?([^\\]"]*)"?\\]';
+X.CAPTURE_ATTRIBUTES = '(' + X.ATTRIBUTES  + ')';
+X.PSEUDO = ':' + X.CAPTURE_IDENT + '(?:\\({1}' + X.SIMPLE + '\\){1})*';
+X.NTH_CHILD = '^(?:(\\d*)(n){1}|(odd|even)$)*([-+]?\\d*)$';
+X.URL_ATTR = '^href|url$';
+Selector.prototype = {
+    /**
+     * Default document for use queries 
+     * @property document
+     * @type object
+     * @default window.document
+     */
+    document: window.document,
+    /**
+     * Mapping of attributes to aliases, normally to work around HTMLAttributes
+     * that conflict with JS reserved words.
+     * @property attrAliases
+     * @type object
+     */
+    attrAliases: {
+        'for': 'htmlFor',
+        'class': 'className'
+    },
+
+    /**
+     * Mapping of shorthand tokens to corresponding attribute selector 
+     * @property shorthand
+     * @type object
+     */
+    shorthand: {
+        //'(?:(?:[^\\)\\]\\s*>+~,]+)(?:-?[_a-z]+[-\\w]))+#(-?[_a-z]+[-\\w]*)': '[id=$1]',
+        '\\#(-?[_a-z]+[-\\w]*)': '[id=$1]',
+        '\\.(-?[_a-z]+[-\\w]*)': '[className~=$1]'
+    },
+
+    /**
+     * List of operators and corresponding boolean functions. 
+     * These functions are passed the attribute and the current node's value of the attribute.
+     * @property operators
+     * @type object
+     */
+    operators: {
+        '=': function(attr, val) { return attr === val; }, // Equality
+        '!=': function(attr, val) { return attr !== val; }, // Inequality
+        '~=': function(attr, val) { // Match one of space seperated words 
+            var str = X.BEGIN_SPACE + val + X.END_SPACE;
+            regexCache[str] = regexCache[str] || new RegExp(str); // skip getRegExp call for perf boost
+
+            //return getRegExp(X.BEGIN_SPACE + val + X.END_SPACE).test(attr);
+            return regexCache[str].test(attr);
+        },
+        '|=': function(attr, val) { return getRegExp(X.BEGIN + val + '[-]?').test(attr); }, // Match start with value followed by optional hyphen
+        '^=': function(attr, val) { return attr.indexOf(val) === 0; }, // Match starts with value
+        '$=': function(attr, val) { return attr.lastIndexOf(val) === attr.length - val.length; }, // Match ends with value
+        '*=': function(attr, val) { return attr.indexOf(val) > -1; }, // Match contains value as substring 
+        '': function(attr, val) { return attr; } // Just test for existence of attribute
+    },
+
+    /**
+     * List of pseudo-classes and corresponding boolean functions. 
+     * These functions are called with the current node, and any value that was parsed with the pseudo regex.
+     * @property pseudos
+     * @type object
+     */
+    pseudos: {
+        'root': function(node) {
+            return node === node.ownerDocument.documentElement;
+        },
+
+        'nth-child': function(node, val) {
+            return getNth(node, val);
+        },
+
+        'nth-last-child': function(node, val) {
+            return getNth(node, val, null, true);
+        },
+
+        'nth-of-type': function(node, val) {
+            return getNth(node, val, node.tagName);
+        },
+         
+        'nth-last-of-type': function(node, val) {
+            return getNth(node, val, node.tagName, true);
+        },
+         
+        'first-child': function(node) {
+            return getChildren(node.parentNode)[0] === node;
+        },
+
+        'last-child': function(node) {
+            var children = getChildren(node.parentNode);
+            return children[children.length - 1] === node;
+        },
+
+        'first-of-type': function(node, val) {
+            return getChildren(node.parentNode, node.tagName.toLowerCase())[0];
+        },
+         
+        'last-of-type': function(node, val) {
+            var children = getChildren(node.parentNode, node.tagName.toLowerCase());
+            return children[children.length - 1];
+        },
+         
+        'only-child': function(node) {
+            var children = getChildren(node.parentNode);
+            return children.length === 1 && children[0] === node;
+        },
+
+        'only-of-type': function(node) {
+            return getChildren(node.parentNode, node.tagName.toLowerCase()).length === 1;
+        },
+
+        'empty': function(node) {
+            return node.childNodes.length === 0;
+        },
+
+        'not': function(node, simple) {
+            return !Selector.test(node, simple);
+        },
+
+        'contains': function(node, str) {
+            return node.innerHTML.indexOf(str) > -1;
+        },
+        'checked': function(node) {
+            return node.checked === true;
+        }
+    },
+
+    /**
+     * Test if the supplied node matches the supplied selector.
+     * @method test
+     *
+     * @param {HTMLElement | String} node An id or node reference to the HTMLElement being tested.
+     * @param {string} selector The CSS Selector to test the node against.
+     * @return{boolean} Whether or not the node matches the selector.
+     * @static
+    
+     */
+    test: function(node, selector) {
+        node = Selector.document.getElementById(node) || node;
+        var groups = selector.split(',');
+        if (groups.length) {
+            for (var i = 0, len = groups.length; i < len; ++i) {
+                if ( rTestNode(node, groups[i]) ) { // passes if ANY group matches
+                    return true;
+                }
+            }
+            return false;
+        }
+        return rTestNode(node, selector);
+    },
+
+    /**
+     * Filters a set of nodes based on a given CSS selector. 
+     * @method filter
+     *
+     * @param {array}  A set of nodes/ids to filter. 
+     * @param {string} selector The selector used to test each node.
+     * @return{array} An array of nodes from the supplied array that match the given selector.
+     * @static
+     */
+    filter: function(arr, selector) {
+        if (!arr || !selector) {
+        }
+        var node,
+            nodes = arr,
+            result = [],
+            tokens = tokenize(selector);
+
+        if (!nodes.item) { // if not HTMLCollection, handle arrays of ids and/or nodes
+            for (var i = 0, len = arr.length; i < len; ++i) {
+                if (!arr[i].tagName) { // tagName limits to HTMLElements 
+                    node = Selector.document.getElementByid(arr[i]);
+                    if (node) { // skip IDs that return null 
+                        nodes[nodes.length] = node;
+                    } else {
+                    }
+                }
+            }
+        }
+        result = rFilter(nodes, tokenize(selector)[0]);
+        clearParentCache();
+        return result;
+    },
+
+    /**
+     * Retrieves a set of nodes based on a given CSS selector. 
+     * @method query
+     *
+     * @param {string} selector The CSS Selector to test the node against.
+     * @param {HTMLElement | String} root optional An id or HTMLElement to start the query from. Defaults to Selector.document.
+     * @param {Boolean} firstOnly optional Whether or not to return only the first match.
+     * @return {Array} An array of nodes that match the given selector.
+     * @static
+     */
+    query: function(selector, root, firstOnly) {
+        var result = query(selector, root, firstOnly);
+        return result;
+    }
+};
+
+var query = function(selector, root, firstOnly, deDupe) {
+    if (!selector) {
+        return []; // no nodes for you
+    }
+    var result = [];
+    var groups = selector.split(',');
+
+    if (groups.length > 1) {
+        for (var i = 0, len = groups.length; i < len; ++i) {
+            result = result.concat( arguments.callee(groups[i], root, firstOnly, true) ); 
+        }
+        clearFoundCache();
+        return result;
+    }
+
+    if (root && !root.tagName) {
+        root = Selector.document.getElementById(root);
+        if (!root) {
+            return [];
+        }
+    }
+
+    root = root || Selector.document;
+    var tokens = tokenize(selector);
+    var idToken = tokens[getIdTokenIndex(tokens)],
+        nodes = [],
+        node,
+        id,
+        token = tokens.pop();
+        
+    if (idToken) {
+        id = getId(idToken.attributes);
+    }
+    // if no root alternate root is specified use id shortcut
+    if (id) {
+        if (id === token.id) { // only one target
+            nodes = [Selector.document.getElementById(id)] || root;
+        } else { // reset root to id node if passes
+            node = Selector.document.getElementById(id);
+            if (root === Selector.document || contains(node, root)) {
+                if ( node && rTestNode(node, null, idToken) ) {
+                    root = node; // start from here
+                }
+            } else {
+                return [];
+            }
+        }
+    }
+
+    if (root && !nodes.length) {
+        nodes = root.getElementsByTagName(token.tag);
+    }
+
+    if (nodes.length) {
+        result = rFilter(nodes, token, firstOnly, deDupe); 
+    }
+    clearParentCache();
+    return result;
+};
+
+var contains = function() {
+    if (document.documentElement.contains && !YAHOO.env.ua.webkit < 420)  { // IE & Opera, Safari < 3 contains is broken
+        return function(needle, haystack) {
+            return haystack.contains(needle);
+        };
+    } else if ( document.documentElement.compareDocumentPosition ) { // gecko
+        return function(needle, haystack) {
+            return !!(haystack.compareDocumentPosition(needle) & 16);
+        };
+    } else  { // Safari < 3
+        return function(needle, haystack) {
+            var parent = needle.parentNode;
+            while (parent) {
+                if (needle === parent) {
+                    return true;
+                }
+                parent = parent.parentNode;
+            } 
+            return false;
+        }; 
+    }
+}();
+
+var rFilter = function(nodes, token, firstOnly, deDupe) {
+    var result = [],
+        node;
+
+    for (var i = 0, len = nodes.length; i < len; ++i) {
+        node = nodes[i];
+        if ( !rTestNode(node, null, token) || (deDupe && node._found) ) {
+            continue;
+        }
+        if (firstOnly) {
+            return [node];
+        }
+        if (deDupe) {
+            node._found = true;
+            foundCache[foundCache.length] = node;
+        }
+
+        result[result.length] = node;
+    }
+
+    return result;
+};
+
+var rTestNode = function(node, selector, token) {
+    token = token || tokenize(selector).pop();
+
+    if (!node || node._found || (token.tag != '*' && node.tagName.toLowerCase() != token.tag)) {
+        return false; // tag match failed
+    } 
+
+    var ops = Selector.operators,
+        ps = Selector.pseudos,
+        attributes = token.attributes,
+        attr,
+        pseudos = token.pseudos,
+        prev = token.previous;
+
+    for (var i = 0, len = attributes.length; i < len; ++i) {
+        attr = (getRegExp(X.URL_ATTR).test(attributes[i][0])) ?
+                node.getAttribute(attributes[i][0], 2) : // preserve relative urls
+                node[attributes[i][0]];
+
+        if (ops[attributes[i][1]] && !ops[attributes[i][1]](attr, attributes[i][2])) {
+            return false;
+        }
+    }
+    for (var i = 0, len = pseudos.length; i < len; ++i) {
+        if (ps[pseudos[i][0]] &&
+                !ps[pseudos[i][0]](node, pseudos[i][1])) {
+            return false;
+        }
+    }
+
+    if (prev) {
+        if (prev.combinator !== ',') {
+            return combinators[prev.combinator](node, token);
+        }
+    }
+    return true;
+
+};
+
+var foundCache = [];
+var parentCache = [];
+var regexCache = {};
+
+var clearFoundCache = function() {
+    for (var i = 0, len = foundCache.length; i < len; ++i) {
+        try { // IE no like delete
+            delete foundCache[i]._found;
+        } catch(e) {
+            foundCache[i].removeAttribute('_found');
+        }
+    }
+    foundCache = [];
+};
+
+var clearParentCache = function() {
+    if (!document.documentElement.children) { // caching children lookups for gecko
+        return function() {
+            for (var i = 0, len = parentCache.length; i < len; ++i) {
+                delete parentCache[i]._children;
+            }
+            parentCache = [];
+        };
+    } else return function() {}; // do nothing
+}();
+
+var getRegExp = function(str, flags) {
+    flags = flags || '';
+    if (!regexCache[str + flags]) {
+        regexCache[str + flags] = new RegExp(str, flags);
+    }
+    return regexCache[str + flags];
+};
+
+var trim = function(str) {
+    return str.replace(getRegExp(X.BEGIN + X.SP + X.OR + X.SP + X.END, 'g'), "");
+};
+
+var combinators = {
+    ' ': function(node, token) {
+        node = node.parentNode;
+        while (node && node.tagName) {
+            if (rTestNode(node, null, token.previous)) {
+                return true;
+            }
+            node = node.parentNode;
+        }  
+        return false;
+    },
+
+    '>': function(node, token) {
+        return rTestNode(node.parentNode, null, token.previous);
+    },
+    '+': function(node, token) {
+        var sib = node.previousSibling;
+        while (sib && sib.nodeType !== 1) {
+            sib = sib.previousSibling;
+        }
+
+        if (sib && rTestNode(sib, null, token.previous)) {
+            return true; 
+        }
+        return false;
+    },
+
+    '~': function(node, token) {
+        var sib = node.previousSibling;
+        while (sib) {
+            if (sib.nodeType === 1 && rTestNode(sib, null, token.previous)) {
+                return true;
+            }
+            sib = sib.previousSibling;
+        }
+
+        return false;
+    }
+};
+
+var getChildren = function() {
+    if (document.documentElement.children) { // document for capability test
+        return function(node, tag) {
+            return tag ? node.children.tags(tag) : node.children;
+        };
+    } else {
+        return function(node, tag) {
+            if (node._children) {
+                return node._children;
+            }
+            var children = [],
+                childNodes = node.childNodes;
+
+            for (var i = 0, len = childNodes.length; i < len; ++i) {
+                if (childNodes[i].tagName) {
+                    if (!tag || childNodes[i].tagName.toLowerCase() === tag) {
+                        children[children.length] = childNodes[i];
+                    }
+                }
+            }
+            node._children = children;
+            parentCache[parentCache.length] = node;
+            return children;
+        };
+    }
+}();
+
+/*
+    an+b = get every _a_th node starting at the _b_th
+    0n+b = no repeat ("0" and "n" may both be omitted (together) , e.g. "0n+1" or "1", not "0+1"), return only the _b_th element
+    1n+b =  get every element starting from b ("1" may may be omitted, e.g. "1n+0" or "n+0" or "n")
+    an+0 = get every _a_th element, "0" may be omitted 
+*/
+var getNth = function(node, expr, tag, reverse) {
+    if (tag) tag = tag.toLowerCase();
+    var re = regexCache[X.NTH_CHILD] = regexCache[X.NTH_CHILD] || new RegExp(X.NTH_CHILD);
+    re.test(expr);
+    var a = parseInt(RegExp.$1, 10), // include every _a_ elements (zero means no repeat, just first _a_)
+        n = RegExp.$2, // "n"
+        oddeven = RegExp.$3, // "odd" or "even"
+        b = parseInt(RegExp.$4, 10) || 0, // start scan from element _b_
+        result = [];
+
+    if ( isNaN(a) ) {
+        a = (n) ? 1 : 0;
+    }
+
+    if (oddeven) {
+        a = 2; // always every other
+        op = '+';
+        n = 'n';
+        b = (oddeven === 'odd') ? 1 : 0;
+    }
+
+    var siblings = getChildren(node.parentNode, tag);
+    if (!siblings) {
+        return false;
+    }
+    if (a === 0) { // just the first
+        if (siblings[b - 1] === node) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    if (!reverse) {
+        for (var i = b - 1, len = siblings.length; i < len; i += a) {
+            if ( i >= 0 && siblings[i] === node ) {
+                return true;
+            }
+        }
+    } else {
+        for (var i = siblings.length - b, len = siblings.length; i >= 0; i -= a) {
+            if ( i < len && siblings[i] === node ) {
+                return true;
+            }
+        }
+    }
+    return false;
+};
+
+var getId = function(attr) {
+    for (var i = 0, len = attr.length; i < len; ++i) {
+        if (attr[i][0] == 'id' && attr[i][1] === '=') {
+            return attr[i][2];
+        }
+    }
+};
+
+var getIdTokenIndex = function(tokens) {
+    for (var i = 0, len = tokens.length; i < len; ++i) {
+        if (getId(tokens[i].attributes)) {
+            return i;
+        }
+    }
+    return -1;
+};
+
+var tokenize = function(selector) {
+    if (!selector) return [];
+        var token,
+        tokens = [],
+        m,
+        aliases = Selector.attrAliases,
+        attr,
+        reAttr = getRegExp(X.ATTRIBUTES, 'g'),
+        rePseudo = getRegExp(X.PSEUDO, 'g');
+
+    selector = replaceShorthand(selector);
+    // break selector into simple selector units
+    while ( selector.length && getRegExp(X.SELECTOR).test(selector) ) {
+        token = {
+            previous: token,
+            simple: RegExp.$1,
+            tag: RegExp.$2.toLowerCase() || '*',
+            predicate: RegExp.$3,
+            attributes: [],
+            pseudos: [],
+            combinator: RegExp.$4
+        };
+
+        // Parse pseudos first, then strip from predicate to 
+        // avoid false positive from :not.
+        while (m = rePseudo.exec(token.predicate)) {
+            token.predicate = token.predicate.replace(m[0], '');
+            token.pseudos[token.pseudos.length] = m.slice(1);
+        }
+        
+        while (m = reAttr.exec(token.predicate)) { // parse attributes
+            if (aliases[m[1]]) { // convert reserved words, etc
+                m[1] = aliases[m[1]];
+            }
+            attr = m.slice(1); // capture attribute tokens
+            if (attr[1] === undefined) {
+                attr[1] = ''; // test for existence if no operator
+            }
+            token.attributes[token.attributes.length] = attr;
+        }
+        
+        token.id = getId(token.attributes);
+        if (token.previous) {
+            token.previous.combinator = token.previous.combinator || ' ';
+        }
+        tokens[tokens.length] = token;
+        selector = trim(selector.substr(token.simple.length));
+    } 
+    return tokens;
+};
+
+var replaceShorthand = function(selector) {
+    var shorthand = Selector.shorthand;
+    var attrs = selector.match(getRegExp(X.CAPTURE_ATTRIBUTES, 'g')); // pull attributes to avoid false pos on "." and "#"
+    if (attrs) {
+        selector = selector.replace(getRegExp(X.CAPTURE_ATTRIBUTES, 'g'), 'REPLACED_ATTRIBUTE');
+    }
+    for (var re in shorthand) {
+        selector = selector.replace(getRegExp(re, 'g'), shorthand[re]);
+    }
+
+    if (attrs)
+        for (var i = 0, len = attrs.length; i < len; ++i) {
+            selector = selector.replace('REPLACED_ATTRIBUTE', attrs[i]);
+        }
+    return selector;
+};
+
+Selector = new Selector();
+Selector.CHARS = CHARS;
+Selector.TOKENS = X;
+Y.Selector = Selector;
+})();
+YAHOO.register("selector", YAHOO.util.Selector, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/slider/README
===================================================================
--- trunk/root/static/yui/slider/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/slider/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,11 @@
 Slider - Release Notes
 
+2.4.1
+    * No change
+
+2.4.0
+    * No change
+
 2.3.1
 
    * getValue will return the last value or 0 rather than NaN if the control 

Modified: trunk/root/static/yui/slider/slider-debug.js
===================================================================
--- trunk/root/static/yui/slider/slider-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/slider/slider-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * The Slider component is a UI control that enables the user to adjust 
@@ -1389,4 +1389,4 @@
 
 });
 
-YAHOO.register("slider", YAHOO.widget.Slider, {version: "2.3.1", build: "541"});
+YAHOO.register("slider", YAHOO.widget.Slider, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/slider/slider-min.js
===================================================================
--- trunk/root/static/yui/slider/slider-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/slider/slider-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-YAHOO.widget.Slider=function(C,A,B,D){YAHOO.widget.Slider.ANIM_AVAIL=(!YAHOO.lang.isUndefined(YAHOO.util.Anim));if(C){this.init(C,A,true);this.initSlider(D);this.initThumb(B);}};YAHOO.widget.Slider.getHorizSlider=function(B,C,E,D,A){return new YAHOO.widget.Slider(B,B,new YAHOO.widget.SliderThumb(C,B,E,D,0,0,A),"horiz");};YAHOO.widget.Slider.getVertSlider=function(C,D,A,E,B){return new YAHOO.widget.Slider(C,C,new YAHOO.widget.SliderThumb(D,C,0,0,A,E,B),"vert");};YAHOO.widget.Slider.getSliderRegion=function(C,D,F,E,A,G,B){return new YAHOO.widget.Slider(C,C,new YAHOO.widget.SliderThumb(D,C,F,E,A,G,B),"region");};YAHOO.widget.Slider.ANIM_AVAIL=false;YAHOO.extend(YAHOO.widget.Slider,YAHOO.util.DragDrop,{initSlider:function(A){this.type=A;this.createEvent("change",this);this.createEvent("slideStart",this);this.createEvent("slideEnd",this);this.isTarget=false;this.animate=YAHOO.widget.Slider.ANIM_AVAIL;this.backgroundEnabled=true;this.tickPause=40;this.enableKeys=true;this.keyIncr!
 ement=20;this.moveComplete=true;this.animationDuration=0.2;this.SOURCE_UI_EVENT=1;this.SOURCE_SET_VALUE=2;this.valueChangeSource=0;this._silent=false;this.lastOffset=[0,0];},initThumb:function(B){var A=this;this.thumb=B;B.cacheBetweenDrags=true;if(B._isHoriz&&B.xTicks&&B.xTicks.length){this.tickPause=Math.round(360/B.xTicks.length);}else{if(B.yTicks&&B.yTicks.length){this.tickPause=Math.round(360/B.yTicks.length);}}B.onAvailable=function(){return A.setStartSliderState();};B.onMouseDown=function(){return A.focus();};B.startDrag=function(){A._slideStart();};B.onDrag=function(){A.fireEvents(true);};B.onMouseUp=function(){A.thumbMouseUp();};},onAvailable:function(){var A=YAHOO.util.Event;A.on(this.id,"keydown",this.handleKeyDown,this,true);A.on(this.id,"keypress",this.handleKeyPress,this,true);},handleKeyPress:function(C){if(this.enableKeys){var A=YAHOO.util.Event;var B=A.getCharCode(C);switch(B){case 37:case 38:case 39:case 40:case 36:case 35:A.preventDefault(C);break;default:!
 }}},handleKeyDown:function(E){if(this.enableKeys){var G=YAHOO.!
 util.Eve
nt;var C=G.getCharCode(E),I=this.thumb;var B=this.getXValue(),F=this.getYValue();var H=false;var D=true;switch(C){case 37:B-=this.keyIncrement;break;case 38:F-=this.keyIncrement;break;case 39:B+=this.keyIncrement;break;case 40:F+=this.keyIncrement;break;case 36:B=I.leftConstraint;F=I.topConstraint;break;case 35:B=I.rightConstraint;F=I.bottomConstraint;break;default:D=false;}if(D){if(I._isRegion){this.setRegionValue(B,F,true);}else{var A=(I._isHoriz)?B:F;this.setValue(A,true);}G.stopEvent(E);}}},setStartSliderState:function(){this.setThumbCenterPoint();this.baselinePos=YAHOO.util.Dom.getXY(this.getEl());this.thumb.startOffset=this.thumb.getOffsetFromParent(this.baselinePos);if(this.thumb._isRegion){if(this.deferredSetRegionValue){this.setRegionValue.apply(this,this.deferredSetRegionValue,true);this.deferredSetRegionValue=null;}else{this.setRegionValue(0,0,true,true,true);}}else{if(this.deferredSetValue){this.setValue.apply(this,this.deferredSetValue,true);this.deferredSetValu!
 e=null;}else{this.setValue(0,true,true,true);}}},setThumbCenterPoint:function(){var A=this.thumb.getEl();if(A){this.thumbCenterPoint={x:parseInt(A.offsetWidth/2,10),y:parseInt(A.offsetHeight/2,10)};}},lock:function(){this.thumb.lock();this.locked=true;},unlock:function(){this.thumb.unlock();this.locked=false;},thumbMouseUp:function(){if(!this.isLocked()&&!this.moveComplete){this.endMove();}},onMouseUp:function(){if(!this.isLocked()&&!this.moveComplete){this.endMove();}},getThumb:function(){return this.thumb;},focus:function(){this.valueChangeSource=this.SOURCE_UI_EVENT;var A=this.getEl();if(A.focus){try{A.focus();}catch(B){}}this.verifyOffset();if(this.isLocked()){return false;}else{this._slideStart();return true;}},onChange:function(A,B){},onSlideStart:function(){},onSlideEnd:function(){},getValue:function(){return this.thumb.getValue();},getXValue:function(){return this.thumb.getXValue();},getYValue:function(){return this.thumb.getYValue();},handleThumbChange:function(){}!
 ,setValue:function(G,C,D,A){this._silent=A;this.valueChangeSou!
 rce=this
.SOURCE_SET_VALUE;if(!this.thumb.available){this.deferredSetValue=arguments;return false;}if(this.isLocked()&&!D){return false;}if(isNaN(G)){return false;}var B=this.thumb;B.lastOffset=[G,G];var F,E;this.verifyOffset(true);if(B._isRegion){return false;}else{if(B._isHoriz){this._slideStart();F=B.initPageX+G+this.thumbCenterPoint.x;this.moveThumb(F,B.initPageY,C);}else{this._slideStart();E=B.initPageY+G+this.thumbCenterPoint.y;this.moveThumb(B.initPageX,E,C);}}return true;},setRegionValue:function(H,A,D,E,B){this._silent=B;this.valueChangeSource=this.SOURCE_SET_VALUE;if(!this.thumb.available){this.deferredSetRegionValue=arguments;return false;}if(this.isLocked()&&!E){return false;}if(isNaN(H)){return false;}var C=this.thumb;C.lastOffset=[H,A];this.verifyOffset(true);if(C._isRegion){this._slideStart();var G=C.initPageX+H+this.thumbCenterPoint.x;var F=C.initPageY+A+this.thumbCenterPoint.y;this.moveThumb(G,F,D);return true;}return false;},verifyOffset:function(B){var A=YAHOO.util!
 .Dom.getXY(this.getEl());if(A){if(A[0]!=this.baselinePos[0]||A[1]!=this.baselinePos[1]){this.thumb.resetConstraints();this.baselinePos=A;return false;}}return true;},moveThumb:function(G,F,E,D){var H=this.thumb;var I=this;if(!H.available){return ;}H.setDelta(this.thumbCenterPoint.x,this.thumbCenterPoint.y);var B=H.getTargetCoord(G,F);var C=[B.x,B.y];this._slideStart();if(this.animate&&YAHOO.widget.Slider.ANIM_AVAIL&&H._graduated&&!E){this.lock();this.curCoord=YAHOO.util.Dom.getXY(this.thumb.getEl());setTimeout(function(){I.moveOneTick(C);},this.tickPause);}else{if(this.animate&&YAHOO.widget.Slider.ANIM_AVAIL&&!E){this.lock();var A=new YAHOO.util.Motion(H.id,{points:{to:C}},this.animationDuration,YAHOO.util.Easing.easeOut);A.onComplete.subscribe(function(){I.endMove();});A.animate();}else{H.setDragElPos(G,F);if(!D){this.endMove();}}}},_slideStart:function(){if(!this._sliding){if(!this._silent){this.onSlideStart();
-this.fireEvent("slideStart");}this._sliding=true;}},_slideEnd:function(){if(this._sliding&&this.moveComplete){if(!this._silent){this.onSlideEnd();this.fireEvent("slideEnd");}this._sliding=false;this._silent=false;this.moveComplete=false;}},moveOneTick:function(B){var E=this.thumb,D;var F=null;if(E._isRegion){F=this._getNextX(this.curCoord,B);var A=(F)?F[0]:this.curCoord[0];F=this._getNextY([A,this.curCoord[1]],B);}else{if(E._isHoriz){F=this._getNextX(this.curCoord,B);}else{F=this._getNextY(this.curCoord,B);}}if(F){this.curCoord=F;this.thumb.alignElWithMouse(E.getEl(),F[0],F[1]);if(!(F[0]==B[0]&&F[1]==B[1])){var C=this;setTimeout(function(){C.moveOneTick(B);},this.tickPause);}else{this.endMove();}}else{this.endMove();}},_getNextX:function(A,B){var D=this.thumb;var F;var C=[];var E=null;if(A[0]>B[0]){F=D.tickSize-this.thumbCenterPoint.x;C=D.getTargetCoord(A[0]-F,A[1]);E=[C.x,C.y];}else{if(A[0]<B[0]){F=D.tickSize+this.thumbCenterPoint.x;C=D.getTargetCoord(A[0]+F,A[1]);E=[C.x,C!
 .y];}else{}}return E;},_getNextY:function(A,B){var D=this.thumb;var F;var C=[];var E=null;if(A[1]>B[1]){F=D.tickSize-this.thumbCenterPoint.y;C=D.getTargetCoord(A[0],A[1]-F);E=[C.x,C.y];}else{if(A[1]<B[1]){F=D.tickSize+this.thumbCenterPoint.y;C=D.getTargetCoord(A[0],A[1]+F);E=[C.x,C.y];}else{}}return E;},b4MouseDown:function(A){this.thumb.autoOffset();this.thumb.resetConstraints();},onMouseDown:function(B){if(!this.isLocked()&&this.backgroundEnabled){var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.focus();this.moveThumb(A,C);}},onDrag:function(B){if(!this.isLocked()){var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.moveThumb(A,C,true,true);}},endMove:function(){this.unlock();this.moveComplete=true;this.fireEvents();},fireEvents:function(C){var B=this.thumb;if(!C){B.cachePosition();}if(!this.isLocked()){if(B._isRegion){var E=B.getXValue();var D=B.getYValue();if(E!=this.previousX||D!=this.previousY){if(!this._silent){this.on!
 Change(E,D);this.fireEvent("change",{x:E,y:D});}}this.previous!
 X=E;this
.previousY=D;}else{var A=B.getValue();if(A!=this.previousVal){if(!this._silent){this.onChange(A);this.fireEvent("change",A);}}this.previousVal=A;}this._slideEnd();}},toString:function(){return("Slider ("+this.type+") "+this.id);}});YAHOO.augment(YAHOO.widget.Slider,YAHOO.util.EventProvider);YAHOO.widget.SliderThumb=function(G,B,E,D,A,F,C){if(G){YAHOO.widget.SliderThumb.superclass.constructor.call(this,G,B);this.parentElId=B;}this.isTarget=false;this.tickSize=C;this.maintainOffset=true;this.initSlider(E,D,A,F,C);this.scroll=false;};YAHOO.extend(YAHOO.widget.SliderThumb,YAHOO.util.DD,{startOffset:null,_isHoriz:false,_prevVal:0,_graduated:false,getOffsetFromParent0:function(C){var A=YAHOO.util.Dom.getXY(this.getEl());var B=C||YAHOO.util.Dom.getXY(this.parentElId);return[(A[0]-B[0]),(A[1]-B[1])];},getOffsetFromParent:function(H){var A=this.getEl(),E;if(!this.deltaOffset){var I=YAHOO.util.Dom.getXY(A);var F=H||YAHOO.util.Dom.getXY(this.parentElId);E=[(I[0]-F[0]),(I[1]-F[1])];var !
 B=parseInt(YAHOO.util.Dom.getStyle(A,"left"),10);var K=parseInt(YAHOO.util.Dom.getStyle(A,"top"),10);var D=B-E[0];var C=K-E[1];if(isNaN(D)||isNaN(C)){}else{this.deltaOffset=[D,C];}}else{var J=parseInt(YAHOO.util.Dom.getStyle(A,"left"),10);var G=parseInt(YAHOO.util.Dom.getStyle(A,"top"),10);E=[J+this.deltaOffset[0],G+this.deltaOffset[1]];}return E;},initSlider:function(D,C,A,E,B){this.initLeft=D;this.initRight=C;this.initUp=A;this.initDown=E;this.setXConstraint(D,C,B);this.setYConstraint(A,E,B);if(B&&B>1){this._graduated=true;}this._isHoriz=(D||C);this._isVert=(A||E);this._isRegion=(this._isHoriz&&this._isVert);},clearTicks:function(){YAHOO.widget.SliderThumb.superclass.clearTicks.call(this);this.tickSize=0;this._graduated=false;},getValue:function(){return(this._isHoriz)?this.getXValue():this.getYValue();},getXValue:function(){if(!this.available){return 0;}var A=this.getOffsetFromParent();if(YAHOO.lang.isNumber(A[0])){this.lastOffset=A;return(A[0]-this.startOffset[0]);}else!
 {return(this.lastOffset[0]-this.startOffset[0]);}},getYValue:f!
 unction(
){if(!this.available){return 0;}var A=this.getOffsetFromParent();if(YAHOO.lang.isNumber(A[1])){this.lastOffset=A;return(A[1]-this.startOffset[1]);}else{return(this.lastOffset[1]-this.startOffset[1]);}},toString:function(){return"SliderThumb "+this.id;},onChange:function(A,B){}});YAHOO.register("slider",YAHOO.widget.Slider,{version:"2.3.1",build:"541"});
\ No newline at end of file
+YAHOO.widget.Slider=function(B,r,D,I){YAHOO.widget.Slider.ANIM_AVAIL=(!YAHOO.lang.isUndefined(YAHOO.util.Anim));if(B){this.init(B,r,true);this.initSlider(I);this.initThumb(D);}};YAHOO.widget.Slider.getHorizSlider=function(D,B,X,I,r){return new YAHOO.widget.Slider(D,D,new YAHOO.widget.SliderThumb(B,D,X,I,0,0,r),"horiz");};YAHOO.widget.Slider.getVertSlider=function(B,I,r,X,D){return new YAHOO.widget.Slider(B,B,new YAHOO.widget.SliderThumb(I,B,0,0,r,X,D),"vert");};YAHOO.widget.Slider.getSliderRegion=function(B,I,g,X,r,Y,D){return new YAHOO.widget.Slider(B,B,new YAHOO.widget.SliderThumb(I,B,g,X,r,Y,D),"region");};YAHOO.widget.Slider.ANIM_AVAIL=false;YAHOO.extend(YAHOO.widget.Slider,YAHOO.util.DragDrop,{initSlider:function(r){this.type=r;this.createEvent("change",this);this.createEvent("slideStart",this);this.createEvent("slideEnd",this);this.isTarget=false;this.animate=YAHOO.widget.Slider.ANIM_AVAIL;this.backgroundEnabled=true;this.tickPause=40;this.enableKeys=true;this.keyIncr!
 ement=20;this.moveComplete=true;this.animationDuration=0.2;this.SOURCE_UI_EVENT=1;this.SOURCE_SET_VALUE=2;this.valueChangeSource=0;this._silent=false;this.lastOffset=[0,0];},initThumb:function(D){var r=this;this.thumb=D;D.cacheBetweenDrags=true;if(D._isHoriz&&D.xTicks&&D.xTicks.length){this.tickPause=Math.round(360/D.xTicks.length);}else{if(D.yTicks&&D.yTicks.length){this.tickPause=Math.round(360/D.yTicks.length);}}D.onAvailable=function(){return r.setStartSliderState();};D.onMouseDown=function(){return r.focus();};D.startDrag=function(){r._slideStart();};D.onDrag=function(){r.fireEvents(true);};D.onMouseUp=function(){r.thumbMouseUp();};},onAvailable:function(){var r=YAHOO.util.Event;r.on(this.id,"keydown",this.handleKeyDown,this,true);r.on(this.id,"keypress",this.handleKeyPress,this,true);},handleKeyPress:function(B){if(this.enableKeys){var r=YAHOO.util.Event;var D=r.getCharCode(B);switch(D){case 37:case 38:case 39:case 40:case 36:case 35:r.preventDefault(B);break;default:!
 }}},handleKeyDown:function(X){if(this.enableKeys){var Y=YAHOO.!
 util.Eve
nt;var B=Y.getCharCode(X),n=this.thumb;var D=this.getXValue(),g=this.getYValue();var R=false;var I=true;switch(B){case 37:D-=this.keyIncrement;break;case 38:g-=this.keyIncrement;break;case 39:D+=this.keyIncrement;break;case 40:g+=this.keyIncrement;break;case 36:D=n.leftConstraint;g=n.topConstraint;break;case 35:D=n.rightConstraint;g=n.bottomConstraint;break;default:I=false;}if(I){if(n._isRegion){this.setRegionValue(D,g,true);}else{var r=(n._isHoriz)?D:g;this.setValue(r,true);}Y.stopEvent(X);}}},setStartSliderState:function(){this.setThumbCenterPoint();this.baselinePos=YAHOO.util.Dom.getXY(this.getEl());this.thumb.startOffset=this.thumb.getOffsetFromParent(this.baselinePos);if(this.thumb._isRegion){if(this.deferredSetRegionValue){this.setRegionValue.apply(this,this.deferredSetRegionValue,true);this.deferredSetRegionValue=null;}else{this.setRegionValue(0,0,true,true,true);}}else{if(this.deferredSetValue){this.setValue.apply(this,this.deferredSetValue,true);this.deferredSetValu!
 e=null;}else{this.setValue(0,true,true,true);}}},setThumbCenterPoint:function(){var r=this.thumb.getEl();if(r){this.thumbCenterPoint={x:parseInt(r.offsetWidth/2,10),y:parseInt(r.offsetHeight/2,10)};}},lock:function(){this.thumb.lock();this.locked=true;},unlock:function(){this.thumb.unlock();this.locked=false;},thumbMouseUp:function(){if(!this.isLocked()&&!this.moveComplete){this.endMove();}},onMouseUp:function(){if(!this.isLocked()&&!this.moveComplete){this.endMove();}},getThumb:function(){return this.thumb;},focus:function(){this.valueChangeSource=this.SOURCE_UI_EVENT;var r=this.getEl();if(r.focus){try{r.focus();}catch(D){}}this.verifyOffset();if(this.isLocked()){return false;}else{this._slideStart();return true;}},onChange:function(r,D){},onSlideStart:function(){},onSlideEnd:function(){},getValue:function(){return this.thumb.getValue();},getXValue:function(){return this.thumb.getXValue();},getYValue:function(){return this.thumb.getYValue();},handleThumbChange:function(){}!
 ,setValue:function(Y,B,I,r){this._silent=r;this.valueChangeSou!
 rce=this
.SOURCE_SET_VALUE;if(!this.thumb.available){this.deferredSetValue=arguments;return false;}if(this.isLocked()&&!I){return false;}if(isNaN(Y)){return false;}var D=this.thumb;D.lastOffset=[Y,Y];var g,X;this.verifyOffset(true);if(D._isRegion){return false;}else{if(D._isHoriz){this._slideStart();g=D.initPageX+Y+this.thumbCenterPoint.x;this.moveThumb(g,D.initPageY,B);}else{this._slideStart();X=D.initPageY+Y+this.thumbCenterPoint.y;this.moveThumb(D.initPageX,X,B);}}return true;},setRegionValue:function(R,r,I,X,D){this._silent=D;this.valueChangeSource=this.SOURCE_SET_VALUE;if(!this.thumb.available){this.deferredSetRegionValue=arguments;return false;}if(this.isLocked()&&!X){return false;}if(isNaN(R)){return false;}var B=this.thumb;B.lastOffset=[R,r];this.verifyOffset(true);if(B._isRegion){this._slideStart();var Y=B.initPageX+R+this.thumbCenterPoint.x;var g=B.initPageY+r+this.thumbCenterPoint.y;this.moveThumb(Y,g,I);return true;}return false;},verifyOffset:function(D){var r=YAHOO.util!
 .Dom.getXY(this.getEl());if(r){if(r[0]!=this.baselinePos[0]||r[1]!=this.baselinePos[1]){this.thumb.resetConstraints();this.baselinePos=r;return false;}}return true;},moveThumb:function(Y,g,X,I){var R=this.thumb;var n=this;if(!R.available){return ;}R.setDelta(this.thumbCenterPoint.x,this.thumbCenterPoint.y);var D=R.getTargetCoord(Y,g);var B=[D.x,D.y];this._slideStart();if(this.animate&&YAHOO.widget.Slider.ANIM_AVAIL&&R._graduated&&!X){this.lock();this.curCoord=YAHOO.util.Dom.getXY(this.thumb.getEl());setTimeout(function(){n.moveOneTick(B);},this.tickPause);}else{if(this.animate&&YAHOO.widget.Slider.ANIM_AVAIL&&!X){this.lock();var r=new YAHOO.util.Motion(R.id,{points:{to:B}},this.animationDuration,YAHOO.util.Easing.easeOut);r.onComplete.subscribe(function(){n.endMove();});r.animate();}else{R.setDragElPos(Y,g);if(!I){this.endMove();}}}},_slideStart:function(){if(!this._sliding){if(!this._silent){this.onSlideStart();this.fireEvent("slideStart");}this._sliding=true;}},_slideEnd:!
 function(){if(this._sliding&&this.moveComplete){if(!this._sile!
 nt){this
.onSlideEnd();this.fireEvent("slideEnd");}this._sliding=false;this._silent=false;this.moveComplete=false;}},moveOneTick:function(D){var X=this.thumb,I;var g=null;if(X._isRegion){g=this._getNextX(this.curCoord,D);var r=(g)?g[0]:this.curCoord[0];g=this._getNextY([r,this.curCoord[1]],D);}else{if(X._isHoriz){g=this._getNextX(this.curCoord,D);}else{g=this._getNextY(this.curCoord,D);}}if(g){this.curCoord=g;this.thumb.alignElWithMouse(X.getEl(),g[0],g[1]);if(!(g[0]==D[0]&&g[1]==D[1])){var B=this;setTimeout(function(){B.moveOneTick(D);},this.tickPause);}else{this.endMove();}}else{this.endMove();}},_getNextX:function(r,D){var I=this.thumb;var g;var B=[];var X=null;if(r[0]>D[0]){g=I.tickSize-this.thumbCenterPoint.x;B=I.getTargetCoord(r[0]-g,r[1]);X=[B.x,B.y];}else{if(r[0]<D[0]){g=I.tickSize+this.thumbCenterPoint.x;B=I.getTargetCoord(r[0]+g,r[1]);X=[B.x,B.y];}else{}}return X;},_getNextY:function(r,D){var I=this.thumb;var g;var B=[];var X=null;if(r[1]>D[1]){g=I.tickSize-this.thumbCenter!
 Point.y;B=I.getTargetCoord(r[0],r[1]-g);X=[B.x,B.y];}else{if(r[1]<D[1]){g=I.tickSize+this.thumbCenterPoint.y;B=I.getTargetCoord(r[0],r[1]+g);X=[B.x,B.y];}else{}}return X;},b4MouseDown:function(r){this.thumb.autoOffset();this.thumb.resetConstraints();},onMouseDown:function(D){if(!this.isLocked()&&this.backgroundEnabled){var r=YAHOO.util.Event.getPageX(D);var B=YAHOO.util.Event.getPageY(D);this.focus();this.moveThumb(r,B);}},onDrag:function(D){if(!this.isLocked()){var r=YAHOO.util.Event.getPageX(D);var B=YAHOO.util.Event.getPageY(D);this.moveThumb(r,B,true,true);}},endMove:function(){this.unlock();this.moveComplete=true;this.fireEvents();},fireEvents:function(B){var D=this.thumb;if(!B){D.cachePosition();}if(!this.isLocked()){if(D._isRegion){var X=D.getXValue();var I=D.getYValue();if(X!=this.previousX||I!=this.previousY){if(!this._silent){this.onChange(X,I);this.fireEvent("change",{x:X,y:I});}}this.previousX=X;this.previousY=I;}else{var r=D.getValue();if(r!=this.previousVal){i!
 f(!this._silent){this.onChange(r);this.fireEvent("change",r);}!
 }this.pr
eviousVal=r;}this._slideEnd();}},toString:function(){return ("Slider ("+this.type+") "+this.id);}});YAHOO.augment(YAHOO.widget.Slider,YAHOO.util.EventProvider);YAHOO.widget.SliderThumb=function(Y,D,X,I,r,g,B){if(Y){YAHOO.widget.SliderThumb.superclass.constructor.call(this,Y,D);this.parentElId=D;}this.isTarget=false;this.tickSize=B;this.maintainOffset=true;this.initSlider(X,I,r,g,B);this.scroll=false;};YAHOO.extend(YAHOO.widget.SliderThumb,YAHOO.util.DD,{startOffset:null,_isHoriz:false,_prevVal:0,_graduated:false,getOffsetFromParent0:function(B){var r=YAHOO.util.Dom.getXY(this.getEl());var D=B||YAHOO.util.Dom.getXY(this.parentElId);return [(r[0]-D[0]),(r[1]-D[1])];},getOffsetFromParent:function(R){var r=this.getEl(),X;if(!this.deltaOffset){var n=YAHOO.util.Dom.getXY(r);var g=R||YAHOO.util.Dom.getXY(this.parentElId);X=[(n[0]-g[0]),(n[1]-g[1])];var D=parseInt(YAHOO.util.Dom.getStyle(r,"left"),10);var e=parseInt(YAHOO.util.Dom.getStyle(r,"top"),10);var I=D-X[0];var B=e-X[1];if(i!
 sNaN(I)||isNaN(B)){}else{this.deltaOffset=[I,B];}}else{var s=parseInt(YAHOO.util.Dom.getStyle(r,"left"),10);var Y=parseInt(YAHOO.util.Dom.getStyle(r,"top"),10);X=[s+this.deltaOffset[0],Y+this.deltaOffset[1]];}return X;},initSlider:function(I,B,r,X,D){this.initLeft=I;this.initRight=B;this.initUp=r;this.initDown=X;this.setXConstraint(I,B,D);this.setYConstraint(r,X,D);if(D&&D>1){this._graduated=true;}this._isHoriz=(I||B);this._isVert=(r||X);this._isRegion=(this._isHoriz&&this._isVert);},clearTicks:function(){YAHOO.widget.SliderThumb.superclass.clearTicks.call(this);this.tickSize=0;this._graduated=false;},getValue:function(){return (this._isHoriz)?this.getXValue():this.getYValue();},getXValue:function(){if(!this.available){return 0;}var r=this.getOffsetFromParent();if(YAHOO.lang.isNumber(r[0])){this.lastOffset=r;return (r[0]-this.startOffset[0]);}else{return (this.lastOffset[0]-this.startOffset[0]);}},getYValue:function(){if(!this.available){return 0;}var r=this.getOffsetFromPa!
 rent();if(YAHOO.lang.isNumber(r[1])){this.lastOffset=r;return !
 (r[1]-th
is.startOffset[1]);}else{return (this.lastOffset[1]-this.startOffset[1]);}},toString:function(){return "SliderThumb "+this.id;},onChange:function(r,D){}});YAHOO.register("slider",YAHOO.widget.Slider,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/slider/slider.js
===================================================================
--- trunk/root/static/yui/slider/slider.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/slider/slider.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * The Slider component is a UI control that enables the user to adjust 
@@ -1347,4 +1347,4 @@
 
 });
 
-YAHOO.register("slider", YAHOO.widget.Slider, {version: "2.3.1", build: "541"});
+YAHOO.register("slider", YAHOO.widget.Slider, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/tabview/README
===================================================================
--- trunk/root/static/yui/tabview/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/tabview/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,11 @@
 TabView Release Notes
 
+*** version 2.4.1 ***
+* no change
+
+*** version 2.4.0 ***
+* no change
+
 *** version 2.3.1 ***
 * removed Xoutline from tabview-core.css
 
@@ -15,27 +21,21 @@
 
 
 *** version 2.2.1 ***
-
 * no change
 
 *** version 2.2.0 ***
-
 * Element broken out into seperate pkg
   NOTE: new dependency required - element-beta.js
 
 *** version 0.12.2 ***
-
 * var Tab is now private
 * fixed Element.configureAttribute
 
 *** version 0.12.1 ***
-
 * tabs.css renamed to tabview.css
 * calls to "set" now queued so they can be made before "contentReady"
 
 
 *** version 0.12.0 ***
-
 * TabView widget introduced
-
 * Note: border_tabs.css included as basic skin to enable "tabs" look

Modified: trunk/root/static/yui/tabview/assets/border_tabs.css
===================================================================
--- trunk/root/static/yui/tabview/assets/border_tabs.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/tabview/assets/border_tabs.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 .yui-navset .yui-nav li a, .yui-navset .yui-content {
     border:1px solid #000;  /* label and content borders */

Modified: trunk/root/static/yui/tabview/assets/skin-sam.css
===================================================================
--- trunk/root/static/yui/tabview/assets/skin-sam.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/tabview/assets/skin-sam.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 .yui-navset .yui-nav li {
     margin-right:0.16em; /* space between tabs */

Modified: trunk/root/static/yui/tabview/assets/skins/sam/tabview-skin.css
===================================================================
--- trunk/root/static/yui/tabview/assets/skins/sam/tabview-skin.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/tabview/assets/skins/sam/tabview-skin.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* .yui-navset defaults to .yui-navset-top */
 .yui-skin-sam .yui-navset .yui-nav,

Modified: trunk/root/static/yui/tabview/assets/skins/sam/tabview.css
===================================================================
--- trunk/root/static/yui/tabview/assets/skins/sam/tabview.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/tabview/assets/skins/sam/tabview.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 .yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{margin:0 0.5em 0 0;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{margin:0 0 0.5em;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{width:6em;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{width:auto;}.yui-navset .yui-navset-left,.yui-navset-left{padding:0 0 0 6em;}.yui-navset-right{padding:0 6em 0 0;}.yui-navset-top,.yui-navset-bottom{padding:auto;}.yui-nav,.yui-nav li{margin:0;padding:0;list-style:none;}.yui-navset li em{font-style:normal;}.yui-navset{position:relative;zoom:1;}.yui-navset .yui-content{zoom:1;}.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{display:inline-block;display:-moz-inline-stack;*display:inline;vertical-align:bottom;cursor:pointer;zoom:1;}.yui-navset-left .yui-nav li,.yui-navset-right !
 .yui-nav li{display:block;}.yui-navset .yui-nav a{position:relative;}.yui-navset .yui-nav li a,.yui-navset-top .yui-nav li a,.yui-navset-bottom .yui-nav li a{display:block;display:inline-block;vertical-align:bottom;zoom:1;}.yui-navset-left .yui-nav li a,.yui-navset-right .yui-nav li a{display:block;}.yui-navset-bottom .yui-nav li a{vertical-align:text-top;}.yui-navset .yui-nav li a em,.yui-navset-top .yui-nav li a em,.yui-navset-bottom .yui-nav li a em{display:block;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{position:absolute;z-index:1;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{position:static;}.yui-navset .yui-navset-left .yui-nav,.yui-navset-left .yui-nav{left:0;right:auto;}.yui-navset .yui-navset-right .yui-nav,.yui-navset-right .yui-nav{right:0;left:auto;}.yui-skin-sam .yui-navset .yui-nav,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav{border:solid #2647a0;border-width!
 :0 0 5px;Xposition:relative;zoom:1;}.yui-skin-sam .yui-navset !
 .yui-nav
 li,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav li{margin:0 0.16em 0 0;padding:1px 0 0;zoom:1;}.yui-skin-sam .yui-navset .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav .selected{margin:0 0.16em -1px 0;}.yui-skin-sam .yui-navset .yui-nav a,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a{background:#d8d8d8 url(../../../../assets/skins/sam/sprite.png) repeat-x;border:solid #a3a3a3;border-width:0 1px;color:#000;position:relative;text-decoration:none;}.yui-skin-sam .yui-navset .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a em{border:solid #a3a3a3;border-width:1px 0 0;cursor:hand;padding:0.25em .75em;left:0;right:0;bottom:0;top:-1px;position:relative;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a:focus,.yui-skin-sam .yui-navset .yui-nav .selected a:hover{background:#2647a0 url(../../../../assets/skins/sam/sprite.png) repeat-x left -1400px;color:#fff;}.yui-skin-sam .yui-navset .yu!
 i-nav a:hover,.yui-skin-sam .yui-navset .yui-nav a:focus{background:#bfdaff url(../../../../assets/skins/sam/sprite.png) repeat-x left -1300px;outline:0;}.yui-skin-sam .yui-navset .yui-nav .selected a em{padding:0.35em 0.75em;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a em{border-color:#243356;}.yui-skin-sam .yui-navset .yui-content{background:#edf5ff;}.yui-skin-sam .yui-navset .yui-content,.yui-skin-sam .yui-navset .yui-navset-top .yui-content{border:1px solid #808080;border-top-color:#243356;padding:0.25em 0.5em;}.yui-skin-sam .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 5px 0 0;Xposition:absolute;top:0;bottom:0;}.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 0 0 5px;}.yui-skin-sam .yui-navset-left .yui-nav li,.yui-skin-sa!
 m .yui-navset .yui-navset-left .yui-nav li,.yui-skin-sam .yui-!
 navset-r
ight .yui-nav li{margin:0 0 0.16em;padding:0 0 0 1px;}.yui-skin-sam .yui-navset-right .yui-nav li{padding:0 1px 0 0;}.yui-skin-sam .yui-navset-left .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav .selected{margin:0 -1px 0.16em 0;}.yui-skin-sam .yui-navset-right .yui-nav .selected{margin:0 0 0.16em -1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav a{border-width:1px 0;}.yui-skin-sam .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 0 0 1px;padding:0.2em .75em;top:auto;left:-1px;}.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 1px 0 0;left:auto;right:-1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-left .yui-nav .selected a,.yui-skin-sam .yui-navset-left .yui-nav a:hover,.yui-skin-sam .yui-navset-right .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav .selected a,.yui-skin-sam .y!
 ui-navset-right .yui-nav a:hover,.yui-skin-sam .yui-navset-bottom .yui-nav a,.yui-skin-sam .yui-navset-bottom .yui-nav .selected a,.yui-skin-sam .yui-navset-bottom .yui-nav a:hover{background-image:none;}.yui-skin-sam .yui-navset-left .yui-content{border:1px solid #808080;border-left-color:#243356;}.yui-skin-sam .yui-navset-bottom .yui-nav,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav{border-width:5px 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav .selected,.yui-skin-sam .yui-navset-bottom .yui-nav .selected{margin:-1px 0.16em 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li,.yui-skin-sam .yui-navset-bottom .yui-nav li{padding:0 0 1px 0;vertical-align:top;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li a,.yui-skin-sam .yui-navset-bottom .yui-nav li a{}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav a em,.yui-skin-sam .yui-navset-bottom .yui-nav a em{border-width:0 0 1px;top:auto;bottom:-1px;}.yui-skin-sam .yui-navset-bottom .!
 yui-content,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-!
 content{
border:1px solid #808080;border-bottom-color:#243356;}

Modified: trunk/root/static/yui/tabview/assets/tabview-core.css
===================================================================
--- trunk/root/static/yui/tabview/assets/tabview-core.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/tabview/assets/tabview-core.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* default space between tabs */
 .yui-navset .yui-nav li,

Modified: trunk/root/static/yui/tabview/assets/tabview.css
===================================================================
--- trunk/root/static/yui/tabview/assets/tabview.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/tabview/assets/tabview.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* default space between tabs */
 .yui-navset .yui-nav li {

Modified: trunk/root/static/yui/tabview/tabview-debug.js
===================================================================
--- trunk/root/static/yui/tabview/tabview-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/tabview/tabview-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 (function() {
 
@@ -368,6 +368,7 @@
             }
         });
 
+        YAHOO.log('attributes initialized', 'info', 'TabView');
         if ( this._tabParent ) {
             _initTabs.call(this);
         }
@@ -424,6 +425,7 @@
             el.className = this.CLASSNAME;
         }
         
+        YAHOO.log('TabView Dom created', 'info', 'TabView');
         return el;
     };
     
@@ -495,8 +497,6 @@
                 this.set('content', o.responseText);
             },
             failure: function(o) {
-                YAHOO.log('loading failed: ' + o.statusText,
-                        'error', 'Tab');
             }
         };
         
@@ -794,6 +794,7 @@
             },
             validator: YAHOO.lang.isBoolean
         });
+        YAHOO.log('attributes initialized', 'info', 'Tab');
     };
     
     var _createTabElement = function(attr) {
@@ -817,6 +818,7 @@
         
         a.appendChild(labelEl);
         
+        YAHOO.log('creating Tab Dom', 'info', 'Tab');
         return el;
     };
     
@@ -859,6 +861,7 @@
             this.get('dataSrc'), 
             {
                 success: function(o) {
+                    YAHOO.log('content loaded successfully', 'info', 'Tab');
                     this.loadHandler.success.call(this, o);
                     this.set('dataLoaded', true);
                     this.dataConnection = null;
@@ -867,6 +870,7 @@
                     this._loading = false;
                 },
                 failure: function(o) {
+                    YAHOO.log('loading failed: ' + o.statusText, 'error', 'Tab');
                     this.loadHandler.failure.call(this, o);
                     this.dataConnection = null;
                     Dom.removeClass(this.get('contentEl').parentNode,
@@ -882,4 +886,4 @@
     YAHOO.widget.Tab = Tab;
 })();
 
-YAHOO.register("tabview", YAHOO.widget.TabView, {version: "2.3.1", build: "541"});
+YAHOO.register("tabview", YAHOO.widget.TabView, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/tabview/tabview-min.js
===================================================================
--- trunk/root/static/yui/tabview/tabview-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/tabview/tabview-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 (function(){YAHOO.widget.TabView=function(K,J){J=J||{};if(arguments.length==1&&!YAHOO.lang.isString(K)&&!K.nodeName){J=K;K=J.element||null;}if(!K&&!J.element){K=I.call(this,J);}YAHOO.widget.TabView.superclass.constructor.call(this,K,J);};YAHOO.extend(YAHOO.widget.TabView,YAHOO.util.Element);var F=YAHOO.widget.TabView.prototype;var E=YAHOO.util.Dom;var H=YAHOO.util.Event;var D=YAHOO.widget.Tab;F.CLASSNAME="yui-navset";F.TAB_PARENT_CLASSNAME="yui-nav";F.CONTENT_PARENT_CLASSNAME="yui-content";F._tabParent=null;F._contentParent=null;F.addTab=function(M,O){var P=this.get("tabs");if(!P){this._queue[this._queue.length]=["addTab",arguments];return false;}O=(O===undefined)?P.length:O;var R=this.getTab(O);var T=this;var L=this.get("element");var S=this._tabParent;var Q=this._contentParent;var J=M.get("element");var K=M.get("contentEl");if(R){S.insertBefore(J,R.get("element"));}else{S.appendChild(J);}if(K&&!E.isAncestor(Q,K)){Q.appendChild(K);}if(!M.get("active")){M.set("contentVisibl!
 e",false,true);}else{this.set("activeTab",M,true);}var N=function(V){YAHOO.util.Event.preventDefault(V);var U=false;if(this==T.get("activeTab")){U=true;}T.set("activeTab",this,U);};M.addListener(M.get("activationEvent"),N);M.addListener("activationEventChange",function(U){if(U.prevValue!=U.newValue){M.removeListener(U.prevValue,N);M.addListener(U.newValue,N);}});P.splice(O,0,M);};F.DOMEventHandler=function(P){var K=this.get("element");var Q=YAHOO.util.Event.getTarget(P);var S=this._tabParent;if(E.isAncestor(S,Q)){var L;var M=null;var J;var R=this.get("tabs");for(var N=0,O=R.length;N<O;N++){L=R[N].get("element");J=R[N].get("contentEl");if(Q==L||E.isAncestor(L,Q)){M=R[N];break;}}if(M){M.fireEvent(P.type,P);}}};F.getTab=function(J){return this.get("tabs")[J];};F.getTabIndex=function(N){var K=null;var M=this.get("tabs");for(var L=0,J=M.length;L<J;++L){if(N==M[L]){K=L;break;}}return K;};F.removeTab=function(M){var L=this.get("tabs").length;var K=this.getTabIndex(M);var J=K+1;if(!
 M==this.get("activeTab")){if(L>1){if(K+1==L){this.set("activeI!
 ndex",K-
1);}else{this.set("activeIndex",K+1);}}}this._tabParent.removeChild(M.get("element"));this._contentParent.removeChild(M.get("contentEl"));this._configs.tabs.value.splice(K,1);};F.toString=function(){var J=this.get("id")||this.get("tagName");return"TabView "+J;};F.contentTransition=function(K,J){K.set("contentVisible",true);J.set("contentVisible",false);};F.initAttributes=function(J){YAHOO.widget.TabView.superclass.initAttributes.call(this,J);if(!J.orientation){J.orientation="top";}var L=this.get("element");if(!YAHOO.util.Dom.hasClass(L,this.CLASSNAME)){YAHOO.util.Dom.addClass(L,this.CLASSNAME);}this.setAttributeConfig("tabs",{value:[],readOnly:true});this._tabParent=this.getElementsByClassName(this.TAB_PARENT_CLASSNAME,"ul")[0]||G.call(this);this._contentParent=this.getElementsByClassName(this.CONTENT_PARENT_CLASSNAME,"div")[0]||C.call(this);this.setAttributeConfig("orientation",{value:J.orientation,method:function(M){var N=this.get("orientation");this.addClass("yui-navset-"!
 +M);if(N!=M){this.removeClass("yui-navset-"+N);}switch(M){case"bottom":this.appendChild(this._tabParent);break;}}});this.setAttributeConfig("activeIndex",{value:J.activeIndex,method:function(M){this.set("activeTab",this.getTab(M));},validator:function(M){return !this.getTab(M).get("disabled");}});this.setAttributeConfig("activeTab",{value:J.activeTab,method:function(N){var M=this.get("activeTab");if(N){N.set("active",true);this._configs["activeIndex"].value=this.getTabIndex(N);}if(M&&M!=N){M.set("active",false);}if(M&&N!=M){this.contentTransition(N,M);}else{if(N){N.set("contentVisible",true);}}},validator:function(M){return !M.get("disabled");}});if(this._tabParent){B.call(this);}this.DOM_EVENTS.submit=false;this.DOM_EVENTS.focus=false;this.DOM_EVENTS.blur=false;for(var K in this.DOM_EVENTS){if(YAHOO.lang.hasOwnProperty(this.DOM_EVENTS,K)){this.addListener.call(this,K,this.DOMEventHandler);}}};var B=function(){var Q,L,P;var O=this.get("element");var N=A(this._tabParent);var!
  K=A(this._contentParent);for(var M=0,J=N.length;M<J;++M){L={}!
 ;if(K[M]
){L.contentEl=K[M];}Q=new YAHOO.widget.Tab(N[M],L);this.addTab(Q);if(Q.hasClass(Q.ACTIVE_CLASSNAME)){this._configs.activeTab.value=Q;this._configs.activeIndex.value=this.getTabIndex(Q);}}};var I=function(J){var K=document.createElement("div");if(this.CLASSNAME){K.className=this.CLASSNAME;}return K;};var G=function(J){var K=document.createElement("ul");if(this.TAB_PARENT_CLASSNAME){K.className=this.TAB_PARENT_CLASSNAME;}this.get("element").appendChild(K);return K;};var C=function(J){var K=document.createElement("div");if(this.CONTENT_PARENT_CLASSNAME){K.className=this.CONTENT_PARENT_CLASSNAME;}this.get("element").appendChild(K);return K;};var A=function(M){var K=[];var N=M.childNodes;for(var L=0,J=N.length;L<J;++L){if(N[L].nodeType==1){K[K.length]=N[L];}}return K;};})();(function(){var E=YAHOO.util.Dom,J=YAHOO.util.Event;var B=function(L,K){K=K||{};if(arguments.length==1&&!YAHOO.lang.isString(L)&&!L.nodeName){K=L;L=K.element;}if(!L&&!K.element){L=H.call(this,K);}this.loadHand!
 ler={success:function(M){this.set("content",M.responseText);},failure:function(M){}};B.superclass.constructor.call(this,L,K);this.DOM_EVENTS={};};YAHOO.extend(B,YAHOO.util.Element);var F=B.prototype;F.LABEL_TAGNAME="em";F.ACTIVE_CLASSNAME="selected";F.DISABLED_CLASSNAME="disabled";F.LOADING_CLASSNAME="loading";F.dataConnection=null;F.loadHandler=null;F._loading=false;F.toString=function(){var K=this.get("element");var L=K.id||K.tagName;return"Tab "+L;};F.initAttributes=function(K){K=K||{};B.superclass.initAttributes.call(this,K);var M=this.get("element");this.setAttributeConfig("activationEvent",{value:K.activationEvent||"click"});this.setAttributeConfig("labelEl",{value:K.labelEl||G.call(this),method:function(N){var O=this.get("labelEl");if(O){if(O==N){return false;}this.replaceChild(N,O);}else{if(M.firstChild){this.insertBefore(N,M.firstChild);}else{this.appendChild(N);}}}});this.setAttributeConfig("label",{value:K.label||D.call(this),method:function(O){var N=this.get("la!
 belEl");
-if(!N){this.set("labelEl",I.call(this));}C.call(this,O);}});this.setAttributeConfig("contentEl",{value:K.contentEl||document.createElement("div"),method:function(N){var O=this.get("contentEl");if(O){if(O==N){return false;}this.replaceChild(N,O);}}});this.setAttributeConfig("content",{value:K.content,method:function(N){this.get("contentEl").innerHTML=N;}});var L=false;this.setAttributeConfig("dataSrc",{value:K.dataSrc});this.setAttributeConfig("cacheData",{value:K.cacheData||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("loadMethod",{value:K.loadMethod||"GET",validator:YAHOO.lang.isString});this.setAttributeConfig("dataLoaded",{value:false,validator:YAHOO.lang.isBoolean,writeOnce:true});this.setAttributeConfig("dataTimeout",{value:K.dataTimeout||null,validator:YAHOO.lang.isNumber});this.setAttributeConfig("active",{value:K.active||this.hasClass(this.ACTIVE_CLASSNAME),method:function(N){if(N===true){this.addClass(this.ACTIVE_CLASSNAME);this.set("title","activ!
 e");}else{this.removeClass(this.ACTIVE_CLASSNAME);this.set("title","");}},validator:function(N){return YAHOO.lang.isBoolean(N)&&!this.get("disabled");}});this.setAttributeConfig("disabled",{value:K.disabled||this.hasClass(this.DISABLED_CLASSNAME),method:function(N){if(N===true){E.addClass(this.get("element"),this.DISABLED_CLASSNAME);}else{E.removeClass(this.get("element"),this.DISABLED_CLASSNAME);}},validator:YAHOO.lang.isBoolean});this.setAttributeConfig("href",{value:K.href||this.getElementsByTagName("a")[0].getAttribute("href",2)||"#",method:function(N){this.getElementsByTagName("a")[0].href=N;},validator:YAHOO.lang.isString});this.setAttributeConfig("contentVisible",{value:K.contentVisible,method:function(N){if(N){this.get("contentEl").style.display="block";if(this.get("dataSrc")){if(!this._loading&&!(this.get("dataLoaded")&&this.get("cacheData"))){A.call(this);}}}else{this.get("contentEl").style.display="none";}},validator:YAHOO.lang.isBoolean});};var H=function(K){var!
  O=document.createElement("li");var L=document.createElement("!
 a");L.hr
ef=K.href||"#";O.appendChild(L);var N=K.label||null;var M=K.labelEl||null;if(M){if(!N){N=D.call(this,M);}}else{M=I.call(this);}L.appendChild(M);return O;};var G=function(){return this.getElementsByTagName(this.LABEL_TAGNAME)[0];};var I=function(){var K=document.createElement(this.LABEL_TAGNAME);return K;};var C=function(K){var L=this.get("labelEl");L.innerHTML=K;};var D=function(){var K,L=this.get("labelEl");if(!L){return undefined;}return L.innerHTML;};var A=function(){if(!YAHOO.util.Connect){return false;}E.addClass(this.get("contentEl").parentNode,this.LOADING_CLASSNAME);this._loading=true;this.dataConnection=YAHOO.util.Connect.asyncRequest(this.get("loadMethod"),this.get("dataSrc"),{success:function(K){this.loadHandler.success.call(this,K);this.set("dataLoaded",true);this.dataConnection=null;E.removeClass(this.get("contentEl").parentNode,this.LOADING_CLASSNAME);this._loading=false;},failure:function(K){this.loadHandler.failure.call(this,K);this.dataConnection=null;E.remo!
 veClass(this.get("contentEl").parentNode,this.LOADING_CLASSNAME);this._loading=false;},scope:this,timeout:this.get("dataTimeout")});};YAHOO.widget.Tab=B;})();YAHOO.register("tabview",YAHOO.widget.TabView,{version:"2.3.1",build:"541"});
\ No newline at end of file
+if(!N){this.set("labelEl",I.call(this));}C.call(this,O);}});this.setAttributeConfig("contentEl",{value:K.contentEl||document.createElement("div"),method:function(N){var O=this.get("contentEl");if(O){if(O==N){return false;}this.replaceChild(N,O);}}});this.setAttributeConfig("content",{value:K.content,method:function(N){this.get("contentEl").innerHTML=N;}});var L=false;this.setAttributeConfig("dataSrc",{value:K.dataSrc});this.setAttributeConfig("cacheData",{value:K.cacheData||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("loadMethod",{value:K.loadMethod||"GET",validator:YAHOO.lang.isString});this.setAttributeConfig("dataLoaded",{value:false,validator:YAHOO.lang.isBoolean,writeOnce:true});this.setAttributeConfig("dataTimeout",{value:K.dataTimeout||null,validator:YAHOO.lang.isNumber});this.setAttributeConfig("active",{value:K.active||this.hasClass(this.ACTIVE_CLASSNAME),method:function(N){if(N===true){this.addClass(this.ACTIVE_CLASSNAME);this.set("title","activ!
 e");}else{this.removeClass(this.ACTIVE_CLASSNAME);this.set("title","");}},validator:function(N){return YAHOO.lang.isBoolean(N)&&!this.get("disabled");}});this.setAttributeConfig("disabled",{value:K.disabled||this.hasClass(this.DISABLED_CLASSNAME),method:function(N){if(N===true){E.addClass(this.get("element"),this.DISABLED_CLASSNAME);}else{E.removeClass(this.get("element"),this.DISABLED_CLASSNAME);}},validator:YAHOO.lang.isBoolean});this.setAttributeConfig("href",{value:K.href||this.getElementsByTagName("a")[0].getAttribute("href",2)||"#",method:function(N){this.getElementsByTagName("a")[0].href=N;},validator:YAHOO.lang.isString});this.setAttributeConfig("contentVisible",{value:K.contentVisible,method:function(N){if(N){this.get("contentEl").style.display="block";if(this.get("dataSrc")){if(!this._loading&&!(this.get("dataLoaded")&&this.get("cacheData"))){A.call(this);}}}else{this.get("contentEl").style.display="none";}},validator:YAHOO.lang.isBoolean});};var H=function(K){var!
  O=document.createElement("li");var L=document.createElement("!
 a");L.hr
ef=K.href||"#";O.appendChild(L);var N=K.label||null;var M=K.labelEl||null;if(M){if(!N){N=D.call(this,M);}}else{M=I.call(this);}L.appendChild(M);return O;};var G=function(){return this.getElementsByTagName(this.LABEL_TAGNAME)[0];};var I=function(){var K=document.createElement(this.LABEL_TAGNAME);return K;};var C=function(K){var L=this.get("labelEl");L.innerHTML=K;};var D=function(){var K,L=this.get("labelEl");if(!L){return undefined;}return L.innerHTML;};var A=function(){if(!YAHOO.util.Connect){return false;}E.addClass(this.get("contentEl").parentNode,this.LOADING_CLASSNAME);this._loading=true;this.dataConnection=YAHOO.util.Connect.asyncRequest(this.get("loadMethod"),this.get("dataSrc"),{success:function(K){this.loadHandler.success.call(this,K);this.set("dataLoaded",true);this.dataConnection=null;E.removeClass(this.get("contentEl").parentNode,this.LOADING_CLASSNAME);this._loading=false;},failure:function(K){this.loadHandler.failure.call(this,K);this.dataConnection=null;E.remo!
 veClass(this.get("contentEl").parentNode,this.LOADING_CLASSNAME);this._loading=false;},scope:this,timeout:this.get("dataTimeout")});};YAHOO.widget.Tab=B;})();YAHOO.register("tabview",YAHOO.widget.TabView,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/tabview/tabview.js
===================================================================
--- trunk/root/static/yui/tabview/tabview.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/tabview/tabview.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 (function() {
 
@@ -878,4 +878,4 @@
     YAHOO.widget.Tab = Tab;
 })();
 
-YAHOO.register("tabview", YAHOO.widget.TabView, {version: "2.3.1", build: "541"});
+YAHOO.register("tabview", YAHOO.widget.TabView, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/treeview/README
===================================================================
--- trunk/root/static/yui/treeview/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/treeview/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,22 @@
 TreeView - Release Notes
 
+2.4.1
+
+No change
+
+2.4.0
+  * added TreeView getNodeByElement, which will return a YAHOO.widget.Node 
+    reference for any ancestor HTML element of a node in the tree.
+  * Added 'title' property to TextNode
+  * Added treeview/tooltip example
+  * Passing a null or invalid animation type to setExpandAnim/setCollapseAnim
+    will turn off animation for the tree.
+  * Spacer style set to 12px width to fix layout inside overflow containers.
+  * Fixed removeAll() when executed on the root node.
+  * TextNode's href property is now escaped.
+  * The 'expanded' property in a node's constructor now works for dynamically
+    loaded nodes.
+
 2.3.1
 
   * The "expand" event no longer fires twice for dynamically loaded nodes.

Modified: trunk/root/static/yui/treeview/assets/skins/sam/treeview-skin.css
===================================================================
--- trunk/root/static/yui/treeview/assets/skins/sam/treeview-skin.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/treeview/assets/skins/sam/treeview-skin.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* first or middle sibling, no children */
 .ygtvtn {
@@ -101,4 +101,4 @@
     background-color: white;
 }
 
-.ygtvspacer { height: 22px; width: 18px; }
+.ygtvspacer { height: 22px; width: 12px; }

Modified: trunk/root/static/yui/treeview/assets/skins/sam/treeview.css
===================================================================
--- trunk/root/static/yui/treeview/assets/skins/sam/treeview.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/treeview/assets/skins/sam/treeview.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat;}.ygtvtmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat;}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat;}.ygtvtph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat;}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0px no-repeat;}.ygtvlmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat;}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -2400px no-repeat;}.ygtvlph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px !
 no-repeat;}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat;}.ygtvdepthcell{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8000px no-repeat;}.ygtvblankdepthcell{width:18px;height:22px;}.ygtvitem{}.ygtvchildren{*zoom:1;}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;}.ygtvspacer{height:22px;width:18px;}
+.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat;}.ygtvtmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat;}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat;}.ygtvtph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat;}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0px no-repeat;}.ygtvlmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat;}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -2400px no-repeat;}.ygtvlph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px !
 no-repeat;}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat;}.ygtvdepthcell{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8000px no-repeat;}.ygtvblankdepthcell{width:18px;height:22px;}.ygtvitem{}.ygtvchildren{*zoom:1;}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;}.ygtvspacer{height:22px;width:12px;}

Modified: trunk/root/static/yui/treeview/assets/treeview-core.css
===================================================================
--- trunk/root/static/yui/treeview/assets/treeview-core.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/treeview/assets/treeview-core.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,5 +2,5 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */

Modified: trunk/root/static/yui/treeview/assets/treeview-menu.css
===================================================================
--- trunk/root/static/yui/treeview/assets/treeview-menu.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/treeview/assets/treeview-menu.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* first or middle sibling, no children */
 .ygtvtn {
@@ -95,4 +95,4 @@
     background-color: white; /* workaround for IE font smoothing bug */
 }
 
-.ygtvspacer { height: 20px; width: 1em; }
+.ygtvspacer { height: 20px; width: 12px; width: 1em; }

Modified: trunk/root/static/yui/treeview/assets/treeview.css
===================================================================
--- trunk/root/static/yui/treeview/assets/treeview.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/treeview/assets/treeview.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /* first or middle sibling, no children */
 .ygtvtn {
@@ -100,4 +100,4 @@
     background-color: white; /* workaround for IE font smoothing bug */
 }
 
-.ygtvspacer { height: 22px; width: 18px; }
+.ygtvspacer { height: 22px; width: 12px; }

Modified: trunk/root/static/yui/treeview/treeview-debug.js
===================================================================
--- trunk/root/static/yui/treeview/treeview-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/treeview/treeview-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * The treeview widget is a generic tree building tool.
@@ -97,9 +97,7 @@
      * in YAHOO.widget.TVAnim)
      */
     setExpandAnim: function(type) {
-        if (YAHOO.widget.TVAnim.isValid(type)) {
-            this._expandAnim = type;
-        }
+        this._expandAnim = (YAHOO.widget.TVAnim.isValid(type)) ? type : null;
     },
 
     /**
@@ -109,9 +107,7 @@
      * YAHOO.widget.TVAnim)
      */
     setCollapseAnim: function(type) {
-        if (YAHOO.widget.TVAnim.isValid(type)) {
-            this._collapseAnim = type;
-        }
+        this._collapseAnim = (YAHOO.widget.TVAnim.isValid(type)) ? type : null;
     },
 
     /**
@@ -428,6 +424,39 @@
     },
 
     /**
+     * Returns the treeview node reference for an anscestor element
+     * of the node, or null if it is not contained within any node
+     * in this tree.
+     * @method getNodeByElement
+     * @param {HTMLElement} the element to test
+     * @return {YAHOO.widget.Node} a node reference or null
+     */
+    getNodeByElement: function(el) {
+
+        var p=el, m, re=/ygtv([^\d]*)(.*)/;
+
+        do {
+
+            if (p && p.id) {
+                m = p.id.match(re);
+                if (m && m[2]) {
+                    return this.getNodeByIndex(m[2]);
+                }
+            }
+
+            p = p.parentNode;
+
+            if (!p || !p.tagName) {
+                break;
+            }
+
+        } 
+        while (p.id !== this.id && p.tagName.toLowerCase() !== "body");
+
+        return null;
+    },
+
+    /**
      * Removes the node and its children, and optionally refreshes the 
      * branch of the tree that was affected.
      * @method removeNode
@@ -487,7 +516,7 @@
             if (this._collapseAnim) {
                 this.subscribe("animComplete", 
                         this._removeChildren_animComplete, this, true);
-                node.collapse();
+                YAHOO.widget.Node.prototype.collapse.call(node);
                 return;
             }
 
@@ -499,6 +528,10 @@
             this._deleteNode(node.children[0]);
         }
 
+        if (node.isRoot()) {
+            YAHOO.widget.Node.prototype.expand.call(node);
+        }
+
         node.childrenRendered = false;
         node.dynamicLoadComplete = false;
 
@@ -1316,7 +1349,9 @@
      */
     expand: function(lazySource) {
         // Only expand if currently collapsed.
-        if (this.expanded) { return; }
+        if (this.expanded && !lazySource) { 
+            return; 
+        }
 
         var ret = true;
 
@@ -1345,11 +1380,11 @@
             return;
         }
 
-        if (! this.childrenRendered) {
+        if (!this.childrenRendered) {
             this.logger.log("children not rendered yet");
             this.getChildrenEl().innerHTML = this.renderChildren();
         } else {
-            this.logger.log("CHILDREN RENDERED");
+            this.logger.log("children already rendered");
         }
 
         this.expanded = true;
@@ -1585,6 +1620,12 @@
         }
         sb[sb.length] = '>';
 
+        // this.logger.log(["index", this.index, 
+                         // "hasChildren", this.hasChildren(true), 
+                         // "expanded", this.expanded, 
+                         // "renderHidden", this.renderHidden, 
+                         // "isDynamic", this.isDynamic()]);
+
         // Don't render the actual child node HTML unless this node is expanded.
         if ( (this.hasChildren(true) && this.expanded) ||
                 (this.renderHidden && !this.isDynamic()) ) {
@@ -1672,7 +1713,7 @@
      * @method loadComplete
      */
     loadComplete: function() {
-        this.logger.log("loadComplete: " + this.index);
+        this.logger.log(this.index + " loadComplete, children: " + this.children.length);
         this.getChildrenEl().innerHTML = this.completeRender();
         this.dynamicLoadComplete = true;
         this.isLoading = false;
@@ -1845,7 +1886,7 @@
         
         // update the link
         if (oData.href) {
-            this.href = oData.href;
+            this.href = encodeURI(oData.href);
         }
 
         // set the target
@@ -1857,6 +1898,10 @@
             this.labelStyle = oData.style;
         }
 
+        if (oData.title) {
+            this.title = oData.title;
+        }
+
         this.labelElId = "ygtvlabelel" + this.index;
     },
 
@@ -1921,6 +1966,9 @@
         sb[sb.length] = ' >';
         sb[sb.length] = '<a';
         sb[sb.length] = ' id="' + this.labelElId + '"';
+        if (this.title) {
+            sb[sb.length] = ' title="' + this.title + '"';
+        }
         sb[sb.length] = ' class="' + this.labelStyle + '"';
         sb[sb.length] = ' href="' + this.href + '"';
         sb[sb.length] = ' target="' + this.target + '"';
@@ -2349,4 +2397,4 @@
     }
 };
 
-YAHOO.register("treeview", YAHOO.widget.TreeView, {version: "2.3.1", build: "541"});
+YAHOO.register("treeview", YAHOO.widget.TreeView, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/treeview/treeview-min.js
===================================================================
--- trunk/root/static/yui/treeview/treeview-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/treeview/treeview-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,8 +2,9 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-YAHOO.widget.TreeView=function(A){if(A){this.init(A);}};YAHOO.widget.TreeView.prototype={id:null,_el:null,_nodes:null,locked:false,_expandAnim:null,_collapseAnim:null,_animCount:0,maxAnim:2,setExpandAnim:function(A){if(YAHOO.widget.TVAnim.isValid(A)){this._expandAnim=A;}},setCollapseAnim:function(A){if(YAHOO.widget.TVAnim.isValid(A)){this._collapseAnim=A;}},animateExpand:function(C,D){if(this._expandAnim&&this._animCount<this.maxAnim){var A=this;var B=YAHOO.widget.TVAnim.getAnim(this._expandAnim,C,function(){A.expandComplete(D);});if(B){++this._animCount;this.fireEvent("animStart",{"node":D,"type":"expand"});B.animate();}return true;}return false;},animateCollapse:function(C,D){if(this._collapseAnim&&this._animCount<this.maxAnim){var A=this;var B=YAHOO.widget.TVAnim.getAnim(this._collapseAnim,C,function(){A.collapseComplete(D);});if(B){++this._animCount;this.fireEvent("animStart",{"node":D,"type":"collapse"});B.animate();}return true;}return false;},expandComplete:function(!
 A){--this._animCount;this.fireEvent("animComplete",{"node":A,"type":"expand"});},collapseComplete:function(A){--this._animCount;this.fireEvent("animComplete",{"node":A,"type":"collapse"});},init:function(B){this.id=B;if("string"!==typeof B){this._el=B;this.id=this.generateId(B);}this.createEvent("animStart",this);this.createEvent("animComplete",this);this.createEvent("collapse",this);this.createEvent("collapseComplete",this);this.createEvent("expand",this);this.createEvent("expandComplete",this);this._nodes=[];YAHOO.widget.TreeView.trees[this.id]=this;this.root=new YAHOO.widget.RootNode(this);var A=YAHOO.widget.LogWriter;},draw:function(){var A=this.root.getHtml();this.getEl().innerHTML=A;this.firstDraw=false;},getEl:function(){if(!this._el){this._el=document.getElementById(this.id);}return this._el;},regNode:function(A){this._nodes[A.index]=A;},getRoot:function(){return this.root;},setDynamicLoad:function(A,B){this.root.setDynamicLoad(A,B);},expandAll:function(){if(!this.l!
 ocked){this.root.expandAll();}},collapseAll:function(){if(!thi!
 s.locked
){this.root.collapseAll();}},getNodeByIndex:function(B){var A=this._nodes[B];return(A)?A:null;},getNodeByProperty:function(C,B){for(var A in this._nodes){var D=this._nodes[A];if(D.data&&B==D.data[C]){return D;}}return null;},getNodesByProperty:function(D,C){var A=[];for(var B in this._nodes){var E=this._nodes[B];if(E.data&&C==E.data[D]){A.push(E);}}return(A.length)?A:null;},removeNode:function(B,A){if(B.isRoot()){return false;}var C=B.parent;if(C.parent){C=C.parent;}this._deleteNode(B);if(A&&C&&C.childrenRendered){C.refresh();}return true;},_removeChildren_animComplete:function(A){this.unsubscribe(this._removeChildren_animComplete);this.removeChildren(A.node);},removeChildren:function(A){if(A.expanded){if(this._collapseAnim){this.subscribe("animComplete",this._removeChildren_animComplete,this,true);A.collapse();return ;}A.collapse();}while(A.children.length){this._deleteNode(A.children[0]);}A.childrenRendered=false;A.dynamicLoadComplete=false;A.updateIcon();},_deleteNode:fun!
 ction(A){this.removeChildren(A);this.popNode(A);},popNode:function(D){var E=D.parent;var B=[];for(var C=0,A=E.children.length;C<A;++C){if(E.children[C]!=D){B[B.length]=E.children[C];}}E.children=B;E.childrenRendered=false;if(D.previousSibling){D.previousSibling.nextSibling=D.nextSibling;}if(D.nextSibling){D.nextSibling.previousSibling=D.previousSibling;}D.parent=null;D.previousSibling=null;D.nextSibling=null;D.tree=null;delete this._nodes[D.index];},toString:function(){return"TreeView "+this.id;},generateId:function(A){var B=A.id;if(!B){B="yui-tv-auto-id-"+YAHOO.widget.TreeView.counter;++YAHOO.widget.TreeView.counter;}return B;},onExpand:function(A){},onCollapse:function(A){}};YAHOO.augment(YAHOO.widget.TreeView,YAHOO.util.EventProvider);YAHOO.widget.TreeView.nodeCount=0;YAHOO.widget.TreeView.trees=[];YAHOO.widget.TreeView.counter=0;YAHOO.widget.TreeView.getTree=function(B){var A=YAHOO.widget.TreeView.trees[B];return(A)?A:null;};YAHOO.widget.TreeView.getNode=function(B,C){v!
 ar A=YAHOO.widget.TreeView.getTree(B);return(A)?A.getNodeByInd!
 ex(C):nu
ll;};YAHOO.widget.TreeView.addHandler=function(B,C,A){if(B.addEventListener){B.addEventListener(C,A,false);}else{if(B.attachEvent){B.attachEvent("on"+C,A);}}};YAHOO.widget.TreeView.removeHandler=function(B,C,A){if(B.removeEventListener){B.removeEventListener(C,A,false);}else{if(B.detachEvent){B.detachEvent("on"+C,A);}}};YAHOO.widget.TreeView.preload=function(F,E){E=E||"ygtv";var C=["tn","tm","tmh","tp","tph","ln","lm","lmh","lp","lph","loading"];var G=[];for(var A=1;A<C.length;A=A+1){G[G.length]="<span class=\""+E+C[A]+"\"> </span>";}var D=document.createElement("div");var B=D.style;B.className=E+C[0];B.position="absolute";B.height="1px";B.width="1px";B.top="-1000px";B.left="-1000px";D.innerHTML=G.join("");document.body.appendChild(D);YAHOO.widget.TreeView.removeHandler(window,"load",YAHOO.widget.TreeView.preload);};YAHOO.widget.TreeView.addHandler(window,"load",YAHOO.widget.TreeView.preload);YAHOO.widget.Node=function(C,B,A){if(C){this.init(C,B,A);}};YAHOO.widget.Node.!
 prototype={index:0,children:null,tree:null,data:null,parent:null,depth:-1,href:null,target:"_self",expanded:false,multiExpand:true,renderHidden:false,childrenRendered:false,dynamicLoadComplete:false,previousSibling:null,nextSibling:null,_dynLoad:false,dataLoader:null,isLoading:false,hasIcon:true,iconMode:0,nowrap:false,_type:"Node",init:function(C,B,A){this.data=C;this.children=[];this.index=YAHOO.widget.TreeView.nodeCount;++YAHOO.widget.TreeView.nodeCount;this.expanded=A;this.createEvent("parentChange",this);if(B){B.appendChild(this);}},applyParent:function(B){if(!B){return false;}this.tree=B.tree;this.parent=B;this.depth=B.depth+1;if(!this.href){this.href="javascript:"+this.getToggleLink();}this.tree.regNode(this);B.childrenRendered=false;for(var C=0,A=this.children.length;C<A;++C){this.children[C].applyParent(this);}this.fireEvent("parentChange");return true;},appendChild:function(B){if(this.hasChildren()){var A=this.children[this.children.length-1];
-A.nextSibling=B;B.previousSibling=A;}this.children[this.children.length]=B;B.applyParent(this);if(this.childrenRendered&&this.expanded){this.getChildrenEl().style.display="";}return B;},appendTo:function(A){return A.appendChild(this);},insertBefore:function(A){var C=A.parent;if(C){if(this.tree){this.tree.popNode(this);}var B=A.isChildOf(C);C.children.splice(B,0,this);if(A.previousSibling){A.previousSibling.nextSibling=this;}this.previousSibling=A.previousSibling;this.nextSibling=A;A.previousSibling=this;this.applyParent(C);}return this;},insertAfter:function(A){var C=A.parent;if(C){if(this.tree){this.tree.popNode(this);}var B=A.isChildOf(C);if(!A.nextSibling){this.nextSibling=null;return this.appendTo(C);}C.children.splice(B+1,0,this);A.nextSibling.previousSibling=this;this.previousSibling=A;this.nextSibling=A.nextSibling;A.nextSibling=this;this.applyParent(C);}return this;},isChildOf:function(B){if(B&&B.children){for(var C=0,A=B.children.length;C<A;++C){if(B.children[C]===!
 this){return C;}}}return -1;},getSiblings:function(){return this.parent.children;},showChildren:function(){if(!this.tree.animateExpand(this.getChildrenEl(),this)){if(this.hasChildren()){this.getChildrenEl().style.display="";}}},hideChildren:function(){if(!this.tree.animateCollapse(this.getChildrenEl(),this)){this.getChildrenEl().style.display="none";}},getElId:function(){return"ygtv"+this.index;},getChildrenElId:function(){return"ygtvc"+this.index;},getToggleElId:function(){return"ygtvt"+this.index;},getEl:function(){return document.getElementById(this.getElId());},getChildrenEl:function(){return document.getElementById(this.getChildrenElId());},getToggleEl:function(){return document.getElementById(this.getToggleElId());},getToggleLink:function(){return"YAHOO.widget.TreeView.getNode('"+this.tree.id+"',"+this.index+").toggle()";},collapse:function(){if(!this.expanded){return ;}var A=this.tree.onCollapse(this);if(false===A){return ;}A=this.tree.fireEvent("collapse",this);if(f!
 alse===A){return ;}if(!this.getEl()){this.expanded=false;}else!
 {this.hi
deChildren();this.expanded=false;this.updateIcon();}A=this.tree.fireEvent("collapseComplete",this);},expand:function(C){if(this.expanded){return ;}var A=true;if(!C){A=this.tree.onExpand(this);if(false===A){return ;}A=this.tree.fireEvent("expand",this);}if(false===A){return ;}if(!this.getEl()){this.expanded=true;return ;}if(!this.childrenRendered){this.getChildrenEl().innerHTML=this.renderChildren();}else{}this.expanded=true;this.updateIcon();if(this.isLoading){this.expanded=false;return ;}if(!this.multiExpand){var D=this.getSiblings();for(var B=0;B<D.length;++B){if(D[B]!=this&&D[B].expanded){D[B].collapse();}}}this.showChildren();A=this.tree.fireEvent("expandComplete",this);},updateIcon:function(){if(this.hasIcon){var A=this.getToggleEl();if(A){A.className=this.getStyle();}}},getStyle:function(){if(this.isLoading){return"ygtvloading";}else{var B=(this.nextSibling)?"t":"l";var A="n";if(this.hasChildren(true)||(this.isDynamic()&&!this.getIconMode())){A=(this.expanded)?"m":"p";!
 }return"ygtv"+B+A;}},getHoverStyle:function(){var A=this.getStyle();if(this.hasChildren(true)&&!this.isLoading){A+="h";}return A;},expandAll:function(){for(var A=0;A<this.children.length;++A){var B=this.children[A];if(B.isDynamic()){alert("Not supported (lazy load + expand all)");break;}else{if(!B.multiExpand){alert("Not supported (no multi-expand + expand all)");break;}else{B.expand();B.expandAll();}}}},collapseAll:function(){for(var A=0;A<this.children.length;++A){this.children[A].collapse();this.children[A].collapseAll();}},setDynamicLoad:function(A,B){if(A){this.dataLoader=A;this._dynLoad=true;}else{this.dataLoader=null;this._dynLoad=false;}if(B){this.iconMode=B;}},isRoot:function(){return(this==this.tree.root);},isDynamic:function(){var A=(!this.isRoot()&&(this._dynLoad||this.tree.root._dynLoad));return A;},getIconMode:function(){return(this.iconMode||this.tree.root.iconMode);},hasChildren:function(A){return(this.children.length>0||(A&&this.isDynamic()&&!this.dynamicLo!
 adComplete));},toggle:function(){if(!this.tree.locked&&(this.h!
 asChildr
en(true)||this.isDynamic())){if(this.expanded){this.collapse();}else{this.expand();}}},getHtml:function(){this.childrenRendered=false;var A=[];A[A.length]="<div class=\"ygtvitem\" id=\""+this.getElId()+"\">";A[A.length]=this.getNodeHtml();A[A.length]=this.getChildrenHtml();A[A.length]="</div>";return A.join("");},getChildrenHtml:function(){var A=[];A[A.length]="<div class=\"ygtvchildren\"";A[A.length]=" id=\""+this.getChildrenElId()+"\"";if(!this.expanded||!this.hasChildren()){A[A.length]=" style=\"display:none;\"";}A[A.length]=">";if((this.hasChildren(true)&&this.expanded)||(this.renderHidden&&!this.isDynamic())){A[A.length]=this.renderChildren();}A[A.length]="</div>";return A.join("");},renderChildren:function(){var A=this;if(this.isDynamic()&&!this.dynamicLoadComplete){this.isLoading=true;this.tree.locked=true;if(this.dataLoader){setTimeout(function(){A.dataLoader(A,function(){A.loadComplete();});},10);}else{if(this.tree.root.dataLoader){setTimeout(function(){A.tree.root.!
 dataLoader(A,function(){A.loadComplete();});},10);}else{return"Error: data loader not found or not specified.";}}return"";}else{return this.completeRender();}},completeRender:function(){var B=[];for(var A=0;A<this.children.length;++A){B[B.length]=this.children[A].getHtml();}this.childrenRendered=true;return B.join("");},loadComplete:function(){this.getChildrenEl().innerHTML=this.completeRender();this.dynamicLoadComplete=true;this.isLoading=false;this.expand(true);this.tree.locked=false;},getAncestor:function(B){if(B>=this.depth||B<0){return null;}var A=this.parent;while(A.depth>B){A=A.parent;}return A;},getDepthStyle:function(A){return(this.getAncestor(A).nextSibling)?"ygtvdepthcell":"ygtvblankdepthcell";},getNodeHtml:function(){return"";},refresh:function(){this.getChildrenEl().innerHTML=this.completeRender();if(this.hasIcon){var A=this.getToggleEl();if(A){A.className=this.getStyle();}}},toString:function(){return"Node ("+this.index+")";
-}};YAHOO.augment(YAHOO.widget.Node,YAHOO.util.EventProvider);YAHOO.widget.TextNode=function(C,B,A){if(C){this.init(C,B,A);this.setUpLabel(C);}};YAHOO.extend(YAHOO.widget.TextNode,YAHOO.widget.Node,{labelStyle:"ygtvlabel",labelElId:null,label:null,textNodeParentChange:function(){if(this.tree&&!this.tree.hasEvent("labelClick")){this.tree.createEvent("labelClick",this.tree);}},setUpLabel:function(A){this.textNodeParentChange();this.subscribe("parentChange",this.textNodeParentChange);if(typeof A=="string"){A={label:A};}this.label=A.label;this.data.label=A.label;if(A.href){this.href=A.href;}if(A.target){this.target=A.target;}if(A.style){this.labelStyle=A.style;}this.labelElId="ygtvlabelel"+this.index;},getLabelEl:function(){return document.getElementById(this.labelElId);},getNodeHtml:function(){var C=[];C[C.length]="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";C[C.length]="<tr>";for(var A=0;A<this.depth;++A){C[C.length]="<td class=\""+this.getDepthStyle(A)+"\"><div !
 class=\"ygtvspacer\"></div></td>";}var B="YAHOO.widget.TreeView.getNode('"+this.tree.id+"',"+this.index+")";C[C.length]="<td";C[C.length]=" id=\""+this.getToggleElId()+"\"";C[C.length]=" class=\""+this.getStyle()+"\"";if(this.hasChildren(true)){C[C.length]=" onmouseover=\"this.className=";C[C.length]=B+".getHoverStyle()\"";C[C.length]=" onmouseout=\"this.className=";C[C.length]=B+".getStyle()\"";}C[C.length]=" onclick=\"javascript:"+this.getToggleLink()+"\">";C[C.length]="<div class=\"ygtvspacer\">";C[C.length]="</div>";C[C.length]="</td>";C[C.length]="<td ";C[C.length]=(this.nowrap)?" nowrap=\"nowrap\" ":"";C[C.length]=" >";C[C.length]="<a";C[C.length]=" id=\""+this.labelElId+"\"";C[C.length]=" class=\""+this.labelStyle+"\"";C[C.length]=" href=\""+this.href+"\"";C[C.length]=" target=\""+this.target+"\"";C[C.length]=" onclick=\"return "+B+".onLabelClick("+B+")\"";if(this.hasChildren(true)){C[C.length]=" onmouseover=\"document.getElementById('";C[C.length]=this.getToggleElId!
 ()+"').className=";C[C.length]=B+".getHoverStyle()\"";C[C.leng!
 th]=" on
mouseout=\"document.getElementById('";C[C.length]=this.getToggleElId()+"').className=";C[C.length]=B+".getStyle()\"";}C[C.length]=" >";C[C.length]=this.label;C[C.length]="</a>";C[C.length]="</td>";C[C.length]="</tr>";C[C.length]="</table>";return C.join("");},onLabelClick:function(A){return A.tree.fireEvent("labelClick",A);},toString:function(){return"TextNode ("+this.index+") "+this.label;}});YAHOO.widget.RootNode=function(A){this.init(null,null,true);this.tree=A;};YAHOO.extend(YAHOO.widget.RootNode,YAHOO.widget.Node,{getNodeHtml:function(){return"";},toString:function(){return"RootNode";},loadComplete:function(){this.tree.draw();},collapse:function(){},expand:function(){}});YAHOO.widget.HTMLNode=function(D,C,B,A){if(D){this.init(D,C,B);this.initContent(D,A);}};YAHOO.extend(YAHOO.widget.HTMLNode,YAHOO.widget.Node,{contentStyle:"ygtvhtml",contentElId:null,content:null,initContent:function(B,A){this.setHtml(B);this.contentElId="ygtvcontentel"+this.index;this.hasIcon=A;},setHt!
 ml:function(B){this.data=B;this.html=(typeof B==="string")?B:B.html;var A=this.getContentEl();if(A){A.innerHTML=this.html;}},getContentEl:function(){return document.getElementById(this.contentElId);},getNodeHtml:function(){var B=[];B[B.length]="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";B[B.length]="<tr>";for(var A=0;A<this.depth;++A){B[B.length]="<td class=\""+this.getDepthStyle(A)+"\"><div class=\"ygtvspacer\"></div></td>";}if(this.hasIcon){B[B.length]="<td";B[B.length]=" id=\""+this.getToggleElId()+"\"";B[B.length]=" class=\""+this.getStyle()+"\"";B[B.length]=" onclick=\"javascript:"+this.getToggleLink()+"\"";if(this.hasChildren(true)){B[B.length]=" onmouseover=\"this.className=";B[B.length]="YAHOO.widget.TreeView.getNode('";B[B.length]=this.tree.id+"',"+this.index+").getHoverStyle()\"";B[B.length]=" onmouseout=\"this.className=";B[B.length]="YAHOO.widget.TreeView.getNode('";B[B.length]=this.tree.id+"',"+this.index+").getStyle()\"";}B[B.length]="><div clas!
 s=\"ygtvspacer\"></div></td>";}B[B.length]="<td";B[B.length]="!
  id=\""+
this.contentElId+"\"";B[B.length]=" class=\""+this.contentStyle+"\"";B[B.length]=(this.nowrap)?" nowrap=\"nowrap\" ":"";B[B.length]=" >";B[B.length]=this.html;B[B.length]="</td>";B[B.length]="</tr>";B[B.length]="</table>";return B.join("");},toString:function(){return"HTMLNode ("+this.index+")";}});YAHOO.widget.MenuNode=function(C,B,A){if(C){this.init(C,B,A);this.setUpLabel(C);}this.multiExpand=false;};YAHOO.extend(YAHOO.widget.MenuNode,YAHOO.widget.TextNode,{toString:function(){return"MenuNode ("+this.index+") "+this.label;}});YAHOO.widget.TVAnim=function(){return{FADE_IN:"TVFadeIn",FADE_OUT:"TVFadeOut",getAnim:function(B,A,C){if(YAHOO.widget[B]){return new YAHOO.widget[B](A,C);}else{return null;}},isValid:function(A){return(YAHOO.widget[A]);}};}();YAHOO.widget.TVFadeIn=function(A,B){this.el=A;this.callback=B;};YAHOO.widget.TVFadeIn.prototype={animate:function(){var D=this;var C=this.el.style;C.opacity=0.1;C.filter="alpha(opacity=10)";C.display="";var B=0.4;var A=new YAHOO.!
 util.Anim(this.el,{opacity:{from:0.1,to:1,unit:""}},B);A.onComplete.subscribe(function(){D.onComplete();});A.animate();},onComplete:function(){this.callback();},toString:function(){return"TVFadeIn";}};YAHOO.widget.TVFadeOut=function(A,B){this.el=A;this.callback=B;};YAHOO.widget.TVFadeOut.prototype={animate:function(){var C=this;var B=0.4;var A=new YAHOO.util.Anim(this.el,{opacity:{from:1,to:0.1,unit:""}},B);A.onComplete.subscribe(function(){C.onComplete();});A.animate();},onComplete:function(){var A=this.el.style;A.display="none";A.filter="alpha(opacity=100)";this.callback();},toString:function(){return"TVFadeOut";}};YAHOO.register("treeview",YAHOO.widget.TreeView,{version:"2.3.1",build:"541"});
\ No newline at end of file
+YAHOO.widget.TreeView=function(A){if(A){this.init(A);}};YAHOO.widget.TreeView.prototype={id:null,_el:null,_nodes:null,locked:false,_expandAnim:null,_collapseAnim:null,_animCount:0,maxAnim:2,setExpandAnim:function(A){this._expandAnim=(YAHOO.widget.TVAnim.isValid(A))?A:null;},setCollapseAnim:function(A){this._collapseAnim=(YAHOO.widget.TVAnim.isValid(A))?A:null;},animateExpand:function(C,D){if(this._expandAnim&&this._animCount<this.maxAnim){var A=this;var B=YAHOO.widget.TVAnim.getAnim(this._expandAnim,C,function(){A.expandComplete(D);});if(B){++this._animCount;this.fireEvent("animStart",{"node":D,"type":"expand"});B.animate();}return true;}return false;},animateCollapse:function(C,D){if(this._collapseAnim&&this._animCount<this.maxAnim){var A=this;var B=YAHOO.widget.TVAnim.getAnim(this._collapseAnim,C,function(){A.collapseComplete(D);});if(B){++this._animCount;this.fireEvent("animStart",{"node":D,"type":"collapse"});B.animate();}return true;}return false;},expandComplete:funct!
 ion(A){--this._animCount;this.fireEvent("animComplete",{"node":A,"type":"expand"});},collapseComplete:function(A){--this._animCount;this.fireEvent("animComplete",{"node":A,"type":"collapse"});},init:function(B){this.id=B;if("string"!==typeof B){this._el=B;this.id=this.generateId(B);}this.createEvent("animStart",this);this.createEvent("animComplete",this);this.createEvent("collapse",this);this.createEvent("collapseComplete",this);this.createEvent("expand",this);this.createEvent("expandComplete",this);this._nodes=[];YAHOO.widget.TreeView.trees[this.id]=this;this.root=new YAHOO.widget.RootNode(this);var A=YAHOO.widget.LogWriter;},draw:function(){var A=this.root.getHtml();this.getEl().innerHTML=A;this.firstDraw=false;},getEl:function(){if(!this._el){this._el=document.getElementById(this.id);}return this._el;},regNode:function(A){this._nodes[A.index]=A;},getRoot:function(){return this.root;},setDynamicLoad:function(A,B){this.root.setDynamicLoad(A,B);},expandAll:function(){if(!th!
 is.locked){this.root.expandAll();}},collapseAll:function(){if(!
 !this.lo
cked){this.root.collapseAll();}},getNodeByIndex:function(B){var A=this._nodes[B];return(A)?A:null;},getNodeByProperty:function(C,B){for(var A in this._nodes){var D=this._nodes[A];if(D.data&&B==D.data[C]){return D;}}return null;},getNodesByProperty:function(D,C){var A=[];for(var B in this._nodes){var E=this._nodes[B];if(E.data&&C==E.data[D]){A.push(E);}}return(A.length)?A:null;},getNodeByElement:function(C){var D=C,A,B=/ygtv([^\d]*)(.*)/;do{if(D&&D.id){A=D.id.match(B);if(A&&A[2]){return this.getNodeByIndex(A[2]);}}D=D.parentNode;if(!D||!D.tagName){break;}}while(D.id!==this.id&&D.tagName.toLowerCase()!=="body");return null;},removeNode:function(B,A){if(B.isRoot()){return false;}var C=B.parent;if(C.parent){C=C.parent;}this._deleteNode(B);if(A&&C&&C.childrenRendered){C.refresh();}return true;},_removeChildren_animComplete:function(A){this.unsubscribe(this._removeChildren_animComplete);this.removeChildren(A.node);},removeChildren:function(A){if(A.expanded){if(this._collapseAnim){!
 this.subscribe("animComplete",this._removeChildren_animComplete,this,true);YAHOO.widget.Node.prototype.collapse.call(A);return ;}A.collapse();}while(A.children.length){this._deleteNode(A.children[0]);}if(A.isRoot()){YAHOO.widget.Node.prototype.expand.call(A);}A.childrenRendered=false;A.dynamicLoadComplete=false;A.updateIcon();},_deleteNode:function(A){this.removeChildren(A);this.popNode(A);},popNode:function(D){var E=D.parent;var B=[];for(var C=0,A=E.children.length;C<A;++C){if(E.children[C]!=D){B[B.length]=E.children[C];}}E.children=B;E.childrenRendered=false;if(D.previousSibling){D.previousSibling.nextSibling=D.nextSibling;}if(D.nextSibling){D.nextSibling.previousSibling=D.previousSibling;}D.parent=null;D.previousSibling=null;D.nextSibling=null;D.tree=null;delete this._nodes[D.index];},toString:function(){return"TreeView "+this.id;},generateId:function(A){var B=A.id;if(!B){B="yui-tv-auto-id-"+YAHOO.widget.TreeView.counter;++YAHOO.widget.TreeView.counter;}return B;},onExpa!
 nd:function(A){},onCollapse:function(A){}};YAHOO.augment(YAHOO!
 .widget.
TreeView,YAHOO.util.EventProvider);YAHOO.widget.TreeView.nodeCount=0;YAHOO.widget.TreeView.trees=[];YAHOO.widget.TreeView.counter=0;YAHOO.widget.TreeView.getTree=function(B){var A=YAHOO.widget.TreeView.trees[B];return(A)?A:null;};YAHOO.widget.TreeView.getNode=function(B,C){var A=YAHOO.widget.TreeView.getTree(B);return(A)?A.getNodeByIndex(C):null;};YAHOO.widget.TreeView.addHandler=function(B,C,A){if(B.addEventListener){B.addEventListener(C,A,false);}else{if(B.attachEvent){B.attachEvent("on"+C,A);}}};YAHOO.widget.TreeView.removeHandler=function(B,C,A){if(B.removeEventListener){B.removeEventListener(C,A,false);}else{if(B.detachEvent){B.detachEvent("on"+C,A);}}};YAHOO.widget.TreeView.preload=function(F,E){E=E||"ygtv";var C=["tn","tm","tmh","tp","tph","ln","lm","lmh","lp","lph","loading"];var G=[];for(var A=1;A<C.length;A=A+1){G[G.length]="<span class=\""+E+C[A]+"\"> </span>";}var D=document.createElement("div");var B=D.style;B.className=E+C[0];B.position="absolute";B.height!
 ="1px";B.width="1px";B.top="-1000px";B.left="-1000px";D.innerHTML=G.join("");document.body.appendChild(D);YAHOO.widget.TreeView.removeHandler(window,"load",YAHOO.widget.TreeView.preload);};YAHOO.widget.TreeView.addHandler(window,"load",YAHOO.widget.TreeView.preload);YAHOO.widget.Node=function(C,B,A){if(C){this.init(C,B,A);}};YAHOO.widget.Node.prototype={index:0,children:null,tree:null,data:null,parent:null,depth:-1,href:null,target:"_self",expanded:false,multiExpand:true,renderHidden:false,childrenRendered:false,dynamicLoadComplete:false,previousSibling:null,nextSibling:null,_dynLoad:false,dataLoader:null,isLoading:false,hasIcon:true,iconMode:0,nowrap:false,_type:"Node",init:function(C,B,A){this.data=C;this.children=[];this.index=YAHOO.widget.TreeView.nodeCount;++YAHOO.widget.TreeView.nodeCount;this.expanded=A;this.createEvent("parentChange",this);if(B){B.appendChild(this);}},applyParent:function(B){if(!B){return false;
+}this.tree=B.tree;this.parent=B;this.depth=B.depth+1;if(!this.href){this.href="javascript:"+this.getToggleLink();}this.tree.regNode(this);B.childrenRendered=false;for(var C=0,A=this.children.length;C<A;++C){this.children[C].applyParent(this);}this.fireEvent("parentChange");return true;},appendChild:function(B){if(this.hasChildren()){var A=this.children[this.children.length-1];A.nextSibling=B;B.previousSibling=A;}this.children[this.children.length]=B;B.applyParent(this);if(this.childrenRendered&&this.expanded){this.getChildrenEl().style.display="";}return B;},appendTo:function(A){return A.appendChild(this);},insertBefore:function(A){var C=A.parent;if(C){if(this.tree){this.tree.popNode(this);}var B=A.isChildOf(C);C.children.splice(B,0,this);if(A.previousSibling){A.previousSibling.nextSibling=this;}this.previousSibling=A.previousSibling;this.nextSibling=A;A.previousSibling=this;this.applyParent(C);}return this;},insertAfter:function(A){var C=A.parent;if(C){if(this.tree){this.t!
 ree.popNode(this);}var B=A.isChildOf(C);if(!A.nextSibling){this.nextSibling=null;return this.appendTo(C);}C.children.splice(B+1,0,this);A.nextSibling.previousSibling=this;this.previousSibling=A;this.nextSibling=A.nextSibling;A.nextSibling=this;this.applyParent(C);}return this;},isChildOf:function(B){if(B&&B.children){for(var C=0,A=B.children.length;C<A;++C){if(B.children[C]===this){return C;}}}return -1;},getSiblings:function(){return this.parent.children;},showChildren:function(){if(!this.tree.animateExpand(this.getChildrenEl(),this)){if(this.hasChildren()){this.getChildrenEl().style.display="";}}},hideChildren:function(){if(!this.tree.animateCollapse(this.getChildrenEl(),this)){this.getChildrenEl().style.display="none";}},getElId:function(){return"ygtv"+this.index;},getChildrenElId:function(){return"ygtvc"+this.index;},getToggleElId:function(){return"ygtvt"+this.index;},getEl:function(){return document.getElementById(this.getElId());},getChildrenEl:function(){return docum!
 ent.getElementById(this.getChildrenElId());},getToggleEl:funct!
 ion(){re
turn document.getElementById(this.getToggleElId());},getToggleLink:function(){return"YAHOO.widget.TreeView.getNode('"+this.tree.id+"',"+this.index+").toggle()";},collapse:function(){if(!this.expanded){return ;}var A=this.tree.onCollapse(this);if(false===A){return ;}A=this.tree.fireEvent("collapse",this);if(false===A){return ;}if(!this.getEl()){this.expanded=false;}else{this.hideChildren();this.expanded=false;this.updateIcon();}A=this.tree.fireEvent("collapseComplete",this);},expand:function(C){if(this.expanded&&!C){return ;}var A=true;if(!C){A=this.tree.onExpand(this);if(false===A){return ;}A=this.tree.fireEvent("expand",this);}if(false===A){return ;}if(!this.getEl()){this.expanded=true;return ;}if(!this.childrenRendered){this.getChildrenEl().innerHTML=this.renderChildren();}else{}this.expanded=true;this.updateIcon();if(this.isLoading){this.expanded=false;return ;}if(!this.multiExpand){var D=this.getSiblings();for(var B=0;B<D.length;++B){if(D[B]!=this&&D[B].expanded){D[B].co!
 llapse();}}}this.showChildren();A=this.tree.fireEvent("expandComplete",this);},updateIcon:function(){if(this.hasIcon){var A=this.getToggleEl();if(A){A.className=this.getStyle();}}},getStyle:function(){if(this.isLoading){return"ygtvloading";}else{var B=(this.nextSibling)?"t":"l";var A="n";if(this.hasChildren(true)||(this.isDynamic()&&!this.getIconMode())){A=(this.expanded)?"m":"p";}return"ygtv"+B+A;}},getHoverStyle:function(){var A=this.getStyle();if(this.hasChildren(true)&&!this.isLoading){A+="h";}return A;},expandAll:function(){for(var A=0;A<this.children.length;++A){var B=this.children[A];if(B.isDynamic()){alert("Not supported (lazy load + expand all)");break;}else{if(!B.multiExpand){alert("Not supported (no multi-expand + expand all)");break;}else{B.expand();B.expandAll();}}}},collapseAll:function(){for(var A=0;A<this.children.length;++A){this.children[A].collapse();this.children[A].collapseAll();}},setDynamicLoad:function(A,B){if(A){this.dataLoader=A;this._dynLoad=true;!
 }else{this.dataLoader=null;this._dynLoad=false;}if(B){this.ico!
 nMode=B;
}},isRoot:function(){return(this==this.tree.root);},isDynamic:function(){var A=(!this.isRoot()&&(this._dynLoad||this.tree.root._dynLoad));return A;},getIconMode:function(){return(this.iconMode||this.tree.root.iconMode);},hasChildren:function(A){return(this.children.length>0||(A&&this.isDynamic()&&!this.dynamicLoadComplete));},toggle:function(){if(!this.tree.locked&&(this.hasChildren(true)||this.isDynamic())){if(this.expanded){this.collapse();}else{this.expand();}}},getHtml:function(){this.childrenRendered=false;var A=[];A[A.length]="<div class=\"ygtvitem\" id=\""+this.getElId()+"\">";A[A.length]=this.getNodeHtml();A[A.length]=this.getChildrenHtml();A[A.length]="</div>";return A.join("");},getChildrenHtml:function(){var A=[];A[A.length]="<div class=\"ygtvchildren\"";A[A.length]=" id=\""+this.getChildrenElId()+"\"";if(!this.expanded||!this.hasChildren()){A[A.length]=" style=\"display:none;\"";}A[A.length]=">";if((this.hasChildren(true)&&this.expanded)||(this.renderHidden&&!thi!
 s.isDynamic())){A[A.length]=this.renderChildren();}A[A.length]="</div>";return A.join("");},renderChildren:function(){var A=this;if(this.isDynamic()&&!this.dynamicLoadComplete){this.isLoading=true;this.tree.locked=true;if(this.dataLoader){setTimeout(function(){A.dataLoader(A,function(){A.loadComplete();});},10);}else{if(this.tree.root.dataLoader){setTimeout(function(){A.tree.root.dataLoader(A,function(){A.loadComplete();});},10);}else{return"Error: data loader not found or not specified.";}}return"";}else{return this.completeRender();}},completeRender:function(){var B=[];for(var A=0;A<this.children.length;++A){B[B.length]=this.children[A].getHtml();}this.childrenRendered=true;return B.join("");},loadComplete:function(){this.getChildrenEl().innerHTML=this.completeRender();this.dynamicLoadComplete=true;this.isLoading=false;this.expand(true);this.tree.locked=false;},getAncestor:function(B){if(B>=this.depth||B<0){return null;
+}var A=this.parent;while(A.depth>B){A=A.parent;}return A;},getDepthStyle:function(A){return(this.getAncestor(A).nextSibling)?"ygtvdepthcell":"ygtvblankdepthcell";},getNodeHtml:function(){return"";},refresh:function(){this.getChildrenEl().innerHTML=this.completeRender();if(this.hasIcon){var A=this.getToggleEl();if(A){A.className=this.getStyle();}}},toString:function(){return"Node ("+this.index+")";}};YAHOO.augment(YAHOO.widget.Node,YAHOO.util.EventProvider);YAHOO.widget.TextNode=function(C,B,A){if(C){this.init(C,B,A);this.setUpLabel(C);}};YAHOO.extend(YAHOO.widget.TextNode,YAHOO.widget.Node,{labelStyle:"ygtvlabel",labelElId:null,label:null,textNodeParentChange:function(){if(this.tree&&!this.tree.hasEvent("labelClick")){this.tree.createEvent("labelClick",this.tree);}},setUpLabel:function(A){this.textNodeParentChange();this.subscribe("parentChange",this.textNodeParentChange);if(typeof A=="string"){A={label:A};}this.label=A.label;this.data.label=A.label;if(A.href){this.href=enc!
 odeURI(A.href);}if(A.target){this.target=A.target;}if(A.style){this.labelStyle=A.style;}if(A.title){this.title=A.title;}this.labelElId="ygtvlabelel"+this.index;},getLabelEl:function(){return document.getElementById(this.labelElId);},getNodeHtml:function(){var C=[];C[C.length]="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";C[C.length]="<tr>";for(var A=0;A<this.depth;++A){C[C.length]="<td class=\""+this.getDepthStyle(A)+"\"><div class=\"ygtvspacer\"></div></td>";}var B="YAHOO.widget.TreeView.getNode('"+this.tree.id+"',"+this.index+")";C[C.length]="<td";C[C.length]=" id=\""+this.getToggleElId()+"\"";C[C.length]=" class=\""+this.getStyle()+"\"";if(this.hasChildren(true)){C[C.length]=" onmouseover=\"this.className=";C[C.length]=B+".getHoverStyle()\"";C[C.length]=" onmouseout=\"this.className=";C[C.length]=B+".getStyle()\"";}C[C.length]=" onclick=\"javascript:"+this.getToggleLink()+"\">";C[C.length]="<div class=\"ygtvspacer\">";C[C.length]="</div>";C[C.length]="</td>"!
 ;C[C.length]="<td ";C[C.length]=(this.nowrap)?" nowrap=\"nowra!
 p\" ":""
;C[C.length]=" >";C[C.length]="<a";C[C.length]=" id=\""+this.labelElId+"\"";if(this.title){C[C.length]=" title=\""+this.title+"\"";}C[C.length]=" class=\""+this.labelStyle+"\"";C[C.length]=" href=\""+this.href+"\"";C[C.length]=" target=\""+this.target+"\"";C[C.length]=" onclick=\"return "+B+".onLabelClick("+B+")\"";if(this.hasChildren(true)){C[C.length]=" onmouseover=\"document.getElementById('";C[C.length]=this.getToggleElId()+"').className=";C[C.length]=B+".getHoverStyle()\"";C[C.length]=" onmouseout=\"document.getElementById('";C[C.length]=this.getToggleElId()+"').className=";C[C.length]=B+".getStyle()\"";}C[C.length]=" >";C[C.length]=this.label;C[C.length]="</a>";C[C.length]="</td>";C[C.length]="</tr>";C[C.length]="</table>";return C.join("");},onLabelClick:function(A){return A.tree.fireEvent("labelClick",A);},toString:function(){return"TextNode ("+this.index+") "+this.label;}});YAHOO.widget.RootNode=function(A){this.init(null,null,true);this.tree=A;};YAHOO.extend(YAHOO.!
 widget.RootNode,YAHOO.widget.Node,{getNodeHtml:function(){return"";},toString:function(){return"RootNode";},loadComplete:function(){this.tree.draw();},collapse:function(){},expand:function(){}});YAHOO.widget.HTMLNode=function(D,C,B,A){if(D){this.init(D,C,B);this.initContent(D,A);}};YAHOO.extend(YAHOO.widget.HTMLNode,YAHOO.widget.Node,{contentStyle:"ygtvhtml",contentElId:null,content:null,initContent:function(B,A){this.setHtml(B);this.contentElId="ygtvcontentel"+this.index;this.hasIcon=A;},setHtml:function(B){this.data=B;this.html=(typeof B==="string")?B:B.html;var A=this.getContentEl();if(A){A.innerHTML=this.html;}},getContentEl:function(){return document.getElementById(this.contentElId);},getNodeHtml:function(){var B=[];B[B.length]="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";B[B.length]="<tr>";for(var A=0;A<this.depth;++A){B[B.length]="<td class=\""+this.getDepthStyle(A)+"\"><div class=\"ygtvspacer\"></div></td>";}if(this.hasIcon){B[B.length]="<td";B[B.lengt!
 h]=" id=\""+this.getToggleElId()+"\"";B[B.length]=" class=\""+!
 this.get
Style()+"\"";B[B.length]=" onclick=\"javascript:"+this.getToggleLink()+"\"";if(this.hasChildren(true)){B[B.length]=" onmouseover=\"this.className=";B[B.length]="YAHOO.widget.TreeView.getNode('";B[B.length]=this.tree.id+"',"+this.index+").getHoverStyle()\"";B[B.length]=" onmouseout=\"this.className=";B[B.length]="YAHOO.widget.TreeView.getNode('";B[B.length]=this.tree.id+"',"+this.index+").getStyle()\"";}B[B.length]="><div class=\"ygtvspacer\"></div></td>";}B[B.length]="<td";B[B.length]=" id=\""+this.contentElId+"\"";B[B.length]=" class=\""+this.contentStyle+"\"";B[B.length]=(this.nowrap)?" nowrap=\"nowrap\" ":"";B[B.length]=" >";B[B.length]=this.html;B[B.length]="</td>";B[B.length]="</tr>";B[B.length]="</table>";return B.join("");},toString:function(){return"HTMLNode ("+this.index+")";}});YAHOO.widget.MenuNode=function(C,B,A){if(C){this.init(C,B,A);this.setUpLabel(C);}this.multiExpand=false;};YAHOO.extend(YAHOO.widget.MenuNode,YAHOO.widget.TextNode,{toString:function(){return!
 "MenuNode ("+this.index+") "+this.label;}});YAHOO.widget.TVAnim=function(){return{FADE_IN:"TVFadeIn",FADE_OUT:"TVFadeOut",getAnim:function(B,A,C){if(YAHOO.widget[B]){return new YAHOO.widget[B](A,C);}else{return null;}},isValid:function(A){return(YAHOO.widget[A]);}};}();YAHOO.widget.TVFadeIn=function(A,B){this.el=A;this.callback=B;};YAHOO.widget.TVFadeIn.prototype={animate:function(){var D=this;var C=this.el.style;C.opacity=0.1;C.filter="alpha(opacity=10)";C.display="";var B=0.4;var A=new YAHOO.util.Anim(this.el,{opacity:{from:0.1,to:1,unit:""}},B);A.onComplete.subscribe(function(){D.onComplete();});A.animate();},onComplete:function(){this.callback();},toString:function(){return"TVFadeIn";}};YAHOO.widget.TVFadeOut=function(A,B){this.el=A;this.callback=B;};YAHOO.widget.TVFadeOut.prototype={animate:function(){var C=this;var B=0.4;var A=new YAHOO.util.Anim(this.el,{opacity:{from:1,to:0.1,unit:""}},B);A.onComplete.subscribe(function(){C.onComplete();
+});A.animate();},onComplete:function(){var A=this.el.style;A.display="none";A.filter="alpha(opacity=100)";this.callback();},toString:function(){return"TVFadeOut";}};YAHOO.register("treeview",YAHOO.widget.TreeView,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/treeview/treeview.js
===================================================================
--- trunk/root/static/yui/treeview/treeview.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/treeview/treeview.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * The treeview widget is a generic tree building tool.
@@ -97,9 +97,7 @@
      * in YAHOO.widget.TVAnim)
      */
     setExpandAnim: function(type) {
-        if (YAHOO.widget.TVAnim.isValid(type)) {
-            this._expandAnim = type;
-        }
+        this._expandAnim = (YAHOO.widget.TVAnim.isValid(type)) ? type : null;
     },
 
     /**
@@ -109,9 +107,7 @@
      * YAHOO.widget.TVAnim)
      */
     setCollapseAnim: function(type) {
-        if (YAHOO.widget.TVAnim.isValid(type)) {
-            this._collapseAnim = type;
-        }
+        this._collapseAnim = (YAHOO.widget.TVAnim.isValid(type)) ? type : null;
     },
 
     /**
@@ -422,6 +418,39 @@
     },
 
     /**
+     * Returns the treeview node reference for an anscestor element
+     * of the node, or null if it is not contained within any node
+     * in this tree.
+     * @method getNodeByElement
+     * @param {HTMLElement} the element to test
+     * @return {YAHOO.widget.Node} a node reference or null
+     */
+    getNodeByElement: function(el) {
+
+        var p=el, m, re=/ygtv([^\d]*)(.*)/;
+
+        do {
+
+            if (p && p.id) {
+                m = p.id.match(re);
+                if (m && m[2]) {
+                    return this.getNodeByIndex(m[2]);
+                }
+            }
+
+            p = p.parentNode;
+
+            if (!p || !p.tagName) {
+                break;
+            }
+
+        } 
+        while (p.id !== this.id && p.tagName.toLowerCase() !== "body");
+
+        return null;
+    },
+
+    /**
      * Removes the node and its children, and optionally refreshes the 
      * branch of the tree that was affected.
      * @method removeNode
@@ -481,7 +510,7 @@
             if (this._collapseAnim) {
                 this.subscribe("animComplete", 
                         this._removeChildren_animComplete, this, true);
-                node.collapse();
+                YAHOO.widget.Node.prototype.collapse.call(node);
                 return;
             }
 
@@ -492,6 +521,10 @@
             this._deleteNode(node.children[0]);
         }
 
+        if (node.isRoot()) {
+            YAHOO.widget.Node.prototype.expand.call(node);
+        }
+
         node.childrenRendered = false;
         node.dynamicLoadComplete = false;
 
@@ -1300,7 +1333,9 @@
      */
     expand: function(lazySource) {
         // Only expand if currently collapsed.
-        if (this.expanded) { return; }
+        if (this.expanded && !lazySource) { 
+            return; 
+        }
 
         var ret = true;
 
@@ -1327,7 +1362,7 @@
             return;
         }
 
-        if (! this.childrenRendered) {
+        if (!this.childrenRendered) {
             this.getChildrenEl().innerHTML = this.renderChildren();
         } else {
         }
@@ -1561,6 +1596,7 @@
         }
         sb[sb.length] = '>';
 
+
         // Don't render the actual child node HTML unless this node is expanded.
         if ( (this.hasChildren(true) && this.expanded) ||
                 (this.renderHidden && !this.isDynamic()) ) {
@@ -1812,7 +1848,7 @@
         
         // update the link
         if (oData.href) {
-            this.href = oData.href;
+            this.href = encodeURI(oData.href);
         }
 
         // set the target
@@ -1824,6 +1860,10 @@
             this.labelStyle = oData.style;
         }
 
+        if (oData.title) {
+            this.title = oData.title;
+        }
+
         this.labelElId = "ygtvlabelel" + this.index;
     },
 
@@ -1887,6 +1927,9 @@
         sb[sb.length] = ' >';
         sb[sb.length] = '<a';
         sb[sb.length] = ' id="' + this.labelElId + '"';
+        if (this.title) {
+            sb[sb.length] = ' title="' + this.title + '"';
+        }
         sb[sb.length] = ' class="' + this.labelStyle + '"';
         sb[sb.length] = ' href="' + this.href + '"';
         sb[sb.length] = ' target="' + this.target + '"';
@@ -2309,4 +2352,4 @@
     }
 };
 
-YAHOO.register("treeview", YAHOO.widget.TreeView, {version: "2.3.1", build: "541"});
+YAHOO.register("treeview", YAHOO.widget.TreeView, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/utilities/utilities.js
===================================================================
--- trunk/root/static/yui/utilities/utilities.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/utilities/utilities.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,15 +2,16 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-if(typeof YAHOO=="undefined"){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(!
 A&&A[1]){C.webkit=parseFloat(A[1]);}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang={isArray:function(B){if(B){var A=YAHOO.lang;return A.isNumber(B.length)&&A.isFunction(B.splice)&&!A.hasOwnProperty(B.length);}return false;},isBoolean:function(A){return typeof A==="boolean";},isFunction:function(A){return typeof A==="function";},isNull:function(A){return A===null;},isNumber:function(A){return typeof A==="number"&&isFinite(A);},isObject:function(A){return(A&&(typeof A==="object"||YAHOO.lang.isFunction!
 (A)))||false;},isString:function(A){return typeof A==="string"!
 ;},isUnd
efined:function(A){return typeof A==="undefined";},hasOwnProperty:function(A,B){if(Object.prototype.hasOwnProperty){return A.hasOwnProperty(B);}return !YAHOO.lang.isUndefined(A[B])&&A.constructor.prototype[B]!==A[B];},_IEEnumFix:function(C,B){if(YAHOO.env.ua.ie){var E=["toString","valueOf"],A;for(A=0;A<E.length;A=A+1){var F=E[A],D=B[F];if(YAHOO.lang.isFunction(D)&&D!=Object.prototype[F]){C[F]=D;}}}},extend:function(D,E,C){if(!E||!D){throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");}var B=function(){};B.prototype=E.prototype;D.prototype=new B();D.prototype.constructor=D;D.superclass=E.prototype;if(E.prototype.constructor==Object.prototype.constructor){E.prototype.constructor=E;}if(C){for(var A in C){D.prototype[A]=C[A];}YAHOO.lang._IEEnumFix(D.prototype,C);}},augmentObject:function(E,D){if(!D||!E){throw new Error("Absorb failed, verify dependencies.");}var A=arguments,C,F,B=A[2];if(B&&B!==true){for(C=2;C<A.length;C=C+1){E[A[C]]=D[A!
 [C]];}}else{for(F in D){if(B||!E[F]){E[F]=D[F];}}YAHOO.lang._IEEnumFix(E,D);}},augmentProto:function(D,C){if(!C||!D){throw new Error("Augment failed, verify dependencies.");}var A=[D.prototype,C.prototype];for(var B=2;B<arguments.length;B=B+1){A.push(arguments[B]);}YAHOO.lang.augmentObject.apply(this,A);},dump:function(A,G){var C=YAHOO.lang,D,F,I=[],J="{...}",B="f(){...}",H=", ",E=" => ";if(!C.isObject(A)){return A+"";}else{if(A instanceof Date||("nodeType" in A&&"tagName" in A)){return A;}else{if(C.isFunction(A)){return B;}}}G=(C.isNumber(G))?G:3;if(C.isArray(A)){I.push("[");for(D=0,F=A.length;D<F;D=D+1){if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}if(I.length>1){I.pop();}I.push("]");}else{I.push("{");for(D in A){if(C.hasOwnProperty(A,D)){I.push(D+E);if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}}if(I.length>1){I.pop();}I.push("}");}return I.join("");},substitute:function(Q,B,J){var G,F,E,M,N,P,!
 D=YAHOO.lang,L=[],C,H="dump",K=" ",A="{",O="}";for(;;){G=Q.las!
 tIndexOf
(A);if(G<0){break;}F=Q.indexOf(O,G);if(G+1>=F){break;}C=Q.substring(G+1,F);M=C;P=null;E=M.indexOf(K);if(E>-1){P=M.substring(E+1);M=M.substring(0,E);}N=B[M];if(J){N=J(M,N,P);}if(D.isObject(N)){if(D.isArray(N)){N=D.dump(N,parseInt(P,10));}else{P=P||"";var I=P.indexOf(H);if(I>-1){P=P.substring(4);}if(N.toString===Object.prototype.toString||I>-1){N=D.dump(N,parseInt(P,10));}else{N=N.toString();}}}else{if(!D.isString(N)&&!D.isNumber(N)){N="~-"+L.length+"-~";L[L.length]=C;}}Q=Q.substring(0,G)+N+Q.substring(F+1);}for(G=L.length-1;G>=0;G=G-1){Q=Q.replace(new RegExp("~-"+G+"-~"),"{"+L[G]+"}","g");}return Q;},trim:function(A){try{return A.replace(/^\s+|\s+$/g,"");}catch(B){return A;}},merge:function(){var C={},A=arguments,B;for(B=0;B<A.length;B=B+1){YAHOO.lang.augmentObject(C,A[B],true);}return C;},isValue:function(B){var A=YAHOO.lang;return(A.isObject(B)||A.isString(B)||A.isNumber(B)||A.isBoolean(B));}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augme!
 nt=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.3.1",build:"541"});(function(){var B=YAHOO.util,K,I,H=0,J={},F={};var C=YAHOO.env.ua.opera,L=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,G=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i};var M=function(O){if(!E.HYPHEN.test(O)){return O;}if(J[O]){return J[O];}var P=O;while(E.HYPHEN.exec(P)){P=P.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}J[O]=P;return P;};var N=function(P){var O=F[P];if(!O){O=new RegExp("(?:^|\\s+)"+P+"(?:\\s+|$)");F[P]=O;}return O;};if(document.defaultView&&document.defaultView.getComputedStyle){K=function(O,R){var Q=null;if(R=="float"){R="cssFloat";}var P=document.defaultView.getComputedStyle(O,"");if(P){Q=P[M(R)];}return O.style[R]||Q;};}else{if(document.documentElement.currentStyle&&G){K=function(O,Q){switch(M(Q)){case"opacity":var S=100;try{S=O.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(R){try{S=O.filters("alpha").!
 opacity;}catch(R){}}return S/100;case"float":Q="styleFloat";de!
 fault:va
r P=O.currentStyle?O.currentStyle[Q]:null;return(O.style[Q]||P);}};}else{K=function(O,P){return O.style[P];};}}if(G){I=function(O,P,Q){switch(P){case"opacity":if(YAHOO.lang.isString(O.style.filter)){O.style.filter="alpha(opacity="+Q*100+")";if(!O.currentStyle||!O.currentStyle.hasLayout){O.style.zoom=1;}}break;case"float":P="styleFloat";default:O.style[P]=Q;}};}else{I=function(O,P,Q){if(P=="float"){P="cssFloat";}O.style[P]=Q;};}var D=function(O,P){return O&&O.nodeType==1&&(!P||P(O));};YAHOO.util.Dom={get:function(Q){if(Q&&(Q.tagName||Q.item)){return Q;}if(YAHOO.lang.isString(Q)||!Q){return document.getElementById(Q);}if(Q.length!==undefined){var R=[];for(var P=0,O=Q.length;P<O;++P){R[R.length]=B.Dom.get(Q[P]);}return R;}return Q;},getStyle:function(O,Q){Q=M(Q);var P=function(R){return K(R,Q);};return B.Dom.batch(O,P,B.Dom,true);},setStyle:function(O,Q,R){Q=M(Q);var P=function(S){I(S,Q,R);};B.Dom.batch(O,P,B.Dom,true);},getXY:function(O){var P=function(R){if((R.parentNode===nu!
 ll||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=document.body){return false;}var Q=null;var V=[];var S;var T=R.ownerDocument;if(R.getBoundingClientRect){S=R.getBoundingClientRect();return[S.left+B.Dom.getDocumentScrollLeft(R.ownerDocument),S.top+B.Dom.getDocumentScrollTop(R.ownerDocument)];}else{V=[R.offsetLeft,R.offsetTop];Q=R.offsetParent;var U=this.getStyle(R,"position")=="absolute";if(Q!=R){while(Q){V[0]+=Q.offsetLeft;V[1]+=Q.offsetTop;if(L&&!U&&this.getStyle(Q,"position")=="absolute"){U=true;}Q=Q.offsetParent;}}if(L&&U){V[0]-=R.ownerDocument.body.offsetLeft;V[1]-=R.ownerDocument.body.offsetTop;}}Q=R.parentNode;while(Q.tagName&&!E.ROOT_TAG.test(Q.tagName)){if(B.Dom.getStyle(Q,"display").search(/^inline|table-row.*$/i)){V[0]-=Q.scrollLeft;V[1]-=Q.scrollTop;}Q=Q.parentNode;}return V;};return B.Dom.batch(O,P,B.Dom,true);},getX:function(O){var P=function(Q){return B.Dom.getXY(Q)[0];};return B.Dom.batch(O,P,B.Dom,true);},getY:function(O){var P=function(Q){!
 return B.Dom.getXY(Q)[1];};return B.Dom.batch(O,P,B.Dom,true);!
 },setXY:
function(O,R,Q){var P=function(U){var T=this.getStyle(U,"position");if(T=="static"){this.setStyle(U,"position","relative");T="relative";}var W=this.getXY(U);if(W===false){return false;}var V=[parseInt(this.getStyle(U,"left"),10),parseInt(this.getStyle(U,"top"),10)];if(isNaN(V[0])){V[0]=(T=="relative")?0:U.offsetLeft;}if(isNaN(V[1])){V[1]=(T=="relative")?0:U.offsetTop;}if(R[0]!==null){U.style.left=R[0]-W[0]+V[0]+"px";}if(R[1]!==null){U.style.top=R[1]-W[1]+V[1]+"px";}if(!Q){var S=this.getXY(U);if((R[0]!==null&&S[0]!=R[0])||(R[1]!==null&&S[1]!=R[1])){this.setXY(U,R,true);}}};B.Dom.batch(O,P,B.Dom,true);},setX:function(P,O){B.Dom.setXY(P,[O,null]);},setY:function(O,P){B.Dom.setXY(O,[null,P]);},getRegion:function(O){var P=function(Q){if((Q.parentNode===null||Q.offsetParent===null||this.getStyle(Q,"display")=="none")&&Q!=document.body){return false;}var R=B.Region.getRegion(Q);return R;};return B.Dom.batch(O,P,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth()!
 ;},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(S,W,T,U){W=W||"*";T=(T)?B.Dom.get(T):null||document;if(!T){return[];}var P=[],O=T.getElementsByTagName(W),V=N(S);for(var Q=0,R=O.length;Q<R;++Q){if(V.test(O[Q].className)){P[P.length]=O[Q];if(U){U.call(O[Q],O[Q]);}}}return P;},hasClass:function(Q,P){var O=N(P);var R=function(S){return O.test(S.className);};return B.Dom.batch(Q,R,B.Dom,true);},addClass:function(P,O){var Q=function(R){if(this.hasClass(R,O)){return false;}R.className=YAHOO.lang.trim([R.className,O].join(" "));return true;};return B.Dom.batch(P,Q,B.Dom,true);},removeClass:function(Q,P){var O=N(P);var R=function(S){if(!this.hasClass(S,P)){return false;}var T=S.className;S.className=T.replace(O," ");if(this.hasClass(S,P)){this.removeClass(S,P);}S.className=YAHOO.lang.trim(S.className);return true;};return B.Dom.batch(Q,R,B.Dom,true);},replaceClass:function(R,P,O){if(!O||P===O){return false;}var Q=N(P);var S=function(T!
 ){if(!this.hasClass(T,P)){this.addClass(T,O);return true;}T.cl!
 assName=
T.className.replace(Q," "+O+" ");if(this.hasClass(T,P)){this.replaceClass(T,P,O);}T.className=YAHOO.lang.trim(T.className);return true;};return B.Dom.batch(R,S,B.Dom,true);},generateId:function(O,Q){Q=Q||"yui-gen";var P=function(R){if(R&&R.id){return R.id;}var S=Q+H++;if(R){R.id=S;}return S;};return B.Dom.batch(O,P,B.Dom,true)||P.apply(B.Dom,arguments);},isAncestor:function(P,Q){P=B.Dom.get(P);if(!P||!Q){return false;}var O=function(R){if(P.contains&&R.nodeType&&!L){return P.contains(R);}else{if(P.compareDocumentPosition&&R.nodeType){return !!(P.compareDocumentPosition(R)&16);}else{if(R.nodeType){return !!this.getAncestorBy(R,function(S){return S==P;});}}}return false;};return B.Dom.batch(Q,O,B.Dom,true);},inDocument:function(O){var P=function(Q){if(L){while(Q=Q.parentNode){if(Q==document.documentElement){return true;}}return false;}return this.isAncestor(document.documentElement,Q);};return B.Dom.batch(O,P,B.Dom,true);},getElementsBy:function(V,P,Q,S){P=P||"*";
-Q=(Q)?B.Dom.get(Q):null||document;if(!Q){return[];}var R=[],U=Q.getElementsByTagName(P);for(var T=0,O=U.length;T<O;++T){if(V(U[T])){R[R.length]=U[T];if(S){S(U[T]);}}}return R;},batch:function(S,V,U,Q){S=(S&&(S.tagName||S.item))?S:B.Dom.get(S);if(!S||!V){return false;}var R=(Q)?U:window;if(S.tagName||S.length===undefined){return V.call(R,S,U);}var T=[];for(var P=0,O=S.length;P<O;++P){T[T.length]=V.call(R,S[P],U);}return T;},getDocumentHeight:function(){var P=(document.compatMode!="CSS1Compat")?document.body.scrollHeight:document.documentElement.scrollHeight;var O=Math.max(P,B.Dom.getViewportHeight());return O;},getDocumentWidth:function(){var P=(document.compatMode!="CSS1Compat")?document.body.scrollWidth:document.documentElement.scrollWidth;var O=Math.max(P,B.Dom.getViewportWidth());return O;},getViewportHeight:function(){var O=self.innerHeight;var P=document.compatMode;if((P||G)&&!C){O=(P=="CSS1Compat")?document.documentElement.clientHeight:document.body.clientHeight;}retu!
 rn O;},getViewportWidth:function(){var O=self.innerWidth;var P=document.compatMode;if(P||G){O=(P=="CSS1Compat")?document.documentElement.clientWidth:document.body.clientWidth;}return O;},getAncestorBy:function(O,P){while(O=O.parentNode){if(D(O,P)){return O;}}return null;},getAncestorByClassName:function(P,O){P=B.Dom.get(P);if(!P){return null;}var Q=function(R){return B.Dom.hasClass(R,O);};return B.Dom.getAncestorBy(P,Q);},getAncestorByTagName:function(P,O){P=B.Dom.get(P);if(!P){return null;}var Q=function(R){return R.tagName&&R.tagName.toUpperCase()==O.toUpperCase();};return B.Dom.getAncestorBy(P,Q);},getPreviousSiblingBy:function(O,P){while(O){O=O.previousSibling;if(D(O,P)){return O;}}return null;},getPreviousSibling:function(O){O=B.Dom.get(O);if(!O){return null;}return B.Dom.getPreviousSiblingBy(O);},getNextSiblingBy:function(O,P){while(O){O=O.nextSibling;if(D(O,P)){return O;}}return null;},getNextSibling:function(O){O=B.Dom.get(O);if(!O){return null;}return B.Dom.getNext!
 SiblingBy(O);},getFirstChildBy:function(O,Q){var P=(D(O.firstC!
 hild,Q))
?O.firstChild:null;return P||B.Dom.getNextSiblingBy(O.firstChild,Q);},getFirstChild:function(O,P){O=B.Dom.get(O);if(!O){return null;}return B.Dom.getFirstChildBy(O);},getLastChildBy:function(O,Q){if(!O){return null;}var P=(D(O.lastChild,Q))?O.lastChild:null;return P||B.Dom.getPreviousSiblingBy(O.lastChild,Q);},getLastChild:function(O){O=B.Dom.get(O);return B.Dom.getLastChildBy(O);},getChildrenBy:function(P,R){var Q=B.Dom.getFirstChildBy(P,R);var O=Q?[Q]:[];B.Dom.getNextSiblingBy(Q,function(S){if(!R||R(S)){O[O.length]=S;}return false;});return O;},getChildren:function(O){O=B.Dom.get(O);if(!O){}return B.Dom.getChildrenBy(O);},getDocumentScrollLeft:function(O){O=O||document;return Math.max(O.documentElement.scrollLeft,O.body.scrollLeft);},getDocumentScrollTop:function(O){O=O||document;return Math.max(O.documentElement.scrollTop,O.body.scrollTop);},insertBefore:function(P,O){P=B.Dom.get(P);O=B.Dom.get(O);if(!P||!O||!O.parentNode){return null;}return O.parentNode.insertBefore(P,O!
 );},insertAfter:function(P,O){P=B.Dom.get(P);O=B.Dom.get(O);if(!P||!O||!O.parentNode){return null;}if(O.nextSibling){return O.parentNode.insertBefore(P,O.nextSibling);}else{return O.parentNode.appendChild(P);}}};})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.mi!
 n(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YA!
 HOO.util
.Region.prototype.toString=function(){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.3.1",build:"541"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscri!
 be:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){var E=this.subscribers.length;if(!E&&this.silent){return true;}var H=[],G=true,D,I=false;for(D=0;D<arguments.length;++D){H.push(arguments[D]);}var A=H.length;if(!this.silent){}for(D=0;D<E;++D){var L=this.subscribers[D];if(!L){I=true;}else{if(!this.silent){}var K=L.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(H.length>0){B=H[0];}try{G=L.fn.call(K,B,L.obj);}catch(F){this.lastError=F;}}else{try{G=L.fn.call(K,this.type,H,L.obj);}catch(F){this.lastError=F;}}if(false===G){if(!this.silent){}return false;}}}if(I){var !
 J=[],C=this.subscribers;for(D=0,E=C.length;D<E;D=D+1){J.push(C!
 [D]);}th
is.subscribers=J;}return true;},unsubscribeAll:function(){for(var B=0,A=this.subscribers.length;B<A;++B){this._delete(A-1-B);}this.subscribers=[];return B;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers[A]=null;},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var J=false;var I=[];var K=[];var G=[];var E=[];var C=0;var F=[];var B=[!
 ];var A=0;var D={63232:38,63233:40,63234:37,63235:39};return{POLL_RETRYS:4000,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,startInterval:function(){if(!this._interval){var L=this;var M=function(){L._tryPreloadAttach();};this._interval=setInterval(M,this.POLL_INTERVAL);}},onAvailable:function(N,L,O,M){F.push({id:N,fn:L,obj:O,override:M,checkReady:false});C=this.POLL_RETRYS;this.startInterval();},onDOMReady:function(L,N,M){if(J){setTimeout(function(){var O=window;if(M){if(M===true){O=N;}else{O=M;}}L.call(O,"DOMReady",[],N);},0);}else{this.DOMReadyEvent.subscribe(L,N,M);}},onContentReady:function(N,L,O,M){F.push({id:N,fn:L,obj:O,override:M,checkReady:true});C=this.POLL_RETRYS;this.startInterval();},addListener:function(N,L,W,R,M){if(!W||!W.call){return false;}if(this._isValidCollection(N)){var X=true;for(var S=0,U=N.length;S<U;++S){X=t!
 his.on(N[S],L,W,R,M)&&X;}return X;}else{if(YAHOO.lang.isString!
 (N)){var
 Q=this.getEl(N);if(Q){N=Q;}else{this.onAvailable(N,function(){YAHOO.util.Event.on(N,L,W,R,M);});return true;}}}if(!N){return false;}if("unload"==L&&R!==this){K[K.length]=[N,L,W,R,M];return true;}var Z=N;if(M){if(M===true){Z=R;}else{Z=M;}}var O=function(a){return W.call(Z,YAHOO.util.Event.getEvent(a,N),R);};var Y=[N,L,W,O,Z,R,M];var T=I.length;I[T]=Y;if(this.useLegacyEvent(N,L)){var P=this.getLegacyIndex(N,L);if(P==-1||N!=G[P][0]){P=G.length;B[N.id+L]=P;G[P]=[N,L,N["on"+L]];E[P]=[];N["on"+L]=function(a){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(a),P);};}E[P].push(Y);}else{try{this._simpleAdd(N,L,O,false);}catch(V){this.lastError=V;this.removeListener(N,L,W);return false;}}return true;},fireLegacyEvent:function(P,N){var R=true,L,T,S,U,Q;T=E[N];for(var M=0,O=T.length;M<O;++M){S=T[M];if(S&&S[this.WFN]){U=S[this.ADJ_SCOPE];Q=S[this.WFN].call(U,P);R=(R&&Q);}}L=G[N];if(L&&L[2]){L[2](P);}return R;},getLegacyIndex:function(M,N){var L=this.generateId(M)+N;if(typeof B!
 [L]=="undefined"){return -1;}else{return B[L];}},useLegacyEvent:function(M,N){if(this.webkit&&("click"==N||"dblclick"==N)){var L=parseInt(this.webkit,10);if(!isNaN(L)&&L<418){return true;}}return false;},removeListener:function(M,L,U){var P,S,W;if(typeof M=="string"){M=this.getEl(M);}else{if(this._isValidCollection(M)){var V=true;for(P=0,S=M.length;P<S;++P){V=(this.removeListener(M[P],L,U)&&V);}return V;}}if(!U||!U.call){return this.purgeElement(M,false,L);}if("unload"==L){for(P=0,S=K.length;P<S;P++){W=K[P];if(W&&W[0]==M&&W[1]==L&&W[2]==U){K[P]=null;return true;}}return false;}var Q=null;var R=arguments[3];if("undefined"===typeof R){R=this._getCacheIndex(M,L,U);}if(R>=0){Q=I[R];}if(!M||!Q){return false;}if(this.useLegacyEvent(M,L)){var O=this.getLegacyIndex(M,L);var N=E[O];if(N){for(P=0,S=N.length;P<S;++P){W=N[P];if(W&&W[this.EL]==M&&W[this.TYPE]==L&&W[this.FN]==U){N[P]=null;break;}}}}else{try{this._simpleRemove(M,L,Q[this.WFN],false);}catch(T){this.lastError=T;return false!
 ;}}delete I[R][this.WFN];delete I[R][this.FN];I[R]=null;return!
  true;},
getTarget:function(N,M){var L=N.target||N.srcElement;return this.resolveTextNode(L);},resolveTextNode:function(L){if(L&&3==L.nodeType){return L.parentNode;}else{return L;}},getPageX:function(M){var L=M.pageX;if(!L&&0!==L){L=M.clientX||0;if(this.isIE){L+=this._getScrollLeft();}}return L;},getPageY:function(L){var M=L.pageY;if(!M&&0!==M){M=L.clientY||0;if(this.isIE){M+=this._getScrollTop();}}return M;},getXY:function(L){return[this.getPageX(L),this.getPageY(L)];
-},getRelatedTarget:function(M){var L=M.relatedTarget;if(!L){if(M.type=="mouseout"){L=M.toElement;}else{if(M.type=="mouseover"){L=M.fromElement;}}}return this.resolveTextNode(L);},getTime:function(N){if(!N.time){var M=new Date().getTime();try{N.time=M;}catch(L){this.lastError=L;return M;}}return N.time;},stopEvent:function(L){this.stopPropagation(L);this.preventDefault(L);},stopPropagation:function(L){if(L.stopPropagation){L.stopPropagation();}else{L.cancelBubble=true;}},preventDefault:function(L){if(L.preventDefault){L.preventDefault();}else{L.returnValue=false;}},getEvent:function(Q,O){var P=Q||window.event;if(!P){var R=this.getEvent.caller;while(R){P=R.arguments[0];if(P&&Event==P.constructor){break;}R=R.caller;}}if(P&&this.isIE){try{var N=P.srcElement;if(N){var M=N.type;}}catch(L){P.target=O;}}return P;},getCharCode:function(M){var L=M.keyCode||M.charCode||0;if(YAHOO.env.ua.webkit&&(L in D)){L=D[L];}return L;},_getCacheIndex:function(P,Q,O){for(var N=0,M=I.length;N<M;++N)!
 {var L=I[N];if(L&&L[this.FN]==O&&L[this.EL]==P&&L[this.TYPE]==Q){return N;}}return -1;},generateId:function(L){var M=L.id;if(!M){M="yuievtautoid-"+A;++A;L.id=M;}return M;},_isValidCollection:function(M){try{return(typeof M!=="string"&&M.length&&!M.tagName&&!M.alert&&typeof M[0]!=="undefined");}catch(L){return false;}},elCache:{},getEl:function(L){return(typeof L==="string")?document.getElementById(L):L;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(M){if(!H){H=true;var L=YAHOO.util.Event;L._ready();L._tryPreloadAttach();}},_ready:function(M){if(!J){J=true;var L=YAHOO.util.Event;L.DOMReadyEvent.fire();L._simpleRemove(document,"DOMContentLoaded",L._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}if(this.isIE){if(!J){this.startInterval();return false;}}this.locked=true;var Q=!H;if(!Q){Q=(C>0);}var P=[];var R=function(T,U){var S=T;if(U.override){if(U.override===true){S=U.obj;}else{S=U.override;}}U.fn.call(!
 S,U.obj);};var M,L,O,N;for(M=0,L=F.length;M<L;++M){O=F[M];if(O!
 &&!O.che
ckReady){N=this.getEl(O.id);if(N){R(N,O);F[M]=null;}else{P.push(O);}}}for(M=0,L=F.length;M<L;++M){O=F[M];if(O&&O.checkReady){N=this.getEl(O.id);if(N){if(H||N.nextSibling){R(N,O);F[M]=null;}}else{P.push(O);}}}C=(P.length===0)?0:C-1;if(Q){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;return true;},purgeElement:function(O,P,R){var Q=this.getListeners(O,R),N,L;if(Q){for(N=0,L=Q.length;N<L;++N){var M=Q[N];this.removeListener(O,M.type,M.fn,M.index);}}if(P&&O&&O.childNodes){for(N=0,L=O.childNodes.length;N<L;++N){this.purgeElement(O.childNodes[N],P,R);}}},getListeners:function(N,L){var Q=[],M;if(!L){M=[I,K];}else{if(L=="unload"){M=[K];}else{M=[I];}}for(var P=0;P<M.length;P=P+1){var T=M[P];if(T&&T.length>0){for(var R=0,S=T.length;R<S;++R){var O=T[R];if(O&&O[this.EL]===N&&(!L||L===O[this.TYPE])){Q.push({type:O[this.TYPE],fn:O[this.FN],obj:O[this.OBJ],adjust:O[this.OVERRIDE],scope:O[this.ADJ_SCOPE],index:R});}}}}return(Q.length)?Q:null;!
 },_unload:function(S){var R=YAHOO.util.Event,P,O,M,L,N;for(P=0,L=K.length;P<L;++P){M=K[P];if(M){var Q=window;if(M[R.ADJ_SCOPE]){if(M[R.ADJ_SCOPE]===true){Q=M[R.UNLOAD_OBJ];}else{Q=M[R.ADJ_SCOPE];}}M[R.FN].call(Q,R.getEvent(S,M[R.EL]),M[R.UNLOAD_OBJ]);K[P]=null;M=null;Q=null;}}K=null;if(I&&I.length>0){O=I.length;while(O){N=O-1;M=I[N];if(M){R.removeListener(M[R.EL],M[R.TYPE],M[R.FN],N);}O=O-1;}M=null;R.clearCache();}for(P=0,L=G.length;P<L;++P){G[P][0]=null;G[P]=null;}G=null;R._simpleRemove(window,"unload",R._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var L=document.documentElement,M=document.body;if(L&&(L.scrollTop||L.scrollLeft)){return[L.scrollTop,L.scrollLeft];}else{if(M){return[M.scrollTop,M.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(N,O,M,L){N.addEventListener(O,M,(L));};}else{if(window.attachEvent!
 ){return function(N,O,M,L){N.attachEvent("on"+O,M);};}else{ret!
 urn func
tion(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(N,O,M,L){N.removeEventListener(O,M,(L));};}else{if(window.detachEvent){return function(M,N,L){M.detachEvent("on"+N,L);};}else{return function(){};}}}()};}();(function(){var D=YAHOO.util.Event;D.on=D.addListener;if(D.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var B,E=document,A=E.body;if(("undefined"!==typeof YAHOO_config)&&YAHOO_config.injecting){B=document.createElement("script");var C=E.getElementsByTagName("head")[0]||A;C.insertBefore(B,C.firstChild);}else{E.write("<script id=\"_yui_eu_dr\" defer=\"true\" src=\"//:\"></script>");B=document.getElementById("_yui_eu_dr");}if(B){B.onreadystatechange=function(){if("complete"===this.readyState){this.parentNode.removeChild(this);YAHOO.util.Event._ready();}};}else{}B=null;}else{if(D.webkit){D._drwatch=setInterval(function(){var F=document.readyState;if("loaded"==F||"complete"==F){clearInterval(D.!
 _drwatch);D._drwatch=null;D._ready();}},D.POLL_INTERVAL);}else{D._simpleAdd(document,"DOMContentLoaded",D._ready);}}D._simpleAdd(window,"load",D._load);D._simpleAdd(window,"unload",D._unload);D._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};
-var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN;}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEve!
 nt("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(K,J){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(K.shiftKey==F.shift&&K.altKey==F.alt&&K.ctrlKey==F.ctrl){var H;var G;if(F.keys instanceof Array){for(var I=0;I<F.keys.length;I++){H=F.keys[I];if(H==K.charCode){D.fire(K.charCode,K);break;}else{if(H==K.keyCode){D.fire(K.keyCode,K);break;}}}}else{H=F.keys;if(H==K.charCode){D.fire(K.charCode,K);}else{if(H==K.keyCode){D.fire(K.keyCode,K);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHO!
 O.util.KeyListener.KEYUP="keyup";YAHOO.register("event",YAHOO.!
 util.Eve
nt,{version:"2.3.1",build:"541"});YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(q){try{var S=YAHOO.util.Event.getTarget(q);if(S.type.toLowerCase()=="submit"){YAHOO.util.Connect._submitElementValue=encodeURIComponent(S.name)+"="+encodeURIComponent(S.value);}}catch(q){}});return true;}return false;})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new!
  YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(S){this._msxml_progid.unshift(S);},setDefaultPostHeader:function(S){if(typeof S=="string"){this._default_post_header=S;}else{if(typeof S=="boolean"){this._use_default_post_header=S;}}},setDefaultXhrHeader:function(S){if(typeof S=="string"){this._default_xhr_header=S;}else{this._use_default_xhr_header=S;}},setPollingInterval:function(S){if(typeof S=="number"&&isFinite(S)){this._polling_interval=S;}},createXhrObject:function(w){var m,S;try{S=new XMLHttpRequest();m={conn:S,tId:w};}catch(R){for(var q=0;q<thi!
 s._msxml_progid.length;++q){try{S=new ActiveXObject(this._msxm!
 l_progid
[q]);m={conn:S,tId:w};break;}catch(R){}}}finally{return m;}},getConnectionObject:function(S){var R;var m=this._transaction_id;try{if(!S){R=this.createXhrObject(m);}else{R={};R.tId=m;R.isUpload=true;}if(R){this._transaction_id++;}}catch(q){}finally{return R;}},asyncRequest:function(w,q,m,S){var R=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();if(!R){return null;}else{if(m&&m.customevents){this.initCustomEvents(R,m);}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(R,m,q,S);return R;}if(w.toUpperCase()=="GET"){if(this._sFormData.length!==0){q+=((q.indexOf("?")==-1)?"?":"&")+this._sFormData;}else{q+="?"+this._sFormData;}}else{if(w.toUpperCase()=="POST"){S=S?this._sFormData+"&"+S:this._sFormData;}}}R.conn.open(w,q,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true);}}if(this._isFormSubmit==false&&this._use_default_post_header){this.init!
 Header("Content-Type",this._default_post_header);}if(this._has_default_headers||this._has_http_headers){this.setHeader(R);}this.handleReadyState(R,m);R.conn.send(S||null);this.startEvent.fire(R);if(R.startEvent){R.startEvent.fire(R);}return R;}},initCustomEvents:function(S,R){for(var q in R.customevents){if(this._customEvents[q][0]){S[this._customEvents[q][0]]=new YAHOO.util.CustomEvent(this._customEvents[q][1],(R.scope)?R.scope:null);S[this._customEvents[q][0]].subscribe(R.customevents[q]);}}},handleReadyState:function(q,R){var S=this;if(R&&R.timeout){this._timeOut[q.tId]=window.setTimeout(function(){S.abort(q,R,true);},R.timeout);}this._poll[q.tId]=window.setInterval(function(){if(q.conn&&q.conn.readyState===4){window.clearInterval(S._poll[q.tId]);delete S._poll[q.tId];if(R&&R.timeout){window.clearTimeout(S._timeOut[q.tId]);delete S._timeOut[q.tId];}S.completeEvent.fire(q);if(q.completeEvent){q.completeEvent.fire(q);}S.handleTransactionResponse(q,R);}},this._polling_inter!
 val);},handleTransactionResponse:function(w,V,S){var R,q;try{i!
 f(w.conn
.status!==undefined&&w.conn.status!==0){R=w.conn.status;}else{R=13030;}}catch(m){R=13030;}if(R>=200&&R<300||R===1223){q=this.createResponseObject(w,(V&&V.argument)?V.argument:undefined);if(V){if(V.success){if(!V.scope){V.success(q);}else{V.success.apply(V.scope,[q]);}}}this.successEvent.fire(q);if(w.successEvent){w.successEvent.fire(q);}}else{switch(R){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:q=this.createExceptionObject(w.tId,(V&&V.argument)?V.argument:undefined,(S?S:false));if(V){if(V.failure){if(!V.scope){V.failure(q);}else{V.failure.apply(V.scope,[q]);}}}break;default:q=this.createResponseObject(w,(V&&V.argument)?V.argument:undefined);if(V){if(V.failure){if(!V.scope){V.failure(q);}else{V.failure.apply(V.scope,[q]);}}}}this.failureEvent.fire(q);if(w.failureEvent){w.failureEvent.fire(q);}}this.releaseObject(w);q=null;},createResponseObject:function(S,d){var m={};var T={};try{var R=S.conn.getAllResponseHeaders();var V=R.split("\n");for(var w=0;w<V.l!
 ength;w++){var q=V[w].indexOf(":");if(q!=-1){T[V[w].substring(0,q)]=V[w].substring(q+2);}}}catch(N){}m.tId=S.tId;m.status=(S.conn.status==1223)?204:S.conn.status;m.statusText=(S.conn.status==1223)?"No Content":S.conn.statusText;m.getResponseHeader=T;m.getAllResponseHeaders=R;m.responseText=S.conn.responseText;m.responseXML=S.conn.responseXML;if(typeof d!==undefined){m.argument=d;}return m;},createExceptionObject:function(N,m,S){var V=0;var d="communication failure";var R=-1;var q="transaction aborted";var w={};w.tId=N;if(S){w.status=R;w.statusText=q;}else{w.status=V;w.statusText=d;}if(m){w.argument=m;}return w;},initHeader:function(S,m,R){var q=(R)?this._default_headers:this._http_headers;q[S]=m;if(R){this._has_default_headers=true;}else{this._has_http_headers=true;}},setHeader:function(S){if(this._has_default_headers){for(var q in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,q)){S.conn.setRequestHeader(q,this._default_headers[q]);}}}if(this._ha!
 s_http_headers){for(var q in this._http_headers){if(YAHOO.lang!
 .hasOwnP
roperty(this._http_headers,q)){S.conn.setRequestHeader(q,this._http_headers[q]);}}delete this._http_headers;this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false;},setForm:function(M,w,q){this.resetFormState();var f;if(typeof M=="string"){f=(document.getElementById(M)||document.forms[M]);}else{if(typeof M=="object"){f=M;}else{return ;}}if(w){var V=this.createFrame(q?q:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=f;return ;}var S,T,d,p;var N=false;for(var m=0;m<f.elements.length;m++){S=f.elements[m];p=f.elements[m].disabled;T=f.elements[m].name;d=f.elements[m].value;if(!p&&T){switch(S.type){case "select-one":case "select-multiple":for(var R=0;R<S.options.length;R++){if(S.options[R].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(S.options[R].attributes["value"].specified?S.options[R].value!
 :S.options[R].text)+"&";}else{this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(S.options[R].hasAttribute("value")?S.options[R].value:S.options[R].text)+"&";}}}break;case "radio":case "checkbox":if(S.checked){this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(d)+"&";}break;case "file":case undefined:case "reset":case "button":break;case "submit":if(N===false){if(this._hasSubmitListener&&this._submitElementValue){this._sFormData+=this._submitElementValue+"&";}else{this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(d)+"&";}N=true;}break;default:this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(d)+"&";}}}this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);this.initHeader("Content-Type",this._default_form_header);return this._sFormData;},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";},createFrame:function(S){var q="yuiIO"+this!
 ._transaction_id;var R;if(window.ActiveXObject){R=document.cre!
 ateEleme
nt("<iframe id=\""+q+"\" name=\""+q+"\" />");if(typeof S=="boolean"){R.src="javascript:false";}else{if(typeof secureURI=="string"){R.src=S;}}}else{R=document.createElement("iframe");R.id=q;R.name=q;}R.style.position="absolute";R.style.top="-1000px";R.style.left="-1000px";document.body.appendChild(R);},appendPostData:function(S){var m=[];var q=S.split("&");for(var R=0;R<q.length;R++){var w=q[R].indexOf("=");if(w!=-1){m[R]=document.createElement("input");m[R].type="hidden";m[R].name=q[R].substring(0,w);m[R].value=q[R].substring(w+1);this._formNode.appendChild(m[R]);}}return m;},uploadFile:function(m,p,w,R){var N="yuiIO"+m.tId;var T="multipart/form-data";var f=document.getElementById(N);var U=this;var q={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",w);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",N);if(this._formNode!
 .encoding){this._formNode.setAttribute("encoding",T);}else{this._formNode.setAttribute("enctype",T);}if(R){var M=this.appendPostData(R);}this._formNode.submit();this.startEvent.fire(m);if(m.startEvent){m.startEvent.fire(m);}if(p&&p.timeout){this._timeOut[m.tId]=window.setTimeout(function(){U.abort(m,p,true);},p.timeout);}if(M&&M.length>0){for(var d=0;d<M.length;d++){this._formNode.removeChild(M[d]);}}for(var S in q){if(YAHOO.lang.hasOwnProperty(q,S)){if(q[S]){this._formNode.setAttribute(S,q[S]);}else{this._formNode.removeAttribute(S);}}}this.resetFormState();var V=function(){if(p&&p.timeout){window.clearTimeout(U._timeOut[m.tId]);delete U._timeOut[m.tId];}U.completeEvent.fire(m);if(m.completeEvent){m.completeEvent.fire(m);}var v={};v.tId=m.tId;v.argument=p.argument;try{v.responseText=f.contentWindow.document.body?f.contentWindow.document.body.innerHTML:f.contentWindow.document.documentElement.textContent;v.responseXML=f.contentWindow.document.XMLDocument?f.contentWindow.doc!
 ument.XMLDocument:f.contentWindow.document;}catch(u){}if(p&&p.!
 upload){
if(!p.scope){p.upload(v);}else{p.upload.apply(p.scope,[v]);}}U.uploadEvent.fire(v);if(m.uploadEvent){m.uploadEvent.fire(v);}YAHOO.util.Event.removeListener(f,"load",V);setTimeout(function(){document.body.removeChild(f);U.releaseObject(m);},100);};YAHOO.util.Event.addListener(f,"load",V);},abort:function(m,V,S){var R;if(m.conn){if(this.isCallInProgress(m)){m.conn.abort();window.clearInterval(this._poll[m.tId]);delete this._poll[m.tId];if(S){window.clearTimeout(this._timeOut[m.tId]);delete this._timeOut[m.tId];}R=true;}}else{if(m.isUpload===true){var q="yuiIO"+m.tId;var w=document.getElementById(q);if(w){YAHOO.util.Event.removeListener(w,"load",uploadCallback);document.body.removeChild(w);if(S){window.clearTimeout(this._timeOut[m.tId]);delete this._timeOut[m.tId];}R=true;}}else{R=false;}}if(R===true){this.abortEvent.fire(m);if(m.abortEvent){m.abortEvent.fire(m);}this.handleTransactionResponse(m,V,true);}return R;},isCallInProgress:function(q){if(q&&q.conn){return q.conn.readyS!
 tate!==4&&q.conn.readyState!==0;}else{if(q&&q.isUpload===true){var S="yuiIO"+q.tId;return document.getElementById(S)?true:false;}else{return false;}}},releaseObject:function(S){if(S.conn){S.conn=null;}S=null;}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.3.1",build:"541"});YAHOO.util.Anim=function(B,A,C,D){if(!B){}this.init(B,A,C,D);};YAHOO.util.Anim.prototype={toString:function(){var A=this.getEl();var B=A.id||A.tagName||A;return("Anim "+B);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(A,C,B){return this.method(this.currentFrame,C,B-C,this.totalFrames);},setAttribute:function(A,C,B){if(this.patterns.noNegatives.test(A)){C=(C>0)?C:0;}YAHOO.util.Dom.setStyle(this.getEl(),A,C+B);},getAttribute:function(A){var C=this.getEl();var E=YAHOO.util.Dom.getStyle(C,A);if(E!=="auto"&&!this.patterns!
 .offsetUnit.test(E)){return parseFloat(E);}var B=this.patterns!
 .offsetA
ttribute.exec(A)||[];var F=!!(B[3]);var D=!!(B[2]);if(D||(YAHOO.util.Dom.getStyle(C,"position")=="absolute"&&F)){E=C["offset"+B[0].charAt(0).toUpperCase()+B[0].substr(1)];}else{E=0;}return E;},getDefaultUnit:function(A){if(this.patterns.defaultUnit.test(A)){return"px";}return"";},setRuntimeAttribute:function(B){var G;var C;var D=this.attributes;this.runtimeAttributes[B]={};var F=function(H){return(typeof H!=="undefined");};if(!F(D[B]["to"])&&!F(D[B]["by"])){return false;}G=(F(D[B]["from"]))?D[B]["from"]:this.getAttribute(B);if(F(D[B]["to"])){C=D[B]["to"];}else{if(F(D[B]["by"])){if(G.constructor==Array){C=[];for(var E=0,A=G.length;E<A;++E){C[E]=G[E]+D[B]["by"][E]*1;}}else{C=G+D[B]["by"]*1;}}}this.runtimeAttributes[B].start=G;this.runtimeAttributes[B].end=C;this.runtimeAttributes[B].unit=(F(D[B].unit))?D[B]["unit"]:this.getDefaultUnit(B);return true;},init:function(C,H,G,A){var B=false;var D=null;var F=0;C=YAHOO.util.Dom.get(C);this.attributes=H||{};this.duration=!YAHOO.lang.i!
 sUndefined(G)?G:1;this.method=A||YAHOO.util.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=YAHOO.util.AnimMgr.fps;this.setEl=function(K){C=YAHOO.util.Dom.get(K);};this.getEl=function(){return C;};this.isAnimated=function(){return B;};this.getStartTime=function(){return D;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(YAHOO.util.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}YAHOO.util.AnimMgr.registerElement(this);return true;};this.stop=function(K){if(K){this.currentFrame=this.totalFrames;this._onTween.fire();}YAHOO.util.AnimMgr.stop(this);};var J=function(){this.onStart.fire();this.runtimeAttributes={};for(var K in this.attributes){this.setRuntimeAttribute(K);}B=true;F=0;D=new Date();};var I=function(){var M={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};M.toStrin!
 g=function(){return("duration: "+M.duration+", currentFrame: "!
 +M.curre
ntFrame);};this.onTween.fire(M);var L=this.runtimeAttributes;for(var K in L){this.setAttribute(K,this.doMethod(K,L[K].start,L[K].end),L[K].unit);}F+=1;};var E=function(){var K=(new Date()-D)/1000;var L={duration:K,frames:F,fps:F/K};L.toString=function(){return("duration: "+L.duration+", frames: "+L.frames+", fps: "+L.fps);};B=false;F=0;this.onComplete.fire(L);};this._onStart=new YAHOO.util.CustomEvent("_start",this,true);this.onStart=new YAHOO.util.CustomEvent("start",this);this.onTween=new YAHOO.util.CustomEvent("tween",this);this._onTween=new YAHOO.util.CustomEvent("_tween",this,true);this.onComplete=new YAHOO.util.CustomEvent("complete",this);this._onComplete=new YAHOO.util.CustomEvent("_complete",this,true);this._onStart.subscribe(J);this._onTween.subscribe(I);this._onComplete.subscribe(E);}};YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start();};this.un!
 Register=function(G,F){G._onComplete.fire();F=F||E(G);if(F==-1){return false;}B.splice(F,1);A-=1;if(A<=0){this.stop();}return true;};this.start=function(){if(C===null){C=setInterval(this.run,this.delay);}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){if(B[0].isAnimated()){this.unRegister(B[0],0);}}B=[];C=null;A=0;}else{this.unRegister(H);}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue;}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G);}G._onTween.fire();}else{YAHOO.util.AnimMgr.stop(G,H);}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G;}}return -1;};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame);}else{K=J-(I+1);}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){!
 K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.util.Bezier=new functi!
 on(){thi
s.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]];}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1];}}return[C[0][0],C[0][1]];};};(function(){YAHOO.util.ColorAnim=function(E,D,F,G){YAHOO.util.ColorAnim.superclass.constructor.call(this,E,D,F,G);};YAHOO.extend(YAHOO.util.ColorAnim,YAHOO.util.Anim);var B=YAHOO.util;var C=B.ColorAnim.superclass;var A=B.ColorAnim.prototype;A.toString=function(){var D=this.getEl();var E=D.id||D.tagName;return("ColorAnim "+E);};A.patterns.color=/color$/i;A.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;A.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;A.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;A.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;A.parseColor=function(D){if(D.length==3){return D;}var E=this.patterns.hex.exec(D);if(E&&E.length==4){return[parseInt(E[1],!
 16),parseInt(E[2],16),parseInt(E[3],16)];}E=this.patterns.rgb.exec(D);if(E&&E.length==4){return[parseInt(E[1],10),parseInt(E[2],10),parseInt(E[3],10)];
+if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWe!
 bKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{isArray:function(B){if(B){var A=YAHOO.lang;return A.isNumber(B.length)&&A.isFunction(B.splice);}return false;},isBoolean:function(A){return typeof A==="boolean";},isFunction:function(A){return typeof A==="function";},isNull:function(A){return !
 A===null;},isNumber:function(A){return typeof A==="number"&&is!
 Finite(A
);},isObject:function(A){return(A&&(typeof A==="object"||YAHOO.lang.isFunction(A)))||false;},isString:function(A){return typeof A==="string";},isUndefined:function(A){return typeof A==="undefined";},hasOwnProperty:function(A,B){if(Object.prototype.hasOwnProperty){return A.hasOwnProperty(B);}return !YAHOO.lang.isUndefined(A[B])&&A.constructor.prototype[B]!==A[B];},_IEEnumFix:function(C,B){if(YAHOO.env.ua.ie){var E=["toString","valueOf"],A;for(A=0;A<E.length;A=A+1){var F=E[A],D=B[F];if(YAHOO.lang.isFunction(D)&&D!=Object.prototype[F]){C[F]=D;}}}},extend:function(D,E,C){if(!E||!D){throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");}var B=function(){};B.prototype=E.prototype;D.prototype=new B();D.prototype.constructor=D;D.superclass=E.prototype;if(E.prototype.constructor==Object.prototype.constructor){E.prototype.constructor=E;}if(C){for(var A in C){D.prototype[A]=C[A];}YAHOO.lang._IEEnumFix(D.prototype,C);}},augmentObject:function(E,D)!
 {if(!D||!E){throw new Error("Absorb failed, verify dependencies.");}var A=arguments,C,F,B=A[2];if(B&&B!==true){for(C=2;C<A.length;C=C+1){E[A[C]]=D[A[C]];}}else{for(F in D){if(B||!E[F]){E[F]=D[F];}}YAHOO.lang._IEEnumFix(E,D);}},augmentProto:function(D,C){if(!C||!D){throw new Error("Augment failed, verify dependencies.");}var A=[D.prototype,C.prototype];for(var B=2;B<arguments.length;B=B+1){A.push(arguments[B]);}YAHOO.lang.augmentObject.apply(this,A);},dump:function(A,G){var C=YAHOO.lang,D,F,I=[],J="{...}",B="f(){...}",H=", ",E=" => ";if(!C.isObject(A)){return A+"";}else{if(A instanceof Date||("nodeType" in A&&"tagName" in A)){return A;}else{if(C.isFunction(A)){return B;}}}G=(C.isNumber(G))?G:3;if(C.isArray(A)){I.push("[");for(D=0,F=A.length;D<F;D=D+1){if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}if(I.length>1){I.pop();}I.push("]");}else{I.push("{");for(D in A){if(C.hasOwnProperty(A,D)){I.push(D+E);if(C.isObject(A[D])){I.push((G>0)?C.du!
 mp(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}}if(I.length>1)!
 {I.pop()
;}I.push("}");}return I.join("");},substitute:function(Q,B,J){var G,F,E,M,N,P,D=YAHOO.lang,L=[],C,H="dump",K=" ",A="{",O="}";for(;;){G=Q.lastIndexOf(A);if(G<0){break;}F=Q.indexOf(O,G);if(G+1>=F){break;}C=Q.substring(G+1,F);M=C;P=null;E=M.indexOf(K);if(E>-1){P=M.substring(E+1);M=M.substring(0,E);}N=B[M];if(J){N=J(M,N,P);}if(D.isObject(N)){if(D.isArray(N)){N=D.dump(N,parseInt(P,10));}else{P=P||"";var I=P.indexOf(H);if(I>-1){P=P.substring(4);}if(N.toString===Object.prototype.toString||I>-1){N=D.dump(N,parseInt(P,10));}else{N=N.toString();}}}else{if(!D.isString(N)&&!D.isNumber(N)){N="~-"+L.length+"-~";L[L.length]=C;}}Q=Q.substring(0,G)+N+Q.substring(F+1);}for(G=L.length-1;G>=0;G=G-1){Q=Q.replace(new RegExp("~-"+G+"-~"),"{"+L[G]+"}","g");}return Q;},trim:function(A){try{return A.replace(/^\s+|\s+$/g,"");}catch(B){return A;}},merge:function(){var D={},B=arguments;for(var C=0,A=B.length;C<A;C=C+1){YAHOO.lang.augmentObject(D,B[C],true);}return D;},later:function(H,B,I,D,E){H=H||0;B=!
 B||{};var C=I,G=D,F,A;if(YAHOO.lang.isString(I)){C=B[I];}if(!C){throw new TypeError("method undefined");}if(!YAHOO.lang.isArray(G)){G=[D];}F=function(){C.apply(B,G);};A=(E)?setInterval(F,H):setTimeout(F,H);return{interval:E,cancel:function(){if(this.interval){clearInterval(A);}else{clearTimeout(A);}}};},isValue:function(B){var A=YAHOO.lang;return(A.isObject(B)||A.isString(B)||A.isNumber(B)||A.isBoolean(B));}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augment=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.4.1",build:"742"});(function(){var B=YAHOO.util,L,J,H=0,K={},F={},N=window.document;var C=YAHOO.env.ua.opera,M=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,G=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i};var O=function(Q){if(!E.HYPHEN.test(Q)){return Q;}if(K[Q]){return K[Q];}var R=Q;while(E.HYPHEN.exec(R)){R=R.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}K[Q]=R;retur!
 n R;};var P=function(R){var Q=F[R];if(!Q){Q=new RegExp("(?:^|\!
 \s+)"+R+
"(?:\\s+|$)");F[R]=Q;}return Q;};if(N.defaultView&&N.defaultView.getComputedStyle){L=function(Q,T){var S=null;if(T=="float"){T="cssFloat";}var R=N.defaultView.getComputedStyle(Q,"");if(R){S=R[O(T)];}return Q.style[T]||S;};}else{if(N.documentElement.currentStyle&&G){L=function(Q,S){switch(O(S)){case"opacity":var U=100;try{U=Q.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(T){try{U=Q.filters("alpha").opacity;}catch(T){}}return U/100;case"float":S="styleFloat";default:var R=Q.currentStyle?Q.currentStyle[S]:null;return(Q.style[S]||R);}};}else{L=function(Q,R){return Q.style[R];};}}if(G){J=function(Q,R,S){switch(R){case"opacity":if(YAHOO.lang.isString(Q.style.filter)){Q.style.filter="alpha(opacity="+S*100+")";if(!Q.currentStyle||!Q.currentStyle.hasLayout){Q.style.zoom=1;}}break;case"float":R="styleFloat";default:Q.style[R]=S;}};}else{J=function(Q,R,S){if(R=="float"){R="cssFloat";}Q.style[R]=S;};}var D=function(Q,R){return Q&&Q.nodeType==1&&(!R||R(Q));};YAHOO.util.Dom={!
 get:function(S){if(S&&(S.tagName||S.item)){return S;}if(YAHOO.lang.isString(S)||!S){return N.getElementById(S);}if(S.length!==undefined){var T=[];for(var R=0,Q=S.length;R<Q;++R){T[T.length]=B.Dom.get(S[R]);}return T;}return S;},getStyle:function(Q,S){S=O(S);var R=function(T){return L(T,S);};return B.Dom.batch(Q,R,B.Dom,true);},setStyle:function(Q,S,T){S=O(S);var R=function(U){J(U,S,T);};B.Dom.batch(Q,R,B.Dom,true);},getXY:function(Q){var R=function(S){if((S.parentNode===null||S.offsetParent===null||this.getStyle(S,"display")=="none")&&S!=S.ownerDocument.body){return false;}return I(S);};return B.Dom.batch(Q,R,B.Dom,true);},getX:function(Q){var R=function(S){return B.Dom.getXY(S)[0];};return B.Dom.batch(Q,R,B.Dom,true);},getY:function(Q){var R=function(S){return B.Dom.getXY(S)[1];};return B.Dom.batch(Q,R,B.Dom,true);},setXY:function(Q,T,S){var R=function(W){var V=this.getStyle(W,"position");if(V=="static"){this.setStyle(W,"position","relative");V="relative";}var Y=this.getXY!
 (W);if(Y===false){return false;}var X=[parseInt(this.getStyle(!
 W,"left"
),10),parseInt(this.getStyle(W,"top"),10)];if(isNaN(X[0])){X[0]=(V=="relative")?0:W.offsetLeft;}if(isNaN(X[1])){X[1]=(V=="relative")?0:W.offsetTop;}if(T[0]!==null){W.style.left=T[0]-Y[0]+X[0]+"px";}if(T[1]!==null){W.style.top=T[1]-Y[1]+X[1]+"px";}if(!S){var U=this.getXY(W);if((T[0]!==null&&U[0]!=T[0])||(T[1]!==null&&U[1]!=T[1])){this.setXY(W,T,true);}}};B.Dom.batch(Q,R,B.Dom,true);},setX:function(R,Q){B.Dom.setXY(R,[Q,null]);},setY:function(Q,R){B.Dom.setXY(Q,[null,R]);},getRegion:function(Q){var R=function(S){if((S.parentNode===null||S.offsetParent===null||this.getStyle(S,"display")=="none")&&S!=N.body){return false;}var T=B.Region.getRegion(S);return T;};return B.Dom.batch(Q,R,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(U,Y,V,W){Y=Y||"*";V=(V)?B.Dom.get(V):null||N;if(!V){return[];}var R=[],Q=V.getElementsByTagName(Y),X=P(U);for(var S=0,T=Q.length;S<T;!
 ++S){if(X.test(Q[S].className)){R[R.length]=Q[S];if(W){W.call(Q[S],Q[S]);}}}return R;},hasClass:function(S,R){var Q=P(R);var T=function(U){return Q.test(U.className);};return B.Dom.batch(S,T,B.Dom,true);},addClass:function(R,Q){var S=function(T){if(this.hasClass(T,Q)){return false;}T.className=YAHOO.lang.trim([T.className,Q].join(" "));return true;};return B.Dom.batch(R,S,B.Dom,true);},removeClass:function(S,R){var Q=P(R);var T=function(U){if(!this.hasClass(U,R)){return false;}var V=U.className;U.className=V.replace(Q," ");if(this.hasClass(U,R)){this.removeClass(U,R);}U.className=YAHOO.lang.trim(U.className);return true;};return B.Dom.batch(S,T,B.Dom,true);},replaceClass:function(T,R,Q){if(!Q||R===Q){return false;}var S=P(R);var U=function(V){if(!this.hasClass(V,R)){this.addClass(V,Q);return true;}V.className=V.className.replace(S," "+Q+" ");if(this.hasClass(V,R)){this.replaceClass(V,R,Q);}V.className=YAHOO.lang.trim(V.className);return true;};return B.Dom.batch(T,U,B.Dom,t!
 rue);},generateId:function(Q,S){S=S||"yui-gen";var R=function(!
 T){if(T&
&T.id){return T.id;}var U=S+H++;if(T){T.id=U;}return U;};return B.Dom.batch(Q,R,B.Dom,true)||R.apply(B.Dom,arguments);},isAncestor:function(Q,R){Q=B.Dom.get(Q);R=B.Dom.get(R);if(!Q||!R){return false;}if(Q.contains&&R.nodeType&&!M){return Q.contains(R);}else{if(Q.compareDocumentPosition&&R.nodeType){return !!(Q.compareDocumentPosition(R)&16);}else{if(R.nodeType){return !!this.getAncestorBy(R,function(S){return S==Q;});}}}return false;},inDocument:function(Q){return this.isAncestor(N.documentElement,Q);},getElementsBy:function(X,R,S,U){R=R||"*";S=(S)?B.Dom.get(S):null||N;if(!S){return[];}var T=[],W=S.getElementsByTagName(R);for(var V=0,Q=W.length;V<Q;++V){if(X(W[V])){T[T.length]=W[V];if(U){U(W[V]);}}}return T;},batch:function(U,X,W,S){U=(U&&(U.tagName||U.item))?U:B.Dom.get(U);if(!U||!X){return false;}var T=(S)?W:window;if(U.tagName||U.length===undefined){return X.call(T,U,W);}var V=[];for(var R=0,Q=U.length;R<Q;++R){V[V.length]=X.call(T,U[R],W);}return V;},getDocumentHeight:fu!
 nction(){var R=(N.compatMode!="CSS1Compat")?N.body.scrollHeight:N.documentElement.scrollHeight;var Q=Math.max(R,B.Dom.getViewportHeight());return Q;},getDocumentWidth:function(){var R=(N.compatMode!="CSS1Compat")?N.body.scrollWidth:N.documentElement.scrollWidth;var Q=Math.max(R,B.Dom.getViewportWidth());return Q;},getViewportHeight:function(){var Q=self.innerHeight;var R=N.compatMode;if((R||G)&&!C){Q=(R=="CSS1Compat")?N.documentElement.clientHeight:N.body.clientHeight;
+}return Q;},getViewportWidth:function(){var Q=self.innerWidth;var R=N.compatMode;if(R||G){Q=(R=="CSS1Compat")?N.documentElement.clientWidth:N.body.clientWidth;}return Q;},getAncestorBy:function(Q,R){while(Q=Q.parentNode){if(D(Q,R)){return Q;}}return null;},getAncestorByClassName:function(R,Q){R=B.Dom.get(R);if(!R){return null;}var S=function(T){return B.Dom.hasClass(T,Q);};return B.Dom.getAncestorBy(R,S);},getAncestorByTagName:function(R,Q){R=B.Dom.get(R);if(!R){return null;}var S=function(T){return T.tagName&&T.tagName.toUpperCase()==Q.toUpperCase();};return B.Dom.getAncestorBy(R,S);},getPreviousSiblingBy:function(Q,R){while(Q){Q=Q.previousSibling;if(D(Q,R)){return Q;}}return null;},getPreviousSibling:function(Q){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getPreviousSiblingBy(Q);},getNextSiblingBy:function(Q,R){while(Q){Q=Q.nextSibling;if(D(Q,R)){return Q;}}return null;},getNextSibling:function(Q){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getNextSiblingBy(Q);},g!
 etFirstChildBy:function(Q,S){var R=(D(Q.firstChild,S))?Q.firstChild:null;return R||B.Dom.getNextSiblingBy(Q.firstChild,S);},getFirstChild:function(Q,R){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getFirstChildBy(Q);},getLastChildBy:function(Q,S){if(!Q){return null;}var R=(D(Q.lastChild,S))?Q.lastChild:null;return R||B.Dom.getPreviousSiblingBy(Q.lastChild,S);},getLastChild:function(Q){Q=B.Dom.get(Q);return B.Dom.getLastChildBy(Q);},getChildrenBy:function(R,T){var S=B.Dom.getFirstChildBy(R,T);var Q=S?[S]:[];B.Dom.getNextSiblingBy(S,function(U){if(!T||T(U)){Q[Q.length]=U;}return false;});return Q;},getChildren:function(Q){Q=B.Dom.get(Q);if(!Q){}return B.Dom.getChildrenBy(Q);},getDocumentScrollLeft:function(Q){Q=Q||N;return Math.max(Q.documentElement.scrollLeft,Q.body.scrollLeft);},getDocumentScrollTop:function(Q){Q=Q||N;return Math.max(Q.documentElement.scrollTop,Q.body.scrollTop);},insertBefore:function(R,Q){R=B.Dom.get(R);Q=B.Dom.get(Q);if(!R||!Q||!Q.parentNode){return n!
 ull;}return Q.parentNode.insertBefore(R,Q);},insertAfter:funct!
 ion(R,Q)
{R=B.Dom.get(R);Q=B.Dom.get(Q);if(!R||!Q||!Q.parentNode){return null;}if(Q.nextSibling){return Q.parentNode.insertBefore(R,Q.nextSibling);}else{return Q.parentNode.appendChild(R);}},getClientRegion:function(){var S=B.Dom.getDocumentScrollTop(),R=B.Dom.getDocumentScrollLeft(),T=B.Dom.getViewportWidth()+R,Q=B.Dom.getViewportHeight()+S;return new B.Region(S,T,Q,R);}};var I=function(){if(N.documentElement.getBoundingClientRect){return function(R){var S=R.getBoundingClientRect();var Q=R.ownerDocument;return[S.left+B.Dom.getDocumentScrollLeft(Q),S.top+B.Dom.getDocumentScrollTop(Q)];};}else{return function(S){var T=[S.offsetLeft,S.offsetTop];var R=S.offsetParent;var Q=(M&&B.Dom.getStyle(S,"position")=="absolute"&&S.offsetParent==S.ownerDocument.body);if(R!=S){while(R){T[0]+=R.offsetLeft;T[1]+=R.offsetTop;if(!Q&&M&&B.Dom.getStyle(R,"position")=="absolute"){Q=true;}R=R.offsetParent;}}if(Q){T[0]-=S.ownerDocument.body.offsetLeft;T[1]-=S.ownerDocument.body.offsetTop;}R=S.parentNode;whil!
 e(R.tagName&&!E.ROOT_TAG.test(R.tagName)){if(B.Dom.getStyle(R,"display").search(/^inline|table-row.*$/i)){T[0]-=R.scrollLeft;T[1]-=R.scrollTop;}R=R.parentNode;}return T;};}}();})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO!
 .util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=f!
 unction(
){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.4.1",build:"742"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new !
 Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){var D=this.subscribers.length;if(!D&&this.silent){return true;}var H=[],F=true,C,I=false;for(C=0;C<arguments.length;++C){H.push(arguments[C]);}if(!this.silent){}for(C=0;C<D;++C){var L=this.subscribers[C];if(!L){I=true;}else{if(!this.silent){}var K=L.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var A=null;if(H.length>0){A=H[0];}try{F=L.fn.call(K,A,L.obj);}catch(E){this.lastError=E;}}else{try{F=L.fn.call(K,this.type,H,L.obj);}catch(G){this.lastError=G;}}if(false===F){if(!this.silent){}return false;}}}if(I){var J=[],B=this.subscribers;for(C=0,D=B.length;C<D;C=C+!
 1){J.push(B[C]);}this.subscribers=J;}return true;},unsubscribe!
 All:func
tion(){for(var B=0,A=this.subscribers.length;B<A;++B){this._delete(A-1-B);}this.subscribers=[];return B;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers[A]=null;},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,6!
 3277:34,25:9};return{POLL_RETRYS:4000,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,startInterval:function(){if(!this._interval){var K=this;var L=function(){K._tryPreloadAttach();};this._interval=setInterval(L,this.POLL_INTERVAL);}},onAvailable:function(P,M,Q,O,N){var K=(YAHOO.lang.isString(P))?[P]:P;for(var L=0;L<K.length;L=L+1){F.push({id:K[L],fn:M,obj:Q,override:O,checkReady:N});}C=this.POLL_RETRYS;this.startInterval();},onContentReady:function(M,K,N,L){this.onAvailable(M,K,N,L,true);},onDOMReady:function(K,M,L){if(this.DOMReady){setTimeout(function(){var N=window;if(L){if(L===true){N=M;}else{N=L;}}K.call(N,"DOMReady",[],M);},0);}else{this.DOMReadyEvent.subscribe(K,M,L);}},addListener:function(M,K,V,Q,L){if(!V||!V.call){return false;}if(this._isValidCollection(M)){var W=true;for(var R=0,T=M.length;R<T;++R)!
 {W=this.on(M[R],K,V,Q,L)&&W;}return W;}else{if(YAHOO.lang.isSt!
 ring(M))
{var P=this.getEl(M);if(P){M=P;}else{this.onAvailable(M,function(){YAHOO.util.Event.on(M,K,V,Q,L);});return true;}}}if(!M){return false;}if("unload"==K&&Q!==this){J[J.length]=[M,K,V,Q,L];return true;}var Y=M;if(L){if(L===true){Y=Q;}else{Y=L;}}var N=function(Z){return V.call(Y,YAHOO.util.Event.getEvent(Z,M),Q);};var X=[M,K,V,N,Y,Q,L];var S=I.length;I[S]=X;if(this.useLegacyEvent(M,K)){var O=this.getLegacyIndex(M,K);if(O==-1||M!=G[O][0]){O=G.length;B[M.id+K]=O;G[O]=[M,K,M["on"+K]];E[O]=[];M["on"+K]=function(Z){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(Z),O);};}E[O].push(X);}else{try{this._simpleAdd(M,K,N,false);}catch(U){this.lastError=U;this.removeListener(M,K,V);return false;}}return true;},fireLegacyEvent:function(O,M){var Q=true,K,S,R,T,P;S=E[M];for(var L=0,N=S.length;L<N;++L){R=S[L];if(R&&R[this.WFN]){T=R[this.ADJ_SCOPE];P=R[this.WFN].call(T,O);Q=(Q&&P);}}K=G[M];if(K&&K[2]){K[2](O);}return Q;},getLegacyIndex:function(L,M){var K=this.generateId(L)+M;if(type!
 of B[K]=="undefined"){return -1;}else{return B[K];}},useLegacyEvent:function(L,M){if(this.webkit&&("click"==M||"dblclick"==M)){var K=parseInt(this.webkit,10);if(!isNaN(K)&&K<418){return true;}}return false;},removeListener:function(L,K,T){var O,R,V;if(typeof L=="string"){L=this.getEl(L);}else{if(this._isValidCollection(L)){var U=true;for(O=0,R=L.length;O<R;++O){U=(this.removeListener(L[O],K,T)&&U);}return U;}}if(!T||!T.call){return this.purgeElement(L,false,K);}if("unload"==K){for(O=0,R=J.length;O<R;O++){V=J[O];if(V&&V[0]==L&&V[1]==K&&V[2]==T){J[O]=null;return true;}}return false;}var P=null;var Q=arguments[3];if("undefined"===typeof Q){Q=this._getCacheIndex(L,K,T);}if(Q>=0){P=I[Q];}if(!L||!P){return false;}if(this.useLegacyEvent(L,K)){var N=this.getLegacyIndex(L,K);var M=E[N];if(M){for(O=0,R=M.length;O<R;++O){V=M[O];if(V&&V[this.EL]==L&&V[this.TYPE]==K&&V[this.FN]==T){M[O]=null;break;}}}}else{try{this._simpleRemove(L,K,P[this.WFN],false);}catch(S){this.lastError=S;return f!
 alse;}}delete I[Q][this.WFN];delete I[Q][this.FN];I[Q]=null;re!
 turn tru
e;},getTarget:function(M,L){var K=M.target||M.srcElement;return this.resolveTextNode(K);},resolveTextNode:function(K){if(K&&3==K.nodeType){return K.parentNode;}else{return K;}},getPageX:function(L){var K=L.pageX;if(!K&&0!==K){K=L.clientX||0;if(this.isIE){K+=this._getScrollLeft();}}return K;},getPageY:function(K){var L=K.pageY;if(!L&&0!==L){L=K.clientY||0;if(this.isIE){L+=this._getScrollTop();}}return L;},getXY:function(K){return[this.getPageX(K),this.getPageY(K)];
+},getRelatedTarget:function(L){var K=L.relatedTarget;if(!K){if(L.type=="mouseout"){K=L.toElement;}else{if(L.type=="mouseover"){K=L.fromElement;}}}return this.resolveTextNode(K);},getTime:function(M){if(!M.time){var L=new Date().getTime();try{M.time=L;}catch(K){this.lastError=K;return L;}}return M.time;},stopEvent:function(K){this.stopPropagation(K);this.preventDefault(K);},stopPropagation:function(K){if(K.stopPropagation){K.stopPropagation();}else{K.cancelBubble=true;}},preventDefault:function(K){if(K.preventDefault){K.preventDefault();}else{K.returnValue=false;}},getEvent:function(M,K){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break;}N=N.caller;}}return L;},getCharCode:function(L){var K=L.keyCode||L.charCode||0;if(YAHOO.env.ua.webkit&&(K in D)){K=D[K];}return K;},_getCacheIndex:function(O,P,N){for(var M=0,L=I.length;M<L;++M){var K=I[M];if(K&&K[this.FN]==N&&K[this.EL]==O&&K[this.TYPE]==P){return M;}}return !
 -1;},generateId:function(K){var L=K.id;if(!L){L="yuievtautoid-"+A;++A;K.id=L;}return L;},_isValidCollection:function(L){try{return(L&&typeof L!=="string"&&L.length&&!L.tagName&&!L.alert&&typeof L[0]!=="undefined");}catch(K){return false;}},elCache:{},getEl:function(K){return(typeof K==="string")?document.getElementById(K):K;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(L){if(!H){H=true;var K=YAHOO.util.Event;K._ready();K._tryPreloadAttach();}},_ready:function(L){var K=YAHOO.util.Event;if(!K.DOMReady){K.DOMReady=true;K.DOMReadyEvent.fire();K._simpleRemove(document,"DOMContentLoaded",K._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}if(this.isIE){if(!this.DOMReady){this.startInterval();return false;}}this.locked=true;var P=!H;if(!P){P=(C>0);}var O=[];var Q=function(S,T){var R=S;if(T.override){if(T.override===true){R=T.obj;}else{R=T.override;}}T.fn.call(R,T.obj);};var L,K,N,M;for(L=0,K=F.length;L<K;++L)!
 {N=F[L];if(N&&!N.checkReady){M=this.getEl(N.id);if(M){Q(M,N);F!
 [L]=null
;}else{O.push(N);}}}for(L=0,K=F.length;L<K;++L){N=F[L];if(N&&N.checkReady){M=this.getEl(N.id);if(M){if(H||M.nextSibling){Q(M,N);F[L]=null;}}else{O.push(N);}}}C=(O.length===0)?0:C-1;if(P){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;return true;},purgeElement:function(O,P,R){var M=(YAHOO.lang.isString(O))?this.getEl(O):O;var Q=this.getListeners(M,R),N,K;if(Q){for(N=0,K=Q.length;N<K;++N){var L=Q[N];this.removeListener(M,L.type,L.fn,L.index);}}if(P&&M&&M.childNodes){for(N=0,K=M.childNodes.length;N<K;++N){this.purgeElement(M.childNodes[N],P,R);}}},getListeners:function(M,K){var P=[],L;if(!K){L=[I,J];}else{if(K==="unload"){L=[J];}else{L=[I];}}var R=(YAHOO.lang.isString(M))?this.getEl(M):M;for(var O=0;O<L.length;O=O+1){var T=L[O];if(T&&T.length>0){for(var Q=0,S=T.length;Q<S;++Q){var N=T[Q];if(N&&N[this.EL]===R&&(!K||K===N[this.TYPE])){P.push({type:N[this.TYPE],fn:N[this.FN],obj:N[this.OBJ],adjust:N[this.OVERRIDE],scope:N[this.ADJ_!
 SCOPE],index:Q});}}}}return(P.length)?P:null;},_unload:function(R){var Q=YAHOO.util.Event,O,N,L,K,M;for(O=0,K=J.length;O<K;++O){L=J[O];if(L){var P=window;if(L[Q.ADJ_SCOPE]){if(L[Q.ADJ_SCOPE]===true){P=L[Q.UNLOAD_OBJ];}else{P=L[Q.ADJ_SCOPE];}}L[Q.FN].call(P,Q.getEvent(R,L[Q.EL]),L[Q.UNLOAD_OBJ]);J[O]=null;L=null;P=null;}}J=null;if(YAHOO.env.ua.ie&&I&&I.length>0){N=I.length;while(N){M=N-1;L=I[M];if(L){Q.removeListener(L[Q.EL],L[Q.TYPE],L[Q.FN],M);}N--;}L=null;}G=null;Q._simpleRemove(window,"unload",Q._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft];}else{if(L){return[L.scrollTop,L.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(M,N,L,K){M.addEventListener(N,L,(K));};}else{if(window.attachEvent){retur!
 n function(M,N,L,K){M.attachEvent("on"+N,L);};}else{return fun!
 ction(){
};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(M,N,L,K){M.removeEventListener(N,L,(K));};}else{if(window.detachEvent){return function(L,M,K){L.detachEvent("on"+M,K);};}else{return function(){};}}}()};}();(function(){var A=YAHOO.util.Event;A.on=A.addListener;if(A.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);A._dri=setInterval(function(){var C=document.createElement("p");try{C.doScroll("left");clearInterval(A._dri);A._dri=null;A._ready();C=null;}catch(B){C=null;}},A.POLL_INTERVAL);}else{if(A.webkit){A._dri=setInterval(function(){var B=document.readyState;if("loaded"==B||"complete"==B){clearInterval(A._dri);A._dri=null;A._ready();}},A.POLL_INTERVAL);}else{A._simpleAdd(document,"DOMContentLoaded",A._ready);}}A._simpleAdd(window,"load",A._load);A._simpleAdd(window,"unload",A._unload);A._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null!
 ,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};
+var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN;}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(J,I){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(J.shiftKey==F.shift&&J.altKey==F.alt&!
 &J.ctrlKey==F.ctrl){var G;if(F.keys instanceof Array){for(var H=0;H<F.keys.length;H++){G=F.keys[H];if(G==J.charCode){D.fire(J.charCode,J);break;}else{if(G==J.keyCode){D.fire(J.keyCode,J);break;}}}}else{G=F.keys;if(G==J.charCode){D.fire(J.charCode,J);}else{if(G==J.keyCode){D.fire(J.keyCode,J);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO!
 .register("event",YAHOO.util.Event,{version:"2.4.1",build:"742!
 "});YAHO
O.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(B){var A=YAHOO.util.Event.getTarget(B);if(A.type&&A.type.toLowerCase()=="submit"){YAHOO.util.Connect._submitElementValue=encodeURIComponent(A.name)+"="+encodeURIComponent(A.value);}});return true;}return false;})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEv!
 ent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(A){this._msxml_progid.unshift(A);},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A;}else{if(typeof A=="boolean"){this._use_default_post_header=A;}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A;}else{this._use_default_xhr_header=A;}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A;}},createXhrObject:function(E){var D,A;try{A=new XMLHttpRequest();D={conn:A,tId:E};}catch(C){for(var B=0;B<this._msxml_progid.length;++B){try{A=new ActiveX!
 Object(this._msxml_progid[B]);D={conn:A,tId:E};break;}catch(C)!
 {}}}fina
lly{return D;}},getConnectionObject:function(A){var C;var D=this._transaction_id;try{if(!A){C=this.createXhrObject(D);}else{C={};C.tId=D;C.isUpload=true;}if(C){this._transaction_id++;}}catch(B){}finally{return C;}},asyncRequest:function(F,C,E,A){var D=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var B=(E&&E.argument)?E.argument:null;if(!D){return null;}else{if(E&&E.customevents){this.initCustomEvents(D,E);}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(D,E,C,A);return D;}if(F.toUpperCase()=="GET"){if(this._sFormData.length!==0){C+=((C.indexOf("?")==-1)?"?":"&")+this._sFormData;}}else{if(F.toUpperCase()=="POST"){A=A?this._sFormData+"&"+A:this._sFormData;}}}if(F.toUpperCase()=="GET"&&(E&&E.cache===false)){C+=((C.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString();}D.conn.open(F,C,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xh!
 r_header,true);}}if((F.toUpperCase()=="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header);}if(this._has_default_headers||this._has_http_headers){this.setHeader(D);}this.handleReadyState(D,E);D.conn.send(A||null);if(this._isFormSubmit===true){this.resetFormState();}this.startEvent.fire(D,B);if(D.startEvent){D.startEvent.fire(D,B);}return D;}},initCustomEvents:function(A,C){for(var B in C.customevents){if(this._customEvents[B][0]){A[this._customEvents[B][0]]=new YAHOO.util.CustomEvent(this._customEvents[B][1],(C.scope)?C.scope:null);A[this._customEvents[B][0]].subscribe(C.customevents[B]);}}},handleReadyState:function(C,D){var B=this;var A=(D&&D.argument)?D.argument:null;if(D&&D.timeout){this._timeOut[C.tId]=window.setTimeout(function(){B.abort(C,D,true);},D.timeout);}this._poll[C.tId]=window.setInterval(function(){if(C.conn&&C.conn.readyState===4){window.clearInterval(B._poll[C.tId]);delete B._poll[C.t!
 Id];if(D&&D.timeout){window.clearTimeout(B._timeOut[C.tId]);de!
 lete B._
timeOut[C.tId];}B.completeEvent.fire(C,A);if(C.completeEvent){C.completeEvent.fire(C,A);}B.handleTransactionResponse(C,D);}},this._polling_interval);},handleTransactionResponse:function(F,G,A){var D,C;var B=(G&&G.argument)?G.argument:null;try{if(F.conn.status!==undefined&&F.conn.status!==0){D=F.conn.status;}else{D=13030;}}catch(E){D=13030;}if(D>=200&&D<300||D===1223){C=this.createResponseObject(F,B);if(G&&G.success){if(!G.scope){G.success(C);}else{G.success.apply(G.scope,[C]);}}this.successEvent.fire(C);if(F.successEvent){F.successEvent.fire(C);}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:C=this.createExceptionObject(F.tId,B,(A?A:false));if(G&&G.failure){if(!G.scope){G.failure(C);}else{G.failure.apply(G.scope,[C]);}}break;default:C=this.createResponseObject(F,B);if(G&&G.failure){if(!G.scope){G.failure(C);}else{G.failure.apply(G.scope,[C]);}}}this.failureEvent.fire(C);if(F.failureEvent){F.failureEvent.fire(C);}}this.releaseObject(F);C=nul!
 l;},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E<F.length;E++){var B=F[E].indexOf(":");if(B!=-1){I[F[E].substring(0,B)]=F[E].substring(B+2);}}}catch(H){}D.tId=A.tId;D.status=(A.conn.status==1223)?204:A.conn.status;D.statusText=(A.conn.status==1223)?"No Content":A.conn.statusText;D.getResponseHeader=I;D.getAllResponseHeaders=C;D.responseText=A.conn.responseText;D.responseXML=A.conn.responseXML;if(G){D.argument=G;}return D;},createExceptionObject:function(H,D,A){var F=0;var G="communication failure";var C=-1;var B="transaction aborted";var E={};E.tId=H;if(A){E.status=C;E.statusText=B;}else{E.status=F;E.statusText=G;}if(D){E.argument=D;}return E;},initHeader:function(A,D,C){var B=(C)?this._default_headers:this._http_headers;B[A]=D;if(C){this._has_default_headers=true;}else{this._has_http_headers=true;}},setHeader:function(A){if(this._has_default_headers){for(var B in this._default_headers){if(YA!
 HOO.lang.hasOwnProperty(this._default_headers,B)){A.conn.setRe!
 questHea
der(B,this._default_headers[B]);
+}}}if(this._has_http_headers){for(var B in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,B)){A.conn.setRequestHeader(B,this._http_headers[B]);}}delete this._http_headers;this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false;},setForm:function(K,E,B){this.resetFormState();var J;if(typeof K=="string"){J=(document.getElementById(K)||document.forms[K]);}else{if(typeof K=="object"){J=K;}else{return ;}}if(E){var F=this.createFrame(B?B:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=J;return ;}var A,I,G,L;var H=false;for(var D=0;D<J.elements.length;D++){A=J.elements[D];L=A.disabled;I=A.name;G=A.value;if(!L&&I){switch(A.type){case"select-one":case"select-multiple":for(var C=0;C<A.options.length;C++){if(A.options[C].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(A.options[C].a!
 ttributes["value"].specified?A.options[C].value:A.options[C].text)+"&";}else{this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(A.options[C].hasAttribute("value")?A.options[C].value:A.options[C].text)+"&";}}}break;case"radio":case"checkbox":if(A.checked){this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(G)+"&";}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(H===false){if(this._hasSubmitListener&&this._submitElementValue){this._sFormData+=this._submitElementValue+"&";}else{this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(G)+"&";}H=true;}break;default:this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(G)+"&";}}}this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);this.initHeader("Content-Type",this._default_form_header);return this._sFormData;},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";},c!
 reateFrame:function(A){var B="yuiIO"+this._transaction_id;var !
 C;if(win
dow.ActiveXObject){C=document.createElement("<iframe id=\""+B+"\" name=\""+B+"\" />");if(typeof A=="boolean"){C.src="javascript:false";}else{if(typeof secureURI=="string"){C.src=A;}}}else{C=document.createElement("iframe");C.id=B;C.name=B;}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C);},appendPostData:function(A){var D=[];var B=A.split("&");for(var C=0;C<B.length;C++){var E=B[C].indexOf("=");if(E!=-1){D[C]=document.createElement("input");D[C].type="hidden";D[C].name=B[C].substring(0,E);D[C].value=B[C].substring(E+1);this._formNode.appendChild(D[C]);}}return D;},uploadFile:function(D,M,E,C){var N=this;var H="yuiIO"+D.tId;var I="multipart/form-data";var K=document.getElementById(H);var J=(M&&M.argument)?M.argument:null;var B={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",E);this._formNode.setAttri!
 bute("method","POST");this._formNode.setAttribute("target",H);if(this._formNode.encoding){this._formNode.setAttribute("encoding",I);}else{this._formNode.setAttribute("enctype",I);}if(C){var L=this.appendPostData(C);}this._formNode.submit();this.startEvent.fire(D,J);if(D.startEvent){D.startEvent.fire(D,J);}if(M&&M.timeout){this._timeOut[D.tId]=window.setTimeout(function(){N.abort(D,M,true);},M.timeout);}if(L&&L.length>0){for(var G=0;G<L.length;G++){this._formNode.removeChild(L[G]);}}for(var A in B){if(YAHOO.lang.hasOwnProperty(B,A)){if(B[A]){this._formNode.setAttribute(A,B[A]);}else{this._formNode.removeAttribute(A);}}}this.resetFormState();var F=function(){if(M&&M.timeout){window.clearTimeout(N._timeOut[D.tId]);delete N._timeOut[D.tId];}N.completeEvent.fire(D,J);if(D.completeEvent){D.completeEvent.fire(D,J);}var P={};P.tId=D.tId;P.argument=M.argument;try{P.responseText=K.contentWindow.document.body?K.contentWindow.document.body.innerHTML:K.contentWindow.document.documentEle!
 ment.textContent;P.responseXML=K.contentWindow.document.XMLDoc!
 ument?K.
contentWindow.document.XMLDocument:K.contentWindow.document;}catch(O){}if(M&&M.upload){if(!M.scope){M.upload(P);}else{M.upload.apply(M.scope,[P]);}}N.uploadEvent.fire(P);if(D.uploadEvent){D.uploadEvent.fire(P);}YAHOO.util.Event.removeListener(K,"load",F);setTimeout(function(){document.body.removeChild(K);N.releaseObject(D);},100);};YAHOO.util.Event.addListener(K,"load",F);},abort:function(E,G,A){var D;var B=(G&&G.argument)?G.argument:null;if(E&&E.conn){if(this.isCallInProgress(E)){E.conn.abort();window.clearInterval(this._poll[E.tId]);delete this._poll[E.tId];if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId];}D=true;}}else{if(E&&E.isUpload===true){var C="yuiIO"+E.tId;var F=document.getElementById(C);if(F){YAHOO.util.Event.removeListener(F,"load");document.body.removeChild(F);if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId];}D=true;}}else{D=false;}}if(D===true){this.abortEvent.fire(E,B);if(E.abortEvent){E.abortEvent.fire(E,!
 B);}this.handleTransactionResponse(E,G,true);}return D;},isCallInProgress:function(B){if(B&&B.conn){return B.conn.readyState!==4&&B.conn.readyState!==0;}else{if(B&&B.isUpload===true){var A="yuiIO"+B.tId;return document.getElementById(A)?true:false;}else{return false;}}},releaseObject:function(A){if(A&&A.conn){A.conn=null;A=null;}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.4.1",build:"742"});YAHOO.util.Anim=function(B,A,C,D){if(!B){}this.init(B,A,C,D);};YAHOO.util.Anim.prototype={toString:function(){var A=this.getEl();var B=A.id||A.tagName||A;return("Anim "+B);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(A,C,B){return this.method(this.currentFrame,C,B-C,this.totalFrames);},setAttribute:function(A,C,B){if(this.patterns.noNegatives.test(A)){C=(C>0)?C:0;}YAHOO.util.Dom.setStyle(this.ge!
 tEl(),A,C+B);},getAttribute:function(A){var C=this.getEl();var!
  E=YAHOO
.util.Dom.getStyle(C,A);if(E!=="auto"&&!this.patterns.offsetUnit.test(E)){return parseFloat(E);}var B=this.patterns.offsetAttribute.exec(A)||[];var F=!!(B[3]);var D=!!(B[2]);if(D||(YAHOO.util.Dom.getStyle(C,"position")=="absolute"&&F)){E=C["offset"+B[0].charAt(0).toUpperCase()+B[0].substr(1)];}else{E=0;}return E;},getDefaultUnit:function(A){if(this.patterns.defaultUnit.test(A)){return"px";}return"";},setRuntimeAttribute:function(B){var G;var C;var D=this.attributes;this.runtimeAttributes[B]={};var F=function(H){return(typeof H!=="undefined");};if(!F(D[B]["to"])&&!F(D[B]["by"])){return false;}G=(F(D[B]["from"]))?D[B]["from"]:this.getAttribute(B);if(F(D[B]["to"])){C=D[B]["to"];}else{if(F(D[B]["by"])){if(G.constructor==Array){C=[];for(var E=0,A=G.length;E<A;++E){C[E]=G[E]+D[B]["by"][E]*1;}}else{C=G+D[B]["by"]*1;}}}this.runtimeAttributes[B].start=G;this.runtimeAttributes[B].end=C;this.runtimeAttributes[B].unit=(F(D[B].unit))?D[B]["unit"]:this.getDefaultUnit(B);return true;},init!
 :function(C,H,G,A){var B=false;var D=null;var F=0;C=YAHOO.util.Dom.get(C);this.attributes=H||{};this.duration=!YAHOO.lang.isUndefined(G)?G:1;this.method=A||YAHOO.util.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=YAHOO.util.AnimMgr.fps;this.setEl=function(K){C=YAHOO.util.Dom.get(K);};this.getEl=function(){return C;};this.isAnimated=function(){return B;};this.getStartTime=function(){return D;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(YAHOO.util.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}YAHOO.util.AnimMgr.registerElement(this);return true;};this.stop=function(K){if(!this.isAnimated()){return false;}if(K){this.currentFrame=this.totalFrames;this._onTween.fire();}YAHOO.util.AnimMgr.stop(this);};var J=function(){this.onStart.fire();this.runtimeAttributes={};for(var K in this.attributes){!
 this.setRuntimeAttribute(K);}B=true;F=0;D=new Date();};var I=f!
 unction(
){var M={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};M.toString=function(){return("duration: "+M.duration+", currentFrame: "+M.currentFrame);};this.onTween.fire(M);var L=this.runtimeAttributes;for(var K in L){this.setAttribute(K,this.doMethod(K,L[K].start,L[K].end),L[K].unit);}F+=1;};var E=function(){var K=(new Date()-D)/1000;var L={duration:K,frames:F,fps:F/K};L.toString=function(){return("duration: "+L.duration+", frames: "+L.frames+", fps: "+L.fps);};B=false;F=0;this.onComplete.fire(L);};this._onStart=new YAHOO.util.CustomEvent("_start",this,true);this.onStart=new YAHOO.util.CustomEvent("start",this);this.onTween=new YAHOO.util.CustomEvent("tween",this);this._onTween=new YAHOO.util.CustomEvent("_tween",this,true);this.onComplete=new YAHOO.util.CustomEvent("complete",this);this._onComplete=new YAHOO.util.CustomEvent("_complete",this,true);this._onStart.subscribe(J);this._onTween.subscribe(I);this._onComplete.subscribe(E);}};YAHOO.util.AnimMgr=ne!
 w function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start();};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F==-1){return false;}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop();}return true;};this.start=function(){if(C===null){C=setInterval(this.run,this.delay);}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0);}B=[];C=null;A=0;}else{this.unRegister(H);}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue;}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G);}G._onTween.fire();}else{YAHOO.util.AnimMgr.stop(G,H);}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G;}}return -1;};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new !
 Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.!
 round((F
/H-1)*G.currentFrame);}else{K=J-(I+1);}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]];}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1];}}return[C[0][0],C[0][1]];};};(function(){YAHOO.util.ColorAnim=function(E,D,F,G){YAHOO.util.ColorAnim.superclass.constructor.call(this,E,D,F,G);};YAHOO.extend(YAHOO.util.ColorAnim,YAHOO.util.Anim);var B=YAHOO.util;var C=B.ColorAnim.superclass;var A=B.ColorAnim.prototype;A.toString=function(){var D=this.getEl();var E=D.id||D.tagName;return("ColorAnim "+E);};A.patterns.color=/color$/i;A.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;A.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;A.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;A.patterns.transparent=/^tr!
 ansparent|rgba\(0, 0, 0, 0\)$/;A.parseColor=function(D){if(D.length==3){return D;}var E=this.patterns.hex.exec(D);if(E&&E.length==4){return[parseInt(E[1],16),parseInt(E[2],16),parseInt(E[3],16)];}E=this.patterns.rgb.exec(D);if(E&&E.length==4){return[parseInt(E[1],10),parseInt(E[2],10),parseInt(E[3],10)];
 }E=this.patterns.hex3.exec(D);if(E&&E.length==4){return[parseInt(E[1]+E[1],16),parseInt(E[2]+E[2],16),parseInt(E[3]+E[3],16)];}return null;};A.getAttribute=function(D){var F=this.getEl();if(this.patterns.color.test(D)){var G=YAHOO.util.Dom.getStyle(F,D);if(this.patterns.transparent.test(G)){var E=F.parentNode;G=B.Dom.getStyle(E,D);while(E&&this.patterns.transparent.test(G)){E=E.parentNode;G=B.Dom.getStyle(E,D);if(E.tagName.toUpperCase()=="HTML"){G="#fff";}}}}else{G=C.getAttribute.call(this,D);}return G;};A.doMethod=function(E,I,F){var H;if(this.patterns.color.test(E)){H=[];for(var G=0,D=I.length;G<D;++G){H[G]=C.doMethod.call(this,E,I[G],F[G]);}H="rgb("+Math.floor(H[0])+","+Math.floor(H[1])+","+Math.floor(H[2])+")";}else{H=C.doMethod.call(this,E,I,F);}return H;};A.setRuntimeAttribute=function(E){C.setRuntimeAttribute.call(this,E);if(this.patterns.color.test(E)){var G=this.attributes;var I=this.parseColor(this.runtimeAttributes[E].start);var F=this.parseColor(this.runtimeAttr!
 ibutes[E].end);if(typeof G[E]["to"]==="undefined"&&typeof G[E]["by"]!=="undefined"){F=this.parseColor(G[E].by);for(var H=0,D=I.length;H<D;++H){F[H]=I[H]+F[H];}}this.runtimeAttributes[E].start=I;this.runtimeAttributes[E].end=F;}};})();YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A;},easeIn:function(B,A,D,C){return D*(B/=C)*B+A;},easeOut:function(B,A,D,C){return -D*(B/=C)*(B-2)+A;},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A;}return -D/2*((--B)*(B-2)-1)+A;},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A;},easeOutStrong:function(B,A,D,C){return -D*((B=B/C-1)*B*B*B-1)+A;},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A;}return -D/2*((B-=2)*B*B*B-2)+A;},elasticIn:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return -(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;},elasticOut:function(C,A,G,F,B,E)!
 {if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}!
 if(!B||B
<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A;},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F/2)==2){return A+G;}if(!E){E=F*(0.3*1.5);}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}if(C<1){return -0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A;},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*(B/=D)*B*((C+1)*B-C)+A;},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A;},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A;}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A;},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A;},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.!
 5625*B*B)+A;}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A;}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A;}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A;},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A;}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A;}};(function(){YAHOO.util.Motion=function(G,F,H,I){if(G){YAHOO.util.Motion.superclass.constructor.call(this,G,F,H,I);}};YAHOO.extend(YAHOO.util.Motion,YAHOO.util.ColorAnim);var D=YAHOO.util;var E=D.Motion.superclass;var B=D.Motion.prototype;B.toString=function(){var F=this.getEl();var G=F.id||F.tagName;return("Motion "+G);};B.patterns.points=/^points$/i;B.setAttribute=function(F,H,G){if(this.patterns.points.test(F)){G=G||"px";E.setAttribute.call(this,"left",H[0],G);E.setAttribute.call(this,"top",H[1],G);}else{E.setAttribute.call(this,F,H,G);}};B.getAttribute=function(F){if(this.patterns.points.test(F)){var G=[E.getAttribute.call(t!
 his,"left"),E.getAttribute.call(this,"top")];}else{G=E.getAttr!
 ibute.ca
ll(this,F);}return G;};B.doMethod=function(F,J,G){var I=null;if(this.patterns.points.test(F)){var H=this.method(this.currentFrame,0,100,this.totalFrames)/100;I=D.Bezier.getPosition(this.runtimeAttributes[F],H);}else{I=E.doMethod.call(this,F,J,G);}return I;};B.setRuntimeAttribute=function(O){if(this.patterns.points.test(O)){var G=this.getEl();var I=this.attributes;var F;var K=I["points"]["control"]||[];var H;var L,N;if(K.length>0&&!(K[0] instanceof Array)){K=[K];}else{var J=[];for(L=0,N=K.length;L<N;++L){J[L]=K[L];}K=J;}if(D.Dom.getStyle(G,"position")=="static"){D.Dom.setStyle(G,"position","relative");}if(C(I["points"]["from"])){D.Dom.setXY(G,I["points"]["from"]);}else{D.Dom.setXY(G,D.Dom.getXY(G));}F=this.getAttribute("points");if(C(I["points"]["to"])){H=A.call(this,I["points"]["to"],F);var M=D.Dom.getXY(this.getEl());for(L=0,N=K.length;L<N;++L){K[L]=A.call(this,K[L],F);}}else{if(C(I["points"]["by"])){H=[F[0]+I["points"]["by"][0],F[1]+I["points"]["by"][1]];for(L=0,N=K.length!
 ;L<N;++L){K[L]=[F[0]+K[L][0],F[1]+K[L][1]];}}}this.runtimeAttributes[O]=[F];if(K.length>0){this.runtimeAttributes[O]=this.runtimeAttributes[O].concat(K);}this.runtimeAttributes[O][this.runtimeAttributes[O].length]=H;}else{E.setRuntimeAttribute.call(this,O);}};var A=function(F,H){var G=D.Dom.getXY(this.getEl());F=[F[0]-G[0]+H[0],F[1]-G[1]+H[1]];return F;};var C=function(F){return(typeof F!=="undefined");};})();(function(){YAHOO.util.Scroll=function(E,D,F,G){if(E){YAHOO.util.Scroll.superclass.constructor.call(this,E,D,F,G);}};YAHOO.extend(YAHOO.util.Scroll,YAHOO.util.ColorAnim);var B=YAHOO.util;var C=B.Scroll.superclass;var A=B.Scroll.prototype;A.toString=function(){var D=this.getEl();var E=D.id||D.tagName;return("Scroll "+E);};A.doMethod=function(D,G,E){var F=null;if(D=="scroll"){F=[this.method(this.currentFrame,G[0],E[0]-G[0],this.totalFrames),this.method(this.currentFrame,G[1],E[1]-G[1],this.totalFrames)];
-}else{F=C.doMethod.call(this,D,G,E);}return F;};A.getAttribute=function(D){var F=null;var E=this.getEl();if(D=="scroll"){F=[E.scrollLeft,E.scrollTop];}else{F=C.getAttribute.call(this,D);}return F;};A.setAttribute=function(D,G,F){var E=this.getEl();if(D=="scroll"){E.scrollLeft=G[0];E.scrollTop=G[1];}else{C.setAttribute.call(this,D,G,F);}};})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.3.1",build:"541"});if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(D,C){for(var E in this.ids){for(var B in this.ids[E]){var F=this.ids[E][B];if(!this.isTypeOfDD(F)){continue;}F[D].apply(F,C);}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,tr!
 ue);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:function(B){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(C,B){if(!this.initialized){this.init();}if(!this.ids[B]){this.ids[B]={};}this.ids[B][C.id]=C;},removeDDFromGroup:function(D,B){if(!this.ids[B]){this.ids[B]={};}var C=this.ids[B];if(C&&C[D.id]){delete C[D.id];}},_remove:function(C){for(var B in C.groups){if(B&&this.ids[B][C.id]){delete this.ids[B][C.id];}}delete this.handleIds[C.id];},regHandle:function(C,B){if(!this.handleIds[C]){this.handleIds[C]={};}this.handleIds[C][B]=B;},isDragDrop:function(B){return(this.getDDById(B))?true:false;},getRelated:fu!
 nction(G,C){var F=[];for(var E in G.groups){for(var D in this.!
 ids[E]){
var B=this.ids[E][D];if(!this.isTypeOfDD(B)){continue;}if(!C||B.isTarget){F[F.length]=B;}}}return F;},isLegalTarget:function(F,E){var C=this.getRelated(F,true);for(var D=0,B=C.length;D<B;++D){if(C[D].id==E.id){return true;}}return false;},isTypeOfDD:function(B){return(B&&B.__ygDragDrop);},isHandle:function(C,B){return(this.handleIds[C]&&this.handleIds[C][B]);},getDDById:function(C){for(var B in this.ids){if(this.ids[B][C]){return this.ids[B][C];}}return null;},handleMouseDown:function(D,C){this.currentTarget=YAHOO.util.Event.getTarget(D);this.dragCurrent=C;var B=C.getEl();this.startX=YAHOO.util.Event.getPageX(D);this.startY=YAHOO.util.Event.getPageY(D);this.deltaX=this.startX-B.offsetLeft;this.deltaY=this.startY-B.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var E=YAHOO.util.DDM;E.startDrag(E.startX,E.startY);},this.clickTimeThresh);},startDrag:function(B,D){clearTimeout(this.clickTimeout);var C=this.dragCurrent;if(C){C.b4StartDrag(B,D);}if(C){C!
 .startDrag(B,D);}this.dragThreshMet=true;},handleMouseUp:function(B){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(B,true);}else{}this.stopDrag(B);this.stopEvent(B);}},stopEvent:function(B){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(B);}if(this.preventDefault){YAHOO.util.Event.preventDefault(B);}},stopDrag:function(C,B){if(this.dragCurrent&&!B){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(C);this.dragCurrent.endDrag(C);}this.dragCurrent.onMouseUp(C);}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(E){var B=this.dragCurrent;if(B){if(YAHOO.util.Event.isIE&&!E.button){this.stopEvent(E);return this.handleMouseUp(E);}if(!this.dragThreshMet){var D=Math.abs(this.startX-YAHOO.util.Event.getPageX(E));var C=Math.abs(this.startY-YAHOO.util.Event.getPageY(E));if(D>this.clickPixelThresh||C>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){B.b4Drag(E);if(B){B.onDrag(!
 E);}if(B){this.fireEvents(E,false);}}this.stopEvent(E);}},fire!
 Events:f
unction(Q,H){var S=this.dragCurrent;if(!S||S.isLocked()){return ;}var J=YAHOO.util.Event.getPageX(Q),I=YAHOO.util.Event.getPageY(Q),K=new YAHOO.util.Point(J,I),F=S.getTargetCoord(K.x,K.y),C=S.getDragEl(),P=new YAHOO.util.Region(F.y,F.x+C.offsetWidth,F.y+C.offsetHeight,F.x),E=[],G=[],B=[],R=[],O=[];for(var M in this.dragOvers){var T=this.dragOvers[M];if(!this.isTypeOfDD(T)){continue;}if(!this.isOverTarget(K,T,this.mode,P)){G.push(T);}E[M]=true;delete this.dragOvers[M];}for(var L in S.groups){if("string"!=typeof L){continue;}for(M in this.ids[L]){var D=this.ids[L][M];if(!this.isTypeOfDD(D)){continue;}if(D.isTarget&&!D.isLocked()&&D!=S){if(this.isOverTarget(K,D,this.mode,P)){if(H){R.push(D);}else{if(!E[D.id]){O.push(D);}else{B.push(D);}this.dragOvers[D.id]=D;}}}}}this.interactionInfo={out:G,enter:O,over:B,drop:R,point:K,draggedRegion:P,sourceRegion:this.locationCache[S.id],validDrop:H};if(H&&!R.length){this.interactionInfo.validDrop=false;S.onInvalidDrop(Q);}if(this.mode){if(G.!
 length){S.b4DragOut(Q,G);if(S){S.onDragOut(Q,G);}}if(O.length){if(S){S.onDragEnter(Q,O);}}if(B.length){if(S){S.b4DragOver(Q,B);}if(S){S.onDragOver(Q,B);}}if(R.length){if(S){S.b4DragDrop(Q,R);}if(S){S.onDragDrop(Q,R);}}}else{var N=0;for(M=0,N=G.length;M<N;++M){if(S){S.b4DragOut(Q,G[M].id);}if(S){S.onDragOut(Q,G[M].id);}}for(M=0,N=O.length;M<N;++M){if(S){S.onDragEnter(Q,O[M].id);}}for(M=0,N=B.length;M<N;++M){if(S){S.b4DragOver(Q,B[M].id);}if(S){S.onDragOver(Q,B[M].id);}}for(M=0,N=R.length;M<N;++M){if(S){S.b4DragDrop(Q,R[M].id);}if(S){S.onDragDrop(Q,R[M].id);}}}},getBestMatch:function(D){var F=null;var C=D.length;if(C==1){F=D[0];}else{for(var E=0;E<C;++E){var B=D[E];if(this.mode==this.INTERSECT&&B.cursorIsOver){F=B;break;}else{if(!F||!F.overlap||(B.overlap&&F.overlap.getArea()<B.overlap.getArea())){F=B;}}}}return F;},refreshCache:function(C){var E=C||this.ids;for(var B in E){if("string"!=typeof B){continue;}for(var D in this.ids[B]){var F=this.ids[B][D];if(this.isTypeOfDD(F)){!
 var G=this.getLocation(F);if(G){this.locationCache[F.id]=G;}el!
 se{delet
e this.locationCache[F.id];}}}}},verifyEl:function(C){try{if(C){var B=C.offsetParent;if(B){return true;}}}catch(D){}return false;},getLocation:function(G){if(!this.isTypeOfDD(G)){return null;}var E=G.getEl(),J,D,C,L,K,M,B,I,F;try{J=YAHOO.util.Dom.getXY(E);}catch(H){}if(!J){return null;
-}D=J[0];C=D+E.offsetWidth;L=J[1];K=L+E.offsetHeight;M=L-G.padding[0];B=C+G.padding[1];I=K+G.padding[2];F=D-G.padding[3];return new YAHOO.util.Region(M,B,I,F);},isOverTarget:function(J,B,D,E){var F=this.locationCache[B.id];if(!F||!this.useCache){F=this.getLocation(B);this.locationCache[B.id]=F;}if(!F){return false;}B.cursorIsOver=F.contains(J);var I=this.dragCurrent;if(!I||(!D&&!I.constrainX&&!I.constrainY)){return B.cursorIsOver;}B.overlap=null;if(!E){var G=I.getTargetCoord(J.x,J.y);var C=I.getDragEl();E=new YAHOO.util.Region(G.y,G.x+C.offsetWidth,G.y+C.offsetHeight,G.x);}var H=E.intersect(F);if(H){B.overlap=H;return(D)?true:B.cursorIsOver;}else{return false;}},_onUnload:function(C,B){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(C){var B=this.elementCache[C];if(!B||!B.el){B=this.elementCache[C]=new this.ElementWrapper(YAHOO.util.Dom.get(C));}r!
 eturn B;},getElement:function(B){return YAHOO.util.Dom.get(B);},getCss:function(C){var B=YAHOO.util.Dom.get(C);return(B)?B.style:null;},ElementWrapper:function(B){this.el=B||null;this.id=this.el&&B.id;this.css=this.el&&B.style;},getPosX:function(B){return YAHOO.util.Dom.getX(B);},getPosY:function(B){return YAHOO.util.Dom.getY(B);},swapNode:function(D,B){if(D.swapNode){D.swapNode(B);}else{var E=B.parentNode;var C=B.nextSibling;if(C==D){E.insertBefore(D,B);}else{if(B==D.nextSibling){E.insertBefore(B,D);}else{D.parentNode.replaceChild(B,D);E.insertBefore(D,C);}}}},getScroll:function(){var D,B,E=document.documentElement,C=document.body;if(E&&(E.scrollTop||E.scrollLeft)){D=E.scrollTop;B=E.scrollLeft;}else{if(C){D=C.scrollTop;B=C.scrollLeft;}else{}}return{top:D,left:B};},getStyle:function(C,B){return YAHOO.util.Dom.getStyle(C,B);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(B,D){var C=YAHOO.util.D!
 om.getXY(D);YAHOO.util.Dom.setXY(B,C);},getClientHeight:functi!
 on(){ret
urn YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(C,B){return(C-B);},_timeoutCount:0,_addListeners:function(){var B=YAHOO.util.DDM;if(YAHOO.util.Event&&document){B._onLoad();}else{if(B._timeoutCount>2000){}else{setTimeout(B._addListeners,10);if(document&&document.body){B._timeoutCount+=1;}}}},handleWasClicked:function(B,D){if(this.isHandle(D,B.id)){return true;}else{var C=B.parentNode;while(C){if(this.isHandle(D,C.id)){return true;}else{C=C.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},un!
 lock:function(){this.locked=false;},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id);}return this._domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(E,C,D){this.initTarget(E,C,D);A.on(this._domRef||this.id,"mousedown",thi!
 s.handleMouseDown,this,true);},initTarget:function(E,C,D){this!
 .config=
D||{};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){return ;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0]!
 ;this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(F,E){var C=F.which||F.button;
-if(this.primaryButtonOnly&&C>1){return ;}if(this.isLocked()){return ;}this.b4MouseDown(F);this.onMouseDown(F);this.DDM.refreshCache(this.groups);var D=new YAHOO.util.Point(A.getPageX(F),A.getPageY(F));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(D,this)){}else{if(this.clickValidator(F)){this.setStartPosition();this.DDM.handleMouseDown(F,this);this.DDM.stopEvent(F);}else{}}},clickValidator:function(D){var C=A.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX;}if(C>this.maxX){C=this.maxX;}}if(this.constrainY){if(F<this.minY){F=this.minY;}if(F>this.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.genera!
 teId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E];}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase();}catch(G){H=F.nodeName;}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D]);}return E;},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){th!
 is.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(t!
 his.DDM.
numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D!
 );}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.delt!
 aY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.!
 alignElW
ithMouse(A,C,B);},alignElWithMouse:function(B,F,E){var D=this.getTargetCoord(F,E);if(!this.deltaSetXY){var G=[D.x,D.y];YAHOO.util.Dom.setXY(B,G);var C=parseInt(YAHOO.util.Dom.getStyle(B,"left"),10);var A=parseInt(YAHOO.util.Dom.getStyle(B,"top"),10);this.deltaSetXY=[C-D.x,A-D.y];}else{YAHOO.util.Dom.setStyle(B,"left",(D.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(B,"top",(D.y+this.deltaSetXY[1])+"px");}this.cachePosition(D.x,D.y);this.autoScroll(D.x,D.y,B.offsetHeight,B.offsetWidth);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<!
 C){window.scrollTo(D,N-A);}if(M>B&&F<C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame();},50);return ;}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;
-D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.ge!
 tEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN(F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:function(A,B){this.showFrame(A,B);},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","");},toString:function(){ret!
 urn("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B!
 ){if(C){
this.initTarget(C,A,B);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.3.1",build:"541"});YAHOO.util.Attribute=function(B,A){if(A){this.owner=A;this.configure(B,true);}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,validator:null,getValue:function(){return this.value;},setValue:function(F,B){var E;var A=this.owner;var C=this.name;var D={type:C,prevValue:this.getValue(),newValue:F};if(this.readOnly||(this.writeOnce&&this._written)){return false;}if(this.validator&&!this.validator.call(A,F)){return false;}if(!B){E=A.fireBeforeChangeEvent(D);if(E===false){return false;}}if(this.method){this.method.call(A,F);}this.value=F;this._written=true;D.type=C;if(!B){this.owner.fireChangeEvent(D);}return true;},configure:function(B,C){B=B||{};this._written=false;this._i!
 nitialConfig=this._initialConfig||{};for(var A in B){if(A&&YAHOO.lang.hasOwnProperty(B,A)){this[A]=B[A];if(C){this._initialConfig[A]=B[A];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig);},refresh:function(A){this.setValue(this.value,A);}};(function(){var A=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(C){this._configs=this._configs||{};var B=this._configs[C];if(!B){return undefined;}return B.value;},set:function(D,E,B){this._configs=this._configs||{};var C=this._configs[D];if(!C){return false;}return C.setValue(E,B);},getAttributeKeys:function(){this._configs=this._configs;var D=[];var B;for(var C in this._configs){B=this._configs[C];if(A.hasOwnProperty(this._configs,C)&&!A.isUndefined(B)){D[D.length]=C;}}return D;},setAttributes:function(D,B){for(var C in D){if(A.hasOwnProperty(D,C)){this.set(C,D[C],B);}}},re!
 setValue:function(C,B){this._configs=this._configs||{};if(this!
 ._config
s[C]){this.set(C,this._configs[C]._initialConfig.value,B);return true;}return false;},refresh:function(E,C){this._configs=this._configs;E=((A.isString(E))?[E]:E)||this.getAttributeKeys();for(var D=0,B=E.length;D<B;++D){if(this._configs[E[D]]&&!A.isUndefined(this._configs[E[D]].value)&&!A.isNull(this._configs[E[D]].value)){this._configs[E[D]].refresh(C);}}},register:function(B,C){this.setAttributeConfig(B,C);},getAttributeConfig:function(C){this._configs=this._configs||{};var B=this._configs[C]||{};var D={};for(C in B){if(A.hasOwnProperty(B,C)){D[C]=B[C];}}return D;},setAttributeConfig:function(B,C,D){this._configs=this._configs||{};C=C||{};if(!this._configs[B]){C.name=B;this._configs[B]=this.createAttribute(C);}else{this._configs[B].configure(C,D);}},configureAttribute:function(B,C,D){this.setAttributeConfig(B,C,D);},resetAttributeConfig:function(B){this._configs=this._configs||{};this._configs[B].resetConfig();},subscribe:function(B,C){this._events=this._events||{};if(!(B i!
 n this._events)){this._events[B]=this.createEvent(B);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.subscribe.apply(this,arguments);},addListener:function(){this.subscribe.apply(this,arguments);},fireBeforeChangeEvent:function(C){var B="before";B+=C.type.charAt(0).toUpperCase()+C.type.substr(1)+"Change";C.type=B;return this.fireEvent(C.type,C);},fireChangeEvent:function(B){B.type+="Change";return this.fireEvent(B.type,B);},createAttribute:function(B){return new YAHOO.util.Attribute(B,this);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var D=YAHOO.util.Dom,F=YAHOO.util.AttributeProvider;YAHOO.util.Element=function(G,H){if(arguments.length){this.init(G,H);}};YAHOO.util.Element.prototype={DOM_EVENTS:null,appendChild:function(G){G=G.get?G.get("element"):G;this.get("element").appendChild(G);},getElementsByTagName:function(G){return this.get("element").getElementsByTagName(G);},hasChildNodes:func!
 tion(){return this.get("element").hasChildNodes();},insertBefo!
 re:funct
ion(G,H){G=G.get?G.get("element"):G;H=(H&&H.get)?H.get("element"):H;this.get("element").insertBefore(G,H);},removeChild:function(G){G=G.get?G.get("element"):G;this.get("element").removeChild(G);return true;},replaceChild:function(G,H){G=G.get?G.get("element"):G;H=H.get?H.get("element"):H;return this.get("element").replaceChild(G,H);},initAttributes:function(G){},addListener:function(K,J,L,I){var H=this.get("element");I=I||this;H=this.get("id")||H;var G=this;if(!this._events[K]){if(this.DOM_EVENTS[K]){YAHOO.util.Event.addListener(H,K,function(M){if(M.srcElement&&!M.target){M.target=M.srcElement;}G.fireEvent(K,M);},L,I);}this.createEvent(K,this);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.addListener.apply(this,arguments);},subscribe:function(){this.addListener.apply(this,arguments);},removeListener:function(H,G){this.unsubscribe.apply(this,arguments);},addClass:function(G){D.addClass(this.get("element"),G);},getElementsByClassName:!
 function(H,G){return D.getElementsByClassName(H,G,this.get("element"));},hasClass:function(G){return D.hasClass(this.get("element"),G);},removeClass:function(G){return D.removeClass(this.get("element"),G);},replaceClass:function(H,G){return D.replaceClass(this.get("element"),H,G);},setStyle:function(I,H){var G=this.get("element");if(!G){return this._queue[this._queue.length]=["setStyle",arguments];}return D.setStyle(G,I,H);},getStyle:function(G){return D.getStyle(this.get("element"),G);},fireQueue:function(){var H=this._queue;for(var I=0,G=H.length;I<G;++I){this[H[I][0]].apply(this,H[I][1]);}},appendTo:function(H,I){H=(H.get)?H.get("element"):D.get(H);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:H});I=(I&&I.get)?I.get("element"):D.get(I);var G=this.get("element");if(!G){return false;}if(!H){return false;}if(G.parent!=H){if(I){H.insertBefore(G,I);}else{H.appendChild(G);}}this.fireEvent("appendTo",{type:"appendTo",target:H});},get:function(G){var I=this._conf!
 igs||{};var H=I.element;if(H&&!I[G]&&!YAHOO.lang.isUndefined(H!
 .value[G
])){return H.value[G];}return F.prototype.get.call(this,G);},setAttributes:function(L,H){var K=this.get("element");
-for(var J in L){if(!this._configs[J]&&!YAHOO.lang.isUndefined(K[J])){this.setAttributeConfig(J);}}for(var I=0,G=this._configOrder.length;I<G;++I){if(L[this._configOrder[I]]){this.set(this._configOrder[I],L[this._configOrder[I]],H);}}},set:function(H,J,G){var I=this.get("element");if(!I){this._queue[this._queue.length]=["set",arguments];if(this._configs[H]){this._configs[H].value=J;}return ;}if(!this._configs[H]&&!YAHOO.lang.isUndefined(I[H])){C.call(this,H);}return F.prototype.set.apply(this,arguments);},setAttributeConfig:function(G,I,J){var H=this.get("element");if(H&&!this._configs[G]&&!YAHOO.lang.isUndefined(H[G])){C.call(this,G,I);}else{F.prototype.setAttributeConfig.apply(this,arguments);}this._configOrder.push(G);},getAttributeKeys:function(){var H=this.get("element");var I=F.prototype.getAttributeKeys.call(this);for(var G in H){if(!this._configs[G]){I[G]=I[G]||H[G];}}return I;},createEvent:function(H,G){this._events[H]=true;F.prototype.createEvent.apply(this,argumen!
 ts);},init:function(H,G){A.apply(this,arguments);}};var A=function(H,G){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];G=G||{};G.element=G.element||H||null;this.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true};var I=false;if(YAHOO.lang.isString(H)){C.call(this,"id",{value:G.element});}if(D.get(H)){I=true;E.call(this,G);B.call(this,G);}YAHOO.util.Event.onAvailable(G.element,function(){if(!I){E.call(this,G);}this.fireEvent("available",{type:"available",target:G.element});},this,true);YAHOO.util.Event.onContentReady(G.element,function(){if(!I){B.call(this,G);}this.fireEvent("contentReady",{type:"contentReady",target:G.element});},this,true);};var E=function(G){this.setAttributeConfig("element",{value:D.get(G.element),readOnly:true});};var B=function(G){this.i!
 nitAttributes(G);this.setAttributes(G,true);this.fireQueue();}!
 ;var C=f
unction(G,I){var H=this.get("element");I=I||{};I.name=G;I.method=I.method||function(J){H[G]=J;};I.value=I.value||H[G];this._configs[G]=new YAHOO.util.Attribute(I,this);};YAHOO.augment(YAHOO.util.Element,F);})();YAHOO.register("element",YAHOO.util.Element,{version:"2.3.1",build:"541"});YAHOO.register("utilities", YAHOO, {version: "2.3.1", build: "541"});
+}else{F=C.doMethod.call(this,D,G,E);}return F;};A.getAttribute=function(D){var F=null;var E=this.getEl();if(D=="scroll"){F=[E.scrollLeft,E.scrollTop];}else{F=C.getAttribute.call(this,D);}return F;};A.setAttribute=function(D,G,F){var E=this.getEl();if(D=="scroll"){E.scrollLeft=G[0];E.scrollTop=G[1];}else{C.setAttribute.call(this,D,G,F);}};})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.4.1",build:"742"});if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(D,C){for(var E in this.ids){for(var B in this.ids[E]){var F=this.ids[E][B];if(!this.isTypeOfDD(F)){continue;}F[D].apply(F,C);}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,tr!
 ue);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:function(B){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(C,B){if(!this.initialized){this.init();}if(!this.ids[B]){this.ids[B]={};}this.ids[B][C.id]=C;},removeDDFromGroup:function(D,B){if(!this.ids[B]){this.ids[B]={};}var C=this.ids[B];if(C&&C[D.id]){delete C[D.id];}},_remove:function(C){for(var B in C.groups){if(B&&this.ids[B][C.id]){delete this.ids[B][C.id];}}delete this.handleIds[C.id];},regHandle:function(C,B){if(!this.handleIds[C]){this.handleIds[C]={};}this.handleIds[C][B]=B;},isDragDrop:function(B){return(this.getDDById(B))?true:fal!
 se;},getRelated:function(G,C){var F=[];for(var E in G.groups){!
 for(var 
D in this.ids[E]){var B=this.ids[E][D];if(!this.isTypeOfDD(B)){continue;}if(!C||B.isTarget){F[F.length]=B;}}}return F;},isLegalTarget:function(F,E){var C=this.getRelated(F,true);for(var D=0,B=C.length;D<B;++D){if(C[D].id==E.id){return true;}}return false;},isTypeOfDD:function(B){return(B&&B.__ygDragDrop);},isHandle:function(C,B){return(this.handleIds[C]&&this.handleIds[C][B]);},getDDById:function(C){for(var B in this.ids){if(this.ids[B][C]){return this.ids[B][C];}}return null;},handleMouseDown:function(D,C){this.currentTarget=YAHOO.util.Event.getTarget(D);this.dragCurrent=C;var B=C.getEl();this.startX=YAHOO.util.Event.getPageX(D);this.startY=YAHOO.util.Event.getPageY(D);this.deltaX=this.startX-B.offsetLeft;this.deltaY=this.startY-B.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var E=YAHOO.util.DDM;E.startDrag(E.startX,E.startY);E.fromTimeout=true;},this.clickTimeThresh);},startDrag:function(B,D){clearTimeout(this.clickTimeout);var C=this.dragCurr!
 ent;if(C){C.b4StartDrag(B,D);}if(C){C.startDrag(B,D);}this.dragThreshMet=true;},handleMouseUp:function(B){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.handleMouseMove(B);}this.fromTimeout=false;this.fireEvents(B,true);}else{}this.stopDrag(B);this.stopEvent(B);}},stopEvent:function(B){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(B);}if(this.preventDefault){YAHOO.util.Event.preventDefault(B);}},stopDrag:function(C,B){if(this.dragCurrent&&!B){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(C);this.dragCurrent.endDrag(C);}this.dragCurrent.onMouseUp(C);}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(E){var B=this.dragCurrent;if(B){if(YAHOO.util.Event.isIE&&!E.button){this.stopEvent(E);return this.handleMouseUp(E);}if(!this.dragThreshMet){var D=Math.abs(this.startX-YAHOO.util.Event.getPageX(E));var C=Math.abs(this.startY-YAHOO.util.Event.getPageY(E));if(D>this.clickPixelThresh||C>this.clic!
 kPixelThresh){this.startDrag(this.startX,this.startY);}}if(thi!
 s.dragTh
reshMet){B.b4Drag(E);if(B){B.onDrag(E);}if(B){this.fireEvents(E,false);}}this.stopEvent(E);}},fireEvents:function(T,J){var V=this.dragCurrent;if(!V||V.isLocked()||V.dragOnly){return ;}var L=YAHOO.util.Event.getPageX(T),K=YAHOO.util.Event.getPageY(T),M=new YAHOO.util.Point(L,K),H=V.getTargetCoord(M.x,M.y),E=V.getDragEl(),S=new YAHOO.util.Region(H.y,H.x+E.offsetWidth,H.y+E.offsetHeight,H.x),G=[],I=[],D=[],U=[],R=[],C={},N=[];for(var P in this.dragOvers){var W=this.dragOvers[P];if(!this.isTypeOfDD(W)){continue;}if(!this.isOverTarget(M,W,this.mode,S)){I.push(W);}G[P]=true;delete this.dragOvers[P];}for(var O in V.groups){if("string"!=typeof O){continue;}for(P in this.ids[O]){var F=this.ids[O][P];if(!this.isTypeOfDD(F)){continue;}if(F.isTarget&&!F.isLocked()&&F!=V){if(this.isOverTarget(M,F,this.mode,S)){C[O]=true;if(J){U.push(F);}else{if(!G[F.id]){R.push(F);}else{D.push(F);}this.dragOvers[F.id]=F;}}}}}this.interactionInfo={out:I,enter:R,over:D,drop:U,point:M,draggedRegion:S,source!
 Region:this.locationCache[V.id],validDrop:J};for(var B in C){N.push(B);}if(J&&!U.length){this.interactionInfo.validDrop=false;V.onInvalidDrop(T);}if(this.mode){if(I.length){V.b4DragOut(T,I);if(V){V.onDragOut(T,I);}}if(R.length){if(V){V.onDragEnter(T,R,N);}}if(D.length){if(V){V.b4DragOver(T,D,N);}if(V){V.onDragOver(T,D,N);}}if(U.length){if(V){V.b4DragDrop(T,U,N);}if(V){V.onDragDrop(T,U,N);}}}else{var Q=0;for(P=0,Q=I.length;P<Q;++P){if(V){V.b4DragOut(T,I[P].id,N[0]);}if(V){V.onDragOut(T,I[P].id,N[0]);}}for(P=0,Q=R.length;P<Q;++P){if(V){V.onDragEnter(T,R[P].id,N[0]);}}for(P=0,Q=D.length;P<Q;++P){if(V){V.b4DragOver(T,D[P].id,N[0]);}if(V){V.onDragOver(T,D[P].id,N[0]);}}for(P=0,Q=U.length;P<Q;++P){if(V){V.b4DragDrop(T,U[P].id,N[0]);}if(V){V.onDragDrop(T,U[P].id,N[0]);}}}},getBestMatch:function(D){var F=null;var C=D.length;if(C==1){F=D[0];}else{for(var E=0;E<C;++E){var B=D[E];if(this.mode==this.INTERSECT&&B.cursorIsOver){F=B;break;}else{if(!F||!F.overlap||(B.overlap&&F.overlap.get!
 Area()<B.overlap.getArea())){F=B;}}}}return F;},refreshCache:f!
 unction(
C){var E=C||this.ids;for(var B in E){if("string"!=typeof B){continue;}for(var D in this.ids[B]){var F=this.ids[B][D];if(this.isTypeOfDD(F)){var G=this.getLocation(F);if(G){this.locationCache[F.id]=G;}else{delete this.locationCache[F.id];}}}}},verifyEl:function(C){try{if(C){var B=C.offsetParent;
+if(B){return true;}}}catch(D){}return false;},getLocation:function(G){if(!this.isTypeOfDD(G)){return null;}var E=G.getEl(),J,D,C,L,K,M,B,I,F;try{J=YAHOO.util.Dom.getXY(E);}catch(H){}if(!J){return null;}D=J[0];C=D+E.offsetWidth;L=J[1];K=L+E.offsetHeight;M=L-G.padding[0];B=C+G.padding[1];I=K+G.padding[2];F=D-G.padding[3];return new YAHOO.util.Region(M,B,I,F);},isOverTarget:function(J,B,D,E){var F=this.locationCache[B.id];if(!F||!this.useCache){F=this.getLocation(B);this.locationCache[B.id]=F;}if(!F){return false;}B.cursorIsOver=F.contains(J);var I=this.dragCurrent;if(!I||(!D&&!I.constrainX&&!I.constrainY)){return B.cursorIsOver;}B.overlap=null;if(!E){var G=I.getTargetCoord(J.x,J.y);var C=I.getDragEl();E=new YAHOO.util.Region(G.y,G.x+C.offsetWidth,G.y+C.offsetHeight,G.x);}var H=E.intersect(F);if(H){B.overlap=H;return(D)?true:B.cursorIsOver;}else{return false;}},_onUnload:function(C,B){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=n!
 ull;}this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(C){var B=this.elementCache[C];if(!B||!B.el){B=this.elementCache[C]=new this.ElementWrapper(YAHOO.util.Dom.get(C));}return B;},getElement:function(B){return YAHOO.util.Dom.get(B);},getCss:function(C){var B=YAHOO.util.Dom.get(C);return(B)?B.style:null;},ElementWrapper:function(B){this.el=B||null;this.id=this.el&&B.id;this.css=this.el&&B.style;},getPosX:function(B){return YAHOO.util.Dom.getX(B);},getPosY:function(B){return YAHOO.util.Dom.getY(B);},swapNode:function(D,B){if(D.swapNode){D.swapNode(B);}else{var E=B.parentNode;var C=B.nextSibling;if(C==D){E.insertBefore(D,B);}else{if(B==D.nextSibling){E.insertBefore(B,D);}else{D.parentNode.replaceChild(B,D);E.insertBefore(D,C);}}}},getScroll:function(){var D,B,E=document.documentElement,C=document.body;if(E&&(E.scrollTop||E.scrollLeft)){D=E.scrollTop;B=E.scrollLeft;}else{if(C){D=C.scrollTop;B=C.scrollLeft;}else{}}return{top:D,left:B};},getStyle:fu!
 nction(C,B){return YAHOO.util.Dom.getStyle(C,B);},getScrollTop!
 :functio
n(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(B,D){var C=YAHOO.util.Dom.getXY(D);YAHOO.util.Dom.setXY(B,C);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(C,B){return(C-B);},_timeoutCount:0,_addListeners:function(){var B=YAHOO.util.DDM;if(YAHOO.util.Event&&document){B._onLoad();}else{if(B._timeoutCount>2000){}else{setTimeout(B._addListeners,10);if(document&&document.body){B._timeoutCount+=1;}}}},handleWasClicked:function(B,D){if(this.isHandle(D,B.id)){return true;}else{var C=B.parentNode;while(C){if(this.isHandle(D,C.id)){return true;}else{C=C.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={id:null,c!
 onfig:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,dragOnly:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:f!
 unction(){if(!this._domRef){this._domRef=B.get(this.id);}retur!
 n this._
domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(E,C,D){this.initTarget(E,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);},initTarget:function(E,C,D){this.config=D||{};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding!
 =[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){return ;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);
+this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(H,G){var D=H.which||H.button;if(this.primaryButtonOnly&&D>1){return ;}if(this.isLocked()){return ;}var C=this.b4MouseDown(H);var E=this.onMouseDown(H);if((C===false)||(E===false)){return ;}this.DDM.refreshCache(this.groups);var F=new YAHOO.util.Point(A.getPageX(H),A.getPageY(H));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(F,this)){}else{if(this.clickValidator(H)){this.setStartPosition();this.DDM.handleMouseDown(H,this);this.DDM.stopEvent(H);}else{}}},clickValidator:function(D){var C=A.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX;}if(C>this.maxX){C=this.m!
 axX;}}if(this.constrainY){if(F<this.minY){F=this.minY;}if(F>this.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E];}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase();}catch(G){H=F.nodeName;}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.inv!
 alidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.inva!
 lidHandl
eClasses[D]);}return E;},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTic!
 ks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D);}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}!
 },toString:function(){return("DragDrop "+this.id);}};})();YAHO!
 O.util.D
D=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y];}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];!
 this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A);}if(M>B&&F<C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame();
+}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame();},50);return ;}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},s!
 howFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN(F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:function(A,B){this.showFrame(A,B!
 );},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDrag!
 El(),"vi
sibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.4.1",build:"742"});YAHOO.util.Attribute=function(B,A){if(A){this.owner=A;this.configure(B,true);}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,validator:null,getValue:function(){return this.value;},setValue:function(F,B){var E;var A=this.owner;var C=this.name;var D={type:C,prevValue:this.getValue(),newValue:F};if(this.readOnly||(t!
 his.writeOnce&&this._written)){return false;}if(this.validator&&!this.validator.call(A,F)){return false;}if(!B){E=A.fireBeforeChangeEvent(D);if(E===false){return false;}}if(this.method){this.method.call(A,F);}this.value=F;this._written=true;D.type=C;if(!B){this.owner.fireChangeEvent(D);}return true;},configure:function(B,C){B=B||{};this._written=false;this._initialConfig=this._initialConfig||{};for(var A in B){if(A&&YAHOO.lang.hasOwnProperty(B,A)){this[A]=B[A];if(C){this._initialConfig[A]=B[A];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig);},refresh:function(A){this.setValue(this.value,A);}};(function(){var A=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(C){this._configs=this._configs||{};var B=this._configs[C];if(!B){return undefined;}return B.value;},set:function(D,E,B){this._configs=this._configs||{};var C!
 =this._configs[D];if(!C){return false;}return C.setValue(E,B);!
 },getAtt
ributeKeys:function(){this._configs=this._configs;var D=[];var B;for(var C in this._configs){B=this._configs[C];if(A.hasOwnProperty(this._configs,C)&&!A.isUndefined(B)){D[D.length]=C;}}return D;},setAttributes:function(D,B){for(var C in D){if(A.hasOwnProperty(D,C)){this.set(C,D[C],B);}}},resetValue:function(C,B){this._configs=this._configs||{};if(this._configs[C]){this.set(C,this._configs[C]._initialConfig.value,B);return true;}return false;},refresh:function(E,C){this._configs=this._configs;E=((A.isString(E))?[E]:E)||this.getAttributeKeys();for(var D=0,B=E.length;D<B;++D){if(this._configs[E[D]]&&!A.isUndefined(this._configs[E[D]].value)&&!A.isNull(this._configs[E[D]].value)){this._configs[E[D]].refresh(C);}}},register:function(B,C){this.setAttributeConfig(B,C);},getAttributeConfig:function(C){this._configs=this._configs||{};var B=this._configs[C]||{};var D={};for(C in B){if(A.hasOwnProperty(B,C)){D[C]=B[C];}}return D;},setAttributeConfig:function(B,C,D){this._configs=this._!
 configs||{};C=C||{};if(!this._configs[B]){C.name=B;this._configs[B]=this.createAttribute(C);}else{this._configs[B].configure(C,D);}},configureAttribute:function(B,C,D){this.setAttributeConfig(B,C,D);},resetAttributeConfig:function(B){this._configs=this._configs||{};this._configs[B].resetConfig();},subscribe:function(B,C){this._events=this._events||{};if(!(B in this._events)){this._events[B]=this.createEvent(B);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.subscribe.apply(this,arguments);},addListener:function(){this.subscribe.apply(this,arguments);},fireBeforeChangeEvent:function(C){var B="before";B+=C.type.charAt(0).toUpperCase()+C.type.substr(1)+"Change";C.type=B;return this.fireEvent(C.type,C);},fireChangeEvent:function(B){B.type+="Change";return this.fireEvent(B.type,B);},createAttribute:function(B){return new YAHOO.util.Attribute(B,this);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){v!
 ar D=YAHOO.util.Dom,F=YAHOO.util.AttributeProvider;YAHOO.util.!
 Element=
function(G,H){if(arguments.length){this.init(G,H);}};YAHOO.util.Element.prototype={DOM_EVENTS:null,appendChild:function(G){G=G.get?G.get("element"):G;this.get("element").appendChild(G);},getElementsByTagName:function(G){return this.get("element").getElementsByTagName(G);},hasChildNodes:function(){return this.get("element").hasChildNodes();},insertBefore:function(G,H){G=G.get?G.get("element"):G;H=(H&&H.get)?H.get("element"):H;this.get("element").insertBefore(G,H);},removeChild:function(G){G=G.get?G.get("element"):G;this.get("element").removeChild(G);return true;},replaceChild:function(G,H){G=G.get?G.get("element"):G;H=H.get?H.get("element"):H;return this.get("element").replaceChild(G,H);},initAttributes:function(G){},addListener:function(K,J,L,I){var H=this.get("element");I=I||this;H=this.get("id")||H;var G=this;if(!this._events[K]){if(this.DOM_EVENTS[K]){YAHOO.util.Event.addListener(H,K,function(M){if(M.srcElement&&!M.target){M.target=M.srcElement;}G.fireEvent(K,M);},L,I);}t!
 his.createEvent(K,this);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.addListener.apply(this,arguments);},subscribe:function(){this.addListener.apply(this,arguments);},removeListener:function(H,G){this.unsubscribe.apply(this,arguments);},addClass:function(G){D.addClass(this.get("element"),G);},getElementsByClassName:function(H,G){return D.getElementsByClassName(H,G,this.get("element"));},hasClass:function(G){return D.hasClass(this.get("element"),G);},removeClass:function(G){return D.removeClass(this.get("element"),G);},replaceClass:function(H,G){return D.replaceClass(this.get("element"),H,G);},setStyle:function(I,H){var G=this.get("element");if(!G){return this._queue[this._queue.length]=["setStyle",arguments];}return D.setStyle(G,I,H);},getStyle:function(G){return D.getStyle(this.get("element"),G);},fireQueue:function(){var H=this._queue;for(var I=0,G=H.length;I<G;++I){this[H[I][0]].apply(this,H[I][1]);}},appendTo:function(H,I){H=(!
 H.get)?H.get("element"):D.get(H);this.fireEvent("beforeAppendT!
 o",{type
:"beforeAppendTo",target:H});I=(I&&I.get)?I.get("element"):D.get(I);var G=this.get("element");if(!G){return false;}if(!H){return false;}if(G.parent!=H){if(I){H.insertBefore(G,I);}else{H.appendChild(G);}}this.fireEvent("appendTo",{type:"appendTo",target:H});},get:function(G){var I=this._configs||{};var H=I.element;if(H&&!I[G]&&!YAHOO.lang.isUndefined(H.value[G])){return H.value[G];}return F.prototype.get.call(this,G);},setAttributes:function(L,H){var K=this.get("element");
+for(var J in L){if(!this._configs[J]&&!YAHOO.lang.isUndefined(K[J])){this.setAttributeConfig(J);}}for(var I=0,G=this._configOrder.length;I<G;++I){if(L[this._configOrder[I]]){this.set(this._configOrder[I],L[this._configOrder[I]],H);}}},set:function(H,J,G){var I=this.get("element");if(!I){this._queue[this._queue.length]=["set",arguments];if(this._configs[H]){this._configs[H].value=J;}return ;}if(!this._configs[H]&&!YAHOO.lang.isUndefined(I[H])){C.call(this,H);}return F.prototype.set.apply(this,arguments);},setAttributeConfig:function(G,I,J){var H=this.get("element");if(H&&!this._configs[G]&&!YAHOO.lang.isUndefined(H[G])){C.call(this,G,I);}else{F.prototype.setAttributeConfig.apply(this,arguments);}this._configOrder.push(G);},getAttributeKeys:function(){var H=this.get("element");var I=F.prototype.getAttributeKeys.call(this);for(var G in H){if(!this._configs[G]){I[G]=I[G]||H[G];}}return I;},createEvent:function(H,G){this._events[H]=true;F.prototype.createEvent.apply(this,argumen!
 ts);},init:function(H,G){A.apply(this,arguments);}};var A=function(H,G){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];G=G||{};G.element=G.element||H||null;this.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true};var I=false;if(YAHOO.lang.isString(H)){C.call(this,"id",{value:G.element});}if(D.get(H)){I=true;E.call(this,G);B.call(this,G);}YAHOO.util.Event.onAvailable(G.element,function(){if(!I){E.call(this,G);}this.fireEvent("available",{type:"available",target:G.element});},this,true);YAHOO.util.Event.onContentReady(G.element,function(){if(!I){B.call(this,G);}this.fireEvent("contentReady",{type:"contentReady",target:G.element});},this,true);};var E=function(G){this.setAttributeConfig("element",{value:D.get(G.element),readOnly:true});};var B=function(G){this.i!
 nitAttributes(G);this.setAttributes(G,true);this.fireQueue();}!
 ;var C=f
unction(G,I){var H=this.get("element");I=I||{};I.name=G;I.method=I.method||function(J){H[G]=J;};I.value=I.value||H[G];this._configs[G]=new YAHOO.util.Attribute(I,this);};YAHOO.augment(YAHOO.util.Element,F);})();YAHOO.register("element",YAHOO.util.Element,{version:"2.4.1",build:"742"});YAHOO.register("utilities", YAHOO, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/yahoo/README
===================================================================
--- trunk/root/static/yui/yahoo/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/yahoo/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,7 +1,16 @@
 YAHOO Global - Release Notes
 
+2.4.1
+
+No change
+
+2.4.0
+  * Added YAHOO.env.ua.mobile
+  * Removed the hasOwnProperty check in isArray to make it perform a bit better.
+  * YAHOO will be created/overwritten if YAHOO is undefined or the defined YAHOO is falsy
+
 2.3.1
-  * YAHOO.lang.dump casts primitives to strings.
+  * YAHOO.lang.dump casts primitives to strings
 
 2.3.0
   * Added YAHOO.env.ua - browser detection

Modified: trunk/root/static/yui/yahoo/yahoo-debug.js
===================================================================
--- trunk/root/static/yui/yahoo/yahoo-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/yahoo/yahoo-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * The YAHOO object is the single global object used by YUI Library.  It
@@ -53,7 +53,15 @@
  * @see yuiloader
  */
 
-if (typeof YAHOO == "undefined") {
+/**
+ * Forces the use of the supplied locale where applicable in the library
+ * @property locale
+ * @type string
+ * @static
+ * @default undefined
+ */
+
+if (typeof YAHOO == "undefined" || !YAHOO) {
     /**
      * The YAHOO global namespace object.  If YAHOO is already defined, the
      * existing YAHOO object will not be overwritten so that defined
@@ -273,7 +281,17 @@
          * @property webkit
          * @type float
          */
-        webkit:0
+        webkit:0,
+
+        /**
+         * The mobile property will be set to a string containing any relevant
+         * user agent information when a modern mobile browser is detected.
+         * Currently limited to Safari on the iPhone/iPod Touch, Nokia N-series
+         * devices with the WebKit-based browser, and Opera Mini.  
+         * @property mobile 
+         * @type string
+         */
+        mobile: null 
     };
 
     var ua=navigator.userAgent, m;
@@ -286,6 +304,17 @@
     m=ua.match(/AppleWebKit\/([^\s]*)/);
     if (m&&m[1]) {
         o.webkit=parseFloat(m[1]);
+
+        // Mobile browser check
+        if (/ Mobile\//.test(ua)) {
+            o.mobile = "Apple"; // iPhone or iPod Touch
+        } else {
+            m=ua.match(/NokiaN[^\/]*/);
+            if (m) {
+                o.mobile = m[0]; // Nokia N-series, ex: NokiaN95
+            }
+        }
+
     }
 
     if (!o.webkit) { // not webkit
@@ -293,6 +322,10 @@
         m=ua.match(/Opera[\s\/]([^\s]*)/);
         if (m&&m[1]) {
             o.opera=parseFloat(m[1]);
+            m=ua.match(/Opera Mini[^;]*/);
+            if (m) {
+                o.mobile = m[0]; // ex: Opera Mini/2.0.4509/1316
+            }
         } else { // not opera or webkit
             m=ua.match(/MSIE\s([^;]*)/);
             if (m&&m[1]) {
@@ -345,7 +378,7 @@
  * Provides the language utilites and extensions used by the library
  * @class YAHOO.lang
  */
-YAHOO.lang = {
+YAHOO.lang = YAHOO.lang || {
     /**
      * Determines whether or not the provided object is an array.
      * Testing typeof/instanceof/constructor of arrays across frame 
@@ -361,8 +394,7 @@
 
         if (o) {
            var l = YAHOO.lang;
-           return l.isNumber(o.length) && l.isFunction(o.splice) && 
-                  !l.hasOwnProperty(o.length);
+           return l.isNumber(o.length) && l.isFunction(o.splice);
         }
         return false;
     },
@@ -787,19 +819,70 @@
      * @return the new merged object
      */
     merge: function() {
-        var o={}, a=arguments, i;
-        for (i=0; i<a.length; i=i+1) {
+        var o={}, a=arguments;
+        for (var i=0, l=a.length; i<l; i=i+1) {
             YAHOO.lang.augmentObject(o, a[i], true);
-            /*
-            for (var j in a[i]) {
-                o[j] = a[i][j];
-            }
-            */
         }
         return o;
     },
 
     /**
+     * Executes the supplied function in the scope of the supplied 
+     * object 'when' milliseconds later.  Executes the function a 
+     * single time unless periodic is set to true.
+     * @method later
+     * @since 2.4.0
+     * @param when {int} the number of milliseconds to wait until the fn 
+     * is executed
+     * @param o the scope object
+     * @param fn {Function|String} the function to execute or the name of 
+     * the method in the 'o' object to execute
+     * @param data [Array] data that is provided to the function.  This accepts
+     * either a single item or an array.  If an array is provided, the
+     * function is executed with one parameter for each array item.  If
+     * you need to pass a single array parameter, it needs to be wrapped in
+     * an array [myarray]
+     * @param periodic {boolean} if true, executes continuously at supplied 
+     * interval until canceled
+     * @return a timer object. Call the cancel() method on this object to 
+     * stop the timer.
+     */
+    later: function(when, o, fn, data, periodic) {
+        when = when || 0; 
+        o = o || {};
+        var m=fn, d=data, f, r;
+
+        if (YAHOO.lang.isString(fn)) {
+            m = o[fn];
+        }
+
+        if (!m) {
+            throw new TypeError("method undefined");
+        }
+
+        if (!YAHOO.lang.isArray(d)) {
+            d = [data];
+        }
+
+        f = function() {
+            m.apply(o, d);
+        };
+
+        r = (periodic) ? setInterval(f, when) : setTimeout(f, when);
+
+        return {
+            interval: periodic,
+            cancel: function() {
+                if (this.interval) {
+                    clearInterval(r);
+                } else {
+                    clearTimeout(r);
+                }
+            }
+        };
+    },
+
+    /**
      * A convenience method for detecting a legitimate non-null value.
      * Returns false for null/undefined/NaN, true for other values, 
      * including 0/false/''
@@ -866,4 +949,4 @@
  */
 YAHOO.extend = YAHOO.lang.extend;
 
-YAHOO.register("yahoo", YAHOO, {version: "2.3.1", build: "541"});
+YAHOO.register("yahoo", YAHOO, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/yahoo/yahoo-min.js
===================================================================
--- trunk/root/static/yui/yahoo/yahoo-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/yahoo/yahoo-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-if(typeof YAHOO=="undefined"){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(!
 A&&A[1]){C.webkit=parseFloat(A[1]);}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang={isArray:function(B){if(B){var A=YAHOO.lang;return A.isNumber(B.length)&&A.isFunction(B.splice)&&!A.hasOwnProperty(B.length);}return false;},isBoolean:function(A){return typeof A==="boolean";},isFunction:function(A){return typeof A==="function";},isNull:function(A){return A===null;},isNumber:function(A){return typeof A==="number"&&isFinite(A);},isObject:function(A){return(A&&(typeof A==="object"||YAHOO.lang.isFunction!
 (A)))||false;},isString:function(A){return typeof A==="string"!
 ;},isUnd
efined:function(A){return typeof A==="undefined";},hasOwnProperty:function(A,B){if(Object.prototype.hasOwnProperty){return A.hasOwnProperty(B);}return !YAHOO.lang.isUndefined(A[B])&&A.constructor.prototype[B]!==A[B];},_IEEnumFix:function(C,B){if(YAHOO.env.ua.ie){var E=["toString","valueOf"],A;for(A=0;A<E.length;A=A+1){var F=E[A],D=B[F];if(YAHOO.lang.isFunction(D)&&D!=Object.prototype[F]){C[F]=D;}}}},extend:function(D,E,C){if(!E||!D){throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");}var B=function(){};B.prototype=E.prototype;D.prototype=new B();D.prototype.constructor=D;D.superclass=E.prototype;if(E.prototype.constructor==Object.prototype.constructor){E.prototype.constructor=E;}if(C){for(var A in C){D.prototype[A]=C[A];}YAHOO.lang._IEEnumFix(D.prototype,C);}},augmentObject:function(E,D){if(!D||!E){throw new Error("Absorb failed, verify dependencies.");}var A=arguments,C,F,B=A[2];if(B&&B!==true){for(C=2;C<A.length;C=C+1){E[A[C]]=D[A!
 [C]];}}else{for(F in D){if(B||!E[F]){E[F]=D[F];}}YAHOO.lang._IEEnumFix(E,D);}},augmentProto:function(D,C){if(!C||!D){throw new Error("Augment failed, verify dependencies.");}var A=[D.prototype,C.prototype];for(var B=2;B<arguments.length;B=B+1){A.push(arguments[B]);}YAHOO.lang.augmentObject.apply(this,A);},dump:function(A,G){var C=YAHOO.lang,D,F,I=[],J="{...}",B="f(){...}",H=", ",E=" => ";if(!C.isObject(A)){return A+"";}else{if(A instanceof Date||("nodeType" in A&&"tagName" in A)){return A;}else{if(C.isFunction(A)){return B;}}}G=(C.isNumber(G))?G:3;if(C.isArray(A)){I.push("[");for(D=0,F=A.length;D<F;D=D+1){if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}if(I.length>1){I.pop();}I.push("]");}else{I.push("{");for(D in A){if(C.hasOwnProperty(A,D)){I.push(D+E);if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}}if(I.length>1){I.pop();}I.push("}");}return I.join("");},substitute:function(Q,B,J){var G,F,E,M,N,P,!
 D=YAHOO.lang,L=[],C,H="dump",K=" ",A="{",O="}";for(;;){G=Q.las!
 tIndexOf
(A);if(G<0){break;}F=Q.indexOf(O,G);if(G+1>=F){break;}C=Q.substring(G+1,F);M=C;P=null;E=M.indexOf(K);if(E>-1){P=M.substring(E+1);M=M.substring(0,E);}N=B[M];if(J){N=J(M,N,P);}if(D.isObject(N)){if(D.isArray(N)){N=D.dump(N,parseInt(P,10));}else{P=P||"";var I=P.indexOf(H);if(I>-1){P=P.substring(4);}if(N.toString===Object.prototype.toString||I>-1){N=D.dump(N,parseInt(P,10));}else{N=N.toString();}}}else{if(!D.isString(N)&&!D.isNumber(N)){N="~-"+L.length+"-~";L[L.length]=C;}}Q=Q.substring(0,G)+N+Q.substring(F+1);}for(G=L.length-1;G>=0;G=G-1){Q=Q.replace(new RegExp("~-"+G+"-~"),"{"+L[G]+"}","g");}return Q;},trim:function(A){try{return A.replace(/^\s+|\s+$/g,"");}catch(B){return A;}},merge:function(){var C={},A=arguments,B;for(B=0;B<A.length;B=B+1){YAHOO.lang.augmentObject(C,A[B],true);}return C;},isValue:function(B){var A=YAHOO.lang;return(A.isObject(B)||A.isString(B)||A.isNumber(B)||A.isBoolean(B));}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augme!
 nt=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.3.1",build:"541"});
\ No newline at end of file
+if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWe!
 bKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{isArray:function(B){if(B){var A=YAHOO.lang;return A.isNumber(B.length)&&A.isFunction(B.splice);}return false;},isBoolean:function(A){return typeof A==="boolean";},isFunction:function(A){return typeof A==="function";},isNull:function(A){return !
 A===null;},isNumber:function(A){return typeof A==="number"&&is!
 Finite(A
);},isObject:function(A){return(A&&(typeof A==="object"||YAHOO.lang.isFunction(A)))||false;},isString:function(A){return typeof A==="string";},isUndefined:function(A){return typeof A==="undefined";},hasOwnProperty:function(A,B){if(Object.prototype.hasOwnProperty){return A.hasOwnProperty(B);}return !YAHOO.lang.isUndefined(A[B])&&A.constructor.prototype[B]!==A[B];},_IEEnumFix:function(C,B){if(YAHOO.env.ua.ie){var E=["toString","valueOf"],A;for(A=0;A<E.length;A=A+1){var F=E[A],D=B[F];if(YAHOO.lang.isFunction(D)&&D!=Object.prototype[F]){C[F]=D;}}}},extend:function(D,E,C){if(!E||!D){throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");}var B=function(){};B.prototype=E.prototype;D.prototype=new B();D.prototype.constructor=D;D.superclass=E.prototype;if(E.prototype.constructor==Object.prototype.constructor){E.prototype.constructor=E;}if(C){for(var A in C){D.prototype[A]=C[A];}YAHOO.lang._IEEnumFix(D.prototype,C);}},augmentObject:function(E,D)!
 {if(!D||!E){throw new Error("Absorb failed, verify dependencies.");}var A=arguments,C,F,B=A[2];if(B&&B!==true){for(C=2;C<A.length;C=C+1){E[A[C]]=D[A[C]];}}else{for(F in D){if(B||!E[F]){E[F]=D[F];}}YAHOO.lang._IEEnumFix(E,D);}},augmentProto:function(D,C){if(!C||!D){throw new Error("Augment failed, verify dependencies.");}var A=[D.prototype,C.prototype];for(var B=2;B<arguments.length;B=B+1){A.push(arguments[B]);}YAHOO.lang.augmentObject.apply(this,A);},dump:function(A,G){var C=YAHOO.lang,D,F,I=[],J="{...}",B="f(){...}",H=", ",E=" => ";if(!C.isObject(A)){return A+"";}else{if(A instanceof Date||("nodeType" in A&&"tagName" in A)){return A;}else{if(C.isFunction(A)){return B;}}}G=(C.isNumber(G))?G:3;if(C.isArray(A)){I.push("[");for(D=0,F=A.length;D<F;D=D+1){if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}if(I.length>1){I.pop();}I.push("]");}else{I.push("{");for(D in A){if(C.hasOwnProperty(A,D)){I.push(D+E);if(C.isObject(A[D])){I.push((G>0)?C.du!
 mp(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}}if(I.length>1)!
 {I.pop()
;}I.push("}");}return I.join("");},substitute:function(Q,B,J){var G,F,E,M,N,P,D=YAHOO.lang,L=[],C,H="dump",K=" ",A="{",O="}";for(;;){G=Q.lastIndexOf(A);if(G<0){break;}F=Q.indexOf(O,G);if(G+1>=F){break;}C=Q.substring(G+1,F);M=C;P=null;E=M.indexOf(K);if(E>-1){P=M.substring(E+1);M=M.substring(0,E);}N=B[M];if(J){N=J(M,N,P);}if(D.isObject(N)){if(D.isArray(N)){N=D.dump(N,parseInt(P,10));}else{P=P||"";var I=P.indexOf(H);if(I>-1){P=P.substring(4);}if(N.toString===Object.prototype.toString||I>-1){N=D.dump(N,parseInt(P,10));}else{N=N.toString();}}}else{if(!D.isString(N)&&!D.isNumber(N)){N="~-"+L.length+"-~";L[L.length]=C;}}Q=Q.substring(0,G)+N+Q.substring(F+1);}for(G=L.length-1;G>=0;G=G-1){Q=Q.replace(new RegExp("~-"+G+"-~"),"{"+L[G]+"}","g");}return Q;},trim:function(A){try{return A.replace(/^\s+|\s+$/g,"");}catch(B){return A;}},merge:function(){var D={},B=arguments;for(var C=0,A=B.length;C<A;C=C+1){YAHOO.lang.augmentObject(D,B[C],true);}return D;},later:function(H,B,I,D,E){H=H||0;B=!
 B||{};var C=I,G=D,F,A;if(YAHOO.lang.isString(I)){C=B[I];}if(!C){throw new TypeError("method undefined");}if(!YAHOO.lang.isArray(G)){G=[D];}F=function(){C.apply(B,G);};A=(E)?setInterval(F,H):setTimeout(F,H);return{interval:E,cancel:function(){if(this.interval){clearInterval(A);}else{clearTimeout(A);}}};},isValue:function(B){var A=YAHOO.lang;return(A.isObject(B)||A.isString(B)||A.isNumber(B)||A.isBoolean(B));}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augment=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/yahoo/yahoo.js
===================================================================
--- trunk/root/static/yui/yahoo/yahoo.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/yahoo/yahoo.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
  * The YAHOO object is the single global object used by YUI Library.  It
@@ -53,7 +53,15 @@
  * @see yuiloader
  */
 
-if (typeof YAHOO == "undefined") {
+/**
+ * Forces the use of the supplied locale where applicable in the library
+ * @property locale
+ * @type string
+ * @static
+ * @default undefined
+ */
+
+if (typeof YAHOO == "undefined" || !YAHOO) {
     /**
      * The YAHOO global namespace object.  If YAHOO is already defined, the
      * existing YAHOO object will not be overwritten so that defined
@@ -273,7 +281,17 @@
          * @property webkit
          * @type float
          */
-        webkit:0
+        webkit:0,
+
+        /**
+         * The mobile property will be set to a string containing any relevant
+         * user agent information when a modern mobile browser is detected.
+         * Currently limited to Safari on the iPhone/iPod Touch, Nokia N-series
+         * devices with the WebKit-based browser, and Opera Mini.  
+         * @property mobile 
+         * @type string
+         */
+        mobile: null 
     };
 
     var ua=navigator.userAgent, m;
@@ -286,6 +304,17 @@
     m=ua.match(/AppleWebKit\/([^\s]*)/);
     if (m&&m[1]) {
         o.webkit=parseFloat(m[1]);
+
+        // Mobile browser check
+        if (/ Mobile\//.test(ua)) {
+            o.mobile = "Apple"; // iPhone or iPod Touch
+        } else {
+            m=ua.match(/NokiaN[^\/]*/);
+            if (m) {
+                o.mobile = m[0]; // Nokia N-series, ex: NokiaN95
+            }
+        }
+
     }
 
     if (!o.webkit) { // not webkit
@@ -293,6 +322,10 @@
         m=ua.match(/Opera[\s\/]([^\s]*)/);
         if (m&&m[1]) {
             o.opera=parseFloat(m[1]);
+            m=ua.match(/Opera Mini[^;]*/);
+            if (m) {
+                o.mobile = m[0]; // ex: Opera Mini/2.0.4509/1316
+            }
         } else { // not opera or webkit
             m=ua.match(/MSIE\s([^;]*)/);
             if (m&&m[1]) {
@@ -345,7 +378,7 @@
  * Provides the language utilites and extensions used by the library
  * @class YAHOO.lang
  */
-YAHOO.lang = {
+YAHOO.lang = YAHOO.lang || {
     /**
      * Determines whether or not the provided object is an array.
      * Testing typeof/instanceof/constructor of arrays across frame 
@@ -361,8 +394,7 @@
 
         if (o) {
            var l = YAHOO.lang;
-           return l.isNumber(o.length) && l.isFunction(o.splice) && 
-                  !l.hasOwnProperty(o.length);
+           return l.isNumber(o.length) && l.isFunction(o.splice);
         }
         return false;
     },
@@ -787,19 +819,70 @@
      * @return the new merged object
      */
     merge: function() {
-        var o={}, a=arguments, i;
-        for (i=0; i<a.length; i=i+1) {
+        var o={}, a=arguments;
+        for (var i=0, l=a.length; i<l; i=i+1) {
             YAHOO.lang.augmentObject(o, a[i], true);
-            /*
-            for (var j in a[i]) {
-                o[j] = a[i][j];
-            }
-            */
         }
         return o;
     },
 
     /**
+     * Executes the supplied function in the scope of the supplied 
+     * object 'when' milliseconds later.  Executes the function a 
+     * single time unless periodic is set to true.
+     * @method later
+     * @since 2.4.0
+     * @param when {int} the number of milliseconds to wait until the fn 
+     * is executed
+     * @param o the scope object
+     * @param fn {Function|String} the function to execute or the name of 
+     * the method in the 'o' object to execute
+     * @param data [Array] data that is provided to the function.  This accepts
+     * either a single item or an array.  If an array is provided, the
+     * function is executed with one parameter for each array item.  If
+     * you need to pass a single array parameter, it needs to be wrapped in
+     * an array [myarray]
+     * @param periodic {boolean} if true, executes continuously at supplied 
+     * interval until canceled
+     * @return a timer object. Call the cancel() method on this object to 
+     * stop the timer.
+     */
+    later: function(when, o, fn, data, periodic) {
+        when = when || 0; 
+        o = o || {};
+        var m=fn, d=data, f, r;
+
+        if (YAHOO.lang.isString(fn)) {
+            m = o[fn];
+        }
+
+        if (!m) {
+            throw new TypeError("method undefined");
+        }
+
+        if (!YAHOO.lang.isArray(d)) {
+            d = [data];
+        }
+
+        f = function() {
+            m.apply(o, d);
+        };
+
+        r = (periodic) ? setInterval(f, when) : setTimeout(f, when);
+
+        return {
+            interval: periodic,
+            cancel: function() {
+                if (this.interval) {
+                    clearInterval(r);
+                } else {
+                    clearTimeout(r);
+                }
+            }
+        };
+    },
+
+    /**
      * A convenience method for detecting a legitimate non-null value.
      * Returns false for null/undefined/NaN, true for other values, 
      * including 0/false/''
@@ -866,4 +949,4 @@
  */
 YAHOO.extend = YAHOO.lang.extend;
 
-YAHOO.register("yahoo", YAHOO, {version: "2.3.1", build: "541"});
+YAHOO.register("yahoo", YAHOO, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/yahoo-dom-event/yahoo-dom-event.js
===================================================================
--- trunk/root/static/yui/yahoo-dom-event/yahoo-dom-event.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/yahoo-dom-event/yahoo-dom-event.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,9 +2,9 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-if(typeof YAHOO=="undefined"){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(!
 A&&A[1]){C.webkit=parseFloat(A[1]);}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang={isArray:function(B){if(B){var A=YAHOO.lang;return A.isNumber(B.length)&&A.isFunction(B.splice)&&!A.hasOwnProperty(B.length);}return false;},isBoolean:function(A){return typeof A==="boolean";},isFunction:function(A){return typeof A==="function";},isNull:function(A){return A===null;},isNumber:function(A){return typeof A==="number"&&isFinite(A);},isObject:function(A){return(A&&(typeof A==="object"||YAHOO.lang.isFunction!
 (A)))||false;},isString:function(A){return typeof A==="string"!
 ;},isUnd
efined:function(A){return typeof A==="undefined";},hasOwnProperty:function(A,B){if(Object.prototype.hasOwnProperty){return A.hasOwnProperty(B);}return !YAHOO.lang.isUndefined(A[B])&&A.constructor.prototype[B]!==A[B];},_IEEnumFix:function(C,B){if(YAHOO.env.ua.ie){var E=["toString","valueOf"],A;for(A=0;A<E.length;A=A+1){var F=E[A],D=B[F];if(YAHOO.lang.isFunction(D)&&D!=Object.prototype[F]){C[F]=D;}}}},extend:function(D,E,C){if(!E||!D){throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");}var B=function(){};B.prototype=E.prototype;D.prototype=new B();D.prototype.constructor=D;D.superclass=E.prototype;if(E.prototype.constructor==Object.prototype.constructor){E.prototype.constructor=E;}if(C){for(var A in C){D.prototype[A]=C[A];}YAHOO.lang._IEEnumFix(D.prototype,C);}},augmentObject:function(E,D){if(!D||!E){throw new Error("Absorb failed, verify dependencies.");}var A=arguments,C,F,B=A[2];if(B&&B!==true){for(C=2;C<A.length;C=C+1){E[A[C]]=D[A!
 [C]];}}else{for(F in D){if(B||!E[F]){E[F]=D[F];}}YAHOO.lang._IEEnumFix(E,D);}},augmentProto:function(D,C){if(!C||!D){throw new Error("Augment failed, verify dependencies.");}var A=[D.prototype,C.prototype];for(var B=2;B<arguments.length;B=B+1){A.push(arguments[B]);}YAHOO.lang.augmentObject.apply(this,A);},dump:function(A,G){var C=YAHOO.lang,D,F,I=[],J="{...}",B="f(){...}",H=", ",E=" => ";if(!C.isObject(A)){return A+"";}else{if(A instanceof Date||("nodeType" in A&&"tagName" in A)){return A;}else{if(C.isFunction(A)){return B;}}}G=(C.isNumber(G))?G:3;if(C.isArray(A)){I.push("[");for(D=0,F=A.length;D<F;D=D+1){if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}if(I.length>1){I.pop();}I.push("]");}else{I.push("{");for(D in A){if(C.hasOwnProperty(A,D)){I.push(D+E);if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}}if(I.length>1){I.pop();}I.push("}");}return I.join("");},substitute:function(Q,B,J){var G,F,E,M,N,P,!
 D=YAHOO.lang,L=[],C,H="dump",K=" ",A="{",O="}";for(;;){G=Q.las!
 tIndexOf
(A);if(G<0){break;}F=Q.indexOf(O,G);if(G+1>=F){break;}C=Q.substring(G+1,F);M=C;P=null;E=M.indexOf(K);if(E>-1){P=M.substring(E+1);M=M.substring(0,E);}N=B[M];if(J){N=J(M,N,P);}if(D.isObject(N)){if(D.isArray(N)){N=D.dump(N,parseInt(P,10));}else{P=P||"";var I=P.indexOf(H);if(I>-1){P=P.substring(4);}if(N.toString===Object.prototype.toString||I>-1){N=D.dump(N,parseInt(P,10));}else{N=N.toString();}}}else{if(!D.isString(N)&&!D.isNumber(N)){N="~-"+L.length+"-~";L[L.length]=C;}}Q=Q.substring(0,G)+N+Q.substring(F+1);}for(G=L.length-1;G>=0;G=G-1){Q=Q.replace(new RegExp("~-"+G+"-~"),"{"+L[G]+"}","g");}return Q;},trim:function(A){try{return A.replace(/^\s+|\s+$/g,"");}catch(B){return A;}},merge:function(){var C={},A=arguments,B;for(B=0;B<A.length;B=B+1){YAHOO.lang.augmentObject(C,A[B],true);}return C;},isValue:function(B){var A=YAHOO.lang;return(A.isObject(B)||A.isString(B)||A.isNumber(B)||A.isBoolean(B));}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augme!
 nt=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.3.1",build:"541"});(function(){var B=YAHOO.util,K,I,H=0,J={},F={};var C=YAHOO.env.ua.opera,L=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,G=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i};var M=function(O){if(!E.HYPHEN.test(O)){return O;}if(J[O]){return J[O];}var P=O;while(E.HYPHEN.exec(P)){P=P.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}J[O]=P;return P;};var N=function(P){var O=F[P];if(!O){O=new RegExp("(?:^|\\s+)"+P+"(?:\\s+|$)");F[P]=O;}return O;};if(document.defaultView&&document.defaultView.getComputedStyle){K=function(O,R){var Q=null;if(R=="float"){R="cssFloat";}var P=document.defaultView.getComputedStyle(O,"");if(P){Q=P[M(R)];}return O.style[R]||Q;};}else{if(document.documentElement.currentStyle&&G){K=function(O,Q){switch(M(Q)){case"opacity":var S=100;try{S=O.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(R){try{S=O.filters("alpha").!
 opacity;}catch(R){}}return S/100;case"float":Q="styleFloat";de!
 fault:va
r P=O.currentStyle?O.currentStyle[Q]:null;return(O.style[Q]||P);}};}else{K=function(O,P){return O.style[P];};}}if(G){I=function(O,P,Q){switch(P){case"opacity":if(YAHOO.lang.isString(O.style.filter)){O.style.filter="alpha(opacity="+Q*100+")";if(!O.currentStyle||!O.currentStyle.hasLayout){O.style.zoom=1;}}break;case"float":P="styleFloat";default:O.style[P]=Q;}};}else{I=function(O,P,Q){if(P=="float"){P="cssFloat";}O.style[P]=Q;};}var D=function(O,P){return O&&O.nodeType==1&&(!P||P(O));};YAHOO.util.Dom={get:function(Q){if(Q&&(Q.tagName||Q.item)){return Q;}if(YAHOO.lang.isString(Q)||!Q){return document.getElementById(Q);}if(Q.length!==undefined){var R=[];for(var P=0,O=Q.length;P<O;++P){R[R.length]=B.Dom.get(Q[P]);}return R;}return Q;},getStyle:function(O,Q){Q=M(Q);var P=function(R){return K(R,Q);};return B.Dom.batch(O,P,B.Dom,true);},setStyle:function(O,Q,R){Q=M(Q);var P=function(S){I(S,Q,R);};B.Dom.batch(O,P,B.Dom,true);},getXY:function(O){var P=function(R){if((R.parentNode===nu!
 ll||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=document.body){return false;}var Q=null;var V=[];var S;var T=R.ownerDocument;if(R.getBoundingClientRect){S=R.getBoundingClientRect();return[S.left+B.Dom.getDocumentScrollLeft(R.ownerDocument),S.top+B.Dom.getDocumentScrollTop(R.ownerDocument)];}else{V=[R.offsetLeft,R.offsetTop];Q=R.offsetParent;var U=this.getStyle(R,"position")=="absolute";if(Q!=R){while(Q){V[0]+=Q.offsetLeft;V[1]+=Q.offsetTop;if(L&&!U&&this.getStyle(Q,"position")=="absolute"){U=true;}Q=Q.offsetParent;}}if(L&&U){V[0]-=R.ownerDocument.body.offsetLeft;V[1]-=R.ownerDocument.body.offsetTop;}}Q=R.parentNode;while(Q.tagName&&!E.ROOT_TAG.test(Q.tagName)){if(B.Dom.getStyle(Q,"display").search(/^inline|table-row.*$/i)){V[0]-=Q.scrollLeft;V[1]-=Q.scrollTop;}Q=Q.parentNode;}return V;};return B.Dom.batch(O,P,B.Dom,true);},getX:function(O){var P=function(Q){return B.Dom.getXY(Q)[0];};return B.Dom.batch(O,P,B.Dom,true);},getY:function(O){var P=function(Q){!
 return B.Dom.getXY(Q)[1];};return B.Dom.batch(O,P,B.Dom,true);!
 },setXY:
function(O,R,Q){var P=function(U){var T=this.getStyle(U,"position");if(T=="static"){this.setStyle(U,"position","relative");T="relative";}var W=this.getXY(U);if(W===false){return false;}var V=[parseInt(this.getStyle(U,"left"),10),parseInt(this.getStyle(U,"top"),10)];if(isNaN(V[0])){V[0]=(T=="relative")?0:U.offsetLeft;}if(isNaN(V[1])){V[1]=(T=="relative")?0:U.offsetTop;}if(R[0]!==null){U.style.left=R[0]-W[0]+V[0]+"px";}if(R[1]!==null){U.style.top=R[1]-W[1]+V[1]+"px";}if(!Q){var S=this.getXY(U);if((R[0]!==null&&S[0]!=R[0])||(R[1]!==null&&S[1]!=R[1])){this.setXY(U,R,true);}}};B.Dom.batch(O,P,B.Dom,true);},setX:function(P,O){B.Dom.setXY(P,[O,null]);},setY:function(O,P){B.Dom.setXY(O,[null,P]);},getRegion:function(O){var P=function(Q){if((Q.parentNode===null||Q.offsetParent===null||this.getStyle(Q,"display")=="none")&&Q!=document.body){return false;}var R=B.Region.getRegion(Q);return R;};return B.Dom.batch(O,P,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth()!
 ;},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(S,W,T,U){W=W||"*";T=(T)?B.Dom.get(T):null||document;if(!T){return[];}var P=[],O=T.getElementsByTagName(W),V=N(S);for(var Q=0,R=O.length;Q<R;++Q){if(V.test(O[Q].className)){P[P.length]=O[Q];if(U){U.call(O[Q],O[Q]);}}}return P;},hasClass:function(Q,P){var O=N(P);var R=function(S){return O.test(S.className);};return B.Dom.batch(Q,R,B.Dom,true);},addClass:function(P,O){var Q=function(R){if(this.hasClass(R,O)){return false;}R.className=YAHOO.lang.trim([R.className,O].join(" "));return true;};return B.Dom.batch(P,Q,B.Dom,true);},removeClass:function(Q,P){var O=N(P);var R=function(S){if(!this.hasClass(S,P)){return false;}var T=S.className;S.className=T.replace(O," ");if(this.hasClass(S,P)){this.removeClass(S,P);}S.className=YAHOO.lang.trim(S.className);return true;};return B.Dom.batch(Q,R,B.Dom,true);},replaceClass:function(R,P,O){if(!O||P===O){return false;}var Q=N(P);var S=function(T!
 ){if(!this.hasClass(T,P)){this.addClass(T,O);return true;}T.cl!
 assName=
T.className.replace(Q," "+O+" ");if(this.hasClass(T,P)){this.replaceClass(T,P,O);}T.className=YAHOO.lang.trim(T.className);return true;};return B.Dom.batch(R,S,B.Dom,true);},generateId:function(O,Q){Q=Q||"yui-gen";var P=function(R){if(R&&R.id){return R.id;}var S=Q+H++;if(R){R.id=S;}return S;};return B.Dom.batch(O,P,B.Dom,true)||P.apply(B.Dom,arguments);},isAncestor:function(P,Q){P=B.Dom.get(P);if(!P||!Q){return false;}var O=function(R){if(P.contains&&R.nodeType&&!L){return P.contains(R);}else{if(P.compareDocumentPosition&&R.nodeType){return !!(P.compareDocumentPosition(R)&16);}else{if(R.nodeType){return !!this.getAncestorBy(R,function(S){return S==P;});}}}return false;};return B.Dom.batch(Q,O,B.Dom,true);},inDocument:function(O){var P=function(Q){if(L){while(Q=Q.parentNode){if(Q==document.documentElement){return true;}}return false;}return this.isAncestor(document.documentElement,Q);};return B.Dom.batch(O,P,B.Dom,true);},getElementsBy:function(V,P,Q,S){P=P||"*";
-Q=(Q)?B.Dom.get(Q):null||document;if(!Q){return[];}var R=[],U=Q.getElementsByTagName(P);for(var T=0,O=U.length;T<O;++T){if(V(U[T])){R[R.length]=U[T];if(S){S(U[T]);}}}return R;},batch:function(S,V,U,Q){S=(S&&(S.tagName||S.item))?S:B.Dom.get(S);if(!S||!V){return false;}var R=(Q)?U:window;if(S.tagName||S.length===undefined){return V.call(R,S,U);}var T=[];for(var P=0,O=S.length;P<O;++P){T[T.length]=V.call(R,S[P],U);}return T;},getDocumentHeight:function(){var P=(document.compatMode!="CSS1Compat")?document.body.scrollHeight:document.documentElement.scrollHeight;var O=Math.max(P,B.Dom.getViewportHeight());return O;},getDocumentWidth:function(){var P=(document.compatMode!="CSS1Compat")?document.body.scrollWidth:document.documentElement.scrollWidth;var O=Math.max(P,B.Dom.getViewportWidth());return O;},getViewportHeight:function(){var O=self.innerHeight;var P=document.compatMode;if((P||G)&&!C){O=(P=="CSS1Compat")?document.documentElement.clientHeight:document.body.clientHeight;}retu!
 rn O;},getViewportWidth:function(){var O=self.innerWidth;var P=document.compatMode;if(P||G){O=(P=="CSS1Compat")?document.documentElement.clientWidth:document.body.clientWidth;}return O;},getAncestorBy:function(O,P){while(O=O.parentNode){if(D(O,P)){return O;}}return null;},getAncestorByClassName:function(P,O){P=B.Dom.get(P);if(!P){return null;}var Q=function(R){return B.Dom.hasClass(R,O);};return B.Dom.getAncestorBy(P,Q);},getAncestorByTagName:function(P,O){P=B.Dom.get(P);if(!P){return null;}var Q=function(R){return R.tagName&&R.tagName.toUpperCase()==O.toUpperCase();};return B.Dom.getAncestorBy(P,Q);},getPreviousSiblingBy:function(O,P){while(O){O=O.previousSibling;if(D(O,P)){return O;}}return null;},getPreviousSibling:function(O){O=B.Dom.get(O);if(!O){return null;}return B.Dom.getPreviousSiblingBy(O);},getNextSiblingBy:function(O,P){while(O){O=O.nextSibling;if(D(O,P)){return O;}}return null;},getNextSibling:function(O){O=B.Dom.get(O);if(!O){return null;}return B.Dom.getNext!
 SiblingBy(O);},getFirstChildBy:function(O,Q){var P=(D(O.firstC!
 hild,Q))
?O.firstChild:null;return P||B.Dom.getNextSiblingBy(O.firstChild,Q);},getFirstChild:function(O,P){O=B.Dom.get(O);if(!O){return null;}return B.Dom.getFirstChildBy(O);},getLastChildBy:function(O,Q){if(!O){return null;}var P=(D(O.lastChild,Q))?O.lastChild:null;return P||B.Dom.getPreviousSiblingBy(O.lastChild,Q);},getLastChild:function(O){O=B.Dom.get(O);return B.Dom.getLastChildBy(O);},getChildrenBy:function(P,R){var Q=B.Dom.getFirstChildBy(P,R);var O=Q?[Q]:[];B.Dom.getNextSiblingBy(Q,function(S){if(!R||R(S)){O[O.length]=S;}return false;});return O;},getChildren:function(O){O=B.Dom.get(O);if(!O){}return B.Dom.getChildrenBy(O);},getDocumentScrollLeft:function(O){O=O||document;return Math.max(O.documentElement.scrollLeft,O.body.scrollLeft);},getDocumentScrollTop:function(O){O=O||document;return Math.max(O.documentElement.scrollTop,O.body.scrollTop);},insertBefore:function(P,O){P=B.Dom.get(P);O=B.Dom.get(O);if(!P||!O||!O.parentNode){return null;}return O.parentNode.insertBefore(P,O!
 );},insertAfter:function(P,O){P=B.Dom.get(P);O=B.Dom.get(O);if(!P||!O||!O.parentNode){return null;}if(O.nextSibling){return O.parentNode.insertBefore(P,O.nextSibling);}else{return O.parentNode.appendChild(P);}}};})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.mi!
 n(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YA!
 HOO.util
.Region.prototype.toString=function(){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.3.1",build:"541"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscri!
 be:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){var E=this.subscribers.length;if(!E&&this.silent){return true;}var H=[],G=true,D,I=false;for(D=0;D<arguments.length;++D){H.push(arguments[D]);}var A=H.length;if(!this.silent){}for(D=0;D<E;++D){var L=this.subscribers[D];if(!L){I=true;}else{if(!this.silent){}var K=L.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(H.length>0){B=H[0];}try{G=L.fn.call(K,B,L.obj);}catch(F){this.lastError=F;}}else{try{G=L.fn.call(K,this.type,H,L.obj);}catch(F){this.lastError=F;}}if(false===G){if(!this.silent){}return false;}}}if(I){var !
 J=[],C=this.subscribers;for(D=0,E=C.length;D<E;D=D+1){J.push(C!
 [D]);}th
is.subscribers=J;}return true;},unsubscribeAll:function(){for(var B=0,A=this.subscribers.length;B<A;++B){this._delete(A-1-B);}this.subscribers=[];return B;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers[A]=null;},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var J=false;var I=[];var K=[];var G=[];var E=[];var C=0;var F=[];var B=[!
 ];var A=0;var D={63232:38,63233:40,63234:37,63235:39};return{POLL_RETRYS:4000,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,startInterval:function(){if(!this._interval){var L=this;var M=function(){L._tryPreloadAttach();};this._interval=setInterval(M,this.POLL_INTERVAL);}},onAvailable:function(N,L,O,M){F.push({id:N,fn:L,obj:O,override:M,checkReady:false});C=this.POLL_RETRYS;this.startInterval();},onDOMReady:function(L,N,M){if(J){setTimeout(function(){var O=window;if(M){if(M===true){O=N;}else{O=M;}}L.call(O,"DOMReady",[],N);},0);}else{this.DOMReadyEvent.subscribe(L,N,M);}},onContentReady:function(N,L,O,M){F.push({id:N,fn:L,obj:O,override:M,checkReady:true});C=this.POLL_RETRYS;this.startInterval();},addListener:function(N,L,W,R,M){if(!W||!W.call){return false;}if(this._isValidCollection(N)){var X=true;for(var S=0,U=N.length;S<U;++S){X=t!
 his.on(N[S],L,W,R,M)&&X;}return X;}else{if(YAHOO.lang.isString!
 (N)){var
 Q=this.getEl(N);if(Q){N=Q;}else{this.onAvailable(N,function(){YAHOO.util.Event.on(N,L,W,R,M);});return true;}}}if(!N){return false;}if("unload"==L&&R!==this){K[K.length]=[N,L,W,R,M];return true;}var Z=N;if(M){if(M===true){Z=R;}else{Z=M;}}var O=function(a){return W.call(Z,YAHOO.util.Event.getEvent(a,N),R);};var Y=[N,L,W,O,Z,R,M];var T=I.length;I[T]=Y;if(this.useLegacyEvent(N,L)){var P=this.getLegacyIndex(N,L);if(P==-1||N!=G[P][0]){P=G.length;B[N.id+L]=P;G[P]=[N,L,N["on"+L]];E[P]=[];N["on"+L]=function(a){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(a),P);};}E[P].push(Y);}else{try{this._simpleAdd(N,L,O,false);}catch(V){this.lastError=V;this.removeListener(N,L,W);return false;}}return true;},fireLegacyEvent:function(P,N){var R=true,L,T,S,U,Q;T=E[N];for(var M=0,O=T.length;M<O;++M){S=T[M];if(S&&S[this.WFN]){U=S[this.ADJ_SCOPE];Q=S[this.WFN].call(U,P);R=(R&&Q);}}L=G[N];if(L&&L[2]){L[2](P);}return R;},getLegacyIndex:function(M,N){var L=this.generateId(M)+N;if(typeof B!
 [L]=="undefined"){return -1;}else{return B[L];}},useLegacyEvent:function(M,N){if(this.webkit&&("click"==N||"dblclick"==N)){var L=parseInt(this.webkit,10);if(!isNaN(L)&&L<418){return true;}}return false;},removeListener:function(M,L,U){var P,S,W;if(typeof M=="string"){M=this.getEl(M);}else{if(this._isValidCollection(M)){var V=true;for(P=0,S=M.length;P<S;++P){V=(this.removeListener(M[P],L,U)&&V);}return V;}}if(!U||!U.call){return this.purgeElement(M,false,L);}if("unload"==L){for(P=0,S=K.length;P<S;P++){W=K[P];if(W&&W[0]==M&&W[1]==L&&W[2]==U){K[P]=null;return true;}}return false;}var Q=null;var R=arguments[3];if("undefined"===typeof R){R=this._getCacheIndex(M,L,U);}if(R>=0){Q=I[R];}if(!M||!Q){return false;}if(this.useLegacyEvent(M,L)){var O=this.getLegacyIndex(M,L);var N=E[O];if(N){for(P=0,S=N.length;P<S;++P){W=N[P];if(W&&W[this.EL]==M&&W[this.TYPE]==L&&W[this.FN]==U){N[P]=null;break;}}}}else{try{this._simpleRemove(M,L,Q[this.WFN],false);}catch(T){this.lastError=T;return false!
 ;}}delete I[R][this.WFN];delete I[R][this.FN];I[R]=null;return!
  true;},
getTarget:function(N,M){var L=N.target||N.srcElement;return this.resolveTextNode(L);},resolveTextNode:function(L){if(L&&3==L.nodeType){return L.parentNode;}else{return L;}},getPageX:function(M){var L=M.pageX;if(!L&&0!==L){L=M.clientX||0;if(this.isIE){L+=this._getScrollLeft();}}return L;},getPageY:function(L){var M=L.pageY;if(!M&&0!==M){M=L.clientY||0;if(this.isIE){M+=this._getScrollTop();}}return M;},getXY:function(L){return[this.getPageX(L),this.getPageY(L)];
-},getRelatedTarget:function(M){var L=M.relatedTarget;if(!L){if(M.type=="mouseout"){L=M.toElement;}else{if(M.type=="mouseover"){L=M.fromElement;}}}return this.resolveTextNode(L);},getTime:function(N){if(!N.time){var M=new Date().getTime();try{N.time=M;}catch(L){this.lastError=L;return M;}}return N.time;},stopEvent:function(L){this.stopPropagation(L);this.preventDefault(L);},stopPropagation:function(L){if(L.stopPropagation){L.stopPropagation();}else{L.cancelBubble=true;}},preventDefault:function(L){if(L.preventDefault){L.preventDefault();}else{L.returnValue=false;}},getEvent:function(Q,O){var P=Q||window.event;if(!P){var R=this.getEvent.caller;while(R){P=R.arguments[0];if(P&&Event==P.constructor){break;}R=R.caller;}}if(P&&this.isIE){try{var N=P.srcElement;if(N){var M=N.type;}}catch(L){P.target=O;}}return P;},getCharCode:function(M){var L=M.keyCode||M.charCode||0;if(YAHOO.env.ua.webkit&&(L in D)){L=D[L];}return L;},_getCacheIndex:function(P,Q,O){for(var N=0,M=I.length;N<M;++N)!
 {var L=I[N];if(L&&L[this.FN]==O&&L[this.EL]==P&&L[this.TYPE]==Q){return N;}}return -1;},generateId:function(L){var M=L.id;if(!M){M="yuievtautoid-"+A;++A;L.id=M;}return M;},_isValidCollection:function(M){try{return(typeof M!=="string"&&M.length&&!M.tagName&&!M.alert&&typeof M[0]!=="undefined");}catch(L){return false;}},elCache:{},getEl:function(L){return(typeof L==="string")?document.getElementById(L):L;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(M){if(!H){H=true;var L=YAHOO.util.Event;L._ready();L._tryPreloadAttach();}},_ready:function(M){if(!J){J=true;var L=YAHOO.util.Event;L.DOMReadyEvent.fire();L._simpleRemove(document,"DOMContentLoaded",L._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}if(this.isIE){if(!J){this.startInterval();return false;}}this.locked=true;var Q=!H;if(!Q){Q=(C>0);}var P=[];var R=function(T,U){var S=T;if(U.override){if(U.override===true){S=U.obj;}else{S=U.override;}}U.fn.call(!
 S,U.obj);};var M,L,O,N;for(M=0,L=F.length;M<L;++M){O=F[M];if(O!
 &&!O.che
ckReady){N=this.getEl(O.id);if(N){R(N,O);F[M]=null;}else{P.push(O);}}}for(M=0,L=F.length;M<L;++M){O=F[M];if(O&&O.checkReady){N=this.getEl(O.id);if(N){if(H||N.nextSibling){R(N,O);F[M]=null;}}else{P.push(O);}}}C=(P.length===0)?0:C-1;if(Q){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;return true;},purgeElement:function(O,P,R){var Q=this.getListeners(O,R),N,L;if(Q){for(N=0,L=Q.length;N<L;++N){var M=Q[N];this.removeListener(O,M.type,M.fn,M.index);}}if(P&&O&&O.childNodes){for(N=0,L=O.childNodes.length;N<L;++N){this.purgeElement(O.childNodes[N],P,R);}}},getListeners:function(N,L){var Q=[],M;if(!L){M=[I,K];}else{if(L=="unload"){M=[K];}else{M=[I];}}for(var P=0;P<M.length;P=P+1){var T=M[P];if(T&&T.length>0){for(var R=0,S=T.length;R<S;++R){var O=T[R];if(O&&O[this.EL]===N&&(!L||L===O[this.TYPE])){Q.push({type:O[this.TYPE],fn:O[this.FN],obj:O[this.OBJ],adjust:O[this.OVERRIDE],scope:O[this.ADJ_SCOPE],index:R});}}}}return(Q.length)?Q:null;!
 },_unload:function(S){var R=YAHOO.util.Event,P,O,M,L,N;for(P=0,L=K.length;P<L;++P){M=K[P];if(M){var Q=window;if(M[R.ADJ_SCOPE]){if(M[R.ADJ_SCOPE]===true){Q=M[R.UNLOAD_OBJ];}else{Q=M[R.ADJ_SCOPE];}}M[R.FN].call(Q,R.getEvent(S,M[R.EL]),M[R.UNLOAD_OBJ]);K[P]=null;M=null;Q=null;}}K=null;if(I&&I.length>0){O=I.length;while(O){N=O-1;M=I[N];if(M){R.removeListener(M[R.EL],M[R.TYPE],M[R.FN],N);}O=O-1;}M=null;R.clearCache();}for(P=0,L=G.length;P<L;++P){G[P][0]=null;G[P]=null;}G=null;R._simpleRemove(window,"unload",R._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var L=document.documentElement,M=document.body;if(L&&(L.scrollTop||L.scrollLeft)){return[L.scrollTop,L.scrollLeft];}else{if(M){return[M.scrollTop,M.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(N,O,M,L){N.addEventListener(O,M,(L));};}else{if(window.attachEvent!
 ){return function(N,O,M,L){N.attachEvent("on"+O,M);};}else{ret!
 urn func
tion(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(N,O,M,L){N.removeEventListener(O,M,(L));};}else{if(window.detachEvent){return function(M,N,L){M.detachEvent("on"+N,L);};}else{return function(){};}}}()};}();(function(){var D=YAHOO.util.Event;D.on=D.addListener;if(D.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var B,E=document,A=E.body;if(("undefined"!==typeof YAHOO_config)&&YAHOO_config.injecting){B=document.createElement("script");var C=E.getElementsByTagName("head")[0]||A;C.insertBefore(B,C.firstChild);}else{E.write("<script id=\"_yui_eu_dr\" defer=\"true\" src=\"//:\"></script>");B=document.getElementById("_yui_eu_dr");}if(B){B.onreadystatechange=function(){if("complete"===this.readyState){this.parentNode.removeChild(this);YAHOO.util.Event._ready();}};}else{}B=null;}else{if(D.webkit){D._drwatch=setInterval(function(){var F=document.readyState;if("loaded"==F||"complete"==F){clearInterval(D.!
 _drwatch);D._drwatch=null;D._ready();}},D.POLL_INTERVAL);}else{D._simpleAdd(document,"DOMContentLoaded",D._ready);}}D._simpleAdd(window,"load",D._load);D._simpleAdd(window,"unload",D._unload);D._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};
-var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN;}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEve!
 nt("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(K,J){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(K.shiftKey==F.shift&&K.altKey==F.alt&&K.ctrlKey==F.ctrl){var H;var G;if(F.keys instanceof Array){for(var I=0;I<F.keys.length;I++){H=F.keys[I];if(H==K.charCode){D.fire(K.charCode,K);break;}else{if(H==K.keyCode){D.fire(K.keyCode,K);break;}}}}else{H=F.keys;if(H==K.charCode){D.fire(K.charCode,K);}else{if(H==K.keyCode){D.fire(K.keyCode,K);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHO!
 O.util.KeyListener.KEYUP="keyup";YAHOO.register("event",YAHOO.!
 util.Eve
nt,{version:"2.3.1",build:"541"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.3.1", build: "541"});
+if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWe!
 bKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{isArray:function(B){if(B){var A=YAHOO.lang;return A.isNumber(B.length)&&A.isFunction(B.splice);}return false;},isBoolean:function(A){return typeof A==="boolean";},isFunction:function(A){return typeof A==="function";},isNull:function(A){return !
 A===null;},isNumber:function(A){return typeof A==="number"&&is!
 Finite(A
);},isObject:function(A){return(A&&(typeof A==="object"||YAHOO.lang.isFunction(A)))||false;},isString:function(A){return typeof A==="string";},isUndefined:function(A){return typeof A==="undefined";},hasOwnProperty:function(A,B){if(Object.prototype.hasOwnProperty){return A.hasOwnProperty(B);}return !YAHOO.lang.isUndefined(A[B])&&A.constructor.prototype[B]!==A[B];},_IEEnumFix:function(C,B){if(YAHOO.env.ua.ie){var E=["toString","valueOf"],A;for(A=0;A<E.length;A=A+1){var F=E[A],D=B[F];if(YAHOO.lang.isFunction(D)&&D!=Object.prototype[F]){C[F]=D;}}}},extend:function(D,E,C){if(!E||!D){throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");}var B=function(){};B.prototype=E.prototype;D.prototype=new B();D.prototype.constructor=D;D.superclass=E.prototype;if(E.prototype.constructor==Object.prototype.constructor){E.prototype.constructor=E;}if(C){for(var A in C){D.prototype[A]=C[A];}YAHOO.lang._IEEnumFix(D.prototype,C);}},augmentObject:function(E,D)!
 {if(!D||!E){throw new Error("Absorb failed, verify dependencies.");}var A=arguments,C,F,B=A[2];if(B&&B!==true){for(C=2;C<A.length;C=C+1){E[A[C]]=D[A[C]];}}else{for(F in D){if(B||!E[F]){E[F]=D[F];}}YAHOO.lang._IEEnumFix(E,D);}},augmentProto:function(D,C){if(!C||!D){throw new Error("Augment failed, verify dependencies.");}var A=[D.prototype,C.prototype];for(var B=2;B<arguments.length;B=B+1){A.push(arguments[B]);}YAHOO.lang.augmentObject.apply(this,A);},dump:function(A,G){var C=YAHOO.lang,D,F,I=[],J="{...}",B="f(){...}",H=", ",E=" => ";if(!C.isObject(A)){return A+"";}else{if(A instanceof Date||("nodeType" in A&&"tagName" in A)){return A;}else{if(C.isFunction(A)){return B;}}}G=(C.isNumber(G))?G:3;if(C.isArray(A)){I.push("[");for(D=0,F=A.length;D<F;D=D+1){if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}if(I.length>1){I.pop();}I.push("]");}else{I.push("{");for(D in A){if(C.hasOwnProperty(A,D)){I.push(D+E);if(C.isObject(A[D])){I.push((G>0)?C.du!
 mp(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}}if(I.length>1)!
 {I.pop()
;}I.push("}");}return I.join("");},substitute:function(Q,B,J){var G,F,E,M,N,P,D=YAHOO.lang,L=[],C,H="dump",K=" ",A="{",O="}";for(;;){G=Q.lastIndexOf(A);if(G<0){break;}F=Q.indexOf(O,G);if(G+1>=F){break;}C=Q.substring(G+1,F);M=C;P=null;E=M.indexOf(K);if(E>-1){P=M.substring(E+1);M=M.substring(0,E);}N=B[M];if(J){N=J(M,N,P);}if(D.isObject(N)){if(D.isArray(N)){N=D.dump(N,parseInt(P,10));}else{P=P||"";var I=P.indexOf(H);if(I>-1){P=P.substring(4);}if(N.toString===Object.prototype.toString||I>-1){N=D.dump(N,parseInt(P,10));}else{N=N.toString();}}}else{if(!D.isString(N)&&!D.isNumber(N)){N="~-"+L.length+"-~";L[L.length]=C;}}Q=Q.substring(0,G)+N+Q.substring(F+1);}for(G=L.length-1;G>=0;G=G-1){Q=Q.replace(new RegExp("~-"+G+"-~"),"{"+L[G]+"}","g");}return Q;},trim:function(A){try{return A.replace(/^\s+|\s+$/g,"");}catch(B){return A;}},merge:function(){var D={},B=arguments;for(var C=0,A=B.length;C<A;C=C+1){YAHOO.lang.augmentObject(D,B[C],true);}return D;},later:function(H,B,I,D,E){H=H||0;B=!
 B||{};var C=I,G=D,F,A;if(YAHOO.lang.isString(I)){C=B[I];}if(!C){throw new TypeError("method undefined");}if(!YAHOO.lang.isArray(G)){G=[D];}F=function(){C.apply(B,G);};A=(E)?setInterval(F,H):setTimeout(F,H);return{interval:E,cancel:function(){if(this.interval){clearInterval(A);}else{clearTimeout(A);}}};},isValue:function(B){var A=YAHOO.lang;return(A.isObject(B)||A.isString(B)||A.isNumber(B)||A.isBoolean(B));}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augment=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.4.1",build:"742"});(function(){var B=YAHOO.util,L,J,H=0,K={},F={},N=window.document;var C=YAHOO.env.ua.opera,M=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,G=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i};var O=function(Q){if(!E.HYPHEN.test(Q)){return Q;}if(K[Q]){return K[Q];}var R=Q;while(E.HYPHEN.exec(R)){R=R.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}K[Q]=R;retur!
 n R;};var P=function(R){var Q=F[R];if(!Q){Q=new RegExp("(?:^|\!
 \s+)"+R+
"(?:\\s+|$)");F[R]=Q;}return Q;};if(N.defaultView&&N.defaultView.getComputedStyle){L=function(Q,T){var S=null;if(T=="float"){T="cssFloat";}var R=N.defaultView.getComputedStyle(Q,"");if(R){S=R[O(T)];}return Q.style[T]||S;};}else{if(N.documentElement.currentStyle&&G){L=function(Q,S){switch(O(S)){case"opacity":var U=100;try{U=Q.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(T){try{U=Q.filters("alpha").opacity;}catch(T){}}return U/100;case"float":S="styleFloat";default:var R=Q.currentStyle?Q.currentStyle[S]:null;return(Q.style[S]||R);}};}else{L=function(Q,R){return Q.style[R];};}}if(G){J=function(Q,R,S){switch(R){case"opacity":if(YAHOO.lang.isString(Q.style.filter)){Q.style.filter="alpha(opacity="+S*100+")";if(!Q.currentStyle||!Q.currentStyle.hasLayout){Q.style.zoom=1;}}break;case"float":R="styleFloat";default:Q.style[R]=S;}};}else{J=function(Q,R,S){if(R=="float"){R="cssFloat";}Q.style[R]=S;};}var D=function(Q,R){return Q&&Q.nodeType==1&&(!R||R(Q));};YAHOO.util.Dom={!
 get:function(S){if(S&&(S.tagName||S.item)){return S;}if(YAHOO.lang.isString(S)||!S){return N.getElementById(S);}if(S.length!==undefined){var T=[];for(var R=0,Q=S.length;R<Q;++R){T[T.length]=B.Dom.get(S[R]);}return T;}return S;},getStyle:function(Q,S){S=O(S);var R=function(T){return L(T,S);};return B.Dom.batch(Q,R,B.Dom,true);},setStyle:function(Q,S,T){S=O(S);var R=function(U){J(U,S,T);};B.Dom.batch(Q,R,B.Dom,true);},getXY:function(Q){var R=function(S){if((S.parentNode===null||S.offsetParent===null||this.getStyle(S,"display")=="none")&&S!=S.ownerDocument.body){return false;}return I(S);};return B.Dom.batch(Q,R,B.Dom,true);},getX:function(Q){var R=function(S){return B.Dom.getXY(S)[0];};return B.Dom.batch(Q,R,B.Dom,true);},getY:function(Q){var R=function(S){return B.Dom.getXY(S)[1];};return B.Dom.batch(Q,R,B.Dom,true);},setXY:function(Q,T,S){var R=function(W){var V=this.getStyle(W,"position");if(V=="static"){this.setStyle(W,"position","relative");V="relative";}var Y=this.getXY!
 (W);if(Y===false){return false;}var X=[parseInt(this.getStyle(!
 W,"left"
),10),parseInt(this.getStyle(W,"top"),10)];if(isNaN(X[0])){X[0]=(V=="relative")?0:W.offsetLeft;}if(isNaN(X[1])){X[1]=(V=="relative")?0:W.offsetTop;}if(T[0]!==null){W.style.left=T[0]-Y[0]+X[0]+"px";}if(T[1]!==null){W.style.top=T[1]-Y[1]+X[1]+"px";}if(!S){var U=this.getXY(W);if((T[0]!==null&&U[0]!=T[0])||(T[1]!==null&&U[1]!=T[1])){this.setXY(W,T,true);}}};B.Dom.batch(Q,R,B.Dom,true);},setX:function(R,Q){B.Dom.setXY(R,[Q,null]);},setY:function(Q,R){B.Dom.setXY(Q,[null,R]);},getRegion:function(Q){var R=function(S){if((S.parentNode===null||S.offsetParent===null||this.getStyle(S,"display")=="none")&&S!=N.body){return false;}var T=B.Region.getRegion(S);return T;};return B.Dom.batch(Q,R,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(U,Y,V,W){Y=Y||"*";V=(V)?B.Dom.get(V):null||N;if(!V){return[];}var R=[],Q=V.getElementsByTagName(Y),X=P(U);for(var S=0,T=Q.length;S<T;!
 ++S){if(X.test(Q[S].className)){R[R.length]=Q[S];if(W){W.call(Q[S],Q[S]);}}}return R;},hasClass:function(S,R){var Q=P(R);var T=function(U){return Q.test(U.className);};return B.Dom.batch(S,T,B.Dom,true);},addClass:function(R,Q){var S=function(T){if(this.hasClass(T,Q)){return false;}T.className=YAHOO.lang.trim([T.className,Q].join(" "));return true;};return B.Dom.batch(R,S,B.Dom,true);},removeClass:function(S,R){var Q=P(R);var T=function(U){if(!this.hasClass(U,R)){return false;}var V=U.className;U.className=V.replace(Q," ");if(this.hasClass(U,R)){this.removeClass(U,R);}U.className=YAHOO.lang.trim(U.className);return true;};return B.Dom.batch(S,T,B.Dom,true);},replaceClass:function(T,R,Q){if(!Q||R===Q){return false;}var S=P(R);var U=function(V){if(!this.hasClass(V,R)){this.addClass(V,Q);return true;}V.className=V.className.replace(S," "+Q+" ");if(this.hasClass(V,R)){this.replaceClass(V,R,Q);}V.className=YAHOO.lang.trim(V.className);return true;};return B.Dom.batch(T,U,B.Dom,t!
 rue);},generateId:function(Q,S){S=S||"yui-gen";var R=function(!
 T){if(T&
&T.id){return T.id;}var U=S+H++;if(T){T.id=U;}return U;};return B.Dom.batch(Q,R,B.Dom,true)||R.apply(B.Dom,arguments);},isAncestor:function(Q,R){Q=B.Dom.get(Q);R=B.Dom.get(R);if(!Q||!R){return false;}if(Q.contains&&R.nodeType&&!M){return Q.contains(R);}else{if(Q.compareDocumentPosition&&R.nodeType){return !!(Q.compareDocumentPosition(R)&16);}else{if(R.nodeType){return !!this.getAncestorBy(R,function(S){return S==Q;});}}}return false;},inDocument:function(Q){return this.isAncestor(N.documentElement,Q);},getElementsBy:function(X,R,S,U){R=R||"*";S=(S)?B.Dom.get(S):null||N;if(!S){return[];}var T=[],W=S.getElementsByTagName(R);for(var V=0,Q=W.length;V<Q;++V){if(X(W[V])){T[T.length]=W[V];if(U){U(W[V]);}}}return T;},batch:function(U,X,W,S){U=(U&&(U.tagName||U.item))?U:B.Dom.get(U);if(!U||!X){return false;}var T=(S)?W:window;if(U.tagName||U.length===undefined){return X.call(T,U,W);}var V=[];for(var R=0,Q=U.length;R<Q;++R){V[V.length]=X.call(T,U[R],W);}return V;},getDocumentHeight:fu!
 nction(){var R=(N.compatMode!="CSS1Compat")?N.body.scrollHeight:N.documentElement.scrollHeight;var Q=Math.max(R,B.Dom.getViewportHeight());return Q;},getDocumentWidth:function(){var R=(N.compatMode!="CSS1Compat")?N.body.scrollWidth:N.documentElement.scrollWidth;var Q=Math.max(R,B.Dom.getViewportWidth());return Q;},getViewportHeight:function(){var Q=self.innerHeight;var R=N.compatMode;if((R||G)&&!C){Q=(R=="CSS1Compat")?N.documentElement.clientHeight:N.body.clientHeight;
+}return Q;},getViewportWidth:function(){var Q=self.innerWidth;var R=N.compatMode;if(R||G){Q=(R=="CSS1Compat")?N.documentElement.clientWidth:N.body.clientWidth;}return Q;},getAncestorBy:function(Q,R){while(Q=Q.parentNode){if(D(Q,R)){return Q;}}return null;},getAncestorByClassName:function(R,Q){R=B.Dom.get(R);if(!R){return null;}var S=function(T){return B.Dom.hasClass(T,Q);};return B.Dom.getAncestorBy(R,S);},getAncestorByTagName:function(R,Q){R=B.Dom.get(R);if(!R){return null;}var S=function(T){return T.tagName&&T.tagName.toUpperCase()==Q.toUpperCase();};return B.Dom.getAncestorBy(R,S);},getPreviousSiblingBy:function(Q,R){while(Q){Q=Q.previousSibling;if(D(Q,R)){return Q;}}return null;},getPreviousSibling:function(Q){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getPreviousSiblingBy(Q);},getNextSiblingBy:function(Q,R){while(Q){Q=Q.nextSibling;if(D(Q,R)){return Q;}}return null;},getNextSibling:function(Q){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getNextSiblingBy(Q);},g!
 etFirstChildBy:function(Q,S){var R=(D(Q.firstChild,S))?Q.firstChild:null;return R||B.Dom.getNextSiblingBy(Q.firstChild,S);},getFirstChild:function(Q,R){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getFirstChildBy(Q);},getLastChildBy:function(Q,S){if(!Q){return null;}var R=(D(Q.lastChild,S))?Q.lastChild:null;return R||B.Dom.getPreviousSiblingBy(Q.lastChild,S);},getLastChild:function(Q){Q=B.Dom.get(Q);return B.Dom.getLastChildBy(Q);},getChildrenBy:function(R,T){var S=B.Dom.getFirstChildBy(R,T);var Q=S?[S]:[];B.Dom.getNextSiblingBy(S,function(U){if(!T||T(U)){Q[Q.length]=U;}return false;});return Q;},getChildren:function(Q){Q=B.Dom.get(Q);if(!Q){}return B.Dom.getChildrenBy(Q);},getDocumentScrollLeft:function(Q){Q=Q||N;return Math.max(Q.documentElement.scrollLeft,Q.body.scrollLeft);},getDocumentScrollTop:function(Q){Q=Q||N;return Math.max(Q.documentElement.scrollTop,Q.body.scrollTop);},insertBefore:function(R,Q){R=B.Dom.get(R);Q=B.Dom.get(Q);if(!R||!Q||!Q.parentNode){return n!
 ull;}return Q.parentNode.insertBefore(R,Q);},insertAfter:funct!
 ion(R,Q)
{R=B.Dom.get(R);Q=B.Dom.get(Q);if(!R||!Q||!Q.parentNode){return null;}if(Q.nextSibling){return Q.parentNode.insertBefore(R,Q.nextSibling);}else{return Q.parentNode.appendChild(R);}},getClientRegion:function(){var S=B.Dom.getDocumentScrollTop(),R=B.Dom.getDocumentScrollLeft(),T=B.Dom.getViewportWidth()+R,Q=B.Dom.getViewportHeight()+S;return new B.Region(S,T,Q,R);}};var I=function(){if(N.documentElement.getBoundingClientRect){return function(R){var S=R.getBoundingClientRect();var Q=R.ownerDocument;return[S.left+B.Dom.getDocumentScrollLeft(Q),S.top+B.Dom.getDocumentScrollTop(Q)];};}else{return function(S){var T=[S.offsetLeft,S.offsetTop];var R=S.offsetParent;var Q=(M&&B.Dom.getStyle(S,"position")=="absolute"&&S.offsetParent==S.ownerDocument.body);if(R!=S){while(R){T[0]+=R.offsetLeft;T[1]+=R.offsetTop;if(!Q&&M&&B.Dom.getStyle(R,"position")=="absolute"){Q=true;}R=R.offsetParent;}}if(Q){T[0]-=S.ownerDocument.body.offsetLeft;T[1]-=S.ownerDocument.body.offsetTop;}R=S.parentNode;whil!
 e(R.tagName&&!E.ROOT_TAG.test(R.tagName)){if(B.Dom.getStyle(R,"display").search(/^inline|table-row.*$/i)){T[0]-=R.scrollLeft;T[1]-=R.scrollTop;}R=R.parentNode;}return T;};}}();})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO!
 .util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=f!
 unction(
){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.4.1",build:"742"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new !
 Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){var D=this.subscribers.length;if(!D&&this.silent){return true;}var H=[],F=true,C,I=false;for(C=0;C<arguments.length;++C){H.push(arguments[C]);}if(!this.silent){}for(C=0;C<D;++C){var L=this.subscribers[C];if(!L){I=true;}else{if(!this.silent){}var K=L.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var A=null;if(H.length>0){A=H[0];}try{F=L.fn.call(K,A,L.obj);}catch(E){this.lastError=E;}}else{try{F=L.fn.call(K,this.type,H,L.obj);}catch(G){this.lastError=G;}}if(false===F){if(!this.silent){}return false;}}}if(I){var J=[],B=this.subscribers;for(C=0,D=B.length;C<D;C=C+!
 1){J.push(B[C]);}this.subscribers=J;}return true;},unsubscribe!
 All:func
tion(){for(var B=0,A=this.subscribers.length;B<A;++B){this._delete(A-1-B);}this.subscribers=[];return B;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers[A]=null;},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,6!
 3277:34,25:9};return{POLL_RETRYS:4000,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,startInterval:function(){if(!this._interval){var K=this;var L=function(){K._tryPreloadAttach();};this._interval=setInterval(L,this.POLL_INTERVAL);}},onAvailable:function(P,M,Q,O,N){var K=(YAHOO.lang.isString(P))?[P]:P;for(var L=0;L<K.length;L=L+1){F.push({id:K[L],fn:M,obj:Q,override:O,checkReady:N});}C=this.POLL_RETRYS;this.startInterval();},onContentReady:function(M,K,N,L){this.onAvailable(M,K,N,L,true);},onDOMReady:function(K,M,L){if(this.DOMReady){setTimeout(function(){var N=window;if(L){if(L===true){N=M;}else{N=L;}}K.call(N,"DOMReady",[],M);},0);}else{this.DOMReadyEvent.subscribe(K,M,L);}},addListener:function(M,K,V,Q,L){if(!V||!V.call){return false;}if(this._isValidCollection(M)){var W=true;for(var R=0,T=M.length;R<T;++R)!
 {W=this.on(M[R],K,V,Q,L)&&W;}return W;}else{if(YAHOO.lang.isSt!
 ring(M))
{var P=this.getEl(M);if(P){M=P;}else{this.onAvailable(M,function(){YAHOO.util.Event.on(M,K,V,Q,L);});return true;}}}if(!M){return false;}if("unload"==K&&Q!==this){J[J.length]=[M,K,V,Q,L];return true;}var Y=M;if(L){if(L===true){Y=Q;}else{Y=L;}}var N=function(Z){return V.call(Y,YAHOO.util.Event.getEvent(Z,M),Q);};var X=[M,K,V,N,Y,Q,L];var S=I.length;I[S]=X;if(this.useLegacyEvent(M,K)){var O=this.getLegacyIndex(M,K);if(O==-1||M!=G[O][0]){O=G.length;B[M.id+K]=O;G[O]=[M,K,M["on"+K]];E[O]=[];M["on"+K]=function(Z){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(Z),O);};}E[O].push(X);}else{try{this._simpleAdd(M,K,N,false);}catch(U){this.lastError=U;this.removeListener(M,K,V);return false;}}return true;},fireLegacyEvent:function(O,M){var Q=true,K,S,R,T,P;S=E[M];for(var L=0,N=S.length;L<N;++L){R=S[L];if(R&&R[this.WFN]){T=R[this.ADJ_SCOPE];P=R[this.WFN].call(T,O);Q=(Q&&P);}}K=G[M];if(K&&K[2]){K[2](O);}return Q;},getLegacyIndex:function(L,M){var K=this.generateId(L)+M;if(type!
 of B[K]=="undefined"){return -1;}else{return B[K];}},useLegacyEvent:function(L,M){if(this.webkit&&("click"==M||"dblclick"==M)){var K=parseInt(this.webkit,10);if(!isNaN(K)&&K<418){return true;}}return false;},removeListener:function(L,K,T){var O,R,V;if(typeof L=="string"){L=this.getEl(L);}else{if(this._isValidCollection(L)){var U=true;for(O=0,R=L.length;O<R;++O){U=(this.removeListener(L[O],K,T)&&U);}return U;}}if(!T||!T.call){return this.purgeElement(L,false,K);}if("unload"==K){for(O=0,R=J.length;O<R;O++){V=J[O];if(V&&V[0]==L&&V[1]==K&&V[2]==T){J[O]=null;return true;}}return false;}var P=null;var Q=arguments[3];if("undefined"===typeof Q){Q=this._getCacheIndex(L,K,T);}if(Q>=0){P=I[Q];}if(!L||!P){return false;}if(this.useLegacyEvent(L,K)){var N=this.getLegacyIndex(L,K);var M=E[N];if(M){for(O=0,R=M.length;O<R;++O){V=M[O];if(V&&V[this.EL]==L&&V[this.TYPE]==K&&V[this.FN]==T){M[O]=null;break;}}}}else{try{this._simpleRemove(L,K,P[this.WFN],false);}catch(S){this.lastError=S;return f!
 alse;}}delete I[Q][this.WFN];delete I[Q][this.FN];I[Q]=null;re!
 turn tru
e;},getTarget:function(M,L){var K=M.target||M.srcElement;return this.resolveTextNode(K);},resolveTextNode:function(K){if(K&&3==K.nodeType){return K.parentNode;}else{return K;}},getPageX:function(L){var K=L.pageX;if(!K&&0!==K){K=L.clientX||0;if(this.isIE){K+=this._getScrollLeft();}}return K;},getPageY:function(K){var L=K.pageY;if(!L&&0!==L){L=K.clientY||0;if(this.isIE){L+=this._getScrollTop();}}return L;},getXY:function(K){return[this.getPageX(K),this.getPageY(K)];
+},getRelatedTarget:function(L){var K=L.relatedTarget;if(!K){if(L.type=="mouseout"){K=L.toElement;}else{if(L.type=="mouseover"){K=L.fromElement;}}}return this.resolveTextNode(K);},getTime:function(M){if(!M.time){var L=new Date().getTime();try{M.time=L;}catch(K){this.lastError=K;return L;}}return M.time;},stopEvent:function(K){this.stopPropagation(K);this.preventDefault(K);},stopPropagation:function(K){if(K.stopPropagation){K.stopPropagation();}else{K.cancelBubble=true;}},preventDefault:function(K){if(K.preventDefault){K.preventDefault();}else{K.returnValue=false;}},getEvent:function(M,K){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break;}N=N.caller;}}return L;},getCharCode:function(L){var K=L.keyCode||L.charCode||0;if(YAHOO.env.ua.webkit&&(K in D)){K=D[K];}return K;},_getCacheIndex:function(O,P,N){for(var M=0,L=I.length;M<L;++M){var K=I[M];if(K&&K[this.FN]==N&&K[this.EL]==O&&K[this.TYPE]==P){return M;}}return !
 -1;},generateId:function(K){var L=K.id;if(!L){L="yuievtautoid-"+A;++A;K.id=L;}return L;},_isValidCollection:function(L){try{return(L&&typeof L!=="string"&&L.length&&!L.tagName&&!L.alert&&typeof L[0]!=="undefined");}catch(K){return false;}},elCache:{},getEl:function(K){return(typeof K==="string")?document.getElementById(K):K;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(L){if(!H){H=true;var K=YAHOO.util.Event;K._ready();K._tryPreloadAttach();}},_ready:function(L){var K=YAHOO.util.Event;if(!K.DOMReady){K.DOMReady=true;K.DOMReadyEvent.fire();K._simpleRemove(document,"DOMContentLoaded",K._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}if(this.isIE){if(!this.DOMReady){this.startInterval();return false;}}this.locked=true;var P=!H;if(!P){P=(C>0);}var O=[];var Q=function(S,T){var R=S;if(T.override){if(T.override===true){R=T.obj;}else{R=T.override;}}T.fn.call(R,T.obj);};var L,K,N,M;for(L=0,K=F.length;L<K;++L)!
 {N=F[L];if(N&&!N.checkReady){M=this.getEl(N.id);if(M){Q(M,N);F!
 [L]=null
;}else{O.push(N);}}}for(L=0,K=F.length;L<K;++L){N=F[L];if(N&&N.checkReady){M=this.getEl(N.id);if(M){if(H||M.nextSibling){Q(M,N);F[L]=null;}}else{O.push(N);}}}C=(O.length===0)?0:C-1;if(P){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;return true;},purgeElement:function(O,P,R){var M=(YAHOO.lang.isString(O))?this.getEl(O):O;var Q=this.getListeners(M,R),N,K;if(Q){for(N=0,K=Q.length;N<K;++N){var L=Q[N];this.removeListener(M,L.type,L.fn,L.index);}}if(P&&M&&M.childNodes){for(N=0,K=M.childNodes.length;N<K;++N){this.purgeElement(M.childNodes[N],P,R);}}},getListeners:function(M,K){var P=[],L;if(!K){L=[I,J];}else{if(K==="unload"){L=[J];}else{L=[I];}}var R=(YAHOO.lang.isString(M))?this.getEl(M):M;for(var O=0;O<L.length;O=O+1){var T=L[O];if(T&&T.length>0){for(var Q=0,S=T.length;Q<S;++Q){var N=T[Q];if(N&&N[this.EL]===R&&(!K||K===N[this.TYPE])){P.push({type:N[this.TYPE],fn:N[this.FN],obj:N[this.OBJ],adjust:N[this.OVERRIDE],scope:N[this.ADJ_!
 SCOPE],index:Q});}}}}return(P.length)?P:null;},_unload:function(R){var Q=YAHOO.util.Event,O,N,L,K,M;for(O=0,K=J.length;O<K;++O){L=J[O];if(L){var P=window;if(L[Q.ADJ_SCOPE]){if(L[Q.ADJ_SCOPE]===true){P=L[Q.UNLOAD_OBJ];}else{P=L[Q.ADJ_SCOPE];}}L[Q.FN].call(P,Q.getEvent(R,L[Q.EL]),L[Q.UNLOAD_OBJ]);J[O]=null;L=null;P=null;}}J=null;if(YAHOO.env.ua.ie&&I&&I.length>0){N=I.length;while(N){M=N-1;L=I[M];if(L){Q.removeListener(L[Q.EL],L[Q.TYPE],L[Q.FN],M);}N--;}L=null;}G=null;Q._simpleRemove(window,"unload",Q._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft];}else{if(L){return[L.scrollTop,L.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(M,N,L,K){M.addEventListener(N,L,(K));};}else{if(window.attachEvent){retur!
 n function(M,N,L,K){M.attachEvent("on"+N,L);};}else{return fun!
 ction(){
};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(M,N,L,K){M.removeEventListener(N,L,(K));};}else{if(window.detachEvent){return function(L,M,K){L.detachEvent("on"+M,K);};}else{return function(){};}}}()};}();(function(){var A=YAHOO.util.Event;A.on=A.addListener;if(A.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);A._dri=setInterval(function(){var C=document.createElement("p");try{C.doScroll("left");clearInterval(A._dri);A._dri=null;A._ready();C=null;}catch(B){C=null;}},A.POLL_INTERVAL);}else{if(A.webkit){A._dri=setInterval(function(){var B=document.readyState;if("loaded"==B||"complete"==B){clearInterval(A._dri);A._dri=null;A._ready();}},A.POLL_INTERVAL);}else{A._simpleAdd(document,"DOMContentLoaded",A._ready);}}A._simpleAdd(window,"load",A._load);A._simpleAdd(window,"unload",A._unload);A._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null!
 ,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};
+var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN;}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(J,I){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(J.shiftKey==F.shift&&J.altKey==F.alt&!
 &J.ctrlKey==F.ctrl){var G;if(F.keys instanceof Array){for(var H=0;H<F.keys.length;H++){G=F.keys[H];if(G==J.charCode){D.fire(J.charCode,J);break;}else{if(G==J.keyCode){D.fire(J.keyCode,J);break;}}}}else{G=F.keys;if(G==J.charCode){D.fire(J.charCode,J);}else{if(G==J.keyCode){D.fire(J.keyCode,J);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO!
 .register("event",YAHOO.util.Event,{version:"2.4.1",build:"742!
 "});YAHO
O.register("yahoo-dom-event", YAHOO, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/yuiloader/README
===================================================================
--- trunk/root/static/yui/yuiloader/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/yuiloader/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,5 +1,25 @@
 yuiloader - Release Notes
 
+2.4.1
+   * Updated metadata for 2.4.1
+
+2.4.0
+   * NOTE: the API in this release has changed significantly.  Existing implementations
+     will need to be modified in order to use the new version.
+   * yuiloader now includes the yahoo and get components.  This removes the timing
+     problems in the previous versions that forced one to use YAHOO_config or include
+     yahoo.js on the page before yuiloader.
+   * No longer uses YAHOO_config for loading, you must use YAHOO.util.YUILoader
+   * Interacting with YAHOO.register or supplying a verifier function is no longer
+     required to load non-YUI resources.
+   * Supports script sandboxing.  Does not support x-domain sandboxing at this time
+   * removed verifier property, added varName property which is only needed when
+     using external scripts and the application needs to support Safari 2.x.
+   * YUI metadata updates:
+       * Added 'base', 'reset-fonts', 'get', 'json', 'simpleeditor', 'charts, and 'selector'
+       * button and history are no longer beta components.
+       * imageloader promoted from experimental to beta.
+
 2.3.1
    * The "skin.overrides" property is now applied correctly.  Previously
      it was looking for "skin.override".

Modified: trunk/root/static/yui/yuiloader/yuiloader-beta-debug.js
===================================================================
--- trunk/root/static/yui/yuiloader/yuiloader-beta-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/yuiloader/yuiloader-beta-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,9 +2,1574 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
+ * The YAHOO object is the single global object used by YUI Library.  It
+ * contains utility function for setting up namespaces, inheritance, and
+ * logging.  YAHOO.util, YAHOO.widget, and YAHOO.example are namespaces
+ * created automatically for and used by the library.
+ * @module yahoo
+ * @title  YAHOO Global
+ */
+
+/**
+ * YAHOO_config is not included as part of the library.  Instead it is an 
+ * object that can be defined by the implementer immediately before 
+ * including the YUI library.  The properties included in this object
+ * will be used to configure global properties needed as soon as the 
+ * library begins to load.
+ * @class YAHOO_config
+ * @static
+ */
+
+/**
+ * A reference to a function that will be executed every time a YAHOO module
+ * is loaded.  As parameter, this function will receive the version
+ * information for the module. See <a href="YAHOO.env.html#getVersion">
+ * YAHOO.env.getVersion</a> for the description of the version data structure.
+ * @property listener
+ * @type Function
+ * @static
+ * @default undefined
+ */
+
+/**
+ * Set to true if the library will be dynamically loaded after window.onload.
+ * Defaults to false 
+ * @property injecting
+ * @type boolean
+ * @static
+ * @default undefined
+ */
+
+/**
+ * Instructs the yuiloader component to dynamically load yui components and
+ * their dependencies.  See the yuiloader documentation for more information
+ * about dynamic loading
+ * @property load
+ * @static
+ * @default undefined
+ * @see yuiloader
+ */
+
+/**
+ * Forces the use of the supplied locale where applicable in the library
+ * @property locale
+ * @type string
+ * @static
+ * @default undefined
+ */
+
+if (typeof YAHOO == "undefined" || !YAHOO) {
+    /**
+     * The YAHOO global namespace object.  If YAHOO is already defined, the
+     * existing YAHOO object will not be overwritten so that defined
+     * namespaces are preserved.
+     * @class YAHOO
+     * @static
+     */
+    var YAHOO = {};
+}
+
+/**
+ * Returns the namespace specified and creates it if it doesn't exist
+ * <pre>
+ * YAHOO.namespace("property.package");
+ * YAHOO.namespace("YAHOO.property.package");
+ * </pre>
+ * Either of the above would create YAHOO.property, then
+ * YAHOO.property.package
+ *
+ * Be careful when naming packages. Reserved words may work in some browsers
+ * and not others. For instance, the following will fail in Safari:
+ * <pre>
+ * YAHOO.namespace("really.long.nested.namespace");
+ * </pre>
+ * This fails because "long" is a future reserved word in ECMAScript
+ *
+ * @method namespace
+ * @static
+ * @param  {String*} arguments 1-n namespaces to create 
+ * @return {Object}  A reference to the last namespace object created
+ */
+YAHOO.namespace = function() {
+    var a=arguments, o=null, i, j, d;
+    for (i=0; i<a.length; i=i+1) {
+        d=a[i].split(".");
+        o=YAHOO;
+
+        // YAHOO is implied, so it is ignored if it is included
+        for (j=(d[0] == "YAHOO") ? 1 : 0; j<d.length; j=j+1) {
+            o[d[j]]=o[d[j]] || {};
+            o=o[d[j]];
+        }
+    }
+
+    return o;
+};
+
+/**
+ * Uses YAHOO.widget.Logger to output a log message, if the widget is
+ * available.
+ *
+ * @method log
+ * @static
+ * @param  {String}  msg  The message to log.
+ * @param  {String}  cat  The log category for the message.  Default
+ *                        categories are "info", "warn", "error", time".
+ *                        Custom categories can be used as well. (opt)
+ * @param  {String}  src  The source of the the message (opt)
+ * @return {Boolean}      True if the log operation was successful.
+ */
+YAHOO.log = function(msg, cat, src) {
+    var l=YAHOO.widget.Logger;
+    if(l && l.log) {
+        return l.log(msg, cat, src);
+    } else {
+        return false;
+    }
+};
+
+/**
+ * Registers a module with the YAHOO object
+ * @method register
+ * @static
+ * @param {String}   name    the name of the module (event, slider, etc)
+ * @param {Function} mainClass a reference to class in the module.  This
+ *                             class will be tagged with the version info
+ *                             so that it will be possible to identify the
+ *                             version that is in use when multiple versions
+ *                             have loaded
+ * @param {Object}   data      metadata object for the module.  Currently it
+ *                             is expected to contain a "version" property
+ *                             and a "build" property at minimum.
+ */
+YAHOO.register = function(name, mainClass, data) {
+    var mods = YAHOO.env.modules;
+    if (!mods[name]) {
+        mods[name] = { versions:[], builds:[] };
+    }
+    var m=mods[name],v=data.version,b=data.build,ls=YAHOO.env.listeners;
+    m.name = name;
+    m.version = v;
+    m.build = b;
+    m.versions.push(v);
+    m.builds.push(b);
+    m.mainClass = mainClass;
+    // fire the module load listeners
+    for (var i=0;i<ls.length;i=i+1) {
+        ls[i](m);
+    }
+    // label the main class
+    if (mainClass) {
+        mainClass.VERSION = v;
+        mainClass.BUILD = b;
+    } else {
+        YAHOO.log("mainClass is undefined for module " + name, "warn");
+    }
+};
+
+/**
+ * YAHOO.env is used to keep track of what is known about the YUI library and
+ * the browsing environment
+ * @class YAHOO.env
+ * @static
+ */
+YAHOO.env = YAHOO.env || {
+
+    /**
+     * Keeps the version info for all YUI modules that have reported themselves
+     * @property modules
+     * @type Object[]
+     */
+    modules: [],
+    
+    /**
+     * List of functions that should be executed every time a YUI module
+     * reports itself.
+     * @property listeners
+     * @type Function[]
+     */
+    listeners: []
+};
+
+/**
+ * Returns the version data for the specified module:
+ *      <dl>
+ *      <dt>name:</dt>      <dd>The name of the module</dd>
+ *      <dt>version:</dt>   <dd>The version in use</dd>
+ *      <dt>build:</dt>     <dd>The build number in use</dd>
+ *      <dt>versions:</dt>  <dd>All versions that were registered</dd>
+ *      <dt>builds:</dt>    <dd>All builds that were registered.</dd>
+ *      <dt>mainClass:</dt> <dd>An object that was was stamped with the
+ *                 current version and build. If 
+ *                 mainClass.VERSION != version or mainClass.BUILD != build,
+ *                 multiple versions of pieces of the library have been
+ *                 loaded, potentially causing issues.</dd>
+ *       </dl>
+ *
+ * @method getVersion
+ * @static
+ * @param {String}  name the name of the module (event, slider, etc)
+ * @return {Object} The version info
+ */
+YAHOO.env.getVersion = function(name) {
+    return YAHOO.env.modules[name] || null;
+};
+
+/**
+ * Do not fork for a browser if it can be avoided.  Use feature detection when
+ * you can.  Use the user agent as a last resort.  YAHOO.env.ua stores a version
+ * number for the browser engine, 0 otherwise.  This value may or may not map
+ * to the version number of the browser using the engine.  The value is 
+ * presented as a float so that it can easily be used for boolean evaluation 
+ * as well as for looking for a particular range of versions.  Because of this, 
+ * some of the granularity of the version info may be lost (e.g., Gecko 1.8.0.9 
+ * reports 1.8).
+ * @class YAHOO.env.ua
+ * @static
+ */
+YAHOO.env.ua = function() {
+    var o={
+
+        /**
+         * Internet Explorer version number or 0.  Example: 6
+         * @property ie
+         * @type float
+         */
+        ie:0,
+
+        /**
+         * Opera version number or 0.  Example: 9.2
+         * @property opera
+         * @type float
+         */
+        opera:0,
+
+        /**
+         * Gecko engine revision number.  Will evaluate to 1 if Gecko 
+         * is detected but the revision could not be found. Other browsers
+         * will be 0.  Example: 1.8
+         * <pre>
+         * Firefox 1.0.0.4: 1.7.8   <-- Reports 1.7
+         * Firefox 1.5.0.9: 1.8.0.9 <-- Reports 1.8
+         * Firefox 2.0.0.3: 1.8.1.3 <-- Reports 1.8
+         * Firefox 3 alpha: 1.9a4   <-- Reports 1.9
+         * </pre>
+         * @property gecko
+         * @type float
+         */
+        gecko:0,
+
+        /**
+         * AppleWebKit version.  KHTML browsers that are not WebKit browsers 
+         * will evaluate to 1, other browsers 0.  Example: 418.9.1
+         * <pre>
+         * Safari 1.3.2 (312.6): 312.8.1 <-- Reports 312.8 -- currently the 
+         *                                   latest available for Mac OSX 10.3.
+         * Safari 2.0.2:         416     <-- hasOwnProperty introduced
+         * Safari 2.0.4:         418     <-- preventDefault fixed
+         * Safari 2.0.4 (419.3): 418.9.1 <-- One version of Safari may run
+         *                                   different versions of webkit
+         * Safari 2.0.4 (419.3): 419     <-- Current Safari release
+         * Webkit 212 nightly:   522+    <-- Safari 3.0 (with native SVG) should
+         *                                   be higher than this
+         *                                   
+         * </pre>
+         * http://developer.apple.com/internet/safari/uamatrix.html
+         * @property webkit
+         * @type float
+         */
+        webkit:0,
+
+        /**
+         * The mobile property will be set to a string containing any relevant
+         * user agent information when a modern mobile browser is detected.
+         * Currently limited to Safari on the iPhone/iPod Touch, Nokia N-series
+         * devices with the WebKit-based browser, and Opera Mini.  
+         * @property mobile 
+         * @type string
+         */
+        mobile: null 
+    };
+
+    var ua=navigator.userAgent, m;
+
+    // Modern KHTML browsers should qualify as Safari X-Grade
+    if ((/KHTML/).test(ua)) {
+        o.webkit=1;
+    }
+    // Modern WebKit browsers are at least X-Grade
+    m=ua.match(/AppleWebKit\/([^\s]*)/);
+    if (m&&m[1]) {
+        o.webkit=parseFloat(m[1]);
+
+        // Mobile browser check
+        if (/ Mobile\//.test(ua)) {
+            o.mobile = "Apple"; // iPhone or iPod Touch
+        } else {
+            m=ua.match(/NokiaN[^\/]*/);
+            if (m) {
+                o.mobile = m[0]; // Nokia N-series, ex: NokiaN95
+            }
+        }
+
+    }
+
+    if (!o.webkit) { // not webkit
+        // @todo check Opera/8.01 (J2ME/MIDP; Opera Mini/2.0.4509/1316; fi; U; ssr)
+        m=ua.match(/Opera[\s\/]([^\s]*)/);
+        if (m&&m[1]) {
+            o.opera=parseFloat(m[1]);
+            m=ua.match(/Opera Mini[^;]*/);
+            if (m) {
+                o.mobile = m[0]; // ex: Opera Mini/2.0.4509/1316
+            }
+        } else { // not opera or webkit
+            m=ua.match(/MSIE\s([^;]*)/);
+            if (m&&m[1]) {
+                o.ie=parseFloat(m[1]);
+            } else { // not opera, webkit, or ie
+                m=ua.match(/Gecko\/([^\s]*)/);
+                if (m) {
+                    o.gecko=1; // Gecko detected, look for revision
+                    m=ua.match(/rv:([^\s\)]*)/);
+                    if (m&&m[1]) {
+                        o.gecko=parseFloat(m[1]);
+                    }
+                }
+            }
+        }
+    }
+    
+    return o;
+}();
+
+/*
+ * Initializes the global by creating the default namespaces and applying
+ * any new configuration information that is detected.  This is the setup
+ * for env.
+ * @method init
+ * @static
+ * @private
+ */
+(function() {
+    YAHOO.namespace("util", "widget", "example");
+    if ("undefined" !== typeof YAHOO_config) {
+        var l=YAHOO_config.listener,ls=YAHOO.env.listeners,unique=true,i;
+        if (l) {
+            // if YAHOO is loaded multiple times we need to check to see if
+            // this is a new config object.  If it is, add the new component
+            // load listener to the stack
+            for (i=0;i<ls.length;i=i+1) {
+                if (ls[i]==l) {
+                    unique=false;
+                    break;
+                }
+            }
+            if (unique) {
+                ls.push(l);
+            }
+        }
+    }
+})();
+/**
+ * Provides the language utilites and extensions used by the library
+ * @class YAHOO.lang
+ */
+YAHOO.lang = YAHOO.lang || {
+    /**
+     * Determines whether or not the provided object is an array.
+     * Testing typeof/instanceof/constructor of arrays across frame 
+     * boundaries isn't possible in Safari unless you have a reference
+     * to the other frame to test against its Array prototype.  To
+     * handle this case, we test well-known array properties instead.
+     * properties.
+     * @method isArray
+     * @param {any} o The object being testing
+     * @return Boolean
+     */
+    isArray: function(o) { 
+
+        if (o) {
+           var l = YAHOO.lang;
+           return l.isNumber(o.length) && l.isFunction(o.splice);
+        }
+        return false;
+    },
+
+    /**
+     * Determines whether or not the provided object is a boolean
+     * @method isBoolean
+     * @param {any} o The object being testing
+     * @return Boolean
+     */
+    isBoolean: function(o) {
+        return typeof o === 'boolean';
+    },
+    
+    /**
+     * Determines whether or not the provided object is a function
+     * @method isFunction
+     * @param {any} o The object being testing
+     * @return Boolean
+     */
+    isFunction: function(o) {
+        return typeof o === 'function';
+    },
+        
+    /**
+     * Determines whether or not the provided object is null
+     * @method isNull
+     * @param {any} o The object being testing
+     * @return Boolean
+     */
+    isNull: function(o) {
+        return o === null;
+    },
+        
+    /**
+     * Determines whether or not the provided object is a legal number
+     * @method isNumber
+     * @param {any} o The object being testing
+     * @return Boolean
+     */
+    isNumber: function(o) {
+        return typeof o === 'number' && isFinite(o);
+    },
+      
+    /**
+     * Determines whether or not the provided object is of type object
+     * or function
+     * @method isObject
+     * @param {any} o The object being testing
+     * @return Boolean
+     */  
+    isObject: function(o) {
+return (o && (typeof o === 'object' || YAHOO.lang.isFunction(o))) || false;
+    },
+        
+    /**
+     * Determines whether or not the provided object is a string
+     * @method isString
+     * @param {any} o The object being testing
+     * @return Boolean
+     */
+    isString: function(o) {
+        return typeof o === 'string';
+    },
+        
+    /**
+     * Determines whether or not the provided object is undefined
+     * @method isUndefined
+     * @param {any} o The object being testing
+     * @return Boolean
+     */
+    isUndefined: function(o) {
+        return typeof o === 'undefined';
+    },
+    
+    /**
+     * Determines whether or not the property was added
+     * to the object instance.  Returns false if the property is not present
+     * in the object, or was inherited from the prototype.
+     * This abstraction is provided to enable hasOwnProperty for Safari 1.3.x.
+     * There is a discrepancy between YAHOO.lang.hasOwnProperty and
+     * Object.prototype.hasOwnProperty when the property is a primitive added to
+     * both the instance AND prototype with the same value:
+     * <pre>
+     * var A = function() {};
+     * A.prototype.foo = 'foo';
+     * var a = new A();
+     * a.foo = 'foo';
+     * alert(a.hasOwnProperty('foo')); // true
+     * alert(YAHOO.lang.hasOwnProperty(a, 'foo')); // false when using fallback
+     * </pre>
+     * @method hasOwnProperty
+     * @param {any} o The object being testing
+     * @return Boolean
+     */
+    hasOwnProperty: function(o, prop) {
+        if (Object.prototype.hasOwnProperty) {
+            return o.hasOwnProperty(prop);
+        }
+        
+        return !YAHOO.lang.isUndefined(o[prop]) && 
+                o.constructor.prototype[prop] !== o[prop];
+    },
+ 
+    /**
+     * IE will not enumerate native functions in a derived object even if the
+     * function was overridden.  This is a workaround for specific functions 
+     * we care about on the Object prototype. 
+     * @property _IEEnumFix
+     * @param {Function} r  the object to receive the augmentation
+     * @param {Function} s  the object that supplies the properties to augment
+     * @static
+     * @private
+     */
+    _IEEnumFix: function(r, s) {
+        if (YAHOO.env.ua.ie) {
+            var add=["toString", "valueOf"], i;
+            for (i=0;i<add.length;i=i+1) {
+                var fname=add[i],f=s[fname];
+                if (YAHOO.lang.isFunction(f) && f!=Object.prototype[fname]) {
+                    r[fname]=f;
+                }
+            }
+        }
+    },
+       
+    /**
+     * Utility to set up the prototype, constructor and superclass properties to
+     * support an inheritance strategy that can chain constructors and methods.
+     * Static members will not be inherited.
+     *
+     * @method extend
+     * @static
+     * @param {Function} subc   the object to modify
+     * @param {Function} superc the object to inherit
+     * @param {Object} overrides  additional properties/methods to add to the
+     *                              subclass prototype.  These will override the
+     *                              matching items obtained from the superclass 
+     *                              if present.
+     */
+    extend: function(subc, superc, overrides) {
+        if (!superc||!subc) {
+            throw new Error("YAHOO.lang.extend failed, please check that " +
+                            "all dependencies are included.");
+        }
+        var F = function() {};
+        F.prototype=superc.prototype;
+        subc.prototype=new F();
+        subc.prototype.constructor=subc;
+        subc.superclass=superc.prototype;
+        if (superc.prototype.constructor == Object.prototype.constructor) {
+            superc.prototype.constructor=superc;
+        }
+    
+        if (overrides) {
+            for (var i in overrides) {
+                subc.prototype[i]=overrides[i];
+            }
+
+            YAHOO.lang._IEEnumFix(subc.prototype, overrides);
+        }
+    },
+   
+    /**
+     * Applies all properties in the supplier to the receiver if the
+     * receiver does not have these properties yet.  Optionally, one or 
+     * more methods/properties can be specified (as additional 
+     * parameters).  This option will overwrite the property if receiver 
+     * has it already.  If true is passed as the third parameter, all 
+     * properties will be applied and _will_ overwrite properties in 
+     * the receiver.
+     *
+     * @method augmentObject
+     * @static
+     * @since 2.3.0
+     * @param {Function} r  the object to receive the augmentation
+     * @param {Function} s  the object that supplies the properties to augment
+     * @param {String*|boolean}  arguments zero or more properties methods 
+     *        to augment the receiver with.  If none specified, everything
+     *        in the supplier will be used unless it would
+     *        overwrite an existing property in the receiver. If true
+     *        is specified as the third parameter, all properties will
+     *        be applied and will overwrite an existing property in
+     *        the receiver
+     */
+    augmentObject: function(r, s) {
+        if (!s||!r) {
+            throw new Error("Absorb failed, verify dependencies.");
+        }
+        var a=arguments, i, p, override=a[2];
+        if (override && override!==true) { // only absorb the specified properties
+            for (i=2; i<a.length; i=i+1) {
+                r[a[i]] = s[a[i]];
+            }
+        } else { // take everything, overwriting only if the third parameter is true
+            for (p in s) { 
+                if (override || !r[p]) {
+                    r[p] = s[p];
+                }
+            }
+            
+            YAHOO.lang._IEEnumFix(r, s);
+        }
+    },
+ 
+    /**
+     * Same as YAHOO.lang.augmentObject, except it only applies prototype properties
+     * @see YAHOO.lang.augmentObject
+     * @method augmentProto
+     * @static
+     * @param {Function} r  the object to receive the augmentation
+     * @param {Function} s  the object that supplies the properties to augment
+     * @param {String*|boolean}  arguments zero or more properties methods 
+     *        to augment the receiver with.  If none specified, everything 
+     *        in the supplier will be used unless it would overwrite an existing 
+     *        property in the receiver.  if true is specified as the third 
+     *        parameter, all properties will be applied and will overwrite an 
+     *        existing property in the receiver
+     */
+    augmentProto: function(r, s) {
+        if (!s||!r) {
+            throw new Error("Augment failed, verify dependencies.");
+        }
+        //var a=[].concat(arguments);
+        var a=[r.prototype,s.prototype];
+        for (var i=2;i<arguments.length;i=i+1) {
+            a.push(arguments[i]);
+        }
+        YAHOO.lang.augmentObject.apply(this, a);
+    },
+
+      
+    /**
+     * Returns a simple string representation of the object or array.
+     * Other types of objects will be returned unprocessed.  Arrays
+     * are expected to be indexed.  Use object notation for
+     * associative arrays.
+     * @method dump
+     * @since 2.3.0
+     * @param o {Object} The object to dump
+     * @param d {int} How deep to recurse child objects, default 3
+     * @return {String} the dump result
+     */
+    dump: function(o, d) {
+        var l=YAHOO.lang,i,len,s=[],OBJ="{...}",FUN="f(){...}",
+            COMMA=', ', ARROW=' => ';
+
+        // Cast non-objects to string
+        // Skip dates because the std toString is what we want
+        // Skip HTMLElement-like objects because trying to dump 
+        // an element will cause an unhandled exception in FF 2.x
+        if (!l.isObject(o)) {
+            return o + "";
+        } else if (o instanceof Date || ("nodeType" in o && "tagName" in o)) {
+            return o;
+        } else if  (l.isFunction(o)) {
+            return FUN;
+        }
+
+        // dig into child objects the depth specifed. Default 3
+        d = (l.isNumber(d)) ? d : 3;
+
+        // arrays [1, 2, 3]
+        if (l.isArray(o)) {
+            s.push("[");
+            for (i=0,len=o.length;i<len;i=i+1) {
+                if (l.isObject(o[i])) {
+                    s.push((d > 0) ? l.dump(o[i], d-1) : OBJ);
+                } else {
+                    s.push(o[i]);
+                }
+                s.push(COMMA);
+            }
+            if (s.length > 1) {
+                s.pop();
+            }
+            s.push("]");
+        // objects {k1 => v1, k2 => v2}
+        } else {
+            s.push("{");
+            for (i in o) {
+                if (l.hasOwnProperty(o, i)) {
+                    s.push(i + ARROW);
+                    if (l.isObject(o[i])) {
+                        s.push((d > 0) ? l.dump(o[i], d-1) : OBJ);
+                    } else {
+                        s.push(o[i]);
+                    }
+                    s.push(COMMA);
+                }
+            }
+            if (s.length > 1) {
+                s.pop();
+            }
+            s.push("}");
+        }
+
+        return s.join("");
+    },
+
+    /**
+     * Does variable substitution on a string. It scans through the string 
+     * looking for expressions enclosed in { } braces. If an expression 
+     * is found, it is used a key on the object.  If there is a space in
+     * the key, the first word is used for the key and the rest is provided
+     * to an optional function to be used to programatically determine the
+     * value (the extra information might be used for this decision). If 
+     * the value for the key in the object, or what is returned from the
+     * function has a string value, number value, or object value, it is 
+     * substituted for the bracket expression and it repeats.  If this
+     * value is an object, it uses the Object's toString() if this has
+     * been overridden, otherwise it does a shallow dump of the key/value
+     * pairs.
+     * @method substitute
+     * @since 2.3.0
+     * @param s {String} The string that will be modified.
+     * @param o {Object} An object containing the replacement values
+     * @param f {Function} An optional function that can be used to
+     *                     process each match.  It receives the key,
+     *                     value, and any extra metadata included with
+     *                     the key inside of the braces.
+     * @return {String} the substituted string
+     */
+    substitute: function (s, o, f) {
+        var i, j, k, key, v, meta, l=YAHOO.lang, saved=[], token, 
+            DUMP='dump', SPACE=' ', LBRACE='{', RBRACE='}';
+
+
+        for (;;) {
+            i = s.lastIndexOf(LBRACE);
+            if (i < 0) {
+                break;
+            }
+            j = s.indexOf(RBRACE, i);
+            if (i + 1 >= j) {
+                break;
+            }
+
+            //Extract key and meta info 
+            token = s.substring(i + 1, j);
+            key = token;
+            meta = null;
+            k = key.indexOf(SPACE);
+            if (k > -1) {
+                meta = key.substring(k + 1);
+                key = key.substring(0, k);
+            }
+
+            // lookup the value
+            v = o[key];
+
+            // if a substitution function was provided, execute it
+            if (f) {
+                v = f(key, v, meta);
+            }
+
+            if (l.isObject(v)) {
+                if (l.isArray(v)) {
+                    v = l.dump(v, parseInt(meta, 10));
+                } else {
+                    meta = meta || "";
+
+                    // look for the keyword 'dump', if found force obj dump
+                    var dump = meta.indexOf(DUMP);
+                    if (dump > -1) {
+                        meta = meta.substring(4);
+                    }
+
+                    // use the toString if it is not the Object toString 
+                    // and the 'dump' meta info was not found
+                    if (v.toString===Object.prototype.toString||dump>-1) {
+                        v = l.dump(v, parseInt(meta, 10));
+                    } else {
+                        v = v.toString();
+                    }
+                }
+            } else if (!l.isString(v) && !l.isNumber(v)) {
+                // This {block} has no replace string. Save it for later.
+                v = "~-" + saved.length + "-~";
+                saved[saved.length] = token;
+
+                // break;
+            }
+
+            s = s.substring(0, i) + v + s.substring(j + 1);
+
+
+        }
+
+        // restore saved {block}s
+        for (i=saved.length-1; i>=0; i=i-1) {
+            s = s.replace(new RegExp("~-" + i + "-~"), "{"  + saved[i] + "}", "g");
+        }
+
+        return s;
+    },
+
+
+    /**
+     * Returns a string without any leading or trailing whitespace.  If 
+     * the input is not a string, the input will be returned untouched.
+     * @method trim
+     * @since 2.3.0
+     * @param s {string} the string to trim
+     * @return {string} the trimmed string
+     */
+    trim: function(s){
+        try {
+            return s.replace(/^\s+|\s+$/g, "");
+        } catch(e) {
+            return s;
+        }
+    },
+
+    /**
+     * Returns a new object containing all of the properties of
+     * all the supplied objects.  The properties from later objects
+     * will overwrite those in earlier objects.
+     * @method merge
+     * @since 2.3.0
+     * @param arguments {Object*} the objects to merge
+     * @return the new merged object
+     */
+    merge: function() {
+        var o={}, a=arguments;
+        for (var i=0, l=a.length; i<l; i=i+1) {
+            YAHOO.lang.augmentObject(o, a[i], true);
+        }
+        return o;
+    },
+
+    /**
+     * Executes the supplied function in the scope of the supplied 
+     * object 'when' milliseconds later.  Executes the function a 
+     * single time unless periodic is set to true.
+     * @method later
+     * @since 2.4.0
+     * @param when {int} the number of milliseconds to wait until the fn 
+     * is executed
+     * @param o the scope object
+     * @param fn {Function|String} the function to execute or the name of 
+     * the method in the 'o' object to execute
+     * @param data [Array] data that is provided to the function.  This accepts
+     * either a single item or an array.  If an array is provided, the
+     * function is executed with one parameter for each array item.  If
+     * you need to pass a single array parameter, it needs to be wrapped in
+     * an array [myarray]
+     * @param periodic {boolean} if true, executes continuously at supplied 
+     * interval until canceled
+     * @return a timer object. Call the cancel() method on this object to 
+     * stop the timer.
+     */
+    later: function(when, o, fn, data, periodic) {
+        when = when || 0; 
+        o = o || {};
+        var m=fn, d=data, f, r;
+
+        if (YAHOO.lang.isString(fn)) {
+            m = o[fn];
+        }
+
+        if (!m) {
+            throw new TypeError("method undefined");
+        }
+
+        if (!YAHOO.lang.isArray(d)) {
+            d = [data];
+        }
+
+        f = function() {
+            m.apply(o, d);
+        };
+
+        r = (periodic) ? setInterval(f, when) : setTimeout(f, when);
+
+        return {
+            interval: periodic,
+            cancel: function() {
+                if (this.interval) {
+                    clearInterval(r);
+                } else {
+                    clearTimeout(r);
+                }
+            }
+        };
+    },
+
+    /**
+     * A convenience method for detecting a legitimate non-null value.
+     * Returns false for null/undefined/NaN, true for other values, 
+     * including 0/false/''
+     * @method isValue
+     * @since 2.3.0
+     * @param o {any} the item to test
+     * @return {boolean} true if it is not null/undefined/NaN || false
+     */
+    isValue: function(o) {
+        // return (o || o === false || o === 0 || o === ''); // Infinity fails
+        var l = YAHOO.lang;
+return (l.isObject(o) || l.isString(o) || l.isNumber(o) || l.isBoolean(o));
+    }
+
+};
+
+/*
+ * An alias for <a href="YAHOO.lang.html">YAHOO.lang</a>
+ * @class YAHOO.util.Lang
+ */
+YAHOO.util.Lang = YAHOO.lang;
+ 
+/**
+ * Same as YAHOO.lang.augmentObject, except it only applies prototype 
+ * properties.  This is an alias for augmentProto.
+ * @see YAHOO.lang.augmentObject
+ * @method augment
+ * @static
+ * @param {Function} r  the object to receive the augmentation
+ * @param {Function} s  the object that supplies the properties to augment
+ * @param {String*|boolean}  arguments zero or more properties methods to 
+ *        augment the receiver with.  If none specified, everything
+ *        in the supplier will be used unless it would
+ *        overwrite an existing property in the receiver.  if true
+ *        is specified as the third parameter, all properties will
+ *        be applied and will overwrite an existing property in
+ *        the receiver
+ */
+YAHOO.lang.augment = YAHOO.lang.augmentProto;
+
+/**
+ * An alias for <a href="YAHOO.lang.html#augment">YAHOO.lang.augment</a>
+ * @for YAHOO
+ * @method augment
+ * @static
+ * @param {Function} r  the object to receive the augmentation
+ * @param {Function} s  the object that supplies the properties to augment
+ * @param {String*}  arguments zero or more properties methods to 
+ *        augment the receiver with.  If none specified, everything
+ *        in the supplier will be used unless it would
+ *        overwrite an existing property in the receiver
+ */
+YAHOO.augment = YAHOO.lang.augmentProto;
+       
+/**
+ * An alias for <a href="YAHOO.lang.html#extend">YAHOO.lang.extend</a>
+ * @method extend
+ * @static
+ * @param {Function} subc   the object to modify
+ * @param {Function} superc the object to inherit
+ * @param {Object} overrides  additional properties/methods to add to the
+ *        subclass prototype.  These will override the
+ *        matching items obtained from the superclass if present.
+ */
+YAHOO.extend = YAHOO.lang.extend;
+
+YAHOO.register("yahoo", YAHOO, {version: "2.4.1", build: "742"});
+/**
+ * Provides a mechanism to fetch remote resources and
+ * insert them into a document
+ * @module get
+ * @requires yahoo
+ */
+
+/**
+ * Fetches and inserts one or more script or link nodes into the document 
+ * @namespace YAHOO.util
+ * @class YAHOO.util.Get
+ */
+YAHOO.util.Get = function() {
+
+    /**
+     * hash of queues to manage multiple requests
+     * @property queues
+     * @private
+     */
+    var queues={}, 
+        
+    /**
+     * queue index used to generate transaction ids
+     * @property qidx
+     * @type int
+     * @private
+     */
+        qidx=0, 
+        
+    /**
+     * node index used to generate unique node ids
+     * @property nidx
+     * @type int
+     * @private
+     */
+        nidx=0, 
+
+        // ridx=0,
+
+        // sandboxFrame=null,
+
+    /**
+     * interal property used to prevent multiple simultaneous purge 
+     * processes
+     * @property purging
+     * @type boolean
+     * @private
+     */
+        purging=false,
+
+        ua=YAHOO.env.ua, 
+        
+        lang=YAHOO.lang;
+    
+    /** 
+     * Generates an HTML element, this is not appended to a document
+     * @method _node
+     * @param type {string} the type of element
+     * @param attr {string} the attributes
+     * @param win {Window} optional window to create the element in
+     * @return {HTMLElement} the generated node
+     * @private
+     */
+    var _node = function(type, attr, win) {
+        var w = win || window, d=w.document, n=d.createElement(type);
+
+        for (var i in attr) {
+            if (attr[i] && YAHOO.lang.hasOwnProperty(attr, i)) {
+                n.setAttribute(i, attr[i]);
+            }
+        }
+
+        return n;
+    };
+
+    /**
+     * Generates a link node
+     * @method _linkNode
+     * @param url {string} the url for the css file
+     * @param win {Window} optional window to create the node in
+     * @return {HTMLElement} the generated node
+     * @private
+     */
+    var _linkNode = function(url, win) {
+        return _node("link", {
+                "id": "yui__dyn_" + (nidx++),
+                "type": "text/css",
+                "rel": "stylesheet",
+                "href": url
+            }, win);
+    };
+
+    /**
+     * Generates a script node
+     * @method _scriptNode
+     * @param url {string} the url for the script file
+     * @param win {Window} optional window to create the node in
+     * @return {HTMLElement} the generated node
+     * @private
+     */
+    var _scriptNode = function(url, win) {
+        return _node("script", {
+                "id": "yui__dyn_" + (nidx++),
+                "type": "text/javascript",
+                "src": url
+            }, win);
+    };
+
+    /**
+     * Returns the data payload for callback functions
+     * @method _returnData
+     * @private
+     */
+    var _returnData = function(q) {
+        return {
+                tId: q.tId,
+                win: q.win,
+                data: q.data,
+                nodes: q.nodes,
+                purge: function() {
+                    _purge(this.tId);
+                }
+            };
+    };
+
+    /*
+     * The request failed, execute fail handler with whatever
+     * was accomplished.  There isn't a failure case at the
+     * moment unless you count aborted transactions
+     * @method _fail
+     * @param id {string} the id of the request
+     * @private
+     */
+    var _fail = function(id) {
+        var q = queues[id];
+        // execute failure callback
+        if (q.onFailure) {
+            var sc=q.scope || q.win;
+            q.onFailure.call(sc, _returnData(q));
+        }
+    };
+
+    /**
+     * The request is complete, so executing the requester's callback
+     * @method _finish
+     * @param id {string} the id of the request
+     * @private
+     */
+    var _finish = function(id) {
+        var q = queues[id];
+        q.finished = true;
+
+        if (q.aborted) {
+            _fail(id);
+            return;
+        }
+
+        // execute success callback
+        if (q.onSuccess) {
+            var sc=q.scope || q.win;
+            q.onSuccess.call(sc, _returnData(q));
+        }
+    };
+
+    /**
+     * Loads the next item for a given request
+     * @method _next
+     * @param id {string} the id of the request
+     * @param loaded {string} the url that was just loaded, if any
+     * @private
+     */
+    var _next = function(id, loaded) {
+        var q = queues[id];
+
+        if (q.aborted) {
+            _fail(id);
+            return;
+        }
+
+        if (loaded) {
+            q.url.shift(); 
+            if (q.varName) {
+                q.varName.shift(); 
+            }
+        } else {
+            // This is the first pass: make sure the url is an array
+            q.url = (lang.isString(q.url)) ? [q.url] : q.url;
+            if (q.varName) {
+                q.varName = (lang.isString(q.varName)) ? [q.varName] : q.varName;
+            }
+        }
+
+        var w=q.win, d=w.document, h=d.getElementsByTagName("head")[0], n;
+
+        if (q.url.length === 0) {
+            // Safari 2.x workaround - There is no way to know when 
+            // a script is ready in versions of Safari prior to 3.x.
+            // Adding an extra node reduces the problem, but doesn't
+            // eliminate it completely because the browser executes
+            // them asynchronously. 
+            if (q.type === "script" && ua.webkit && ua.webkit < 420 && 
+                    !q.finalpass && !q.varName) {
+                // Add another script node.  This does not guarantee that the
+                // scripts will execute in order, but it does appear to fix the
+                // problem on fast connections more effectively than using an
+                // arbitrary timeout.  It is possible that the browser does
+                // block subsequent script execution in this case for a limited
+                // time.
+                var extra = _scriptNode(null, q.win);
+                extra.innerHTML='YAHOO.util.Get._finalize("' + id + '");';
+                q.nodes.push(extra); h.appendChild(extra);
+
+            } else {
+                _finish(id);
+            }
+
+            return;
+        } 
+
+
+        var url = q.url[0];
+
+        if (q.type === "script") {
+            n = _scriptNode(url, w);
+        } else {
+            n = _linkNode(url, w);
+        }
+
+        // track this node's load progress
+        _track(q.type, n, id, url, w, q.url.length);
+
+        // add the node to the queue so we can return it to the user supplied callback
+        q.nodes.push(n);
+
+        // add it to the head
+        h.appendChild(n);
+        
+
+        // FireFox does not support the onload event for link nodes, so there is
+        // no way to make the css requests synchronous. This means that the css 
+        // rules in multiple files could be applied out of order in this browser
+        // if a later request returns before an earlier one.  Safari too.
+        if ((ua.webkit || ua.gecko) && q.type === "css") {
+            _next(id, url);
+        }
+    };
+
+    /**
+     * Removes processed queues and corresponding nodes
+     * @method _autoPurge
+     * @private
+     */
+    var _autoPurge = function() {
+
+        if (purging) {
+            return;
+        }
+
+        purging = true;
+        for (var i in queues) {
+            var q = queues[i];
+            if (q.autopurge && q.finished) {
+                _purge(q.tId);
+            }
+        }
+
+        purging = false;
+    };
+
+    /**
+     * Removes the nodes for the specified queue
+     * @method _purge
+     * @private
+     */
+    var _purge = function(tId) {
+        var q=queues[tId];
+        if (q) {
+            var n=q.nodes, l=n.length, d=q.win.document, 
+                h=d.getElementsByTagName("head")[0];
+            for (var i=0; i<l; i=i+1) {
+                h.removeChild(n[i]);
+            }
+        }
+    };
+
+    /**
+     * Saves the state for the request and begins loading
+     * the requested urls
+     * @method queue
+     * @param type {string} the type of node to insert
+     * @param url {string} the url to load
+     * @param opts the hash of options for this request
+     * @private
+     */
+    var _queue = function(type, url, opts) {
+
+        var id = "q" + (qidx++);
+        opts = opts || {};
+
+        if (qidx % YAHOO.util.Get.PURGE_THRESH === 0) {
+            _autoPurge();
+        }
+
+        queues[id] = lang.merge(opts, {
+            tId: id,
+            type: type,
+            url: url,
+            finished: false,
+            nodes: []
+        });
+
+        var q = queues[id];
+        q.win = q.win || window;
+        q.scope = q.scope || q.win;
+        q.autopurge = ("autopurge" in q) ? q.autopurge : 
+                      (type === "script") ? true : false;
+
+        lang.later(0, q, _next, id);
+
+        return {
+            tId: id
+        };
+    };
+
+    /**
+     * Detects when a node has been loaded.  In the case of
+     * script nodes, this does not guarantee that contained
+     * script is ready to use.
+     * @method _track
+     * @param type {string} the type of node to track
+     * @param n {HTMLElement} the node to track
+     * @param id {string} the id of the request
+     * @param url {string} the url that is being loaded
+     * @param win {Window} the targeted window
+     * @param qlength the number of remaining items in the queue,
+     * including this one
+     * @param trackfn {Function} function to execute when finished
+     * the default is _next
+     * @private
+     */
+    var _track = function(type, n, id, url, win, qlength, trackfn) {
+        var f = trackfn || _next;
+
+        // IE supports the readystatechange event for script and css nodes
+        if (ua.ie) {
+            n.onreadystatechange = function() {
+                var rs = this.readyState;
+                if ("loaded" === rs || "complete" === rs) {
+                    f(id, url);
+                }
+            };
+
+        // webkit prior to 3.x is problemmatic
+        } else if (ua.webkit) {
+
+            if (type === "script") {
+
+                // Safari 3.x supports the load event for script nodes (DOM2)
+                if (ua.webkit > 419) {
+
+                    n.addEventListener("load", function() {
+                        f(id, url);
+                    });
+
+                // Nothing can be done with Safari < 3.x except to pause and hope
+                // for the best, particularly after last script is inserted. The
+                // scripts will always execute in the order they arrive, not
+                // necessarily the order in which they were inserted.  To support
+                // script nodes with complete reliability in these browsers, script
+                // nodes either need to invoke a function in the window once they
+                // are loaded or the implementer needs to provide a well-known
+                // property that the utility can poll for.
+                } else {
+                    // Poll for the existence of the named variable, if it
+                    // was supplied.
+                    var q = queues[id];
+                    if (q.varName) {
+                        var freq=YAHOO.util.Get.POLL_FREQ;
+                        q.maxattempts = YAHOO.util.Get.TIMEOUT/freq;
+                        q.attempts = 0;
+                        q._cache = q.varName[0].split(".");
+                        q.timer = lang.later(freq, q, function(o) {
+                            var a=this._cache, l=a.length, w=this.win, i;
+                            for (i=0; i<l; i=i+1) {
+                                w = w[a[i]];
+                                if (!w) {
+                                    // if we have exausted our attempts, give up
+                                    this.attempts++;
+                                    if (this.attempts++ > this.maxattempts) {
+                                        q.timer.cancel();
+                                        _fail(id);
+                                    } else {
+                                    }
+                                    return;
+                                }
+                            }
+                            
+
+                            q.timer.cancel();
+                            f(id, url);
+
+                        }, null, true);
+                    } else {
+                        lang.later(YAHOO.util.Get.POLL_FREQ, null, f, [id, url]);
+                    }
+                }
+            } 
+
+        // FireFox and Opera support onload (but not DOM2 in FF) handlers for
+        // script nodes.  Opera, but not FF, supports the onload event for link
+        // nodes.
+        } else { 
+            n.onload = function() {
+                f(id, url);
+            };
+        }
+    };
+
+    return {
+
+        /**
+         * The default poll freqency in ms, when needed
+         * @property POLL_FREQ
+         * @static
+         * @type int
+         * @default 10
+         */
+        POLL_FREQ: 10,
+
+        /**
+         * The number of request required before an automatic purge.
+         * property PURGE_THRESH
+         * @static
+         * @type int
+         * @default 20
+         */
+        PURGE_THRESH: 20,
+
+        /**
+         * The length time to poll for varName when loading a script in
+         * Safari 2.x before the transaction fails.
+         * property TIMEOUT
+         * @static
+         * @type int
+         * @default 2000
+         */
+        TIMEOUT: 2000,
+        
+        /**
+         * Called by the the helper for detecting script load in Safari
+         * @method _finalize
+         * @param id {string} the transaction id
+         * @private
+         */
+        _finalize: function(id) {
+            lang.later(0, null, _finish, id);
+        },
+
+        /**
+         * Abort a transaction
+         * @method abort
+         * @param {string|object} either the tId or the object returned from
+         * script() or css()
+         */
+        abort: function(o) {
+            var id = (lang.isString(o)) ? o : o.tId;
+            var q = queues[id];
+            if (q) {
+                q.aborted = true;
+            }
+        }, 
+
+        /**
+         * Fetches and inserts one or more script nodes into the head
+         * of the current document or the document in a specified window.
+         *
+         * @method script
+         * @static
+         * @param url {string|string[]} the url or urls to the script(s)
+         * @param opts {object} Options: 
+         * <dl>
+         * <dt>onSuccess</dt>
+         * <dd>
+         * callback to execute when the script(s) are finished loading
+         * The callback receives an object back with the following
+         * data:
+         * <dl>
+         * <dt>win</dt>
+         * <dd>the window the script(s) were inserted into</dd>
+         * <dt>data</dt>
+         * <dd>the data object passed in when the request was made</dd>
+         * <dt>nodes</dt>
+         * <dd>An array containing references to the nodes that were
+         * inserted</dd>
+         * <dt>purge</dt>
+         * <dd>A function that, when executed, will remove the nodes
+         * that were inserted</dd>
+         * <dt>
+         * </dl>
+         * </dd>
+         * <dt>onFailure</dt>
+         * <dd>
+         * callback to execute when the script load operation fails
+         * The callback receives an object back with the following
+         * data:
+         * <dl>
+         * <dt>win</dt>
+         * <dd>the window the script(s) were inserted into</dd>
+         * <dt>data</dt>
+         * <dd>the data object passed in when the request was made</dd>
+         * <dt>nodes</dt>
+         * <dd>An array containing references to the nodes that were
+         * inserted successfully</dd>
+         * <dt>purge</dt>
+         * <dd>A function that, when executed, will remove any nodes
+         * that were inserted</dd>
+         * <dt>
+         * </dl>
+         * </dd>
+         * <dt>scope</dt>
+         * <dd>the execution context for the callbacks</dd>
+         * <dt>win</dt>
+         * <dd>a window other than the one the utility occupies</dd>
+         * <dt>autopurge</dt>
+         * <dd>
+         * setting to true will let the utilities cleanup routine purge 
+         * the script once loaded
+         * </dd>
+         * <dt>data</dt>
+         * <dd>
+         * data that is supplied to the callback when the script(s) are
+         * loaded.
+         * </dd>
+         * <dt>varName</dt>
+         * <dd>
+         * variable that should be available when a script is finished
+         * loading.  Used to help Safari 2.x and below with script load 
+         * detection.  The type of this property should match what was
+         * passed into the url parameter: if loading a single url, a
+         * string can be supplied.  If loading multiple scripts, you
+         * must supply an array that contains the variable name for
+         * each script.
+         * </dd>
+         * </dl>
+         * <pre>
+         * // assumes yahoo, dom, and event are already on the page
+         *   YAHOO.util.Get.script(
+         *   ["http://yui.yahooapis.com/2.3.1/build/dragdrop/dragdrop-min.js",
+         *    "http://yui.yahooapis.com/2.3.1/build/animation/animation-min.js"], {
+         *     onSuccess: function(o) {
+         *       new YAHOO.util.DDProxy("dd1"); // also new o.reference("dd1"); would work
+         *       this.log("won't cause error because YAHOO is the scope");
+         *       this.log(o.nodes.length === 2) // true
+         *       // o.purge(); // optionally remove the script nodes immediately
+         *     },
+         *     onFailure: function(o) {
+         *     },
+         *     data: "foo",
+         *     scope: YAHOO,
+         *     // win: otherframe // target another window/frame
+         *     autopurge: true // allow the utility to choose when to remove the nodes
+         *   });
+         * </pre>
+         * @return {tId: string} an object containing info about the transaction
+         */
+        script: function(url, opts) { return _queue("script", url, opts); },
+
+        /**
+         * Fetches and inserts one or more css link nodes into the 
+         * head of the current document or the document in a specified
+         * window.
+         * @method css
+         * @static
+         * @param url {string} the url or urls to the css file(s)
+         * @param opts Options: 
+         * <dl>
+         * <dt>onSuccess</dt>
+         * <dd>
+         * callback to execute when the css file(s) are finished loading
+         * The callback receives an object back with the following
+         * data:
+         * <dl>win</dl>
+         * <dd>the window the link nodes(s) were inserted into</dd>
+         * <dt>data</dt>
+         * <dd>the data object passed in when the request was made</dd>
+         * <dt>nodes</dt>
+         * <dd>An array containing references to the nodes that were
+         * inserted</dd>
+         * <dt>purge</dt>
+         * <dd>A function that, when executed, will remove the nodes
+         * that were inserted</dd>
+         * <dt>
+         * </dl>
+         * </dd>
+         * <dt>scope</dt>
+         * <dd>the execution context for the callbacks</dd>
+         * <dt>win</dt>
+         * <dd>a window other than the one the utility occupies</dd>
+         * <dt>data</dt>
+         * <dd>
+         * data that is supplied to the callbacks when the nodes(s) are
+         * loaded.
+         * </dd>
+         * </dl>
+         * <pre>
+         *      YAHOO.util.Get.css("http://yui.yahooapis.com/2.3.1/build/menu/assets/skins/sam/menu.css");
+         * </pre>
+         * <pre>
+         *      YAHOO.util.Get.css(["http://yui.yahooapis.com/2.3.1/build/menu/assets/skins/sam/menu.css",
+         * </pre>
+         * @return {tId: string} an object containing info about the transaction
+         */
+        css: function(url, opts) {
+            return _queue("css", url, opts); 
+        }
+    };
+}();
+
+YAHOO.register("get", YAHOO.util.Get, {version: "2.4.1", build: "742"});
+/**
  * Provides dynamic loading for the YUI library.  It includes the dependency
  * info for the library, and will automatically pull in dependencies for
  * the modules requested.  It supports rollup files (such as utilities.js
@@ -23,17 +1588,13 @@
  *      version management, automatic sandboxing
  */
 (function() {
+
+    var Y=YAHOO, util=Y.util, lang=Y.lang, env=Y.env;
  
-    // Define YAHOO_config if it doesn't exist.  Only relevant if YAHOO is not
-    // already on the page
-    if (typeof YAHOO_config === "undefined") {
-        YAHOO_config = {};
-    }
-
-    // YUI is locally scoped, only pieces of it will be referenced in YAHOO
-    // after YAHOO has been loaded.
     var YUI = {
 
+        dupsAllowed: {'yahoo': true, 'get': true},
+
         /*
          * The library metadata for the current release  The is the default
          * value for YAHOO.util.YUILoader.moduleInfo
@@ -42,7 +1603,7 @@
          */
         info: {
 
-    'base': 'http://yui.yahooapis.com/2.3.1/build/',
+    'base': 'http://yui.yahooapis.com/2.4.1/build/',
 
     'skin': {
         'defaultSkin': 'sam',
@@ -67,9 +1628,14 @@
             'skinnable': true
         },
 
+        'base': {
+            'type': 'css',
+            'path': 'base/base-min.css'
+        },
+
         'button': {
             'type': 'js',
-            'path': 'button/button-beta-min.js',
+            'path': 'button/button-min.js',
             'requires': ['element'],
             'optional': ['menu'],
             'skinnable': true
@@ -82,6 +1648,12 @@
             'skinnable': true
         },
 
+        'charts': {
+            'type': 'js',
+            'path': 'charts/charts-experimental-min.js',
+            'requires': ['element', 'json', 'datasource']
+        },
+
         'colorpicker': {
             'type': 'js',
             'path': 'colorpicker/colorpicker-beta-min.js',
@@ -101,8 +1673,8 @@
             'path': 'container/container-min.js',
             'requires': ['dom', 'event'],
             // button is optional, but creates a circular dep
-            //'optional': ['dragdrop', 'animation', 'button'],
-            'optional': ['dragdrop', 'animation'],
+            //'optional': ['dragdrop', 'animation', 'connection', 'connection', 'button'],
+            'optional': ['dragdrop', 'animation', 'connection'],
             'supersedes': ['containercore'],
             'skinnable': true
         },
@@ -110,7 +1682,8 @@
         'containercore': {
             'type': 'js',
             'path': 'container/container_core-min.js',
-            'requires': ['dom', 'event']
+            'requires': ['dom', 'event'],
+            'pkg': 'container'
         },
 
         'datasource': {
@@ -165,6 +1738,12 @@
             'path': 'fonts/fonts-min.css'
         },
 
+        'get': {
+            'type': 'js',
+            'path': 'get/get-beta-min.js',
+            'requires': ['yahoo']
+        },
+
         'grids': {
             'type': 'css',
             'path': 'grids/grids-min.css',
@@ -174,16 +1753,22 @@
 
         'history': {
             'type': 'js',
-            'path': 'history/history-beta-min.js',
+            'path': 'history/history-min.js',
             'requires': ['event']
         },
 
         'imageloader': {
             'type': 'js',
-            'path': 'imageloader/imageloader-experimental-min.js',
+            'path': 'imageloader/imageloader-beta-min.js',
             'requires': ['event', 'dom']
         },
 
+        'json': {
+            'type': 'js',
+            'path': 'json/json-beta-min.js',
+            'requires': ['yahoo']
+        },
+
         'logger': {
             'type': 'js',
             'path': 'logger/logger-min.js',
@@ -207,9 +1792,32 @@
         'reset-fonts-grids': {
             'type': 'css',
             'path': 'reset-fonts-grids/reset-fonts-grids.css',
-            'supersedes': ['reset', 'fonts', 'grids']
+            'supersedes': ['reset', 'fonts', 'grids', 'reset-fonts'],
+            'rollup': 3
         },
 
+        'reset-fonts': {
+            'type': 'css',
+            'path': 'reset-fonts/reset-fonts.css',
+            'supersedes': ['reset', 'fonts'],
+            'rollup': 2
+        },
+
+        'selector': {
+            'type': 'js',
+            'path': 'selector/selector-beta-min.js',
+            'requires': ['yahoo', 'dom']
+        },
+
+        'simpleeditor': {
+            'type': 'js',
+            'path': 'editor/simpleeditor-beta-min.js',
+            'requires': ['element'],
+            'optional': ['containercore', 'menu', 'button', 'animation', 'dragdrop'],
+            'skinnable': true,
+            'pkg': 'editor'
+        },
+
         'slider': {
             'type': 'js',
             'path': 'slider/slider-min.js',
@@ -266,7 +1874,6 @@
 }
  , 
 
-        // Simple utils since we can't count on YAHOO.lang being available.
         ObjectUtil: {
             appendArray: function(o, a) {
                 if (a) {
@@ -276,29 +1883,12 @@
                 }
             },
 
-            clone: function(o) {
-                var c = {};
-                for (var i in o) {
-                    c[i] = o[i];
-                }
-                return c;
-            },
-
-            merge: function() {
-                var o={}, a=arguments, i, j;
-                for (i=0; i<a.length; i=i+1) {
-                    
-                    for (j in a[i]) {
-                        o[j] = a[i][j];
-                    }
-                }
-                return o;
-            },
-
             keys: function(o, ordered) {
                 var a=[], i;
                 for (i in o) {
-                    a.push(i);
+                    if (lang.hasOwnProperty(o, i)) {
+                        a.push(i);
+                    }
                 }
 
                 return a;
@@ -343,116 +1933,11 @@
             uniq: function(a) {
                 return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a));
             }
-        },
-
-
-        // loader instances
-        loaders: [],
-
-        finishInit: function(yahooref) {
-
-            // YAHOO has been loaded either in this window or passed 
-            // from the sandbox routine.  Set up local references 
-            // to the loader and module metadata in the YAHOO object
-            // in question so additional modules can be loaded. 
-
-            yahooref = yahooref || YAHOO;
-
-            yahooref.env.YUIInfo=YUI.info;
-            yahooref.util.YUILoader=YUI.YUILoader;
-
-        },
-
-        /*
-         * Global handler for the module loaded event exposed by
-         * YAHOO
-         */
-        onModuleLoaded: function(minfo) {
-
-            var mname = minfo.name, m;
-
-            for (var i=0; i<YUI.loaders.length; i=i+1) {
-                YUI.loaders[i].loadNext(mname);
-            }
-
-            //console.log(YAHOO.lang.dump(minfo));
-
-        },
-
-        /*
-         * Sets up the module metadata
-         */
-        init: function() {
-
-            var c = YAHOO_config, o = c.load, 
-                y_loaded = (typeof YAHOO !== "undefined" && YAHOO.env);
-
-
-            // add our listener to the existing YAHOO.env.listeners stack
-            if (y_loaded) {
-
-                YAHOO.env.listeners.push(YUI.onModuleLoaded);
-
-            // define a listener in YAHOO_config that YAHOO will pick up
-            // when it is loaded.
-            } else {
-
-                if (c.listener) {
-                    YUI.cachedCallback = c.listener;
-                }
-
-                c.listener = function(minfo) {
-                    YUI.onModuleLoaded(minfo);
-                    if (YUI.cachedCallback) {
-                        YUI.cachedCallback(minfo);
-                    }
-                };
-            }
-
-            // Fetch the required modules immediately if specified
-            // in YAHOO_config.  Otherwise detect YAHOO and fetch
-            // it if it doesn't exist so we have a place to put
-            // the loader.  The problem with this is that it will
-            // prevent rollups from working
-            if (o || !y_loaded) {
-
-                o = o || {};
-
-                var loader = new YUI.YUILoader(o);
-                loader.onLoadComplete = function() {
-
-                        YUI.finishInit();
-
-                        if (o.onLoadComplete) {
-
-                            loader._pushEvents();
-                            o.onLoadComplete(loader);
-                        }
-
-                        
-                    };
-
-                // If no load was requested, we must load YAHOO
-                // so we have a place to put the loader
-                if (!y_loaded) {
-                    loader.require("yahoo");
-                }
-
-                loader.insert(null, o);
-            } else {
-                YUI.finishInit();
-            }
         }
-
     };
 
-    YUI.YUILoader = function(o) {
+    YAHOO.util.YUILoader = function(o) {
 
-        // Inform the library that it is being injected
-        YAHOO_config.injecting = true;
-
-        o = o || {};
-
         /**
          * Internal callback to handle multiple internal insert() calls
          * so that css is inserted prior to js
@@ -462,46 +1947,118 @@
         this._internalCallback = null;
 
         /**
+         * Use the YAHOO environment listener to detect script load.  This
+         * is only switched on for Safari 2.x and below.
+         * @property _useYahooListener
+         * @private
+         */
+        this._useYahooListener = false;
+
+        /**
          * Callback that will be executed when the loader is finished
          * with an insert
-         * @method onLoadComplete
+         * @method onSuccess
          * @type function
          */
-        this.onLoadComplete = null;
+        this.onSuccess = null;
 
         /**
+         * Callback that will be executed if there is a failure
+         * @method onFailure
+         * @type function
+         */
+        this.onFailure = Y.log;
+
+        /**
+         * Callback that will be executed each time a new module is loaded
+         * @method onProgress
+         * @type function
+         */
+        this.onProgress = null;
+
+        /**
+         * The execution scope for all callbacks
+         * @property scope
+         * @default this
+         */
+        this.scope = this;
+
+        /**
+         * Data that is passed to all callbacks
+         * @property data
+         */
+        this.data = null;
+
+        /**
+         * The name of the variable in a sandbox or script node 
+         * (for external script support in Safari 2.x and earlier)
+         * to reference when the load is complete.  If this variable 
+         * is not available in the specified scripts, the operation will 
+         * fail.  
+         * @property varName
+         * @type string
+         */
+        this.varName = null;
+
+        /**
          * The base directory.
          * @property base
          * @type string
-         * @default build
+         * @default http://yui.yahooapis.com/[YUI VERSION]/build/
          */
-        this.base = ("base" in o) ? o.base : YUI.info.base;
+        this.base = YUI.info.base;
 
         /**
+         * A list of modules that should not be loaded, even if
+         * they turn up in the dependency tree
+         * @property ignore
+         * @type string[]
+         */
+        this.ignore = null;
+
+        /**
+         * A list of modules that should always be loaded, even
+         * if they have already been inserted into the page.
+         * @property force
+         * @type string
+         */
+        this.force = null;
+
+        /**
          * Should we allow rollups
          * @property allowRollup
          * @type boolean
          * @default true
          */
-        this.allowRollup = ("allowRollup" in o) ? o.allowRollup : true;
+        this.allowRollup = true;
 
         /**
-         * Filter to apply to result url
+         * A filter to apply to result urls.  This filter will modify the default
+         * path for all modules.  The default path for the YUI library is the
+         * minified version of the files (e.g., event-min.js).  The filter property
+         * can be a predefined filter or a custom filter.  The valid predefined 
+         * filters are:
+         * <dl>
+         *  <dt>DEBUG</dt>
+         *  <dd>Selects the debug versions of the library (e.g., event-debug.js).
+         *      This option will automatically include the logger widget</dd>
+         *  <dt>RAW</dt>
+         *  <dd>Selects the non-minified version of the library (e.g., event.js).
+         * </dl>
+         * You can also define a custom filter, which must be an object literal 
+         * containing a search expression and a replace string:
+         * <pre>
+         *  myFilter: { 
+         *      'searchExp': "-min\\.js", 
+         *      'replaceStr': "-debug.js"
+         *  }
+         * </pre>
          * @property filter
-         * @type string|object
+         * @type string|{searchExp: string, replaceStr: string}
          */
-        this.filter = o.filter;
+        this.filter = null;
 
         /**
-         * Create a sandbox rather than inserting into lib into.
-         * the current context.  Not currently supported
-         * property sandbox
-         * @type boolean
-         * @default false
-         */
-        this.sandbox = o.sandbox;
-
-        /**
          * The list of requested modules
          * @property required
          * @type {string: boolean}
@@ -512,7 +2069,7 @@
          * The library metadata
          * @property moduleInfo
          */
-        this.moduleInfo = o.moduleInfo || YUI.info.moduleInfo;
+        this.moduleInfo = lang.merge(YUI.info.moduleInfo);
 
         /**
          * List of rollup files found in the library metadata
@@ -527,7 +2084,7 @@
          * @type boolean
          * @default false
          */
-        this.loadOptional = o.loadOptional || false;
+        this.loadOptional = false;
 
         /**
          * All of the derived dependencies in sorted order, which
@@ -563,7 +2120,6 @@
          */
         this.inserted = {};
 
-
         /**
          * Provides the information used to skin the skinnable components.
          * The following skin definition would result in 'skin1' and 'skin2'
@@ -602,17 +2158,23 @@
          *   </code>
          *   @property skin
          */
-        this.skin = o.skin || YUI.ObjectUtil.clone(YUI.info.skin); 
 
+        var self = this;
 
-        if (o.require) {
-            this.require(o.require);
-        }
+        env.listeners.push(function(m) {
+            if (self._useYahooListener) {
+                //Y.log("YAHOO listener: " + m.name);
+                self.loadNext(m.name);
+            }
+        });
 
-        YUI.loaders.push(this);
+        this.skin = lang.merge(YUI.info.skin); 
+
+        this._config(o);
+
     };
 
-    YUI.YUILoader.prototype = {
+    Y.util.YUILoader.prototype = {
 
         FILTERS: {
             RAW: { 
@@ -627,10 +2189,49 @@
 
         SKIN_PREFIX: "skin-",
 
-        /** Add a new module to the component metadata.  The javascript 
-         * component must also use YAHOO.register to notify the loader 
-         * when it has been loaded, or a verifier function must be
-         * provided
+        _config: function(o) {
+
+            if (!o) {
+                return;
+            }
+
+            // lang.augmentObject(this, o);
+
+            // apply config values
+            for (var i in o) {
+                if (lang.hasOwnProperty(o, i)) {
+                    switch (i) {
+                        case "require":
+                            this.require(o[i]);
+                            break;
+
+                        case "filter":
+                            var f = o[i];
+
+                            if (typeof f === "string") {
+                                f = f.toUpperCase();
+
+                                // the logger must be available in order to use the debug
+                                // versions of the library
+                                if (f === "DEBUG") {
+                                    this.require("logger");
+                                }
+
+                                this.filter = this.FILTERS[f];
+                            } else {
+                                this.filter = f;
+                            }
+
+                            break;
+
+                        default:
+                            this[i] = o[i];
+                    }
+                }
+            }
+        },
+
+        /** Add a new module to the component metadata.         
          * <dl>
          *     <dt>name:</dt>       <dd>required, the component name</dd>
          *     <dt>type:</dt>       <dd>required, the component type (js or css)</dd>
@@ -639,7 +2240,6 @@
          *     <dt>optional:</dt>   <dd>the optional modules for this component</dd>
          *     <dt>supersedes:</dt> <dd>the modules this component replaces</dd>
          *     <dt>rollup:</dt>     <dd>the number of superseded modules required for automatic rollup</dd>
-         *     <dt>verifier:</dt>   <dd>a function that is executed to determine when the module is fully loaded</dd>
          *     <dt>fullpath:</dt>   <dd>If fullpath is specified, this is used instead of the configured base + path</dd>
          *     <dt>skinnable:</dt>  <dd>flag to determine if skin assets should automatically be pulled in</dd>
          * </dl>
@@ -704,11 +2304,14 @@
             if (mod) {
                 name = this.formatSkin(skin, mod);
                 if (!this.moduleInfo[name]) {
+                    var mdef = this.moduleInfo[mod];
+                    var pkg = mdef.pkg || mod;
                     this.addModule({
                         'name': name,
                         'type': 'css',
                         //'path': this.skin.base + skin + "/" + mod + ".css"
-                        'path': mod + '/' + this.skin.base + skin + "/" + mod + ".css"
+                        // 'path': mod + '/' + this.skin.base + skin + "/" + mod + ".css"
+                        'path': pkg + '/' + this.skin.base + skin + "/" + mod + ".css"
                     });
                 }
             }
@@ -726,7 +2329,7 @@
             }
 
             mod.requires=mod.requires || [];
-            var i, d=[], r=mod.requires, o=mod.optional, s=mod.supersedes, info=this.moduleInfo;
+            var i, d=[], r=mod.requires, o=mod.optional, info=this.moduleInfo;
             for (i=0; i<r.length; i=i+1) {
                 d.push(r[i]);
                 YUI.ArrayUtil.appendArray(d, this.getRequires(info[r[i]]));
@@ -773,8 +2376,8 @@
          */
         calculate: function(o) {
             if (this.dirty) {
-
-                this._setup(o);
+                this._config(o);
+                this._setup();
                 this._explode();
                 this._skin();
                 if (this.allowRollup) {
@@ -783,6 +2386,8 @@
                 this._reduce();
                 this._sort();
 
+                // Y.log("after calculate: " + lang.dump(this.required));
+
                 this.dirty = false;
             }
         },
@@ -792,28 +2397,28 @@
          * modules already detected will not be loaded again unless a force
          * option is encountered.  Called by calculate()
          * @method _setup
-         * @param o optional options object
          * @private
          */
-        _setup: function(o) {
+        _setup: function() {
 
-            o = o || {};
-            this.loaded = YUI.ObjectUtil.clone(this.inserted); 
+            this.loaded = lang.merge(this.inserted); // shallow clone
             
-            if (!this.sandbox && typeof YAHOO !== "undefined" && YAHOO.env) {
-                this.loaded = YUI.ObjectUtil.merge(this.loaded, YAHOO.env.modules);
+            if (!this._sandbox) {
+                this.loaded = lang.merge(this.loaded, env.modules);
             }
 
+            // Y.log("already loaded stuff: " + lang.dump(this.loaded, 0));
+
             // add the ignore list to the list of loaded packages
-            if (o.ignore) {
-                YUI.ObjectUtil.appendArray(this.loaded, o.ignore);
+            if (this.ignore) {
+                YUI.ObjectUtil.appendArray(this.loaded, this.ignore);
             }
 
             // remove modules on the force list from the loaded list
-            if (o.force) {
-                for (var i=0; i<o.force.length; i=i+1) {
-                    if (o.force[i] in this.loaded) {
-                        delete this.loaded[o.force[i]];
+            if (this.force) {
+                for (var i=0; i<this.force.length; i=i+1) {
+                    if (this.force[i] in this.loaded) {
+                        delete this.loaded[this.force[i]];
                     }
                 }
             }
@@ -939,13 +2544,12 @@
 
                     // there can be only one
                     if (!r[i] && !this.loaded[i]) {
-                        m =this.moduleInfo[i]; s = m.supersedes; roll=true;
+                        m =this.moduleInfo[i]; s = m.supersedes; roll=false;
 
                         if (!m.rollup) {
                             continue;
                         }
 
-
                         var skin = this.parseSkin(i), c = 0;
                         if (skin) {
 
@@ -954,20 +2558,19 @@
                                     c++;
                                     roll = (c >= m.rollup);
                                     if (roll) {
+                                        // Y.log("skin rollup " + lang.dump(r));
                                         break;
                                     }
                                 }
                             }
 
-
                         } else {
 
-                            // require all modules to trigger a rollup (using the 
-                            // threshold value has not proved worthwhile)
+                            // check the threshold
                             for (j=0;j<s.length;j=j+1) {
 
                                 // if the superseded module is loaded, we can't load the rollup
-                                if (this.loaded[s[j]]) {
+                                if (this.loaded[s[j]] && (!YUI.dupsAllowed[s[j]])) {
                                     roll = false;
                                     break;
                                 // increment the counter if this module is required.  if we are
@@ -976,6 +2579,7 @@
                                     c++;
                                     roll = (c >= m.rollup);
                                     if (roll) {
+                                        // Y.log("over thresh " + c + ", " + lang.dump(r));
                                         break;
                                     }
                                 }
@@ -983,6 +2587,7 @@
                         }
 
                         if (roll) {
+                            // Y.log("rollup: " +  i + ", " + lang.dump(this, 1));
                             // add the rollup
                             r[i] = true;
                             rolled = true;
@@ -1141,67 +2746,214 @@
             this.sorted = s;
         },
 
+        toString: function() {
+            var o = {
+                type: "YUILoader",
+                base: this.base,
+                filter: this.filter,
+                required: this.required,
+                loaded: this.loaded,
+                inserted: this.inserted
+            };
+
+            lang.dump(o, 1);
+        },
+
         /**
          * inserts the requested modules and their dependencies.  
          * <code>type</code> can be "js" or "css".  Both script and 
          * css are inserted if type is not provided.
          * @method insert
-         * @param callback {Function} a function to execute when the load
-         * is complete.
          * @param o optional options object
          * @param type {string} the type of dependency to insert
          */
-        insert: function(callback, o, type) {
+        insert: function(o, type) {
+            // if (o) {
+            //     Y.log("insert: " + lang.dump(o, 1) + ", " + type);
+            // } else {
+            //     Y.log("insert: " + this.toString() + ", " + type);
+            // }
 
-            //if (!this.onLoadComplete) {
-                //this.onLoadComplete = callback;
-            //}
+            // build the dependency list
+            this.calculate(o);
 
             if (!type) {
+                // Y.log("trying to load css first");
                 var self = this;
                 this._internalCallback = function() {
                             self._internalCallback = null;
-                            self.insert(callback, o, "js");
+                            self.insert(null, "js");
                         };
-                this.insert(null, o, "css");
+                this.insert(null, "css");
                 return;
             }
 
-            o = o || {};
+            // set a flag to indicate the load has started
+            this._loading = true;
 
-            // store the callback for when we are done
-            this.onLoadComplete = callback || this.onLoadComplete;
+            // keep the loadType (js, css or undefined) cached
+            this.loadType = type;
 
-            // store the optional filter
-            var f = o && o.filter || null;
+            // start the load
+            this.loadNext();
 
-            if (typeof f === "string") {
-                f = f.toUpperCase();
+        },
 
-                // the logger must be available in order to use the debug
-                // versions of the library
-                if (f === "DEBUG") {
-                    this.require("logger");
-                }
+        /*
+         * Interns the script for the requested modules.  The callback is
+         * provided a reference to the sandboxed YAHOO object.  This only
+         * applies to the script: css can not be sandboxed; css will be
+         * loaded into the page normally if specified.
+         * @method sandbox
+         * @param callback {Function} the callback to exectued when the load is
+         *        complete.
+         */
+        sandbox: function(o, type) {
+            if (o) {
+                // YAHOO.log("sandbox: " + lang.dump(o, 1) + ", " + type);
+            } else {
+                // YAHOO.log("sandbox: " + this.toString() + ", " + type);
             }
 
-            this.filter = this.FILTERS[f] || f || this.FILTERS[this.filter] || this.filter;
+            this._config(o);
 
-            // store the options... not currently in use
-            this.insertOptions = o;
+            if (!this.onSuccess) {
+throw new Error("You must supply an onSuccess handler for your sandbox");
+            }
 
-            // build the dependency list
-            this.calculate(o);
+            this._sandbox = true;
 
-            // set a flag to indicate the load has started
-            this.loading = true;
+            var self = this;
 
-            // keep the loadType (js, css or undefined) cached
-            this.loadType = type;
+            // take care of any css first (this can't be sandboxed)
+            if (!type || type !== "js") {
+                this._internalCallback = function() {
+                            self._internalCallback = null;
+                            self.sandbox(null, "js");
+                        };
+                this.insert(null, "css");
+                return;
+            }
 
-            // start the load
-            this.loadNext();
+            // get the connection manager if not on the page
+            if (!util.Connect) {
+                // get a new loader instance to load connection.
+                var ld = new YAHOO.util.YUILoader();
+                ld.insert({
+                    base: this.base,
+                    filter: this.filter,
+                    require: "connection",
+                    onSuccess: function() {
+                        this.sandbox(null, "js");
+                    },
+                    scope: this
+                }, "js");
+                return;
+            }
 
+            this._scriptText = [];
+            this._loadCount = 0;
+            this._stopCount = this.sorted.length;
+            this._xhr = [];
+
+            this.calculate();
+
+            var s=this.sorted, l=s.length, i, m, url;
+
+            for (i=0; i<l; i=i+1) {
+                m = this.moduleInfo[s[i]];
+
+                // undefined modules cause a failure
+                if (!m) {
+                    this.onFailure.call(this.scope, {
+                            msg: "undefined module " + m,
+                            data: this.data
+                        });
+                    for (var j=0;j<this._xhr.length;j=j+1) {
+                        this._xhr[j].abort();
+                    }
+                    return;
+                }
+
+                // css files should be done
+                if (m.type !== "js") {
+                    this._loadCount++;
+                    continue;
+                }
+
+                url = m.fullpath || this._url(m.path);
+
+                // YAHOO.log("xhr request: " + url + ", " + i);
+
+                var xhrData = {
+
+                    success: function(o) {
+                        
+                        var idx=o.argument[0], name=o.argument[2];
+
+                        // store the response in the position it was requested
+                        this._scriptText[idx] = o.responseText; 
+                        
+                        // YAHOO.log("received: " + o.responseText.substr(0, 100) + ", " + idx);
+                    
+                        if (this.onProgress) {
+                            this.onProgress.call(this.scope, {
+                                        name: name,
+                                        scriptText: o.responseText,
+                                        xhrResponse: o,
+                                        data: this.data
+                                    });
+                        }
+
+                        // only generate the sandbox once everything is loaded
+                        this._loadCount++;
+
+                        if (this._loadCount >= this._stopCount) {
+
+                            // the variable to find
+                            var v = this.varName || "YAHOO";
+
+                            // wrap the contents of the requested modules in an anonymous function
+                            var t = "(function() {\n";
+                        
+                            // return the locally scoped reference.
+                            var b = "\nreturn " + v + ";\n})();";
+
+                            var ref = eval(t + this._scriptText.join("\n") + b);
+
+                            this._pushEvents(ref);
+
+                            if (ref) {
+                                this.onSuccess.call(this.scope, {
+                                        reference: ref,
+                                        data: this.data
+                                    });
+                            } else {
+                                this.onFailure.call(this.scope, {
+                                        msg: this.varName + " reference failure",
+                                        data: this.data
+                                    });
+                            }
+                        }
+                    },
+
+                    failure: function(o) {
+                        this.onFailure.call(this.scope, {
+                                msg: "XHR failure",
+                                xhrResponse: o,
+                                data: this.data
+                            });
+                    },
+
+                    scope: this,
+
+                    // module index, module name, sandbox name
+                    argument: [i, url, s[i]]
+
+                };
+
+                this._xhr.push(util.Connect.asyncRequest('GET', url, xhrData));
+            }
         },
 
         /**
@@ -1216,37 +2968,45 @@
          */
         loadNext: function(mname) {
 
-            // console.log("loadNext executing, just loaded " + mname);
-
-            // The global handler that is called when each module is loaded
-            // will pass that module name to this function.  Storing this
-            // data to avoid loading the same module multiple times
-            if (mname) {
-                this.inserted[mname] = true;
-                //var o = this.getProvides(mname);
-                //this.inserted = YUI.ObjectUtil.merge(this.inserted, o);
-            }
-
             // It is possible that this function is executed due to something
             // else one the page loading a YUI module.  Only react when we
             // are actively loading something
-            if (!this.loading) {
+            if (!this._loading) {
                 return;
             }
 
-            // if the module that was just loaded isn't what we were expecting,
-            // continue to wait
-            if (mname && mname !== this.loading) {
-                return;
+            if (mname) {
+
+                // if the module that was just loaded isn't what we were expecting,
+                // continue to wait
+                if (mname !== this._loading) {
+                    return;
+                }
+
+                // YAHOO.log("loadNext executing, just loaded " + mname);
+
+                // The global handler that is called when each module is loaded
+                // will pass that module name to this function.  Storing this
+                // data to avoid loading the same module multiple times
+                this.inserted[mname] = true;
+
+                if (this.onProgress) {
+                    this.onProgress.call(this.scope, {
+                            name: mname,
+                            data: this.data
+                        });
+                }
+                //var o = this.getProvides(mname);
+                //this.inserted = lang.merge(this.inserted, o);
             }
-            
-            var s=this.sorted, len=s.length, i, m, url;
 
+            var s=this.sorted, len=s.length, i, m;
+
             for (i=0; i<len; i=i+1) {
 
                 // This.inserted keeps track of what the loader has loaded
                 if (s[i] in this.inserted) {
-                    // console.log(s[i] + " alread loaded ");
+                    // YAHOO.log(s[i] + " alread loaded ");
                     continue;
                 }
 
@@ -1254,67 +3014,67 @@
                 // from YAHOO, loadNext may be called multiple times for
                 // the same module when loading a rollup.  We can safely
                 // skip the subsequent requests
-                if (s[i] === this.loading) {
-                    // console.log("still loading " + s[i] + ", waiting");
+                if (s[i] === this._loading) {
+                    // YAHOO.log("still loading " + s[i] + ", waiting");
                     return;
                 }
 
                 // log("inserting " + s[i]);
-
                 m = this.moduleInfo[s[i]];
 
+                if (!m) {
+                    this.onFailure.call(this.scope, {
+                            msg: "undefined module " + m,
+                            data: this.data
+                        });
+                    return;
+                }
+
                 // The load type is stored to offer the possibility to load
                 // the css separately from the script.
                 if (!this.loadType || this.loadType === m.type) {
-                    this.loading = s[i];
+                    this._loading = s[i];
+                    //YAHOO.log("attempting to load " + s[i] + ", " + this.base);
 
-                    // Insert the css node and continue.  It is possible
-                    // that the css file will load out of order ... this
-                    // may be a problem that needs to be addressed, but
-                    // unlike the script files, there is no notification
-                    // mechanism in place for the css files.
-                    if (m.type === "css") {
+                    var fn=(m.type === "css") ? util.Get.css : util.Get.script,
+                        url=m.fullpath || this._url(m.path), self=this, 
+                        c=function(o) {
+                            self.loadNext(o.data);
+                        };
 
-                        url = m.fullpath || this._url(m.path);
-                        
-                        this.insertCss(url);
-                        this.inserted[s[i]] = true;
+                    // safari 2.x or lower, script, and part of YUI
+                    if (env.ua.webkit && env.ua.webkit < 420 && m.type === "js" && 
+                          !m.varName) {
+                          //YUI.info.moduleInfo[s[i]]) {
+                          //YAHOO.log("using YAHOO env " + s[i] + ", " + m.varName);
+                        c = null;
+                        this._useYahooListener = true;
+                    }
 
-                    // Scripts must be loaded in order, so we wait for the
-                    // notification from YAHOO or a verifier function to 
-                    // process the next script
-                    } else {
+                    fn(url, {
+                        data: s[i],
+                        onSuccess: c,
+                        varName: m.varName,
+                        scope: self 
+                    });
 
-                        url = m.fullpath || this._url(m.path);
-                        this.insertScript(url);
-
-                        // if a verifier was included for this module, execute
-                        // it, passing the name of the module, and a callback
-                        // that must be exectued when the verifier is done.
-                        if (m.verifier) {
-                            var self = this, name=s[i];
-                            m.verifier(name, function() {
-                                    self.loadNext(name);
-                                });
-                        }
-
-                        return;
-                    }
+                    return;
                 }
             }
 
             // we are finished
-            this.loading = null;
+            this._loading = null;
 
-
             // internal callback for loading css first
             if (this._internalCallback) {
                 var f = this._internalCallback;
                 this._internalCallback = null;
-                f(this);
-            } else if (this.onLoadComplete) {
+                f.call(this);
+            } else if (this.onSuccess) {
                 this._pushEvents();
-                this.onLoadComplete(this);
+                this.onSuccess.call(this.scope, {
+                        data: this.data
+                    });
             }
 
         },
@@ -1323,11 +3083,13 @@
          * In IE, the onAvailable/onDOMReady events need help when Event is
          * loaded dynamically
          * @method _pushEvents
+         * @param {Function} optional function reference
          * @private
          */
-        _pushEvents: function() {
-            if (typeof YAHOO !== "undefined" && YAHOO.util && YAHOO.util.Event) {
-                YAHOO.util.Event._load();
+        _pushEvents: function(ref) {
+            var r = ref || YAHOO;
+            if (r.util && r.util.Event) {
+                r.util.Event._load();
             }
         },
 
@@ -1352,58 +3114,8 @@
             // console.log(u);
 
             return u;
-        },
+        }
 
-        /**
-         * Inserts a script node
-         * @method insertScript
-         * @param url {string} the full url for the script
-         * @param win {Window} optional window to target
-         */
-        insertScript: function(url, win) {
-
-            //console.log("inserting script " + url);
-            var w = win || window, d=w.document, n=d.createElement("script"),
-                h = d.getElementsByTagName("head")[0];
-
-            n.src = url;
-            n.type = "text/javascript";
-            h.appendChild(n);
-        },
-
-        /**
-         * Inserts a css link node
-         * @method insertCss
-         * @param url {string} the full url for the script
-         * @param win {Window} optional window to target
-         */
-        insertCss: function(url, win) {
-            // console.log("inserting css " + url);
-            var w = win || window, d=w.document, n=d.createElement("link"),
-                h = d.getElementsByTagName("head")[0];
-
-            n.href = url;
-            n.type = "text/css";
-            n.rel = "stylesheet";
-            h.appendChild(n);
-        },
-       
-        /*
-         * Interns the script for the requested modules.  The callback is
-         * provided a reference to the sandboxed YAHOO object.  This only
-         * applies to the script: css can not be sandboxed.  Not implemented.
-         * @method sandbox
-         * @param callback {Function} the callback to exectued when the load is
-         *        complete.
-         * @notimplemented
-         */
-        sandbox: function(callback) {
-            // this.calculate({
-                         //sandbox: true
-                     //});
-        }
     };
 
-    YUI.init();
-
 })();

Modified: trunk/root/static/yui/yuiloader/yuiloader-beta-min.js
===================================================================
--- trunk/root/static/yui/yuiloader/yuiloader-beta-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/yuiloader/yuiloader-beta-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,9 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-(function(){if(typeof YAHOO_config==="undefined"){YAHOO_config={};}var A={info:{"base":"http://yui.yahooapis.com/2.3.1/build/","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","rollup":3},"moduleInfo":{"animation":{"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event"],"optional":["connection","animation"],"skinnable":true},"button":{"type":"js","path":"button/button-beta-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],"skinnable":true},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-beta-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"connection":{"type":"js","path":"connection/connection-min.js","requires":["event"]},"container":{"type":"js","path":"container/container-min.js","requires!
 ":["dom","event"],"optional":["dragdrop","animation"],"supersedes":["containercore"],"skinnable":true},"containercore":{"type":"js","path":"container/container_core-min.js","requires":["dom","event"]},"datasource":{"type":"js","path":"datasource/datasource-beta-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-beta-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop"],"skinnable":true},"dom":{"type":"js","path":"dom/dom-min.js","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-beta-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"skinnable":true},"element":{"type":"js","path":"element/element-beta-min.js","requires":["dom","event"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"gr!
 ids":{"type":"css","path":"grids/grids-min.css","requires":["f!
 onts"],"
optional":["reset"]},"history":{"type":"js","path":"history/history-beta-min.js","requires":["event"]},"imageloader":{"type":"js","path":"imageloader/imageloader-experimental-min.js","requires":["event","dom"]},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids"]},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"]},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event"],"skinnable":true},"utilities":{"type":"js","path":"utilities/utilities.js","supersedes!
 ":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event"],"rollup":6},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoo-dom-event/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-beta-min.js"},"yuitest":{"type":"js","path":"yuitest/yuitest-beta-min.js","requires":["logger"],"skinnable":true}}},ObjectUtil:{appendArray:function(D,B){if(B){for(var C=0;C<B.length;C=C+1){D[B[C]]=true;}}},clone:function(C){var D={};for(var B in C){D[B]=C[B];}return D;},merge:function(){var E={},B=arguments,D,C;for(D=0;D<B.length;D=D+1){for(C in B[D]){E[C]=B[D][C];}}return E;},keys:function(E,C){var B=[],D;for(D in E){B.push(D);}return B;}},ArrayUtil:{appendArray:function(C,B){Array.prototype.push.apply(C,B);},indexOf:function(B,D){for(var C=0;C<B.length;C=C+1){if(B[C]===D){return C;}}return -1;},toObject:function(B){var D={};for(var C=0;C<B.length;C!
 =C+1){D[B[C]]=true;}return D;},uniq:function(B){return A.Objec!
 tUtil.ke
ys(A.ArrayUtil.toObject(B));}},loaders:[],finishInit:function(B){B=B||YAHOO;B.env.YUIInfo=A.info;B.util.YUILoader=A.YUILoader;},onModuleLoaded:function(C){var E=C.name,B;for(var D=0;D<A.loaders.length;D=D+1){A.loaders[D].loadNext(E);}},init:function(){var E=YAHOO_config,D=E.load,C=(typeof YAHOO!=="undefined"&&YAHOO.env);if(C){YAHOO.env.listeners.push(A.onModuleLoaded);}else{if(E.listener){A.cachedCallback=E.listener;}E.listener=function(F){A.onModuleLoaded(F);if(A.cachedCallback){A.cachedCallback(F);}};}if(D||!C){D=D||{};var B=new A.YUILoader(D);B.onLoadComplete=function(){A.finishInit();if(D.onLoadComplete){B._pushEvents();D.onLoadComplete(B);}};if(!C){B.require("yahoo");}B.insert(null,D);}else{A.finishInit();}}};A.YUILoader=function(B){YAHOO_config.injecting=true;B=B||{};this._internalCallback=null;this.onLoadComplete=null;this.base=("base" in B)?B.base:A.info.base;this.allowRollup=("allowRollup" in B)?B.allowRollup:true;this.filter=B.filter;this.sandbox=B.sandbox;this.req!
 uired={};this.moduleInfo=B.moduleInfo||A.info.moduleInfo;this.rollups=null;this.loadOptional=B.loadOptional||false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};this.skin=B.skin||A.ObjectUtil.clone(A.info.skin);if(B.require){this.require(B.require);}A.loaders.push(this);};A.YUILoader.prototype={FILTERS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",addModule:function(B){if(!B||!B.name||!B.type||(!B.path&&!B.fullpath)){return false;}this.moduleInfo[B.name]=B;this.dirty=true;return true;},require:function(E){var B=(typeof E==="string")?arguments:E;this.dirty=true;for(var C=0;C<B.length;C=C+1){this.required[B[C]]=true;var D=this.parseSkin(B[C]);if(D){this._addSkin(D.skin,D.module);}}A.ObjectUtil.appendArray(this.required,B);},_addSkin:function(D,C){var B=this.formatSkin(D);if(!this.moduleInfo[B]){this.addModule({"name":B,"type":"css","path":this.skin.base+D+"/"+this.skin.path,"rol!
 lup":this.skin.rollup});
-}if(C){B=this.formatSkin(D,C);if(!this.moduleInfo[B]){this.addModule({"name":B,"type":"css","path":C+"/"+this.skin.base+D+"/"+C+".css"});}}},getRequires:function(C){if(!this.dirty&&C.expanded){return C.expanded;}C.requires=C.requires||[];var B,H=[],E=C.requires,G=C.optional,D=C.supersedes,F=this.moduleInfo;for(B=0;B<E.length;B=B+1){H.push(E[B]);A.ArrayUtil.appendArray(H,this.getRequires(F[E[B]]));}if(G&&this.loadOptional){for(B=0;B<G.length;B=B+1){H.push(G[B]);A.ArrayUtil.appendArray(H,this.getRequires(F[G[B]]));}}C.expanded=A.ArrayUtil.uniq(H);return C.expanded;},getProvides:function(B){var C=this.moduleInfo[B];var E={};E[B]=true;var D=C&&C.supersedes;A.ObjectUtil.appendArray(E,D);return E;},calculate:function(B){if(this.dirty){this._setup(B);this._explode();this._skin();if(this.allowRollup){this._rollup();}this._reduce();this._sort();this.dirty=false;}},_setup:function(C){C=C||{};this.loaded=A.ObjectUtil.clone(this.inserted);if(!this.sandbox&&typeof YAHOO!=="undefined"&&Y!
 AHOO.env){this.loaded=A.ObjectUtil.merge(this.loaded,YAHOO.env.modules);}if(C.ignore){A.ObjectUtil.appendArray(this.loaded,C.ignore);}if(C.force){for(var B=0;B<C.force.length;B=B+1){if(C.force[B] in this.loaded){delete this.loaded[C.force[B]];}}}},_explode:function(){var E=this.required,C,B;for(C in E){B=this.moduleInfo[C];if(B){var D=this.getRequires(B);if(D){A.ObjectUtil.appendArray(E,D);}}}},_skin:function(){var E=this.required,D,C;for(D in E){C=this.moduleInfo[D];if(C&&C.skinnable){var F=this.skin.overrides,B;if(F&&F[D]){for(B=0;B<F[D].length;B=B+1){this.require(this.formatSkin(F[D][B],D));}}else{this.require(this.formatSkin(this.skin.defaultSkin,D));}}}},formatSkin:function(D,B){var C=this.SKIN_PREFIX+D;if(B){C=C+"-"+B;}return C;},parseSkin:function(C){if(C.indexOf(this.SKIN_PREFIX)===0){var B=C.split("-");return{skin:B[1],module:B[2]};}return null;},_rollup:function(){var G,F,E,K,I={},B=this.required,D;if(this.dirty||!this.rollups){for(G in this.moduleInfo){E=this.mod!
 uleInfo[G];if(E&&E.rollup){I[G]=E;}}this.rollups=I;}for(;;){va!
 r C=fals
e;for(G in I){if(!B[G]&&!this.loaded[G]){E=this.moduleInfo[G];K=E.supersedes;D=true;if(!E.rollup){continue;}var J=this.parseSkin(G),H=0;if(J){for(F in B){if(G!==F&&this.parseSkin(F)){H++;D=(H>=E.rollup);if(D){break;}}}}else{for(F=0;F<K.length;F=F+1){if(this.loaded[K[F]]){D=false;break;}else{if(B[K[F]]){H++;D=(H>=E.rollup);if(D){break;}}}}}if(D){B[G]=true;C=true;this.getRequires(E);}}}if(!C){break;}}},_reduce:function(){var D,C,F,B,G=this.required;for(D in G){if(D in this.loaded){delete G[D];}else{var E=this.parseSkin(D);if(E){if(!E.module){var H=this.SKIN_PREFIX+E.skin;for(C in G){if(C!==D&&C.indexOf(H)>-1){delete G[C];}}}}else{B=this.moduleInfo[D];F=B&&B.supersedes;if(F){for(C=0;C<F.length;C=C+1){if(F[C] in G){delete G[F[C]];}}}}}}},_sort:function(){var L=[],C=this.moduleInfo,H=this.loaded;var M=function(Q,S){if(H[S]){return false;}var P,R=C[Q],N=R&&R.expanded;if(N&&A.ArrayUtil.indexOf(N,S)>-1){return true;}var O=C[S]&&C[S].supersedes;if(O){for(P=0;P<O.length;P=P+1){if(M(Q,!
 O[P])){return true;}}}return false;};for(var G in this.required){L.push(G);}var B=0;for(;;){var D=L.length,K,J,F,E,I=false;for(F=B;F<D;F=F+1){K=L[F];for(E=F+1;E<D;E=E+1){if(M(K,L[E])){J=L.splice(E,1);L.splice(F,0,J[0]);I=true;break;}}if(I){break;}else{B=B+1;}}if(!I){break;}}this.sorted=L;},insert:function(F,E,C){if(!C){var B=this;this._internalCallback=function(){B._internalCallback=null;B.insert(F,E,"js");};this.insert(null,E,"css");return ;}E=E||{};this.onLoadComplete=F||this.onLoadComplete;var D=E&&E.filter||null;if(typeof D==="string"){D=D.toUpperCase();if(D==="DEBUG"){this.require("logger");}}this.filter=this.FILTERS[D]||D||this.FILTERS[this.filter]||this.filter;this.insertOptions=E;this.calculate(E);this.loading=true;this.loadType=C;this.loadNext();},loadNext:function(H){if(H){this.inserted[H]=true;}if(!this.loading){return ;}if(H&&H!==this.loading){return ;}var J=this.sorted,G=J.length,E,D,B;for(E=0;E<G;E=E+1){if(J[E] in this.inserted){continue;}if(J[E]===this.loadin!
 g){return ;}D=this.moduleInfo[J[E]];if(!this.loadType||this.lo!
 adType==
=D.type){this.loading=J[E];if(D.type==="css"){B=D.fullpath||this._url(D.path);this.insertCss(B);this.inserted[J[E]]=true;}else{B=D.fullpath||this._url(D.path);this.insertScript(B);if(D.verifier){var I=this,C=J[E];D.verifier(C,function(){I.loadNext(C);});}return ;}}}this.loading=null;if(this._internalCallback){var F=this._internalCallback;this._internalCallback=null;F(this);}else{if(this.onLoadComplete){this._pushEvents();this.onLoadComplete(this);}}},_pushEvents:function(){if(typeof YAHOO!=="undefined"&&YAHOO.util&&YAHOO.util.Event){YAHOO.util.Event._load();}},_url:function(D){var B=this.base||"",C=this.filter;B=B+D;if(C){B=B.replace(new RegExp(C.searchExp),C.replaceStr);}return B;},insertScript:function(C,E){var B=E||window,F=B.document,G=F.createElement("script"),D=F.getElementsByTagName("head")[0];G.src=C;G.type="text/javascript";D.appendChild(G);},insertCss:function(C,E){var B=E||window,F=B.document,G=F.createElement("link"),D=F.getElementsByTagName("head")[0];G.href=C;G!
 .type="text/css";G.rel="stylesheet";D.appendChild(G);},sandbox:function(B){}};A.init();})();
\ No newline at end of file
+if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWe!
 bKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{isArray:function(B){if(B){var A=YAHOO.lang;return A.isNumber(B.length)&&A.isFunction(B.splice);}return false;},isBoolean:function(A){return typeof A==="boolean";},isFunction:function(A){return typeof A==="function";},isNull:function(A){return !
 A===null;},isNumber:function(A){return typeof A==="number"&&is!
 Finite(A
);},isObject:function(A){return(A&&(typeof A==="object"||YAHOO.lang.isFunction(A)))||false;},isString:function(A){return typeof A==="string";},isUndefined:function(A){return typeof A==="undefined";},hasOwnProperty:function(A,B){if(Object.prototype.hasOwnProperty){return A.hasOwnProperty(B);}return !YAHOO.lang.isUndefined(A[B])&&A.constructor.prototype[B]!==A[B];},_IEEnumFix:function(C,B){if(YAHOO.env.ua.ie){var E=["toString","valueOf"],A;for(A=0;A<E.length;A=A+1){var F=E[A],D=B[F];if(YAHOO.lang.isFunction(D)&&D!=Object.prototype[F]){C[F]=D;}}}},extend:function(D,E,C){if(!E||!D){throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");}var B=function(){};B.prototype=E.prototype;D.prototype=new B();D.prototype.constructor=D;D.superclass=E.prototype;if(E.prototype.constructor==Object.prototype.constructor){E.prototype.constructor=E;}if(C){for(var A in C){D.prototype[A]=C[A];}YAHOO.lang._IEEnumFix(D.prototype,C);}},augmentObject:function(E,D)!
 {if(!D||!E){throw new Error("Absorb failed, verify dependencies.");}var A=arguments,C,F,B=A[2];if(B&&B!==true){for(C=2;C<A.length;C=C+1){E[A[C]]=D[A[C]];}}else{for(F in D){if(B||!E[F]){E[F]=D[F];}}YAHOO.lang._IEEnumFix(E,D);}},augmentProto:function(D,C){if(!C||!D){throw new Error("Augment failed, verify dependencies.");}var A=[D.prototype,C.prototype];for(var B=2;B<arguments.length;B=B+1){A.push(arguments[B]);}YAHOO.lang.augmentObject.apply(this,A);},dump:function(A,G){var C=YAHOO.lang,D,F,I=[],J="{...}",B="f(){...}",H=", ",E=" => ";if(!C.isObject(A)){return A+"";}else{if(A instanceof Date||("nodeType" in A&&"tagName" in A)){return A;}else{if(C.isFunction(A)){return B;}}}G=(C.isNumber(G))?G:3;if(C.isArray(A)){I.push("[");for(D=0,F=A.length;D<F;D=D+1){if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}if(I.length>1){I.pop();}I.push("]");}else{I.push("{");for(D in A){if(C.hasOwnProperty(A,D)){I.push(D+E);if(C.isObject(A[D])){I.push((G>0)?C.du!
 mp(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}}if(I.length>1)!
 {I.pop()
;}I.push("}");}return I.join("");},substitute:function(Q,B,J){var G,F,E,M,N,P,D=YAHOO.lang,L=[],C,H="dump",K=" ",A="{",O="}";for(;;){G=Q.lastIndexOf(A);if(G<0){break;}F=Q.indexOf(O,G);if(G+1>=F){break;}C=Q.substring(G+1,F);M=C;P=null;E=M.indexOf(K);if(E>-1){P=M.substring(E+1);M=M.substring(0,E);}N=B[M];if(J){N=J(M,N,P);}if(D.isObject(N)){if(D.isArray(N)){N=D.dump(N,parseInt(P,10));}else{P=P||"";var I=P.indexOf(H);if(I>-1){P=P.substring(4);}if(N.toString===Object.prototype.toString||I>-1){N=D.dump(N,parseInt(P,10));}else{N=N.toString();}}}else{if(!D.isString(N)&&!D.isNumber(N)){N="~-"+L.length+"-~";L[L.length]=C;}}Q=Q.substring(0,G)+N+Q.substring(F+1);}for(G=L.length-1;G>=0;G=G-1){Q=Q.replace(new RegExp("~-"+G+"-~"),"{"+L[G]+"}","g");}return Q;},trim:function(A){try{return A.replace(/^\s+|\s+$/g,"");}catch(B){return A;}},merge:function(){var D={},B=arguments;for(var C=0,A=B.length;C<A;C=C+1){YAHOO.lang.augmentObject(D,B[C],true);}return D;},later:function(H,B,I,D,E){H=H||0;B=!
 B||{};var C=I,G=D,F,A;if(YAHOO.lang.isString(I)){C=B[I];}if(!C){throw new TypeError("method undefined");}if(!YAHOO.lang.isArray(G)){G=[D];}F=function(){C.apply(B,G);};A=(E)?setInterval(F,H):setTimeout(F,H);return{interval:E,cancel:function(){if(this.interval){clearInterval(A);}else{clearTimeout(A);}}};},isValue:function(B){var A=YAHOO.lang;return(A.isObject(B)||A.isString(B)||A.isNumber(B)||A.isBoolean(B));}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augment=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.4.1",build:"742"});YAHOO.util.Get=function(){var I={},H=0,B=0,O=false,A=YAHOO.env.ua,D=YAHOO.lang;var Q=function(U,R,V){var S=V||window,W=S.document,X=W.createElement(U);for(var T in R){if(R[T]&&YAHOO.lang.hasOwnProperty(R,T)){X.setAttribute(T,R[T]);}}return X;};var N=function(R,S){return Q("link",{"id":"yui__dyn_"+(B++),"type":"text/css","rel":"stylesheet","href":R},S);
+};var M=function(R,S){return Q("script",{"id":"yui__dyn_"+(B++),"type":"text/javascript","src":R},S);};var K=function(R){return{tId:R.tId,win:R.win,data:R.data,nodes:R.nodes,purge:function(){J(this.tId);}};};var P=function(T){var R=I[T];if(R.onFailure){var S=R.scope||R.win;R.onFailure.call(S,K(R));}};var F=function(T){var R=I[T];R.finished=true;if(R.aborted){P(T);return ;}if(R.onSuccess){var S=R.scope||R.win;R.onSuccess.call(S,K(R));}};var E=function(T,W){var S=I[T];if(S.aborted){P(T);return ;}if(W){S.url.shift();if(S.varName){S.varName.shift();}}else{S.url=(D.isString(S.url))?[S.url]:S.url;if(S.varName){S.varName=(D.isString(S.varName))?[S.varName]:S.varName;}}var Z=S.win,Y=Z.document,X=Y.getElementsByTagName("head")[0],U;if(S.url.length===0){if(S.type==="script"&&A.webkit&&A.webkit<420&&!S.finalpass&&!S.varName){var V=M(null,S.win);V.innerHTML="YAHOO.util.Get._finalize(\""+T+"\");";S.nodes.push(V);X.appendChild(V);}else{F(T);}return ;}var R=S.url[0];if(S.type==="script"){!
 U=M(R,Z);}else{U=N(R,Z);}G(S.type,U,T,R,Z,S.url.length);S.nodes.push(U);X.appendChild(U);if((A.webkit||A.gecko)&&S.type==="css"){E(T,R);}};var C=function(){if(O){return ;}O=true;for(var R in I){var S=I[R];if(S.autopurge&&S.finished){J(S.tId);}}O=false;};var J=function(X){var U=I[X];if(U){var W=U.nodes,R=W.length,V=U.win.document,T=V.getElementsByTagName("head")[0];for(var S=0;S<R;S=S+1){T.removeChild(W[S]);}}};var L=function(S,R,T){var V="q"+(H++);T=T||{};if(H%YAHOO.util.Get.PURGE_THRESH===0){C();}I[V]=D.merge(T,{tId:V,type:S,url:R,finished:false,nodes:[]});var U=I[V];U.win=U.win||window;U.scope=U.scope||U.win;U.autopurge=("autopurge" in U)?U.autopurge:(S==="script")?true:false;D.later(0,U,E,V);return{tId:V};};var G=function(a,V,U,S,W,X,Z){var Y=Z||E;if(A.ie){V.onreadystatechange=function(){var b=this.readyState;if("loaded"===b||"complete"===b){Y(U,S);}};}else{if(A.webkit){if(a==="script"){if(A.webkit>419){V.addEventListener("load",function(){Y(U,S);});}else{var R=I[U];if(R!
 .varName){var T=YAHOO.util.Get.POLL_FREQ;R.maxattempts=YAHOO.u!
 til.Get.
TIMEOUT/T;R.attempts=0;R._cache=R.varName[0].split(".");R.timer=D.later(T,R,function(f){var d=this._cache,c=d.length,b=this.win,e;for(e=0;e<c;e=e+1){b=b[d[e]];if(!b){this.attempts++;if(this.attempts++>this.maxattempts){R.timer.cancel();P(U);}else{}return ;}}R.timer.cancel();Y(U,S);},null,true);}else{D.later(YAHOO.util.Get.POLL_FREQ,null,Y,[U,S]);}}}}else{V.onload=function(){Y(U,S);};}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(R){D.later(0,null,F,R);},abort:function(S){var T=(D.isString(S))?S:S.tId;var R=I[T];if(R){R.aborted=true;}},script:function(R,S){return L("script",R,S);},css:function(R,S){return L("css",R,S);}};}();YAHOO.register("get",YAHOO.util.Get,{version:"2.4.1",build:"742"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env;var YUI={dupsAllowed:{"yahoo":true,"get":true},info:{"base":"http://yui.yahooapis.com/2.4.1/build/","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","rollup":3},"moduleInfo":{"animation":!
 {"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event"],"optional":["connection","animation"],"skinnable":true},"base":{"type":"css","path":"base/base-min.css"},"button":{"type":"js","path":"button/button-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],"skinnable":true},"charts":{"type":"js","path":"charts/charts-experimental-min.js","requires":["element","json","datasource"]},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-beta-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"connection":{"type":"js","path":"connection/connection-min.js","requires":["event"]},"container":{"type":"js","path":"container/container-min.js","requires":["dom","event"],"optional":["dragdrop","animation","connection"],"supersedes":[!
 "containercore"],"skinnable":true},"containercore":{"type":"js!
 ","path"
:"container/container_core-min.js","requires":["dom","event"],"pkg":"container"},"datasource":{"type":"js","path":"datasource/datasource-beta-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-beta-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop"],"skinnable":true},"dom":{"type":"js","path":"dom/dom-min.js","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-beta-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"skinnable":true},"element":{"type":"js","path":"element/element-beta-min.js","requires":["dom","event"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"get":{"type":"js","path":"get/get-beta-min.js","requires":["yahoo"]},"grids":{"type":"css","path":"grids/grids-min.css","re!
 quires":["fonts"],"optional":["reset"]},"history":{"type":"js","path":"history/history-min.js","requires":["event"]},"imageloader":{"type":"js","path":"imageloader/imageloader-beta-min.js","requires":["event","dom"]},"json":{"type":"js","path":"json/json-beta-min.js","requires":["yahoo"]},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids","reset-fonts"],"rollup":3},"reset-fonts":{"type":"css","path":"reset-fonts/reset-fonts.css","supersedes":["reset","fonts"],"rollup":2},"selector":{"type":"js","path":"selector/selector-beta-min.js","requires":["yahoo","dom"]},"simpleeditor":{"type":"js","path":"editor/simpleeditor-beta-min.js","requires":["ele!
 ment"],"optional":["containercore","menu","button","animation"!
 ,"dragdr
op"],"skinnable":true,"pkg":"editor"},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"]},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event"],"skinnable":true},"utilities":{"type":"js","path":"utilities/utilities.js","supersedes":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event"],"rollup":6},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoo-dom-event/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-beta-min.js"},"yuitest":{"type":"js","path":"yuitest/yuitest-beta-min.js","requires":["logger"],"skinnable":true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0;
+i<a.length;i=i+1){o[a[i]]=true;}}},keys:function(o,ordered){var a=[],i;for(i in o){if(lang.hasOwnProperty(o,i)){a.push(i);}}return a;}},ArrayUtil:{appendArray:function(a1,a2){Array.prototype.push.apply(a1,a2);},indexOf:function(a,val){for(var i=0;i<a.length;i=i+1){if(a[i]===val){return i;}}return -1;},toObject:function(a){var o={};for(var i=0;i<a.length;i=i+1){o[a[i]]=true;}return o;},uniq:function(a){return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a));}}};YAHOO.util.YUILoader=function(o){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=Y.log;this.onProgress=null;this.scope=this;this.data=null;this.varName=null;this.base=YUI.info.base;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo=lang.merge(YUI.info.moduleInfo);this.rollups=null;this.loadOptional=false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};var self=this;env.listeners.push(function(m){if(self._useY!
 ahooListener){self.loadNext(m.name);}});this.skin=lang.merge(YUI.info.skin);this._config(o);};Y.util.YUILoader.prototype={FILTERS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(o){if(!o){return ;}for(var i in o){if(lang.hasOwnProperty(o,i)){switch(i){case"require":this.require(o[i]);break;case"filter":var f=o[i];if(typeof f==="string"){f=f.toUpperCase();if(f==="DEBUG"){this.require("logger");}this.filter=this.FILTERS[f];}else{this.filter=f;}break;default:this[i]=o[i];}}}},addModule:function(o){if(!o||!o.name||!o.type||(!o.path&&!o.fullpath)){return false;}this.moduleInfo[o.name]=o;this.dirty=true;return true;},require:function(what){var a=(typeof what==="string")?arguments:what;this.dirty=true;for(var i=0;i<a.length;i=i+1){this.required[a[i]]=true;var s=this.parseSkin(a[i]);if(s){this._addSkin(s.skin,s.module);}}YUI.ObjectUtil.appendArray(this.required,a);},_addSkin:function(sk!
 in,mod){var name=this.formatSkin(skin);if(!this.moduleInfo[nam!
 e]){this
.addModule({"name":name,"type":"css","path":this.skin.base+skin+"/"+this.skin.path,"rollup":this.skin.rollup});}if(mod){name=this.formatSkin(skin,mod);if(!this.moduleInfo[name]){var mdef=this.moduleInfo[mod];var pkg=mdef.pkg||mod;this.addModule({"name":name,"type":"css","path":pkg+"/"+this.skin.base+skin+"/"+mod+".css"});}}},getRequires:function(mod){if(!this.dirty&&mod.expanded){return mod.expanded;}mod.requires=mod.requires||[];var i,d=[],r=mod.requires,o=mod.optional,info=this.moduleInfo;for(i=0;i<r.length;i=i+1){d.push(r[i]);YUI.ArrayUtil.appendArray(d,this.getRequires(info[r[i]]));}if(o&&this.loadOptional){for(i=0;i<o.length;i=i+1){d.push(o[i]);YUI.ArrayUtil.appendArray(d,this.getRequires(info[o[i]]));}}mod.expanded=YUI.ArrayUtil.uniq(d);return mod.expanded;},getProvides:function(name){var mod=this.moduleInfo[name];var o={};o[name]=true;var s=mod&&mod.supersedes;YUI.ObjectUtil.appendArray(o,s);return o;},calculate:function(o){if(this.dirty){this._config(o);this._setup()!
 ;this._explode();this._skin();if(this.allowRollup){this._rollup();}this._reduce();this._sort();this.dirty=false;}},_setup:function(){this.loaded=lang.merge(this.inserted);if(!this._sandbox){this.loaded=lang.merge(this.loaded,env.modules);}if(this.ignore){YUI.ObjectUtil.appendArray(this.loaded,this.ignore);}if(this.force){for(var i=0;i<this.force.length;i=i+1){if(this.force[i] in this.loaded){delete this.loaded[this.force[i]];}}}},_explode:function(){var r=this.required,i,mod;for(i in r){mod=this.moduleInfo[i];if(mod){var req=this.getRequires(mod);if(req){YUI.ObjectUtil.appendArray(r,req);}}}},_skin:function(){var r=this.required,i,mod;for(i in r){mod=this.moduleInfo[i];if(mod&&mod.skinnable){var o=this.skin.overrides,j;if(o&&o[i]){for(j=0;j<o[i].length;j=j+1){this.require(this.formatSkin(o[i][j],i));}}else{this.require(this.formatSkin(this.skin.defaultSkin,i));}}}},formatSkin:function(skin,mod){var s=this.SKIN_PREFIX+skin;if(mod){s=s+"-"+mod;}return s;},parseSkin:function(m!
 od){if(mod.indexOf(this.SKIN_PREFIX)===0){var a=mod.split("-")!
 ;return{
skin:a[1],module:a[2]};}return null;},_rollup:function(){var i,j,m,s,rollups={},r=this.required,roll;if(this.dirty||!this.rollups){for(i in this.moduleInfo){m=this.moduleInfo[i];if(m&&m.rollup){rollups[i]=m;}}this.rollups=rollups;}for(;;){var rolled=false;for(i in rollups){if(!r[i]&&!this.loaded[i]){m=this.moduleInfo[i];s=m.supersedes;roll=false;if(!m.rollup){continue;}var skin=this.parseSkin(i),c=0;if(skin){for(j in r){if(i!==j&&this.parseSkin(j)){c++;roll=(c>=m.rollup);if(roll){break;}}}}else{for(j=0;j<s.length;j=j+1){if(this.loaded[s[j]]&&(!YUI.dupsAllowed[s[j]])){roll=false;break;}else{if(r[s[j]]){c++;roll=(c>=m.rollup);if(roll){break;}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m);}}}if(!rolled){break;}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i];}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(j!==i&&j.indexOf(skin_pre)>-1){delete r[j];!
 }}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j<s.length;j=j+1){if(s[j] in r){delete r[s[j]];}}}}}}},_sort:function(){var s=[],info=this.moduleInfo,loaded=this.loaded;var requires=function(aa,bb){if(loaded[bb]){return false;}var ii,mm=info[aa],rr=mm&&mm.expanded;if(rr&&YUI.ArrayUtil.indexOf(rr,bb)>-1){return true;}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;ii<ss.length;ii=ii+1){if(requires(aa,ss[ii])){return true;}}}return false;};for(var i in this.required){s.push(i);}var p=0;for(;;){var l=s.length,a,b,j,k,moved=false;for(j=p;j<l;j=j+1){a=s[j];for(k=j+1;k<l;k=k+1){if(requires(a,s[k])){b=s.splice(k,1);s.splice(j,0,b[0]);moved=true;break;}}if(moved){break;}else{p=p+1;}}if(!moved){break;}}this.sorted=s;},toString:function(){var o={type:"YUILoader",base:this.base,filter:this.filter,required:this.required,loaded:this.loaded,inserted:this.inserted};lang.dump(o,1);},insert:function(o,type){this.calculate(o);
+if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js");};this.insert(null,"css");return ;}this._loading=true;this.loadType=type;this.loadNext();},sandbox:function(o,type){if(o){}else{}this._config(o);if(!this.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox");}this._sandbox=true;var self=this;if(!type||type!=="js"){this._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js");};this.insert(null,"css");return ;}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:this.base,filter:this.filter,require:"connection",onSuccess:function(){this.sandbox(null,"js");},scope:this},"js");return ;}this._scriptText=[];this._loadCount=0;this._stopCount=this.sorted.length;this._xhr=[];this.calculate();var s=this.sorted,l=s.length,i,m,url;for(i=0;i<l;i=i+1){m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});for(va!
 r j=0;j<this._xhr.length;j=j+1){this._xhr[j].abort();}return ;}if(m.type!=="js"){this._loadCount++;continue;}url=m.fullpath||this._url(m.path);var xhrData={success:function(o){var idx=o.argument[0],name=o.argument[2];this._scriptText[idx]=o.responseText;if(this.onProgress){this.onProgress.call(this.scope,{name:name,scriptText:o.responseText,xhrResponse:o,data:this.data});}this._loadCount++;if(this._loadCount>=this._stopCount){var v=this.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+this._scriptText.join("\n")+b);this._pushEvents(ref);if(ref){this.onSuccess.call(this.scope,{reference:ref,data:this.data});}else{this.onFailure.call(this.scope,{msg:this.varName+" reference failure",data:this.data});}}},failure:function(o){this.onFailure.call(this.scope,{msg:"XHR failure",xhrResponse:o,data:this.data});},scope:this,argument:[i,url,s[i]]};this._xhr.push(util.Connect.asyncRequest("GET",url,xhrData));}},loadNext:function(mname){if(!this._loa!
 ding){return ;}if(mname){if(mname!==this._loading){return ;}th!
 is.inser
ted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data});}}var s=this.sorted,len=s.length,i,m;for(i=0;i<len;i=i+1){if(s[i] in this.inserted){continue;}if(s[i]===this._loading){return ;}m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});return ;}if(!this.loadType||this.loadType===m.type){this._loading=s[i];var fn=(m.type==="css")?util.Get.css:util.Get.script,url=m.fullpath||this._url(m.path),self=this,c=function(o){self.loadNext(o.data);};if(env.ua.webkit&&env.ua.webkit<420&&m.type==="js"&&!m.varName){c=null;this._useYahooListener=true;}fn(url,{data:s[i],onSuccess:c,varName:m.varName,scope:self});return ;}}this._loading=null;if(this._internalCallback){var f=this._internalCallback;this._internalCallback=null;f.call(this);}else{if(this.onSuccess){this._pushEvents();this.onSuccess.call(this.scope,{data:this.data});}}},_pushEvents:function(ref){var r=ref||YAHOO;if(r.util&&r.util.Event){!
 r.util.Event._load();}},_url:function(path){var u=this.base||"",f=this.filter;u=u+path;if(f){u=u.replace(new RegExp(f.searchExp),f.replaceStr);}return u;}};})();
\ No newline at end of file

Modified: trunk/root/static/yui/yuiloader/yuiloader-beta.js
===================================================================
--- trunk/root/static/yui/yuiloader/yuiloader-beta.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/yuiloader/yuiloader-beta.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,9 +2,1574 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 /**
+ * The YAHOO object is the single global object used by YUI Library.  It
+ * contains utility function for setting up namespaces, inheritance, and
+ * logging.  YAHOO.util, YAHOO.widget, and YAHOO.example are namespaces
+ * created automatically for and used by the library.
+ * @module yahoo
+ * @title  YAHOO Global
+ */
+
+/**
+ * YAHOO_config is not included as part of the library.  Instead it is an 
+ * object that can be defined by the implementer immediately before 
+ * including the YUI library.  The properties included in this object
+ * will be used to configure global properties needed as soon as the 
+ * library begins to load.
+ * @class YAHOO_config
+ * @static
+ */
+
+/**
+ * A reference to a function that will be executed every time a YAHOO module
+ * is loaded.  As parameter, this function will receive the version
+ * information for the module. See <a href="YAHOO.env.html#getVersion">
+ * YAHOO.env.getVersion</a> for the description of the version data structure.
+ * @property listener
+ * @type Function
+ * @static
+ * @default undefined
+ */
+
+/**
+ * Set to true if the library will be dynamically loaded after window.onload.
+ * Defaults to false 
+ * @property injecting
+ * @type boolean
+ * @static
+ * @default undefined
+ */
+
+/**
+ * Instructs the yuiloader component to dynamically load yui components and
+ * their dependencies.  See the yuiloader documentation for more information
+ * about dynamic loading
+ * @property load
+ * @static
+ * @default undefined
+ * @see yuiloader
+ */
+
+/**
+ * Forces the use of the supplied locale where applicable in the library
+ * @property locale
+ * @type string
+ * @static
+ * @default undefined
+ */
+
+if (typeof YAHOO == "undefined" || !YAHOO) {
+    /**
+     * The YAHOO global namespace object.  If YAHOO is already defined, the
+     * existing YAHOO object will not be overwritten so that defined
+     * namespaces are preserved.
+     * @class YAHOO
+     * @static
+     */
+    var YAHOO = {};
+}
+
+/**
+ * Returns the namespace specified and creates it if it doesn't exist
+ * <pre>
+ * YAHOO.namespace("property.package");
+ * YAHOO.namespace("YAHOO.property.package");
+ * </pre>
+ * Either of the above would create YAHOO.property, then
+ * YAHOO.property.package
+ *
+ * Be careful when naming packages. Reserved words may work in some browsers
+ * and not others. For instance, the following will fail in Safari:
+ * <pre>
+ * YAHOO.namespace("really.long.nested.namespace");
+ * </pre>
+ * This fails because "long" is a future reserved word in ECMAScript
+ *
+ * @method namespace
+ * @static
+ * @param  {String*} arguments 1-n namespaces to create 
+ * @return {Object}  A reference to the last namespace object created
+ */
+YAHOO.namespace = function() {
+    var a=arguments, o=null, i, j, d;
+    for (i=0; i<a.length; i=i+1) {
+        d=a[i].split(".");
+        o=YAHOO;
+
+        // YAHOO is implied, so it is ignored if it is included
+        for (j=(d[0] == "YAHOO") ? 1 : 0; j<d.length; j=j+1) {
+            o[d[j]]=o[d[j]] || {};
+            o=o[d[j]];
+        }
+    }
+
+    return o;
+};
+
+/**
+ * Uses YAHOO.widget.Logger to output a log message, if the widget is
+ * available.
+ *
+ * @method log
+ * @static
+ * @param  {String}  msg  The message to log.
+ * @param  {String}  cat  The log category for the message.  Default
+ *                        categories are "info", "warn", "error", time".
+ *                        Custom categories can be used as well. (opt)
+ * @param  {String}  src  The source of the the message (opt)
+ * @return {Boolean}      True if the log operation was successful.
+ */
+YAHOO.log = function(msg, cat, src) {
+    var l=YAHOO.widget.Logger;
+    if(l && l.log) {
+        return l.log(msg, cat, src);
+    } else {
+        return false;
+    }
+};
+
+/**
+ * Registers a module with the YAHOO object
+ * @method register
+ * @static
+ * @param {String}   name    the name of the module (event, slider, etc)
+ * @param {Function} mainClass a reference to class in the module.  This
+ *                             class will be tagged with the version info
+ *                             so that it will be possible to identify the
+ *                             version that is in use when multiple versions
+ *                             have loaded
+ * @param {Object}   data      metadata object for the module.  Currently it
+ *                             is expected to contain a "version" property
+ *                             and a "build" property at minimum.
+ */
+YAHOO.register = function(name, mainClass, data) {
+    var mods = YAHOO.env.modules;
+    if (!mods[name]) {
+        mods[name] = { versions:[], builds:[] };
+    }
+    var m=mods[name],v=data.version,b=data.build,ls=YAHOO.env.listeners;
+    m.name = name;
+    m.version = v;
+    m.build = b;
+    m.versions.push(v);
+    m.builds.push(b);
+    m.mainClass = mainClass;
+    // fire the module load listeners
+    for (var i=0;i<ls.length;i=i+1) {
+        ls[i](m);
+    }
+    // label the main class
+    if (mainClass) {
+        mainClass.VERSION = v;
+        mainClass.BUILD = b;
+    } else {
+        YAHOO.log("mainClass is undefined for module " + name, "warn");
+    }
+};
+
+/**
+ * YAHOO.env is used to keep track of what is known about the YUI library and
+ * the browsing environment
+ * @class YAHOO.env
+ * @static
+ */
+YAHOO.env = YAHOO.env || {
+
+    /**
+     * Keeps the version info for all YUI modules that have reported themselves
+     * @property modules
+     * @type Object[]
+     */
+    modules: [],
+    
+    /**
+     * List of functions that should be executed every time a YUI module
+     * reports itself.
+     * @property listeners
+     * @type Function[]
+     */
+    listeners: []
+};
+
+/**
+ * Returns the version data for the specified module:
+ *      <dl>
+ *      <dt>name:</dt>      <dd>The name of the module</dd>
+ *      <dt>version:</dt>   <dd>The version in use</dd>
+ *      <dt>build:</dt>     <dd>The build number in use</dd>
+ *      <dt>versions:</dt>  <dd>All versions that were registered</dd>
+ *      <dt>builds:</dt>    <dd>All builds that were registered.</dd>
+ *      <dt>mainClass:</dt> <dd>An object that was was stamped with the
+ *                 current version and build. If 
+ *                 mainClass.VERSION != version or mainClass.BUILD != build,
+ *                 multiple versions of pieces of the library have been
+ *                 loaded, potentially causing issues.</dd>
+ *       </dl>
+ *
+ * @method getVersion
+ * @static
+ * @param {String}  name the name of the module (event, slider, etc)
+ * @return {Object} The version info
+ */
+YAHOO.env.getVersion = function(name) {
+    return YAHOO.env.modules[name] || null;
+};
+
+/**
+ * Do not fork for a browser if it can be avoided.  Use feature detection when
+ * you can.  Use the user agent as a last resort.  YAHOO.env.ua stores a version
+ * number for the browser engine, 0 otherwise.  This value may or may not map
+ * to the version number of the browser using the engine.  The value is 
+ * presented as a float so that it can easily be used for boolean evaluation 
+ * as well as for looking for a particular range of versions.  Because of this, 
+ * some of the granularity of the version info may be lost (e.g., Gecko 1.8.0.9 
+ * reports 1.8).
+ * @class YAHOO.env.ua
+ * @static
+ */
+YAHOO.env.ua = function() {
+    var o={
+
+        /**
+         * Internet Explorer version number or 0.  Example: 6
+         * @property ie
+         * @type float
+         */
+        ie:0,
+
+        /**
+         * Opera version number or 0.  Example: 9.2
+         * @property opera
+         * @type float
+         */
+        opera:0,
+
+        /**
+         * Gecko engine revision number.  Will evaluate to 1 if Gecko 
+         * is detected but the revision could not be found. Other browsers
+         * will be 0.  Example: 1.8
+         * <pre>
+         * Firefox 1.0.0.4: 1.7.8   <-- Reports 1.7
+         * Firefox 1.5.0.9: 1.8.0.9 <-- Reports 1.8
+         * Firefox 2.0.0.3: 1.8.1.3 <-- Reports 1.8
+         * Firefox 3 alpha: 1.9a4   <-- Reports 1.9
+         * </pre>
+         * @property gecko
+         * @type float
+         */
+        gecko:0,
+
+        /**
+         * AppleWebKit version.  KHTML browsers that are not WebKit browsers 
+         * will evaluate to 1, other browsers 0.  Example: 418.9.1
+         * <pre>
+         * Safari 1.3.2 (312.6): 312.8.1 <-- Reports 312.8 -- currently the 
+         *                                   latest available for Mac OSX 10.3.
+         * Safari 2.0.2:         416     <-- hasOwnProperty introduced
+         * Safari 2.0.4:         418     <-- preventDefault fixed
+         * Safari 2.0.4 (419.3): 418.9.1 <-- One version of Safari may run
+         *                                   different versions of webkit
+         * Safari 2.0.4 (419.3): 419     <-- Current Safari release
+         * Webkit 212 nightly:   522+    <-- Safari 3.0 (with native SVG) should
+         *                                   be higher than this
+         *                                   
+         * </pre>
+         * http://developer.apple.com/internet/safari/uamatrix.html
+         * @property webkit
+         * @type float
+         */
+        webkit:0,
+
+        /**
+         * The mobile property will be set to a string containing any relevant
+         * user agent information when a modern mobile browser is detected.
+         * Currently limited to Safari on the iPhone/iPod Touch, Nokia N-series
+         * devices with the WebKit-based browser, and Opera Mini.  
+         * @property mobile 
+         * @type string
+         */
+        mobile: null 
+    };
+
+    var ua=navigator.userAgent, m;
+
+    // Modern KHTML browsers should qualify as Safari X-Grade
+    if ((/KHTML/).test(ua)) {
+        o.webkit=1;
+    }
+    // Modern WebKit browsers are at least X-Grade
+    m=ua.match(/AppleWebKit\/([^\s]*)/);
+    if (m&&m[1]) {
+        o.webkit=parseFloat(m[1]);
+
+        // Mobile browser check
+        if (/ Mobile\//.test(ua)) {
+            o.mobile = "Apple"; // iPhone or iPod Touch
+        } else {
+            m=ua.match(/NokiaN[^\/]*/);
+            if (m) {
+                o.mobile = m[0]; // Nokia N-series, ex: NokiaN95
+            }
+        }
+
+    }
+
+    if (!o.webkit) { // not webkit
+        // @todo check Opera/8.01 (J2ME/MIDP; Opera Mini/2.0.4509/1316; fi; U; ssr)
+        m=ua.match(/Opera[\s\/]([^\s]*)/);
+        if (m&&m[1]) {
+            o.opera=parseFloat(m[1]);
+            m=ua.match(/Opera Mini[^;]*/);
+            if (m) {
+                o.mobile = m[0]; // ex: Opera Mini/2.0.4509/1316
+            }
+        } else { // not opera or webkit
+            m=ua.match(/MSIE\s([^;]*)/);
+            if (m&&m[1]) {
+                o.ie=parseFloat(m[1]);
+            } else { // not opera, webkit, or ie
+                m=ua.match(/Gecko\/([^\s]*)/);
+                if (m) {
+                    o.gecko=1; // Gecko detected, look for revision
+                    m=ua.match(/rv:([^\s\)]*)/);
+                    if (m&&m[1]) {
+                        o.gecko=parseFloat(m[1]);
+                    }
+                }
+            }
+        }
+    }
+    
+    return o;
+}();
+
+/*
+ * Initializes the global by creating the default namespaces and applying
+ * any new configuration information that is detected.  This is the setup
+ * for env.
+ * @method init
+ * @static
+ * @private
+ */
+(function() {
+    YAHOO.namespace("util", "widget", "example");
+    if ("undefined" !== typeof YAHOO_config) {
+        var l=YAHOO_config.listener,ls=YAHOO.env.listeners,unique=true,i;
+        if (l) {
+            // if YAHOO is loaded multiple times we need to check to see if
+            // this is a new config object.  If it is, add the new component
+            // load listener to the stack
+            for (i=0;i<ls.length;i=i+1) {
+                if (ls[i]==l) {
+                    unique=false;
+                    break;
+                }
+            }
+            if (unique) {
+                ls.push(l);
+            }
+        }
+    }
+})();
+/**
+ * Provides the language utilites and extensions used by the library
+ * @class YAHOO.lang
+ */
+YAHOO.lang = YAHOO.lang || {
+    /**
+     * Determines whether or not the provided object is an array.
+     * Testing typeof/instanceof/constructor of arrays across frame 
+     * boundaries isn't possible in Safari unless you have a reference
+     * to the other frame to test against its Array prototype.  To
+     * handle this case, we test well-known array properties instead.
+     * properties.
+     * @method isArray
+     * @param {any} o The object being testing
+     * @return Boolean
+     */
+    isArray: function(o) { 
+
+        if (o) {
+           var l = YAHOO.lang;
+           return l.isNumber(o.length) && l.isFunction(o.splice);
+        }
+        return false;
+    },
+
+    /**
+     * Determines whether or not the provided object is a boolean
+     * @method isBoolean
+     * @param {any} o The object being testing
+     * @return Boolean
+     */
+    isBoolean: function(o) {
+        return typeof o === 'boolean';
+    },
+    
+    /**
+     * Determines whether or not the provided object is a function
+     * @method isFunction
+     * @param {any} o The object being testing
+     * @return Boolean
+     */
+    isFunction: function(o) {
+        return typeof o === 'function';
+    },
+        
+    /**
+     * Determines whether or not the provided object is null
+     * @method isNull
+     * @param {any} o The object being testing
+     * @return Boolean
+     */
+    isNull: function(o) {
+        return o === null;
+    },
+        
+    /**
+     * Determines whether or not the provided object is a legal number
+     * @method isNumber
+     * @param {any} o The object being testing
+     * @return Boolean
+     */
+    isNumber: function(o) {
+        return typeof o === 'number' && isFinite(o);
+    },
+      
+    /**
+     * Determines whether or not the provided object is of type object
+     * or function
+     * @method isObject
+     * @param {any} o The object being testing
+     * @return Boolean
+     */  
+    isObject: function(o) {
+return (o && (typeof o === 'object' || YAHOO.lang.isFunction(o))) || false;
+    },
+        
+    /**
+     * Determines whether or not the provided object is a string
+     * @method isString
+     * @param {any} o The object being testing
+     * @return Boolean
+     */
+    isString: function(o) {
+        return typeof o === 'string';
+    },
+        
+    /**
+     * Determines whether or not the provided object is undefined
+     * @method isUndefined
+     * @param {any} o The object being testing
+     * @return Boolean
+     */
+    isUndefined: function(o) {
+        return typeof o === 'undefined';
+    },
+    
+    /**
+     * Determines whether or not the property was added
+     * to the object instance.  Returns false if the property is not present
+     * in the object, or was inherited from the prototype.
+     * This abstraction is provided to enable hasOwnProperty for Safari 1.3.x.
+     * There is a discrepancy between YAHOO.lang.hasOwnProperty and
+     * Object.prototype.hasOwnProperty when the property is a primitive added to
+     * both the instance AND prototype with the same value:
+     * <pre>
+     * var A = function() {};
+     * A.prototype.foo = 'foo';
+     * var a = new A();
+     * a.foo = 'foo';
+     * alert(a.hasOwnProperty('foo')); // true
+     * alert(YAHOO.lang.hasOwnProperty(a, 'foo')); // false when using fallback
+     * </pre>
+     * @method hasOwnProperty
+     * @param {any} o The object being testing
+     * @return Boolean
+     */
+    hasOwnProperty: function(o, prop) {
+        if (Object.prototype.hasOwnProperty) {
+            return o.hasOwnProperty(prop);
+        }
+        
+        return !YAHOO.lang.isUndefined(o[prop]) && 
+                o.constructor.prototype[prop] !== o[prop];
+    },
+ 
+    /**
+     * IE will not enumerate native functions in a derived object even if the
+     * function was overridden.  This is a workaround for specific functions 
+     * we care about on the Object prototype. 
+     * @property _IEEnumFix
+     * @param {Function} r  the object to receive the augmentation
+     * @param {Function} s  the object that supplies the properties to augment
+     * @static
+     * @private
+     */
+    _IEEnumFix: function(r, s) {
+        if (YAHOO.env.ua.ie) {
+            var add=["toString", "valueOf"], i;
+            for (i=0;i<add.length;i=i+1) {
+                var fname=add[i],f=s[fname];
+                if (YAHOO.lang.isFunction(f) && f!=Object.prototype[fname]) {
+                    r[fname]=f;
+                }
+            }
+        }
+    },
+       
+    /**
+     * Utility to set up the prototype, constructor and superclass properties to
+     * support an inheritance strategy that can chain constructors and methods.
+     * Static members will not be inherited.
+     *
+     * @method extend
+     * @static
+     * @param {Function} subc   the object to modify
+     * @param {Function} superc the object to inherit
+     * @param {Object} overrides  additional properties/methods to add to the
+     *                              subclass prototype.  These will override the
+     *                              matching items obtained from the superclass 
+     *                              if present.
+     */
+    extend: function(subc, superc, overrides) {
+        if (!superc||!subc) {
+            throw new Error("YAHOO.lang.extend failed, please check that " +
+                            "all dependencies are included.");
+        }
+        var F = function() {};
+        F.prototype=superc.prototype;
+        subc.prototype=new F();
+        subc.prototype.constructor=subc;
+        subc.superclass=superc.prototype;
+        if (superc.prototype.constructor == Object.prototype.constructor) {
+            superc.prototype.constructor=superc;
+        }
+    
+        if (overrides) {
+            for (var i in overrides) {
+                subc.prototype[i]=overrides[i];
+            }
+
+            YAHOO.lang._IEEnumFix(subc.prototype, overrides);
+        }
+    },
+   
+    /**
+     * Applies all properties in the supplier to the receiver if the
+     * receiver does not have these properties yet.  Optionally, one or 
+     * more methods/properties can be specified (as additional 
+     * parameters).  This option will overwrite the property if receiver 
+     * has it already.  If true is passed as the third parameter, all 
+     * properties will be applied and _will_ overwrite properties in 
+     * the receiver.
+     *
+     * @method augmentObject
+     * @static
+     * @since 2.3.0
+     * @param {Function} r  the object to receive the augmentation
+     * @param {Function} s  the object that supplies the properties to augment
+     * @param {String*|boolean}  arguments zero or more properties methods 
+     *        to augment the receiver with.  If none specified, everything
+     *        in the supplier will be used unless it would
+     *        overwrite an existing property in the receiver. If true
+     *        is specified as the third parameter, all properties will
+     *        be applied and will overwrite an existing property in
+     *        the receiver
+     */
+    augmentObject: function(r, s) {
+        if (!s||!r) {
+            throw new Error("Absorb failed, verify dependencies.");
+        }
+        var a=arguments, i, p, override=a[2];
+        if (override && override!==true) { // only absorb the specified properties
+            for (i=2; i<a.length; i=i+1) {
+                r[a[i]] = s[a[i]];
+            }
+        } else { // take everything, overwriting only if the third parameter is true
+            for (p in s) { 
+                if (override || !r[p]) {
+                    r[p] = s[p];
+                }
+            }
+            
+            YAHOO.lang._IEEnumFix(r, s);
+        }
+    },
+ 
+    /**
+     * Same as YAHOO.lang.augmentObject, except it only applies prototype properties
+     * @see YAHOO.lang.augmentObject
+     * @method augmentProto
+     * @static
+     * @param {Function} r  the object to receive the augmentation
+     * @param {Function} s  the object that supplies the properties to augment
+     * @param {String*|boolean}  arguments zero or more properties methods 
+     *        to augment the receiver with.  If none specified, everything 
+     *        in the supplier will be used unless it would overwrite an existing 
+     *        property in the receiver.  if true is specified as the third 
+     *        parameter, all properties will be applied and will overwrite an 
+     *        existing property in the receiver
+     */
+    augmentProto: function(r, s) {
+        if (!s||!r) {
+            throw new Error("Augment failed, verify dependencies.");
+        }
+        //var a=[].concat(arguments);
+        var a=[r.prototype,s.prototype];
+        for (var i=2;i<arguments.length;i=i+1) {
+            a.push(arguments[i]);
+        }
+        YAHOO.lang.augmentObject.apply(this, a);
+    },
+
+      
+    /**
+     * Returns a simple string representation of the object or array.
+     * Other types of objects will be returned unprocessed.  Arrays
+     * are expected to be indexed.  Use object notation for
+     * associative arrays.
+     * @method dump
+     * @since 2.3.0
+     * @param o {Object} The object to dump
+     * @param d {int} How deep to recurse child objects, default 3
+     * @return {String} the dump result
+     */
+    dump: function(o, d) {
+        var l=YAHOO.lang,i,len,s=[],OBJ="{...}",FUN="f(){...}",
+            COMMA=', ', ARROW=' => ';
+
+        // Cast non-objects to string
+        // Skip dates because the std toString is what we want
+        // Skip HTMLElement-like objects because trying to dump 
+        // an element will cause an unhandled exception in FF 2.x
+        if (!l.isObject(o)) {
+            return o + "";
+        } else if (o instanceof Date || ("nodeType" in o && "tagName" in o)) {
+            return o;
+        } else if  (l.isFunction(o)) {
+            return FUN;
+        }
+
+        // dig into child objects the depth specifed. Default 3
+        d = (l.isNumber(d)) ? d : 3;
+
+        // arrays [1, 2, 3]
+        if (l.isArray(o)) {
+            s.push("[");
+            for (i=0,len=o.length;i<len;i=i+1) {
+                if (l.isObject(o[i])) {
+                    s.push((d > 0) ? l.dump(o[i], d-1) : OBJ);
+                } else {
+                    s.push(o[i]);
+                }
+                s.push(COMMA);
+            }
+            if (s.length > 1) {
+                s.pop();
+            }
+            s.push("]");
+        // objects {k1 => v1, k2 => v2}
+        } else {
+            s.push("{");
+            for (i in o) {
+                if (l.hasOwnProperty(o, i)) {
+                    s.push(i + ARROW);
+                    if (l.isObject(o[i])) {
+                        s.push((d > 0) ? l.dump(o[i], d-1) : OBJ);
+                    } else {
+                        s.push(o[i]);
+                    }
+                    s.push(COMMA);
+                }
+            }
+            if (s.length > 1) {
+                s.pop();
+            }
+            s.push("}");
+        }
+
+        return s.join("");
+    },
+
+    /**
+     * Does variable substitution on a string. It scans through the string 
+     * looking for expressions enclosed in { } braces. If an expression 
+     * is found, it is used a key on the object.  If there is a space in
+     * the key, the first word is used for the key and the rest is provided
+     * to an optional function to be used to programatically determine the
+     * value (the extra information might be used for this decision). If 
+     * the value for the key in the object, or what is returned from the
+     * function has a string value, number value, or object value, it is 
+     * substituted for the bracket expression and it repeats.  If this
+     * value is an object, it uses the Object's toString() if this has
+     * been overridden, otherwise it does a shallow dump of the key/value
+     * pairs.
+     * @method substitute
+     * @since 2.3.0
+     * @param s {String} The string that will be modified.
+     * @param o {Object} An object containing the replacement values
+     * @param f {Function} An optional function that can be used to
+     *                     process each match.  It receives the key,
+     *                     value, and any extra metadata included with
+     *                     the key inside of the braces.
+     * @return {String} the substituted string
+     */
+    substitute: function (s, o, f) {
+        var i, j, k, key, v, meta, l=YAHOO.lang, saved=[], token, 
+            DUMP='dump', SPACE=' ', LBRACE='{', RBRACE='}';
+
+
+        for (;;) {
+            i = s.lastIndexOf(LBRACE);
+            if (i < 0) {
+                break;
+            }
+            j = s.indexOf(RBRACE, i);
+            if (i + 1 >= j) {
+                break;
+            }
+
+            //Extract key and meta info 
+            token = s.substring(i + 1, j);
+            key = token;
+            meta = null;
+            k = key.indexOf(SPACE);
+            if (k > -1) {
+                meta = key.substring(k + 1);
+                key = key.substring(0, k);
+            }
+
+            // lookup the value
+            v = o[key];
+
+            // if a substitution function was provided, execute it
+            if (f) {
+                v = f(key, v, meta);
+            }
+
+            if (l.isObject(v)) {
+                if (l.isArray(v)) {
+                    v = l.dump(v, parseInt(meta, 10));
+                } else {
+                    meta = meta || "";
+
+                    // look for the keyword 'dump', if found force obj dump
+                    var dump = meta.indexOf(DUMP);
+                    if (dump > -1) {
+                        meta = meta.substring(4);
+                    }
+
+                    // use the toString if it is not the Object toString 
+                    // and the 'dump' meta info was not found
+                    if (v.toString===Object.prototype.toString||dump>-1) {
+                        v = l.dump(v, parseInt(meta, 10));
+                    } else {
+                        v = v.toString();
+                    }
+                }
+            } else if (!l.isString(v) && !l.isNumber(v)) {
+                // This {block} has no replace string. Save it for later.
+                v = "~-" + saved.length + "-~";
+                saved[saved.length] = token;
+
+                // break;
+            }
+
+            s = s.substring(0, i) + v + s.substring(j + 1);
+
+
+        }
+
+        // restore saved {block}s
+        for (i=saved.length-1; i>=0; i=i-1) {
+            s = s.replace(new RegExp("~-" + i + "-~"), "{"  + saved[i] + "}", "g");
+        }
+
+        return s;
+    },
+
+
+    /**
+     * Returns a string without any leading or trailing whitespace.  If 
+     * the input is not a string, the input will be returned untouched.
+     * @method trim
+     * @since 2.3.0
+     * @param s {string} the string to trim
+     * @return {string} the trimmed string
+     */
+    trim: function(s){
+        try {
+            return s.replace(/^\s+|\s+$/g, "");
+        } catch(e) {
+            return s;
+        }
+    },
+
+    /**
+     * Returns a new object containing all of the properties of
+     * all the supplied objects.  The properties from later objects
+     * will overwrite those in earlier objects.
+     * @method merge
+     * @since 2.3.0
+     * @param arguments {Object*} the objects to merge
+     * @return the new merged object
+     */
+    merge: function() {
+        var o={}, a=arguments;
+        for (var i=0, l=a.length; i<l; i=i+1) {
+            YAHOO.lang.augmentObject(o, a[i], true);
+        }
+        return o;
+    },
+
+    /**
+     * Executes the supplied function in the scope of the supplied 
+     * object 'when' milliseconds later.  Executes the function a 
+     * single time unless periodic is set to true.
+     * @method later
+     * @since 2.4.0
+     * @param when {int} the number of milliseconds to wait until the fn 
+     * is executed
+     * @param o the scope object
+     * @param fn {Function|String} the function to execute or the name of 
+     * the method in the 'o' object to execute
+     * @param data [Array] data that is provided to the function.  This accepts
+     * either a single item or an array.  If an array is provided, the
+     * function is executed with one parameter for each array item.  If
+     * you need to pass a single array parameter, it needs to be wrapped in
+     * an array [myarray]
+     * @param periodic {boolean} if true, executes continuously at supplied 
+     * interval until canceled
+     * @return a timer object. Call the cancel() method on this object to 
+     * stop the timer.
+     */
+    later: function(when, o, fn, data, periodic) {
+        when = when || 0; 
+        o = o || {};
+        var m=fn, d=data, f, r;
+
+        if (YAHOO.lang.isString(fn)) {
+            m = o[fn];
+        }
+
+        if (!m) {
+            throw new TypeError("method undefined");
+        }
+
+        if (!YAHOO.lang.isArray(d)) {
+            d = [data];
+        }
+
+        f = function() {
+            m.apply(o, d);
+        };
+
+        r = (periodic) ? setInterval(f, when) : setTimeout(f, when);
+
+        return {
+            interval: periodic,
+            cancel: function() {
+                if (this.interval) {
+                    clearInterval(r);
+                } else {
+                    clearTimeout(r);
+                }
+            }
+        };
+    },
+
+    /**
+     * A convenience method for detecting a legitimate non-null value.
+     * Returns false for null/undefined/NaN, true for other values, 
+     * including 0/false/''
+     * @method isValue
+     * @since 2.3.0
+     * @param o {any} the item to test
+     * @return {boolean} true if it is not null/undefined/NaN || false
+     */
+    isValue: function(o) {
+        // return (o || o === false || o === 0 || o === ''); // Infinity fails
+        var l = YAHOO.lang;
+return (l.isObject(o) || l.isString(o) || l.isNumber(o) || l.isBoolean(o));
+    }
+
+};
+
+/*
+ * An alias for <a href="YAHOO.lang.html">YAHOO.lang</a>
+ * @class YAHOO.util.Lang
+ */
+YAHOO.util.Lang = YAHOO.lang;
+ 
+/**
+ * Same as YAHOO.lang.augmentObject, except it only applies prototype 
+ * properties.  This is an alias for augmentProto.
+ * @see YAHOO.lang.augmentObject
+ * @method augment
+ * @static
+ * @param {Function} r  the object to receive the augmentation
+ * @param {Function} s  the object that supplies the properties to augment
+ * @param {String*|boolean}  arguments zero or more properties methods to 
+ *        augment the receiver with.  If none specified, everything
+ *        in the supplier will be used unless it would
+ *        overwrite an existing property in the receiver.  if true
+ *        is specified as the third parameter, all properties will
+ *        be applied and will overwrite an existing property in
+ *        the receiver
+ */
+YAHOO.lang.augment = YAHOO.lang.augmentProto;
+
+/**
+ * An alias for <a href="YAHOO.lang.html#augment">YAHOO.lang.augment</a>
+ * @for YAHOO
+ * @method augment
+ * @static
+ * @param {Function} r  the object to receive the augmentation
+ * @param {Function} s  the object that supplies the properties to augment
+ * @param {String*}  arguments zero or more properties methods to 
+ *        augment the receiver with.  If none specified, everything
+ *        in the supplier will be used unless it would
+ *        overwrite an existing property in the receiver
+ */
+YAHOO.augment = YAHOO.lang.augmentProto;
+       
+/**
+ * An alias for <a href="YAHOO.lang.html#extend">YAHOO.lang.extend</a>
+ * @method extend
+ * @static
+ * @param {Function} subc   the object to modify
+ * @param {Function} superc the object to inherit
+ * @param {Object} overrides  additional properties/methods to add to the
+ *        subclass prototype.  These will override the
+ *        matching items obtained from the superclass if present.
+ */
+YAHOO.extend = YAHOO.lang.extend;
+
+YAHOO.register("yahoo", YAHOO, {version: "2.4.1", build: "742"});
+/**
+ * Provides a mechanism to fetch remote resources and
+ * insert them into a document
+ * @module get
+ * @requires yahoo
+ */
+
+/**
+ * Fetches and inserts one or more script or link nodes into the document 
+ * @namespace YAHOO.util
+ * @class YAHOO.util.Get
+ */
+YAHOO.util.Get = function() {
+
+    /**
+     * hash of queues to manage multiple requests
+     * @property queues
+     * @private
+     */
+    var queues={}, 
+        
+    /**
+     * queue index used to generate transaction ids
+     * @property qidx
+     * @type int
+     * @private
+     */
+        qidx=0, 
+        
+    /**
+     * node index used to generate unique node ids
+     * @property nidx
+     * @type int
+     * @private
+     */
+        nidx=0, 
+
+        // ridx=0,
+
+        // sandboxFrame=null,
+
+    /**
+     * interal property used to prevent multiple simultaneous purge 
+     * processes
+     * @property purging
+     * @type boolean
+     * @private
+     */
+        purging=false,
+
+        ua=YAHOO.env.ua, 
+        
+        lang=YAHOO.lang;
+    
+    /** 
+     * Generates an HTML element, this is not appended to a document
+     * @method _node
+     * @param type {string} the type of element
+     * @param attr {string} the attributes
+     * @param win {Window} optional window to create the element in
+     * @return {HTMLElement} the generated node
+     * @private
+     */
+    var _node = function(type, attr, win) {
+        var w = win || window, d=w.document, n=d.createElement(type);
+
+        for (var i in attr) {
+            if (attr[i] && YAHOO.lang.hasOwnProperty(attr, i)) {
+                n.setAttribute(i, attr[i]);
+            }
+        }
+
+        return n;
+    };
+
+    /**
+     * Generates a link node
+     * @method _linkNode
+     * @param url {string} the url for the css file
+     * @param win {Window} optional window to create the node in
+     * @return {HTMLElement} the generated node
+     * @private
+     */
+    var _linkNode = function(url, win) {
+        return _node("link", {
+                "id": "yui__dyn_" + (nidx++),
+                "type": "text/css",
+                "rel": "stylesheet",
+                "href": url
+            }, win);
+    };
+
+    /**
+     * Generates a script node
+     * @method _scriptNode
+     * @param url {string} the url for the script file
+     * @param win {Window} optional window to create the node in
+     * @return {HTMLElement} the generated node
+     * @private
+     */
+    var _scriptNode = function(url, win) {
+        return _node("script", {
+                "id": "yui__dyn_" + (nidx++),
+                "type": "text/javascript",
+                "src": url
+            }, win);
+    };
+
+    /**
+     * Returns the data payload for callback functions
+     * @method _returnData
+     * @private
+     */
+    var _returnData = function(q) {
+        return {
+                tId: q.tId,
+                win: q.win,
+                data: q.data,
+                nodes: q.nodes,
+                purge: function() {
+                    _purge(this.tId);
+                }
+            };
+    };
+
+    /*
+     * The request failed, execute fail handler with whatever
+     * was accomplished.  There isn't a failure case at the
+     * moment unless you count aborted transactions
+     * @method _fail
+     * @param id {string} the id of the request
+     * @private
+     */
+    var _fail = function(id) {
+        var q = queues[id];
+        // execute failure callback
+        if (q.onFailure) {
+            var sc=q.scope || q.win;
+            q.onFailure.call(sc, _returnData(q));
+        }
+    };
+
+    /**
+     * The request is complete, so executing the requester's callback
+     * @method _finish
+     * @param id {string} the id of the request
+     * @private
+     */
+    var _finish = function(id) {
+        var q = queues[id];
+        q.finished = true;
+
+        if (q.aborted) {
+            _fail(id);
+            return;
+        }
+
+        // execute success callback
+        if (q.onSuccess) {
+            var sc=q.scope || q.win;
+            q.onSuccess.call(sc, _returnData(q));
+        }
+    };
+
+    /**
+     * Loads the next item for a given request
+     * @method _next
+     * @param id {string} the id of the request
+     * @param loaded {string} the url that was just loaded, if any
+     * @private
+     */
+    var _next = function(id, loaded) {
+        var q = queues[id];
+
+        if (q.aborted) {
+            _fail(id);
+            return;
+        }
+
+        if (loaded) {
+            q.url.shift(); 
+            if (q.varName) {
+                q.varName.shift(); 
+            }
+        } else {
+            // This is the first pass: make sure the url is an array
+            q.url = (lang.isString(q.url)) ? [q.url] : q.url;
+            if (q.varName) {
+                q.varName = (lang.isString(q.varName)) ? [q.varName] : q.varName;
+            }
+        }
+
+        var w=q.win, d=w.document, h=d.getElementsByTagName("head")[0], n;
+
+        if (q.url.length === 0) {
+            // Safari 2.x workaround - There is no way to know when 
+            // a script is ready in versions of Safari prior to 3.x.
+            // Adding an extra node reduces the problem, but doesn't
+            // eliminate it completely because the browser executes
+            // them asynchronously. 
+            if (q.type === "script" && ua.webkit && ua.webkit < 420 && 
+                    !q.finalpass && !q.varName) {
+                // Add another script node.  This does not guarantee that the
+                // scripts will execute in order, but it does appear to fix the
+                // problem on fast connections more effectively than using an
+                // arbitrary timeout.  It is possible that the browser does
+                // block subsequent script execution in this case for a limited
+                // time.
+                var extra = _scriptNode(null, q.win);
+                extra.innerHTML='YAHOO.util.Get._finalize("' + id + '");';
+                q.nodes.push(extra); h.appendChild(extra);
+
+            } else {
+                _finish(id);
+            }
+
+            return;
+        } 
+
+
+        var url = q.url[0];
+
+        if (q.type === "script") {
+            n = _scriptNode(url, w);
+        } else {
+            n = _linkNode(url, w);
+        }
+
+        // track this node's load progress
+        _track(q.type, n, id, url, w, q.url.length);
+
+        // add the node to the queue so we can return it to the user supplied callback
+        q.nodes.push(n);
+
+        // add it to the head
+        h.appendChild(n);
+        
+
+        // FireFox does not support the onload event for link nodes, so there is
+        // no way to make the css requests synchronous. This means that the css 
+        // rules in multiple files could be applied out of order in this browser
+        // if a later request returns before an earlier one.  Safari too.
+        if ((ua.webkit || ua.gecko) && q.type === "css") {
+            _next(id, url);
+        }
+    };
+
+    /**
+     * Removes processed queues and corresponding nodes
+     * @method _autoPurge
+     * @private
+     */
+    var _autoPurge = function() {
+
+        if (purging) {
+            return;
+        }
+
+        purging = true;
+        for (var i in queues) {
+            var q = queues[i];
+            if (q.autopurge && q.finished) {
+                _purge(q.tId);
+            }
+        }
+
+        purging = false;
+    };
+
+    /**
+     * Removes the nodes for the specified queue
+     * @method _purge
+     * @private
+     */
+    var _purge = function(tId) {
+        var q=queues[tId];
+        if (q) {
+            var n=q.nodes, l=n.length, d=q.win.document, 
+                h=d.getElementsByTagName("head")[0];
+            for (var i=0; i<l; i=i+1) {
+                h.removeChild(n[i]);
+            }
+        }
+    };
+
+    /**
+     * Saves the state for the request and begins loading
+     * the requested urls
+     * @method queue
+     * @param type {string} the type of node to insert
+     * @param url {string} the url to load
+     * @param opts the hash of options for this request
+     * @private
+     */
+    var _queue = function(type, url, opts) {
+
+        var id = "q" + (qidx++);
+        opts = opts || {};
+
+        if (qidx % YAHOO.util.Get.PURGE_THRESH === 0) {
+            _autoPurge();
+        }
+
+        queues[id] = lang.merge(opts, {
+            tId: id,
+            type: type,
+            url: url,
+            finished: false,
+            nodes: []
+        });
+
+        var q = queues[id];
+        q.win = q.win || window;
+        q.scope = q.scope || q.win;
+        q.autopurge = ("autopurge" in q) ? q.autopurge : 
+                      (type === "script") ? true : false;
+
+        lang.later(0, q, _next, id);
+
+        return {
+            tId: id
+        };
+    };
+
+    /**
+     * Detects when a node has been loaded.  In the case of
+     * script nodes, this does not guarantee that contained
+     * script is ready to use.
+     * @method _track
+     * @param type {string} the type of node to track
+     * @param n {HTMLElement} the node to track
+     * @param id {string} the id of the request
+     * @param url {string} the url that is being loaded
+     * @param win {Window} the targeted window
+     * @param qlength the number of remaining items in the queue,
+     * including this one
+     * @param trackfn {Function} function to execute when finished
+     * the default is _next
+     * @private
+     */
+    var _track = function(type, n, id, url, win, qlength, trackfn) {
+        var f = trackfn || _next;
+
+        // IE supports the readystatechange event for script and css nodes
+        if (ua.ie) {
+            n.onreadystatechange = function() {
+                var rs = this.readyState;
+                if ("loaded" === rs || "complete" === rs) {
+                    f(id, url);
+                }
+            };
+
+        // webkit prior to 3.x is problemmatic
+        } else if (ua.webkit) {
+
+            if (type === "script") {
+
+                // Safari 3.x supports the load event for script nodes (DOM2)
+                if (ua.webkit > 419) {
+
+                    n.addEventListener("load", function() {
+                        f(id, url);
+                    });
+
+                // Nothing can be done with Safari < 3.x except to pause and hope
+                // for the best, particularly after last script is inserted. The
+                // scripts will always execute in the order they arrive, not
+                // necessarily the order in which they were inserted.  To support
+                // script nodes with complete reliability in these browsers, script
+                // nodes either need to invoke a function in the window once they
+                // are loaded or the implementer needs to provide a well-known
+                // property that the utility can poll for.
+                } else {
+                    // Poll for the existence of the named variable, if it
+                    // was supplied.
+                    var q = queues[id];
+                    if (q.varName) {
+                        var freq=YAHOO.util.Get.POLL_FREQ;
+                        q.maxattempts = YAHOO.util.Get.TIMEOUT/freq;
+                        q.attempts = 0;
+                        q._cache = q.varName[0].split(".");
+                        q.timer = lang.later(freq, q, function(o) {
+                            var a=this._cache, l=a.length, w=this.win, i;
+                            for (i=0; i<l; i=i+1) {
+                                w = w[a[i]];
+                                if (!w) {
+                                    // if we have exausted our attempts, give up
+                                    this.attempts++;
+                                    if (this.attempts++ > this.maxattempts) {
+                                        q.timer.cancel();
+                                        _fail(id);
+                                    } else {
+                                    }
+                                    return;
+                                }
+                            }
+                            
+
+                            q.timer.cancel();
+                            f(id, url);
+
+                        }, null, true);
+                    } else {
+                        lang.later(YAHOO.util.Get.POLL_FREQ, null, f, [id, url]);
+                    }
+                }
+            } 
+
+        // FireFox and Opera support onload (but not DOM2 in FF) handlers for
+        // script nodes.  Opera, but not FF, supports the onload event for link
+        // nodes.
+        } else { 
+            n.onload = function() {
+                f(id, url);
+            };
+        }
+    };
+
+    return {
+
+        /**
+         * The default poll freqency in ms, when needed
+         * @property POLL_FREQ
+         * @static
+         * @type int
+         * @default 10
+         */
+        POLL_FREQ: 10,
+
+        /**
+         * The number of request required before an automatic purge.
+         * property PURGE_THRESH
+         * @static
+         * @type int
+         * @default 20
+         */
+        PURGE_THRESH: 20,
+
+        /**
+         * The length time to poll for varName when loading a script in
+         * Safari 2.x before the transaction fails.
+         * property TIMEOUT
+         * @static
+         * @type int
+         * @default 2000
+         */
+        TIMEOUT: 2000,
+        
+        /**
+         * Called by the the helper for detecting script load in Safari
+         * @method _finalize
+         * @param id {string} the transaction id
+         * @private
+         */
+        _finalize: function(id) {
+            lang.later(0, null, _finish, id);
+        },
+
+        /**
+         * Abort a transaction
+         * @method abort
+         * @param {string|object} either the tId or the object returned from
+         * script() or css()
+         */
+        abort: function(o) {
+            var id = (lang.isString(o)) ? o : o.tId;
+            var q = queues[id];
+            if (q) {
+                q.aborted = true;
+            }
+        }, 
+
+        /**
+         * Fetches and inserts one or more script nodes into the head
+         * of the current document or the document in a specified window.
+         *
+         * @method script
+         * @static
+         * @param url {string|string[]} the url or urls to the script(s)
+         * @param opts {object} Options: 
+         * <dl>
+         * <dt>onSuccess</dt>
+         * <dd>
+         * callback to execute when the script(s) are finished loading
+         * The callback receives an object back with the following
+         * data:
+         * <dl>
+         * <dt>win</dt>
+         * <dd>the window the script(s) were inserted into</dd>
+         * <dt>data</dt>
+         * <dd>the data object passed in when the request was made</dd>
+         * <dt>nodes</dt>
+         * <dd>An array containing references to the nodes that were
+         * inserted</dd>
+         * <dt>purge</dt>
+         * <dd>A function that, when executed, will remove the nodes
+         * that were inserted</dd>
+         * <dt>
+         * </dl>
+         * </dd>
+         * <dt>onFailure</dt>
+         * <dd>
+         * callback to execute when the script load operation fails
+         * The callback receives an object back with the following
+         * data:
+         * <dl>
+         * <dt>win</dt>
+         * <dd>the window the script(s) were inserted into</dd>
+         * <dt>data</dt>
+         * <dd>the data object passed in when the request was made</dd>
+         * <dt>nodes</dt>
+         * <dd>An array containing references to the nodes that were
+         * inserted successfully</dd>
+         * <dt>purge</dt>
+         * <dd>A function that, when executed, will remove any nodes
+         * that were inserted</dd>
+         * <dt>
+         * </dl>
+         * </dd>
+         * <dt>scope</dt>
+         * <dd>the execution context for the callbacks</dd>
+         * <dt>win</dt>
+         * <dd>a window other than the one the utility occupies</dd>
+         * <dt>autopurge</dt>
+         * <dd>
+         * setting to true will let the utilities cleanup routine purge 
+         * the script once loaded
+         * </dd>
+         * <dt>data</dt>
+         * <dd>
+         * data that is supplied to the callback when the script(s) are
+         * loaded.
+         * </dd>
+         * <dt>varName</dt>
+         * <dd>
+         * variable that should be available when a script is finished
+         * loading.  Used to help Safari 2.x and below with script load 
+         * detection.  The type of this property should match what was
+         * passed into the url parameter: if loading a single url, a
+         * string can be supplied.  If loading multiple scripts, you
+         * must supply an array that contains the variable name for
+         * each script.
+         * </dd>
+         * </dl>
+         * <pre>
+         * // assumes yahoo, dom, and event are already on the page
+         *   YAHOO.util.Get.script(
+         *   ["http://yui.yahooapis.com/2.3.1/build/dragdrop/dragdrop-min.js",
+         *    "http://yui.yahooapis.com/2.3.1/build/animation/animation-min.js"], {
+         *     onSuccess: function(o) {
+         *       new YAHOO.util.DDProxy("dd1"); // also new o.reference("dd1"); would work
+         *       this.log("won't cause error because YAHOO is the scope");
+         *       this.log(o.nodes.length === 2) // true
+         *       // o.purge(); // optionally remove the script nodes immediately
+         *     },
+         *     onFailure: function(o) {
+         *     },
+         *     data: "foo",
+         *     scope: YAHOO,
+         *     // win: otherframe // target another window/frame
+         *     autopurge: true // allow the utility to choose when to remove the nodes
+         *   });
+         * </pre>
+         * @return {tId: string} an object containing info about the transaction
+         */
+        script: function(url, opts) { return _queue("script", url, opts); },
+
+        /**
+         * Fetches and inserts one or more css link nodes into the 
+         * head of the current document or the document in a specified
+         * window.
+         * @method css
+         * @static
+         * @param url {string} the url or urls to the css file(s)
+         * @param opts Options: 
+         * <dl>
+         * <dt>onSuccess</dt>
+         * <dd>
+         * callback to execute when the css file(s) are finished loading
+         * The callback receives an object back with the following
+         * data:
+         * <dl>win</dl>
+         * <dd>the window the link nodes(s) were inserted into</dd>
+         * <dt>data</dt>
+         * <dd>the data object passed in when the request was made</dd>
+         * <dt>nodes</dt>
+         * <dd>An array containing references to the nodes that were
+         * inserted</dd>
+         * <dt>purge</dt>
+         * <dd>A function that, when executed, will remove the nodes
+         * that were inserted</dd>
+         * <dt>
+         * </dl>
+         * </dd>
+         * <dt>scope</dt>
+         * <dd>the execution context for the callbacks</dd>
+         * <dt>win</dt>
+         * <dd>a window other than the one the utility occupies</dd>
+         * <dt>data</dt>
+         * <dd>
+         * data that is supplied to the callbacks when the nodes(s) are
+         * loaded.
+         * </dd>
+         * </dl>
+         * <pre>
+         *      YAHOO.util.Get.css("http://yui.yahooapis.com/2.3.1/build/menu/assets/skins/sam/menu.css");
+         * </pre>
+         * <pre>
+         *      YAHOO.util.Get.css(["http://yui.yahooapis.com/2.3.1/build/menu/assets/skins/sam/menu.css",
+         * </pre>
+         * @return {tId: string} an object containing info about the transaction
+         */
+        css: function(url, opts) {
+            return _queue("css", url, opts); 
+        }
+    };
+}();
+
+YAHOO.register("get", YAHOO.util.Get, {version: "2.4.1", build: "742"});
+/**
  * Provides dynamic loading for the YUI library.  It includes the dependency
  * info for the library, and will automatically pull in dependencies for
  * the modules requested.  It supports rollup files (such as utilities.js
@@ -23,17 +1588,13 @@
  *      version management, automatic sandboxing
  */
 (function() {
+
+    var Y=YAHOO, util=Y.util, lang=Y.lang, env=Y.env;
  
-    // Define YAHOO_config if it doesn't exist.  Only relevant if YAHOO is not
-    // already on the page
-    if (typeof YAHOO_config === "undefined") {
-        YAHOO_config = {};
-    }
-
-    // YUI is locally scoped, only pieces of it will be referenced in YAHOO
-    // after YAHOO has been loaded.
     var YUI = {
 
+        dupsAllowed: {'yahoo': true, 'get': true},
+
         /*
          * The library metadata for the current release  The is the default
          * value for YAHOO.util.YUILoader.moduleInfo
@@ -42,7 +1603,7 @@
          */
         info: {
 
-    'base': 'http://yui.yahooapis.com/2.3.1/build/',
+    'base': 'http://yui.yahooapis.com/2.4.1/build/',
 
     'skin': {
         'defaultSkin': 'sam',
@@ -67,9 +1628,14 @@
             'skinnable': true
         },
 
+        'base': {
+            'type': 'css',
+            'path': 'base/base-min.css'
+        },
+
         'button': {
             'type': 'js',
-            'path': 'button/button-beta-min.js',
+            'path': 'button/button-min.js',
             'requires': ['element'],
             'optional': ['menu'],
             'skinnable': true
@@ -82,6 +1648,12 @@
             'skinnable': true
         },
 
+        'charts': {
+            'type': 'js',
+            'path': 'charts/charts-experimental-min.js',
+            'requires': ['element', 'json', 'datasource']
+        },
+
         'colorpicker': {
             'type': 'js',
             'path': 'colorpicker/colorpicker-beta-min.js',
@@ -101,8 +1673,8 @@
             'path': 'container/container-min.js',
             'requires': ['dom', 'event'],
             // button is optional, but creates a circular dep
-            //'optional': ['dragdrop', 'animation', 'button'],
-            'optional': ['dragdrop', 'animation'],
+            //'optional': ['dragdrop', 'animation', 'connection', 'connection', 'button'],
+            'optional': ['dragdrop', 'animation', 'connection'],
             'supersedes': ['containercore'],
             'skinnable': true
         },
@@ -110,7 +1682,8 @@
         'containercore': {
             'type': 'js',
             'path': 'container/container_core-min.js',
-            'requires': ['dom', 'event']
+            'requires': ['dom', 'event'],
+            'pkg': 'container'
         },
 
         'datasource': {
@@ -165,6 +1738,12 @@
             'path': 'fonts/fonts-min.css'
         },
 
+        'get': {
+            'type': 'js',
+            'path': 'get/get-beta-min.js',
+            'requires': ['yahoo']
+        },
+
         'grids': {
             'type': 'css',
             'path': 'grids/grids-min.css',
@@ -174,16 +1753,22 @@
 
         'history': {
             'type': 'js',
-            'path': 'history/history-beta-min.js',
+            'path': 'history/history-min.js',
             'requires': ['event']
         },
 
         'imageloader': {
             'type': 'js',
-            'path': 'imageloader/imageloader-experimental-min.js',
+            'path': 'imageloader/imageloader-beta-min.js',
             'requires': ['event', 'dom']
         },
 
+        'json': {
+            'type': 'js',
+            'path': 'json/json-beta-min.js',
+            'requires': ['yahoo']
+        },
+
         'logger': {
             'type': 'js',
             'path': 'logger/logger-min.js',
@@ -207,9 +1792,32 @@
         'reset-fonts-grids': {
             'type': 'css',
             'path': 'reset-fonts-grids/reset-fonts-grids.css',
-            'supersedes': ['reset', 'fonts', 'grids']
+            'supersedes': ['reset', 'fonts', 'grids', 'reset-fonts'],
+            'rollup': 3
         },
 
+        'reset-fonts': {
+            'type': 'css',
+            'path': 'reset-fonts/reset-fonts.css',
+            'supersedes': ['reset', 'fonts'],
+            'rollup': 2
+        },
+
+        'selector': {
+            'type': 'js',
+            'path': 'selector/selector-beta-min.js',
+            'requires': ['yahoo', 'dom']
+        },
+
+        'simpleeditor': {
+            'type': 'js',
+            'path': 'editor/simpleeditor-beta-min.js',
+            'requires': ['element'],
+            'optional': ['containercore', 'menu', 'button', 'animation', 'dragdrop'],
+            'skinnable': true,
+            'pkg': 'editor'
+        },
+
         'slider': {
             'type': 'js',
             'path': 'slider/slider-min.js',
@@ -266,7 +1874,6 @@
 }
  , 
 
-        // Simple utils since we can't count on YAHOO.lang being available.
         ObjectUtil: {
             appendArray: function(o, a) {
                 if (a) {
@@ -276,29 +1883,12 @@
                 }
             },
 
-            clone: function(o) {
-                var c = {};
-                for (var i in o) {
-                    c[i] = o[i];
-                }
-                return c;
-            },
-
-            merge: function() {
-                var o={}, a=arguments, i, j;
-                for (i=0; i<a.length; i=i+1) {
-                    
-                    for (j in a[i]) {
-                        o[j] = a[i][j];
-                    }
-                }
-                return o;
-            },
-
             keys: function(o, ordered) {
                 var a=[], i;
                 for (i in o) {
-                    a.push(i);
+                    if (lang.hasOwnProperty(o, i)) {
+                        a.push(i);
+                    }
                 }
 
                 return a;
@@ -343,116 +1933,11 @@
             uniq: function(a) {
                 return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a));
             }
-        },
-
-
-        // loader instances
-        loaders: [],
-
-        finishInit: function(yahooref) {
-
-            // YAHOO has been loaded either in this window or passed 
-            // from the sandbox routine.  Set up local references 
-            // to the loader and module metadata in the YAHOO object
-            // in question so additional modules can be loaded. 
-
-            yahooref = yahooref || YAHOO;
-
-            yahooref.env.YUIInfo=YUI.info;
-            yahooref.util.YUILoader=YUI.YUILoader;
-
-        },
-
-        /*
-         * Global handler for the module loaded event exposed by
-         * YAHOO
-         */
-        onModuleLoaded: function(minfo) {
-
-            var mname = minfo.name, m;
-
-            for (var i=0; i<YUI.loaders.length; i=i+1) {
-                YUI.loaders[i].loadNext(mname);
-            }
-
-            //console.log(YAHOO.lang.dump(minfo));
-
-        },
-
-        /*
-         * Sets up the module metadata
-         */
-        init: function() {
-
-            var c = YAHOO_config, o = c.load, 
-                y_loaded = (typeof YAHOO !== "undefined" && YAHOO.env);
-
-
-            // add our listener to the existing YAHOO.env.listeners stack
-            if (y_loaded) {
-
-                YAHOO.env.listeners.push(YUI.onModuleLoaded);
-
-            // define a listener in YAHOO_config that YAHOO will pick up
-            // when it is loaded.
-            } else {
-
-                if (c.listener) {
-                    YUI.cachedCallback = c.listener;
-                }
-
-                c.listener = function(minfo) {
-                    YUI.onModuleLoaded(minfo);
-                    if (YUI.cachedCallback) {
-                        YUI.cachedCallback(minfo);
-                    }
-                };
-            }
-
-            // Fetch the required modules immediately if specified
-            // in YAHOO_config.  Otherwise detect YAHOO and fetch
-            // it if it doesn't exist so we have a place to put
-            // the loader.  The problem with this is that it will
-            // prevent rollups from working
-            if (o || !y_loaded) {
-
-                o = o || {};
-
-                var loader = new YUI.YUILoader(o);
-                loader.onLoadComplete = function() {
-
-                        YUI.finishInit();
-
-                        if (o.onLoadComplete) {
-
-                            loader._pushEvents();
-                            o.onLoadComplete(loader);
-                        }
-
-                        
-                    };
-
-                // If no load was requested, we must load YAHOO
-                // so we have a place to put the loader
-                if (!y_loaded) {
-                    loader.require("yahoo");
-                }
-
-                loader.insert(null, o);
-            } else {
-                YUI.finishInit();
-            }
         }
-
     };
 
-    YUI.YUILoader = function(o) {
+    YAHOO.util.YUILoader = function(o) {
 
-        // Inform the library that it is being injected
-        YAHOO_config.injecting = true;
-
-        o = o || {};
-
         /**
          * Internal callback to handle multiple internal insert() calls
          * so that css is inserted prior to js
@@ -462,46 +1947,118 @@
         this._internalCallback = null;
 
         /**
+         * Use the YAHOO environment listener to detect script load.  This
+         * is only switched on for Safari 2.x and below.
+         * @property _useYahooListener
+         * @private
+         */
+        this._useYahooListener = false;
+
+        /**
          * Callback that will be executed when the loader is finished
          * with an insert
-         * @method onLoadComplete
+         * @method onSuccess
          * @type function
          */
-        this.onLoadComplete = null;
+        this.onSuccess = null;
 
         /**
+         * Callback that will be executed if there is a failure
+         * @method onFailure
+         * @type function
+         */
+        this.onFailure = Y.log;
+
+        /**
+         * Callback that will be executed each time a new module is loaded
+         * @method onProgress
+         * @type function
+         */
+        this.onProgress = null;
+
+        /**
+         * The execution scope for all callbacks
+         * @property scope
+         * @default this
+         */
+        this.scope = this;
+
+        /**
+         * Data that is passed to all callbacks
+         * @property data
+         */
+        this.data = null;
+
+        /**
+         * The name of the variable in a sandbox or script node 
+         * (for external script support in Safari 2.x and earlier)
+         * to reference when the load is complete.  If this variable 
+         * is not available in the specified scripts, the operation will 
+         * fail.  
+         * @property varName
+         * @type string
+         */
+        this.varName = null;
+
+        /**
          * The base directory.
          * @property base
          * @type string
-         * @default build
+         * @default http://yui.yahooapis.com/[YUI VERSION]/build/
          */
-        this.base = ("base" in o) ? o.base : YUI.info.base;
+        this.base = YUI.info.base;
 
         /**
+         * A list of modules that should not be loaded, even if
+         * they turn up in the dependency tree
+         * @property ignore
+         * @type string[]
+         */
+        this.ignore = null;
+
+        /**
+         * A list of modules that should always be loaded, even
+         * if they have already been inserted into the page.
+         * @property force
+         * @type string
+         */
+        this.force = null;
+
+        /**
          * Should we allow rollups
          * @property allowRollup
          * @type boolean
          * @default true
          */
-        this.allowRollup = ("allowRollup" in o) ? o.allowRollup : true;
+        this.allowRollup = true;
 
         /**
-         * Filter to apply to result url
+         * A filter to apply to result urls.  This filter will modify the default
+         * path for all modules.  The default path for the YUI library is the
+         * minified version of the files (e.g., event-min.js).  The filter property
+         * can be a predefined filter or a custom filter.  The valid predefined 
+         * filters are:
+         * <dl>
+         *  <dt>DEBUG</dt>
+         *  <dd>Selects the debug versions of the library (e.g., event-debug.js).
+         *      This option will automatically include the logger widget</dd>
+         *  <dt>RAW</dt>
+         *  <dd>Selects the non-minified version of the library (e.g., event.js).
+         * </dl>
+         * You can also define a custom filter, which must be an object literal 
+         * containing a search expression and a replace string:
+         * <pre>
+         *  myFilter: { 
+         *      'searchExp': "-min\\.js", 
+         *      'replaceStr': "-debug.js"
+         *  }
+         * </pre>
          * @property filter
-         * @type string|object
+         * @type string|{searchExp: string, replaceStr: string}
          */
-        this.filter = o.filter;
+        this.filter = null;
 
         /**
-         * Create a sandbox rather than inserting into lib into.
-         * the current context.  Not currently supported
-         * property sandbox
-         * @type boolean
-         * @default false
-         */
-        this.sandbox = o.sandbox;
-
-        /**
          * The list of requested modules
          * @property required
          * @type {string: boolean}
@@ -512,7 +2069,7 @@
          * The library metadata
          * @property moduleInfo
          */
-        this.moduleInfo = o.moduleInfo || YUI.info.moduleInfo;
+        this.moduleInfo = lang.merge(YUI.info.moduleInfo);
 
         /**
          * List of rollup files found in the library metadata
@@ -527,7 +2084,7 @@
          * @type boolean
          * @default false
          */
-        this.loadOptional = o.loadOptional || false;
+        this.loadOptional = false;
 
         /**
          * All of the derived dependencies in sorted order, which
@@ -563,7 +2120,6 @@
          */
         this.inserted = {};
 
-
         /**
          * Provides the information used to skin the skinnable components.
          * The following skin definition would result in 'skin1' and 'skin2'
@@ -602,17 +2158,23 @@
          *   </code>
          *   @property skin
          */
-        this.skin = o.skin || YUI.ObjectUtil.clone(YUI.info.skin); 
 
+        var self = this;
 
-        if (o.require) {
-            this.require(o.require);
-        }
+        env.listeners.push(function(m) {
+            if (self._useYahooListener) {
+                //Y.log("YAHOO listener: " + m.name);
+                self.loadNext(m.name);
+            }
+        });
 
-        YUI.loaders.push(this);
+        this.skin = lang.merge(YUI.info.skin); 
+
+        this._config(o);
+
     };
 
-    YUI.YUILoader.prototype = {
+    Y.util.YUILoader.prototype = {
 
         FILTERS: {
             RAW: { 
@@ -627,10 +2189,49 @@
 
         SKIN_PREFIX: "skin-",
 
-        /** Add a new module to the component metadata.  The javascript 
-         * component must also use YAHOO.register to notify the loader 
-         * when it has been loaded, or a verifier function must be
-         * provided
+        _config: function(o) {
+
+            if (!o) {
+                return;
+            }
+
+            // lang.augmentObject(this, o);
+
+            // apply config values
+            for (var i in o) {
+                if (lang.hasOwnProperty(o, i)) {
+                    switch (i) {
+                        case "require":
+                            this.require(o[i]);
+                            break;
+
+                        case "filter":
+                            var f = o[i];
+
+                            if (typeof f === "string") {
+                                f = f.toUpperCase();
+
+                                // the logger must be available in order to use the debug
+                                // versions of the library
+                                if (f === "DEBUG") {
+                                    this.require("logger");
+                                }
+
+                                this.filter = this.FILTERS[f];
+                            } else {
+                                this.filter = f;
+                            }
+
+                            break;
+
+                        default:
+                            this[i] = o[i];
+                    }
+                }
+            }
+        },
+
+        /** Add a new module to the component metadata.         
          * <dl>
          *     <dt>name:</dt>       <dd>required, the component name</dd>
          *     <dt>type:</dt>       <dd>required, the component type (js or css)</dd>
@@ -639,7 +2240,6 @@
          *     <dt>optional:</dt>   <dd>the optional modules for this component</dd>
          *     <dt>supersedes:</dt> <dd>the modules this component replaces</dd>
          *     <dt>rollup:</dt>     <dd>the number of superseded modules required for automatic rollup</dd>
-         *     <dt>verifier:</dt>   <dd>a function that is executed to determine when the module is fully loaded</dd>
          *     <dt>fullpath:</dt>   <dd>If fullpath is specified, this is used instead of the configured base + path</dd>
          *     <dt>skinnable:</dt>  <dd>flag to determine if skin assets should automatically be pulled in</dd>
          * </dl>
@@ -704,11 +2304,14 @@
             if (mod) {
                 name = this.formatSkin(skin, mod);
                 if (!this.moduleInfo[name]) {
+                    var mdef = this.moduleInfo[mod];
+                    var pkg = mdef.pkg || mod;
                     this.addModule({
                         'name': name,
                         'type': 'css',
                         //'path': this.skin.base + skin + "/" + mod + ".css"
-                        'path': mod + '/' + this.skin.base + skin + "/" + mod + ".css"
+                        // 'path': mod + '/' + this.skin.base + skin + "/" + mod + ".css"
+                        'path': pkg + '/' + this.skin.base + skin + "/" + mod + ".css"
                     });
                 }
             }
@@ -726,7 +2329,7 @@
             }
 
             mod.requires=mod.requires || [];
-            var i, d=[], r=mod.requires, o=mod.optional, s=mod.supersedes, info=this.moduleInfo;
+            var i, d=[], r=mod.requires, o=mod.optional, info=this.moduleInfo;
             for (i=0; i<r.length; i=i+1) {
                 d.push(r[i]);
                 YUI.ArrayUtil.appendArray(d, this.getRequires(info[r[i]]));
@@ -773,8 +2376,8 @@
          */
         calculate: function(o) {
             if (this.dirty) {
-
-                this._setup(o);
+                this._config(o);
+                this._setup();
                 this._explode();
                 this._skin();
                 if (this.allowRollup) {
@@ -783,6 +2386,8 @@
                 this._reduce();
                 this._sort();
 
+                // Y.log("after calculate: " + lang.dump(this.required));
+
                 this.dirty = false;
             }
         },
@@ -792,28 +2397,28 @@
          * modules already detected will not be loaded again unless a force
          * option is encountered.  Called by calculate()
          * @method _setup
-         * @param o optional options object
          * @private
          */
-        _setup: function(o) {
+        _setup: function() {
 
-            o = o || {};
-            this.loaded = YUI.ObjectUtil.clone(this.inserted); 
+            this.loaded = lang.merge(this.inserted); // shallow clone
             
-            if (!this.sandbox && typeof YAHOO !== "undefined" && YAHOO.env) {
-                this.loaded = YUI.ObjectUtil.merge(this.loaded, YAHOO.env.modules);
+            if (!this._sandbox) {
+                this.loaded = lang.merge(this.loaded, env.modules);
             }
 
+            // Y.log("already loaded stuff: " + lang.dump(this.loaded, 0));
+
             // add the ignore list to the list of loaded packages
-            if (o.ignore) {
-                YUI.ObjectUtil.appendArray(this.loaded, o.ignore);
+            if (this.ignore) {
+                YUI.ObjectUtil.appendArray(this.loaded, this.ignore);
             }
 
             // remove modules on the force list from the loaded list
-            if (o.force) {
-                for (var i=0; i<o.force.length; i=i+1) {
-                    if (o.force[i] in this.loaded) {
-                        delete this.loaded[o.force[i]];
+            if (this.force) {
+                for (var i=0; i<this.force.length; i=i+1) {
+                    if (this.force[i] in this.loaded) {
+                        delete this.loaded[this.force[i]];
                     }
                 }
             }
@@ -939,13 +2544,12 @@
 
                     // there can be only one
                     if (!r[i] && !this.loaded[i]) {
-                        m =this.moduleInfo[i]; s = m.supersedes; roll=true;
+                        m =this.moduleInfo[i]; s = m.supersedes; roll=false;
 
                         if (!m.rollup) {
                             continue;
                         }
 
-
                         var skin = this.parseSkin(i), c = 0;
                         if (skin) {
 
@@ -954,20 +2558,19 @@
                                     c++;
                                     roll = (c >= m.rollup);
                                     if (roll) {
+                                        // Y.log("skin rollup " + lang.dump(r));
                                         break;
                                     }
                                 }
                             }
 
-
                         } else {
 
-                            // require all modules to trigger a rollup (using the 
-                            // threshold value has not proved worthwhile)
+                            // check the threshold
                             for (j=0;j<s.length;j=j+1) {
 
                                 // if the superseded module is loaded, we can't load the rollup
-                                if (this.loaded[s[j]]) {
+                                if (this.loaded[s[j]] && (!YUI.dupsAllowed[s[j]])) {
                                     roll = false;
                                     break;
                                 // increment the counter if this module is required.  if we are
@@ -976,6 +2579,7 @@
                                     c++;
                                     roll = (c >= m.rollup);
                                     if (roll) {
+                                        // Y.log("over thresh " + c + ", " + lang.dump(r));
                                         break;
                                     }
                                 }
@@ -983,6 +2587,7 @@
                         }
 
                         if (roll) {
+                            // Y.log("rollup: " +  i + ", " + lang.dump(this, 1));
                             // add the rollup
                             r[i] = true;
                             rolled = true;
@@ -1141,67 +2746,214 @@
             this.sorted = s;
         },
 
+        toString: function() {
+            var o = {
+                type: "YUILoader",
+                base: this.base,
+                filter: this.filter,
+                required: this.required,
+                loaded: this.loaded,
+                inserted: this.inserted
+            };
+
+            lang.dump(o, 1);
+        },
+
         /**
          * inserts the requested modules and their dependencies.  
          * <code>type</code> can be "js" or "css".  Both script and 
          * css are inserted if type is not provided.
          * @method insert
-         * @param callback {Function} a function to execute when the load
-         * is complete.
          * @param o optional options object
          * @param type {string} the type of dependency to insert
          */
-        insert: function(callback, o, type) {
+        insert: function(o, type) {
+            // if (o) {
+            //     Y.log("insert: " + lang.dump(o, 1) + ", " + type);
+            // } else {
+            //     Y.log("insert: " + this.toString() + ", " + type);
+            // }
 
-            //if (!this.onLoadComplete) {
-                //this.onLoadComplete = callback;
-            //}
+            // build the dependency list
+            this.calculate(o);
 
             if (!type) {
+                // Y.log("trying to load css first");
                 var self = this;
                 this._internalCallback = function() {
                             self._internalCallback = null;
-                            self.insert(callback, o, "js");
+                            self.insert(null, "js");
                         };
-                this.insert(null, o, "css");
+                this.insert(null, "css");
                 return;
             }
 
-            o = o || {};
+            // set a flag to indicate the load has started
+            this._loading = true;
 
-            // store the callback for when we are done
-            this.onLoadComplete = callback || this.onLoadComplete;
+            // keep the loadType (js, css or undefined) cached
+            this.loadType = type;
 
-            // store the optional filter
-            var f = o && o.filter || null;
+            // start the load
+            this.loadNext();
 
-            if (typeof f === "string") {
-                f = f.toUpperCase();
+        },
 
-                // the logger must be available in order to use the debug
-                // versions of the library
-                if (f === "DEBUG") {
-                    this.require("logger");
-                }
+        /*
+         * Interns the script for the requested modules.  The callback is
+         * provided a reference to the sandboxed YAHOO object.  This only
+         * applies to the script: css can not be sandboxed; css will be
+         * loaded into the page normally if specified.
+         * @method sandbox
+         * @param callback {Function} the callback to exectued when the load is
+         *        complete.
+         */
+        sandbox: function(o, type) {
+            if (o) {
+                // YAHOO.log("sandbox: " + lang.dump(o, 1) + ", " + type);
+            } else {
+                // YAHOO.log("sandbox: " + this.toString() + ", " + type);
             }
 
-            this.filter = this.FILTERS[f] || f || this.FILTERS[this.filter] || this.filter;
+            this._config(o);
 
-            // store the options... not currently in use
-            this.insertOptions = o;
+            if (!this.onSuccess) {
+throw new Error("You must supply an onSuccess handler for your sandbox");
+            }
 
-            // build the dependency list
-            this.calculate(o);
+            this._sandbox = true;
 
-            // set a flag to indicate the load has started
-            this.loading = true;
+            var self = this;
 
-            // keep the loadType (js, css or undefined) cached
-            this.loadType = type;
+            // take care of any css first (this can't be sandboxed)
+            if (!type || type !== "js") {
+                this._internalCallback = function() {
+                            self._internalCallback = null;
+                            self.sandbox(null, "js");
+                        };
+                this.insert(null, "css");
+                return;
+            }
 
-            // start the load
-            this.loadNext();
+            // get the connection manager if not on the page
+            if (!util.Connect) {
+                // get a new loader instance to load connection.
+                var ld = new YAHOO.util.YUILoader();
+                ld.insert({
+                    base: this.base,
+                    filter: this.filter,
+                    require: "connection",
+                    onSuccess: function() {
+                        this.sandbox(null, "js");
+                    },
+                    scope: this
+                }, "js");
+                return;
+            }
 
+            this._scriptText = [];
+            this._loadCount = 0;
+            this._stopCount = this.sorted.length;
+            this._xhr = [];
+
+            this.calculate();
+
+            var s=this.sorted, l=s.length, i, m, url;
+
+            for (i=0; i<l; i=i+1) {
+                m = this.moduleInfo[s[i]];
+
+                // undefined modules cause a failure
+                if (!m) {
+                    this.onFailure.call(this.scope, {
+                            msg: "undefined module " + m,
+                            data: this.data
+                        });
+                    for (var j=0;j<this._xhr.length;j=j+1) {
+                        this._xhr[j].abort();
+                    }
+                    return;
+                }
+
+                // css files should be done
+                if (m.type !== "js") {
+                    this._loadCount++;
+                    continue;
+                }
+
+                url = m.fullpath || this._url(m.path);
+
+                // YAHOO.log("xhr request: " + url + ", " + i);
+
+                var xhrData = {
+
+                    success: function(o) {
+                        
+                        var idx=o.argument[0], name=o.argument[2];
+
+                        // store the response in the position it was requested
+                        this._scriptText[idx] = o.responseText; 
+                        
+                        // YAHOO.log("received: " + o.responseText.substr(0, 100) + ", " + idx);
+                    
+                        if (this.onProgress) {
+                            this.onProgress.call(this.scope, {
+                                        name: name,
+                                        scriptText: o.responseText,
+                                        xhrResponse: o,
+                                        data: this.data
+                                    });
+                        }
+
+                        // only generate the sandbox once everything is loaded
+                        this._loadCount++;
+
+                        if (this._loadCount >= this._stopCount) {
+
+                            // the variable to find
+                            var v = this.varName || "YAHOO";
+
+                            // wrap the contents of the requested modules in an anonymous function
+                            var t = "(function() {\n";
+                        
+                            // return the locally scoped reference.
+                            var b = "\nreturn " + v + ";\n})();";
+
+                            var ref = eval(t + this._scriptText.join("\n") + b);
+
+                            this._pushEvents(ref);
+
+                            if (ref) {
+                                this.onSuccess.call(this.scope, {
+                                        reference: ref,
+                                        data: this.data
+                                    });
+                            } else {
+                                this.onFailure.call(this.scope, {
+                                        msg: this.varName + " reference failure",
+                                        data: this.data
+                                    });
+                            }
+                        }
+                    },
+
+                    failure: function(o) {
+                        this.onFailure.call(this.scope, {
+                                msg: "XHR failure",
+                                xhrResponse: o,
+                                data: this.data
+                            });
+                    },
+
+                    scope: this,
+
+                    // module index, module name, sandbox name
+                    argument: [i, url, s[i]]
+
+                };
+
+                this._xhr.push(util.Connect.asyncRequest('GET', url, xhrData));
+            }
         },
 
         /**
@@ -1216,37 +2968,45 @@
          */
         loadNext: function(mname) {
 
-            // console.log("loadNext executing, just loaded " + mname);
-
-            // The global handler that is called when each module is loaded
-            // will pass that module name to this function.  Storing this
-            // data to avoid loading the same module multiple times
-            if (mname) {
-                this.inserted[mname] = true;
-                //var o = this.getProvides(mname);
-                //this.inserted = YUI.ObjectUtil.merge(this.inserted, o);
-            }
-
             // It is possible that this function is executed due to something
             // else one the page loading a YUI module.  Only react when we
             // are actively loading something
-            if (!this.loading) {
+            if (!this._loading) {
                 return;
             }
 
-            // if the module that was just loaded isn't what we were expecting,
-            // continue to wait
-            if (mname && mname !== this.loading) {
-                return;
+            if (mname) {
+
+                // if the module that was just loaded isn't what we were expecting,
+                // continue to wait
+                if (mname !== this._loading) {
+                    return;
+                }
+
+                // YAHOO.log("loadNext executing, just loaded " + mname);
+
+                // The global handler that is called when each module is loaded
+                // will pass that module name to this function.  Storing this
+                // data to avoid loading the same module multiple times
+                this.inserted[mname] = true;
+
+                if (this.onProgress) {
+                    this.onProgress.call(this.scope, {
+                            name: mname,
+                            data: this.data
+                        });
+                }
+                //var o = this.getProvides(mname);
+                //this.inserted = lang.merge(this.inserted, o);
             }
-            
-            var s=this.sorted, len=s.length, i, m, url;
 
+            var s=this.sorted, len=s.length, i, m;
+
             for (i=0; i<len; i=i+1) {
 
                 // This.inserted keeps track of what the loader has loaded
                 if (s[i] in this.inserted) {
-                    // console.log(s[i] + " alread loaded ");
+                    // YAHOO.log(s[i] + " alread loaded ");
                     continue;
                 }
 
@@ -1254,67 +3014,67 @@
                 // from YAHOO, loadNext may be called multiple times for
                 // the same module when loading a rollup.  We can safely
                 // skip the subsequent requests
-                if (s[i] === this.loading) {
-                    // console.log("still loading " + s[i] + ", waiting");
+                if (s[i] === this._loading) {
+                    // YAHOO.log("still loading " + s[i] + ", waiting");
                     return;
                 }
 
                 // log("inserting " + s[i]);
-
                 m = this.moduleInfo[s[i]];
 
+                if (!m) {
+                    this.onFailure.call(this.scope, {
+                            msg: "undefined module " + m,
+                            data: this.data
+                        });
+                    return;
+                }
+
                 // The load type is stored to offer the possibility to load
                 // the css separately from the script.
                 if (!this.loadType || this.loadType === m.type) {
-                    this.loading = s[i];
+                    this._loading = s[i];
+                    //YAHOO.log("attempting to load " + s[i] + ", " + this.base);
 
-                    // Insert the css node and continue.  It is possible
-                    // that the css file will load out of order ... this
-                    // may be a problem that needs to be addressed, but
-                    // unlike the script files, there is no notification
-                    // mechanism in place for the css files.
-                    if (m.type === "css") {
+                    var fn=(m.type === "css") ? util.Get.css : util.Get.script,
+                        url=m.fullpath || this._url(m.path), self=this, 
+                        c=function(o) {
+                            self.loadNext(o.data);
+                        };
 
-                        url = m.fullpath || this._url(m.path);
-                        
-                        this.insertCss(url);
-                        this.inserted[s[i]] = true;
+                    // safari 2.x or lower, script, and part of YUI
+                    if (env.ua.webkit && env.ua.webkit < 420 && m.type === "js" && 
+                          !m.varName) {
+                          //YUI.info.moduleInfo[s[i]]) {
+                          //YAHOO.log("using YAHOO env " + s[i] + ", " + m.varName);
+                        c = null;
+                        this._useYahooListener = true;
+                    }
 
-                    // Scripts must be loaded in order, so we wait for the
-                    // notification from YAHOO or a verifier function to 
-                    // process the next script
-                    } else {
+                    fn(url, {
+                        data: s[i],
+                        onSuccess: c,
+                        varName: m.varName,
+                        scope: self 
+                    });
 
-                        url = m.fullpath || this._url(m.path);
-                        this.insertScript(url);
-
-                        // if a verifier was included for this module, execute
-                        // it, passing the name of the module, and a callback
-                        // that must be exectued when the verifier is done.
-                        if (m.verifier) {
-                            var self = this, name=s[i];
-                            m.verifier(name, function() {
-                                    self.loadNext(name);
-                                });
-                        }
-
-                        return;
-                    }
+                    return;
                 }
             }
 
             // we are finished
-            this.loading = null;
+            this._loading = null;
 
-
             // internal callback for loading css first
             if (this._internalCallback) {
                 var f = this._internalCallback;
                 this._internalCallback = null;
-                f(this);
-            } else if (this.onLoadComplete) {
+                f.call(this);
+            } else if (this.onSuccess) {
                 this._pushEvents();
-                this.onLoadComplete(this);
+                this.onSuccess.call(this.scope, {
+                        data: this.data
+                    });
             }
 
         },
@@ -1323,11 +3083,13 @@
          * In IE, the onAvailable/onDOMReady events need help when Event is
          * loaded dynamically
          * @method _pushEvents
+         * @param {Function} optional function reference
          * @private
          */
-        _pushEvents: function() {
-            if (typeof YAHOO !== "undefined" && YAHOO.util && YAHOO.util.Event) {
-                YAHOO.util.Event._load();
+        _pushEvents: function(ref) {
+            var r = ref || YAHOO;
+            if (r.util && r.util.Event) {
+                r.util.Event._load();
             }
         },
 
@@ -1352,58 +3114,8 @@
             // console.log(u);
 
             return u;
-        },
+        }
 
-        /**
-         * Inserts a script node
-         * @method insertScript
-         * @param url {string} the full url for the script
-         * @param win {Window} optional window to target
-         */
-        insertScript: function(url, win) {
-
-            //console.log("inserting script " + url);
-            var w = win || window, d=w.document, n=d.createElement("script"),
-                h = d.getElementsByTagName("head")[0];
-
-            n.src = url;
-            n.type = "text/javascript";
-            h.appendChild(n);
-        },
-
-        /**
-         * Inserts a css link node
-         * @method insertCss
-         * @param url {string} the full url for the script
-         * @param win {Window} optional window to target
-         */
-        insertCss: function(url, win) {
-            // console.log("inserting css " + url);
-            var w = win || window, d=w.document, n=d.createElement("link"),
-                h = d.getElementsByTagName("head")[0];
-
-            n.href = url;
-            n.type = "text/css";
-            n.rel = "stylesheet";
-            h.appendChild(n);
-        },
-       
-        /*
-         * Interns the script for the requested modules.  The callback is
-         * provided a reference to the sandboxed YAHOO object.  This only
-         * applies to the script: css can not be sandboxed.  Not implemented.
-         * @method sandbox
-         * @param callback {Function} the callback to exectued when the load is
-         *        complete.
-         * @notimplemented
-         */
-        sandbox: function(callback) {
-            // this.calculate({
-                         //sandbox: true
-                     //});
-        }
     };
 
-    YUI.init();
-
 })();

Modified: trunk/root/static/yui/yuitest/README
===================================================================
--- trunk/root/static/yui/yuitest/README	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/yuitest/README	2007-12-20 10:16:27 UTC (rev 700)
@@ -1,8 +1,17 @@
 YUI Library - YUITest - Release Notes
 
+2.3.0
+
+  * Beta release
+
 2.3.1
-  * No Change
 
-2.3.0
+  * No changes
 
-  * Beta release
+2.4.0
+
+  * Changed test running from synchronous to asynchronous.
+  * Added wait() and resume() methods to TestRunner to allow testing of asynchronous features.
+
+2.4.1
+No change

Modified: trunk/root/static/yui/yuitest/assets/skins/sam/yuitest-skin.css
===================================================================
--- trunk/root/static/yui/yuitest/assets/skins/sam/yuitest-skin.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/yuitest/assets/skins/sam/yuitest-skin.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 

Modified: trunk/root/static/yui/yuitest/assets/skins/sam/yuitest.css
===================================================================
--- trunk/root/static/yui/yuitest/assets/skins/sam/yuitest.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/yuitest/assets/skins/sam/yuitest.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 

Modified: trunk/root/static/yui/yuitest/assets/testlogger.css
===================================================================
--- trunk/root/static/yui/yuitest/assets/testlogger.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/yuitest/assets/testlogger.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,7 +2,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 .yui-log {padding-top:3em;}
 /*

Modified: trunk/root/static/yui/yuitest/assets/yuitest-core.css
===================================================================
--- trunk/root/static/yui/yuitest/assets/yuitest-core.css	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/yuitest/assets/yuitest-core.css	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,6 +2,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 

Modified: trunk/root/static/yui/yuitest/yuitest-beta-debug.js
===================================================================
--- trunk/root/static/yui/yuitest/yuitest-beta-debug.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/yuitest/yuitest-beta-debug.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,192 +2,203 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 YAHOO.namespace("tool");
 
 //-----------------------------------------------------------------------------
-// TestLogger object
+// TestCase object
 //-----------------------------------------------------------------------------
 
 /**
- * Displays test execution progress and results, providing filters based on
- * different key events.
+ * Test case containing various tests to run.
+ * @param template An object containing any number of test methods, other methods,
+ *                 an optional name, and anything else the test case needs.
+ * @class TestCase
  * @namespace YAHOO.tool
- * @class TestLogger
  * @constructor
- * @param {HTMLElement} element (Optional) The element to create the logger in.
- * @param {Object} config (Optional) Configuration options for the logger.
  */
-YAHOO.tool.TestLogger = function (element, config) {
-    YAHOO.tool.TestLogger.superclass.constructor.call(this, element, config);
-    this.init();
+YAHOO.tool.TestCase = function (template /*:Object*/) {
+    
+    /**
+     * Special rules for the test case. Possible subobjects
+     * are fail, for tests that should fail, and error, for
+     * tests that should throw an error.
+     */
+    this._should /*:Object*/ = {};
+    
+    //copy over all properties from the template to this object
+    for (var prop in template) {
+        this[prop] = template[prop];
+    }    
+    
+    //check for a valid name
+    if (!YAHOO.lang.isString(this.name)){
+        /**
+         * Name for the test case.
+         */
+        this.name /*:String*/ = YAHOO.util.Dom.generateId(null, "testCase");
+    }
+
 };
 
-YAHOO.lang.extend(YAHOO.tool.TestLogger, YAHOO.widget.LogReader, {
 
-    footerEnabled : true,
-    newestOnTop : false,
+YAHOO.tool.TestCase.prototype = {  
 
     /**
-     * Formats message string to HTML for output to console.
-     * @private
-     * @method formatMsg
-     * @param oLogMsg {Object} Log message object.
-     * @return {String} HTML-formatted message for output to console.
+     * Resumes a paused test and runs the given function.
+     * @param {Function} segment (Optional) The function to run.
+     *      If omitted, the test automatically passes.
+     * @return {Void}
+     * @method resume
      */
-    formatMsg : function(message /*:Object*/) {
-    
-        var category /*:String*/ = message.category;        
-        var text /*:String*/ = this.html2Text(message.msg);
-        
-        return "<pre><p><span class=\"" + category + "\">" + category.toUpperCase() + "</span> " + text + "</p></pre>";
-    
+    resume : function (segment /*:Function*/) /*:Void*/ {
+        YAHOO.tool.TestRunner.resume(segment);
     },
-    
+
+    /**
+     * Causes the test case to wait a specified amount of time and then
+     * continue executing the given code.
+     * @param {Function} segment (Optional) The function to run after the delay.
+     *      If omitted, the TestRunner will wait until resume() is called.
+     * @param {int} delay (Optional) The number of milliseconds to wait before running
+     *      the function. If omitted, defaults to zero.
+     * @return {Void}
+     * @method wait
+     */
+    wait : function (segment /*:Function*/, delay /*:int*/) /*:Void*/{
+        throw new YAHOO.tool.TestCase.Wait(segment, delay);
+    },
+
     //-------------------------------------------------------------------------
-    // Private Methods
+    // Stub Methods
     //-------------------------------------------------------------------------
-    
-    /*
-     * Initializes the logger.
-     * @private
+
+    /**
+     * Function to run before each test is executed.
+     * @return {Void}
+     * @method setUp
      */
-    init : function () {
-    
-        //attach to any available TestRunner
-        if (YAHOO.tool.TestRunner){
-            this.setTestRunner(YAHOO.tool.TestRunner);
-        }
-        
-        //hide useless sources
-        this.hideSource("global");
-        this.hideSource("LogReader");
-        
-        //hide useless message categories
-        this.hideCategory("warn");
-        this.hideCategory("window");
-        this.hideCategory("time");
-        
-        //reset the logger
-        this.clearConsole();
+    setUp : function () /*:Void*/ {
     },
     
     /**
-     * Clears the reference to the TestRunner from previous operations. This 
-     * unsubscribes all events and removes the object reference.
+     * Function to run after each test is executed.
      * @return {Void}
-     * @static
+     * @method tearDown
      */
-    clearTestRunner : function () /*:Void*/ {
-        if (this._runner){
-            this._runner.unsubscribeAll();
-            this._runner = null;
-        }
-    },
+    tearDown: function () /*:Void*/ {    
+    }
+};
+
+/**
+ * Represents a stoppage in test execution to wait for an amount of time before
+ * continuing.
+ * @param {Function} segment A function to run when the wait is over.
+ * @param {int} delay The number of milliseconds to wait before running the code.
+ * @class Wait
+ * @namespace YAHOO.tool.TestCase
+ * @constructor
+ *
+ */
+YAHOO.tool.TestCase.Wait = function (segment /*:Function*/, delay /*:int*/) {
     
     /**
-     * Sets the source test runner that the logger should monitor.
-     * @param {YAHOO.tool.TestRunner} testRunner The TestRunner to observe.
+     * The segment of code to run when the wait is over.
+     * @type Function
+     * @property segment
+     */
+    this.segment /*:Function*/ = (YAHOO.lang.isFunction(segment) ? segment : null);
+
+    /**
+     * The delay before running the segment of code.
+     * @type int
+     * @property delay
+     */
+    this.delay /*:int*/ = (YAHOO.lang.isNumber(delay) ? delay : 0);
+
+};
+
+YAHOO.namespace("tool");
+
+
+//-----------------------------------------------------------------------------
+// TestSuite object
+//-----------------------------------------------------------------------------
+
+/**
+ * A test suite that can contain a collection of TestCase and TestSuite objects.
+ * @param {String||Object} data The name of the test suite or an object containing
+ *      a name property as well as setUp and tearDown methods.
+ * @namespace YAHOO.tool
+ * @class TestSuite
+ * @constructor
+ */
+YAHOO.tool.TestSuite = function (data /*:String||Object*/) {
+
+    /**
+     * The name of the test suite.
+     * @type String
+     * @property name
+     */
+    this.name /*:String*/ = "";
+
+    /**
+     * Array of test suites and
+     * @private
+     */
+    this.items /*:Array*/ = [];
+
+    //initialize the properties
+    if (YAHOO.lang.isString(data)){
+        this.name = data;
+    } else if (YAHOO.lang.isObject(data)){
+        YAHOO.lang.augmentObject(this, data, true);
+    }
+
+    //double-check name
+    if (this.name === ""){
+        this.name = YAHOO.util.Dom.generateId(null, "testSuite");
+    }
+
+};
+
+YAHOO.tool.TestSuite.prototype = {
+    
+    /**
+     * Adds a test suite or test case to the test suite.
+     * @param {YAHOO.tool.TestSuite||YAHOO.tool.TestCase} testObject The test suite or test case to add.
      * @return {Void}
-     * @static
+     * @method add
      */
-    setTestRunner : function (testRunner /*:YAHOO.tool.TestRunner*/) /*:Void*/ {
-    
-        if (this._runner){
-            this.clearTestRunner();
+    add : function (testObject /*:YAHOO.tool.TestSuite*/) /*:Void*/ {
+        if (testObject instanceof YAHOO.tool.TestSuite || testObject instanceof YAHOO.tool.TestCase) {
+            this.items.push(testObject);
         }
-        
-        this._runner = testRunner;
-        
-        //setup event _handlers
-        testRunner.subscribe(testRunner.TEST_PASS_EVENT, this._handleTestRunnerEvent, this, true);
-        testRunner.subscribe(testRunner.TEST_FAIL_EVENT, this._handleTestRunnerEvent, this, true);
-        testRunner.subscribe(testRunner.TEST_IGNORE_EVENT, this._handleTestRunnerEvent, this, true);
-        testRunner.subscribe(testRunner.BEGIN_EVENT, this._handleTestRunnerEvent, this, true);
-        testRunner.subscribe(testRunner.COMPLETE_EVENT, this._handleTestRunnerEvent, this, true);
-        testRunner.subscribe(testRunner.TEST_SUITE_BEGIN_EVENT, this._handleTestRunnerEvent, this, true);
-        testRunner.subscribe(testRunner.TEST_SUITE_COMPLETE_EVENT, this._handleTestRunnerEvent, this, true);
-        testRunner.subscribe(testRunner.TEST_CASE_BEGIN_EVENT, this._handleTestRunnerEvent, this, true);
-        testRunner.subscribe(testRunner.TEST_CASE_COMPLETE_EVENT, this._handleTestRunnerEvent, this, true);    
     },
     
     //-------------------------------------------------------------------------
-    // Event Handlers
+    // Stub Methods
     //-------------------------------------------------------------------------
+
+    /**
+     * Function to run before each test is executed.
+     * @return {Void}
+     * @method setUp
+     */
+    setUp : function () /*:Void*/ {
+    },
     
     /**
-     * Handles all TestRunner events, outputting appropriate data into the console.
-     * @param {Object} data The event data object.
+     * Function to run after each test is executed.
      * @return {Void}
-     * @private
+     * @method tearDown
      */
-    _handleTestRunnerEvent : function (data /*:Object*/) /*:Void*/ {
-    
-        //shortcut variables
-        var TestRunner /*:Object*/ = YAHOO.tool.TestRunner;
-    
-        //data variables
-        var message /*:String*/ = "";
-        var messageType /*:String*/ = "";
-        
-        switch(data.type){
-            case TestRunner.BEGIN_EVENT:
-                message = "Testing began at " + (new Date()).toString() + ".";
-                messageType = "info";
-                break;
-                
-            case TestRunner.COMPLETE_EVENT:
-                message = "Testing completed at " + (new Date()).toString() + ".\nPassed:" 
-                    + data.results.passed + " Failed:" + data.results.failed + " Total:" + data.results.total;
-                messageType = "info";
-                break;
-                
-            case TestRunner.TEST_FAIL_EVENT:
-                message = data.testName + ": " + data.error.getMessage();
-                messageType = "fail";
-                break;
-                
-            case TestRunner.TEST_IGNORE_EVENT:
-                message = data.testName + ": ignored.";
-                messageType = "ignore";
-                break;
-                
-            case TestRunner.TEST_PASS_EVENT:
-                message = data.testName + ": passed.";
-                messageType = "pass";
-                break;
-                
-            case TestRunner.TEST_SUITE_BEGIN_EVENT:
-                message = "Test suite \"" + data.testSuite.name + "\" started.";
-                messageType = "info";
-                break;
-                
-            case TestRunner.TEST_SUITE_COMPLETE_EVENT:
-                message = "Test suite \"" + data.testSuite.name + "\" completed.\nPassed:" 
-                    + data.results.passed + " Failed:" + data.results.failed + " Total:" + data.results.total;
-                messageType = "info";
-                break;
-                
-            case TestRunner.TEST_CASE_BEGIN_EVENT:
-                message = "Test case \"" + data.testCase.name + "\" started.";
-                messageType = "info";
-                break;
-                
-            case TestRunner.TEST_CASE_COMPLETE_EVENT:
-                message = "Test case \"" + data.testCase.name + "\" completed.\nPassed:" 
-                    + data.results.passed + " Failed:" + data.results.failed + " Total:" + data.results.total;
-                messageType = "info";
-                break;
-            default:
-                message = "Unexpected event " + data.type;
-                message = "info";
-        }
-    
-        YAHOO.log(message, messageType, "TestRunner");    
+    tearDown: function () /*:Void*/ {
     }
     
-});
+};
+
 YAHOO.namespace("tool");
 
 /**
@@ -211,18 +222,114 @@
  */
 YAHOO.tool.TestRunner = (function(){
 
+    /**
+     * A node in the test tree structure. May represent a TestSuite, TestCase, or
+     * test function.
+     * @param {Variant} testObject A TestSuite, TestCase, or the name of a test function.
+     * @class TestNode
+     * @constructor
+     * @private
+     */
+    function TestNode(testObject /*:Variant*/){
+    
+        /**
+         * The TestSuite, TestCase, or test function represented by this node.
+         * @type Variant
+         * @property testObject
+         */
+        this.testObject = testObject;
+        
+        /**
+         * Pointer to this node's first child.
+         * @type TestNode
+         * @property firstChild
+         */        
+        this.firstChild /*:TestNode*/ = null;
+        
+        /**
+         * Pointer to this node's last child.
+         * @type TestNode
+         * @property lastChild
+         */        
+        this.lastChild = null;
+        
+        /**
+         * Pointer to this node's parent.
+         * @type TestNode
+         * @property parent
+         */        
+        this.parent = null; 
+   
+        /**
+         * Pointer to this node's next sibling.
+         * @type TestNode
+         * @property next
+         */        
+        this.next = null;
+        
+        /**
+         * Test results for this test object.
+         * @type object
+         * @property results
+         */                
+        this.results /*:Object*/ = {
+            passed : 0,
+            failed : 0,
+            total : 0
+        };
+       
+    }
+    
+    TestNode.prototype = {
+    
+        /**
+         * Appends a new test object (TestSuite, TestCase, or test function name) as a child
+         * of this node.
+         * @param {Variant} testObject A TestSuite, TestCase, or the name of a test function.
+         * @return {Void}
+         */
+        appendChild : function (testObject /*:Variant*/) /*:Void*/{
+            var node = new TestNode(testObject);
+            if (this.firstChild === null){
+                this.firstChild = this.lastChild = node;
+            } else {
+                this.lastChild.next = node;
+                this.lastChild = node;
+            }
+            node.parent = this;
+            return node;
+        }       
+    };
+
     function TestRunner(){
     
         //inherit from EventProvider
         TestRunner.superclass.constructor.apply(this,arguments);
         
         /**
-         * The test objects to run.
-         * @type Array
+         * Suite on which to attach all TestSuites and TestCases to be run.
+         * @type YAHOO.tool.TestSuite
+         * @property masterSuite
          * @private
          */
-        this.items /*:Array*/ = [];
+        this.masterSuite /*:YAHOO.tool.TestSuite*/ = new YAHOO.tool.TestSuite("MasterSuite");        
+
+        /**
+         * Pointer to the current node in the test tree.
+         * @type TestNode
+         * @private
+         * @property _cur
+         */
+        this._cur = null;
         
+        /**
+         * Pointer to the root node in the test tree.
+         * @type TestNode
+         * @private
+         * @property _root
+         */
+        this._root = null;
+        
         //create events
         var events /*:Array*/ = [
             this.TEST_CASE_BEGIN_EVENT,
@@ -237,8 +344,7 @@
         ];
         for (var i=0; i < events.length; i++){
             this.createEvent(events[i], { scope: this });
-        }
-       
+        }       
    
     }
     
@@ -304,213 +410,341 @@
          * @event begin
          */        
         BEGIN_EVENT /*:String*/ : "begin",    
-    
+        
         //-------------------------------------------------------------------------
-        // Private Methods
+        // Test Tree-Related Methods
         //-------------------------------------------------------------------------
+
+        /**
+         * Adds a test case to the test tree as a child of the specified node.
+         * @param {TestNode} parentNode The node to add the test case to as a child.
+         * @param {YAHOO.tool.TestCase} testCase The test case to add.
+         * @return {Void}
+         * @static
+         * @private
+         * @method _addTestCaseToTestTree
+         */
+       _addTestCaseToTestTree : function (parentNode /*:TestNode*/, testCase /*:YAHOO.tool.TestCase*/) /*:Void*/{
+            
+            //add the test suite
+            var node = parentNode.appendChild(testCase);
+            
+            //iterate over the items in the test case
+            for (var prop in testCase){
+                if (prop.indexOf("test") === 0 && YAHOO.lang.isFunction(testCase[prop])){
+                    node.appendChild(prop);
+                }
+            }
          
+        },
+        
         /**
-         * Runs a given test case.
-         * @param {YAHOO.tool.TestCase} testCase The test case to run.
-         * @return {Object} Results of the execution with properties passed, failed, and total.
-         * @method _runTestCase
+         * Adds a test suite to the test tree as a child of the specified node.
+         * @param {TestNode} parentNode The node to add the test suite to as a child.
+         * @param {YAHOO.tool.TestSuite} testSuite The test suite to add.
+         * @return {Void}
+         * @static
          * @private
+         * @method _addTestSuiteToTestTree
+         */
+        _addTestSuiteToTestTree : function (parentNode /*:TestNode*/, testSuite /*:YAHOO.tool.TestSuite*/) /*:Void*/ {
+            
+            //add the test suite
+            var node = parentNode.appendChild(testSuite);
+            
+            //iterate over the items in the master suite
+            for (var i=0; i < testSuite.items.length; i++){
+                if (testSuite.items[i] instanceof YAHOO.tool.TestSuite) {
+                    this._addTestSuiteToTestTree(node, testSuite.items[i]);
+                } else if (testSuite.items[i] instanceof YAHOO.tool.TestCase) {
+                    this._addTestCaseToTestTree(node, testSuite.items[i]);
+                }                   
+            }            
+        },
+        
+        /**
+         * Builds the test tree based on items in the master suite. The tree is a hierarchical
+         * representation of the test suites, test cases, and test functions. The resulting tree
+         * is stored in _root and the pointer _cur is set to the root initially.
+         * @return {Void}
          * @static
+         * @private
+         * @method _buildTestTree
          */
-        _runTestCase : function (testCase /*YAHOO.tool.TestCase*/) /*:Void*/{
+        _buildTestTree : function () /*:Void*/ {
         
-            //object to store results
-            var results /*:Object*/ = {};
+            this._root = new TestNode(this.masterSuite);
+            this._cur = this._root;
+            
+            //iterate over the items in the master suite
+            for (var i=0; i < this.masterSuite.items.length; i++){
+                if (this.masterSuite.items[i] instanceof YAHOO.tool.TestSuite) {
+                    this._addTestSuiteToTestTree(this._root, this.masterSuite.items[i]);
+                } else if (this.masterSuite.items[i] instanceof YAHOO.tool.TestCase) {
+                    this._addTestCaseToTestTree(this._root, this.masterSuite.items[i]);
+                }                   
+            }            
         
-            //test case begins
-            this.fireEvent(this.TEST_CASE_BEGIN_EVENT, { testCase: testCase });
+        }, 
+    
+        //-------------------------------------------------------------------------
+        // Private Methods
+        //-------------------------------------------------------------------------
+        _handleTestObjectComplete : function (node /*:TestNode*/) /*:Void*/ {
+            if (YAHOO.lang.isObject(node.testObject)){
+                node.parent.results.passed += node.results.passed;
+                node.parent.results.failed += node.results.failed;
+                node.parent.results.total += node.results.total;                
+                node.parent.results[node.testObject.name] = node.results;
+            
+                if (node.testObject instanceof YAHOO.tool.TestSuite){
+                    node.testObject.tearDown();
+                    this.fireEvent(this.TEST_SUITE_COMPLETE_EVENT, { testSuite: node.testObject, results: node.results});
+                } else if (node.testObject instanceof YAHOO.tool.TestCase){
+                    this.fireEvent(this.TEST_CASE_COMPLETE_EVENT, { testCase: node.testObject, results: node.results});
+                }      
+            } 
+        },        
         
-            //gather the test functions
-            var tests /*:Array*/ = [];
-            for (var prop in testCase){
-                if (prop.indexOf("test") === 0 && typeof testCase[prop] == "function") {
-                    tests.push(prop);
+        
+        //-------------------------------------------------------------------------
+        // Navigation Methods
+        //-------------------------------------------------------------------------
+        
+        /**
+         * Retrieves the next node in the test tree.
+         * @return {TestNode} The next node in the test tree or null if the end is reached.
+         * @private
+         * @static
+         * @method _next
+         */
+        _next : function () /*:TestNode*/ {
+        
+            if (this._cur.firstChild) {
+                this._cur = this._cur.firstChild;
+            } else if (this._cur.next) {
+                this._cur = this._cur.next;            
+            } else {
+                while (this._cur && !this._cur.next && this._cur !== this._root){
+                    this._handleTestObjectComplete(this._cur);
+                    this._cur = this._cur.parent;
                 }
+                
+                if (this._cur == this._root){
+                    this.fireEvent(this.COMPLETE_EVENT, { results: this._cur.results});
+                    this._cur = null;
+                } else {
+                    this._handleTestObjectComplete(this._cur);               
+                    this._cur = this._cur.next;                
+                }
             }
+        
+            return this._cur;
+        },
+        
+        /**
+         * Runs a test case or test suite, returning the results.
+         * @param {YAHOO.tool.TestCase|YAHOO.tool.TestSuite} testObject The test case or test suite to run.
+         * @return {Object} Results of the execution with properties passed, failed, and total.
+         * @private
+         * @method _run
+         * @static
+         */
+        _run : function () /*:Void*/ {
+        
+            //flag to indicate if the TestRunner should wait before continuing
+            var shouldWait /*:Boolean*/ = false;
             
-            //get the "should" test cases
-            var shouldFail /*:Object*/ = testCase._should.fail || {};
-            var shouldError /*:Object*/ = testCase._should.error || {};
-            var shouldIgnore /*:Object*/ = testCase._should.ignore || {};
+            //get the next test node
+            var node = this._next();
             
-            //test counts
-            var failCount /*:int*/ = 0;
-            var passCount /*:int*/ = 0;
-            var runCount /*:int*/ = 0;
-            
-            //run each test
-            for (var i=0; i < tests.length; i++){
-            
-                //figure out if the test should be ignored or not
-                if (shouldIgnore[tests[i]]){
-                    this.fireEvent(this.TEST_IGNORE_EVENT, { testCase: testCase, testName: tests[i] });
-                    continue;
+            if (node !== null) {
+                var testObject = node.testObject;
+                
+                //figure out what to do
+                if (YAHOO.lang.isObject(testObject)){
+                    if (testObject instanceof YAHOO.tool.TestSuite){
+                        this.fireEvent(this.TEST_SUITE_BEGIN_EVENT, { testSuite: testObject });
+                        testObject.setUp();
+                    } else if (testObject instanceof YAHOO.tool.TestCase){
+                        this.fireEvent(this.TEST_CASE_BEGIN_EVENT, { testCase: testObject });
+                    }
+                    
+                    //some environments don't support setTimeout
+                    if (typeof setTimeout != "undefined"){                    
+                        setTimeout(function(){
+                            YAHOO.tool.TestRunner._run();
+                        }, 0);              
+                    } else {
+                        this._run();
+                    }
+                } else {
+                    this._runTest(node);
                 }
+
+            }
+        },
+        
+        _resumeTest : function (segment /*:Function*/) /*:Void*/ {
+        
+            //get relevant information
+            var node /*:TestNode*/ = this._cur;
+            var testName /*:String*/ = node.testObject;
+            var testCase /*:YAHOO.tool.TestCase*/ = node.parent.testObject;
             
-                //variable to hold whether or not the test failed
-                var failed /*:Boolean*/ = false;
-                var error /*:Error*/ = null;
+            //get the "should" test cases
+            var shouldFail /*:Object*/ = (testCase._should.fail || {})[testName];
+            var shouldError /*:Object*/ = (testCase._should.error || {})[testName];
             
-                //run the setup
-                testCase.setUp();
+            //variable to hold whether or not the test failed
+            var failed /*:Boolean*/ = false;
+            var error /*:Error*/ = null;
                 
-                //try the test
-                try {
+            //try the test
+            try {
+            
+                //run the test
+                segment.apply(testCase);
                 
-                    //run the test
-                    testCase[tests[i]]();
-                    
-                    //if it should fail, and it got here, then it's a fail because it didn't
-                    if (shouldFail[tests[i]]){
-                        error = new YAHOO.util.ShouldFail();
+                //if it should fail, and it got here, then it's a fail because it didn't
+                if (shouldFail){
+                    error = new YAHOO.util.ShouldFail();
+                    failed = true;
+                } else if (shouldError){
+                    error = new YAHOO.util.ShouldError();
+                    failed = true;
+                }
+                           
+            } catch (thrown /*:Error*/){
+                if (thrown instanceof YAHOO.util.AssertionError) {
+                    if (!shouldFail){
+                        error = thrown;
                         failed = true;
-                    } else if (shouldError[tests[i]]){
-                        error = new YAHOO.util.ShouldError();
-                        failed = true;
                     }
-                               
-                } catch (thrown /*:Error*/){
-                    if (thrown instanceof YAHOO.util.AssertionError) {
-                        if (!shouldFail[tests[i]]){
-                            error = thrown;
-                            failed = true;
+                } else if (thrown instanceof YAHOO.tool.TestCase.Wait){
+                
+                    if (YAHOO.lang.isFunction(thrown.segment)){
+                        if (YAHOO.lang.isNumber(thrown.delay)){
+                        
+                            //some environments don't support setTimeout
+                            if (typeof setTimeout != "undefined"){
+                                setTimeout(function(){
+                                    YAHOO.tool.TestRunner._resumeTest(thrown.segment);
+                                }, thrown.delay);
+                            } else {
+                                throw new Error("Asynchronous tests not supported in this environment.");
+                            }
                         }
+                    }
+                    
+                    return;
+                
+                } else {
+                    //first check to see if it should error
+                    if (!shouldError) {                        
+                        error = new YAHOO.util.UnexpectedError(thrown);
+                        failed = true;
                     } else {
-                        //first check to see if it should error
-                        if (!shouldError[tests[i]]) {                        
-                            error = new YAHOO.util.UnexpectedError(thrown);
-                            failed = true;
-                        } else {
-                            //check to see what type of data we have
-                            if (YAHOO.lang.isString(shouldError[tests[i]])){
-                                
-                                //if it's a string, check the error message
-                                if (thrown.message != shouldError[tests[i]]){
-                                    error = new YAHOO.util.UnexpectedError(thrown);
-                                    failed = true;                                    
-                                }
-                            } else if (YAHOO.lang.isObject(shouldError[tests[i]])){
+                        //check to see what type of data we have
+                        if (YAHOO.lang.isString(shouldError)){
                             
-                                //if it's an object, check the instance and message
-                                if (!(thrown instanceof shouldError[tests[i]].constructor) || 
-                                        thrown.message != shouldError[tests[i]].message){
-                                    error = new YAHOO.util.UnexpectedError(thrown);
-                                    failed = true;                                    
-                                }
-                            
+                            //if it's a string, check the error message
+                            if (thrown.message != shouldError){
+                                error = new YAHOO.util.UnexpectedError(thrown);
+                                failed = true;                                    
                             }
+                        } else if (YAHOO.lang.isObject(shouldError)){
                         
+                            //if it's an object, check the instance and message
+                            if (!(thrown instanceof shouldError.constructor) || 
+                                    thrown.message != shouldError.message){
+                                error = new YAHOO.util.UnexpectedError(thrown);
+                                failed = true;                                    
+                            }
+                        
                         }
+                    
                     }
-                    
-                } finally {
-                
-                    //fireEvent appropriate event
-                    if (failed) {
-                        this.fireEvent(this.TEST_FAIL_EVENT, { testCase: testCase, testName: tests[i], error: error });
-                    } else {
-                        this.fireEvent(this.TEST_PASS_EVENT, { testCase: testCase, testName: tests[i] });
-                    }            
                 }
                 
-                //run the tear down
-                testCase.tearDown();
-                
-                //update results
-                results[tests[i]] = { 
-                    result: failed ? "fail" : "pass",
-                    message : error ? error.getMessage() : "Test passed"
-                };
-                
-                //update counts
-                runCount++;
-                failCount += (failed ? 1 : 0);
-                passCount += (failed ? 0 : 1);
             }
             
-            //add test counts to results
-            results.total = runCount;
-            results.failed = failCount;
-            results.passed = passCount;
+            //fireEvent appropriate event
+            if (failed) {
+                this.fireEvent(this.TEST_FAIL_EVENT, { testCase: testCase, testName: testName, error: error });
+            } else {
+                this.fireEvent(this.TEST_PASS_EVENT, { testCase: testCase, testName: testName });
+            }
             
-            //test case is done
-            this.fireEvent(this.TEST_CASE_COMPLETE_EVENT, { testCase: testCase, results: results });
+            //run the tear down
+            testCase.tearDown();
             
-            //return results
-            return results;
+            //update results
+            node.parent.results[testName] = { 
+                result: failed ? "fail" : "pass",
+                message : error ? error.getMessage() : "Test passed"
+            };
+            
+            if (failed){
+                node.parent.results.failed++;
+            } else {
+                node.parent.results.passed++;
+            }
+            node.parent.results.total++;    
+
+            //set timeout not supported in all environments
+            if (typeof setTimeout != "undefined"){
+                setTimeout(function(){
+                    YAHOO.tool.TestRunner._run();
+                }, 0);
+            } else {
+                this._run();
+            }
         
         },
-        
+                
         /**
-         * Runs all the tests in a test suite.
-         * @param {YAHOO.tool.TestSuite} testSuite The test suite to run.
-         * @return {Object} Results of the execution with properties passed, failed, and total.
-         * @method _runTestSuite
+         * Runs a single test based on the data provided in the node.
+         * @param {TestNode} node The TestNode representing the test to run.
+         * @return {Void}
+         * @static
          * @private
-         * @static
+         * @name _runTest
          */
-        _runTestSuite : function (testSuite /*:YAHOO.tool.TestSuite*/) {
+        _runTest : function (node /*:TestNode*/) /*:Void*/ {
         
-            //object to store results
-            var results /*:Object*/ = {
-                passed: 0,
-                failed: 0,
-                total: 0
-            };
-        
-            //fireEvent event for beginning of test suite run
-            this.fireEvent(this.TEST_SUITE_BEGIN_EVENT, { testSuite: testSuite });
-        
-            //iterate over the test suite items
-            for (var i=0; i < testSuite.items.length; i++){
-                var result = null;
-                if (testSuite.items[i] instanceof YAHOO.tool.TestSuite) {
-                    result = this._runTestSuite(testSuite.items[i]);
-                } else if (testSuite.items[i] instanceof YAHOO.tool.TestCase) {
-                    result = this._runTestCase(testSuite.items[i]);
+            //get relevant information
+            var testName /*:String*/ = node.testObject;
+            var testCase /*:YAHOO.tool.TestCase*/ = node.parent.testObject;
+            var test /*:Function*/ = testCase[testName];
+            
+            //get the "should" test cases
+            var shouldIgnore /*:Object*/ = (testCase._should.ignore || {})[testName];
+            
+            //figure out if the test should be ignored or not
+            if (shouldIgnore){
+                this.fireEvent(this.TEST_IGNORE_EVENT, { testCase: testCase, testName: testName });
+                
+                //some environments don't support setTimeout
+                if (typeof setTimeout != "undefined"){                    
+                    setTimeout(function(){
+                        YAHOO.tool.TestRunner._run();
+                    }, 0);              
+                } else {
+                    this._run();
                 }
+
+            } else {
+            
+                //run the setup
+                testCase.setUp();
                 
-                if (result !== null){
-                    results.total += result.total;
-                    results.passed += result.passed;
-                    results.failed += result.failed;
-                    results[testSuite.items[i].name] = result;
-                }
+                //now call the body of the test
+                this._resumeTest(test);                
             }
-    
-            //fireEvent event for completion of test suite run
-            this.fireEvent(this.TEST_SUITE_COMPLETE_EVENT, { testSuite: testSuite, results: results });
-            
-            //return the results
-            return results;
+
+        },        
         
-        },
-        
-        /**
-         * Runs a test case or test suite, returning the results.
-         * @param {YAHOO.tool.TestCase|YAHOO.tool.TestSuite} testObject The test case or test suite to run.
-         * @return {Object} Results of the execution with properties passed, failed, and total.
-         * @private
-         * @method _run
-         * @static
-         */
-        _run : function (testObject /*:YAHOO.tool.TestCase|YAHOO.tool.TestSuite*/) /*:Void*/ {
-            if (YAHOO.lang.isObject(testObject)){
-                if (testObject instanceof YAHOO.tool.TestSuite) {
-                    return this._runTestSuite(testObject);
-                } else if (testObject instanceof YAHOO.tool.TestCase) {
-                    return this._runTestCase(testObject);
-                } else {
-                    throw new TypeError("_run(): Expected either YAHOO.tool.TestCase or YAHOO.tool.TestSuite.");
-                }    
-            }        
-        },
-        
         //-------------------------------------------------------------------------
         // Protected Methods
         //-------------------------------------------------------------------------   
@@ -538,151 +772,62 @@
         /**
          * Adds a test suite or test case to the list of test objects to run.
          * @param testObject Either a TestCase or a TestSuite that should be run.
+         * @return {Void}
+         * @method add
+         * @static
          */
         add : function (testObject /*:Object*/) /*:Void*/ {
-            this.items.push(testObject);
+            this.masterSuite.add(testObject);
         },
         
         /**
          * Removes all test objects from the runner.
+         * @return {Void}
+         * @method clear
+         * @static
          */
         clear : function () /*:Void*/ {
-            while(this.items.length){
-                this.items.pop();
-            }
+            this.masterSuite.items = [];
         },
+        
+        /**
+         * Resumes the TestRunner after wait() was called.
+         * @param {Function} segment The function to run as the rest
+         *      of the haulted test.
+         * @return {Void}
+         * @method resume
+         * @static
+         */
+        resume : function (segment /*:Function*/) /*:Void*/ {
+            this._resumeTest(segment || function(){});
+        },
     
         /**
          * Runs the test suite.
+         * @return {Void}
+         * @method run
+         * @static
          */
-        run : function (testObject /*:Object*/) /*:Void*/ { 
-            var results = null;
+        run : function (testObject /*:Object*/) /*:Void*/ {
             
-            this.fireEvent(this.BEGIN_EVENT);
+            //pointer to runner to avoid scope issues 
+            var runner = YAHOO.tool.TestRunner;
+
+            //build the test tree
+            runner._buildTestTree();
+            
+            //fire the begin event
+            runner.fireEvent(runner.BEGIN_EVENT);
        
-            //an object passed in overrides everything else
-            if (YAHOO.lang.isObject(testObject)){
-                results = this._run(testObject);  
-            } else {
-                results = {
-                    passed: 0,
-                    failed: 0,
-                    total: 0
-                };
-                for (var i=0; i < this.items.length; i++){
-                    var result = this._run(this.items[i]);
-                    results.passed += result.passed;
-                    results.failed += result.failed;
-                    results.total += result.total;
-                    results[this.items[i].name] = result;
-                }            
-            }
-            
-            this.fireEvent(this.COMPLETE_EVENT, { results: results });
+            //begin the testing
+            runner._run();
         }    
     });
     
     return new TestRunner();
     
 })();
-YAHOO.namespace("tool");
 
-
-//-----------------------------------------------------------------------------
-// TestSuite object
-//-----------------------------------------------------------------------------
-
-/**
- * A test suite that can contain a collection of TestCase and TestSuite objects.
- * @param {String} name The name of the test fixture.
- * @namespace YAHOO.tool
- * @class TestSuite
- * @constructor
- */
-YAHOO.tool.TestSuite = function (name /*:String*/) {
-
-    /**
-     * The name of the test suite.
-     */
-    this.name /*:String*/ = name || YAHOO.util.Dom.generateId(null, "testSuite");
-
-    /**
-     * Array of test suites and
-     * @private
-     */
-    this.items /*:Array*/ = [];
-
-};
-
-YAHOO.tool.TestSuite.prototype = {
-    
-    /**
-     * Adds a test suite or test case to the test suite.
-     * @param {YAHOO.tool.TestSuite||YAHOO.tool.TestCase} testObject The test suite or test case to add.
-     */
-    add : function (testObject /*:YAHOO.tool.TestSuite*/) /*:Void*/ {
-        if (testObject instanceof YAHOO.tool.TestSuite || testObject instanceof YAHOO.tool.TestCase) {
-            this.items.push(testObject);
-        }
-    }
-    
-};
-YAHOO.namespace("tool");
-
-//-----------------------------------------------------------------------------
-// TestCase object
-//-----------------------------------------------------------------------------
-
-/**
- * Test case containing various tests to run.
- * @param template An object containing any number of test methods, other methods,
- *                 an optional name, and anything else the test case needs.
- * @class TestCase
- * @namespace YAHOO.tool
- * @constructor
- */
-YAHOO.tool.TestCase = function (template /*:Object*/) {
-    
-    /**
-     * Special rules for the test case. Possible subobjects
-     * are fail, for tests that should fail, and error, for
-     * tests that should throw an error.
-     */
-    this._should /*:Object*/ = {};
-    
-    //copy over all properties from the template to this object
-    for (var prop in template) {
-        this[prop] = template[prop];
-    }    
-    
-    //check for a valid name
-    if (!YAHOO.lang.isString(this.name)){
-        /**
-         * Name for the test case.
-         */
-        this.name /*:String*/ = YAHOO.util.Dom.generateId(null, "testCase");
-    }
-
-};
-
-YAHOO.tool.TestCase.prototype = {  
-
-    //-------------------------------------------------------------------------
-    // Test Methods
-    //-------------------------------------------------------------------------
-
-    /**
-     * Function to run before each test is executed.
-     */
-    setUp : function () /*:Void*/ {
-    },
-    
-    /**
-     * Function to run after each test is executed.
-     */
-    tearDown: function () /*:Void*/ {    
-    }
-};
 YAHOO.namespace("util");
 
 //-----------------------------------------------------------------------------
@@ -1275,6 +1420,7 @@
 
 //inherit methods
 YAHOO.lang.extend(YAHOO.util.UnexpectedError, YAHOO.util.AssertionError);
+
 //-----------------------------------------------------------------------------
 // ArrayAssert object
 //-----------------------------------------------------------------------------
@@ -1603,6 +1749,7 @@
     }
     
 };
+
 YAHOO.namespace("util");
 
 
@@ -1675,6 +1822,7 @@
         }     
     }
 };
+
 //-----------------------------------------------------------------------------
 // DateAssert object
 //-----------------------------------------------------------------------------
@@ -1727,6 +1875,7 @@
     }
     
 };
+
 YAHOO.namespace("util");
 
 /**
@@ -1839,17 +1988,17 @@
         if (!YAHOO.lang.isNumber(charCode)){
             charCode = 0; 
         }
-        
+
+        //try to create a mouse event
+        var customEvent /*:MouseEvent*/ = null;
+            
         //check for DOM-compliant browsers first
         if (YAHOO.lang.isFunction(document.createEvent)){
         
-            //try to create a mouse event
-            var event /*:MouseEvent*/ = null;
-            
             try {
                 
                 //try to create key event
-                event = document.createEvent("KeyEvents");
+                customEvent = document.createEvent("KeyEvents");
                 
                 /*
                  * Interesting problem: Firefox implemented a non-standard
@@ -1860,7 +2009,7 @@
                  * now, assume it's Firefox if the above line doesn't error.
                  */
                 //TODO: Decipher between Firefox's implementation and a correct one.
-                event.initKeyEvent(type, bubbles, cancelable, view, ctrlKey,
+                customEvent.initKeyEvent(type, bubbles, cancelable, view, ctrlKey,
                     altKey, shiftKey, metaKey, keyCode, charCode);       
                 
             } catch (ex /*:Error*/){
@@ -1877,56 +2026,56 @@
                 try {
 
                     //try to create generic event - will fail in Safari 2.x
-                    event = document.createEvent("Events");
+                    customEvent = document.createEvent("Events");
 
                 } catch (uierror /*:Error*/){
 
                     //the above failed, so create a UIEvent for Safari 2.x
-                    event = document.createEvent("UIEvents");
+                    customEvent = document.createEvent("UIEvents");
 
                 } finally {
 
-                    event.initEvent(type, bubbles, cancelable);
+                    customEvent.initEvent(type, bubbles, cancelable);
     
                     //initialize
-                    event.view = view;
-                    event.altKey = altKey;
-                    event.ctrlKey = ctrlKey;
-                    event.shiftKey = shiftKey;
-                    event.metaKey = metaKey;
-                    event.keyCode = keyCode;
-                    event.charCode = charCode;
+                    customEvent.view = view;
+                    customEvent.altKey = altKey;
+                    customEvent.ctrlKey = ctrlKey;
+                    customEvent.shiftKey = shiftKey;
+                    customEvent.metaKey = metaKey;
+                    customEvent.keyCode = keyCode;
+                    customEvent.charCode = charCode;
           
                 }          
              
             }
             
             //fire the event
-            target.dispatchEvent(event);
+            target.dispatchEvent(customEvent);
 
         } else if (YAHOO.lang.isObject(document.createEventObject)){ //IE
         
             //create an IE event object
-            event = document.createEventObject();
+            customEvent = document.createEventObject();
             
             //assign available properties
-            event.bubbles = bubbles;
-            event.cancelable = cancelable;
-            event.view = view;
-            event.ctrlKey = ctrlKey;
-            event.altKey = altKey;
-            event.shiftKey = shiftKey;
-            event.metaKey = metaKey;
+            customEvent.bubbles = bubbles;
+            customEvent.cancelable = cancelable;
+            customEvent.view = view;
+            customEvent.ctrlKey = ctrlKey;
+            customEvent.altKey = altKey;
+            customEvent.shiftKey = shiftKey;
+            customEvent.metaKey = metaKey;
             
             /*
              * IE doesn't support charCode explicitly. CharCode should
              * take precedence over any keyCode value for accurate
              * representation.
              */
-            event.keyCode = (charCode > 0) ? charCode : keyCode;
+            customEvent.keyCode = (charCode > 0) ? charCode : keyCode;
             
             //fire the event
-            target.fireEvent("on" + type, event);  
+            target.fireEvent("on" + type, customEvent);  
                     
         } else {
             throw new Error("simulateKeyEvent(): No event simulation framework present.");
@@ -2058,36 +2207,38 @@
         if (!YAHOO.lang.isNumber(button)){
             button = 0; 
         }
-        
+
+        //try to create a mouse event
+        var customEvent /*:MouseEvent*/ = null;
+            
         //check for DOM-compliant browsers first
         if (YAHOO.lang.isFunction(document.createEvent)){
         
-            //try to create a mouse event
-            var event /*:MouseEvent*/ = document.createEvent("MouseEvents");
-            
+            customEvent = document.createEvent("MouseEvents");
+        
             //Safari 2.x (WebKit 418) still doesn't implement initMouseEvent()
-            if (event.initMouseEvent){
-                event.initMouseEvent(type, bubbles, cancelable, view, detail,
+            if (customEvent.initMouseEvent){
+                customEvent.initMouseEvent(type, bubbles, cancelable, view, detail,
                                      screenX, screenY, clientX, clientY, 
                                      ctrlKey, altKey, shiftKey, metaKey, 
                                      button, relatedTarget);
             } else { //Safari
             
                 //the closest thing available in Safari 2.x is UIEvents
-                event = document.createEvent("UIEvents");
-                event.initEvent(type, bubbles, cancelable);
-                event.view = view;
-                event.detail = detail;
-                event.screenX = screenX;
-                event.screenY = screenY;
-                event.clientX = clientX;
-                event.clientY = clientY;
-                event.ctrlKey = ctrlKey;
-                event.altKey = altKey;
-                event.metaKey = metaKey;
-                event.shiftKey = shiftKey;
-                event.button = button;
-                event.relatedTarget = relatedTarget;
+                customEvent = document.createEvent("UIEvents");
+                customEvent.initEvent(type, bubbles, cancelable);
+                customEvent.view = view;
+                customEvent.detail = detail;
+                customEvent.screenX = screenX;
+                customEvent.screenY = screenY;
+                customEvent.clientX = clientX;
+                customEvent.clientY = clientY;
+                customEvent.ctrlKey = ctrlKey;
+                customEvent.altKey = altKey;
+                customEvent.metaKey = metaKey;
+                customEvent.shiftKey = shiftKey;
+                customEvent.button = button;
+                customEvent.relatedTarget = relatedTarget;
             }
             
             /*
@@ -2099,60 +2250,60 @@
              * for mouseout event and fromElement property for mouseover
              * event.
              */
-            if (relatedTarget && !event.relatedTarget){
+            if (relatedTarget && !customEvent.relatedTarget){
                 if (type == "mouseout"){
-                    event.toElement = relatedTarget;
+                    customEvent.toElement = relatedTarget;
                 } else if (type == "mouseover"){
-                    event.fromElement = relatedTarget;
+                    customEvent.fromElement = relatedTarget;
                 }
             }
             
             //fire the event
-            target.dispatchEvent(event);
+            target.dispatchEvent(customEvent);
 
         } else if (YAHOO.lang.isObject(document.createEventObject)){ //IE
         
             //create an IE event object
-            event = document.createEventObject();
+            customEvent = document.createEventObject();
             
             //assign available properties
-            event.bubbles = bubbles;
-            event.cancelable = cancelable;
-            event.view = view;
-            event.detail = detail;
-            event.screenX = screenX;
-            event.screenY = screenY;
-            event.clientX = clientX;
-            event.clientY = clientY;
-            event.ctrlKey = ctrlKey;
-            event.altKey = altKey;
-            event.metaKey = metaKey;
-            event.shiftKey = shiftKey;
+            customEvent.bubbles = bubbles;
+            customEvent.cancelable = cancelable;
+            customEvent.view = view;
+            customEvent.detail = detail;
+            customEvent.screenX = screenX;
+            customEvent.screenY = screenY;
+            customEvent.clientX = clientX;
+            customEvent.clientY = clientY;
+            customEvent.ctrlKey = ctrlKey;
+            customEvent.altKey = altKey;
+            customEvent.metaKey = metaKey;
+            customEvent.shiftKey = shiftKey;
 
             //fix button property for IE's wacky implementation
             switch(button){
                 case 0:
-                    event.button = 1;
+                    customEvent.button = 1;
                     break;
                 case 1:
-                    event.button = 4;
+                    customEvent.button = 4;
                     break;
                 case 2:
                     //leave as is
                     break;
                 default:
-                    event.button = 0;                    
+                    customEvent.button = 0;                    
             }    
 
             /*
              * Have to use relatedTarget because IE won't allow assignment
              * to toElement or fromElement on generic events. This keeps
-             * YAHOO.util.Event.getRelatedTarget() functional.
+             * YAHOO.util.customEvent.getRelatedTarget() functional.
              */
-            event.relatedTarget = relatedTarget;
+            customEvent.relatedTarget = relatedTarget;
             
             //fire the event
-            target.fireEvent("on" + type, event);
+            target.fireEvent("on" + type, customEvent);
                     
         } else {
             throw new Error("simulateMouseEvent(): No event simulation framework present.");
@@ -2334,6 +2485,7 @@
     
 
 };
+
 YAHOO.namespace("tool");
 
 //-----------------------------------------------------------------------------
@@ -2666,4 +2818,190 @@
 
 YAHOO.lang.augmentObject(YAHOO.tool.TestManager, YAHOO.util.EventProvider.prototype);
 
-YAHOO.register("yuitest", YAHOO.tool.TestRunner, {version: "2.3.1", build: "541"});
+
+YAHOO.namespace("tool");
+
+//-----------------------------------------------------------------------------
+// TestLogger object
+//-----------------------------------------------------------------------------
+
+/**
+ * Displays test execution progress and results, providing filters based on
+ * different key events.
+ * @namespace YAHOO.tool
+ * @class TestLogger
+ * @constructor
+ * @param {HTMLElement} element (Optional) The element to create the logger in.
+ * @param {Object} config (Optional) Configuration options for the logger.
+ */
+YAHOO.tool.TestLogger = function (element, config) {
+    YAHOO.tool.TestLogger.superclass.constructor.call(this, element, config);
+    this.init();
+};
+
+YAHOO.lang.extend(YAHOO.tool.TestLogger, YAHOO.widget.LogReader, {
+
+    footerEnabled : true,
+    newestOnTop : false,
+
+    /**
+     * Formats message string to HTML for output to console.
+     * @private
+     * @method formatMsg
+     * @param oLogMsg {Object} Log message object.
+     * @return {String} HTML-formatted message for output to console.
+     */
+    formatMsg : function(message /*:Object*/) {
+    
+        var category /*:String*/ = message.category;        
+        var text /*:String*/ = this.html2Text(message.msg);
+        
+        return "<pre><p><span class=\"" + category + "\">" + category.toUpperCase() + "</span> " + text + "</p></pre>";
+    
+    },
+    
+    //-------------------------------------------------------------------------
+    // Private Methods
+    //-------------------------------------------------------------------------
+    
+    /*
+     * Initializes the logger.
+     * @private
+     */
+    init : function () {
+    
+        //attach to any available TestRunner
+        if (YAHOO.tool.TestRunner){
+            this.setTestRunner(YAHOO.tool.TestRunner);
+        }
+        
+        //hide useless sources
+        this.hideSource("global");
+        this.hideSource("LogReader");
+        
+        //hide useless message categories
+        this.hideCategory("warn");
+        this.hideCategory("window");
+        this.hideCategory("time");
+        
+        //reset the logger
+        this.clearConsole();
+    },
+    
+    /**
+     * Clears the reference to the TestRunner from previous operations. This 
+     * unsubscribes all events and removes the object reference.
+     * @return {Void}
+     * @static
+     */
+    clearTestRunner : function () /*:Void*/ {
+        if (this._runner){
+            this._runner.unsubscribeAll();
+            this._runner = null;
+        }
+    },
+    
+    /**
+     * Sets the source test runner that the logger should monitor.
+     * @param {YAHOO.tool.TestRunner} testRunner The TestRunner to observe.
+     * @return {Void}
+     * @static
+     */
+    setTestRunner : function (testRunner /*:YAHOO.tool.TestRunner*/) /*:Void*/ {
+    
+        if (this._runner){
+            this.clearTestRunner();
+        }
+        
+        this._runner = testRunner;
+        
+        //setup event _handlers
+        testRunner.subscribe(testRunner.TEST_PASS_EVENT, this._handleTestRunnerEvent, this, true);
+        testRunner.subscribe(testRunner.TEST_FAIL_EVENT, this._handleTestRunnerEvent, this, true);
+        testRunner.subscribe(testRunner.TEST_IGNORE_EVENT, this._handleTestRunnerEvent, this, true);
+        testRunner.subscribe(testRunner.BEGIN_EVENT, this._handleTestRunnerEvent, this, true);
+        testRunner.subscribe(testRunner.COMPLETE_EVENT, this._handleTestRunnerEvent, this, true);
+        testRunner.subscribe(testRunner.TEST_SUITE_BEGIN_EVENT, this._handleTestRunnerEvent, this, true);
+        testRunner.subscribe(testRunner.TEST_SUITE_COMPLETE_EVENT, this._handleTestRunnerEvent, this, true);
+        testRunner.subscribe(testRunner.TEST_CASE_BEGIN_EVENT, this._handleTestRunnerEvent, this, true);
+        testRunner.subscribe(testRunner.TEST_CASE_COMPLETE_EVENT, this._handleTestRunnerEvent, this, true);    
+    },
+    
+    //-------------------------------------------------------------------------
+    // Event Handlers
+    //-------------------------------------------------------------------------
+    
+    /**
+     * Handles all TestRunner events, outputting appropriate data into the console.
+     * @param {Object} data The event data object.
+     * @return {Void}
+     * @private
+     */
+    _handleTestRunnerEvent : function (data /*:Object*/) /*:Void*/ {
+    
+        //shortcut variables
+        var TestRunner /*:Object*/ = YAHOO.tool.TestRunner;
+    
+        //data variables
+        var message /*:String*/ = "";
+        var messageType /*:String*/ = "";
+        
+        switch(data.type){
+            case TestRunner.BEGIN_EVENT:
+                message = "Testing began at " + (new Date()).toString() + ".";
+                messageType = "info";
+                break;
+                
+            case TestRunner.COMPLETE_EVENT:
+                message = "Testing completed at " + (new Date()).toString() + ".\nPassed:" + 
+                    data.results.passed + " Failed:" + data.results.failed + " Total:" + data.results.total;
+                messageType = "info";
+                break;
+                
+            case TestRunner.TEST_FAIL_EVENT:
+                message = data.testName + ": " + data.error.getMessage();
+                messageType = "fail";
+                break;
+                
+            case TestRunner.TEST_IGNORE_EVENT:
+                message = data.testName + ": ignored.";
+                messageType = "ignore";
+                break;
+                
+            case TestRunner.TEST_PASS_EVENT:
+                message = data.testName + ": passed.";
+                messageType = "pass";
+                break;
+                
+            case TestRunner.TEST_SUITE_BEGIN_EVENT:
+                message = "Test suite \"" + data.testSuite.name + "\" started.";
+                messageType = "info";
+                break;
+                
+            case TestRunner.TEST_SUITE_COMPLETE_EVENT:
+                message = "Test suite \"" + data.testSuite.name + "\" completed.\nPassed:" + 
+                    data.results.passed + " Failed:" + data.results.failed + " Total:" + data.results.total;
+                messageType = "info";
+                break;
+                
+            case TestRunner.TEST_CASE_BEGIN_EVENT:
+                message = "Test case \"" + data.testCase.name + "\" started.";
+                messageType = "info";
+                break;
+                
+            case TestRunner.TEST_CASE_COMPLETE_EVENT:
+                message = "Test case \"" + data.testCase.name + "\" completed.\nPassed:" + 
+                    data.results.passed + " Failed:" + data.results.failed + " Total:" + data.results.total;
+                messageType = "info";
+                break;
+            default:
+                message = "Unexpected event " + data.type;
+                message = "info";
+        }
+    
+        YAHOO.log(message, messageType, "TestRunner");    
+    }
+    
+});
+
+YAHOO.register("yuitest", YAHOO.tool.TestRunner, {version: "2.4.1", build: "742"});

Modified: trunk/root/static/yui/yuitest/yuitest-beta-min.js
===================================================================
--- trunk/root/static/yui/yuitest/yuitest-beta-min.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/yuitest/yuitest-beta-min.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,9 +2,9 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
-YAHOO.namespace("tool");YAHOO.tool.TestLogger=function(B,A){YAHOO.tool.TestLogger.superclass.constructor.call(this,B,A);this.init();};YAHOO.lang.extend(YAHOO.tool.TestLogger,YAHOO.widget.LogReader,{footerEnabled:true,newestOnTop:false,formatMsg:function(B){var A=B.category;var C=this.html2Text(B.msg);return"<pre><p><span class=\""+A+"\">"+A.toUpperCase()+"</span> "+C+"</p></pre>";},init:function(){if(YAHOO.tool.TestRunner){this.setTestRunner(YAHOO.tool.TestRunner);}this.hideSource("global");this.hideSource("LogReader");this.hideCategory("warn");this.hideCategory("window");this.hideCategory("time");this.clearConsole();},clearTestRunner:function(){if(this._runner){this._runner.unsubscribeAll();this._runner=null;}},setTestRunner:function(A){if(this._runner){this.clearTestRunner();}this._runner=A;A.subscribe(A.TEST_PASS_EVENT,this._handleTestRunnerEvent,this,true);A.subscribe(A.TEST_FAIL_EVENT,this._handleTestRunnerEvent,this,true);A.subscribe(A.TEST_IGNORE_EVENT,this._handleTe!
 stRunnerEvent,this,true);A.subscribe(A.BEGIN_EVENT,this._handleTestRunnerEvent,this,true);A.subscribe(A.COMPLETE_EVENT,this._handleTestRunnerEvent,this,true);A.subscribe(A.TEST_SUITE_BEGIN_EVENT,this._handleTestRunnerEvent,this,true);A.subscribe(A.TEST_SUITE_COMPLETE_EVENT,this._handleTestRunnerEvent,this,true);A.subscribe(A.TEST_CASE_BEGIN_EVENT,this._handleTestRunnerEvent,this,true);A.subscribe(A.TEST_CASE_COMPLETE_EVENT,this._handleTestRunnerEvent,this,true);},_handleTestRunnerEvent:function(D){var A=YAHOO.tool.TestRunner;var C="";var B="";switch(D.type){case A.BEGIN_EVENT:C="Testing began at "+(new Date()).toString()+".";B="info";break;case A.COMPLETE_EVENT:C="Testing completed at "+(new Date()).toString()+".\nPassed:"+D.results.passed+" Failed:"+D.results.failed+" Total:"+D.results.total;B="info";break;case A.TEST_FAIL_EVENT:C=D.testName+": "+D.error.getMessage();B="fail";break;case A.TEST_IGNORE_EVENT:C=D.testName+": ignored.";B="ignore";break;case A.TEST_PASS_EVENT:C!
 =D.testName+": passed.";B="pass";break;case A.TEST_SUITE_BEGIN!
 _EVENT:C
="Test suite \""+D.testSuite.name+"\" started.";B="info";break;case A.TEST_SUITE_COMPLETE_EVENT:C="Test suite \""+D.testSuite.name+"\" completed.\nPassed:"+D.results.passed+" Failed:"+D.results.failed+" Total:"+D.results.total;B="info";break;case A.TEST_CASE_BEGIN_EVENT:C="Test case \""+D.testCase.name+"\" started.";B="info";break;case A.TEST_CASE_COMPLETE_EVENT:C="Test case \""+D.testCase.name+"\" completed.\nPassed:"+D.results.passed+" Failed:"+D.results.failed+" Total:"+D.results.total;B="info";break;default:C="Unexpected event "+D.type;C="info";}YAHOO.log(C,B,"TestRunner");}});YAHOO.namespace("tool");YAHOO.tool.TestRunner=(function(){function A(){A.superclass.constructor.apply(this,arguments);this.items=[];var C=[this.TEST_CASE_BEGIN_EVENT,this.TEST_CASE_COMPLETE_EVENT,this.TEST_SUITE_BEGIN_EVENT,this.TEST_SUITE_COMPLETE_EVENT,this.TEST_PASS_EVENT,this.TEST_FAIL_EVENT,this.TEST_IGNORE_EVENT,this.COMPLETE_EVENT,this.BEGIN_EVENT];for(var B=0;B<C.length;B++){this.createEven!
 t(C[B],{scope:this});}}YAHOO.lang.extend(A,YAHOO.util.EventProvider,{TEST_CASE_BEGIN_EVENT:"testcasebegin",TEST_CASE_COMPLETE_EVENT:"testcasecomplete",TEST_SUITE_BEGIN_EVENT:"testsuitebegin",TEST_SUITE_COMPLETE_EVENT:"testsuitecomplete",TEST_PASS_EVENT:"pass",TEST_FAIL_EVENT:"fail",TEST_IGNORE_EVENT:"ignore",COMPLETE_EVENT:"complete",BEGIN_EVENT:"begin",_runTestCase:function(H){var J={};this.fireEvent(this.TEST_CASE_BEGIN_EVENT,{testCase:H});var F=[];for(var C in H){if(C.indexOf("test")===0&&typeof H[C]=="function"){F.push(C);}}var O=H._should.fail||{};var G=H._should.error||{};var L=H._should.ignore||{};var D=0;var B=0;var E=0;for(var I=0;I<F.length;I++){if(L[F[I]]){this.fireEvent(this.TEST_IGNORE_EVENT,{testCase:H,testName:F[I]});continue;}var K=false;var M=null;H.setUp();try{H[F[I]]();if(O[F[I]]){M=new YAHOO.util.ShouldFail();K=true;}else{if(G[F[I]]){M=new YAHOO.util.ShouldError();K=true;}}}catch(N){if(N instanceof YAHOO.util.AssertionError){if(!O[F[I]]){M=N;K=true;}}els!
 e{if(!G[F[I]]){M=new YAHOO.util.UnexpectedError(N);K=true;}els!
 e{if(YAH
OO.lang.isString(G[F[I]])){if(N.message!=G[F[I]]){M=new YAHOO.util.UnexpectedError(N);K=true;}}else{if(YAHOO.lang.isObject(G[F[I]])){if(!(N instanceof G[F[I]].constructor)||N.message!=G[F[I]].message){M=new YAHOO.util.UnexpectedError(N);K=true;}}}}}}finally{if(K){this.fireEvent(this.TEST_FAIL_EVENT,{testCase:H,testName:F[I],error:M});}else{this.fireEvent(this.TEST_PASS_EVENT,{testCase:H,testName:F[I]});}}H.tearDown();J[F[I]]={result:K?"fail":"pass",message:M?M.getMessage():"Test passed"};E++;D+=(K?1:0);B+=(K?0:1);}J.total=E;J.failed=D;J.passed=B;this.fireEvent(this.TEST_CASE_COMPLETE_EVENT,{testCase:H,results:J});return J;},_runTestSuite:function(E){var D={passed:0,failed:0,total:0};this.fireEvent(this.TEST_SUITE_BEGIN_EVENT,{testSuite:E});for(var C=0;C<E.items.length;C++){var B=null;if(E.items[C] instanceof YAHOO.tool.TestSuite){B=this._runTestSuite(E.items[C]);}else{if(E.items[C] instanceof YAHOO.tool.TestCase){B=this._runTestCase(E.items[C]);}}if(B!==null){D.total+=B.tota!
 l;D.passed+=B.passed;D.failed+=B.failed;D[E.items[C].name]=B;}}this.fireEvent(this.TEST_SUITE_COMPLETE_EVENT,{testSuite:E,results:D});return D;},_run:function(B){if(YAHOO.lang.isObject(B)){if(B instanceof YAHOO.tool.TestSuite){return this._runTestSuite(B);}else{if(B instanceof YAHOO.tool.TestCase){return this._runTestCase(B);}else{throw new TypeError("_run(): Expected either YAHOO.tool.TestCase or YAHOO.tool.TestSuite.");}}}},fireEvent:function(B,C){C=C||{};C.type=B;A.superclass.fireEvent.call(this,B,C);},add:function(B){this.items.push(B);},clear:function(){while(this.items.length){this.items.pop();}},run:function(C){var E=null;this.fireEvent(this.BEGIN_EVENT);if(YAHOO.lang.isObject(C)){E=this._run(C);}else{E={passed:0,failed:0,total:0};for(var D=0;D<this.items.length;D++){var B=this._run(this.items[D]);E.passed+=B.passed;E.failed+=B.failed;E.total+=B.total;E[this.items[D].name]=B;}}this.fireEvent(this.COMPLETE_EVENT,{results:E});
-}});return new A();})();YAHOO.namespace("tool");YAHOO.tool.TestSuite=function(A){this.name=A||YAHOO.util.Dom.generateId(null,"testSuite");this.items=[];};YAHOO.tool.TestSuite.prototype={add:function(A){if(A instanceof YAHOO.tool.TestSuite||A instanceof YAHOO.tool.TestCase){this.items.push(A);}}};YAHOO.namespace("tool");YAHOO.tool.TestCase=function(A){this._should={};for(var B in A){this[B]=A[B];}if(!YAHOO.lang.isString(this.name)){this.name=YAHOO.util.Dom.generateId(null,"testCase");}};YAHOO.tool.TestCase.prototype={setUp:function(){},tearDown:function(){}};YAHOO.namespace("util");YAHOO.util.Assert={fail:function(A){throw new YAHOO.util.AssertionError(A||"Test force-failed.");},areEqual:function(B,C,A){if(B!=C){throw new YAHOO.util.ComparisonFailure(A||"Values should be equal.",B,C);}},areNotEqual:function(A,C,B){if(A==C){throw new YAHOO.util.UnexpectedValue(B||"Values should not be equal.",A);}},areNotSame:function(A,C,B){if(A===C){throw new YAHOO.util.UnexpectedValue(B||"!
 Values should not be the same.",A);}},areSame:function(B,C,A){if(B!==C){throw new YAHOO.util.ComparisonFailure(A||"Values should be the same.",B,C);}},isFalse:function(B,A){if(false!==B){throw new YAHOO.util.ComparisonFailure(A||"Value should be false.",false,B);}},isTrue:function(B,A){if(true!==B){throw new YAHOO.util.ComparisonFailure(A||"Value should be true.",true,B);}},isNaN:function(B,A){if(!isNaN(B)){throw new YAHOO.util.ComparisonFailure(A||"Value should be NaN.",NaN,B);}},isNotNaN:function(B,A){if(isNaN(B)){throw new YAHOO.util.UnexpectedValue(A||"Values should not be NaN.",NaN);}},isNotNull:function(B,A){if(YAHOO.lang.isNull(B)){throw new YAHOO.util.UnexpectedValue(A||"Values should not be null.",null);}},isNotUndefined:function(B,A){if(YAHOO.lang.isUndefined(B)){throw new YAHOO.util.UnexpectedValue(A||"Value should not be undefined.",undefined);}},isNull:function(B,A){if(!YAHOO.lang.isNull(B)){throw new YAHOO.util.ComparisonFailure(A||"Value should be null.",null!
 ,B);}},isUndefined:function(B,A){if(!YAHOO.lang.isUndefined(B)!
 ){throw 
new YAHOO.util.ComparisonFailure(A||"Value should be undefined.",undefined,B);}},isArray:function(B,A){if(!YAHOO.lang.isArray(B)){throw new YAHOO.util.UnexpectedValue(A||"Value should be an array.",B);}},isBoolean:function(B,A){if(!YAHOO.lang.isBoolean(B)){throw new YAHOO.util.UnexpectedValue(A||"Value should be a Boolean.",B);}},isFunction:function(B,A){if(!YAHOO.lang.isFunction(B)){throw new YAHOO.util.UnexpectedValue(A||"Value should be a function.",B);}},isInstanceOf:function(B,C,A){if(!(C instanceof B)){throw new YAHOO.util.ComparisonFailure(A||"Value isn't an instance of expected type.",B,C);}},isNumber:function(B,A){if(!YAHOO.lang.isNumber(B)){throw new YAHOO.util.UnexpectedValue(A||"Value should be a number.",B);}},isObject:function(B,A){if(!YAHOO.lang.isObject(B)){throw new YAHOO.util.UnexpectedValue(A||"Value should be an object.",B);}},isString:function(B,A){if(!YAHOO.lang.isString(B)){throw new YAHOO.util.UnexpectedValue(A||"Value should be a string.",B);}},isTyp!
 eOf:function(A,C,B){if(typeof C!=A){throw new YAHOO.util.ComparisonFailure(B||"Value should be of type "+expected+".",expected,typeof actual);}}};YAHOO.util.AssertionError=function(A){arguments.callee.superclass.constructor.call(this,A);this.message=A;this.name="AssertionError";};YAHOO.lang.extend(YAHOO.util.AssertionError,Error,{getMessage:function(){return this.message;},toString:function(){return this.name+": "+this.getMessage();},valueOf:function(){return this.toString();}});YAHOO.util.ComparisonFailure=function(B,A,C){arguments.callee.superclass.constructor.call(this,B);this.expected=A;this.actual=C;this.name="ComparisonFailure";};YAHOO.lang.extend(YAHOO.util.ComparisonFailure,YAHOO.util.AssertionError,{getMessage:function(){return this.message+"\nExpected: "+this.expected+" ("+(typeof this.expected)+")\nActual:"+this.actual+" ("+(typeof this.actual)+")";}});YAHOO.util.UnexpectedValue=function(B,A){arguments.callee.superclass.constructor.call(this,B);this.unexpected=A;!
 this.name="UnexpectedValue";};YAHOO.lang.extend(YAHOO.util.Une!
 xpectedV
alue,YAHOO.util.AssertionError,{getMessage:function(){return this.message+"\nUnexpected: "+this.unexpected+" ("+(typeof this.unexpected)+") ";}});YAHOO.util.ShouldFail=function(A){arguments.callee.superclass.constructor.call(this,A||"This test should fail but didn't.");this.name="ShouldFail";};YAHOO.lang.extend(YAHOO.util.ShouldFail,YAHOO.util.AssertionError);YAHOO.util.ShouldError=function(A){arguments.callee.superclass.constructor.call(this,A||"This test should have thrown an error but didn't.");this.name="ShouldError";};YAHOO.lang.extend(YAHOO.util.ShouldError,YAHOO.util.AssertionError);YAHOO.util.UnexpectedError=function(A){arguments.callee.superclass.constructor.call(this,"Unexpected error: "+A.message);this.cause=A;this.name="UnexpectedError";};YAHOO.lang.extend(YAHOO.util.UnexpectedError,YAHOO.util.AssertionError);YAHOO.util.ArrayAssert={contains:function(E,D,B){var C=false;for(var A=0;A<D.length&&!C;A++){if(D[A]===E){C=true;}}if(!C){YAHOO.util.Assert.fail(B||"Value (!
 "+E+") not found in array.");}},containsItems:function(C,D,B){for(var A=0;A<C.length;A++){this.contains(C[A],D,B);}if(!found){YAHOO.util.Assert.fail(B||"Value not found in array.");}},containsMatch:function(E,D,B){if(typeof E!="function"){throw new TypeError("ArrayAssert.containsMatch(): First argument must be a function.");}var C=false;for(var A=0;A<D.length&&!C;A++){if(E(D[A])){C=true;}}if(!C){YAHOO.util.Assert.fail(B||"No match found in array.");}},doesNotContain:function(E,D,B){var C=false;for(var A=0;A<D.length&&!C;A++){if(D[A]===E){C=true;}}if(C){YAHOO.util.Assert.fail(B||"Value found in array.");}},doesNotContainItems:function(C,D,B){for(var A=0;A<C.length;A++){this.doesNotContain(C[A],D,B);}},doesNotContainMatch:function(E,D,B){if(typeof E!="function"){throw new TypeError("ArrayAssert.doesNotContainMatch(): First argument must be a function.");}var C=false;for(var A=0;A<D.length&&!C;A++){if(E(D[A])){C=true;
-}}if(C){YAHOO.util.Assert.fail(B||"Value found in array.");}},indexOf:function(E,D,A,C){for(var B=0;B<D.length;B++){if(D[B]===E){YAHOO.util.Assert.areEqual(A,B,C||"Value exists at index "+B+" but should be at index "+A+".");return ;}}YAHOO.util.Assert.fail(C||"Value doesn't exist in array.");},itemsAreEqual:function(D,E,C){var A=Math.max(D.length,E.length);for(var B=0;B<A;B++){YAHOO.util.Assert.areEqual(D[B],E[B],C||"Values in position "+B+" are not equal.");}},itemsAreEquivalent:function(E,F,B,D){if(typeof B!="function"){throw new TypeError("ArrayAssert.itemsAreEquivalent(): Third argument must be a function.");}var A=Math.max(E.length,F.length);for(var C=0;C<A;C++){if(!B(E[C],F[C])){throw new YAHOO.util.ComparisonFailure(D||"Values in position "+C+" are not equivalent.",E[C],F[C]);}}},isEmpty:function(B,A){if(B.length>0){YAHOO.util.Assert.fail(A||"Array should be empty.");}},isNotEmpty:function(B,A){if(B.length===0){YAHOO.util.Assert.fail(A||"Array should not be empty.");!
 }},itemsAreSame:function(D,E,C){var A=Math.max(D.length,E.length);for(var B=0;B<A;B++){YAHOO.util.Assert.areSame(D[B],E[B],C||"Values in position "+B+" are not the same.");}},lastIndexOf:function(E,D,A,C){for(var B=D.length;B>=0;B--){if(D[B]===E){YAHOO.util.Assert.areEqual(A,B,C||"Value exists at index "+B+" but should be at index "+A+".");return ;}}YAHOO.util.Assert.fail(C||"Value doesn't exist in array.");}};YAHOO.namespace("util");YAHOO.util.ObjectAssert={propertiesAreEqual:function(D,F,C){var B=[];for(var E in D){B.push(E);}for(var A=0;A<B.length;A++){YAHOO.util.Assert.isNotUndefined(F[B[A]],C||"Property'"+B[A]+"' expected.");}},hasProperty:function(A,B,C){if(YAHOO.lang.isUndefined(B[A])){YAHOO.util.Assert.fail(C||"Property "+A+" not found on object.");}},hasOwnProperty:function(A,B,C){if(!YAHOO.lang.hasOwnProperty(B,A)){YAHOO.util.Assert.fail(C||"Property "+A+" not found on object instance.");}}};YAHOO.util.DateAssert={datesAreEqual:function(B,C,A){if(B instanceof Date!
 &&C instanceof Date){YAHOO.util.Assert.areEqual(B.getFullYear(!
 ),C.getF
ullYear(),A||"Years should be equal.");YAHOO.util.Assert.areEqual(B.getMonth(),C.getMonth(),A||"Months should be equal.");YAHOO.util.Assert.areEqual(B.getDate(),C.getDate(),A||"Day of month should be equal.");}else{throw new TypeError("DateAssert.datesAreEqual(): Expected and actual values must be Date objects.");}},timesAreEqual:function(B,C,A){if(B instanceof Date&&C instanceof Date){YAHOO.util.Assert.areEqual(B.getHours(),C.getHours(),A||"Hours should be equal.");YAHOO.util.Assert.areEqual(B.getMinutes(),C.getMinutes(),A||"Minutes should be equal.");YAHOO.util.Assert.areEqual(B.getSeconds(),C.getSeconds(),A||"Seconds should be equal.");}else{throw new TypeError("DateAssert.timesAreEqual(): Expected and actual values must be Date objects.");}}};YAHOO.namespace("util");YAHOO.util.UserAction={simulateKeyEvent:function(G,J,F,D,L,C,A,K,I,N,M){G=YAHOO.util.Dom.get(G);if(!G){throw new Error("simulateKeyEvent(): Invalid target.");}if(YAHOO.lang.isString(J)){J=J.toLowerCase();swit!
 ch(J){case"keyup":case"keydown":case"keypress":break;case"textevent":J="keypress";break;default:throw new Error("simulateKeyEvent(): Event type '"+J+"' not supported.");}}else{throw new Error("simulateKeyEvent(): Event type must be a string.");}if(!YAHOO.lang.isBoolean(F)){F=true;}if(!YAHOO.lang.isBoolean(D)){D=true;}if(!YAHOO.lang.isObject(L)){L=window;}if(!YAHOO.lang.isBoolean(C)){C=false;}if(!YAHOO.lang.isBoolean(A)){A=false;}if(!YAHOO.lang.isBoolean(K)){K=false;}if(!YAHOO.lang.isBoolean(I)){I=false;}if(!YAHOO.lang.isNumber(N)){N=0;}if(!YAHOO.lang.isNumber(M)){M=0;}if(YAHOO.lang.isFunction(document.createEvent)){var B=null;try{B=document.createEvent("KeyEvents");B.initKeyEvent(J,F,D,L,C,A,K,I,N,M);}catch(H){try{B=document.createEvent("Events");}catch(E){B=document.createEvent("UIEvents");}finally{B.initEvent(J,F,D);B.view=L;B.altKey=A;B.ctrlKey=C;B.shiftKey=K;B.metaKey=I;B.keyCode=N;B.charCode=M;}}G.dispatchEvent(B);}else{if(YAHOO.lang.isObject(document.createEventObject!
 )){B=document.createEventObject();B.bubbles=F;B.cancelable=D;B!
 .view=L;
B.ctrlKey=C;B.altKey=A;B.shiftKey=K;B.metaKey=I;B.keyCode=(M>0)?M:N;G.fireEvent("on"+J,B);}else{throw new Error("simulateKeyEvent(): No event simulation framework present.");}}},simulateMouseEvent:function(L,P,I,F,Q,K,H,G,E,C,D,A,O,N,J,M){L=YAHOO.util.Dom.get(L);if(!L){throw new Error("simulateMouseEvent(): Invalid target.");}if(YAHOO.lang.isString(P)){P=P.toLowerCase();switch(P){case"mouseover":case"mouseout":case"mousedown":case"mouseup":case"click":case"dblclick":case"mousemove":break;default:throw new Error("simulateMouseEvent(): Event type '"+P+"' not supported.");}}else{throw new Error("simulateMouseEvent(): Event type must be a string.");}if(!YAHOO.lang.isBoolean(I)){I=true;}if(!YAHOO.lang.isBoolean(F)){F=(P!="mousemove");}if(!YAHOO.lang.isObject(Q)){Q=window;}if(!YAHOO.lang.isNumber(K)){K=1;}if(!YAHOO.lang.isNumber(H)){H=0;}if(!YAHOO.lang.isNumber(G)){G=0;}if(!YAHOO.lang.isNumber(E)){E=0;}if(!YAHOO.lang.isNumber(C)){C=0;}if(!YAHOO.lang.isBoolean(D)){D=false;}if(!YAHO!
 O.lang.isBoolean(A)){A=false;}if(!YAHOO.lang.isBoolean(O)){O=false;}if(!YAHOO.lang.isBoolean(N)){N=false;}if(!YAHOO.lang.isNumber(J)){J=0;}if(YAHOO.lang.isFunction(document.createEvent)){var B=document.createEvent("MouseEvents");if(B.initMouseEvent){B.initMouseEvent(P,I,F,Q,K,H,G,E,C,D,A,O,N,J,M);}else{B=document.createEvent("UIEvents");B.initEvent(P,I,F);B.view=Q;B.detail=K;B.screenX=H;B.screenY=G;B.clientX=E;B.clientY=C;B.ctrlKey=D;B.altKey=A;B.metaKey=N;B.shiftKey=O;B.button=J;B.relatedTarget=M;}if(M&&!B.relatedTarget){if(P=="mouseout"){B.toElement=M;}else{if(P=="mouseover"){B.fromElement=M;}}}L.dispatchEvent(B);}else{if(YAHOO.lang.isObject(document.createEventObject)){B=document.createEventObject();B.bubbles=I;B.cancelable=F;B.view=Q;B.detail=K;B.screenX=H;B.screenY=G;B.clientX=E;B.clientY=C;B.ctrlKey=D;B.altKey=A;B.metaKey=N;B.shiftKey=O;switch(J){case 0:B.button=1;break;case 1:B.button=4;break;case 2:break;
-default:B.button=0;}B.relatedTarget=M;L.fireEvent("on"+P,B);}else{throw new Error("simulateMouseEvent(): No event simulation framework present.");}}},fireMouseEvent:function(C,B,A){A=A||{};this.simulateMouseEvent(C,B,A.bubbles,A.cancelable,A.view,A.detail,A.screenX,A.screenY,A.clientX,A.clientY,A.ctrlKey,A.altKey,A.shiftKey,A.metaKey,A.button,A.relatedTarget);},click:function(B,A){this.fireMouseEvent(B,"click",A);},dblclick:function(B,A){this.fireMouseEvent(B,"dblclick",A);},mousedown:function(B,A){this.fireMouseEvent(B,"mousedown",A);},mousemove:function(B,A){this.fireMouseEvent(B,"mousemove",A);},mouseout:function(B,A){this.fireMouseEvent(B,"mouseout",A);},mouseover:function(B,A){this.fireMouseEvent(B,"mouseover",A);},mouseup:function(B,A){this.fireMouseEvent(B,"mouseup",A);},fireKeyEvent:function(B,C,A){A=A||{};this.simulateKeyEvent(C,B,A.bubbles,A.cancelable,A.view,A.ctrlKey,A.altKey,A.shiftKey,A.metaKey,A.keyCode,A.charCode);},keydown:function(B,A){this.fireKeyEvent("k!
 eydown",B,A);},keypress:function(B,A){this.fireKeyEvent("keypress",B,A);},keyup:function(B,A){this.fireKeyEvent("keyup",B,A);}};YAHOO.namespace("tool");YAHOO.tool.TestManager={TEST_PAGE_BEGIN_EVENT:"testpagebegin",TEST_PAGE_COMPLETE_EVENT:"testpagecomplete",TEST_MANAGER_BEGIN_EVENT:"testmanagerbegin",TEST_MANAGER_COMPLETE_EVENT:"testmanagercomplete",_curPage:null,_frame:null,_logger:null,_timeoutId:0,_pages:[],_results:null,_handleTestRunnerComplete:function(A){this.fireEvent(this.TEST_PAGE_COMPLETE_EVENT,{page:this._curPage,results:A.results});this._processResults(this._curPage,A.results);this._logger.clearTestRunner();if(this._pages.length){this._timeoutId=setTimeout(function(){YAHOO.tool.TestManager._run();},1000);}},_processResults:function(C,A){var B=this._results;B.page_results[C]=A;if(A.passed){B.pages_passed++;B.tests_passed+=A.passed;}if(A.failed){B.pages_failed++;B.tests_failed+=A.failed;B.failed.push(C);}else{B.passed.push(C);}if(!this._pages.length){this.fireEve!
 nt(this.TEST_MANAGER_COMPLETE_EVENT,this._results);}},_run:fun!
 ction(){
this._curPage=this._pages.shift();this.fireEvent(this.TEST_PAGE_BEGIN_EVENT,this._curPage);this._frame.location.replace(this._curPage);},load:function(){if(parent.YAHOO.tool.TestManager!==this){parent.YAHOO.tool.TestManager.load();}else{if(this._frame){var A=this._frame.YAHOO.tool.TestRunner;this._logger.setTestRunner(A);A.subscribe(A.COMPLETE_EVENT,this._handleTestRunnerComplete,this,true);A.run();}}},setPages:function(A){this._pages=A;},start:function(){if(!this._initialized){this.createEvent(this.TEST_PAGE_BEGIN_EVENT);this.createEvent(this.TEST_PAGE_COMPLETE_EVENT);this.createEvent(this.TEST_MANAGER_BEGIN_EVENT);this.createEvent(this.TEST_MANAGER_COMPLETE_EVENT);if(!this._frame){var A=document.createElement("iframe");A.style.visibility="hidden";A.style.position="absolute";document.body.appendChild(A);this._frame=A.contentWindow||A.contentDocument.ownerWindow;}if(!this._logger){this._logger=new YAHOO.tool.TestLogger();}this._initialized=true;}this._results={pages_passed:0!
 ,pages_failed:0,tests_passed:0,tests_failed:0,passed:[],failed:[],page_results:{}};this.fireEvent(this.TEST_MANAGER_BEGIN_EVENT,null);this._run();},stop:function(){clearTimeout(this._timeoutId);}};YAHOO.lang.augmentObject(YAHOO.tool.TestManager,YAHOO.util.EventProvider.prototype);YAHOO.register("yuitest",YAHOO.tool.TestRunner,{version:"2.3.1",build:"541"});
\ No newline at end of file
+YAHOO.namespace("tool");YAHOO.tool.TestCase=function(A){this._should={};for(var B in A){this[B]=A[B];}if(!YAHOO.lang.isString(this.name)){this.name=YAHOO.util.Dom.generateId(null,"testCase");}};YAHOO.tool.TestCase.prototype={resume:function(A){YAHOO.tool.TestRunner.resume(A);},wait:function(B,A){throw new YAHOO.tool.TestCase.Wait(B,A);},setUp:function(){},tearDown:function(){}};YAHOO.tool.TestCase.Wait=function(B,A){this.segment=(YAHOO.lang.isFunction(B)?B:null);this.delay=(YAHOO.lang.isNumber(A)?A:0);};YAHOO.namespace("tool");YAHOO.tool.TestSuite=function(A){this.name="";this.items=[];if(YAHOO.lang.isString(A)){this.name=A;}else{if(YAHOO.lang.isObject(A)){YAHOO.lang.augmentObject(this,A,true);}}if(this.name===""){this.name=YAHOO.util.Dom.generateId(null,"testSuite");}};YAHOO.tool.TestSuite.prototype={add:function(A){if(A instanceof YAHOO.tool.TestSuite||A instanceof YAHOO.tool.TestCase){this.items.push(A);}},setUp:function(){},tearDown:function(){}};YAHOO.namespace("tool")!
 ;YAHOO.tool.TestRunner=(function(){function B(C){this.testObject=C;this.firstChild=null;this.lastChild=null;this.parent=null;this.next=null;this.results={passed:0,failed:0,total:0};}B.prototype={appendChild:function(C){var D=new B(C);if(this.firstChild===null){this.firstChild=this.lastChild=D;}else{this.lastChild.next=D;this.lastChild=D;}D.parent=this;return D;}};function A(){A.superclass.constructor.apply(this,arguments);this.masterSuite=new YAHOO.tool.TestSuite("MasterSuite");this._cur=null;this._root=null;var D=[this.TEST_CASE_BEGIN_EVENT,this.TEST_CASE_COMPLETE_EVENT,this.TEST_SUITE_BEGIN_EVENT,this.TEST_SUITE_COMPLETE_EVENT,this.TEST_PASS_EVENT,this.TEST_FAIL_EVENT,this.TEST_IGNORE_EVENT,this.COMPLETE_EVENT,this.BEGIN_EVENT];for(var C=0;C<D.length;C++){this.createEvent(D[C],{scope:this});}}YAHOO.lang.extend(A,YAHOO.util.EventProvider,{TEST_CASE_BEGIN_EVENT:"testcasebegin",TEST_CASE_COMPLETE_EVENT:"testcasecomplete",TEST_SUITE_BEGIN_EVENT:"testsuitebegin",TEST_SUITE_COM!
 PLETE_EVENT:"testsuitecomplete",TEST_PASS_EVENT:"pass",TEST_FA!
 IL_EVENT
:"fail",TEST_IGNORE_EVENT:"ignore",COMPLETE_EVENT:"complete",BEGIN_EVENT:"begin",_addTestCaseToTestTree:function(C,D){var E=C.appendChild(D);for(var F in D){if(F.indexOf("test")===0&&YAHOO.lang.isFunction(D[F])){E.appendChild(F);}}},_addTestSuiteToTestTree:function(C,F){var E=C.appendChild(F);for(var D=0;D<F.items.length;D++){if(F.items[D] instanceof YAHOO.tool.TestSuite){this._addTestSuiteToTestTree(E,F.items[D]);}else{if(F.items[D] instanceof YAHOO.tool.TestCase){this._addTestCaseToTestTree(E,F.items[D]);}}}},_buildTestTree:function(){this._root=new B(this.masterSuite);this._cur=this._root;for(var C=0;C<this.masterSuite.items.length;C++){if(this.masterSuite.items[C] instanceof YAHOO.tool.TestSuite){this._addTestSuiteToTestTree(this._root,this.masterSuite.items[C]);}else{if(this.masterSuite.items[C] instanceof YAHOO.tool.TestCase){this._addTestCaseToTestTree(this._root,this.masterSuite.items[C]);}}}},_handleTestObjectComplete:function(C){if(YAHOO.lang.isObject(C.testObject)!
 ){C.parent.results.passed+=C.results.passed;C.parent.results.failed+=C.results.failed;C.parent.results.total+=C.results.total;C.parent.results[C.testObject.name]=C.results;if(C.testObject instanceof YAHOO.tool.TestSuite){C.testObject.tearDown();this.fireEvent(this.TEST_SUITE_COMPLETE_EVENT,{testSuite:C.testObject,results:C.results});}else{if(C.testObject instanceof YAHOO.tool.TestCase){this.fireEvent(this.TEST_CASE_COMPLETE_EVENT,{testCase:C.testObject,results:C.results});}}}},_next:function(){if(this._cur.firstChild){this._cur=this._cur.firstChild;}else{if(this._cur.next){this._cur=this._cur.next;}else{while(this._cur&&!this._cur.next&&this._cur!==this._root){this._handleTestObjectComplete(this._cur);this._cur=this._cur.parent;}if(this._cur==this._root){this.fireEvent(this.COMPLETE_EVENT,{results:this._cur.results});this._cur=null;}else{this._handleTestObjectComplete(this._cur);this._cur=this._cur.next;}}}return this._cur;},_run:function(){var E=false;var D=this._next();if!
 (D!==null){var C=D.testObject;if(YAHOO.lang.isObject(C)){if(C !
 instance
of YAHOO.tool.TestSuite){this.fireEvent(this.TEST_SUITE_BEGIN_EVENT,{testSuite:C});C.setUp();}else{if(C instanceof YAHOO.tool.TestCase){this.fireEvent(this.TEST_CASE_BEGIN_EVENT,{testCase:C});}}if(typeof setTimeout!="undefined"){setTimeout(function(){YAHOO.tool.TestRunner._run();},0);}else{this._run();}}else{this._runTest(D);}}},_resumeTest:function(G){var C=this._cur;var H=C.testObject;var E=C.parent.testObject;var K=(E._should.fail||{})[H];var D=(E._should.error||{})[H];var F=false;var I=null;try{G.apply(E);if(K){I=new YAHOO.util.ShouldFail();F=true;}else{if(D){I=new YAHOO.util.ShouldError();F=true;}}}catch(J){if(J instanceof YAHOO.util.AssertionError){if(!K){I=J;F=true;}}else{if(J instanceof YAHOO.tool.TestCase.Wait){if(YAHOO.lang.isFunction(J.segment)){if(YAHOO.lang.isNumber(J.delay)){if(typeof setTimeout!="undefined"){setTimeout(function(){YAHOO.tool.TestRunner._resumeTest(J.segment);},J.delay);}else{throw new Error("Asynchronous tests not supported in this environment.!
 ");}}}return ;}else{if(!D){I=new YAHOO.util.UnexpectedError(J);F=true;}else{if(YAHOO.lang.isString(D)){if(J.message!=D){I=new YAHOO.util.UnexpectedError(J);F=true;}}else{if(YAHOO.lang.isObject(D)){if(!(J instanceof D.constructor)||J.message!=D.message){I=new YAHOO.util.UnexpectedError(J);F=true;}}}}}}}if(F){this.fireEvent(this.TEST_FAIL_EVENT,{testCase:E,testName:H,error:I});}else{this.fireEvent(this.TEST_PASS_EVENT,{testCase:E,testName:H});}E.tearDown();C.parent.results[H]={result:F?"fail":"pass",message:I?I.getMessage():"Test passed"};if(F){C.parent.results.failed++;}else{C.parent.results.passed++;}C.parent.results.total++;if(typeof setTimeout!="undefined"){setTimeout(function(){YAHOO.tool.TestRunner._run();},0);}else{this._run();}},_runTest:function(F){var C=F.testObject;var D=F.parent.testObject;var G=D[C];var E=(D._should.ignore||{})[C];if(E){this.fireEvent(this.TEST_IGNORE_EVENT,{testCase:D,testName:C});
+if(typeof setTimeout!="undefined"){setTimeout(function(){YAHOO.tool.TestRunner._run();},0);}else{this._run();}}else{D.setUp();this._resumeTest(G);}},fireEvent:function(C,D){D=D||{};D.type=C;A.superclass.fireEvent.call(this,C,D);},add:function(C){this.masterSuite.add(C);},clear:function(){this.masterSuite.items=[];},resume:function(C){this._resumeTest(C||function(){});},run:function(C){var D=YAHOO.tool.TestRunner;D._buildTestTree();D.fireEvent(D.BEGIN_EVENT);D._run();}});return new A();})();YAHOO.namespace("util");YAHOO.util.Assert={fail:function(A){throw new YAHOO.util.AssertionError(A||"Test force-failed.");},areEqual:function(B,C,A){if(B!=C){throw new YAHOO.util.ComparisonFailure(A||"Values should be equal.",B,C);}},areNotEqual:function(A,C,B){if(A==C){throw new YAHOO.util.UnexpectedValue(B||"Values should not be equal.",A);}},areNotSame:function(A,C,B){if(A===C){throw new YAHOO.util.UnexpectedValue(B||"Values should not be the same.",A);}},areSame:function(B,C,A){if(B!==!
 C){throw new YAHOO.util.ComparisonFailure(A||"Values should be the same.",B,C);}},isFalse:function(B,A){if(false!==B){throw new YAHOO.util.ComparisonFailure(A||"Value should be false.",false,B);}},isTrue:function(B,A){if(true!==B){throw new YAHOO.util.ComparisonFailure(A||"Value should be true.",true,B);}},isNaN:function(B,A){if(!isNaN(B)){throw new YAHOO.util.ComparisonFailure(A||"Value should be NaN.",NaN,B);}},isNotNaN:function(B,A){if(isNaN(B)){throw new YAHOO.util.UnexpectedValue(A||"Values should not be NaN.",NaN);}},isNotNull:function(B,A){if(YAHOO.lang.isNull(B)){throw new YAHOO.util.UnexpectedValue(A||"Values should not be null.",null);}},isNotUndefined:function(B,A){if(YAHOO.lang.isUndefined(B)){throw new YAHOO.util.UnexpectedValue(A||"Value should not be undefined.",undefined);}},isNull:function(B,A){if(!YAHOO.lang.isNull(B)){throw new YAHOO.util.ComparisonFailure(A||"Value should be null.",null,B);}},isUndefined:function(B,A){if(!YAHOO.lang.isUndefined(B)){throw!
  new YAHOO.util.ComparisonFailure(A||"Value should be undefine!
 d.",unde
fined,B);}},isArray:function(B,A){if(!YAHOO.lang.isArray(B)){throw new YAHOO.util.UnexpectedValue(A||"Value should be an array.",B);}},isBoolean:function(B,A){if(!YAHOO.lang.isBoolean(B)){throw new YAHOO.util.UnexpectedValue(A||"Value should be a Boolean.",B);}},isFunction:function(B,A){if(!YAHOO.lang.isFunction(B)){throw new YAHOO.util.UnexpectedValue(A||"Value should be a function.",B);}},isInstanceOf:function(B,C,A){if(!(C instanceof B)){throw new YAHOO.util.ComparisonFailure(A||"Value isn't an instance of expected type.",B,C);}},isNumber:function(B,A){if(!YAHOO.lang.isNumber(B)){throw new YAHOO.util.UnexpectedValue(A||"Value should be a number.",B);}},isObject:function(B,A){if(!YAHOO.lang.isObject(B)){throw new YAHOO.util.UnexpectedValue(A||"Value should be an object.",B);}},isString:function(B,A){if(!YAHOO.lang.isString(B)){throw new YAHOO.util.UnexpectedValue(A||"Value should be a string.",B);}},isTypeOf:function(A,C,B){if(typeof C!=A){throw new YAHOO.util.ComparisonFa!
 ilure(B||"Value should be of type "+expected+".",expected,typeof actual);}}};YAHOO.util.AssertionError=function(A){arguments.callee.superclass.constructor.call(this,A);this.message=A;this.name="AssertionError";};YAHOO.lang.extend(YAHOO.util.AssertionError,Error,{getMessage:function(){return this.message;},toString:function(){return this.name+": "+this.getMessage();},valueOf:function(){return this.toString();}});YAHOO.util.ComparisonFailure=function(B,A,C){arguments.callee.superclass.constructor.call(this,B);this.expected=A;this.actual=C;this.name="ComparisonFailure";};YAHOO.lang.extend(YAHOO.util.ComparisonFailure,YAHOO.util.AssertionError,{getMessage:function(){return this.message+"\nExpected: "+this.expected+" ("+(typeof this.expected)+")\nActual:"+this.actual+" ("+(typeof this.actual)+")";}});YAHOO.util.UnexpectedValue=function(B,A){arguments.callee.superclass.constructor.call(this,B);this.unexpected=A;this.name="UnexpectedValue";};YAHOO.lang.extend(YAHOO.util.Unexpected!
 Value,YAHOO.util.AssertionError,{getMessage:function(){return !
 this.mes
sage+"\nUnexpected: "+this.unexpected+" ("+(typeof this.unexpected)+") ";}});YAHOO.util.ShouldFail=function(A){arguments.callee.superclass.constructor.call(this,A||"This test should fail but didn't.");this.name="ShouldFail";};YAHOO.lang.extend(YAHOO.util.ShouldFail,YAHOO.util.AssertionError);YAHOO.util.ShouldError=function(A){arguments.callee.superclass.constructor.call(this,A||"This test should have thrown an error but didn't.");this.name="ShouldError";};YAHOO.lang.extend(YAHOO.util.ShouldError,YAHOO.util.AssertionError);YAHOO.util.UnexpectedError=function(A){arguments.callee.superclass.constructor.call(this,"Unexpected error: "+A.message);this.cause=A;this.name="UnexpectedError";};YAHOO.lang.extend(YAHOO.util.UnexpectedError,YAHOO.util.AssertionError);YAHOO.util.ArrayAssert={contains:function(E,D,B){var C=false;for(var A=0;A<D.length&&!C;A++){if(D[A]===E){C=true;}}if(!C){YAHOO.util.Assert.fail(B||"Value ("+E+") not found in array.");}},containsItems:function(C,D,B){for(var!
  A=0;A<C.length;A++){this.contains(C[A],D,B);}if(!found){YAHOO.util.Assert.fail(B||"Value not found in array.");}},containsMatch:function(E,D,B){if(typeof E!="function"){throw new TypeError("ArrayAssert.containsMatch(): First argument must be a function.");}var C=false;for(var A=0;A<D.length&&!C;A++){if(E(D[A])){C=true;}}if(!C){YAHOO.util.Assert.fail(B||"No match found in array.");}},doesNotContain:function(E,D,B){var C=false;for(var A=0;A<D.length&&!C;A++){if(D[A]===E){C=true;}}if(C){YAHOO.util.Assert.fail(B||"Value found in array.");}},doesNotContainItems:function(C,D,B){for(var A=0;A<C.length;A++){this.doesNotContain(C[A],D,B);}},doesNotContainMatch:function(E,D,B){if(typeof E!="function"){throw new TypeError("ArrayAssert.doesNotContainMatch(): First argument must be a function.");}var C=false;for(var A=0;A<D.length&&!C;A++){if(E(D[A])){C=true;}}if(C){YAHOO.util.Assert.fail(B||"Value found in array.");}},indexOf:function(E,D,A,C){for(var B=0;
+B<D.length;B++){if(D[B]===E){YAHOO.util.Assert.areEqual(A,B,C||"Value exists at index "+B+" but should be at index "+A+".");return ;}}YAHOO.util.Assert.fail(C||"Value doesn't exist in array.");},itemsAreEqual:function(D,E,C){var A=Math.max(D.length,E.length);for(var B=0;B<A;B++){YAHOO.util.Assert.areEqual(D[B],E[B],C||"Values in position "+B+" are not equal.");}},itemsAreEquivalent:function(E,F,B,D){if(typeof B!="function"){throw new TypeError("ArrayAssert.itemsAreEquivalent(): Third argument must be a function.");}var A=Math.max(E.length,F.length);for(var C=0;C<A;C++){if(!B(E[C],F[C])){throw new YAHOO.util.ComparisonFailure(D||"Values in position "+C+" are not equivalent.",E[C],F[C]);}}},isEmpty:function(B,A){if(B.length>0){YAHOO.util.Assert.fail(A||"Array should be empty.");}},isNotEmpty:function(B,A){if(B.length===0){YAHOO.util.Assert.fail(A||"Array should not be empty.");}},itemsAreSame:function(D,E,C){var A=Math.max(D.length,E.length);for(var B=0;B<A;B++){YAHOO.util.As!
 sert.areSame(D[B],E[B],C||"Values in position "+B+" are not the same.");}},lastIndexOf:function(E,D,A,C){for(var B=D.length;B>=0;B--){if(D[B]===E){YAHOO.util.Assert.areEqual(A,B,C||"Value exists at index "+B+" but should be at index "+A+".");return ;}}YAHOO.util.Assert.fail(C||"Value doesn't exist in array.");}};YAHOO.namespace("util");YAHOO.util.ObjectAssert={propertiesAreEqual:function(D,F,C){var B=[];for(var E in D){B.push(E);}for(var A=0;A<B.length;A++){YAHOO.util.Assert.isNotUndefined(F[B[A]],C||"Property'"+B[A]+"' expected.");}},hasProperty:function(A,B,C){if(YAHOO.lang.isUndefined(B[A])){YAHOO.util.Assert.fail(C||"Property "+A+" not found on object.");}},hasOwnProperty:function(A,B,C){if(!YAHOO.lang.hasOwnProperty(B,A)){YAHOO.util.Assert.fail(C||"Property "+A+" not found on object instance.");}}};YAHOO.util.DateAssert={datesAreEqual:function(B,C,A){if(B instanceof Date&&C instanceof Date){YAHOO.util.Assert.areEqual(B.getFullYear(),C.getFullYear(),A||"Years should be !
 equal.");YAHOO.util.Assert.areEqual(B.getMonth(),C.getMonth(),!
 A||"Mont
hs should be equal.");YAHOO.util.Assert.areEqual(B.getDate(),C.getDate(),A||"Day of month should be equal.");}else{throw new TypeError("DateAssert.datesAreEqual(): Expected and actual values must be Date objects.");}},timesAreEqual:function(B,C,A){if(B instanceof Date&&C instanceof Date){YAHOO.util.Assert.areEqual(B.getHours(),C.getHours(),A||"Hours should be equal.");YAHOO.util.Assert.areEqual(B.getMinutes(),C.getMinutes(),A||"Minutes should be equal.");YAHOO.util.Assert.areEqual(B.getSeconds(),C.getSeconds(),A||"Seconds should be equal.");}else{throw new TypeError("DateAssert.timesAreEqual(): Expected and actual values must be Date objects.");}}};YAHOO.namespace("util");YAHOO.util.UserAction={simulateKeyEvent:function(F,J,E,C,L,B,A,K,H,N,M){F=YAHOO.util.Dom.get(F);if(!F){throw new Error("simulateKeyEvent(): Invalid target.");}if(YAHOO.lang.isString(J)){J=J.toLowerCase();switch(J){case"keyup":case"keydown":case"keypress":break;case"textevent":J="keypress";break;default:thro!
 w new Error("simulateKeyEvent(): Event type '"+J+"' not supported.");}}else{throw new Error("simulateKeyEvent(): Event type must be a string.");}if(!YAHOO.lang.isBoolean(E)){E=true;}if(!YAHOO.lang.isBoolean(C)){C=true;}if(!YAHOO.lang.isObject(L)){L=window;}if(!YAHOO.lang.isBoolean(B)){B=false;}if(!YAHOO.lang.isBoolean(A)){A=false;}if(!YAHOO.lang.isBoolean(K)){K=false;}if(!YAHOO.lang.isBoolean(H)){H=false;}if(!YAHOO.lang.isNumber(N)){N=0;}if(!YAHOO.lang.isNumber(M)){M=0;}var I=null;if(YAHOO.lang.isFunction(document.createEvent)){try{I=document.createEvent("KeyEvents");I.initKeyEvent(J,E,C,L,B,A,K,H,N,M);}catch(G){try{I=document.createEvent("Events");}catch(D){I=document.createEvent("UIEvents");}finally{I.initEvent(J,E,C);I.view=L;I.altKey=A;I.ctrlKey=B;I.shiftKey=K;I.metaKey=H;I.keyCode=N;I.charCode=M;}}F.dispatchEvent(I);}else{if(YAHOO.lang.isObject(document.createEventObject)){I=document.createEventObject();I.bubbles=E;I.cancelable=C;I.view=L;I.ctrlKey=B;I.altKey=A;I.shift!
 Key=K;I.metaKey=H;I.keyCode=(M>0)?M:N;F.fireEvent("on"+J,I);}e!
 lse{thro
w new Error("simulateKeyEvent(): No event simulation framework present.");}}},simulateMouseEvent:function(K,P,H,E,Q,J,G,F,D,B,C,A,O,M,I,L){K=YAHOO.util.Dom.get(K);if(!K){throw new Error("simulateMouseEvent(): Invalid target.");}if(YAHOO.lang.isString(P)){P=P.toLowerCase();switch(P){case"mouseover":case"mouseout":case"mousedown":case"mouseup":case"click":case"dblclick":case"mousemove":break;default:throw new Error("simulateMouseEvent(): Event type '"+P+"' not supported.");}}else{throw new Error("simulateMouseEvent(): Event type must be a string.");}if(!YAHOO.lang.isBoolean(H)){H=true;}if(!YAHOO.lang.isBoolean(E)){E=(P!="mousemove");}if(!YAHOO.lang.isObject(Q)){Q=window;}if(!YAHOO.lang.isNumber(J)){J=1;}if(!YAHOO.lang.isNumber(G)){G=0;}if(!YAHOO.lang.isNumber(F)){F=0;}if(!YAHOO.lang.isNumber(D)){D=0;}if(!YAHOO.lang.isNumber(B)){B=0;}if(!YAHOO.lang.isBoolean(C)){C=false;}if(!YAHOO.lang.isBoolean(A)){A=false;}if(!YAHOO.lang.isBoolean(O)){O=false;}if(!YAHOO.lang.isBoolean(M)){M=f!
 alse;}if(!YAHOO.lang.isNumber(I)){I=0;}var N=null;if(YAHOO.lang.isFunction(document.createEvent)){N=document.createEvent("MouseEvents");if(N.initMouseEvent){N.initMouseEvent(P,H,E,Q,J,G,F,D,B,C,A,O,M,I,L);}else{N=document.createEvent("UIEvents");N.initEvent(P,H,E);N.view=Q;N.detail=J;N.screenX=G;N.screenY=F;N.clientX=D;N.clientY=B;N.ctrlKey=C;N.altKey=A;N.metaKey=M;N.shiftKey=O;N.button=I;N.relatedTarget=L;}if(L&&!N.relatedTarget){if(P=="mouseout"){N.toElement=L;}else{if(P=="mouseover"){N.fromElement=L;}}}K.dispatchEvent(N);}else{if(YAHOO.lang.isObject(document.createEventObject)){N=document.createEventObject();N.bubbles=H;N.cancelable=E;N.view=Q;N.detail=J;N.screenX=G;N.screenY=F;N.clientX=D;N.clientY=B;N.ctrlKey=C;N.altKey=A;N.metaKey=M;N.shiftKey=O;switch(I){case 0:N.button=1;break;case 1:N.button=4;break;case 2:break;default:N.button=0;}N.relatedTarget=L;K.fireEvent("on"+P,N);}else{throw new Error("simulateMouseEvent(): No event simulation framework present.");
+}}},fireMouseEvent:function(C,B,A){A=A||{};this.simulateMouseEvent(C,B,A.bubbles,A.cancelable,A.view,A.detail,A.screenX,A.screenY,A.clientX,A.clientY,A.ctrlKey,A.altKey,A.shiftKey,A.metaKey,A.button,A.relatedTarget);},click:function(B,A){this.fireMouseEvent(B,"click",A);},dblclick:function(B,A){this.fireMouseEvent(B,"dblclick",A);},mousedown:function(B,A){this.fireMouseEvent(B,"mousedown",A);},mousemove:function(B,A){this.fireMouseEvent(B,"mousemove",A);},mouseout:function(B,A){this.fireMouseEvent(B,"mouseout",A);},mouseover:function(B,A){this.fireMouseEvent(B,"mouseover",A);},mouseup:function(B,A){this.fireMouseEvent(B,"mouseup",A);},fireKeyEvent:function(B,C,A){A=A||{};this.simulateKeyEvent(C,B,A.bubbles,A.cancelable,A.view,A.ctrlKey,A.altKey,A.shiftKey,A.metaKey,A.keyCode,A.charCode);},keydown:function(B,A){this.fireKeyEvent("keydown",B,A);},keypress:function(B,A){this.fireKeyEvent("keypress",B,A);},keyup:function(B,A){this.fireKeyEvent("keyup",B,A);}};YAHOO.namespace("t!
 ool");YAHOO.tool.TestManager={TEST_PAGE_BEGIN_EVENT:"testpagebegin",TEST_PAGE_COMPLETE_EVENT:"testpagecomplete",TEST_MANAGER_BEGIN_EVENT:"testmanagerbegin",TEST_MANAGER_COMPLETE_EVENT:"testmanagercomplete",_curPage:null,_frame:null,_logger:null,_timeoutId:0,_pages:[],_results:null,_handleTestRunnerComplete:function(A){this.fireEvent(this.TEST_PAGE_COMPLETE_EVENT,{page:this._curPage,results:A.results});this._processResults(this._curPage,A.results);this._logger.clearTestRunner();if(this._pages.length){this._timeoutId=setTimeout(function(){YAHOO.tool.TestManager._run();},1000);}},_processResults:function(C,A){var B=this._results;B.page_results[C]=A;if(A.passed){B.pages_passed++;B.tests_passed+=A.passed;}if(A.failed){B.pages_failed++;B.tests_failed+=A.failed;B.failed.push(C);}else{B.passed.push(C);}if(!this._pages.length){this.fireEvent(this.TEST_MANAGER_COMPLETE_EVENT,this._results);}},_run:function(){this._curPage=this._pages.shift();this.fireEvent(this.TEST_PAGE_BEGIN_EVENT,!
 this._curPage);this._frame.location.replace(this._curPage);},l!
 oad:func
tion(){if(parent.YAHOO.tool.TestManager!==this){parent.YAHOO.tool.TestManager.load();}else{if(this._frame){var A=this._frame.YAHOO.tool.TestRunner;this._logger.setTestRunner(A);A.subscribe(A.COMPLETE_EVENT,this._handleTestRunnerComplete,this,true);A.run();}}},setPages:function(A){this._pages=A;},start:function(){if(!this._initialized){this.createEvent(this.TEST_PAGE_BEGIN_EVENT);this.createEvent(this.TEST_PAGE_COMPLETE_EVENT);this.createEvent(this.TEST_MANAGER_BEGIN_EVENT);this.createEvent(this.TEST_MANAGER_COMPLETE_EVENT);if(!this._frame){var A=document.createElement("iframe");A.style.visibility="hidden";A.style.position="absolute";document.body.appendChild(A);this._frame=A.contentWindow||A.contentDocument.ownerWindow;}if(!this._logger){this._logger=new YAHOO.tool.TestLogger();}this._initialized=true;}this._results={pages_passed:0,pages_failed:0,tests_passed:0,tests_failed:0,passed:[],failed:[],page_results:{}};this.fireEvent(this.TEST_MANAGER_BEGIN_EVENT,null);this._run();!
 },stop:function(){clearTimeout(this._timeoutId);}};YAHOO.lang.augmentObject(YAHOO.tool.TestManager,YAHOO.util.EventProvider.prototype);YAHOO.namespace("tool");YAHOO.tool.TestLogger=function(B,A){YAHOO.tool.TestLogger.superclass.constructor.call(this,B,A);this.init();};YAHOO.lang.extend(YAHOO.tool.TestLogger,YAHOO.widget.LogReader,{footerEnabled:true,newestOnTop:false,formatMsg:function(B){var A=B.category;var C=this.html2Text(B.msg);return"<pre><p><span class=\""+A+"\">"+A.toUpperCase()+"</span> "+C+"</p></pre>";},init:function(){if(YAHOO.tool.TestRunner){this.setTestRunner(YAHOO.tool.TestRunner);}this.hideSource("global");this.hideSource("LogReader");this.hideCategory("warn");this.hideCategory("window");this.hideCategory("time");this.clearConsole();},clearTestRunner:function(){if(this._runner){this._runner.unsubscribeAll();this._runner=null;}},setTestRunner:function(A){if(this._runner){this.clearTestRunner();}this._runner=A;A.subscribe(A.TEST_PASS_EVENT,this._handleTestRun!
 nerEvent,this,true);A.subscribe(A.TEST_FAIL_EVENT,this._handle!
 TestRunn
erEvent,this,true);A.subscribe(A.TEST_IGNORE_EVENT,this._handleTestRunnerEvent,this,true);A.subscribe(A.BEGIN_EVENT,this._handleTestRunnerEvent,this,true);A.subscribe(A.COMPLETE_EVENT,this._handleTestRunnerEvent,this,true);A.subscribe(A.TEST_SUITE_BEGIN_EVENT,this._handleTestRunnerEvent,this,true);A.subscribe(A.TEST_SUITE_COMPLETE_EVENT,this._handleTestRunnerEvent,this,true);A.subscribe(A.TEST_CASE_BEGIN_EVENT,this._handleTestRunnerEvent,this,true);A.subscribe(A.TEST_CASE_COMPLETE_EVENT,this._handleTestRunnerEvent,this,true);},_handleTestRunnerEvent:function(D){var A=YAHOO.tool.TestRunner;var C="";var B="";switch(D.type){case A.BEGIN_EVENT:C="Testing began at "+(new Date()).toString()+".";B="info";break;case A.COMPLETE_EVENT:C="Testing completed at "+(new Date()).toString()+".\nPassed:"+D.results.passed+" Failed:"+D.results.failed+" Total:"+D.results.total;B="info";break;case A.TEST_FAIL_EVENT:C=D.testName+": "+D.error.getMessage();B="fail";break;case A.TEST_IGNORE_EVENT:C=D!
 .testName+": ignored.";B="ignore";break;case A.TEST_PASS_EVENT:C=D.testName+": passed.";B="pass";break;case A.TEST_SUITE_BEGIN_EVENT:C="Test suite \""+D.testSuite.name+"\" started.";B="info";break;case A.TEST_SUITE_COMPLETE_EVENT:C="Test suite \""+D.testSuite.name+"\" completed.\nPassed:"+D.results.passed+" Failed:"+D.results.failed+" Total:"+D.results.total;B="info";break;case A.TEST_CASE_BEGIN_EVENT:C="Test case \""+D.testCase.name+"\" started.";B="info";break;case A.TEST_CASE_COMPLETE_EVENT:C="Test case \""+D.testCase.name+"\" completed.\nPassed:"+D.results.passed+" Failed:"+D.results.failed+" Total:"+D.results.total;B="info";break;default:C="Unexpected event "+D.type;C="info";}YAHOO.log(C,B,"TestRunner");}});YAHOO.register("yuitest",YAHOO.tool.TestRunner,{version:"2.4.1",build:"742"});
\ No newline at end of file

Modified: trunk/root/static/yui/yuitest/yuitest-beta.js
===================================================================
--- trunk/root/static/yui/yuitest/yuitest-beta.js	2007-12-20 10:16:14 UTC (rev 699)
+++ trunk/root/static/yui/yuitest/yuitest-beta.js	2007-12-20 10:16:27 UTC (rev 700)
@@ -2,192 +2,203 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 Code licensed under the BSD License:
 http://developer.yahoo.net/yui/license.txt
-version: 2.3.1
+version: 2.4.1
 */
 YAHOO.namespace("tool");
 
 //-----------------------------------------------------------------------------
-// TestLogger object
+// TestCase object
 //-----------------------------------------------------------------------------
 
 /**
- * Displays test execution progress and results, providing filters based on
- * different key events.
+ * Test case containing various tests to run.
+ * @param template An object containing any number of test methods, other methods,
+ *                 an optional name, and anything else the test case needs.
+ * @class TestCase
  * @namespace YAHOO.tool
- * @class TestLogger
  * @constructor
- * @param {HTMLElement} element (Optional) The element to create the logger in.
- * @param {Object} config (Optional) Configuration options for the logger.
  */
-YAHOO.tool.TestLogger = function (element, config) {
-    YAHOO.tool.TestLogger.superclass.constructor.call(this, element, config);
-    this.init();
+YAHOO.tool.TestCase = function (template /*:Object*/) {
+    
+    /**
+     * Special rules for the test case. Possible subobjects
+     * are fail, for tests that should fail, and error, for
+     * tests that should throw an error.
+     */
+    this._should /*:Object*/ = {};
+    
+    //copy over all properties from the template to this object
+    for (var prop in template) {
+        this[prop] = template[prop];
+    }    
+    
+    //check for a valid name
+    if (!YAHOO.lang.isString(this.name)){
+        /**
+         * Name for the test case.
+         */
+        this.name /*:String*/ = YAHOO.util.Dom.generateId(null, "testCase");
+    }
+
 };
 
-YAHOO.lang.extend(YAHOO.tool.TestLogger, YAHOO.widget.LogReader, {
 
-    footerEnabled : true,
-    newestOnTop : false,
+YAHOO.tool.TestCase.prototype = {  
 
     /**
-     * Formats message string to HTML for output to console.
-     * @private
-     * @method formatMsg
-     * @param oLogMsg {Object} Log message object.
-     * @return {String} HTML-formatted message for output to console.
+     * Resumes a paused test and runs the given function.
+     * @param {Function} segment (Optional) The function to run.
+     *      If omitted, the test automatically passes.
+     * @return {Void}
+     * @method resume
      */
-    formatMsg : function(message /*:Object*/) {
-    
-        var category /*:String*/ = message.category;        
-        var text /*:String*/ = this.html2Text(message.msg);
-        
-        return "<pre><p><span class=\"" + category + "\">" + category.toUpperCase() + "</span> " + text + "</p></pre>";
-    
+    resume : function (segment /*:Function*/) /*:Void*/ {
+        YAHOO.tool.TestRunner.resume(segment);
     },
-    
+
+    /**
+     * Causes the test case to wait a specified amount of time and then
+     * continue executing the given code.
+     * @param {Function} segment (Optional) The function to run after the delay.
+     *      If omitted, the TestRunner will wait until resume() is called.
+     * @param {int} delay (Optional) The number of milliseconds to wait before running
+     *      the function. If omitted, defaults to zero.
+     * @return {Void}
+     * @method wait
+     */
+    wait : function (segment /*:Function*/, delay /*:int*/) /*:Void*/{
+        throw new YAHOO.tool.TestCase.Wait(segment, delay);
+    },
+
     //-------------------------------------------------------------------------
-    // Private Methods
+    // Stub Methods
     //-------------------------------------------------------------------------
-    
-    /*
-     * Initializes the logger.
-     * @private
+
+    /**
+     * Function to run before each test is executed.
+     * @return {Void}
+     * @method setUp
      */
-    init : function () {
-    
-        //attach to any available TestRunner
-        if (YAHOO.tool.TestRunner){
-            this.setTestRunner(YAHOO.tool.TestRunner);
-        }
-        
-        //hide useless sources
-        this.hideSource("global");
-        this.hideSource("LogReader");
-        
-        //hide useless message categories
-        this.hideCategory("warn");
-        this.hideCategory("window");
-        this.hideCategory("time");
-        
-        //reset the logger
-        this.clearConsole();
+    setUp : function () /*:Void*/ {
     },
     
     /**
-     * Clears the reference to the TestRunner from previous operations. This 
-     * unsubscribes all events and removes the object reference.
+     * Function to run after each test is executed.
      * @return {Void}
-     * @static
+     * @method tearDown
      */
-    clearTestRunner : function () /*:Void*/ {
-        if (this._runner){
-            this._runner.unsubscribeAll();
-            this._runner = null;
-        }
-    },
+    tearDown: function () /*:Void*/ {    
+    }
+};
+
+/**
+ * Represents a stoppage in test execution to wait for an amount of time before
+ * continuing.
+ * @param {Function} segment A function to run when the wait is over.
+ * @param {int} delay The number of milliseconds to wait before running the code.
+ * @class Wait
+ * @namespace YAHOO.tool.TestCase
+ * @constructor
+ *
+ */
+YAHOO.tool.TestCase.Wait = function (segment /*:Function*/, delay /*:int*/) {
     
     /**
-     * Sets the source test runner that the logger should monitor.
-     * @param {YAHOO.tool.TestRunner} testRunner The TestRunner to observe.
+     * The segment of code to run when the wait is over.
+     * @type Function
+     * @property segment
+     */
+    this.segment /*:Function*/ = (YAHOO.lang.isFunction(segment) ? segment : null);
+
+    /**
+     * The delay before running the segment of code.
+     * @type int
+     * @property delay
+     */
+    this.delay /*:int*/ = (YAHOO.lang.isNumber(delay) ? delay : 0);
+
+};
+
+YAHOO.namespace("tool");
+
+
+//-----------------------------------------------------------------------------
+// TestSuite object
+//-----------------------------------------------------------------------------
+
+/**
+ * A test suite that can contain a collection of TestCase and TestSuite objects.
+ * @param {String||Object} data The name of the test suite or an object containing
+ *      a name property as well as setUp and tearDown methods.
+ * @namespace YAHOO.tool
+ * @class TestSuite
+ * @constructor
+ */
+YAHOO.tool.TestSuite = function (data /*:String||Object*/) {
+
+    /**
+     * The name of the test suite.
+     * @type String
+     * @property name
+     */
+    this.name /*:String*/ = "";
+
+    /**
+     * Array of test suites and
+     * @private
+     */
+    this.items /*:Array*/ = [];
+
+    //initialize the properties
+    if (YAHOO.lang.isString(data)){
+        this.name = data;
+    } else if (YAHOO.lang.isObject(data)){
+        YAHOO.lang.augmentObject(this, data, true);
+    }
+
+    //double-check name
+    if (this.name === ""){
+        this.name = YAHOO.util.Dom.generateId(null, "testSuite");
+    }
+
+};
+
+YAHOO.tool.TestSuite.prototype = {
+    
+    /**
+     * Adds a test suite or test case to the test suite.
+     * @param {YAHOO.tool.TestSuite||YAHOO.tool.TestCase} testObject The test suite or test case to add.
      * @return {Void}
-     * @static
+     * @method add
      */
-    setTestRunner : function (testRunner /*:YAHOO.tool.TestRunner*/) /*:Void*/ {
-    
-        if (this._runner){
-            this.clearTestRunner();
+    add : function (testObject /*:YAHOO.tool.TestSuite*/) /*:Void*/ {
+        if (testObject instanceof YAHOO.tool.TestSuite || testObject instanceof YAHOO.tool.TestCase) {
+            this.items.push(testObject);
         }
-        
-        this._runner = testRunner;
-        
-        //setup event _handlers
-        testRunner.subscribe(testRunner.TEST_PASS_EVENT, this._handleTestRunnerEvent, this, true);
-        testRunner.subscribe(testRunner.TEST_FAIL_EVENT, this._handleTestRunnerEvent, this, true);
-        testRunner.subscribe(testRunner.TEST_IGNORE_EVENT, this._handleTestRunnerEvent, this, true);
-        testRunner.subscribe(testRunner.BEGIN_EVENT, this._handleTestRunnerEvent, this, true);
-        testRunner.subscribe(testRunner.COMPLETE_EVENT, this._handleTestRunnerEvent, this, true);
-        testRunner.subscribe(testRunner.TEST_SUITE_BEGIN_EVENT, this._handleTestRunnerEvent, this, true);
-        testRunner.subscribe(testRunner.TEST_SUITE_COMPLETE_EVENT, this._handleTestRunnerEvent, this, true);
-        testRunner.subscribe(testRunner.TEST_CASE_BEGIN_EVENT, this._handleTestRunnerEvent, this, true);
-        testRunner.subscribe(testRunner.TEST_CASE_COMPLETE_EVENT, this._handleTestRunnerEvent, this, true);    
     },
     
     //-------------------------------------------------------------------------
-    // Event Handlers
+    // Stub Methods
     //-------------------------------------------------------------------------
+
+    /**
+     * Function to run before each test is executed.
+     * @return {Void}
+     * @method setUp
+     */
+    setUp : function () /*:Void*/ {
+    },
     
     /**
-     * Handles all TestRunner events, outputting appropriate data into the console.
-     * @param {Object} data The event data object.
+     * Function to run after each test is executed.
      * @return {Void}
-     * @private
+     * @method tearDown
      */
-    _handleTestRunnerEvent : function (data /*:Object*/) /*:Void*/ {
-    
-        //shortcut variables
-        var TestRunner /*:Object*/ = YAHOO.tool.TestRunner;
-    
-        //data variables
-        var message /*:String*/ = "";
-        var messageType /*:String*/ = "";
-        
-        switch(data.type){
-            case TestRunner.BEGIN_EVENT:
-                message = "Testing began at " + (new Date()).toString() + ".";
-                messageType = "info";
-                break;
-                
-            case TestRunner.COMPLETE_EVENT:
-                message = "Testing completed at " + (new Date()).toString() + ".\nPassed:" 
-                    + data.results.passed + " Failed:" + data.results.failed + " Total:" + data.results.total;
-                messageType = "info";
-                break;
-                
-            case TestRunner.TEST_FAIL_EVENT:
-                message = data.testName + ": " + data.error.getMessage();
-                messageType = "fail";
-                break;
-                
-            case TestRunner.TEST_IGNORE_EVENT:
-                message = data.testName + ": ignored.";
-                messageType = "ignore";
-                break;
-                
-            case TestRunner.TEST_PASS_EVENT:
-                message = data.testName + ": passed.";
-                messageType = "pass";
-                break;
-                
-            case TestRunner.TEST_SUITE_BEGIN_EVENT:
-                message = "Test suite \"" + data.testSuite.name + "\" started.";
-                messageType = "info";
-                break;
-                
-            case TestRunner.TEST_SUITE_COMPLETE_EVENT:
-                message = "Test suite \"" + data.testSuite.name + "\" completed.\nPassed:" 
-                    + data.results.passed + " Failed:" + data.results.failed + " Total:" + data.results.total;
-                messageType = "info";
-                break;
-                
-            case TestRunner.TEST_CASE_BEGIN_EVENT:
-                message = "Test case \"" + data.testCase.name + "\" started.";
-                messageType = "info";
-                break;
-                
-            case TestRunner.TEST_CASE_COMPLETE_EVENT:
-                message = "Test case \"" + data.testCase.name + "\" completed.\nPassed:" 
-                    + data.results.passed + " Failed:" + data.results.failed + " Total:" + data.results.total;
-                messageType = "info";
-                break;
-            default:
-                message = "Unexpected event " + data.type;
-                message = "info";
-        }
-    
-        YAHOO.log(message, messageType, "TestRunner");    
+    tearDown: function () /*:Void*/ {
     }
     
-});
+};
+
 YAHOO.namespace("tool");
 
 /**
@@ -211,18 +222,114 @@
  */
 YAHOO.tool.TestRunner = (function(){
 
+    /**
+     * A node in the test tree structure. May represent a TestSuite, TestCase, or
+     * test function.
+     * @param {Variant} testObject A TestSuite, TestCase, or the name of a test function.
+     * @class TestNode
+     * @constructor
+     * @private
+     */
+    function TestNode(testObject /*:Variant*/){
+    
+        /**
+         * The TestSuite, TestCase, or test function represented by this node.
+         * @type Variant
+         * @property testObject
+         */
+        this.testObject = testObject;
+        
+        /**
+         * Pointer to this node's first child.
+         * @type TestNode
+         * @property firstChild
+         */        
+        this.firstChild /*:TestNode*/ = null;
+        
+        /**
+         * Pointer to this node's last child.
+         * @type TestNode
+         * @property lastChild
+         */        
+        this.lastChild = null;
+        
+        /**
+         * Pointer to this node's parent.
+         * @type TestNode
+         * @property parent
+         */        
+        this.parent = null; 
+   
+        /**
+         * Pointer to this node's next sibling.
+         * @type TestNode
+         * @property next
+         */        
+        this.next = null;
+        
+        /**
+         * Test results for this test object.
+         * @type object
+         * @property results
+         */                
+        this.results /*:Object*/ = {
+            passed : 0,
+            failed : 0,
+            total : 0
+        };
+       
+    }
+    
+    TestNode.prototype = {
+    
+        /**
+         * Appends a new test object (TestSuite, TestCase, or test function name) as a child
+         * of this node.
+         * @param {Variant} testObject A TestSuite, TestCase, or the name of a test function.
+         * @return {Void}
+         */
+        appendChild : function (testObject /*:Variant*/) /*:Void*/{
+            var node = new TestNode(testObject);
+            if (this.firstChild === null){
+                this.firstChild = this.lastChild = node;
+            } else {
+                this.lastChild.next = node;
+                this.lastChild = node;
+            }
+            node.parent = this;
+            return node;
+        }       
+    };
+
     function TestRunner(){
     
         //inherit from EventProvider
         TestRunner.superclass.constructor.apply(this,arguments);
         
         /**
-         * The test objects to run.
-         * @type Array
+         * Suite on which to attach all TestSuites and TestCases to be run.
+         * @type YAHOO.tool.TestSuite
+         * @property masterSuite
          * @private
          */
-        this.items /*:Array*/ = [];
+        this.masterSuite /*:YAHOO.tool.TestSuite*/ = new YAHOO.tool.TestSuite("MasterSuite");        
+
+        /**
+         * Pointer to the current node in the test tree.
+         * @type TestNode
+         * @private
+         * @property _cur
+         */
+        this._cur = null;
         
+        /**
+         * Pointer to the root node in the test tree.
+         * @type TestNode
+         * @private
+         * @property _root
+         */
+        this._root = null;
+        
         //create events
         var events /*:Array*/ = [
             this.TEST_CASE_BEGIN_EVENT,
@@ -237,8 +344,7 @@
         ];
         for (var i=0; i < events.length; i++){
             this.createEvent(events[i], { scope: this });
-        }
-       
+        }       
    
     }
     
@@ -304,213 +410,341 @@
          * @event begin
          */        
         BEGIN_EVENT /*:String*/ : "begin",    
-    
+        
         //-------------------------------------------------------------------------
-        // Private Methods
+        // Test Tree-Related Methods
         //-------------------------------------------------------------------------
+
+        /**
+         * Adds a test case to the test tree as a child of the specified node.
+         * @param {TestNode} parentNode The node to add the test case to as a child.
+         * @param {YAHOO.tool.TestCase} testCase The test case to add.
+         * @return {Void}
+         * @static
+         * @private
+         * @method _addTestCaseToTestTree
+         */
+       _addTestCaseToTestTree : function (parentNode /*:TestNode*/, testCase /*:YAHOO.tool.TestCase*/) /*:Void*/{
+            
+            //add the test suite
+            var node = parentNode.appendChild(testCase);
+            
+            //iterate over the items in the test case
+            for (var prop in testCase){
+                if (prop.indexOf("test") === 0 && YAHOO.lang.isFunction(testCase[prop])){
+                    node.appendChild(prop);
+                }
+            }
          
+        },
+        
         /**
-         * Runs a given test case.
-         * @param {YAHOO.tool.TestCase} testCase The test case to run.
-         * @return {Object} Results of the execution with properties passed, failed, and total.
-         * @method _runTestCase
+         * Adds a test suite to the test tree as a child of the specified node.
+         * @param {TestNode} parentNode The node to add the test suite to as a child.
+         * @param {YAHOO.tool.TestSuite} testSuite The test suite to add.
+         * @return {Void}
+         * @static
          * @private
+         * @method _addTestSuiteToTestTree
+         */
+        _addTestSuiteToTestTree : function (parentNode /*:TestNode*/, testSuite /*:YAHOO.tool.TestSuite*/) /*:Void*/ {
+            
+            //add the test suite
+            var node = parentNode.appendChild(testSuite);
+            
+            //iterate over the items in the master suite
+            for (var i=0; i < testSuite.items.length; i++){
+                if (testSuite.items[i] instanceof YAHOO.tool.TestSuite) {
+                    this._addTestSuiteToTestTree(node, testSuite.items[i]);
+                } else if (testSuite.items[i] instanceof YAHOO.tool.TestCase) {
+                    this._addTestCaseToTestTree(node, testSuite.items[i]);
+                }                   
+            }            
+        },
+        
+        /**
+         * Builds the test tree based on items in the master suite. The tree is a hierarchical
+         * representation of the test suites, test cases, and test functions. The resulting tree
+         * is stored in _root and the pointer _cur is set to the root initially.
+         * @return {Void}
          * @static
+         * @private
+         * @method _buildTestTree
          */
-        _runTestCase : function (testCase /*YAHOO.tool.TestCase*/) /*:Void*/{
+        _buildTestTree : function () /*:Void*/ {
         
-            //object to store results
-            var results /*:Object*/ = {};
+            this._root = new TestNode(this.masterSuite);
+            this._cur = this._root;
+            
+            //iterate over the items in the master suite
+            for (var i=0; i < this.masterSuite.items.length; i++){
+                if (this.masterSuite.items[i] instanceof YAHOO.tool.TestSuite) {
+                    this._addTestSuiteToTestTree(this._root, this.masterSuite.items[i]);
+                } else if (this.masterSuite.items[i] instanceof YAHOO.tool.TestCase) {
+                    this._addTestCaseToTestTree(this._root, this.masterSuite.items[i]);
+                }                   
+            }            
         
-            //test case begins
-            this.fireEvent(this.TEST_CASE_BEGIN_EVENT, { testCase: testCase });
+        }, 
+    
+        //-------------------------------------------------------------------------
+        // Private Methods
+        //-------------------------------------------------------------------------
+        _handleTestObjectComplete : function (node /*:TestNode*/) /*:Void*/ {
+            if (YAHOO.lang.isObject(node.testObject)){
+                node.parent.results.passed += node.results.passed;
+                node.parent.results.failed += node.results.failed;
+                node.parent.results.total += node.results.total;                
+                node.parent.results[node.testObject.name] = node.results;
+            
+                if (node.testObject instanceof YAHOO.tool.TestSuite){
+                    node.testObject.tearDown();
+                    this.fireEvent(this.TEST_SUITE_COMPLETE_EVENT, { testSuite: node.testObject, results: node.results});
+                } else if (node.testObject instanceof YAHOO.tool.TestCase){
+                    this.fireEvent(this.TEST_CASE_COMPLETE_EVENT, { testCase: node.testObject, results: node.results});
+                }      
+            } 
+        },        
         
-            //gather the test functions
-            var tests /*:Array*/ = [];
-            for (var prop in testCase){
-                if (prop.indexOf("test") === 0 && typeof testCase[prop] == "function") {
-                    tests.push(prop);
+        
+        //-------------------------------------------------------------------------
+        // Navigation Methods
+        //-------------------------------------------------------------------------
+        
+        /**
+         * Retrieves the next node in the test tree.
+         * @return {TestNode} The next node in the test tree or null if the end is reached.
+         * @private
+         * @static
+         * @method _next
+         */
+        _next : function () /*:TestNode*/ {
+        
+            if (this._cur.firstChild) {
+                this._cur = this._cur.firstChild;
+            } else if (this._cur.next) {
+                this._cur = this._cur.next;            
+            } else {
+                while (this._cur && !this._cur.next && this._cur !== this._root){
+                    this._handleTestObjectComplete(this._cur);
+                    this._cur = this._cur.parent;
                 }
+                
+                if (this._cur == this._root){
+                    this.fireEvent(this.COMPLETE_EVENT, { results: this._cur.results});
+                    this._cur = null;
+                } else {
+                    this._handleTestObjectComplete(this._cur);               
+                    this._cur = this._cur.next;                
+                }
             }
+        
+            return this._cur;
+        },
+        
+        /**
+         * Runs a test case or test suite, returning the results.
+         * @param {YAHOO.tool.TestCase|YAHOO.tool.TestSuite} testObject The test case or test suite to run.
+         * @return {Object} Results of the execution with properties passed, failed, and total.
+         * @private
+         * @method _run
+         * @static
+         */
+        _run : function () /*:Void*/ {
+        
+            //flag to indicate if the TestRunner should wait before continuing
+            var shouldWait /*:Boolean*/ = false;
             
-            //get the "should" test cases
-            var shouldFail /*:Object*/ = testCase._should.fail || {};
-            var shouldError /*:Object*/ = testCase._should.error || {};
-            var shouldIgnore /*:Object*/ = testCase._should.ignore || {};
+            //get the next test node
+            var node = this._next();
             
-            //test counts
-            var failCount /*:int*/ = 0;
-            var passCount /*:int*/ = 0;
-            var runCount /*:int*/ = 0;
-            
-            //run each test
-            for (var i=0; i < tests.length; i++){
-            
-                //figure out if the test should be ignored or not
-                if (shouldIgnore[tests[i]]){
-                    this.fireEvent(this.TEST_IGNORE_EVENT, { testCase: testCase, testName: tests[i] });
-                    continue;
+            if (node !== null) {
+                var testObject = node.testObject;
+                
+                //figure out what to do
+                if (YAHOO.lang.isObject(testObject)){
+                    if (testObject instanceof YAHOO.tool.TestSuite){
+                        this.fireEvent(this.TEST_SUITE_BEGIN_EVENT, { testSuite: testObject });
+                        testObject.setUp();
+                    } else if (testObject instanceof YAHOO.tool.TestCase){
+                        this.fireEvent(this.TEST_CASE_BEGIN_EVENT, { testCase: testObject });
+                    }
+                    
+                    //some environments don't support setTimeout
+                    if (typeof setTimeout != "undefined"){                    
+                        setTimeout(function(){
+                            YAHOO.tool.TestRunner._run();
+                        }, 0);              
+                    } else {
+                        this._run();
+                    }
+                } else {
+                    this._runTest(node);
                 }
+
+            }
+        },
+        
+        _resumeTest : function (segment /*:Function*/) /*:Void*/ {
+        
+            //get relevant information
+            var node /*:TestNode*/ = this._cur;
+            var testName /*:String*/ = node.testObject;
+            var testCase /*:YAHOO.tool.TestCase*/ = node.parent.testObject;
             
-                //variable to hold whether or not the test failed
-                var failed /*:Boolean*/ = false;
-                var error /*:Error*/ = null;
+            //get the "should" test cases
+            var shouldFail /*:Object*/ = (testCase._should.fail || {})[testName];
+            var shouldError /*:Object*/ = (testCase._should.error || {})[testName];
             
-                //run the setup
-                testCase.setUp();
+            //variable to hold whether or not the test failed
+            var failed /*:Boolean*/ = false;
+            var error /*:Error*/ = null;
                 
-                //try the test
-                try {
+            //try the test
+            try {
+            
+                //run the test
+                segment.apply(testCase);
                 
-                    //run the test
-                    testCase[tests[i]]();
-                    
-                    //if it should fail, and it got here, then it's a fail because it didn't
-                    if (shouldFail[tests[i]]){
-                        error = new YAHOO.util.ShouldFail();
+                //if it should fail, and it got here, then it's a fail because it didn't
+                if (shouldFail){
+                    error = new YAHOO.util.ShouldFail();
+                    failed = true;
+                } else if (shouldError){
+                    error = new YAHOO.util.ShouldError();
+                    failed = true;
+                }
+                           
+            } catch (thrown /*:Error*/){
+                if (thrown instanceof YAHOO.util.AssertionError) {
+                    if (!shouldFail){
+                        error = thrown;
                         failed = true;
-                    } else if (shouldError[tests[i]]){
-                        error = new YAHOO.util.ShouldError();
-                        failed = true;
                     }
-                               
-                } catch (thrown /*:Error*/){
-                    if (thrown instanceof YAHOO.util.AssertionError) {
-                        if (!shouldFail[tests[i]]){
-                            error = thrown;
-                            failed = true;
+                } else if (thrown instanceof YAHOO.tool.TestCase.Wait){
+                
+                    if (YAHOO.lang.isFunction(thrown.segment)){
+                        if (YAHOO.lang.isNumber(thrown.delay)){
+                        
+                            //some environments don't support setTimeout
+                            if (typeof setTimeout != "undefined"){
+                                setTimeout(function(){
+                                    YAHOO.tool.TestRunner._resumeTest(thrown.segment);
+                                }, thrown.delay);
+                            } else {
+                                throw new Error("Asynchronous tests not supported in this environment.");
+                            }
                         }
+                    }
+                    
+                    return;
+                
+                } else {
+                    //first check to see if it should error
+                    if (!shouldError) {                        
+                        error = new YAHOO.util.UnexpectedError(thrown);
+                        failed = true;
                     } else {
-                        //first check to see if it should error
-                        if (!shouldError[tests[i]]) {                        
-                            error = new YAHOO.util.UnexpectedError(thrown);
-                            failed = true;
-                        } else {
-                            //check to see what type of data we have
-                            if (YAHOO.lang.isString(shouldError[tests[i]])){
-                                
-                                //if it's a string, check the error message
-                                if (thrown.message != shouldError[tests[i]]){
-                                    error = new YAHOO.util.UnexpectedError(thrown);
-                                    failed = true;                                    
-                                }
-                            } else if (YAHOO.lang.isObject(shouldError[tests[i]])){
+                        //check to see what type of data we have
+                        if (YAHOO.lang.isString(shouldError)){
                             
-                                //if it's an object, check the instance and message
-                                if (!(thrown instanceof shouldError[tests[i]].constructor) || 
-                                        thrown.message != shouldError[tests[i]].message){
-                                    error = new YAHOO.util.UnexpectedError(thrown);
-                                    failed = true;                                    
-                                }
-                            
+                            //if it's a string, check the error message
+                            if (thrown.message != shouldError){
+                                error = new YAHOO.util.UnexpectedError(thrown);
+                                failed = true;                                    
                             }
+                        } else if (YAHOO.lang.isObject(shouldError)){
                         
+                            //if it's an object, check the instance and message
+                            if (!(thrown instanceof shouldError.constructor) || 
+                                    thrown.message != shouldError.message){
+                                error = new YAHOO.util.UnexpectedError(thrown);
+                                failed = true;                                    
+                            }
+                        
                         }
+                    
                     }
-                    
-                } finally {
-                
-                    //fireEvent appropriate event
-                    if (failed) {
-                        this.fireEvent(this.TEST_FAIL_EVENT, { testCase: testCase, testName: tests[i], error: error });
-                    } else {
-                        this.fireEvent(this.TEST_PASS_EVENT, { testCase: testCase, testName: tests[i] });
-                    }            
                 }
                 
-                //run the tear down
-                testCase.tearDown();
-                
-                //update results
-                results[tests[i]] = { 
-                    result: failed ? "fail" : "pass",
-                    message : error ? error.getMessage() : "Test passed"
-                };
-                
-                //update counts
-                runCount++;
-                failCount += (failed ? 1 : 0);
-                passCount += (failed ? 0 : 1);
             }
             
-            //add test counts to results
-            results.total = runCount;
-            results.failed = failCount;
-            results.passed = passCount;
+            //fireEvent appropriate event
+            if (failed) {
+                this.fireEvent(this.TEST_FAIL_EVENT, { testCase: testCase, testName: testName, error: error });
+            } else {
+                this.fireEvent(this.TEST_PASS_EVENT, { testCase: testCase, testName: testName });
+            }
             
-            //test case is done
-            this.fireEvent(this.TEST_CASE_COMPLETE_EVENT, { testCase: testCase, results: results });
+            //run the tear down
+            testCase.tearDown();
             
-            //return results
-            return results;
+            //update results
+            node.parent.results[testName] = { 
+                result: failed ? "fail" : "pass",
+                message : error ? error.getMessage() : "Test passed"
+            };
+            
+            if (failed){
+                node.parent.results.failed++;
+            } else {
+                node.parent.results.passed++;
+            }
+            node.parent.results.total++;    
+
+            //set timeout not supported in all environments
+            if (typeof setTimeout != "undefined"){
+                setTimeout(function(){
+                    YAHOO.tool.TestRunner._run();
+                }, 0);
+            } else {
+                this._run();
+            }
         
         },
-        
+                
         /**
-         * Runs all the tests in a test suite.
-         * @param {YAHOO.tool.TestSuite} testSuite The test suite to run.
-         * @return {Object} Results of the execution with properties passed, failed, and total.
-         * @method _runTestSuite
+         * Runs a single test based on the data provided in the node.
+         * @param {TestNode} node The TestNode representing the test to run.
+         * @return {Void}
+         * @static
          * @private
-         * @static
+         * @name _runTest
          */
-        _runTestSuite : function (testSuite /*:YAHOO.tool.TestSuite*/) {
+        _runTest : function (node /*:TestNode*/) /*:Void*/ {
         
-            //object to store results
-            var results /*:Object*/ = {
-                passed: 0,
-                failed: 0,
-                total: 0
-            };
-        
-            //fireEvent event for beginning of test suite run
-            this.fireEvent(this.TEST_SUITE_BEGIN_EVENT, { testSuite: testSuite });
-        
-            //iterate over the test suite items
-            for (var i=0; i < testSuite.items.length; i++){
-                var result = null;
-                if (testSuite.items[i] instanceof YAHOO.tool.TestSuite) {
-                    result = this._runTestSuite(testSuite.items[i]);
-                } else if (testSuite.items[i] instanceof YAHOO.tool.TestCase) {
-                    result = this._runTestCase(testSuite.items[i]);
+            //get relevant information
+            var testName /*:String*/ = node.testObject;
+            var testCase /*:YAHOO.tool.TestCase*/ = node.parent.testObject;
+            var test /*:Function*/ = testCase[testName];
+            
+            //get the "should" test cases
+            var shouldIgnore /*:Object*/ = (testCase._should.ignore || {})[testName];
+            
+            //figure out if the test should be ignored or not
+            if (shouldIgnore){
+                this.fireEvent(this.TEST_IGNORE_EVENT, { testCase: testCase, testName: testName });
+                
+                //some environments don't support setTimeout
+                if (typeof setTimeout != "undefined"){                    
+                    setTimeout(function(){
+                        YAHOO.tool.TestRunner._run();
+                    }, 0);              
+                } else {
+                    this._run();
                 }
+
+            } else {
+            
+                //run the setup
+                testCase.setUp();
                 
-                if (result !== null){
-                    results.total += result.total;
-                    results.passed += result.passed;
-                    results.failed += result.failed;
-                    results[testSuite.items[i].name] = result;
-                }
+                //now call the body of the test
+                this._resumeTest(test);                
             }
-    
-            //fireEvent event for completion of test suite run
-            this.fireEvent(this.TEST_SUITE_COMPLETE_EVENT, { testSuite: testSuite, results: results });
-            
-            //return the results
-            return results;
+
+        },        
         
-        },
-        
-        /**
-         * Runs a test case or test suite, returning the results.
-         * @param {YAHOO.tool.TestCase|YAHOO.tool.TestSuite} testObject The test case or test suite to run.
-         * @return {Object} Results of the execution with properties passed, failed, and total.
-         * @private
-         * @method _run
-         * @static
-         */
-        _run : function (testObject /*:YAHOO.tool.TestCase|YAHOO.tool.TestSuite*/) /*:Void*/ {
-            if (YAHOO.lang.isObject(testObject)){
-                if (testObject instanceof YAHOO.tool.TestSuite) {
-                    return this._runTestSuite(testObject);
-                } else if (testObject instanceof YAHOO.tool.TestCase) {
-                    return this._runTestCase(testObject);
-                } else {
-                    throw new TypeError("_run(): Expected either YAHOO.tool.TestCase or YAHOO.tool.TestSuite.");
-                }    
-            }        
-        },
-        
         //-------------------------------------------------------------------------
         // Protected Methods
         //-------------------------------------------------------------------------   
@@ -538,151 +772,62 @@
         /**
          * Adds a test suite or test case to the list of test objects to run.
          * @param testObject Either a TestCase or a TestSuite that should be run.
+         * @return {Void}
+         * @method add
+         * @static
          */
         add : function (testObject /*:Object*/) /*:Void*/ {
-            this.items.push(testObject);
+            this.masterSuite.add(testObject);
         },
         
         /**
          * Removes all test objects from the runner.
+         * @return {Void}
+         * @method clear
+         * @static
          */
         clear : function () /*:Void*/ {
-            while(this.items.length){
-                this.items.pop();
-            }
+            this.masterSuite.items = [];
         },
+        
+        /**
+         * Resumes the TestRunner after wait() was called.
+         * @param {Function} segment The function to run as the rest
+         *      of the haulted test.
+         * @return {Void}
+         * @method resume
+         * @static
+         */
+        resume : function (segment /*:Function*/) /*:Void*/ {
+            this._resumeTest(segment || function(){});
+        },
     
         /**
          * Runs the test suite.
+         * @return {Void}
+         * @method run
+         * @static
          */
-        run : function (testObject /*:Object*/) /*:Void*/ { 
-            var results = null;
+        run : function (testObject /*:Object*/) /*:Void*/ {
             
-            this.fireEvent(this.BEGIN_EVENT);
+            //pointer to runner to avoid scope issues 
+            var runner = YAHOO.tool.TestRunner;
+
+            //build the test tree
+            runner._buildTestTree();
+            
+            //fire the begin event
+            runner.fireEvent(runner.BEGIN_EVENT);
        
-            //an object passed in overrides everything else
-            if (YAHOO.lang.isObject(testObject)){
-                results = this._run(testObject);  
-            } else {
-                results = {
-                    passed: 0,
-                    failed: 0,
-                    total: 0
-                };
-                for (var i=0; i < this.items.length; i++){
-                    var result = this._run(this.items[i]);
-                    results.passed += result.passed;
-                    results.failed += result.failed;
-                    results.total += result.total;
-                    results[this.items[i].name] = result;
-                }            
-            }
-            
-            this.fireEvent(this.COMPLETE_EVENT, { results: results });
+            //begin the testing
+            runner._run();
         }    
     });
     
     return new TestRunner();
     
 })();
-YAHOO.namespace("tool");
 
-
-//-----------------------------------------------------------------------------
-// TestSuite object
-//-----------------------------------------------------------------------------
-
-/**
- * A test suite that can contain a collection of TestCase and TestSuite objects.
- * @param {String} name The name of the test fixture.
- * @namespace YAHOO.tool
- * @class TestSuite
- * @constructor
- */
-YAHOO.tool.TestSuite = function (name /*:String*/) {
-
-    /**
-     * The name of the test suite.
-     */
-    this.name /*:String*/ = name || YAHOO.util.Dom.generateId(null, "testSuite");
-
-    /**
-     * Array of test suites and
-     * @private
-     */
-    this.items /*:Array*/ = [];
-
-};
-
-YAHOO.tool.TestSuite.prototype = {
-    
-    /**
-     * Adds a test suite or test case to the test suite.
-     * @param {YAHOO.tool.TestSuite||YAHOO.tool.TestCase} testObject The test suite or test case to add.
-     */
-    add : function (testObject /*:YAHOO.tool.TestSuite*/) /*:Void*/ {
-        if (testObject instanceof YAHOO.tool.TestSuite || testObject instanceof YAHOO.tool.TestCase) {
-            this.items.push(testObject);
-        }
-    }
-    
-};
-YAHOO.namespace("tool");
-
-//-----------------------------------------------------------------------------
-// TestCase object
-//-----------------------------------------------------------------------------
-
-/**
- * Test case containing various tests to run.
- * @param template An object containing any number of test methods, other methods,
- *                 an optional name, and anything else the test case needs.
- * @class TestCase
- * @namespace YAHOO.tool
- * @constructor
- */
-YAHOO.tool.TestCase = function (template /*:Object*/) {
-    
-    /**
-     * Special rules for the test case. Possible subobjects
-     * are fail, for tests that should fail, and error, for
-     * tests that should throw an error.
-     */
-    this._should /*:Object*/ = {};
-    
-    //copy over all properties from the template to this object
-    for (var prop in template) {
-        this[prop] = template[prop];
-    }    
-    
-    //check for a valid name
-    if (!YAHOO.lang.isString(this.name)){
-        /**
-         * Name for the test case.
-         */
-        this.name /*:String*/ = YAHOO.util.Dom.generateId(null, "testCase");
-    }
-
-};
-
-YAHOO.tool.TestCase.prototype = {  
-
-    //-------------------------------------------------------------------------
-    // Test Methods
-    //-------------------------------------------------------------------------
-
-    /**
-     * Function to run before each test is executed.
-     */
-    setUp : function () /*:Void*/ {
-    },
-    
-    /**
-     * Function to run after each test is executed.
-     */
-    tearDown: function () /*:Void*/ {    
-    }
-};
 YAHOO.namespace("util");
 
 //-----------------------------------------------------------------------------
@@ -1275,6 +1420,7 @@
 
 //inherit methods
 YAHOO.lang.extend(YAHOO.util.UnexpectedError, YAHOO.util.AssertionError);
+
 //-----------------------------------------------------------------------------
 // ArrayAssert object
 //-----------------------------------------------------------------------------
@@ -1603,6 +1749,7 @@
     }
     
 };
+
 YAHOO.namespace("util");
 
 
@@ -1675,6 +1822,7 @@
         }     
     }
 };
+
 //-----------------------------------------------------------------------------
 // DateAssert object
 //-----------------------------------------------------------------------------
@@ -1727,6 +1875,7 @@
     }
     
 };
+
 YAHOO.namespace("util");
 
 /**
@@ -1839,17 +1988,17 @@
         if (!YAHOO.lang.isNumber(charCode)){
             charCode = 0; 
         }
-        
+
+        //try to create a mouse event
+        var customEvent /*:MouseEvent*/ = null;
+            
         //check for DOM-compliant browsers first
         if (YAHOO.lang.isFunction(document.createEvent)){
         
-            //try to create a mouse event
-            var event /*:MouseEvent*/ = null;
-            
             try {
                 
                 //try to create key event
-                event = document.createEvent("KeyEvents");
+                customEvent = document.createEvent("KeyEvents");
                 
                 /*
                  * Interesting problem: Firefox implemented a non-standard
@@ -1860,7 +2009,7 @@
                  * now, assume it's Firefox if the above line doesn't error.
                  */
                 //TODO: Decipher between Firefox's implementation and a correct one.
-                event.initKeyEvent(type, bubbles, cancelable, view, ctrlKey,
+                customEvent.initKeyEvent(type, bubbles, cancelable, view, ctrlKey,
                     altKey, shiftKey, metaKey, keyCode, charCode);       
                 
             } catch (ex /*:Error*/){
@@ -1877,56 +2026,56 @@
                 try {
 
                     //try to create generic event - will fail in Safari 2.x
-                    event = document.createEvent("Events");
+                    customEvent = document.createEvent("Events");
 
                 } catch (uierror /*:Error*/){
 
                     //the above failed, so create a UIEvent for Safari 2.x
-                    event = document.createEvent("UIEvents");
+                    customEvent = document.createEvent("UIEvents");
 
                 } finally {
 
-                    event.initEvent(type, bubbles, cancelable);
+                    customEvent.initEvent(type, bubbles, cancelable);
     
                     //initialize
-                    event.view = view;
-                    event.altKey = altKey;
-                    event.ctrlKey = ctrlKey;
-                    event.shiftKey = shiftKey;
-                    event.metaKey = metaKey;
-                    event.keyCode = keyCode;
-                    event.charCode = charCode;
+                    customEvent.view = view;
+                    customEvent.altKey = altKey;
+                    customEvent.ctrlKey = ctrlKey;
+                    customEvent.shiftKey = shiftKey;
+                    customEvent.metaKey = metaKey;
+                    customEvent.keyCode = keyCode;
+                    customEvent.charCode = charCode;
           
                 }          
              
             }
             
             //fire the event
-            target.dispatchEvent(event);
+            target.dispatchEvent(customEvent);
 
         } else if (YAHOO.lang.isObject(document.createEventObject)){ //IE
         
             //create an IE event object
-            event = document.createEventObject();
+            customEvent = document.createEventObject();
             
             //assign available properties
-            event.bubbles = bubbles;
-            event.cancelable = cancelable;
-            event.view = view;
-            event.ctrlKey = ctrlKey;
-            event.altKey = altKey;
-            event.shiftKey = shiftKey;
-            event.metaKey = metaKey;
+            customEvent.bubbles = bubbles;
+            customEvent.cancelable = cancelable;
+            customEvent.view = view;
+            customEvent.ctrlKey = ctrlKey;
+            customEvent.altKey = altKey;
+            customEvent.shiftKey = shiftKey;
+            customEvent.metaKey = metaKey;
             
             /*
              * IE doesn't support charCode explicitly. CharCode should
              * take precedence over any keyCode value for accurate
              * representation.
              */
-            event.keyCode = (charCode > 0) ? charCode : keyCode;
+            customEvent.keyCode = (charCode > 0) ? charCode : keyCode;
             
             //fire the event
-            target.fireEvent("on" + type, event);  
+            target.fireEvent("on" + type, customEvent);  
                     
         } else {
             throw new Error("simulateKeyEvent(): No event simulation framework present.");
@@ -2058,36 +2207,38 @@
         if (!YAHOO.lang.isNumber(button)){
             button = 0; 
         }
-        
+
+        //try to create a mouse event
+        var customEvent /*:MouseEvent*/ = null;
+            
         //check for DOM-compliant browsers first
         if (YAHOO.lang.isFunction(document.createEvent)){
         
-            //try to create a mouse event
-            var event /*:MouseEvent*/ = document.createEvent("MouseEvents");
-            
+            customEvent = document.createEvent("MouseEvents");
+        
             //Safari 2.x (WebKit 418) still doesn't implement initMouseEvent()
-            if (event.initMouseEvent){
-                event.initMouseEvent(type, bubbles, cancelable, view, detail,
+            if (customEvent.initMouseEvent){
+                customEvent.initMouseEvent(type, bubbles, cancelable, view, detail,
                                      screenX, screenY, clientX, clientY, 
                                      ctrlKey, altKey, shiftKey, metaKey, 
                                      button, relatedTarget);
             } else { //Safari
             
                 //the closest thing available in Safari 2.x is UIEvents
-                event = document.createEvent("UIEvents");
-                event.initEvent(type, bubbles, cancelable);
-                event.view = view;
-                event.detail = detail;
-                event.screenX = screenX;
-                event.screenY = screenY;
-                event.clientX = clientX;
-                event.clientY = clientY;
-                event.ctrlKey = ctrlKey;
-                event.altKey = altKey;
-                event.metaKey = metaKey;
-                event.shiftKey = shiftKey;
-                event.button = button;
-                event.relatedTarget = relatedTarget;
+                customEvent = document.createEvent("UIEvents");
+                customEvent.initEvent(type, bubbles, cancelable);
+                customEvent.view = view;
+                customEvent.detail = detail;
+                customEvent.screenX = screenX;
+                customEvent.screenY = screenY;
+                customEvent.clientX = clientX;
+                customEvent.clientY = clientY;
+                customEvent.ctrlKey = ctrlKey;
+                customEvent.altKey = altKey;
+                customEvent.metaKey = metaKey;
+                customEvent.shiftKey = shiftKey;
+                customEvent.button = button;
+                customEvent.relatedTarget = relatedTarget;
             }
             
             /*
@@ -2099,60 +2250,60 @@
              * for mouseout event and fromElement property for mouseover
              * event.
              */
-            if (relatedTarget && !event.relatedTarget){
+            if (relatedTarget && !customEvent.relatedTarget){
                 if (type == "mouseout"){
-                    event.toElement = relatedTarget;
+                    customEvent.toElement = relatedTarget;
                 } else if (type == "mouseover"){
-                    event.fromElement = relatedTarget;
+                    customEvent.fromElement = relatedTarget;
                 }
             }
             
             //fire the event
-            target.dispatchEvent(event);
+            target.dispatchEvent(customEvent);
 
         } else if (YAHOO.lang.isObject(document.createEventObject)){ //IE
         
             //create an IE event object
-            event = document.createEventObject();
+            customEvent = document.createEventObject();
             
             //assign available properties
-            event.bubbles = bubbles;
-            event.cancelable = cancelable;
-            event.view = view;
-            event.detail = detail;
-            event.screenX = screenX;
-            event.screenY = screenY;
-            event.clientX = clientX;
-            event.clientY = clientY;
-            event.ctrlKey = ctrlKey;
-            event.altKey = altKey;
-            event.metaKey = metaKey;
-            event.shiftKey = shiftKey;
+            customEvent.bubbles = bubbles;
+            customEvent.cancelable = cancelable;
+            customEvent.view = view;
+            customEvent.detail = detail;
+            customEvent.screenX = screenX;
+            customEvent.screenY = screenY;
+            customEvent.clientX = clientX;
+            customEvent.clientY = clientY;
+            customEvent.ctrlKey = ctrlKey;
+            customEvent.altKey = altKey;
+            customEvent.metaKey = metaKey;
+            customEvent.shiftKey = shiftKey;
 
             //fix button property for IE's wacky implementation
             switch(button){
                 case 0:
-                    event.button = 1;
+                    customEvent.button = 1;
                     break;
                 case 1:
-                    event.button = 4;
+                    customEvent.button = 4;
                     break;
                 case 2:
                     //leave as is
                     break;
                 default:
-                    event.button = 0;                    
+                    customEvent.button = 0;                    
             }    
 
             /*
              * Have to use relatedTarget because IE won't allow assignment
              * to toElement or fromElement on generic events. This keeps
-             * YAHOO.util.Event.getRelatedTarget() functional.
+             * YAHOO.util.customEvent.getRelatedTarget() functional.
              */
-            event.relatedTarget = relatedTarget;
+            customEvent.relatedTarget = relatedTarget;
             
             //fire the event
-            target.fireEvent("on" + type, event);
+            target.fireEvent("on" + type, customEvent);
                     
         } else {
             throw new Error("simulateMouseEvent(): No event simulation framework present.");
@@ -2334,6 +2485,7 @@
     
 
 };
+
 YAHOO.namespace("tool");
 
 //-----------------------------------------------------------------------------
@@ -2666,4 +2818,190 @@
 
 YAHOO.lang.augmentObject(YAHOO.tool.TestManager, YAHOO.util.EventProvider.prototype);
 
-YAHOO.register("yuitest", YAHOO.tool.TestRunner, {version: "2.3.1", build: "541"});
+
+YAHOO.namespace("tool");
+
+//-----------------------------------------------------------------------------
+// TestLogger object
+//-----------------------------------------------------------------------------
+
+/**
+ * Displays test execution progress and results, providing filters based on
+ * different key events.
+ * @namespace YAHOO.tool
+ * @class TestLogger
+ * @constructor
+ * @param {HTMLElement} element (Optional) The element to create the logger in.
+ * @param {Object} config (Optional) Configuration options for the logger.
+ */
+YAHOO.tool.TestLogger = function (element, config) {
+    YAHOO.tool.TestLogger.superclass.constructor.call(this, element, config);
+    this.init();
+};
+
+YAHOO.lang.extend(YAHOO.tool.TestLogger, YAHOO.widget.LogReader, {
+
+    footerEnabled : true,
+    newestOnTop : false,
+
+    /**
+     * Formats message string to HTML for output to console.
+     * @private
+     * @method formatMsg
+     * @param oLogMsg {Object} Log message object.
+     * @return {String} HTML-formatted message for output to console.
+     */
+    formatMsg : function(message /*:Object*/) {
+    
+        var category /*:String*/ = message.category;        
+        var text /*:String*/ = this.html2Text(message.msg);
+        
+        return "<pre><p><span class=\"" + category + "\">" + category.toUpperCase() + "</span> " + text + "</p></pre>";
+    
+    },
+    
+    //-------------------------------------------------------------------------
+    // Private Methods
+    //-------------------------------------------------------------------------
+    
+    /*
+     * Initializes the logger.
+     * @private
+     */
+    init : function () {
+    
+        //attach to any available TestRunner
+        if (YAHOO.tool.TestRunner){
+            this.setTestRunner(YAHOO.tool.TestRunner);
+        }
+        
+        //hide useless sources
+        this.hideSource("global");
+        this.hideSource("LogReader");
+        
+        //hide useless message categories
+        this.hideCategory("warn");
+        this.hideCategory("window");
+        this.hideCategory("time");
+        
+        //reset the logger
+        this.clearConsole();
+    },
+    
+    /**
+     * Clears the reference to the TestRunner from previous operations. This 
+     * unsubscribes all events and removes the object reference.
+     * @return {Void}
+     * @static
+     */
+    clearTestRunner : function () /*:Void*/ {
+        if (this._runner){
+            this._runner.unsubscribeAll();
+            this._runner = null;
+        }
+    },
+    
+    /**
+     * Sets the source test runner that the logger should monitor.
+     * @param {YAHOO.tool.TestRunner} testRunner The TestRunner to observe.
+     * @return {Void}
+     * @static
+     */
+    setTestRunner : function (testRunner /*:YAHOO.tool.TestRunner*/) /*:Void*/ {
+    
+        if (this._runner){
+            this.clearTestRunner();
+        }
+        
+        this._runner = testRunner;
+        
+        //setup event _handlers
+        testRunner.subscribe(testRunner.TEST_PASS_EVENT, this._handleTestRunnerEvent, this, true);
+        testRunner.subscribe(testRunner.TEST_FAIL_EVENT, this._handleTestRunnerEvent, this, true);
+        testRunner.subscribe(testRunner.TEST_IGNORE_EVENT, this._handleTestRunnerEvent, this, true);
+        testRunner.subscribe(testRunner.BEGIN_EVENT, this._handleTestRunnerEvent, this, true);
+        testRunner.subscribe(testRunner.COMPLETE_EVENT, this._handleTestRunnerEvent, this, true);
+        testRunner.subscribe(testRunner.TEST_SUITE_BEGIN_EVENT, this._handleTestRunnerEvent, this, true);
+        testRunner.subscribe(testRunner.TEST_SUITE_COMPLETE_EVENT, this._handleTestRunnerEvent, this, true);
+        testRunner.subscribe(testRunner.TEST_CASE_BEGIN_EVENT, this._handleTestRunnerEvent, this, true);
+        testRunner.subscribe(testRunner.TEST_CASE_COMPLETE_EVENT, this._handleTestRunnerEvent, this, true);    
+    },
+    
+    //-------------------------------------------------------------------------
+    // Event Handlers
+    //-------------------------------------------------------------------------
+    
+    /**
+     * Handles all TestRunner events, outputting appropriate data into the console.
+     * @param {Object} data The event data object.
+     * @return {Void}
+     * @private
+     */
+    _handleTestRunnerEvent : function (data /*:Object*/) /*:Void*/ {
+    
+        //shortcut variables
+        var TestRunner /*:Object*/ = YAHOO.tool.TestRunner;
+    
+        //data variables
+        var message /*:String*/ = "";
+        var messageType /*:String*/ = "";
+        
+        switch(data.type){
+            case TestRunner.BEGIN_EVENT:
+                message = "Testing began at " + (new Date()).toString() + ".";
+                messageType = "info";
+                break;
+                
+            case TestRunner.COMPLETE_EVENT:
+                message = "Testing completed at " + (new Date()).toString() + ".\nPassed:" + 
+                    data.results.passed + " Failed:" + data.results.failed + " Total:" + data.results.total;
+                messageType = "info";
+                break;
+                
+            case TestRunner.TEST_FAIL_EVENT:
+                message = data.testName + ": " + data.error.getMessage();
+                messageType = "fail";
+                break;
+                
+            case TestRunner.TEST_IGNORE_EVENT:
+                message = data.testName + ": ignored.";
+                messageType = "ignore";
+                break;
+                
+            case TestRunner.TEST_PASS_EVENT:
+                message = data.testName + ": passed.";
+                messageType = "pass";
+                break;
+                
+            case TestRunner.TEST_SUITE_BEGIN_EVENT:
+                message = "Test suite \"" + data.testSuite.name + "\" started.";
+                messageType = "info";
+                break;
+                
+            case TestRunner.TEST_SUITE_COMPLETE_EVENT:
+                message = "Test suite \"" + data.testSuite.name + "\" completed.\nPassed:" + 
+                    data.results.passed + " Failed:" + data.results.failed + " Total:" + data.results.total;
+                messageType = "info";
+                break;
+                
+            case TestRunner.TEST_CASE_BEGIN_EVENT:
+                message = "Test case \"" + data.testCase.name + "\" started.";
+                messageType = "info";
+                break;
+                
+            case TestRunner.TEST_CASE_COMPLETE_EVENT:
+                message = "Test case \"" + data.testCase.name + "\" completed.\nPassed:" + 
+                    data.results.passed + " Failed:" + data.results.failed + " Total:" + data.results.total;
+                messageType = "info";
+                break;
+            default:
+                message = "Unexpected event " + data.type;
+                message = "info";
+        }
+    
+        YAHOO.log(message, messageType, "TestRunner");    
+    }
+    
+});
+
+YAHOO.register("yuitest", YAHOO.tool.TestRunner, {version: "2.4.1", build: "742"});




More information about the Parley-svn mailing list